101 featch available variables from previous steps (#8062)

- add outputSchema in workflow step settings
- use outputSchemas to compute step available variables


https://github.com/user-attachments/assets/6b851d8e-625c-49ff-b29c-074cd86cbfee
This commit is contained in:
martmull
2024-10-28 11:25:29 +00:00
committed by GitHub
parent 3ae987be92
commit 1aa961dedf
49 changed files with 706 additions and 83 deletions
@@ -1,6 +1,7 @@
import {
WorkflowCodeStepSettings,
WorkflowSendEmailStepSettings,
WorkflowStepSettings,
} from 'src/modules/workflow/workflow-executor/types/workflow-step-settings.type';
export enum WorkflowActionType {
@@ -11,6 +12,8 @@ export enum WorkflowActionType {
type BaseWorkflowStep = {
id: string;
name: string;
type: WorkflowActionType;
settings: WorkflowStepSettings;
valid: boolean;
};
@@ -1,4 +1,8 @@
export type OutputSchema = object;
type BaseWorkflowStepSettings = {
input: object;
outputSchema: OutputSchema;
errorHandlingOptions: {
retryOnFailure: {
value: boolean;
@@ -11,6 +15,8 @@ type BaseWorkflowStepSettings = {
export type WorkflowCodeStepInput = {
serverlessFunctionId: string;
serverlessFunctionVersion: string;
payloadInput: object;
};
export type WorkflowCodeStepSettings = BaseWorkflowStepSettings & {
@@ -27,3 +33,7 @@ export type WorkflowSendEmailStepInput = {
export type WorkflowSendEmailStepSettings = BaseWorkflowStepSettings & {
input: WorkflowSendEmailStepInput;
};
export type WorkflowStepSettings =
| WorkflowSendEmailStepSettings
| WorkflowCodeStepSettings;