@fsai-flow/workflow 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/README.md +31 -0
- package/dist/package.json +42 -0
- package/dist/src/index.d.ts +21 -0
- package/dist/src/index.js +33 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/lib/Constants.d.ts +68 -0
- package/dist/src/lib/Constants.js +106 -0
- package/dist/src/lib/Constants.js.map +1 -0
- package/dist/src/lib/DeferredPromise.d.ts +6 -0
- package/dist/src/lib/DeferredPromise.js +11 -0
- package/dist/src/lib/DeferredPromise.js.map +1 -0
- package/dist/src/lib/Expression.d.ts +65 -0
- package/dist/src/lib/Expression.js +215 -0
- package/dist/src/lib/Expression.js.map +1 -0
- package/dist/src/lib/Interfaces.d.ts +1579 -0
- package/dist/src/lib/Interfaces.js +44 -0
- package/dist/src/lib/Interfaces.js.map +1 -0
- package/dist/src/lib/LoggerProxy.d.ts +9 -0
- package/dist/src/lib/LoggerProxy.js +40 -0
- package/dist/src/lib/LoggerProxy.js.map +1 -0
- package/dist/src/lib/MetadataUtils.d.ts +4 -0
- package/dist/src/lib/MetadataUtils.js +27 -0
- package/dist/src/lib/MetadataUtils.js.map +1 -0
- package/dist/src/lib/NodeErrors.d.ts +82 -0
- package/dist/src/lib/NodeErrors.js +289 -0
- package/dist/src/lib/NodeErrors.js.map +1 -0
- package/dist/src/lib/NodeHelpers.d.ts +198 -0
- package/dist/src/lib/NodeHelpers.js +1348 -0
- package/dist/src/lib/NodeHelpers.js.map +1 -0
- package/dist/src/lib/ObservableObject.d.ts +5 -0
- package/dist/src/lib/ObservableObject.js +61 -0
- package/dist/src/lib/ObservableObject.js.map +1 -0
- package/dist/src/lib/RoutingNode.d.ts +18 -0
- package/dist/src/lib/RoutingNode.js +508 -0
- package/dist/src/lib/RoutingNode.js.map +1 -0
- package/dist/src/lib/TelemetryHelpers.d.ts +3 -0
- package/dist/src/lib/TelemetryHelpers.js +69 -0
- package/dist/src/lib/TelemetryHelpers.js.map +1 -0
- package/dist/src/lib/TypeValidation.d.ts +21 -0
- package/dist/src/lib/TypeValidation.js +385 -0
- package/dist/src/lib/TypeValidation.js.map +1 -0
- package/dist/src/lib/VersionedNodeType.d.ts +9 -0
- package/dist/src/lib/VersionedNodeType.js +26 -0
- package/dist/src/lib/VersionedNodeType.js.map +1 -0
- package/dist/src/lib/Workflow.d.ts +248 -0
- package/dist/src/lib/Workflow.js +904 -0
- package/dist/src/lib/Workflow.js.map +1 -0
- package/dist/src/lib/WorkflowDataProxy.d.ts +87 -0
- package/dist/src/lib/WorkflowDataProxy.js +556 -0
- package/dist/src/lib/WorkflowDataProxy.js.map +1 -0
- package/dist/src/lib/WorkflowErrors.d.ts +9 -0
- package/dist/src/lib/WorkflowErrors.js +18 -0
- package/dist/src/lib/WorkflowErrors.js.map +1 -0
- package/dist/src/lib/WorkflowHooks.d.ts +11 -0
- package/dist/src/lib/WorkflowHooks.js +34 -0
- package/dist/src/lib/WorkflowHooks.js.map +1 -0
- package/dist/src/lib/errors/base/base.error.d.ts +30 -0
- package/dist/src/lib/errors/base/base.error.js +45 -0
- package/dist/src/lib/errors/base/base.error.js.map +1 -0
- package/dist/src/lib/errors/base/operational.error.d.ts +15 -0
- package/dist/src/lib/errors/base/operational.error.js +19 -0
- package/dist/src/lib/errors/base/operational.error.js.map +1 -0
- package/dist/src/lib/errors/error.types.d.ts +11 -0
- package/dist/src/lib/errors/error.types.js +3 -0
- package/dist/src/lib/errors/error.types.js.map +1 -0
- package/dist/src/lib/errors/index.d.ts +1 -0
- package/dist/src/lib/errors/index.js +6 -0
- package/dist/src/lib/errors/index.js.map +1 -0
- package/dist/src/lib/result.d.ts +19 -0
- package/dist/src/lib/result.js +36 -0
- package/dist/src/lib/result.js.map +1 -0
- package/dist/src/lib/utils.d.ts +50 -0
- package/dist/src/lib/utils.js +119 -0
- package/dist/src/lib/utils.js.map +1 -0
- package/package.json +5 -1
- package/src/lib/Interfaces.ts +28 -33
- package/src/lib/Workflow.ts +1 -1
- package/src/lib/WorkflowDataProxy.ts +1 -1
- package/src/lib/utils.ts +99 -120
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { IContextObject, INode, INodeCredentialDescription, INodeExecutionData, INodeInputConfiguration, INodeIssues, INodeOutputConfiguration, INodeParameters, INodeProperties, INodePropertyCollection, INodeType, INodeTypeDescription, INodeVersionedType, IParameterDependencies, IRunExecutionData, IWebhookData, IWorkflowExecuteAdditionalData, NodeConnectionType, NodeParameterValue } from './Interfaces';
|
|
2
|
+
import { Workflow } from './Workflow';
|
|
3
|
+
export declare function getConnectionTypes(connections: Array<NodeConnectionType | INodeInputConfiguration | INodeOutputConfiguration>): NodeConnectionType[];
|
|
4
|
+
export declare const cronNodeOptions: INodePropertyCollection[];
|
|
5
|
+
export declare function isSubNodeType(typeDescription: Pick<INodeTypeDescription, 'outputs'> | null): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Gets special parameters which should be added to nodeTypes depending
|
|
8
|
+
* on their type or configuration
|
|
9
|
+
*
|
|
10
|
+
* @export
|
|
11
|
+
* @param {INodeType} nodeType
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
export declare function getSpecialNodeParameters(nodeType: INodeType): INodeProperties[];
|
|
15
|
+
/**
|
|
16
|
+
* Returns if the parameter should be displayed or not
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @param {INodeParameters} nodeValues The data on the node which decides if the parameter
|
|
20
|
+
* should be displayed
|
|
21
|
+
* @param {(INodeProperties | INodeCredentialDescription)} parameter The parameter to check if it should be displayed
|
|
22
|
+
* @param {INodeParameters} [nodeValuesRoot] The root node-parameter-data
|
|
23
|
+
* @returns
|
|
24
|
+
*/
|
|
25
|
+
export declare function displayParameter(nodeValues: INodeParameters, parameter: INodeProperties | INodeCredentialDescription, nodeValuesRoot?: INodeParameters): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Returns if the given parameter should be displayed or not considering the path
|
|
28
|
+
* to the properties
|
|
29
|
+
*
|
|
30
|
+
* @export
|
|
31
|
+
* @param {INodeParameters} nodeValues The data on the node which decides if the parameter
|
|
32
|
+
* should be displayed
|
|
33
|
+
* @param {(INodeProperties | INodeCredentialDescription)} parameter The parameter to check if it should be displayed
|
|
34
|
+
* @param {string} path The path to the property
|
|
35
|
+
* @returns
|
|
36
|
+
*/
|
|
37
|
+
export declare function displayParameterPath(nodeValues: INodeParameters, parameter: INodeProperties | INodeCredentialDescription, path: string): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Returns the context data
|
|
40
|
+
*
|
|
41
|
+
* @export
|
|
42
|
+
* @param {IRunExecutionData} runExecutionData The run execution data
|
|
43
|
+
* @param {string} type The data type. "node"/"flow"
|
|
44
|
+
* @param {INode} [node] If type "node" is set the node to return the context of has to be supplied
|
|
45
|
+
* @returns {IContextObject}
|
|
46
|
+
*/
|
|
47
|
+
export declare function getContext(runExecutionData: IRunExecutionData, type: string, node?: INode): IContextObject;
|
|
48
|
+
/**
|
|
49
|
+
* Returns which parameters are dependent on which
|
|
50
|
+
*
|
|
51
|
+
* @export
|
|
52
|
+
* @param {INodeProperties[]} nodePropertiesArray
|
|
53
|
+
* @returns {IParameterDependencies}
|
|
54
|
+
*/
|
|
55
|
+
export declare function getParamterDependencies(nodePropertiesArray: INodeProperties[]): IParameterDependencies;
|
|
56
|
+
/**
|
|
57
|
+
* Returns in which order the parameters should be resolved
|
|
58
|
+
* to have the parameters available they depend on
|
|
59
|
+
*
|
|
60
|
+
* @export
|
|
61
|
+
* @param {INodeProperties[]} nodePropertiesArray
|
|
62
|
+
* @param {IParameterDependencies} parameterDependencies
|
|
63
|
+
* @returns {number[]}
|
|
64
|
+
*/
|
|
65
|
+
export declare function getParamterResolveOrder(nodePropertiesArray: INodeProperties[], parameterDependencies: IParameterDependencies): number[];
|
|
66
|
+
/**
|
|
67
|
+
* Returns the node parameter values. Depending on the settings it either just returns the none
|
|
68
|
+
* default values or it applies all the default values.
|
|
69
|
+
*
|
|
70
|
+
* @export
|
|
71
|
+
* @param {INodeProperties[]} nodePropertiesArray The properties which exist and their settings
|
|
72
|
+
* @param {INodeParameters} nodeValues The node parameter data
|
|
73
|
+
* @param {boolean} returnDefaults If default values get added or only none default values returned
|
|
74
|
+
* @param {boolean} returnNoneDisplayed If also values which should not be displayed should be returned
|
|
75
|
+
* @param {boolean} [onlySimpleTypes=false] If only simple types should be resolved
|
|
76
|
+
* @param {boolean} [dataIsResolved=false] If nodeValues are already fully resolved (so that all default values got added already)
|
|
77
|
+
* @param {INodeParameters} [nodeValuesRoot] The root node-parameter-data
|
|
78
|
+
* @returns {(INodeParameters | null)}
|
|
79
|
+
*/
|
|
80
|
+
export declare function getNodeParameters(nodePropertiesArray: INodeProperties[], nodeValues: INodeParameters, returnDefaults: boolean, returnNoneDisplayed: boolean, onlySimpleTypes?: boolean, dataIsResolved?: boolean, nodeValuesRoot?: INodeParameters, parentType?: string, parameterDependencies?: IParameterDependencies): INodeParameters | null;
|
|
81
|
+
/**
|
|
82
|
+
* Brings the output data in a format that can be returned from a node
|
|
83
|
+
*
|
|
84
|
+
* @export
|
|
85
|
+
* @param {INodeExecutionData[]} outputData
|
|
86
|
+
* @param {number} [outputIndex=0]
|
|
87
|
+
* @returns {Promise<INodeExecutionData[][]>}
|
|
88
|
+
*/
|
|
89
|
+
export declare function prepareOutputData(outputData: INodeExecutionData[], outputIndex?: number): Promise<INodeExecutionData[][]>;
|
|
90
|
+
/**
|
|
91
|
+
* Returns all the webhooks which should be created for the give node
|
|
92
|
+
*
|
|
93
|
+
* @export
|
|
94
|
+
*
|
|
95
|
+
* @param {INode} node
|
|
96
|
+
* @returns {IWebhookData[]}
|
|
97
|
+
*/
|
|
98
|
+
export declare function getNodeWebhooks(workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, ignoreRestartWehbooks?: boolean): IWebhookData[];
|
|
99
|
+
export declare function getNodeWebhooksBasic(workflow: Workflow, node: INode): IWebhookData[];
|
|
100
|
+
/**
|
|
101
|
+
* Returns the webhook path
|
|
102
|
+
*
|
|
103
|
+
* @export
|
|
104
|
+
* @param {string} workflowId
|
|
105
|
+
* @param {string} nodeTypeName
|
|
106
|
+
* @param {string} path
|
|
107
|
+
* @returns {string}
|
|
108
|
+
*/
|
|
109
|
+
export declare function getNodeWebhookPath(workflowId: string, node: INode, path: string, isFullPath?: boolean, restartWebhook?: boolean): string;
|
|
110
|
+
/**
|
|
111
|
+
* Returns the webhook URL
|
|
112
|
+
*
|
|
113
|
+
* @export
|
|
114
|
+
* @param {string} baseUrl
|
|
115
|
+
* @param {string} workflowId
|
|
116
|
+
* @param {string} nodeTypeName
|
|
117
|
+
* @param {string} path
|
|
118
|
+
* @param {boolean} isFullPath
|
|
119
|
+
* @returns {string}
|
|
120
|
+
*/
|
|
121
|
+
export declare function getNodeWebhookUrl(baseUrl: string, workflowId: string, node: INode, path: string, isFullPath?: boolean): string;
|
|
122
|
+
/**
|
|
123
|
+
* Returns all the parameter-issues of the node
|
|
124
|
+
*
|
|
125
|
+
* @export
|
|
126
|
+
* @param {INodeProperties[]} nodePropertiesArray The properties of the node
|
|
127
|
+
* @param {INode} node The data of the node
|
|
128
|
+
* @returns {(INodeIssues | null)}
|
|
129
|
+
*/
|
|
130
|
+
export declare function getNodeParametersIssues(nodePropertiesArray: INodeProperties[], node: INode): INodeIssues | null;
|
|
131
|
+
/**
|
|
132
|
+
* Returns the issues of the node as string
|
|
133
|
+
*
|
|
134
|
+
* @export
|
|
135
|
+
* @param {INodeIssues} issues The issues of the node
|
|
136
|
+
* @param {INode} node The node
|
|
137
|
+
* @returns {string[]}
|
|
138
|
+
*/
|
|
139
|
+
export declare function nodeIssuesToString(issues: INodeIssues, node?: INode): string[];
|
|
140
|
+
/**
|
|
141
|
+
* Adds an issue if the parameter is not defined
|
|
142
|
+
*
|
|
143
|
+
* @export
|
|
144
|
+
* @param {INodeIssues} foundIssues The already found issues
|
|
145
|
+
* @param {INodeProperties} nodeProperties The properties of the node
|
|
146
|
+
* @param {NodeParameterValue} value The value of the parameter
|
|
147
|
+
*/
|
|
148
|
+
export declare function addToIssuesIfMissing(foundIssues: INodeIssues, nodeProperties: INodeProperties, value: NodeParameterValue): void;
|
|
149
|
+
/**
|
|
150
|
+
* Returns the parameter value
|
|
151
|
+
*
|
|
152
|
+
* @export
|
|
153
|
+
* @param {INodeParameters} nodeValues The values of the node
|
|
154
|
+
* @param {string} parameterName The name of the parameter to return the value of
|
|
155
|
+
* @param {string} path The path to the properties
|
|
156
|
+
* @returns
|
|
157
|
+
*/
|
|
158
|
+
export declare function getParameterValueByPath(nodeValues: INodeParameters, parameterName: string, path: string): INodeParameters | NodeParameterValue | NodeParameterValue[] | INodeParameters[];
|
|
159
|
+
/**
|
|
160
|
+
* Returns all the issues with the given node-values
|
|
161
|
+
*
|
|
162
|
+
* @export
|
|
163
|
+
* @param {INodeProperties} nodeProperties The properties of the node
|
|
164
|
+
* @param {INodeParameters} nodeValues The values of the node
|
|
165
|
+
* @param {string} path The path to the properties
|
|
166
|
+
* @returns {INodeIssues}
|
|
167
|
+
*/
|
|
168
|
+
export declare function getParameterIssues(nodeProperties: INodeProperties, nodeValues: INodeParameters, path: string): INodeIssues;
|
|
169
|
+
/**
|
|
170
|
+
* Merges multiple NodeIssues together
|
|
171
|
+
*
|
|
172
|
+
* @export
|
|
173
|
+
* @param {INodeIssues} destination The issues to merge into
|
|
174
|
+
* @param {(INodeIssues | null)} source The issues to merge
|
|
175
|
+
* @returns
|
|
176
|
+
*/
|
|
177
|
+
export declare function mergeIssues(destination: INodeIssues, source: INodeIssues | null): void;
|
|
178
|
+
/**
|
|
179
|
+
* Merges the given node properties
|
|
180
|
+
*
|
|
181
|
+
* @export
|
|
182
|
+
* @param {INodeProperties[]} mainProperties
|
|
183
|
+
* @param {INodeProperties[]} addProperties
|
|
184
|
+
*/
|
|
185
|
+
export declare function mergeNodeProperties(mainProperties: INodeProperties[], addProperties: INodeProperties[]): void;
|
|
186
|
+
export declare function getVersionedNodeType(object: INodeVersionedType | INodeType, version?: number): INodeType;
|
|
187
|
+
export declare function getVersionedNodeTypeAll(object: INodeVersionedType | INodeType): INodeType[];
|
|
188
|
+
export declare function isNodeTypeVersioned(object: INodeVersionedType | INodeType): boolean;
|
|
189
|
+
/**
|
|
190
|
+
* Returns the parameter value from the node parameters
|
|
191
|
+
*
|
|
192
|
+
* @export
|
|
193
|
+
* @param {INodeParameters} nodeParameters The node parameters
|
|
194
|
+
* @param {string} parameterName The name of the parameter to get
|
|
195
|
+
* @param {number} [index=0] The index of the parameter value if it's an array
|
|
196
|
+
* @returns {NodeParameterValue | undefined} The parameter value
|
|
197
|
+
*/
|
|
198
|
+
export declare function getParameterValue(nodeParameters: INodeParameters, parameterName: string, index?: number): NodeParameterValue | undefined;
|