import { http } from '@/utils/http'; import type { FlowResponse, FlowQuery, FlowRequest } from './types'; const baseUrl = '/api/v1/flows'; // 获取流程列表 export const getList = (params?: FlowQuery) => http.get(baseUrl, { params }); // 获取流程详情 export const getDetail = (id: number) => http.get(`${baseUrl}/${id}`); // 创建流程 export const create = (data: FlowRequest) => http.post(baseUrl, data); // 更新流程 export const update = (id: number, data: FlowRequest) => http.put(`${baseUrl}/${id}`, data); // 删除流程 export const remove = (id: number) => http.delete(`${baseUrl}/${id}`);