diff --git a/packages/server/src/api/controllers/automation.ts b/packages/server/src/api/controllers/automation.ts index d1bd580331..b986b5232b 100644 --- a/packages/server/src/api/controllers/automation.ts +++ b/packages/server/src/api/controllers/automation.ts @@ -20,12 +20,12 @@ import { AutomationActionStepId, AutomationResults, UserCtx, + DeleteAutomationResponse, } from "@budibase/types" import { getActionDefinitions as actionDefs } from "../../automations/actions" import sdk from "../../sdk" import { builderSocket } from "../../websockets" import env from "../../environment" -import { DocumentDestroyResponse } from "@budibase/nano" async function getActionDefinitions() { return removeDeprecated(await actionDefs()) @@ -210,7 +210,7 @@ export async function find(ctx: UserCtx) { ctx.body = await db.get(ctx.params.id) } -export async function destroy(ctx: UserCtx) { +export async function destroy(ctx: UserCtx) { const db = context.getAppDB() const automationId = ctx.params.id const oldAutomation = await db.get(automationId) diff --git a/packages/server/src/api/controllers/layout.ts b/packages/server/src/api/controllers/layout.ts index 1a15432b88..c0406f50ac 100644 --- a/packages/server/src/api/controllers/layout.ts +++ b/packages/server/src/api/controllers/layout.ts @@ -1,9 +1,17 @@ import { EMPTY_LAYOUT } from "../../constants/layouts" import { generateLayoutID, getScreenParams } from "../../db/utils" import { events, context } from "@budibase/backend-core" -import { BBContext, Layout, UserCtx } from "@budibase/types" +import { + BBContext, + Layout, + SaveLayoutRequest, + SaveLayoutResponse, + UserCtx, +} from "@budibase/types" -export async function save(ctx: UserCtx) { +export async function save( + ctx: UserCtx +) { const db = context.getAppDB() let layout = ctx.request.body diff --git a/packages/types/src/api/web/automation.ts b/packages/types/src/api/web/automation.ts new file mode 100644 index 0000000000..c1f3d01b2f --- /dev/null +++ b/packages/types/src/api/web/automation.ts @@ -0,0 +1,3 @@ +import { DocumentDestroyResponse } from "@budibase/nano" + +export interface DeleteAutomationResponse extends DocumentDestroyResponse {} diff --git a/packages/types/src/api/web/index.ts b/packages/types/src/api/web/index.ts index ab18add208..62d8ce8280 100644 --- a/packages/types/src/api/web/index.ts +++ b/packages/types/src/api/web/index.ts @@ -11,3 +11,5 @@ export * from "./global" export * from "./pagination" export * from "./searchFilter" export * from "./cookies" +export * from "./automation" +export * from "./layout" diff --git a/packages/types/src/api/web/layout.ts b/packages/types/src/api/web/layout.ts new file mode 100644 index 0000000000..50512777ef --- /dev/null +++ b/packages/types/src/api/web/layout.ts @@ -0,0 +1,5 @@ +import { Layout } from "../../documents" + +export interface SaveLayoutRequest extends Layout {} + +export interface SaveLayoutResponse extends Layout {}