alloc_agent.api 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. // The response data of alloc agent list | AllocAgent列表数据
  16. AllocAgentListResp {
  17. BaseDataInfo
  18. // AllocAgent list data | AllocAgent列表数据
  19. Data AllocAgentListInfo `json:"data"`
  20. }
  21. // AllocAgent list data | AllocAgent列表数据
  22. AllocAgentListInfo {
  23. BaseListInfo
  24. // The API list data | AllocAgent列表数据
  25. Data []AllocAgentInfo `json:"data"`
  26. }
  27. // Get alloc agent list request params | AllocAgent列表请求参数
  28. AllocAgentListReq {
  29. PageInfo
  30. // agents | 分配的智能体IDs
  31. Agents *string `json:"agents,optional"`
  32. }
  33. // AllocAgent information response | AllocAgent信息返回体
  34. AllocAgentInfoResp {
  35. BaseDataInfo
  36. // AllocAgent information | AllocAgent数据
  37. Data AllocAgentInfo `json:"data"`
  38. }
  39. )
  40. @server(
  41. jwt: Auth
  42. group: allocagent
  43. middleware: Authority
  44. )
  45. service Wechat {
  46. // Create alloc agent information | 创建AllocAgent
  47. @handler createAllocAgent
  48. post /alloc_agent/create (AllocAgentInfo) returns (BaseMsgResp)
  49. // Update alloc agent information | 更新AllocAgent
  50. @handler updateAllocAgent
  51. post /alloc_agent/update (AllocAgentInfo) returns (BaseMsgResp)
  52. // Delete alloc agent information | 删除AllocAgent信息
  53. @handler deleteAllocAgent
  54. post /alloc_agent/delete (IDsReq) returns (BaseMsgResp)
  55. // Get alloc agent list | 获取AllocAgent列表
  56. @handler getAllocAgentList
  57. post /alloc_agent/list (AllocAgentListReq) returns (AllocAgentListResp)
  58. // Get alloc agent by ID | 通过ID获取AllocAgent
  59. @handler getAllocAgentById
  60. post /alloc_agent (IDReq) returns (AllocAgentInfoResp)
  61. }