alloc_agent.api 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. import "../base.api"
  2. type (
  3. // The data of alloc agent information | AllocAgent信息
  4. AllocAgentInfo {
  5. BaseIDInfo
  6. // user_id | 前台用户ID
  7. UserId *string `json:"userId,optional"`
  8. // organization_id | 租户ID
  9. OrganizationId *uint64 `json:"organizationId,optional"`
  10. // agents | 分配的智能体IDs
  11. Agents []uint64 `json:"agents,optional"`
  12. // status | 状态 1-正常 2-禁用
  13. Status *int `json:"status,optional"`
  14. }
  15. AllocAgentQuery {
  16. // user_id | 前台用户ID
  17. UserId *string `json:"userId,optional"`
  18. // organization_id | 租户ID
  19. OrganizationId *uint64 `json:"organizationId,optional"`
  20. }
  21. // The response data of alloc agent list | AllocAgent列表数据
  22. AllocAgentListResp {
  23. BaseDataInfo
  24. // AllocAgent list data | AllocAgent列表数据
  25. Data AllocAgentListInfo `json:"data"`
  26. }
  27. // AllocAgent list data | AllocAgent列表数据
  28. AllocAgentListInfo {
  29. BaseListInfo
  30. // The API list data | AllocAgent列表数据
  31. Data []AllocAgentInfo `json:"data"`
  32. }
  33. // Get alloc agent list request params | AllocAgent列表请求参数
  34. AllocAgentListReq {
  35. PageInfo
  36. // agents | 分配的智能体IDs
  37. Agents *string `json:"agents,optional"`
  38. }
  39. // AllocAgent information response | AllocAgent信息返回体
  40. AllocAgentInfoResp {
  41. BaseDataInfo
  42. // AllocAgent information | AllocAgent数据
  43. Data AllocAgentInfo `json:"data"`
  44. }
  45. )
  46. @server(
  47. jwt: Auth
  48. group: allocagent
  49. middleware: Authority
  50. )
  51. service Wechat {
  52. // Create alloc agent information | 创建AllocAgent
  53. @handler createAllocAgent
  54. post /alloc_agent/create (AllocAgentInfo) returns (BaseMsgResp)
  55. // Update alloc agent information | 更新AllocAgent
  56. @handler updateAllocAgent
  57. post /alloc_agent/update (AllocAgentInfo) returns (BaseMsgResp)
  58. // Delete alloc agent information | 删除AllocAgent信息
  59. @handler deleteAllocAgent
  60. post /alloc_agent/delete (IDsReq) returns (BaseMsgResp)
  61. // Get alloc agent list | 获取AllocAgent列表
  62. @handler getAllocAgentList
  63. post /alloc_agent/list (AllocAgentListReq) returns (AllocAgentListResp)
  64. // Get alloc agent by ID | 通过ID获取AllocAgent
  65. @handler getAllocAgentById
  66. post /alloc_agent (IDReq) returns (AllocAgentInfoResp)
  67. // Get alloc agent by ID | 通过ID获取AllocAgent
  68. @handler queryAllocAgent
  69. post /alloc_agent/query (AllocAgentQuery) returns (AllocAgentInfoResp)
  70. // Get alloc agent by ID | 通过ID获取AllocAgent
  71. @handler doAllocAgent
  72. post /alloc_agent/alloc (AllocAgentInfo) returns (BaseMsgResp)
  73. }