usage_total.api 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import "../base.api"
  2. type (
  3. // The response data of UsageTotal information | UsageTotal信息
  4. UsageTotalInfo {
  5. BaseIDInfo
  6. // Status 1: normal 2: ban | 状态 1 正常 2 禁用
  7. Status *uint8 `json:"status,optional"`
  8. // 1 微信 2 名片
  9. Type *int `json:"type,optional"
  10. // 微信或名片id
  11. BotId *string `json:"botId,optional"`
  12. // 使用token总数
  13. TotalTokens *uint64 `json:"totalTokens,optional"`
  14. // 重制后的起始usage_detail 索引
  15. StartIndex *uint64 `json:"startIndex,optional"`
  16. // usage_detail 索引
  17. EndIndex *uint64 `json:"endIndex,optional"`
  18. // 组织ID
  19. OrganizationId *uint64 `json:"organizationId,optional"`
  20. }
  21. // The response data of UsageTotal list | UsageTotal列表数据
  22. UsageTotalListResp {
  23. BaseDataInfo
  24. // UsageTotal list data | UsageTotal列表数据
  25. Data UsageTotalListInfo `json:"data"`
  26. }
  27. // UsageTotal list data | UsageTotal列表数据
  28. UsageTotalListInfo {
  29. BaseListInfo
  30. // The API list data | UsageTotal列表数据
  31. Data []UsageTotalInfo `json:"data"`
  32. }
  33. // Get wx list request params | Wx列表请求参数
  34. UsageTotalListReq {
  35. PageInfo
  36. // 租户id
  37. OrganizationId *uint64 `json:"organizationId,optional"`
  38. }
  39. )
  40. @server(
  41. jwt: Auth
  42. group: UsageTotal
  43. middleware: Authority
  44. )
  45. service Wechat {
  46. // Get usage total list | 获取Wx列表
  47. @handler getUsageTotalList
  48. post /usage_total/list (UsageTotalListReq) returns (UsageTotalListResp)
  49. }