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/automation.ts
2025-04-17 17:01:26 +04:00

24 lines
582 B
TypeScript

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