1
0
Fork 0
mirror of synced 2024-09-20 19:33:10 +12:00

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, AutomationEventType,
} from "@budibase/types" } from "@budibase/types"
// TODO
export const definition: AutomationTriggerSchema = { export const definition: AutomationTriggerSchema = {
type: AutomationStepType.TRIGGER, type: AutomationStepType.TRIGGER,
name: "Row Action",
event: AutomationEventType.ROW_ACTION, // TODO
icon: "Workflow", // TODO
tagline: tagline:
"Row action triggered in {{inputs.enriched.table.name}} by {{inputs.enriched.row._id}}", "Row action triggered in {{inputs.enriched.table.name}} by {{inputs.enriched.row._id}}",
name: "Row Action", description: "TODO description", // TODO
description: "TODO description",
icon: "Workflow",
stepId: AutomationTriggerStepId.ROW_ACTION, stepId: AutomationTriggerStepId.ROW_ACTION,
inputs: {}, inputs: {},
schema: { schema: {
@ -41,15 +44,14 @@ export const definition: AutomationTriggerSchema = {
table: { table: {
type: AutomationIOType.OBJECT, type: AutomationIOType.OBJECT,
customType: AutomationCustomIOType.TABLE, customType: AutomationCustomIOType.TABLE,
title: "Table", title: "The table linked to the row action",
}, },
row: { row: {
type: AutomationIOType.OBJECT, type: AutomationIOType.OBJECT,
customType: AutomationCustomIOType.ROW, 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", APP_TRIGGER = "app:trigger",
CRON_TRIGGER = "cron:trigger", CRON_TRIGGER = "cron:trigger",
WEBHOOK_TRIGGER = "web:trigger", WEBHOOK_TRIGGER = "web:trigger",
ROW_ACTION = "row:action",
} }
export type UpdatedRowEventEmitter = { export type UpdatedRowEventEmitter = {