v3-me-groups.yaml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-me-groups.yaml
  2. get:
  3. summary: 列出我加入的团队
  4. tags:
  5. - groups
  6. operationId: get_api_v3_me_groups
  7. description: |-
  8. 每条带我在团队里的角色(owner / manager / editor / reader),按加入时间排序。
  9. 实现:`V3\MeGroupController@index`
  10. security:
  11. -
  12. bearerAuth: []
  13. parameters:
  14. -
  15. name: owned
  16. in: query
  17. schema:
  18. type: boolean
  19. description: 'true 只列我创建的,false 只列我参加的别人的团队;不传列全部'
  20. -
  21. name: per_page
  22. in: query
  23. schema:
  24. type: integer
  25. default: 100
  26. description: '每页数量,最大 200'
  27. -
  28. name: search
  29. in: query
  30. schema:
  31. type: string
  32. description: 按团队名模糊匹配
  33. -
  34. name: page
  35. in: query
  36. schema:
  37. type: integer
  38. default: 1
  39. description: 页码
  40. responses:
  41. 200:
  42. description: 成功
  43. content:
  44. application/json:
  45. schema:
  46. type: object
  47. properties:
  48. data:
  49. type: array
  50. items:
  51. type: object
  52. properties:
  53. id:
  54. type: string
  55. name:
  56. type: string
  57. description:
  58. type: string
  59. nullable: true
  60. owner_id:
  61. type: string
  62. owner:
  63. type: object
  64. properties: { id: { type: string }, nickName: { type: string }, userName: { type: string }, realName: { type: string }, sn: { type: integer }, avatar: { type: string }, roles: { type: array, items: { type: string } } }
  65. nullable: true
  66. status:
  67. type: integer
  68. role:
  69. type: string
  70. member_id:
  71. type: string
  72. created_at:
  73. type: string
  74. joined_at:
  75. type: string
  76. meta:
  77. $ref: '../../main.yaml#/components/schemas/PaginationMeta'
  78. 401:
  79. $ref: '../../main.yaml#/components/responses/ProblemUnauthorized'
  80. 422:
  81. $ref: '../../main.yaml#/components/responses/ProblemValidation'
  82. post:
  83. summary: 凭邀请链接加入团队
  84. tags:
  85. - groups
  86. operationId: post_api_v3_me_groups
  87. description: |-
  88. `invite` 是邀请链接里的 token(见 `POST /v3/groups/{group}/invite-links`),
  89. 加入后角色是 reader(只读)。已经是成员时原样返回现有的成员身份(200,角色不变)。
  90. 只给人类账号,AI 模型的 token 403。
  91. 实现:`V3\MeGroupController@store`
  92. security:
  93. -
  94. bearerAuth: []
  95. requestBody:
  96. required: true
  97. content:
  98. application/json:
  99. schema:
  100. type: object
  101. properties:
  102. invite:
  103. type: string
  104. description: '邀请链接里的 token'
  105. required:
  106. - invite
  107. responses:
  108. 200:
  109. description: 成功
  110. content:
  111. application/json:
  112. schema:
  113. type: object
  114. properties:
  115. data:
  116. type: object
  117. properties:
  118. id:
  119. type: string
  120. name:
  121. type: string
  122. description:
  123. type: string
  124. nullable: true
  125. owner_id:
  126. type: string
  127. owner:
  128. type: object
  129. properties:
  130. id: { type: string }
  131. nickName: { type: string }
  132. userName: { type: string }
  133. realName: { type: string }
  134. sn: { type: integer }
  135. avatar: { type: string }
  136. roles: { type: array, items: { type: string } }
  137. nullable: true
  138. status:
  139. type: integer
  140. role:
  141. type: string
  142. member_id:
  143. type: string
  144. created_at:
  145. type: string
  146. joined_at:
  147. type: string
  148. 201:
  149. description: 已加入
  150. content:
  151. application/json:
  152. schema:
  153. type: object
  154. properties:
  155. data:
  156. type: object
  157. properties:
  158. id:
  159. type: string
  160. name:
  161. type: string
  162. description:
  163. type: string
  164. nullable: true
  165. owner_id:
  166. type: string
  167. owner:
  168. type: object
  169. properties:
  170. id: { type: string }
  171. nickName: { type: string }
  172. userName: { type: string }
  173. realName: { type: string }
  174. sn: { type: integer }
  175. avatar: { type: string }
  176. roles: { type: array, items: { type: string } }
  177. nullable: true
  178. status:
  179. type: integer
  180. role:
  181. type: string
  182. member_id:
  183. type: string
  184. created_at:
  185. type: string
  186. joined_at:
  187. type: string
  188. 401:
  189. $ref: '../../main.yaml#/components/responses/ProblemUnauthorized'
  190. 403:
  191. description: '用 AI 模型的 token 调用'
  192. content:
  193. application/problem+json:
  194. schema:
  195. $ref: '../../main.yaml#/components/schemas/ProblemDetails'
  196. 422:
  197. $ref: '../../main.yaml#/components/responses/ProblemValidation'