2022-07-20 23:38:06 +02:00
|
|
|
import {
|
|
|
|
Automation,
|
|
|
|
AutomationResults,
|
|
|
|
AutomationStep,
|
|
|
|
Document,
|
|
|
|
} from "@budibase/types"
|
2022-07-20 20:05:54 +02:00
|
|
|
|
|
|
|
export enum LoopStepTypes {
|
|
|
|
ARRAY = "Array",
|
|
|
|
STRING = "String",
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface LoopStep extends AutomationStep {
|
|
|
|
inputs: {
|
|
|
|
option: LoopStepTypes
|
|
|
|
[key: string]: any
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface LoopInput {
|
|
|
|
binding: string[] | string
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface TriggerOutput {
|
|
|
|
metadata?: any
|
|
|
|
appId?: string
|
|
|
|
timestamp?: number
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface AutomationEvent {
|
|
|
|
data: {
|
|
|
|
automation: Automation
|
|
|
|
event: any
|
|
|
|
}
|
2022-07-25 21:45:29 +02:00
|
|
|
opts?: {
|
|
|
|
repeat?: {
|
|
|
|
jobId: string
|
|
|
|
}
|
|
|
|
}
|
2022-07-20 20:05:54 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface AutomationContext extends AutomationResults {
|
|
|
|
steps: any[]
|
|
|
|
trigger: any
|
|
|
|
}
|
2022-07-20 23:38:06 +02:00
|
|
|
|
|
|
|
export interface AutomationMetadata extends Document {
|
|
|
|
errorCount?: number
|
|
|
|
}
|