Add Instagram-style social features and Postman collections
هذا الالتزام موجود في:
@@ -108,12 +108,96 @@ Supported filters:
|
||||
- `GET /notifications`
|
||||
- `read`, `type`, `resourceType`, `sortOrder`
|
||||
- `GET /comments/post/:postId`
|
||||
- `page`, `limit`, `sortOrder`
|
||||
- `page`, `limit`, `sortBy`, `sortOrder`
|
||||
- `sortBy`: `createdAt`, `top`
|
||||
- `POST /comments/:commentId/replies`
|
||||
- JSON body: `content`
|
||||
- the route `commentId` is the parent comment; clients do not send `postId`
|
||||
- `GET /comments/:commentId/replies`
|
||||
- `page`, `limit`, `sortBy`, `sortOrder`
|
||||
- `sortBy`: `createdAt`, `top`
|
||||
- `PATCH /comments/:commentId`
|
||||
- JSON body: `content`, `mentionUsernames`
|
||||
|
||||
Comment list items include Instagram-like UI fields:
|
||||
|
||||
- `repliesCount`
|
||||
- `repliesPreview`
|
||||
- `likesCount`
|
||||
- `likedByMe`
|
||||
- `canEdit`
|
||||
- `canDelete`
|
||||
- `replyToUser`
|
||||
|
||||
## WebSocket auth
|
||||
|
||||
## Social upgrades
|
||||
|
||||
### Reposts and quote posts
|
||||
|
||||
- `POST /posts/:postId/repost`
|
||||
- body `{ "content": "" }` creates a plain repost
|
||||
- body `{ "content": "My take" }` creates a quote post
|
||||
- repost items expose `repostOfPostId`; quote items expose `quoteOfPostId`
|
||||
|
||||
### Reactions
|
||||
|
||||
Existing likes endpoints now accept `reactionType`:
|
||||
|
||||
- `like`
|
||||
- `love`
|
||||
- `haha`
|
||||
- `wow`
|
||||
- `sad`
|
||||
- `angry`
|
||||
|
||||
Example:
|
||||
|
||||
```json
|
||||
{
|
||||
"targetId": "...",
|
||||
"targetType": "post",
|
||||
"reactionType": "love"
|
||||
}
|
||||
```
|
||||
|
||||
`GET /likes/status/:targetType/:targetId` returns `reactionType` and `reactionSummary`.
|
||||
|
||||
### Private follow requests
|
||||
|
||||
When `targetUser.isPrivate=true`, `POST /follows/toggle` creates a pending request instead of following immediately.
|
||||
|
||||
- `GET /follows/requests`
|
||||
- `PATCH /follows/requests/:requestId/approve`
|
||||
- `PATCH /follows/requests/:requestId/reject`
|
||||
|
||||
`GET /follows/status/:targetUserId` returns `requested`.
|
||||
|
||||
### Reports
|
||||
|
||||
- `POST /reports`
|
||||
- `targetType`: `user`, `post`, `comment`, `listing`, `repair_shop`
|
||||
- `targetId`, `reason`, `details`
|
||||
- `GET /reports/me`
|
||||
- `GET /reports/superadmin`
|
||||
- `PATCH /reports/superadmin/:reportId/status`
|
||||
|
||||
### Blocks
|
||||
|
||||
Global block endpoints:
|
||||
|
||||
- `POST /blocks/:targetUserId`
|
||||
- `PATCH /blocks/:targetUserId/unblock`
|
||||
- `GET /blocks/status/:targetUserId`
|
||||
|
||||
Blocked users are excluded from feed/trending/explore visibility.
|
||||
|
||||
### Explore
|
||||
|
||||
- `GET /feed/explore`
|
||||
- public discovery feed using the trending ranking path
|
||||
- respects global block visibility
|
||||
|
||||
Both namespaces accept the JWT access token in one of these places:
|
||||
|
||||
- `auth.token`
|
||||
@@ -242,6 +326,41 @@ Recommended client behavior:
|
||||
- on normal networks, use `imageUrls[index]` or `imageVariants[index].mediumUrl`
|
||||
- on detail screens or zoom views, use `imageVariants[index].highUrl` or `imageVariants[index].originalUrl`
|
||||
|
||||
## Instagram-style social controls
|
||||
|
||||
Posts now support:
|
||||
|
||||
- carousel metadata through `imageItems[]` with `url`, `caption`, `altText`, and `order`
|
||||
- `collaboratorIds[]` on create/update
|
||||
- profile pinning through `PATCH /posts/:postId/pin-profile` and `/unpin-profile`
|
||||
- archive/restore through `PATCH /posts/:postId/archive` and `/restore-archive`
|
||||
- per-post comment settings through `PATCH /posts/:postId/comment-settings`
|
||||
|
||||
Comment settings:
|
||||
|
||||
- `commentsDisabled`
|
||||
- `commentsFollowersOnly`
|
||||
- `commentFilterKeywords[]`
|
||||
|
||||
Comments now support:
|
||||
|
||||
- `PATCH /comments/:commentId/pin`
|
||||
- `PATCH /comments/:commentId/unpin`
|
||||
- hidden offensive/filter matches via `hiddenByFilter`
|
||||
|
||||
Chat now supports:
|
||||
|
||||
- message media upload through `POST /chat/messages/upload`
|
||||
- replies with `replyToMessageId`
|
||||
- reactions through `PATCH /chat/messages/:messageId/reaction`
|
||||
- delete-for-me through `PATCH /chat/messages/:messageId/delete-for-me`
|
||||
|
||||
Reports now require fixed `reason` values:
|
||||
|
||||
- `spam`, `harassment`, `hate_speech`, `nudity`, `violence`, `scam`, `intellectual_property`, `self_harm`, `other`
|
||||
|
||||
When a post/comment reaches multiple open reports, the backend can automatically flag it for moderation. User reports can include `blockTarget: true` to block the reported user immediately.
|
||||
|
||||
## Marketplace split
|
||||
|
||||
Marketplace is now separated from musical instruments at the API contract level:
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم