v3-admin-credit-ledger.yaml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-admin-credit-ledger.yaml
  2. get:
  3. summary: 列出积分流水
  4. tags:
  5. - admin
  6. operationId: get_api_v3_admin_credit_ledger
  7. description: |-
  8. 最新的在前。包括结算赚取(earn)、提问扣减(spend)、出错退回(refund)与手工调整(adjust)。
  9. 实现:`V3\AdminCreditLedgerController@index`
  10. security:
  11. -
  12. bearerAuth: []
  13. parameters:
  14. -
  15. name: per_page
  16. in: query
  17. schema:
  18. type: integer
  19. default: 20
  20. description: '每页数量,最大 100'
  21. -
  22. name: 'filter[account_type]'
  23. in: query
  24. schema:
  25. type: string
  26. enum:
  27. - user
  28. - guest
  29. description: '账号类型;给 account_id 时必填'
  30. -
  31. name: 'filter[account_id]'
  32. in: query
  33. schema:
  34. type: string
  35. description: '账号 id(用户 uuid 或游客设备 id)'
  36. -
  37. name: 'filter[kind]'
  38. in: query
  39. schema:
  40. type: string
  41. enum:
  42. - earn
  43. - spend
  44. - refund
  45. - adjust
  46. description: 流水类型
  47. -
  48. name: 'filter[bucket]'
  49. in: query
  50. schema:
  51. type: string
  52. enum:
  53. - free
  54. - earned
  55. description: '池子:free 每日赠送 / earned 积分余额'
  56. -
  57. name: 'filter[source]'
  58. in: query
  59. schema:
  60. type: string
  61. enum:
  62. - reading
  63. - editing
  64. - agent_run
  65. - admin
  66. description: 来源
  67. -
  68. name: 'filter[from]'
  69. in: query
  70. schema:
  71. type: string
  72. description: 起始日(UTC,Y-m-d,按流水归属日)
  73. -
  74. name: 'filter[to]'
  75. in: query
  76. schema:
  77. type: string
  78. description: 结束日(UTC,Y-m-d,含当天)
  79. -
  80. name: page
  81. in: query
  82. schema:
  83. type: integer
  84. default: 1
  85. description: 页码
  86. responses:
  87. 200:
  88. description: 成功
  89. content:
  90. application/json:
  91. schema:
  92. type: object
  93. properties:
  94. data:
  95. type: array
  96. items:
  97. type: object
  98. properties:
  99. account_type:
  100. type: string
  101. enum: [user, guest]
  102. account_id:
  103. type: string
  104. user:
  105. type: object
  106. 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 } } }
  107. nullable: true
  108. delta:
  109. type: integer
  110. kind:
  111. type: string
  112. enum: [earn, spend, refund, adjust]
  113. bucket:
  114. type: string
  115. enum: [free, earned]
  116. source:
  117. type: string
  118. enum: [reading, editing, agent_run, admin]
  119. ref:
  120. type: string
  121. day:
  122. type: string
  123. policy_version:
  124. type: integer
  125. client_ip:
  126. type: string
  127. nullable: true
  128. note:
  129. type: string
  130. nullable: true
  131. operator:
  132. type: object
  133. 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 } } }
  134. nullable: true
  135. created_at:
  136. type: string
  137. updated_at:
  138. type: string
  139. meta:
  140. $ref: '../../main.yaml#/components/schemas/PaginationMeta'
  141. 401:
  142. $ref: '../../main.yaml#/components/responses/ProblemUnauthorized'
  143. 422:
  144. $ref: '../../main.yaml#/components/responses/ProblemValidation'