feat: enhance Admin and report services with CRUD operations and intervention links
This commit is contained in:
+13
-3
@@ -26,12 +26,17 @@ Authorization: Bearer <token>
|
||||
## Reports
|
||||
- `POST /reports`: create a report.
|
||||
- `GET /reports`: list reports with optional `status`, `category_id`, `area_id`.
|
||||
- `GET /report-categories`: list active report categories for authenticated users.
|
||||
- `GET /operator/teams`: list active intervention teams for operators/admins.
|
||||
- `GET /operator/reports/assigned`: list reports assigned to the current operator.
|
||||
- `GET /operator/reports/open`: list open unassigned reports.
|
||||
- `GET /operator/reports/others`: list reports assigned to other operators.
|
||||
- `GET /reports/{id}`: report detail.
|
||||
- `GET /reports/{id}/intervention-summary`: operator-facing report summary with
|
||||
citizen contact data, media and latest messages.
|
||||
- `GET /reports/{id}/team-suggestions`: suggest compatible teams by area/category.
|
||||
- `POST /reports/{id}/intervention-link`: create or rotate public team link.
|
||||
- `DELETE /reports/{id}/intervention-link`: revoke public team link.
|
||||
- `PATCH /reports/{id}/status`: update status.
|
||||
- `POST /reports/{id}/take`: assigned-queue operator takes an open report.
|
||||
- `POST /reports/{id}/messages`: write a report message.
|
||||
@@ -51,9 +56,12 @@ Authorization: Bearer <token>
|
||||
- `GET /me/rewards`: return current points and reward event history.
|
||||
|
||||
## Admin Reference Data
|
||||
- `GET|POST /admin/categories`
|
||||
- `GET|POST /admin/areas`
|
||||
- `GET|POST /admin/teams`
|
||||
- `POST /admin/categories`
|
||||
- `PATCH /admin/categories/{id}`
|
||||
- `POST /admin/areas`
|
||||
- `PATCH /admin/areas/{id}`
|
||||
- `POST /admin/teams`
|
||||
- `PATCH /admin/teams/{id}`
|
||||
- `GET /admin/stats/overview`
|
||||
- `GET /admin/moderation`: list moderation flags with optional `status`.
|
||||
- `PATCH /admin/moderation/{id}`: resolve or dismiss a moderation flag, optionally
|
||||
@@ -63,4 +71,6 @@ Authorization: Bearer <token>
|
||||
- `PATCH /admin/users/{id}/ban`
|
||||
|
||||
## Public Data
|
||||
- `GET /areas`: list active municipal areas.
|
||||
- `GET /interventions/{token}`: public intervention summary for external teams.
|
||||
- `GET /open-data/reports`: anonymized resolved/closed report export.
|
||||
|
||||
Reference in New Issue
Block a user