mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 08:18:42 +00:00
* Fix the URL for ordering workflows. * Remove unique constraint on workflow name * Add changelog * Regenerate migrations + standardize naming * Fix tests * Fix test
36 lines
1.0 KiB
JavaScript
36 lines
1.0 KiB
JavaScript
export default (client) => {
|
|
return {
|
|
create(automationId, name) {
|
|
return client.post(`automation/${automationId}/workflows/`, {
|
|
name,
|
|
})
|
|
},
|
|
read(workflowId) {
|
|
return client.get(`automation/workflows/${workflowId}/`)
|
|
},
|
|
getHistory(workflowId) {
|
|
return client.get(`automation/workflows/${workflowId}/history/`)
|
|
},
|
|
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/`)
|
|
},
|
|
publish(workflowId) {
|
|
return client.post(`/automation/workflows/${workflowId}/publish/async/`)
|
|
},
|
|
testRun(workflowId) {
|
|
return client.post(`/automation/workflows/${workflowId}/test/`)
|
|
},
|
|
}
|
|
}
|