refactor: Restructure apps with new data pushing logic
This commit is contained in:
@@ -3,7 +3,13 @@ import Connection from '../models/connection';
|
||||
import Flow from '../models/flow';
|
||||
import Step from '../models/step';
|
||||
import Execution from '../models/execution';
|
||||
import { IJSONObject, IApp, IGlobalVariable } from '@automatisch/types';
|
||||
import {
|
||||
IJSONObject,
|
||||
IApp,
|
||||
IGlobalVariable,
|
||||
ITriggerItem,
|
||||
IActionItem,
|
||||
} from '@automatisch/types';
|
||||
|
||||
type GlobalVariableOptions = {
|
||||
connection?: Connection;
|
||||
@@ -61,11 +67,15 @@ const globalVariable = async (
|
||||
},
|
||||
triggerOutput: {
|
||||
data: [],
|
||||
error: null,
|
||||
},
|
||||
actionOutput: {
|
||||
data: null,
|
||||
error: null,
|
||||
},
|
||||
pushTriggerItem: (triggerItem: ITriggerItem) => {
|
||||
$.triggerOutput.data.push(triggerItem);
|
||||
},
|
||||
setActionItem: (actionItem: IActionItem) => {
|
||||
$.actionOutput.data = actionItem;
|
||||
},
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user