1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-04-28 22:42:26 +00:00
bramw_baserow/e2e-tests/fixtures/automation/automationWorkflow.ts
2025-04-17 17:01:26 +04:00

27 lines
618 B
TypeScript

import { getClient } from "../../client"
import { Automation } from "./automation"
export class AutomationWorkflow {
constructor(
public id: number,
public name: string,
public automation: Automation
) {}
}
export async function createAutomationWorkflow(
workflowName: string,
automation: Automation,
): Promise<AutomationWorkflow> {
const response: any = await getClient(automation.workspace.user).post(
`automation/${automation.id}/workflows/`,
{
name: workflowName,
}
)
return new AutomationWorkflow(
response.data.id,
response.data.name,
automation,
)
}