v3-studios-studio-channels.yaml 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-studios-studio-channels.yaml
  2. get:
  3. summary: '列出 studio 的 channel'
  4. tags:
  5. - studios
  6. operationId: get_api_v3_studios_studio_channels
  7. description: |-
  8. 只有本人,或该团队的成员能看。`relation`:own 它名下的(默认),shared 直接共享给它的
  9. (个人空间不含经团队转来的——团队的在团队空间里看),all 两者合起来。
  10. 实现:`V3\StudioChannelController@index`
  11. security:
  12. -
  13. bearerAuth: []
  14. parameters:
  15. -
  16. name: studio
  17. in: path
  18. required: true
  19. schema:
  20. type: string
  21. description: '用户 uuid 或团队 uuid'
  22. -
  23. name: per_page
  24. in: query
  25. schema:
  26. type: integer
  27. default: 20
  28. description: '每页数量,最大 200'
  29. -
  30. name: relation
  31. in: query
  32. schema:
  33. type: string
  34. enum:
  35. - own
  36. - shared
  37. - all
  38. default: own
  39. description: 关系
  40. -
  41. name: collaborator
  42. in: query
  43. schema:
  44. type: string
  45. description: 只看这个拥有者共享过来的(uuid)
  46. -
  47. name: search
  48. in: query
  49. schema:
  50. type: string
  51. description: 按名字模糊匹配
  52. -
  53. name: type
  54. in: query
  55. schema:
  56. type: string
  57. enum:
  58. - translation
  59. - nissaya
  60. - original
  61. - wbw
  62. - commentary
  63. - similar
  64. description: 'channel 类型'
  65. -
  66. name: lang
  67. in: query
  68. schema:
  69. type: string
  70. description: 语言
  71. -
  72. name: book
  73. in: query
  74. schema:
  75. type: integer
  76. description: '章节所在的书(与 para 同时给)'
  77. -
  78. name: para
  79. in: query
  80. schema:
  81. type: integer
  82. description: '章节起始段(与 book 同时给)'
  83. -
  84. name: order
  85. in: query
  86. schema:
  87. type: string
  88. enum:
  89. - updated_at
  90. - created_at
  91. - name
  92. - progress
  93. default: updated_at
  94. description: 排序字段
  95. -
  96. name: dir
  97. in: query
  98. schema:
  99. type: string
  100. enum:
  101. - asc
  102. - desc
  103. default: desc
  104. description: 排序方向
  105. -
  106. name: page
  107. in: query
  108. schema:
  109. type: integer
  110. default: 1
  111. description: 页码
  112. responses:
  113. 200:
  114. description: 成功
  115. content:
  116. application/json:
  117. schema:
  118. type: object
  119. properties:
  120. data:
  121. type: array
  122. items:
  123. type: object
  124. properties:
  125. id:
  126. type: string
  127. name:
  128. type: string
  129. summary:
  130. type: string
  131. nullable: true
  132. type:
  133. type: string
  134. lang:
  135. type: string
  136. status:
  137. type: integer
  138. is_system:
  139. type: boolean
  140. source_type:
  141. type: string
  142. source_id:
  143. type: string
  144. nullable: true
  145. owner:
  146. type: object
  147. properties: { kind: { type: string }, id: { type: string }, nickName: { type: string }, realName: { type: string }, avatar: { type: string, nullable: true } }
  148. abilities:
  149. type: object
  150. properties: { read: { type: boolean }, write: { type: boolean }, update: { type: boolean }, delete: { type: boolean } }
  151. progress:
  152. type: number
  153. nullable: true
  154. description: 仅在部分查询口径下返回。
  155. created_at:
  156. type: string
  157. updated_at:
  158. type: string
  159. meta:
  160. $ref: '../../main.yaml#/components/schemas/PaginationMeta'
  161. 401:
  162. $ref: '../../main.yaml#/components/responses/ProblemUnauthorized'
  163. 403:
  164. description: '不能查看这个 studio'
  165. content:
  166. application/problem+json:
  167. schema:
  168. $ref: '../../main.yaml#/components/schemas/ProblemDetails'
  169. 422:
  170. $ref: '../../main.yaml#/components/responses/ProblemValidation'
  171. post:
  172. summary: '在 studio 名下建 channel'
  173. tags:
  174. - studios
  175. operationId: post_api_v3_studios_studio_channels
  176. description: |-
  177. 本人名下,或团队名下(团队 owner / manager)。同一 studio 内不能重名。默认私有。AI 模型不能建。
  178. 实现:`V3\StudioChannelController@store`
  179. security:
  180. -
  181. bearerAuth: []
  182. parameters:
  183. -
  184. name: studio
  185. in: path
  186. required: true
  187. schema:
  188. type: string
  189. description: '用户 uuid 或团队 uuid'
  190. requestBody:
  191. required: true
  192. content:
  193. application/json:
  194. schema:
  195. type: object
  196. properties:
  197. name:
  198. type: string
  199. description: '名字,最长 128'
  200. type:
  201. type: string
  202. description: 类型
  203. enum:
  204. - translation
  205. - nissaya
  206. - original
  207. - wbw
  208. - commentary
  209. - similar
  210. lang:
  211. type: string
  212. description: '语言,最长 16'
  213. summary:
  214. type: string
  215. description: '简介,最长 1024'
  216. status:
  217. type: integer
  218. description: '10 私有、20 公开不列出(拿到链接能看,不进任何公开列表)、30 公开'
  219. default: 10
  220. source_type:
  221. type: string
  222. description: 来源
  223. enum:
  224. - original
  225. - reprint
  226. - ai
  227. source_id:
  228. type: string
  229. description: '来源 id'
  230. required:
  231. - name
  232. - type
  233. - lang
  234. responses:
  235. 200:
  236. description: 成功
  237. content:
  238. application/json:
  239. schema:
  240. type: object
  241. properties:
  242. data:
  243. type: object
  244. properties:
  245. id:
  246. type: string
  247. name:
  248. type: string
  249. summary:
  250. type: string
  251. nullable: true
  252. type:
  253. type: string
  254. lang:
  255. type: string
  256. status:
  257. type: integer
  258. is_system:
  259. type: boolean
  260. source_type:
  261. type: string
  262. source_id:
  263. type: string
  264. nullable: true
  265. owner:
  266. type: object
  267. properties:
  268. kind: { type: string }
  269. id: { type: string }
  270. nickName: { type: string }
  271. realName: { type: string }
  272. avatar: { type: string, nullable: true }
  273. abilities:
  274. type: object
  275. properties:
  276. read: { type: boolean }
  277. write: { type: boolean }
  278. update: { type: boolean }
  279. delete: { type: boolean }
  280. progress:
  281. type: number
  282. nullable: true
  283. description: 仅在部分查询口径下返回。
  284. created_at:
  285. type: string
  286. updated_at:
  287. type: string
  288. 201:
  289. description: 建好了
  290. content:
  291. application/json:
  292. schema:
  293. type: object
  294. properties:
  295. data:
  296. type: object
  297. properties:
  298. id:
  299. type: string
  300. name:
  301. type: string
  302. summary:
  303. type: string
  304. nullable: true
  305. type:
  306. type: string
  307. lang:
  308. type: string
  309. status:
  310. type: integer
  311. is_system:
  312. type: boolean
  313. source_type:
  314. type: string
  315. source_id:
  316. type: string
  317. nullable: true
  318. owner:
  319. type: object
  320. properties:
  321. kind: { type: string }
  322. id: { type: string }
  323. nickName: { type: string }
  324. realName: { type: string }
  325. avatar: { type: string, nullable: true }
  326. abilities:
  327. type: object
  328. properties:
  329. read: { type: boolean }
  330. write: { type: boolean }
  331. update: { type: boolean }
  332. delete: { type: boolean }
  333. progress:
  334. type: number
  335. nullable: true
  336. description: 仅在部分查询口径下返回。
  337. created_at:
  338. type: string
  339. updated_at:
  340. type: string
  341. 401:
  342. $ref: '../../main.yaml#/components/responses/ProblemUnauthorized'
  343. 403:
  344. description: '不能在这个 studio 名下建'
  345. content:
  346. application/problem+json:
  347. schema:
  348. $ref: '../../main.yaml#/components/schemas/ProblemDetails'
  349. 422:
  350. $ref: '../../main.yaml#/components/responses/ProblemValidation'