import { httpApp } from "@/plugins/axiosApp";
import { TaskItem, ServerPageResponse } from "@/types";

/** 任务分页查询 */
export function getTaskList(params: {
  pageNo: number;
  pageSize: number;
  taskType?: string;
}) {
  return httpApp.post<any, ServerPageResponse<TaskItem>>(
    "/api/ess/operate/task/page",
    {},
    { params }
  );
}

/** 删除任务 */
export function deleteTask(id: number) {
  return httpApp.post(`/api/ess/operate/task/remove`, {}, { params: { id } });
}
