You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
848 B
29 lines
848 B
import {
|
|
Workflow,
|
|
WorkflowSearch,
|
|
} from "@/components/models/management/Workflow";
|
|
import { request } from "@/components/service/index";
|
|
export const WorkflowService = {
|
|
add: (payload: Workflow) => {
|
|
return request.post("/api/workflows", payload);
|
|
},
|
|
getAll: () => {
|
|
return request.get("/api/workflows", {});
|
|
},
|
|
delete: (id: Number) => {
|
|
return request.delete(`/api/workflows/${id}`, {});
|
|
},
|
|
view: (id: Number) => {
|
|
return request.get(`/api/workflows/${id}`, {});
|
|
},
|
|
update: (id: number, payload: Workflow) => {
|
|
return request.put(`/api/workflows/${id}`, payload);
|
|
},
|
|
search: (payload: WorkflowSearch) => {
|
|
return request.get("/api/workflows/search", payload);
|
|
},
|
|
pipelineIdName: (pipelineId: string | number) => {
|
|
return request.get(`/api/workflows/pipeline/${pipelineId}`, {});
|
|
},
|
|
};
|