mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-05-03 16:39:54 +00:00
23 lines
657 B
JavaScript
23 lines
657 B
JavaScript
export default (client) => {
|
|
return {
|
|
create(automationId, name) {
|
|
return client.post(`automation/${automationId}/workflows/`, {
|
|
name,
|
|
})
|
|
},
|
|
update(workflowId, values) {
|
|
return client.patch(`automation/workflows/${workflowId}/`, values)
|
|
},
|
|
delete(workflowId) {
|
|
return client.delete(`automation/workflows/${workflowId}/`)
|
|
},
|
|
order(automationId, order) {
|
|
return client.post(`/automation/${automationId}/workflows/order/`, {
|
|
workflow_ids: order,
|
|
})
|
|
},
|
|
duplicate(workflowId) {
|
|
return client.post(`/automation/workflows/${workflowId}/duplicate/async/`)
|
|
},
|
|
}
|
|
}
|