Add missing rowaction

This commit is contained in:
Adria Navarro 2024-10-24 13:51:44 +02:00
parent 637c13c1af
commit 4dedde5165
1 changed files with 16 additions and 2 deletions

View File

@ -1,7 +1,15 @@
import { rowEmission, tableEmission } from "./utils"
import mainEmitter from "./index"
import env from "../environment"
import { Table, Row, DocumentType, App, ContextEmitter } from "@budibase/types"
import {
Table,
Row,
DocumentType,
App,
ContextEmitter,
EventType,
UserBindings,
} from "@budibase/types"
import { context } from "@budibase/backend-core"
const MAX_AUTOMATIONS_ALLOWED = 5
@ -36,11 +44,15 @@ class AutomationEmitter implements ContextEmitter {
appId,
row,
table,
oldRow,
user,
}: {
eventName: string
eventName: EventType.ROW_SAVE | EventType.ROW_DELETE | EventType.ROW_UPDATE
appId: string
row: Row
table?: Table
oldRow?: Row
user: UserBindings
}) {
let MAX_AUTOMATION_CHAIN = await this.getMaxAutomationChain()
@ -54,7 +66,9 @@ class AutomationEmitter implements ContextEmitter {
appId,
row,
table,
oldRow,
metadata: this.metadata,
user,
})
}