Add trigger

This commit is contained in:
Adria Navarro 2024-07-25 09:10:26 +02:00
parent 4743cc3ae5
commit 62eaa11ebb
2 changed files with 9 additions and 6 deletions

View File

@ -7,13 +7,16 @@ import {
AutomationEventType,
} from "@budibase/types"
// TODO
export const definition: AutomationTriggerSchema = {
type: AutomationStepType.TRIGGER,
name: "Row Action",
event: AutomationEventType.ROW_ACTION, // TODO
icon: "Workflow", // TODO
tagline:
"Row action triggered in {{inputs.enriched.table.name}} by {{inputs.enriched.row._id}}",
name: "Row Action",
description: "TODO description",
icon: "Workflow",
description: "TODO description", // TODO
stepId: AutomationTriggerStepId.ROW_ACTION,
inputs: {},
schema: {
@ -41,15 +44,14 @@ export const definition: AutomationTriggerSchema = {
table: {
type: AutomationIOType.OBJECT,
customType: AutomationCustomIOType.TABLE,
title: "Table",
title: "The table linked to the row action",
},
row: {
type: AutomationIOType.OBJECT,
customType: AutomationCustomIOType.ROW,
description: "The new row that was created",
description: "The row linked to the row action",
},
},
},
},
event: AutomationEventType.ROW_SAVE,
}

View File

@ -279,6 +279,7 @@ export enum AutomationEventType {
APP_TRIGGER = "app:trigger",
CRON_TRIGGER = "cron:trigger",
WEBHOOK_TRIGGER = "web:trigger",
ROW_ACTION = "row:action",
}
export type UpdatedRowEventEmitter = {