notifications.yaml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. Notifications:
  2. get:
  3. operationId: listNotifications
  4. summary: 查询当前用户站内通知(id倒序,最近200条)
  5. parameters:
  6. - $ref: '../components/parameters.yaml#/XRequestId'
  7. responses:
  8. '200':
  9. description: 通知列表
  10. content:
  11. application/json:
  12. schema:
  13. $ref: '../components/schemas.yaml#/NotificationListResponse'
  14. '401':
  15. $ref: '../components/responses.yaml#/AuthenticationError'
  16. '500':
  17. $ref: '../components/responses.yaml#/InternalError'
  18. NotificationsUnreadCount:
  19. get:
  20. operationId: getNotificationUnreadCount
  21. summary: 查询当前用户未读通知数(红圈徽标数据源)
  22. parameters:
  23. - $ref: '../components/parameters.yaml#/XRequestId'
  24. responses:
  25. '200':
  26. description: 未读数
  27. content:
  28. application/json:
  29. schema:
  30. $ref: '../components/schemas.yaml#/NotificationUnreadCountResponse'
  31. '401':
  32. $ref: '../components/responses.yaml#/AuthenticationError'
  33. '500':
  34. $ref: '../components/responses.yaml#/InternalError'
  35. NotificationsReadAll:
  36. post:
  37. operationId: markNotificationsReadAll
  38. summary: 当前用户通知全部标记已读(打开通知页后清红圈)
  39. parameters:
  40. - $ref: '../components/parameters.yaml#/XRequestId'
  41. responses:
  42. '200':
  43. description: 标记完成(返回更新条数)
  44. content:
  45. application/json:
  46. schema:
  47. $ref: '../components/schemas.yaml#/NotificationReadAllResponse'
  48. '401':
  49. $ref: '../components/responses.yaml#/AuthenticationError'
  50. '500':
  51. $ref: '../components/responses.yaml#/InternalError'
  52. NotificationHandle:
  53. parameters:
  54. - name: id
  55. in: path
  56. required: true
  57. schema:
  58. $ref: '../components/schemas.yaml#/StringId'
  59. post:
  60. operationId: handleNotification
  61. summary: 处理待办通知(仅action=PENDING且归属本人可同意/拒绝)
  62. parameters:
  63. - $ref: '../components/parameters.yaml#/XRequestId'
  64. requestBody:
  65. required: true
  66. content:
  67. application/json:
  68. schema:
  69. $ref: '../components/schemas.yaml#/HandleNotificationRequest'
  70. responses:
  71. '200':
  72. description: 处理完成(返回处理后的通知)
  73. content:
  74. application/json:
  75. schema:
  76. $ref: '../components/schemas.yaml#/NotificationResponse'
  77. '400':
  78. $ref: '../components/responses.yaml#/InvalidArgument'
  79. '401':
  80. $ref: '../components/responses.yaml#/AuthenticationError'
  81. '404':
  82. $ref: '../components/responses.yaml#/NotFound'
  83. '409':
  84. $ref: '../components/responses.yaml#/Conflict'
  85. '500':
  86. $ref: '../components/responses.yaml#/InternalError'