123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274 |
- import "../base.api"
- type (
- // The response data of sop stage information | SopStage信息
- SopStageInfo {
- BaseIDInfo
- // Status 1: normal 2: ban | 状态 1 正常 2 禁用
- Status *uint8 `json:"status,optional"`
- // SOP 任务 ID
- TaskId *uint64 `json:"taskId,optional"`
- // 阶段名称
- Name *string `json:"name,optional"`
- // 客群筛选条件类型 1 按标签筛选 2 按客户基本信息筛选
- ConditionType *int `json:"conditionType,optional"`
- // 筛选条件关系 1 满足所有条件(and) 2 满足任意条件(or)
- ConditionOperator *int `json:"conditionOperator,optional"`
- // 筛选条件列表
- ConditionList []Condition `json:"conditionList,optional"`
- // 命中后发送的消息内容
- ActionMessage []Action `json:"actionMessage,optional"`
- // 命中后需要打的标签
- ActionLabelAdd []uint64 `json:"actionLabelAdd,optional"`
- // 命中后需要移除的标签
- ActionLabelDel []uint64 `json:"actionLabelDel,optional"`
- // 命中后转发的消息内容
- ActionForward *ActionForward `json:"actionForward,optional"`
- // 阶段顺序
- IndexSort *int `json:"indexSort,optional"`
- // sop 任务信息
- TaskInfo *SopTaskInfo `json:"taskInfo,optional"`
- // node 信息
- NodeList []SopNodeInfo `json:"nodeList,optional"`
- }
- // The response data of sop task information | SopTask信息
- SopTaskInfo {
- BaseIDInfo
- // Status 1: normal 2: ban | 状态 1 正常 2 禁用
- Status *uint8 `json:"status,optional"`
- // SOP 任务名称
- Name *string `json:"name,optional"`
- // 机器人微信 id 列表
- BotWxidList []string `json:"botWxidList,optional"`
- // 标签类型:1好友,2群组,3企业微信联系人
- Type *int `json:"type,optional"`
- // 任务计划开始时间
- PlanStartTime *int64 `json:"planStartTime,optional"`
- // 任务计划结束时间
- PlanEndTime *int64 `json:"planEndTime,optional"`
- // 创建者 id
- CreatorId *string `json:"creatorId,optional"`
- // 阶段信息
- StageList []SopStageInfo `json:"stageList,optional"`
- // 组织ID
- OrganizationId *uint64 `json:"organizationId,optional"`
- // Token
- Token []string `json:"token,optional"`
- }
- // The response data of sop node information | SopNode信息
- SopNodeInfo {
- BaseIDInfo
- // Status 1: normal 2: ban | 状态 1 正常 2 禁用
- Status *uint8 `json:"status,optional"`
- // 阶段 ID
- StageId *uint64 `json:"stageId,optional"`
- // 父节点 ID
- ParentId *uint64 `json:"parentId,optional"`
- // 节点名称
- Name *string `json:"name,optional"`
- // 触发条件类型 1 客户回复后触发 2 超时后触发
- ConditionType *int `json:"conditionType,optional"`
- // 触发语义列表 当为空时则代表用户回复任意内容后触发
- ConditionList []string `json:"conditionList,optional"`
- // 超时触发时间(分钟)
- NoReplyCondition *uint64 `json:"noReplyCondition,optional"`
- // 超时触发时间单位
- NoReplyUnit *string `json:"noReplyUnit,optional"`
- // 命中后发送的消息内容
- ActionMessage []Action `json:"actionMessage,optional"`
- // 命中后需要打的标签
- ActionLabelAdd []uint64 `json:"actionLabelAdd,optional"`
- // 命中后需要移除的标签
- ActionLabelDel []uint64 `json:"actionLabelDel,optional"`
- // 命中后转发的消息内容
- ActionForward *ActionForward `json:"actionForward,optional"`
- // 阶段信息
- StageInfo *SopStageInfo `json:"stageInfo,optional"`
- }
- // The response data of sop node information | SopNode信息
- SopNodeInfoWithLable {
- BaseIDInfo
- // Status 1: normal 2: ban | 状态 1 正常 2 禁用
- Status *uint8 `json:"status,optional"`
- // 阶段 ID
- StageId *uint64 `json:"stageId,optional"`
- // 父节点 ID
- ParentId *uint64 `json:"parentId,optional"`
- // 节点名称
- Name *string `json:"name,optional"`
- // 触发条件类型 1 客户回复后触发 2 超时后触发
- ConditionType *int `json:"conditionType,optional"`
- // 触发语义列表 当为空时则代表用户回复任意内容后触发
- ConditionList []string `json:"conditionList,optional"`
- // 超时触发时间(分钟)
- NoReplyCondition *uint64 `json:"noReplyCondition,optional"`
- // 超时触发时间单位
- NoReplyUnit *string `json:"noReplyUnit,optional"`
- // 命中后发送的消息内容
- ActionMessage []Action `json:"actionMessage,optional"`
- // 命中后需要打的标签
- ActionLabelAdd []uint64 `json:"actionLabelAdd,optional"`
- // 命中后需要移除的标签
- ActionLabelDel []uint64 `json:"actionLabelDel,optional"`
- // 命中后转发的消息内容
- ActionForward *ActionForward `json:"actionForward,optional"`
- ActionLabelAddList []string `json:"actionLabelAddList"`
- ActionLabelDelList []string `json:"actionLabelDelList"`
- }
- // The response data of sop stage list | SopStage列表数据
- SopStageListResp {
- BaseDataInfo
- // SopStage list data | SopStage列表数据
- Data SopStageListInfo `json:"data"`
- }
- // SopStage list data | SopStage列表数据
- SopStageListInfo {
- BaseListInfo
- // The API list data | SopStage列表数据
- Data []SopStageInfo `json:"data"`
- }
- // Get sop stage list request params | SopStage列表请求参数
- SopStageListReq {
- TaskId *uint64 `json:"taskId"`
- }
- // Batch get sop stage list request params | SopStage列表请求参数
- BatchSopStageListReq {
- TaskIds []uint64 `json:"taskIds"`
- }
- // SopStage information response | SopStage信息返回体
- SopStageInfoResp {
- BaseDataInfo
- // SopStage information | SopStage数据
- Data SopStageInfo `json:"data"`
- }
- // SopStage create response | SopStage创建回体
- SopStageCreateResp {
- BaseDataInfo
- // SopStage id | SopStage id
- Data uint64 `json:"data"`
- }
- // Move sop stage request params | 移动阶段请求参数
- SopStageMoveReq {
- BaseIDInfo
- // 阶段名称
- Offset *int `json:"offset,optional"`
- }
- StageCopyReq {
- // SopStage id | SopStage id
- Id uint64 `json:"id"`
- }
- )
- @server(
- group: sop_stage
- )
- service Wechat {
- // Get sop stage list | 获取SopStage列表
- @handler getApiSopStageList
- post /api/sop_stage/list (BatchSopStageListReq) returns (SopStageListResp)
- }
- @server(
- jwt: Auth
- group: sop_stage
- middleware: Authority
- )
- service Wechat {
- // Create sop stage information | 创建SopStage
- @handler createSopStage
- post /sop_stage/create (SopStageInfo) returns (SopStageCreateResp)
- // Update sop stage information | 更新SopStage
- @handler updateSopStage
- post /sop_stage/update (SopStageInfo) returns (BaseMsgResp)
- // Delete sop stage information | 删除SopStage信息
- @handler deleteSopStage
- post /sop_stage/delete (IDReq) returns (BaseMsgResp)
- // Get sop stage list | 获取SopStage列表
- @handler getSopStageList
- post /sop_stage/list (SopStageListReq) returns (SopStageListResp)
- // Get sop stage by ID | 通过ID获取SopStage
- @handler getSopStageById
- post /sop_stage (IDReq) returns (SopStageInfoResp)
- // Get sop stage by ID | 通过ID获取SopStage详情
- @handler getSopStageDetail
- post /sop_stage/detail (IDReq) returns (SopStageInfoResp)
- // Get sop stage move | 移动阶段顺序
- @handler moveSopStage
- post /sop_stage/move (SopStageMoveReq) returns (BaseMsgResp)
- // stage copy | SopStage 复制
- @handler sopStageCopy
- post /sop_stage/copy (StageCopyReq) returns (BaseMsgResp)
- }
|