// --auto generated by workflow auto-gen plugin--
package cn.axzo.workflow.starter.api;

import cn.axzo.workflow.common.model.request.bpmn.process.BpmnProcessInstanceAbortDTO;
import cn.axzo.workflow.common.model.request.bpmn.process.BpmnProcessInstanceAdminPageReqVO;
import cn.axzo.workflow.common.model.request.bpmn.process.BpmnProcessInstanceCancelDTO;
import cn.axzo.workflow.common.model.request.bpmn.process.BpmnProcessInstanceCarbonCopyDTO;
import cn.axzo.workflow.common.model.request.bpmn.process.BpmnProcessInstanceCheckApproverDTO;
import cn.axzo.workflow.common.model.request.bpmn.process.BpmnProcessInstanceCreateDTO;
import cn.axzo.workflow.common.model.request.bpmn.process.BpmnProcessInstanceCreateWithFormDTO;
import cn.axzo.workflow.common.model.request.bpmn.process.BpmnProcessInstanceMyPageReqVO;
import cn.axzo.workflow.common.model.request.bpmn.process.BpmnProcessInstanceQueryDTO;
import cn.axzo.workflow.common.model.request.bpmn.task.BpmnRobotTaskCompleteDTO;
import cn.axzo.workflow.common.model.request.bpmn.task.BpmnRobotTaskCreateDTO;
import cn.axzo.workflow.common.model.request.bpmn.task.BpmnTaskAttachmentDTO;
import cn.axzo.workflow.common.model.request.bpmn.task.BpmnTaskAuditDTO;
import cn.axzo.workflow.common.model.request.bpmn.task.BpmnTaskCommentDTO;
import cn.axzo.workflow.common.model.request.bpmn.task.BpmnTaskCountersignDTO;
import cn.axzo.workflow.common.model.request.bpmn.task.BpmnTaskPageSearchDTO;
import cn.axzo.workflow.common.model.request.bpmn.task.BpmnTaskRemindDTO;
import cn.axzo.workflow.common.model.request.bpmn.task.BpmnTaskTransferDTO;
import cn.axzo.workflow.common.model.response.BpmPageResult;
import cn.axzo.workflow.common.model.response.bpmn.BatchOperationResultVO;
import cn.axzo.workflow.common.model.response.bpmn.process.BpmnProcessInstanceAdminPageItemVO;
import cn.axzo.workflow.common.model.response.bpmn.process.BpmnProcessInstancePageItemVO;
import cn.axzo.workflow.common.model.response.bpmn.process.BpmnProcessInstanceVO;
import cn.axzo.workflow.common.model.response.bpmn.process.ProcessNodeDetailVO;
import cn.axzo.workflow.common.model.response.bpmn.task.BpmnHistoricTaskInstanceGroupVO;
import cn.axzo.workflow.common.model.response.bpmn.task.BpmnHistoricTaskInstanceVO;
import cn.axzo.workflow.common.model.response.bpmn.task.BpmnTaskDonePageItemVO;
import cn.axzo.workflow.common.model.response.bpmn.task.BpmnTaskInstanceVO;
import cn.axzo.workflow.common.model.response.bpmn.task.BpmnTaskTodoPageItemVO;
import cn.azxo.framework.common.model.CommonResponse;
import com.fasterxml.jackson.databind.node.ObjectNode;
import io.swagger.v3.oas.annotations.Operation;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.Object;
import java.lang.String;
import java.lang.Void;
import java.util.List;
import java.util.Map;
import javax.annotation.Nullable;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

public interface WorkflowCoreService_Gen {
  @Operation(
      summary = "待审核列表"
  )
  @GetMapping("/api/process/task/page/todo")
  CommonResponse<BpmPageResult<BpmnTaskTodoPageItemVO>> getTodoTaskPage(
      @Validated @RequestBody BpmnTaskPageSearchDTO dto);

  @Operation(
      summary = "已完成的审批列表"
  )
  @GetMapping("/api/process/task/page/done")
  CommonResponse<BpmPageResult<BpmnTaskDonePageItemVO>> getDoneTaskPage(
      @Validated @RequestBody BpmnTaskPageSearchDTO dto);

  @Operation(
      summary = "获取指定流程实例的审批过程信息"
  )
  @GetMapping("/api/process/task/list/flat")
  CommonResponse<List<BpmnHistoricTaskInstanceVO>> getTaskListFlatByProcessInstanceId(
      @NotBlank(message = "流程实例 ID 不能为空") @RequestParam String processInstanceId,
      @Nullable @RequestParam(required = false) String tenantId);

  @Operation(
      summary = "获取指定流程实例的审批过程信息"
  )
  @GetMapping("/api/process/task/list/group")
  CommonResponse<List<BpmnHistoricTaskInstanceGroupVO>> getTaskListGroupByProcessInstanceId(
      @NotBlank(message = "流程实例 ID 不能为空") @RequestParam String processInstanceId,
      @Nullable @RequestParam(required = false) String tenantId);

