@fsai-flow/core 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/README.md +22 -2
- package/package.json +15 -5
- package/src/index.ts +1 -0
- package/src/lib/ActiveWorkflows.ts +326 -55
- package/src/lib/NodeExecuteFunctions.ts +0 -4
- package/src/lib/RedisLeaderElectionManager.ts +252 -0
- package/src/lib/WorkflowExecute.ts +26 -2
- package/tsconfig.base.json +28 -0
- package/tsconfig.json +1 -1
- package/dist/README.md +0 -11
- package/dist/package.json +0 -44
- package/dist/src/index.d.ts +0 -15
- package/dist/src/index.js +0 -29
- package/dist/src/index.js.map +0 -1
- package/dist/src/lib/ActiveWebhooks.d.ts +0 -59
- package/dist/src/lib/ActiveWebhooks.js +0 -184
- package/dist/src/lib/ActiveWebhooks.js.map +0 -1
- package/dist/src/lib/ActiveWorkflows.d.ts +0 -58
- package/dist/src/lib/ActiveWorkflows.js +0 -244
- package/dist/src/lib/ActiveWorkflows.js.map +0 -1
- package/dist/src/lib/BinaryDataManager/FileSystem.d.ts +0 -26
- package/dist/src/lib/BinaryDataManager/FileSystem.js +0 -179
- package/dist/src/lib/BinaryDataManager/FileSystem.js.map +0 -1
- package/dist/src/lib/BinaryDataManager/index.d.ts +0 -21
- package/dist/src/lib/BinaryDataManager/index.js +0 -146
- package/dist/src/lib/BinaryDataManager/index.js.map +0 -1
- package/dist/src/lib/ChangeCase.d.ts +0 -9
- package/dist/src/lib/ChangeCase.js +0 -43
- package/dist/src/lib/ChangeCase.js.map +0 -1
- package/dist/src/lib/Constants.d.ts +0 -14
- package/dist/src/lib/Constants.js +0 -19
- package/dist/src/lib/Constants.js.map +0 -1
- package/dist/src/lib/Credentials.d.ts +0 -27
- package/dist/src/lib/Credentials.js +0 -89
- package/dist/src/lib/Credentials.js.map +0 -1
- package/dist/src/lib/FileSystem.d.ts +0 -26
- package/dist/src/lib/FileSystem.js +0 -179
- package/dist/src/lib/FileSystem.js.map +0 -1
- package/dist/src/lib/InputConnectionDataLegacy.d.ts +0 -2
- package/dist/src/lib/InputConnectionDataLegacy.js +0 -79
- package/dist/src/lib/InputConnectionDataLegacy.js.map +0 -1
- package/dist/src/lib/Interfaces.d.ts +0 -148
- package/dist/src/lib/Interfaces.js +0 -3
- package/dist/src/lib/Interfaces.js.map +0 -1
- package/dist/src/lib/LoadNodeParameterOptions.d.ts +0 -39
- package/dist/src/lib/LoadNodeParameterOptions.js +0 -150
- package/dist/src/lib/LoadNodeParameterOptions.js.map +0 -1
- package/dist/src/lib/NodeExecuteFunctions.d.ts +0 -226
- package/dist/src/lib/NodeExecuteFunctions.js +0 -2483
- package/dist/src/lib/NodeExecuteFunctions.js.map +0 -1
- package/dist/src/lib/NodesLoader/constants.d.ts +0 -5
- package/dist/src/lib/NodesLoader/constants.js +0 -106
- package/dist/src/lib/NodesLoader/constants.js.map +0 -1
- package/dist/src/lib/NodesLoader/custom-directory-loader.d.ts +0 -9
- package/dist/src/lib/NodesLoader/custom-directory-loader.js +0 -36
- package/dist/src/lib/NodesLoader/custom-directory-loader.js.map +0 -1
- package/dist/src/lib/NodesLoader/directory-loader.d.ts +0 -66
- package/dist/src/lib/NodesLoader/directory-loader.js +0 -325
- package/dist/src/lib/NodesLoader/directory-loader.js.map +0 -1
- package/dist/src/lib/NodesLoader/index.d.ts +0 -5
- package/dist/src/lib/NodesLoader/index.js +0 -12
- package/dist/src/lib/NodesLoader/index.js.map +0 -1
- package/dist/src/lib/NodesLoader/lazy-package-directory-loader.d.ts +0 -7
- package/dist/src/lib/NodesLoader/lazy-package-directory-loader.js +0 -52
- package/dist/src/lib/NodesLoader/lazy-package-directory-loader.js.map +0 -1
- package/dist/src/lib/NodesLoader/load-class-in-isolation.d.ts +0 -1
- package/dist/src/lib/NodesLoader/load-class-in-isolation.js +0 -22
- package/dist/src/lib/NodesLoader/load-class-in-isolation.js.map +0 -1
- package/dist/src/lib/NodesLoader/package-directory-loader.d.ts +0 -17
- package/dist/src/lib/NodesLoader/package-directory-loader.js +0 -100
- package/dist/src/lib/NodesLoader/package-directory-loader.js.map +0 -1
- package/dist/src/lib/NodesLoader/types.d.ts +0 -14
- package/dist/src/lib/NodesLoader/types.js +0 -3
- package/dist/src/lib/NodesLoader/types.js.map +0 -1
- package/dist/src/lib/UserSettings.d.ts +0 -80
- package/dist/src/lib/UserSettings.js +0 -261
- package/dist/src/lib/UserSettings.js.map +0 -1
- package/dist/src/lib/WorkflowExecute.d.ts +0 -53
- package/dist/src/lib/WorkflowExecute.js +0 -835
- package/dist/src/lib/WorkflowExecute.js.map +0 -1
- package/dist/src/lib/index.d.ts +0 -21
- package/dist/src/lib/index.js +0 -146
- package/dist/src/lib/index.js.map +0 -1
- package/dist/src/utils/crypto.d.ts +0 -1
- package/dist/src/utils/crypto.js +0 -8
- package/dist/src/utils/crypto.js.map +0 -1
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
import { IAdditionalCredentialOptions, IAllExecuteFunctions, IBinaryData, ICredentialDataDecryptedObject, IDataObject, IExecuteFunctions, IExecuteSingleFunctions, IHttpRequestOptions, INode, INodeExecutionData, INodeParameters, INodeType, IOAuth2Options, IPollFunctions, IRunExecutionData, ITaskDataConnections, ITriggerFunctions, IWebhookData, IWebhookDescription, IWebhookFunctions, IWorkflowDataProxyAdditionalKeys, IWorkflowExecuteAdditionalData, IWorkflowMetadata, NodeParameterValue, Workflow, WorkflowActivateMode, WorkflowExecuteMode, ISupplyDataFunctions, NodeConnectionType, CloseFunction } from '@fsai-flow/workflow';
|
|
2
|
-
import { OptionsWithUri, OptionsWithUrl } from 'request';
|
|
3
|
-
import * as requestPromise from 'request-promise-native';
|
|
4
|
-
import { ICredentialTestFunctions, IHookFunctions, ILoadOptionsFunctions } from '../../src';
|
|
5
|
-
/**
|
|
6
|
-
* Returns binary data buffer for given item index and property name.
|
|
7
|
-
*
|
|
8
|
-
* @export
|
|
9
|
-
* @param {ITaskDataConnections} inputData
|
|
10
|
-
* @param {number} itemIndex
|
|
11
|
-
* @param {string} propertyName
|
|
12
|
-
* @param {number} inputIndex
|
|
13
|
-
* @returns {Promise<Buffer>}
|
|
14
|
-
*/
|
|
15
|
-
export declare function getBinaryDataBuffer(inputData: ITaskDataConnections, itemIndex: number, propertyName: string, inputIndex: number): Promise<Buffer>;
|
|
16
|
-
/**
|
|
17
|
-
* Takes a buffer and converts it into the format n8n uses. It encodes the binary data as
|
|
18
|
-
* base64 and adds metadata.
|
|
19
|
-
*
|
|
20
|
-
* @export
|
|
21
|
-
* @param {Buffer} binaryData
|
|
22
|
-
* @param {string} [filePath]
|
|
23
|
-
* @param {string} [mimeType]
|
|
24
|
-
* @returns {Promise<IBinaryData>}
|
|
25
|
-
*/
|
|
26
|
-
export declare function prepareBinaryData(binaryData: Buffer, executionId: string, filePath?: string, mimeType?: string): Promise<IBinaryData>;
|
|
27
|
-
export declare function getCurrentOAuth2AccessToken(this: IAllExecuteFunctions, credentialsType: string, node: INode, additionalData: IWorkflowExecuteAdditionalData, oAuth2Options?: IOAuth2Options): Promise<string>;
|
|
28
|
-
export declare function requestOAuth2(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUri | requestPromise.RequestPromiseOptions | IHttpRequestOptions, node: INode, additionalData: IWorkflowExecuteAdditionalData, oAuth2Options?: IOAuth2Options, isN8nRequest?: boolean): Promise<any>;
|
|
29
|
-
export declare function requestOAuth1(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUrl | OptionsWithUri | requestPromise.RequestPromiseOptions | IHttpRequestOptions, isN8nRequest?: boolean): Promise<any>;
|
|
30
|
-
export declare function httpRequestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: IHttpRequestOptions, workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<any>;
|
|
31
|
-
/**
|
|
32
|
-
* Takes generic input data and brings it into the json format n8n uses.
|
|
33
|
-
*
|
|
34
|
-
* @export
|
|
35
|
-
* @param {(IDataObject | IDataObject[])} jsonData
|
|
36
|
-
* @returns {INodeExecutionData[]}
|
|
37
|
-
*/
|
|
38
|
-
export declare function returnJsonArray(jsonData: IDataObject | IDataObject[]): INodeExecutionData[];
|
|
39
|
-
/**
|
|
40
|
-
* Automatically put the objects under a 'json' key and don't error,
|
|
41
|
-
* if some objects contain json/binary keys and others don't, throws error 'Inconsistent item format'
|
|
42
|
-
*
|
|
43
|
-
* @export
|
|
44
|
-
* @param {INodeExecutionData | INodeExecutionData[]} executionData
|
|
45
|
-
* @returns {INodeExecutionData[]}
|
|
46
|
-
*/
|
|
47
|
-
export declare function normalizeItems(executionData: INodeExecutionData | INodeExecutionData[]): INodeExecutionData[];
|
|
48
|
-
export declare function requestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUri | requestPromise.RequestPromiseOptions, workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<any>;
|
|
49
|
-
/**
|
|
50
|
-
* Returns the additional keys for Expressions and Function-Nodes
|
|
51
|
-
*
|
|
52
|
-
* @export
|
|
53
|
-
* @param {IWorkflowExecuteAdditionalData} additionalData
|
|
54
|
-
* @returns {(IWorkflowDataProxyAdditionalKeys)}
|
|
55
|
-
*/
|
|
56
|
-
export declare function getAdditionalKeys(additionalData: IWorkflowExecuteAdditionalData): IWorkflowDataProxyAdditionalKeys;
|
|
57
|
-
/**
|
|
58
|
-
* Returns the requested decrypted credentials if the node has access to them.
|
|
59
|
-
*
|
|
60
|
-
* @export
|
|
61
|
-
* @param {Workflow} workflow Workflow which requests the data
|
|
62
|
-
* @param {INode} node Node which request the data
|
|
63
|
-
* @param {string} type The credential type to return
|
|
64
|
-
* @param {IWorkflowExecuteAdditionalData} additionalData
|
|
65
|
-
* @returns {(ICredentialDataDecryptedObject | undefined)}
|
|
66
|
-
*/
|
|
67
|
-
export declare function getCredentials(workflow: Workflow, node: INode, type: string, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, runExecutionData?: IRunExecutionData | null, runIndex?: number, connectionInputData?: INodeExecutionData[], itemIndex?: number): Promise<ICredentialDataDecryptedObject | undefined>;
|
|
68
|
-
/**
|
|
69
|
-
* Returns a copy of the node
|
|
70
|
-
*
|
|
71
|
-
* @export
|
|
72
|
-
* @param {INode} node
|
|
73
|
-
* @returns {INode}
|
|
74
|
-
*/
|
|
75
|
-
export declare function getNode(node: INode): INode;
|
|
76
|
-
/**
|
|
77
|
-
* Returns the requested resolved (all expressions replaced) node parameters.
|
|
78
|
-
*
|
|
79
|
-
* @export
|
|
80
|
-
* @param {Workflow} workflow
|
|
81
|
-
* @param {(IRunExecutionData | null)} runExecutionData
|
|
82
|
-
* @param {number} runIndex
|
|
83
|
-
* @param {INodeExecutionData[]} connectionInputData
|
|
84
|
-
* @param {INode} node
|
|
85
|
-
* @param {string} parameterName
|
|
86
|
-
* @param {number} itemIndex
|
|
87
|
-
* @param {*} [fallbackValue]
|
|
88
|
-
* @returns {(NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object)}
|
|
89
|
-
*/
|
|
90
|
-
export declare function getNodeParameter(workflow: Workflow, runExecutionData: IRunExecutionData | null, runIndex: number, connectionInputData: INodeExecutionData[], node: INode, parameterName: string, itemIndex: number, mode: WorkflowExecuteMode, additionalKeys: IWorkflowDataProxyAdditionalKeys, fallbackValue?: any): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object;
|
|
91
|
-
/**
|
|
92
|
-
* Returns if execution should be continued even if there was an error.
|
|
93
|
-
*
|
|
94
|
-
* @export
|
|
95
|
-
* @param {INode} node
|
|
96
|
-
* @returns {boolean}
|
|
97
|
-
*/
|
|
98
|
-
export declare function continueOnFail(node: INode): boolean;
|
|
99
|
-
/**
|
|
100
|
-
* Returns the webhook URL of the webhook with the given name
|
|
101
|
-
*
|
|
102
|
-
* @export
|
|
103
|
-
* @param {string} name
|
|
104
|
-
* @param {Workflow} workflow
|
|
105
|
-
* @param {INode} node
|
|
106
|
-
* @param {IWorkflowExecuteAdditionalData} additionalData
|
|
107
|
-
* @param {boolean} [isTest]
|
|
108
|
-
* @returns {(string | undefined)}
|
|
109
|
-
*/
|
|
110
|
-
export declare function getNodeWebhookUrl(name: string, workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, additionalKeys: IWorkflowDataProxyAdditionalKeys, isTest?: boolean): string | undefined;
|
|
111
|
-
/**
|
|
112
|
-
* Returns the timezone for the workflow
|
|
113
|
-
*
|
|
114
|
-
* @export
|
|
115
|
-
* @param {Workflow} workflow
|
|
116
|
-
* @param {IWorkflowExecuteAdditionalData} additionalData
|
|
117
|
-
* @returns {string}
|
|
118
|
-
*/
|
|
119
|
-
export declare function getTimezone(workflow: Workflow, additionalData: IWorkflowExecuteAdditionalData): string;
|
|
120
|
-
/**
|
|
121
|
-
* Returns the full webhook description of the webhook with the given name
|
|
122
|
-
*
|
|
123
|
-
* @export
|
|
124
|
-
* @param {string} name
|
|
125
|
-
* @param {Workflow} workflow
|
|
126
|
-
* @param {INode} node
|
|
127
|
-
* @returns {(IWebhookDescription | undefined)}
|
|
128
|
-
*/
|
|
129
|
-
export declare function getWebhookDescription(name: string, workflow: Workflow, node: INode): IWebhookDescription | undefined;
|
|
130
|
-
/**
|
|
131
|
-
* Returns the workflow metadata
|
|
132
|
-
*
|
|
133
|
-
* @export
|
|
134
|
-
* @param {Workflow} workflow
|
|
135
|
-
* @returns {IWorkflowMetadata}
|
|
136
|
-
*/
|
|
137
|
-
export declare function getWorkflowMetadata(workflow: Workflow): IWorkflowMetadata;
|
|
138
|
-
/**
|
|
139
|
-
* Returns the execute functions the poll nodes have access to.
|
|
140
|
-
*
|
|
141
|
-
* @export
|
|
142
|
-
* @param {Workflow} workflow
|
|
143
|
-
* @param {INode} node
|
|
144
|
-
* @param {IWorkflowExecuteAdditionalData} additionalData
|
|
145
|
-
* @param {WorkflowExecuteMode} mode
|
|
146
|
-
* @returns {ITriggerFunctions}
|
|
147
|
-
*/
|
|
148
|
-
export declare function getExecutePollFunctions(workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, activation: WorkflowActivateMode): IPollFunctions;
|
|
149
|
-
/**
|
|
150
|
-
* Returns the execute functions the trigger nodes have access to.
|
|
151
|
-
*
|
|
152
|
-
* @export
|
|
153
|
-
* @param {Workflow} workflow
|
|
154
|
-
* @param {INode} node
|
|
155
|
-
* @param {IWorkflowExecuteAdditionalData} additionalData
|
|
156
|
-
* @param {WorkflowExecuteMode} mode
|
|
157
|
-
* @returns {ITriggerFunctions}
|
|
158
|
-
*/
|
|
159
|
-
export declare function getExecuteTriggerFunctions(workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, activation: WorkflowActivateMode): ITriggerFunctions;
|
|
160
|
-
/**
|
|
161
|
-
* Returns the execute functions regular nodes have access to.
|
|
162
|
-
*
|
|
163
|
-
* @export
|
|
164
|
-
* @param {Workflow} workflow
|
|
165
|
-
* @param {IRunExecutionData} runExecutionData
|
|
166
|
-
* @param {number} runIndex
|
|
167
|
-
* @param {INodeExecutionData[]} connectionInputData
|
|
168
|
-
* @param {ITaskDataConnections} inputData
|
|
169
|
-
* @param {INode} node
|
|
170
|
-
* @param {IWorkflowExecuteAdditionalData} additionalData
|
|
171
|
-
* @param {WorkflowExecuteMode} mode
|
|
172
|
-
* @returns {IExecuteFunctions}
|
|
173
|
-
*/
|
|
174
|
-
export declare function getExecuteFunctions(workflow: Workflow, runExecutionData: IRunExecutionData, runIndex: number, connectionInputData: INodeExecutionData[], inputData: ITaskDataConnections, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, nodeTypeData: INodeType, closeFunctions: CloseFunction[]): IExecuteFunctions;
|
|
175
|
-
/**
|
|
176
|
-
* Returns the execute functions regular nodes have access to when single-function is defined.
|
|
177
|
-
*
|
|
178
|
-
* @export
|
|
179
|
-
* @param {Workflow} workflow
|
|
180
|
-
* @param {IRunExecutionData} runExecutionData
|
|
181
|
-
* @param {number} runIndex
|
|
182
|
-
* @param {INodeExecutionData[]} connectionInputData
|
|
183
|
-
* @param {ITaskDataConnections} inputData
|
|
184
|
-
* @param {INode} node
|
|
185
|
-
* @param {number} itemIndex
|
|
186
|
-
* @param {IWorkflowExecuteAdditionalData} additionalData
|
|
187
|
-
* @param {WorkflowExecuteMode} mode
|
|
188
|
-
* @returns {IExecuteSingleFunctions}
|
|
189
|
-
*/
|
|
190
|
-
export declare function getExecuteSingleFunctions(workflow: Workflow, runExecutionData: IRunExecutionData, runIndex: number, connectionInputData: INodeExecutionData[], inputData: ITaskDataConnections, node: INode, itemIndex: number, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode): IExecuteSingleFunctions;
|
|
191
|
-
export declare function getCredentialTestFunctions(): ICredentialTestFunctions;
|
|
192
|
-
/**
|
|
193
|
-
* Returns the execute functions regular nodes have access to in load-options-function.
|
|
194
|
-
*
|
|
195
|
-
* @export
|
|
196
|
-
* @param {Workflow} workflow
|
|
197
|
-
* @param {INode} node
|
|
198
|
-
* @param {IWorkflowExecuteAdditionalData} additionalData
|
|
199
|
-
* @returns {ILoadOptionsFunctions}
|
|
200
|
-
*/
|
|
201
|
-
export declare function getLoadOptionsFunctions(workflow: Workflow, node: INode, path: string, additionalData: IWorkflowExecuteAdditionalData): ILoadOptionsFunctions;
|
|
202
|
-
/**
|
|
203
|
-
* Returns the execute functions regular nodes have access to in hook-function.
|
|
204
|
-
*
|
|
205
|
-
* @export
|
|
206
|
-
* @param {Workflow} workflow
|
|
207
|
-
* @param {INode} node
|
|
208
|
-
* @param {IWorkflowExecuteAdditionalData} additionalData
|
|
209
|
-
* @param {WorkflowExecuteMode} mode
|
|
210
|
-
* @returns {IHookFunctions}
|
|
211
|
-
*/
|
|
212
|
-
export declare function getExecuteHookFunctions(workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, activation: WorkflowActivateMode, isTest?: boolean, webhookData?: IWebhookData): IHookFunctions;
|
|
213
|
-
/**
|
|
214
|
-
* Returns the execute functions regular nodes have access to when webhook-function is defined.
|
|
215
|
-
*
|
|
216
|
-
* @export
|
|
217
|
-
* @param {Workflow} workflow
|
|
218
|
-
* @param {IRunExecutionData} runExecutionData
|
|
219
|
-
* @param {INode} node
|
|
220
|
-
* @param {IWorkflowExecuteAdditionalData} additionalData
|
|
221
|
-
* @param {WorkflowExecuteMode} mode
|
|
222
|
-
* @returns {IWebhookFunctions}
|
|
223
|
-
*/
|
|
224
|
-
export declare function getExecuteWebhookFunctions(workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, webhookData: IWebhookData, runExecutionData: IRunExecutionData | undefined): IWebhookFunctions;
|
|
225
|
-
export declare function getSupplyDataFunctions(workflow: Workflow, runExecutionData: IRunExecutionData, runIndex: number, connectionInputData: INodeExecutionData[], inputData: ITaskDataConnections, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, nodeTypeData: INodeType, closeFunctions: CloseFunction[]): ISupplyDataFunctions;
|
|
226
|
-
export declare function getInputConnectionData(this: IExecuteFunctions | ISupplyDataFunctions, workflow: Workflow, runExecutionData: IRunExecutionData, runIndex: number, connectionInputData: INodeExecutionData[], inputData: ITaskDataConnections, additionalData: IWorkflowExecuteAdditionalData, connectionType: NodeConnectionType, mode: WorkflowExecuteMode, itemIndex: number, nodeTypeData: INodeType, closeFunctions: CloseFunction[]): Promise<unknown>;
|