通知 API
管理用户通知偏好和通知列表。
列出通知
http
GET /api/v1/notifications
Authorization: Bearer <token>可选参数:unread_only=true、page、page_size。
标记已读
http
POST /api/v1/notifications/{notification_id}/read全部标记已读
http
POST /api/v1/notifications/read-all通知类型
| 类型 | 说明 |
|---|---|
gate_pending | 门禁等待审核 |
execution_completed | 执行完成 |
execution_failed | 执行失败 |
budget_alert | 预算告警 |
invitation_received | 收到邀请 |
member_added | 成员加入 |
通知偏好
http
PUT /api/v1/notifications/preferences
Content-Type: application/json
{
"email_enabled": true,
"desktop_enabled": true,
"types": ["gate_pending", "execution_failed", "budget_alert"]
}