sop_node.api 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. import "../base.api"
  2. import "./sop_stage.api"
  3. type (
  4. // The response data of sop node list | SopNode列表数据
  5. SopNodeListResp {
  6. BaseDataInfo
  7. // SopNode list data | SopNode列表数据
  8. Data []*SopChildNodeInfo `json:"data"`
  9. }
  10. // SopNode list data | SopNode列表数据
  11. SopChildNodeInfo {
  12. NodeName *string `json:"nodeName,optional"`
  13. ChildNode *SopChildNodeInfo `json:"childNode,optional"`
  14. // The API list data | SopNode列表数据
  15. ConditionNodes []*SopChildNodeInfo `json:"conditionNodes"`
  16. SopNodeInfo
  17. }
  18. // SopNode list data | SopNode列表数据
  19. SopNodeListInfo {
  20. BaseListInfo
  21. // The API list data | SopNode列表数据
  22. Data []SopNodeInfo `json:"data"`
  23. }
  24. // Get sop node list request params | SopNode列表请求参数
  25. SopNodeListReq {
  26. StageId *uint64 `json:"stageId"`
  27. }
  28. // Get sop node list request params | SopNode列表请求参数
  29. BatchSopNodeListReq {
  30. StageIds []uint64 `json:"stageIds"`
  31. }
  32. // SopNode information response | SopNode信息返回体
  33. SopNodeInfoResp {
  34. BaseDataInfo
  35. // SopNode information | SopNode数据
  36. Data SopNodeInfo `json:"data"`
  37. }
  38. // SopNode create response | SopNode创建返回体
  39. SopNodeCreateResp {
  40. BaseDataInfo
  41. // SopNode id | SopNode id
  42. Data uint64 `json:"data"`
  43. }
  44. )
  45. @server(
  46. group: sop_node
  47. )
  48. service Wechat {
  49. // Get api sop node list | 获取SopNode列表
  50. @handler getApiSopNodeList
  51. post /api/sop_node/list (BatchSopNodeListReq) returns (SopNodeListResp)
  52. }
  53. @server(
  54. jwt: Auth
  55. group: sop_node
  56. middleware: Authority
  57. )
  58. service Wechat {
  59. // Create sop node information | 创建SopNode
  60. @handler createSopNode
  61. post /sop_node/create (SopNodeInfo) returns (SopNodeCreateResp)
  62. // Update sop node information | 更新SopNode
  63. @handler updateSopNode
  64. post /sop_node/update (SopNodeInfo) returns (BaseMsgResp)
  65. // Delete sop node information | 删除SopNode信息
  66. @handler deleteSopNode
  67. post /sop_node/delete (IDReq) returns (BaseMsgResp)
  68. // Get sop node list | 获取SopNode列表
  69. @handler getSopNodeList
  70. post /sop_node/list (SopNodeListReq) returns (SopNodeListResp)
  71. // Get sop node by ID | 通过ID获取SopNode详情
  72. @handler getSopNodeDetail
  73. post /sop_node/detail (IDReq) returns (SopNodeInfoResp)
  74. }