  @Operation(
      summary = "获取实例正在审核的人列表"
  )
  @GetMapping("/api/process/task/active/list")
  CommonResponse<List<BpmnTaskInstanceVO>> getActiveTasksByProcessInstanceId(
      @NotBlank(message = "流程实例 ID 不能为空") @RequestParam String processInstanceId,
      @NotBlank(message = "租户不能为空") @RequestParam String tenantId);

  @Operation(
      summary = "同意，MQ 触发规则:1. 当前审批任务会依次触发 process-task-completed 和 process-task-deleted 事件(如果有下一级审批,则会触发第 2.1 点中的事件,如果当前审核任务最后一级审批,则会触发第 2.2 点中的事件)，2.1. 下一级审批任务会依次触发 process-task-assigned 和 process-task-created 事件，2.2. 流程实例正常结束会触发 process-instance-completed 事件"
  )
  @PostMapping("/api/process/task/approve")
  CommonResponse<Boolean> approveTask(@Validated @RequestBody BpmnTaskAuditDTO dto);

  @Operation(
      summary = "批量同意"
  )
  @PostMapping("/api/process/task/batch/approve")
  CommonResponse<BatchOperationResultVO> batchApproveTask(
      @Validated @RequestBody List<BpmnTaskAuditDTO> dtos);

  @Operation(
      summary = "驳回，MQ 触发规则：1. 当前审批任务会触发 process-task-deleted 事件, 2. 当前流程实例会触发 process-instance-rejected 事件"
  )
  @PostMapping("/api/process/task/reject")
  CommonResponse<Boolean> rejectTask(@Validated @RequestBody BpmnTaskAuditDTO dto);

  @PostMapping("/api/process/task/batch/reject")
  CommonResponse<BatchOperationResultVO> batchRejectTask(
      @Validated @RequestBody List<BpmnTaskAuditDTO> dtos);

  @Operation(
      summary = "直接修改审批任务的审批人"
  )
  @PostMapping("/api/process/task/transfer")
  CommonResponse<Boolean> transferTask(@Validated @RequestBody BpmnTaskTransferDTO dto);

  @Operation(
      summary = "批量修改审批任务的审批人"
  )
  @PostMapping("/api/process/task/batch/transfer")
  CommonResponse<BatchOperationResultVO> batchTransferTask(
      @Validated @RequestBody List<BpmnTaskTransferDTO> dtos);

  @Operation(
      summary = "审批流程评论"
  )
  @PostMapping("/api/process/task/comment")
  CommonResponse<Boolean> commentTask(@Validated @RequestBody BpmnTaskCommentDTO dto);

  @Operation(
      summary = "添加附件"
  )
  @PostMapping("/api/process/task/attachment")
  CommonResponse<Void> addAttachment(@Validated @RequestBody BpmnTaskAttachmentDTO dto);

  @Operation(
      summary = "审批流程加签"
  )
  @PostMapping("/api/process/task/countersign")
  CommonResponse<Boolean> countersignTask(@Validated @RequestBody BpmnTaskCountersignDTO dto);

  @Operation(
      summary = "审批流程催办"
  )
  @PostMapping("/api/process/task/remind")
  CommonResponse<Boolean> remindTask(@Validated @RequestBody BpmnTaskRemindDTO dto);

  @Operation(
      summary = "创建机器人节点, 暂停流程任务"
  )
  @PostMapping("/api/process/task/robot/create")
  CommonResponse<String> createRobotTask(@Validated @RequestBody BpmnRobotTaskCreateDTO dto);

  @Operation(
      summary = "完成机器人节点, 继续流程任务"
  )
  @PostMapping("/api/process/task/robot/complete")
  CommonResponse<Boolean> completeRobotTask(@Validated @RequestBody BpmnRobotTaskCompleteDTO dto);

  @Operation(
      summary = "根据实例 ID 和自然人 ID 查询对应待处理的任务 ID"
  )
  @GetMapping("/api/process/task/find")
  CommonResponse<String> findTaskIdByInstanceIdAndPersonId(
      @RequestParam(required = false) @NotBlank(message = "流程实例 ID 不能为空") String processInstanceId,
      @RequestParam(required = false) @NotBlank(message = "自然人 ID 不能为空") String personId);

  @Operation(
      summary = "根据实例 ID列表 和自然人 ID 查询对应待处理的任务 ID"
  )
  @GetMapping("/api/process/task/batch/find")
  CommonResponse<Map<String, String>> findTaskIdByInstanceIdsAndPersonId(
      @RequestParam(required = false) @NotEmpty(message = "流程实例 ID列表 不能为空") List<String> processInstanceIds,
      @RequestParam(required = false) @NotBlank(message = "自然人 ID 不能为空") String personId);

  @Operation(
      summary = "查询所有的审批流"
  )
  @PostMapping("/api/process/instance/page/all")
  CommonResponse<BpmPageResult<BpmnProcessInstanceAdminPageItemVO>> getAllProcessInstancePage(
      @Validated @RequestBody BpmnProcessInstanceAdminPageReqVO dto);

