1
0
Fork 0
mirror of synced 2024-06-28 02:50:50 +12:00
budibase/packages/types/src/documents/app/automation.ts

53 lines
878 B
TypeScript

import { Document } from "../document"
export interface Automation extends Document {
definition: {
steps: AutomationStep[]
trigger: AutomationTrigger
}
appId: string
name: string
}
export interface AutomationStep {
id: string
stepId: string
}
export interface AutomationTrigger {
id: string
stepId: string
}
export enum AutomationStatus {
SUCCESS = "success",
ERROR = "error",
STOPPED = "stopped",
}
export interface AutomationResults {
automationId: string
status: string
trigger?: any
steps: {
stepId: string
inputs: {
[key: string]: any
}
outputs: {
[key: string]: any
}
}[]
}
export interface AutomationLog extends AutomationResults, Document {
automationName: string
_rev?: string
}
export interface AutomationLogPage {
data: AutomationLog[]
hasNextPage: boolean
nextPage?: string
}