Remove
This commit is contained in:
parent
7901c2d4ac
commit
11b2e40836
|
@ -76,16 +76,8 @@ export async function update(ctx: UserCtx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function fetch(ctx: UserCtx<void, FetchAutomationResponse>) {
|
export async function fetch(ctx: UserCtx<void, FetchAutomationResponse>) {
|
||||||
const query: { enrich?: string } = ctx.request.query || {}
|
|
||||||
const enrich = query.enrich === "true"
|
|
||||||
|
|
||||||
const automations = await sdk.automations.fetch()
|
const automations = await sdk.automations.fetch()
|
||||||
ctx.body = { automations }
|
ctx.body = { automations }
|
||||||
if (enrich) {
|
|
||||||
ctx.body.builderData = await sdk.automations.utils.getBuilderData(
|
|
||||||
automations
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function find(ctx: UserCtx) {
|
export async function find(ctx: UserCtx) {
|
||||||
|
|
|
@ -3,22 +3,6 @@ import { Automation } from "../../documents"
|
||||||
|
|
||||||
export interface DeleteAutomationResponse extends DocumentDestroyResponse {}
|
export interface DeleteAutomationResponse extends DocumentDestroyResponse {}
|
||||||
|
|
||||||
export interface AutomationBuilderData {
|
|
||||||
displayName: string
|
|
||||||
triggerInfo?: {
|
|
||||||
type: string
|
|
||||||
table: {
|
|
||||||
id: string
|
|
||||||
name: string
|
|
||||||
}
|
|
||||||
rowAction: {
|
|
||||||
id: string
|
|
||||||
name: string
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface FetchAutomationResponse {
|
export interface FetchAutomationResponse {
|
||||||
automations: Automation[]
|
automations: Automation[]
|
||||||
builderData?: Record<string, AutomationBuilderData> // The key will be the automationId
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue