sop_stage.api 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. import "../base.api"
  2. type (
  3. // The response data of sop stage information | SopStage信息
  4. SopStageInfo {
  5. BaseIDInfo
  6. // Status 1: normal 2: ban | 状态 1 正常 2 禁用
  7. Status *uint8 `json:"status,optional"`
  8. // SOP 任务 ID
  9. TaskId *uint64 `json:"taskId,optional"`
  10. // 阶段名称
  11. Name *string `json:"name,optional"`
  12. // 客群筛选条件类型 1 按标签筛选 2 按客户基本信息筛选
  13. ConditionType *int `json:"conditionType,optional"`
  14. // 筛选条件关系 1 满足所有条件(and) 2 满足任意条件(or)
  15. ConditionOperator *int `json:"conditionOperator,optional"`
  16. // 筛选条件列表
  17. ConditionList []Condition `json:"conditionList,optional"`
  18. // 命中后发送的消息内容
  19. ActionMessage []Action `json:"actionMessage,optional"`
  20. // 命中后需要打的标签
  21. ActionLabel []uint64 `json:"actionLabel,optional"`
  22. // 阶段顺序
  23. IndexSort *int `json:"indexSort,optional"`
  24. // sop 任务信息
  25. TaskInfo *SopTaskInfo `json:"taskInfo,optional"`
  26. // node 信息
  27. NodeList []SopNodeInfo `json:"nodeList,optional"`
  28. }
  29. // The response data of sop task information | SopTask信息
  30. SopTaskInfo {
  31. BaseIDInfo
  32. // Status 1: normal 2: ban | 状态 1 正常 2 禁用
  33. Status *uint8 `json:"status,optional"`
  34. // SOP 任务名称
  35. Name *string `json:"name,optional"`
  36. // 机器人微信 id 列表
  37. BotWxidList []string `json:"botWxidList,optional"`
  38. // 标签类型:1好友,2群组,3企业微信联系人
  39. Type *int `json:"type,optional"`
  40. // 任务计划开始时间
  41. PlanStartTime *int64 `json:"planStartTime,optional"`
  42. // 任务计划结束时间
  43. PlanEndTime *int64 `json:"planEndTime,optional"`
  44. // 创建者 id
  45. CreatorId *string `json:"creatorId,optional"`
  46. // 阶段信息
  47. StageList []SopStageInfo `json:"stageList,optional"`
  48. // 组织ID
  49. OrganizationId *uint64 `json:"organizationId,optional"`
  50. }
  51. // The response data of sop node information | SopNode信息
  52. SopNodeInfo {
  53. BaseIDInfo
  54. // Status 1: normal 2: ban | 状态 1 正常 2 禁用
  55. Status *uint8 `json:"status,optional"`
  56. // 阶段 ID
  57. StageId *uint64 `json:"stageId,optional"`
  58. // 父节点 ID
  59. ParentId *uint64 `json:"parentId,optional"`
  60. // 节点名称
  61. Name *string `json:"name,optional"`
  62. // 触发条件类型 1 客户回复后触发 2 超时后触发
  63. ConditionType *int `json:"conditionType,optional"`
  64. // 触发语义列表 当为空时则代表用户回复任意内容后触发
  65. ConditionList []string `json:"conditionList,optional"`
  66. // 超时触发时间(分钟)
  67. NoReplyCondition *uint64 `json:"noReplyCondition,optional"`
  68. // 命中后发送的消息内容
  69. ActionMessage []Action `json:"actionMessage,optional"`
  70. // 命中后需要打的标签
  71. ActionLabel []uint64 `json:"actionLabel,optional"`
  72. // 阶段信息
  73. StageInfo *SopStageInfo `json:"stageInfo,optional"`
  74. }
  75. // The response data of sop stage list | SopStage列表数据
  76. SopStageListResp {
  77. BaseDataInfo
  78. // SopStage list data | SopStage列表数据
  79. Data SopStageListInfo `json:"data"`
  80. }
  81. // SopStage list data | SopStage列表数据
  82. SopStageListInfo {
  83. BaseListInfo
  84. // The API list data | SopStage列表数据
  85. Data []SopStageInfo `json:"data"`
  86. }
  87. // Get sop stage list request params | SopStage列表请求参数
  88. SopStageListReq {
  89. TaskId *uint64 `json:"taskId"`
  90. }
  91. // SopStage information response | SopStage信息返回体
  92. SopStageInfoResp {
  93. BaseDataInfo
  94. // SopStage information | SopStage数据
  95. Data SopStageInfo `json:"data"`
  96. }
  97. // SopStage create response | SopStage创建回体
  98. SopStageCreateResp {
  99. BaseDataInfo
  100. // SopStage id | SopStage id
  101. Data uint64 `json:"data"`
  102. }
  103. // Move sop stage request params | 移动阶段请求参数
  104. SopStageMoveReq {
  105. BaseIDInfo
  106. // 阶段名称
  107. Offset *int `json:"offset,optional"`
  108. }
  109. )
  110. @server(
  111. jwt: Auth
  112. group: sop_stage
  113. middleware: Authority
  114. )
  115. service Wechat {
  116. // Create sop stage information | 创建SopStage
  117. @handler createSopStage
  118. post /sop_stage/create (SopStageInfo) returns (SopStageCreateResp)
  119. // Update sop stage information | 更新SopStage
  120. @handler updateSopStage
  121. post /sop_stage/update (SopStageInfo) returns (BaseMsgResp)
  122. // Delete sop stage information | 删除SopStage信息
  123. @handler deleteSopStage
  124. post /sop_stage/delete (IDReq) returns (BaseMsgResp)
  125. // Get sop stage list | 获取SopStage列表
  126. @handler getSopStageList
  127. post /sop_stage/list (SopStageListReq) returns (SopStageListResp)
  128. // Get sop stage by ID | 通过ID获取SopStage
  129. @handler getSopStageById
  130. post /sop_stage (IDReq) returns (SopStageInfoResp)
  131. // Get sop stage by ID | 通过ID获取SopStage详情
  132. @handler getSopStageDetail
  133. post /sop_stage/detail (IDReq) returns (SopStageInfoResp)
  134. // Get sop stage move | 移动阶段顺序
  135. @handler moveSopStage
  136. post /sop_stage/move (SopStageMoveReq) returns (BaseMsgResp)
  137. }