add: some user api and all api desc

This commit is contained in:
wwweww
2026-02-27 19:17:01 +08:00
parent a0c720eb2f
commit 5930fb0dde
156 changed files with 9457 additions and 1086 deletions
+38
View File
@@ -0,0 +1,38 @@
syntax = "v1"
import "common.api"
type (
Notification {
Id string `json:"id"`
Type string `json:"type"`
Title string `json:"title"`
Content string `json:"content"`
Read bool `json:"read"`
Link string `json:"link,optional"`
CreatedAt string `json:"createdAt"`
}
NotificationListResp {
Items []Notification `json:"items"`
Meta PageMeta `json:"meta"`
}
)
@server(
prefix: api/v1
group: notification
jwt: Auth
)
service juwan-api {
@doc "获取通知列表"
@handler ListNotifications
get /notifications (PageReq) returns (NotificationListResp)
@doc "标记已读"
@handler ReadNotification
put /notifications/:id/read (EmptyResp) returns (EmptyResp)
@doc "全部已读"
@handler ReadAllNotifications
put /notifications/read-all (EmptyResp) returns (EmptyResp)
}