xunji.api 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. import "../base.api"
  2. type (
  3. // The data of xunji information | Xunji信息
  4. XunjiInfo {
  5. BaseIDInfo
  6. // Status 1: normal 2: ban | 状态 1 正常 2 禁用
  7. Status *uint8 `json:"status,optional"`
  8. // AppKey
  9. AppKey *string `json:"appKey,optional"`
  10. // AppSecret
  11. AppSecret *string `json:"appSecret,optional"`
  12. // Token
  13. Token *string `json:"token,optional"`
  14. // 加密key
  15. EncodingKey *string `json:"encodingKey,optional"`
  16. // 角色ID
  17. AgentId *uint64 `json:"agentId,optional"`
  18. // organization_id | 租户ID
  19. OrganizationId *uint64 `json:"organizationId,optional"`
  20. // 微信ID
  21. Wxid *string `json:"wxid,optional"`
  22. // 大模型服务地址
  23. ApiBase *string `json:"apiBase,optional"`
  24. // 大模型服务密钥
  25. ApiKey *string `json:"apiKey,optional"`
  26. }
  27. // The response data of xunji list | Xunji列表数据
  28. XunjiListResp {
  29. BaseDataInfo
  30. // Xunji list data | Xunji列表数据
  31. Data XunjiListInfo `json:"data"`
  32. }
  33. // Xunji list data | Xunji列表数据
  34. XunjiListInfo {
  35. BaseListInfo
  36. // The API list data | Xunji列表数据
  37. Data []XunjiInfo `json:"data"`
  38. }
  39. // Get xunji list request params | Xunji列表请求参数
  40. XunjiListReq {
  41. PageInfo
  42. // AppKey
  43. AppKey *string `json:"appKey,optional"`
  44. // AppSecret
  45. AppSecret *string `json:"appSecret,optional"`
  46. // Token
  47. Token *string `json:"token,optional"`
  48. }
  49. // Xunji information response | Xunji信息返回体
  50. XunjiInfoResp {
  51. BaseDataInfo
  52. // Xunji information | Xunji数据
  53. Data XunjiInfo `json:"data"`
  54. }
  55. )
  56. @server(
  57. jwt: Auth
  58. group: xunji
  59. middleware: Authority
  60. )
  61. service Wechat {
  62. // Create xunji information | 创建Xunji
  63. @handler createXunji
  64. post /xunji/create (XunjiInfo) returns (BaseMsgResp)
  65. // Update xunji information | 更新Xunji
  66. @handler updateXunji
  67. post /xunji/update (XunjiInfo) returns (BaseMsgResp)
  68. // Delete xunji information | 删除Xunji信息
  69. @handler deleteXunji
  70. post /xunji/delete (IDsReq) returns (BaseMsgResp)
  71. // Get xunji list | 获取Xunji列表
  72. @handler getXunjiList
  73. post /xunji/list (XunjiListReq) returns (XunjiListResp)
  74. // Get xunji by ID | 通过ID获取Xunji
  75. @handler getXunjiById
  76. post /xunji (IDReq) returns (XunjiInfoResp)
  77. }