  @Operation(
      summary = "我发起的审批列表"
  )
  @PostMapping("/api/process/instance/page/my")
  CommonResponse<BpmPageResult<BpmnProcessInstancePageItemVO>> getMyProcessInstancePage(
      @Validated @RequestBody BpmnProcessInstanceMyPageReqVO dto);

  @Operation(
      summary = "创建审批流程, MQ 触发规则:1. 当前流程实例会依次触发 process-instance-created 和 process-instance-started 事件,2. 第一个审批任务会依次触发 process-task-assigned 和 process-task-created 事件"
  )
  @PostMapping("/api/process/instance/create")
  CommonResponse<String> createProcessInstance(
      @Validated @RequestBody BpmnProcessInstanceCreateDTO dto);

  @Operation(
      summary = "创建审批流程并带上表单"
  )
  @PostMapping("/api/process/instance/form/create")
  CommonResponse<String> createProcessInstanceWith(
      @Validated @RequestBody BpmnProcessInstanceCreateWithFormDTO dto);

  @Operation(
      summary = "发起人主动撤回审核,MQ 触发规则:1. 当前流程实例中现存的任务会依次触发 process-task-deleted 事件,2. 当前流程实例会触发 process-instance-cancelled 事件"
  )
  @DeleteMapping("/api/process/instance/cancel")
  CommonResponse<Boolean> cancelProcessInstance(
      @Validated @RequestBody BpmnProcessInstanceCancelDTO dto);

  @Operation(
      summary = "中止流程实例"
  )
  @DeleteMapping("/api/process/instance/abort")
  CommonResponse<Boolean> abortProcessInstance(
      @Validated @RequestBody BpmnProcessInstanceAbortDTO dto);

  @Operation(
      summary = "批量中止流程实例"
  )
  @DeleteMapping("/api/process/instance/batch/abort")
  CommonResponse<BatchOperationResultVO> batchAbortProcessInstance(
      @Validated @RequestBody List<BpmnProcessInstanceAbortDTO> dtos);

  @Operation(
      summary = "抄送流程实例"
  )
  @PostMapping("/api/process/instance/carbon-copy")
  CommonResponse<Boolean> carbonCopyProcessInstance(
      @Validated @RequestBody BpmnProcessInstanceCarbonCopyDTO dto);

  @Operation(
      summary = "获得流程实例"
  )
  @GetMapping("/api/process/instance/get")
  CommonResponse<BpmnProcessInstanceVO> getProcessInstanceVO(
      @Validated @RequestBody BpmnProcessInstanceQueryDTO dto);

  @Operation(
      summary = "更新指定流程定义的版本的状态, 处于 suspended 状态的流程模型将不能再发起实例"
  )
  @PutMapping("/api/process/instance/status/update")
  CommonResponse<Boolean> updateProcessStatus(
      @NotBlank(message = "流程定义 ID 不能为空") @RequestParam String processDefinitionId,
      @NotNull(message = "状态不能为空") @RequestParam Integer status);

  @Operation(
      summary = "获取审批流程实例的运行图"
  )
  @GetMapping("/api/process/instance/graphical")
  CommonResponse<ObjectNode> processInstanceGraphical(
      @NotBlank(message = "流程实例 ID 不能为空") @RequestParam String processInstanceId,
      @Nullable @RequestParam(required = false) String tenantId);

  @Operation(
      summary = "推断指定流程实例的所有节点执行顺序"
  )
  @GetMapping("/api/process/instance/node/forecasting")
  CommonResponse<List<ProcessNodeDetailVO>> processInstanceNodeForecast(
      @NotBlank(message = "流程实例 ID 不能为空") @RequestParam(required = false) String processInstanceId,
      @Nullable @RequestParam(required = false) String tenantId);

  @Operation(
      summary = "推断指定流程实例的过滤掉部分节点执行顺序"
  )
  @GetMapping("/api/process/instance/node/filter/forecasting")
  CommonResponse<List<ProcessNodeDetailVO>> processInstanceFilterNodeForecast(
      @NotBlank(message = "流程实例 ID 不能为空") @RequestParam(required = false) String processInstanceId,
      @Nullable @RequestParam(required = false) String tenantId,
      @RequestParam(required = false, defaultValue = "false") Boolean allNode,
      @Nullable @RequestParam(required = false) List<String> nodeDefinitionKeys);

  @Operation(
      summary = "获取指定流程实例的流程变量"
  )
  @GetMapping("/api/process/instance/cooperation-org")
  CommonResponse<Map<String, Object>> getProcessVariables(
      @NotBlank(message = "流程实例 ID 不能为空") @RequestParam String processInstanceId,
      @Nullable @RequestParam(required = false) String tenantId);

  @Operation(
      summary = "查询实例的租户集合"
  )
  @GetMapping("/api/process/instance/tenant/ids")
  CommonResponse<List<String>> getTenantIds();

  @Operation(
      summary = "校验指定流程实例下,是否存在指定的审批人"
  )
  @PostMapping("/api/process/instance/check/approver")
  CommonResponse<Boolean> checkInstanceApprover(
      @Validated @RequestBody BpmnProcessInstanceCheckApproverDTO dto);
}
