@fsai-flow/workflow 0.0.3 → 0.1.0
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/src/index.d.ts +21 -20
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +58 -23
- package/dist/src/index.js.map +1 -1
- package/dist/src/lib/Constants.d.ts +2 -1
- package/dist/src/lib/Constants.d.ts.map +1 -0
- package/dist/src/lib/Constants.js +60 -60
- package/dist/src/lib/Constants.js.map +1 -1
- package/dist/src/lib/DeferredPromise.d.ts +1 -0
- package/dist/src/lib/DeferredPromise.d.ts.map +1 -0
- package/dist/src/lib/Expression.d.ts +2 -1
- package/dist/src/lib/Expression.d.ts.map +1 -0
- package/dist/src/lib/Expression.js +47 -15
- package/dist/src/lib/Expression.js.map +1 -1
- package/dist/src/lib/Interfaces.d.ts +193 -149
- package/dist/src/lib/Interfaces.d.ts.map +1 -0
- package/dist/src/lib/Interfaces.js +12 -12
- package/dist/src/lib/Interfaces.js.map +1 -1
- package/dist/src/lib/LoggerProxy.d.ts +2 -1
- package/dist/src/lib/LoggerProxy.d.ts.map +1 -0
- package/dist/src/lib/LoggerProxy.js +6 -6
- package/dist/src/lib/MetadataUtils.d.ts +3 -2
- package/dist/src/lib/MetadataUtils.d.ts.map +1 -0
- package/dist/src/lib/MetadataUtils.js +2 -2
- package/dist/src/lib/MetadataUtils.js.map +1 -1
- package/dist/src/lib/NodeErrors.d.ts +3 -2
- package/dist/src/lib/NodeErrors.d.ts.map +1 -0
- package/dist/src/lib/NodeErrors.js +61 -66
- package/dist/src/lib/NodeErrors.js.map +1 -1
- package/dist/src/lib/NodeHelpers.d.ts +4 -3
- package/dist/src/lib/NodeHelpers.d.ts.map +1 -0
- package/dist/src/lib/NodeHelpers.js +226 -239
- package/dist/src/lib/NodeHelpers.js.map +1 -1
- package/dist/src/lib/ObservableObject.d.ts +2 -1
- package/dist/src/lib/ObservableObject.d.ts.map +1 -0
- package/dist/src/lib/ObservableObject.js +3 -3
- package/dist/src/lib/RoutingNode.d.ts +8 -2
- package/dist/src/lib/RoutingNode.d.ts.map +1 -0
- package/dist/src/lib/RoutingNode.js +87 -67
- package/dist/src/lib/RoutingNode.js.map +1 -1
- package/dist/src/lib/TelemetryHelpers.d.ts +2 -1
- package/dist/src/lib/TelemetryHelpers.d.ts.map +1 -0
- package/dist/src/lib/TelemetryHelpers.js +9 -11
- package/dist/src/lib/TelemetryHelpers.js.map +1 -1
- package/dist/src/lib/TypeValidation.d.ts +3 -2
- package/dist/src/lib/TypeValidation.d.ts.map +1 -0
- package/dist/src/lib/TypeValidation.js +85 -94
- package/dist/src/lib/TypeValidation.js.map +1 -1
- package/dist/src/lib/VersionedNodeType.d.ts +4 -3
- package/dist/src/lib/VersionedNodeType.d.ts.map +1 -0
- package/dist/src/lib/VersionedNodeType.js +1 -3
- package/dist/src/lib/VersionedNodeType.js.map +1 -1
- package/dist/src/lib/Workflow.d.ts +3 -2
- package/dist/src/lib/Workflow.d.ts.map +1 -0
- package/dist/src/lib/Workflow.js +54 -59
- package/dist/src/lib/Workflow.js.map +1 -1
- package/dist/src/lib/WorkflowDataProxy.d.ts +2 -1
- package/dist/src/lib/WorkflowDataProxy.d.ts.map +1 -0
- package/dist/src/lib/WorkflowDataProxy.js +96 -69
- package/dist/src/lib/WorkflowDataProxy.js.map +1 -1
- package/dist/src/lib/WorkflowErrors.d.ts +2 -1
- package/dist/src/lib/WorkflowErrors.d.ts.map +1 -0
- package/dist/src/lib/WorkflowHooks.d.ts +3 -2
- package/dist/src/lib/WorkflowHooks.d.ts.map +1 -0
- package/dist/src/lib/WorkflowHooks.js +0 -2
- package/dist/src/lib/WorkflowHooks.js.map +1 -1
- package/dist/src/lib/errors/base/base.error.d.ts +3 -3
- package/dist/src/lib/errors/base/base.error.d.ts.map +1 -0
- package/dist/src/lib/errors/base/base.error.js +9 -7
- package/dist/src/lib/errors/base/base.error.js.map +1 -1
- package/dist/src/lib/errors/base/operational.error.d.ts +5 -4
- package/dist/src/lib/errors/base/operational.error.d.ts.map +1 -0
- package/dist/src/lib/errors/base/operational.error.js +1 -1
- package/dist/src/lib/errors/error.types.d.ts +7 -4
- package/dist/src/lib/errors/error.types.d.ts.map +1 -0
- package/dist/src/lib/errors/index.d.ts +2 -1
- package/dist/src/lib/errors/index.d.ts.map +1 -0
- package/dist/src/lib/result.d.ts +1 -0
- package/dist/src/lib/result.d.ts.map +1 -0
- package/dist/src/lib/result.js +1 -1
- package/dist/src/lib/result.js.map +1 -1
- package/dist/src/lib/utils.d.ts +3 -2
- package/dist/src/lib/utils.d.ts.map +1 -0
- package/dist/src/lib/utils.js +6 -6
- package/dist/src/lib/utils.js.map +1 -1
- package/package.json +49 -39
- package/.eslintrc.json +0 -33
- package/eslint.config.js +0 -19
- package/jest.config.ts +0 -10
- package/project.json +0 -19
- package/src/index.ts +0 -33
- package/src/lib/Constants.ts +0 -124
- package/src/lib/DeferredPromise.ts +0 -14
- package/src/lib/Expression.ts +0 -375
- package/src/lib/Interfaces.ts +0 -2257
- package/src/lib/LoggerProxy.ts +0 -43
- package/src/lib/MetadataUtils.ts +0 -34
- package/src/lib/NodeErrors.ts +0 -332
- package/src/lib/NodeHelpers.ts +0 -1666
- package/src/lib/ObservableObject.ts +0 -77
- package/src/lib/RoutingNode.ts +0 -862
- package/src/lib/TelemetryHelpers.ts +0 -86
- package/src/lib/TypeValidation.ts +0 -431
- package/src/lib/VersionedNodeType.ts +0 -30
- package/src/lib/Workflow.ts +0 -1270
- package/src/lib/WorkflowDataProxy.ts +0 -708
- package/src/lib/WorkflowErrors.ts +0 -18
- package/src/lib/WorkflowHooks.ts +0 -51
- package/src/lib/errors/base/base.error.ts +0 -68
- package/src/lib/errors/base/operational.error.ts +0 -21
- package/src/lib/errors/error.types.ts +0 -14
- package/src/lib/errors/index.ts +0 -1
- package/src/lib/result.ts +0 -34
- package/src/lib/utils.ts +0 -145
- package/tests/Helpers.ts +0 -667
- package/tests/NodeHelpers.test.ts +0 -3053
- package/tests/ObservableObject.test.ts +0 -171
- package/tests/RoutingNode.test.ts +0 -1680
- package/tests/Workflow.test.ts +0 -1284
- package/tests/WorkflowDataProxy.test.ts +0 -199
- package/tsconfig.json +0 -27
- package/tsconfig.lib.json +0 -11
- package/tsconfig.spec.json +0 -14
|
@@ -1,14 +1,73 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import type { URLSearchParams } from "node:url";
|
|
2
|
+
import type * as express from "express";
|
|
3
|
+
import type * as FormData from "form-data";
|
|
4
|
+
import type { CODE_EXECUTION_MODES, CODE_LANGUAGES, LOG_LEVELS } from "./Constants";
|
|
5
|
+
import type { IDeferredPromise } from "./DeferredPromise";
|
|
6
|
+
import type { NodeApiError, NodeOperationError } from "./NodeErrors";
|
|
7
|
+
import type { Workflow } from "./Workflow";
|
|
8
|
+
import type { WorkflowOperationError } from "./WorkflowErrors";
|
|
9
|
+
import type { WorkflowHooks } from "./WorkflowHooks";
|
|
10
|
+
/**
|
|
11
|
+
* Replacement types for the deprecated `request` / `request-promise-native` packages.
|
|
12
|
+
* These cover the subset of options that was actually referenced in this codebase.
|
|
13
|
+
*/
|
|
14
|
+
/** Mirrors `request.CoreOptions` – the common HTTP-request option bag. */
|
|
15
|
+
export interface IRequestCoreOptions {
|
|
16
|
+
baseUrl?: string;
|
|
17
|
+
jar?: boolean | object;
|
|
18
|
+
formData?: Record<string, unknown>;
|
|
19
|
+
form?: Record<string, unknown> | string;
|
|
20
|
+
auth?: {
|
|
21
|
+
user?: string;
|
|
22
|
+
username?: string;
|
|
23
|
+
password?: string;
|
|
24
|
+
bearer?: string;
|
|
25
|
+
sendImmediately?: boolean;
|
|
26
|
+
};
|
|
27
|
+
oauth?: Record<string, unknown>;
|
|
28
|
+
qs?: Record<string, unknown>;
|
|
29
|
+
qsStringifyOptions?: Record<string, unknown>;
|
|
30
|
+
qsParseOptions?: Record<string, unknown>;
|
|
31
|
+
json?: unknown;
|
|
32
|
+
multipart?: Array<{
|
|
33
|
+
body: unknown;
|
|
34
|
+
[key: string]: unknown;
|
|
35
|
+
}>;
|
|
36
|
+
agent?: unknown;
|
|
37
|
+
agentOptions?: Record<string, unknown>;
|
|
38
|
+
forever?: boolean;
|
|
39
|
+
host?: string;
|
|
40
|
+
port?: number;
|
|
41
|
+
method?: string;
|
|
42
|
+
headers?: Record<string, unknown>;
|
|
43
|
+
body?: unknown;
|
|
44
|
+
followRedirect?: boolean | ((response: unknown) => boolean);
|
|
45
|
+
followAllRedirects?: boolean;
|
|
46
|
+
maxRedirects?: number;
|
|
47
|
+
encoding?: string | null;
|
|
48
|
+
timeout?: number;
|
|
49
|
+
proxy?: unknown;
|
|
50
|
+
strictSSL?: boolean;
|
|
51
|
+
rejectUnauthorized?: boolean;
|
|
52
|
+
gzip?: boolean;
|
|
53
|
+
useQuerystring?: boolean;
|
|
54
|
+
[key: string]: unknown;
|
|
55
|
+
}
|
|
56
|
+
/** Equivalent to `request.OptionsWithUri`. */
|
|
57
|
+
export type OptionsWithUri = IRequestCoreOptions & {
|
|
58
|
+
uri: string;
|
|
59
|
+
};
|
|
60
|
+
/** Equivalent to `request.OptionsWithUrl`. */
|
|
61
|
+
export type OptionsWithUrl = IRequestCoreOptions & {
|
|
62
|
+
url: string;
|
|
63
|
+
};
|
|
64
|
+
/** Equivalent to `request-promise-native.RequestPromiseOptions`. */
|
|
65
|
+
export interface RequestPromiseOptions extends IRequestCoreOptions {
|
|
66
|
+
simple?: boolean;
|
|
67
|
+
resolveWithFullResponse?: boolean;
|
|
68
|
+
transform?: (body: unknown, response: unknown, resolveWithFullResponse?: boolean) => unknown;
|
|
69
|
+
transform2xxOnly?: boolean;
|
|
70
|
+
}
|
|
12
71
|
export interface IAdditionalCredentialOptions {
|
|
13
72
|
oauth2?: IOAuth2Options;
|
|
14
73
|
credentialsDecrypted?: ICredentialsDecrypted;
|
|
@@ -118,27 +177,27 @@ export declare abstract class Node {
|
|
|
118
177
|
poll?(context: IPollFunctions): Promise<INodeExecutionData[][] | null>;
|
|
119
178
|
}
|
|
120
179
|
export interface IAuthenticateBasicAuth extends IAuthenticateBase {
|
|
121
|
-
type:
|
|
180
|
+
type: "basicAuth";
|
|
122
181
|
properties: {
|
|
123
182
|
userPropertyName?: string;
|
|
124
183
|
passwordPropertyName?: string;
|
|
125
184
|
};
|
|
126
185
|
}
|
|
127
186
|
export interface IAuthenticateBearer extends IAuthenticateBase {
|
|
128
|
-
type:
|
|
187
|
+
type: "bearer";
|
|
129
188
|
properties: {
|
|
130
189
|
tokenPropertyName?: string;
|
|
131
190
|
};
|
|
132
191
|
}
|
|
133
192
|
export interface IAuthenticateHeaderAuth extends IAuthenticateBase {
|
|
134
|
-
type:
|
|
193
|
+
type: "headerAuth";
|
|
135
194
|
properties: {
|
|
136
195
|
name: string;
|
|
137
196
|
value: string;
|
|
138
197
|
};
|
|
139
198
|
}
|
|
140
199
|
export interface IAuthenticateQueryAuth extends IAuthenticateBase {
|
|
141
|
-
type:
|
|
200
|
+
type: "queryAuth";
|
|
142
201
|
properties: {
|
|
143
202
|
key: string;
|
|
144
203
|
value: string;
|
|
@@ -153,7 +212,7 @@ export interface IAuthenticateRuleBase {
|
|
|
153
212
|
errorMessage?: string;
|
|
154
213
|
}
|
|
155
214
|
export interface IAuthenticateRuleResponseCode extends IAuthenticateRuleBase {
|
|
156
|
-
type:
|
|
215
|
+
type: "responseCode";
|
|
157
216
|
properties: {
|
|
158
217
|
value: number;
|
|
159
218
|
message: string;
|
|
@@ -223,35 +282,23 @@ export interface INodeTypeNameVersion {
|
|
|
223
282
|
name: string;
|
|
224
283
|
version: number;
|
|
225
284
|
}
|
|
226
|
-
export
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
export
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
export interface IGetExecuteFunctions {
|
|
233
|
-
(workflow: Workflow, runExecutionData: IRunExecutionData, runIndex: number, connectionInputData: INodeExecutionData[], inputData: ITaskDataConnections, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, nodeTypeData: INodeType, closeFunctions: CloseFunction[]): IExecuteFunctions;
|
|
234
|
-
}
|
|
235
|
-
export interface IGetExecuteSingleFunctions {
|
|
236
|
-
(workflow: Workflow, runExecutionData: IRunExecutionData, runIndex: number, connectionInputData: INodeExecutionData[], inputData: ITaskDataConnections, node: INode, itemIndex: number, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode): IExecuteSingleFunctions;
|
|
237
|
-
}
|
|
238
|
-
export interface IGetExecuteHookFunctions {
|
|
239
|
-
(workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, activation: WorkflowActivateMode, isTest?: boolean, webhookData?: IWebhookData): IHookFunctions;
|
|
240
|
-
}
|
|
241
|
-
export interface IGetExecuteWebhookFunctions {
|
|
242
|
-
(workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, webhookData: IWebhookData, runExecutionData: IRunExecutionData | undefined): IWebhookFunctions;
|
|
243
|
-
}
|
|
285
|
+
export type IGetExecutePollFunctions = (workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, activation: WorkflowActivateMode) => IPollFunctions;
|
|
286
|
+
export type IGetExecuteTriggerFunctions = (workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, activation: WorkflowActivateMode) => ITriggerFunctions;
|
|
287
|
+
export type IGetExecuteFunctions = (workflow: Workflow, runExecutionData: IRunExecutionData, runIndex: number, connectionInputData: INodeExecutionData[], inputData: ITaskDataConnections, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, nodeTypeData: INodeType, closeFunctions: CloseFunction[]) => IExecuteFunctions;
|
|
288
|
+
export type IGetExecuteSingleFunctions = (workflow: Workflow, runExecutionData: IRunExecutionData, runIndex: number, connectionInputData: INodeExecutionData[], inputData: ITaskDataConnections, node: INode, itemIndex: number, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode) => IExecuteSingleFunctions;
|
|
289
|
+
export type IGetExecuteHookFunctions = (workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, activation: WorkflowActivateMode, isTest?: boolean, webhookData?: IWebhookData) => IHookFunctions;
|
|
290
|
+
export type IGetExecuteWebhookFunctions = (workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, webhookData: IWebhookData, runExecutionData: IRunExecutionData | undefined) => IWebhookFunctions;
|
|
244
291
|
export interface IExecuteData {
|
|
245
292
|
data: ITaskDataConnections;
|
|
246
293
|
node: INode;
|
|
247
294
|
}
|
|
248
295
|
export type IContextObject = {
|
|
249
|
-
[key: string]:
|
|
296
|
+
[key: string]: unknown;
|
|
250
297
|
};
|
|
251
298
|
export interface IExecuteContextData {
|
|
252
299
|
[key: string]: IContextObject;
|
|
253
300
|
}
|
|
254
|
-
export type IHttpRequestMethods =
|
|
301
|
+
export type IHttpRequestMethods = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT";
|
|
255
302
|
export interface IHttpRequestOptions {
|
|
256
303
|
url: string;
|
|
257
304
|
baseURL?: string;
|
|
@@ -259,13 +306,13 @@ export interface IHttpRequestOptions {
|
|
|
259
306
|
method?: IHttpRequestMethods;
|
|
260
307
|
body?: FormData | GenericValue | GenericValue[] | Buffer | URLSearchParams;
|
|
261
308
|
qs?: IDataObject;
|
|
262
|
-
arrayFormat?:
|
|
309
|
+
arrayFormat?: "indices" | "brackets" | "repeat" | "comma";
|
|
263
310
|
auth?: {
|
|
264
311
|
username: string;
|
|
265
312
|
password: string;
|
|
266
313
|
};
|
|
267
314
|
disableFollowRedirect?: boolean;
|
|
268
|
-
encoding?:
|
|
315
|
+
encoding?: "arraybuffer" | "blob" | "document" | "json" | "text" | "stream";
|
|
269
316
|
skipSslCertificateValidation?: boolean;
|
|
270
317
|
returnFullResponse?: boolean;
|
|
271
318
|
ignoreHttpStatusErrors?: boolean;
|
|
@@ -298,13 +345,13 @@ export interface IN8nRequestOperationPaginationBase {
|
|
|
298
345
|
};
|
|
299
346
|
}
|
|
300
347
|
export interface IN8nRequestOperationPaginationOffset extends IN8nRequestOperationPaginationBase {
|
|
301
|
-
type:
|
|
348
|
+
type: "offset";
|
|
302
349
|
properties: {
|
|
303
350
|
limitParameter: string;
|
|
304
351
|
offsetParameter: string;
|
|
305
352
|
pageSize: number;
|
|
306
353
|
rootProperty?: string;
|
|
307
|
-
type:
|
|
354
|
+
type: "body" | "query";
|
|
308
355
|
};
|
|
309
356
|
}
|
|
310
357
|
export interface ITaskSubRunMetadata {
|
|
@@ -323,12 +370,12 @@ export interface ITaskMetadata {
|
|
|
323
370
|
}
|
|
324
371
|
export type AINodeConnectionType = Exclude<NodeConnectionType, typeof NodeConnectionTypes.Main>;
|
|
325
372
|
declare namespace RecordReturning {
|
|
326
|
-
type NodeParameter =
|
|
373
|
+
type NodeParameter = "additionalFields" | "filters" | "options" | "updateFields";
|
|
327
374
|
}
|
|
328
375
|
export interface IExecuteFunctions {
|
|
329
376
|
continueOnFail(): boolean;
|
|
330
377
|
evaluateExpression(expression: string, itemIndex: number): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[];
|
|
331
|
-
executeWorkflow(workflowInfo: IExecuteWorkflowInfo, inputData?: INodeExecutionData[]): Promise<
|
|
378
|
+
executeWorkflow(workflowInfo: IExecuteWorkflowInfo, inputData?: INodeExecutionData[]): Promise<unknown>;
|
|
332
379
|
getContext(type: string): IContextObject;
|
|
333
380
|
getCredentials(type: string, itemIndex?: number): Promise<ICredentialDataDecryptedObject | undefined>;
|
|
334
381
|
getCredentials<T extends object = ICredentialDataDecryptedObject>(type: string, itemIndex?: number): Promise<T>;
|
|
@@ -338,8 +385,8 @@ export interface IExecuteFunctions {
|
|
|
338
385
|
getNode(): INode;
|
|
339
386
|
getNodeParameter<T extends {
|
|
340
387
|
resource: string;
|
|
341
|
-
}>(parameterName:
|
|
342
|
-
getNodeParameter(parameterName: string, itemIndex: number, fallbackValue?:
|
|
388
|
+
}>(parameterName: "resource", itemIndex?: number): T["resource"];
|
|
389
|
+
getNodeParameter(parameterName: string, itemIndex: number, fallbackValue?: unknown, options?: IGetNodeParameterOptions): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object;
|
|
343
390
|
getNodeParameter(parameterName: RecordReturning.NodeParameter, itemIndex: number, fallbackValue?: IDataObject, options?: IGetNodeParameterOptions): IDataObject;
|
|
344
391
|
getExecutionCancelSignal(): AbortSignal | undefined;
|
|
345
392
|
getWorkflowDataProxy(itemIndex: number): IWorkflowDataProxyData;
|
|
@@ -349,7 +396,7 @@ export interface IExecuteFunctions {
|
|
|
349
396
|
getWorkflow(): IWorkflowMetadata;
|
|
350
397
|
prepareOutputData(outputData: INodeExecutionData[], outputIndex?: number): Promise<INodeExecutionData[][]>;
|
|
351
398
|
putExecutionToWait(waitTill: Date): Promise<void>;
|
|
352
|
-
sendMessageToUI(message:
|
|
399
|
+
sendMessageToUI(message: unknown): void;
|
|
353
400
|
sendResponse(response: IExecuteResponsePromiseData): void;
|
|
354
401
|
addInputData(data: INodeExecutionData[][] | ExecutionError, node: INode): {
|
|
355
402
|
index: number;
|
|
@@ -365,7 +412,7 @@ export interface IExecuteFunctions {
|
|
|
365
412
|
httpRequestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: IHttpRequestOptions, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
366
413
|
assertBinaryData(itemIndex: number, propertyName: string, inputIndex?: number): IBinaryData;
|
|
367
414
|
getBinaryDataBuffer(itemIndex: number, propertyName: string, inputIndex?: number): Promise<Buffer>;
|
|
368
|
-
[key: string]: (...args:
|
|
415
|
+
[key: string]: (...args: never[]) => unknown;
|
|
369
416
|
};
|
|
370
417
|
}
|
|
371
418
|
export interface INodeInputFilter {
|
|
@@ -380,7 +427,7 @@ export interface INodeInputConfiguration {
|
|
|
380
427
|
maxConnections?: number;
|
|
381
428
|
}
|
|
382
429
|
export interface INodeOutputConfiguration {
|
|
383
|
-
category?:
|
|
430
|
+
category?: "error";
|
|
384
431
|
displayName?: string;
|
|
385
432
|
maxConnections?: number;
|
|
386
433
|
required?: boolean;
|
|
@@ -390,7 +437,7 @@ export type ISupplyDataFunctions = {
|
|
|
390
437
|
logger: Logger;
|
|
391
438
|
continueOnFail(): boolean;
|
|
392
439
|
evaluateExpression(expression: string, itemIndex: number): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[];
|
|
393
|
-
executeWorkflow(workflowInfo: IExecuteWorkflowInfo, inputData?: INodeExecutionData[]): Promise<
|
|
440
|
+
executeWorkflow(workflowInfo: IExecuteWorkflowInfo, inputData?: INodeExecutionData[]): Promise<unknown>;
|
|
394
441
|
getContext(type: string): IContextObject;
|
|
395
442
|
getCredentials(type: string, itemIndex?: number): Promise<ICredentialDataDecryptedObject | undefined>;
|
|
396
443
|
getInputData(inputIndex?: number, inputName?: string): INodeExecutionData[];
|
|
@@ -399,8 +446,8 @@ export type ISupplyDataFunctions = {
|
|
|
399
446
|
getNode(): INode;
|
|
400
447
|
getNodeParameter<T extends {
|
|
401
448
|
resource: string;
|
|
402
|
-
}>(parameterName:
|
|
403
|
-
getNodeParameter(parameterName: string, itemIndex: number, fallbackValue?:
|
|
449
|
+
}>(parameterName: "resource", itemIndex?: number): T["resource"];
|
|
450
|
+
getNodeParameter(parameterName: string, itemIndex: number, fallbackValue?: unknown): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object;
|
|
404
451
|
getWorkflowDataProxy(itemIndex: number): IWorkflowDataProxyData;
|
|
405
452
|
getWorkflowStaticData(type: string): IDataObject;
|
|
406
453
|
getRestApiUrl(): string;
|
|
@@ -408,7 +455,7 @@ export type ISupplyDataFunctions = {
|
|
|
408
455
|
getWorkflow(): IWorkflowMetadata;
|
|
409
456
|
prepareOutputData(outputData: INodeExecutionData[], outputIndex?: number): Promise<INodeExecutionData[][]>;
|
|
410
457
|
putExecutionToWait(waitTill: Date): Promise<void>;
|
|
411
|
-
sendMessageToUI(message:
|
|
458
|
+
sendMessageToUI(message: unknown): void;
|
|
412
459
|
sendResponse(response: IExecuteResponsePromiseData): void;
|
|
413
460
|
getInputConnectionData(connectionType: NodeConnectionType, itemIndex: number, inputIndex?: number): Promise<unknown>;
|
|
414
461
|
addInputData(data: INodeExecutionData[][] | ExecutionError, node: INode): {
|
|
@@ -421,16 +468,16 @@ export type ISupplyDataFunctions = {
|
|
|
421
468
|
helpers: {
|
|
422
469
|
httpRequest(requestOptions: IHttpRequestOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
423
470
|
httpRequestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: IHttpRequestOptions, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
424
|
-
request: (uriOrObject: string | IDataObject |
|
|
425
|
-
requestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUri |
|
|
426
|
-
requestOAuth2(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUri |
|
|
427
|
-
requestOAuth1(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUrl |
|
|
471
|
+
request: (uriOrObject: string | IDataObject | unknown, options?: IDataObject) => Promise<unknown>;
|
|
472
|
+
requestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUri | RequestPromiseOptions, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<unknown>;
|
|
473
|
+
requestOAuth2(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUri | RequestPromiseOptions, oAuth2Options?: IOAuth2Options): Promise<unknown>;
|
|
474
|
+
requestOAuth1(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUrl | RequestPromiseOptions): Promise<unknown>;
|
|
428
475
|
prepareBinaryData(binaryData: Buffer, filePath?: string, mimeType?: string): Promise<IBinaryData>;
|
|
429
476
|
assertBinaryData(itemIndex: number, propertyName: string, inputIndex?: number): IBinaryData;
|
|
430
477
|
getBinaryDataBuffer(itemIndex: number, propertyName: string, inputIndex?: number): Promise<Buffer>;
|
|
431
478
|
returnJsonArray(jsonData: IDataObject | IDataObject[]): INodeExecutionData[];
|
|
432
479
|
normalizeItems(items: INodeExecutionData | INodeExecutionData[]): INodeExecutionData[];
|
|
433
|
-
[key: string]: (...args:
|
|
480
|
+
[key: string]: (...args: never[]) => unknown;
|
|
434
481
|
};
|
|
435
482
|
};
|
|
436
483
|
export interface IExecuteSingleFunctions {
|
|
@@ -441,7 +488,7 @@ export interface IExecuteSingleFunctions {
|
|
|
441
488
|
getInputData(inputIndex?: number, inputName?: string): INodeExecutionData;
|
|
442
489
|
getMode(): WorkflowExecuteMode;
|
|
443
490
|
getNode(): INode;
|
|
444
|
-
getNodeParameter(parameterName: string, fallbackValue?:
|
|
491
|
+
getNodeParameter(parameterName: string, fallbackValue?: unknown): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object;
|
|
445
492
|
getRestApiUrl(): string;
|
|
446
493
|
getTimezone(): string;
|
|
447
494
|
getWorkflow(): IWorkflowMetadata;
|
|
@@ -450,7 +497,8 @@ export interface IExecuteSingleFunctions {
|
|
|
450
497
|
helpers: {
|
|
451
498
|
httpRequest(requestOptions: IHttpRequestOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
452
499
|
httpRequestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: IHttpRequestOptions, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
453
|
-
|
|
500
|
+
prepareBinaryData(binaryData: Buffer, filePath?: string, mimeType?: string): Promise<IBinaryData>;
|
|
501
|
+
[key: string]: (...args: never[]) => unknown;
|
|
454
502
|
};
|
|
455
503
|
}
|
|
456
504
|
export interface IExecutePaginationFunctions extends IExecuteSingleFunctions {
|
|
@@ -463,23 +511,22 @@ export interface IExecuteWorkflowInfo {
|
|
|
463
511
|
export type ICredentialTestFunction = (this: ICredentialTestFunctions, credential: ICredentialsDecrypted) => Promise<INodeCredentialTestResult>;
|
|
464
512
|
export interface ICredentialTestFunctions {
|
|
465
513
|
helpers: {
|
|
466
|
-
[key: string]: (...args:
|
|
514
|
+
[key: string]: (...args: never[]) => unknown;
|
|
467
515
|
};
|
|
468
516
|
}
|
|
469
517
|
export interface ILoadOptionsFunctions {
|
|
470
518
|
getCredentials(type: string): Promise<ICredentialDataDecryptedObject | undefined>;
|
|
471
519
|
getNode(): INode;
|
|
472
|
-
getNodeParameter(parameterName: string, fallbackValue?:
|
|
520
|
+
getNodeParameter(parameterName: string, fallbackValue?: unknown): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object;
|
|
473
521
|
getCurrentNodeParameter(parameterName: string): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object | undefined;
|
|
474
522
|
getCurrentNodeParameters(): INodeParameters | undefined;
|
|
475
523
|
getTimezone(): string;
|
|
476
524
|
getRestApiUrl(): string;
|
|
477
525
|
helpers: {
|
|
478
526
|
httpRequest(requestOptions: IHttpRequestOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
479
|
-
requestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions:
|
|
480
|
-
additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<any>;
|
|
527
|
+
requestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: unknown, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<unknown>;
|
|
481
528
|
httpRequestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: IHttpRequestOptions, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
482
|
-
[key: string]: ((...args:
|
|
529
|
+
[key: string]: ((...args: never[]) => unknown) | undefined;
|
|
483
530
|
};
|
|
484
531
|
}
|
|
485
532
|
export interface IHookFunctions {
|
|
@@ -488,7 +535,7 @@ export interface IHookFunctions {
|
|
|
488
535
|
getActivationMode(): WorkflowActivateMode;
|
|
489
536
|
getNode(): INode;
|
|
490
537
|
getNodeWebhookUrl: (name: string) => string | undefined;
|
|
491
|
-
getNodeParameter(parameterName: string, fallbackValue?:
|
|
538
|
+
getNodeParameter(parameterName: string, fallbackValue?: unknown): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object;
|
|
492
539
|
getTimezone(): string;
|
|
493
540
|
getWebhookDescription(name: string): IWebhookDescription | undefined;
|
|
494
541
|
getWebhookName(): string;
|
|
@@ -497,7 +544,7 @@ export interface IHookFunctions {
|
|
|
497
544
|
helpers: {
|
|
498
545
|
httpRequest(requestOptions: IHttpRequestOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
499
546
|
httpRequestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: IHttpRequestOptions, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
500
|
-
[key: string]: (...args:
|
|
547
|
+
[key: string]: (...args: never[]) => unknown;
|
|
501
548
|
};
|
|
502
549
|
}
|
|
503
550
|
export interface IPollFunctions {
|
|
@@ -506,7 +553,7 @@ export interface IPollFunctions {
|
|
|
506
553
|
getMode(): WorkflowExecuteMode;
|
|
507
554
|
getActivationMode(): WorkflowActivateMode;
|
|
508
555
|
getNode(): INode;
|
|
509
|
-
getNodeParameter(parameterName: string, fallbackValue?:
|
|
556
|
+
getNodeParameter(parameterName: string, fallbackValue?: unknown): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object;
|
|
510
557
|
getRestApiUrl(): string;
|
|
511
558
|
getTimezone(): string;
|
|
512
559
|
getWorkflow(): IWorkflowMetadata;
|
|
@@ -514,7 +561,7 @@ export interface IPollFunctions {
|
|
|
514
561
|
helpers: {
|
|
515
562
|
httpRequest(requestOptions: IHttpRequestOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
516
563
|
httpRequestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: IHttpRequestOptions, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
517
|
-
[key: string]: (...args:
|
|
564
|
+
[key: string]: (...args: never[]) => unknown;
|
|
518
565
|
};
|
|
519
566
|
}
|
|
520
567
|
export interface ITriggerFunctions {
|
|
@@ -523,7 +570,7 @@ export interface ITriggerFunctions {
|
|
|
523
570
|
getMode(): WorkflowExecuteMode;
|
|
524
571
|
getActivationMode(): WorkflowActivateMode;
|
|
525
572
|
getNode(): INode;
|
|
526
|
-
getNodeParameter(parameterName: string, fallbackValue?:
|
|
573
|
+
getNodeParameter(parameterName: string, fallbackValue?: unknown): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object;
|
|
527
574
|
getRestApiUrl(): string;
|
|
528
575
|
getTimezone(): string;
|
|
529
576
|
getWorkflow(): IWorkflowMetadata;
|
|
@@ -531,10 +578,10 @@ export interface ITriggerFunctions {
|
|
|
531
578
|
helpers: {
|
|
532
579
|
httpRequest(requestOptions: IHttpRequestOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
533
580
|
httpRequestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: IHttpRequestOptions, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
534
|
-
[key: string]: (...args:
|
|
581
|
+
[key: string]: (...args: never[]) => unknown;
|
|
535
582
|
};
|
|
536
583
|
}
|
|
537
|
-
export type ResourceLocatorModes =
|
|
584
|
+
export type ResourceLocatorModes = "id" | "url" | "list" | string;
|
|
538
585
|
export interface INodeParameterResourceLocator {
|
|
539
586
|
__rl: true;
|
|
540
587
|
mode: ResourceLocatorModes;
|
|
@@ -568,7 +615,7 @@ export type ResourceMapperValue = {
|
|
|
568
615
|
attemptToConvertTypes: boolean;
|
|
569
616
|
convertFieldsToString: boolean;
|
|
570
617
|
};
|
|
571
|
-
export type FilterOperatorType =
|
|
618
|
+
export type FilterOperatorType = "string" | "number" | "boolean" | "array" | "object" | "dateTime" | "any";
|
|
572
619
|
export interface FilterOperatorValue {
|
|
573
620
|
type: FilterOperatorType;
|
|
574
621
|
operation: string;
|
|
@@ -578,7 +625,7 @@ export interface FilterOperatorValue {
|
|
|
578
625
|
export type FilterOptionsValue = {
|
|
579
626
|
caseSensitive: boolean;
|
|
580
627
|
leftValue: string;
|
|
581
|
-
typeValidation:
|
|
628
|
+
typeValidation: "strict" | "loose";
|
|
582
629
|
version: 1 | 2;
|
|
583
630
|
};
|
|
584
631
|
export type FilterConditionValue = {
|
|
@@ -587,7 +634,7 @@ export type FilterConditionValue = {
|
|
|
587
634
|
operator: FilterOperatorValue;
|
|
588
635
|
rightValue: NodeParameterValue | NodeParameterValue[];
|
|
589
636
|
};
|
|
590
|
-
export type FilterTypeCombinator =
|
|
637
|
+
export type FilterTypeCombinator = "and" | "or";
|
|
591
638
|
export type FilterValue = {
|
|
592
639
|
options: FilterOptionsValue;
|
|
593
640
|
conditions: FilterConditionValue[];
|
|
@@ -613,7 +660,7 @@ export interface IWebhookFunctions {
|
|
|
613
660
|
getHeaderData(): object;
|
|
614
661
|
getMode(): WorkflowExecuteMode;
|
|
615
662
|
getNode(): INode;
|
|
616
|
-
getNodeParameter(parameterName: string, fallbackValue?:
|
|
663
|
+
getNodeParameter(parameterName: string, fallbackValue?: unknown, options?: IGetNodeParameterOptions): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object;
|
|
617
664
|
evaluateExpression(expression: string, itemIndex?: number): NodeParameterValueType;
|
|
618
665
|
getNodeWebhookUrl: (name: string) => string | undefined;
|
|
619
666
|
getParamsData(): object;
|
|
@@ -634,7 +681,7 @@ export interface IWebhookFunctions {
|
|
|
634
681
|
helpers: {
|
|
635
682
|
httpRequest(requestOptions: IHttpRequestOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
636
683
|
httpRequestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: IHttpRequestOptions, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
637
|
-
[key: string]: (...args:
|
|
684
|
+
[key: string]: (...args: never[]) => unknown;
|
|
638
685
|
};
|
|
639
686
|
addInputData(data: INodeExecutionData[][] | ExecutionError, node?: INode): {
|
|
640
687
|
index: number;
|
|
@@ -652,7 +699,7 @@ export interface INodeCredentialsDetails {
|
|
|
652
699
|
export interface INodeCredentials {
|
|
653
700
|
[key: string]: INodeCredentialsDetails;
|
|
654
701
|
}
|
|
655
|
-
export type OnError =
|
|
702
|
+
export type OnError = "continueErrorOutput" | "continueRegularOutput" | "stopWorkflow";
|
|
656
703
|
export interface INode {
|
|
657
704
|
id: string;
|
|
658
705
|
name: string;
|
|
@@ -679,7 +726,7 @@ export interface INodes {
|
|
|
679
726
|
[key: string]: INode;
|
|
680
727
|
}
|
|
681
728
|
export interface IObservableObject {
|
|
682
|
-
[key: string]:
|
|
729
|
+
[key: string]: unknown;
|
|
683
730
|
__dataChanged: boolean;
|
|
684
731
|
}
|
|
685
732
|
export interface IBinaryKeyData {
|
|
@@ -703,9 +750,9 @@ export type NodeParameterValue = string | number | boolean | undefined | null;
|
|
|
703
750
|
export interface INodeParameters {
|
|
704
751
|
[key: string]: NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[];
|
|
705
752
|
}
|
|
706
|
-
export type NodePropertyTypes =
|
|
707
|
-
export type CodeAutocompleteTypes =
|
|
708
|
-
export type EditorTypes =
|
|
753
|
+
export type NodePropertyTypes = "boolean" | "button" | "collection" | "color" | "dateTime" | "fixedCollection" | "hidden" | "json" | "notice" | "multiOptions" | "number" | "options" | "string" | "credentialsSelect" | "resourceLocator" | "curlImport" | "resourceMapper" | "filter" | "assignmentCollection" | "credentials" | "workflowSelector";
|
|
754
|
+
export type CodeAutocompleteTypes = "function" | "functionItem";
|
|
755
|
+
export type EditorTypes = "code" | "json" | "htmlEditor";
|
|
709
756
|
export type CodeNodeEditorLanguage = (typeof CODE_LANGUAGES)[number];
|
|
710
757
|
export type CodeExecutionMode = (typeof CODE_EXECUTION_MODES)[number];
|
|
711
758
|
export interface ILoadOptions {
|
|
@@ -731,7 +778,7 @@ export interface INodePropertyTypeOptions {
|
|
|
731
778
|
rows?: number;
|
|
732
779
|
showAlpha?: boolean;
|
|
733
780
|
sortable?: boolean;
|
|
734
|
-
[key: string]:
|
|
781
|
+
[key: string]: unknown;
|
|
735
782
|
}
|
|
736
783
|
export type DisplayCondition = {
|
|
737
784
|
_cnd: {
|
|
@@ -797,15 +844,15 @@ export type FieldTypeMap = {
|
|
|
797
844
|
boolean: boolean;
|
|
798
845
|
number: number;
|
|
799
846
|
string: string;
|
|
800
|
-
|
|
847
|
+
"string-alphanumeric": string;
|
|
801
848
|
dateTime: string;
|
|
802
849
|
time: string;
|
|
803
850
|
array: unknown[];
|
|
804
851
|
object: object;
|
|
805
|
-
options:
|
|
852
|
+
options: unknown;
|
|
806
853
|
url: string;
|
|
807
854
|
jwt: string;
|
|
808
|
-
|
|
855
|
+
"form-fields": FormFieldsParameter;
|
|
809
856
|
};
|
|
810
857
|
export type ValidationResult<T extends FieldType = FieldType> = {
|
|
811
858
|
valid: false;
|
|
@@ -823,7 +870,7 @@ export declare namespace MultiPartFormData {
|
|
|
823
870
|
newFilename: string;
|
|
824
871
|
size?: number;
|
|
825
872
|
}
|
|
826
|
-
type Request = express.Request<
|
|
873
|
+
type Request = express.Request<Record<string, never>, Record<string, never>, {
|
|
827
874
|
data: Record<string, string | string[]>;
|
|
828
875
|
files: Record<string, File | File[]>;
|
|
829
876
|
}>;
|
|
@@ -838,16 +885,14 @@ export interface IVersionedNodeType {
|
|
|
838
885
|
}
|
|
839
886
|
export interface INodePropertyModeValidation {
|
|
840
887
|
type: string;
|
|
841
|
-
properties:
|
|
842
|
-
}
|
|
843
|
-
export interface INodePropertyValueExtractorFunction {
|
|
844
|
-
(this: IExecuteSingleFunctions, value: string | NodeParameterValue): Promise<string | NodeParameterValue> | (string | NodeParameterValue);
|
|
888
|
+
properties: Record<string, unknown>;
|
|
845
889
|
}
|
|
890
|
+
export type INodePropertyValueExtractorFunction = (this: IExecuteSingleFunctions, value: string | NodeParameterValue) => Promise<string | NodeParameterValue> | (string | NodeParameterValue);
|
|
846
891
|
export interface INodePropertyValueExtractorBase {
|
|
847
892
|
type: string;
|
|
848
893
|
}
|
|
849
894
|
export interface INodePropertyValueExtractorRegex extends INodePropertyValueExtractorBase {
|
|
850
|
-
type:
|
|
895
|
+
type: "regex";
|
|
851
896
|
regex: string | RegExp;
|
|
852
897
|
}
|
|
853
898
|
export type INodePropertyValueExtractor = INodePropertyValueExtractorRegex;
|
|
@@ -859,11 +904,9 @@ export interface INodePropertyModeTypeOptions {
|
|
|
859
904
|
export interface INodePropertyMode {
|
|
860
905
|
displayName: string;
|
|
861
906
|
name: string;
|
|
862
|
-
type:
|
|
907
|
+
type: "string" | "list";
|
|
863
908
|
hint?: string;
|
|
864
|
-
validation?: Array<INodePropertyModeValidation |
|
|
865
|
-
(this: IExecuteSingleFunctions, value: string): void;
|
|
866
|
-
}>;
|
|
909
|
+
validation?: Array<INodePropertyModeValidation | ((this: IExecuteSingleFunctions, value: string) => void)>;
|
|
867
910
|
placeholder?: string;
|
|
868
911
|
url?: string;
|
|
869
912
|
extractValue?: INodePropertyValueExtractor;
|
|
@@ -937,26 +980,26 @@ export interface SupplyData {
|
|
|
937
980
|
}
|
|
938
981
|
declare namespace ExecuteFunctions {
|
|
939
982
|
namespace StringReturning {
|
|
940
|
-
type NodeParameter =
|
|
983
|
+
type NodeParameter = "binaryProperty" | "binaryPropertyName" | "binaryPropertyOutput" | "dataPropertyName" | "dataBinaryProperty" | "resource" | "operation" | "filePath" | "encodingType";
|
|
941
984
|
}
|
|
942
985
|
namespace NumberReturning {
|
|
943
|
-
type NodeParameter =
|
|
986
|
+
type NodeParameter = "limit";
|
|
944
987
|
}
|
|
945
988
|
namespace BooleanReturning {
|
|
946
|
-
type NodeParameter =
|
|
989
|
+
type NodeParameter = "binaryData" | "download" | "jsonParameters" | "returnAll" | "rawData" | "resolveData";
|
|
947
990
|
}
|
|
948
991
|
namespace RecordReturning {
|
|
949
|
-
type NodeParameter =
|
|
992
|
+
type NodeParameter = "additionalFields" | "filters" | "options" | "updateFields";
|
|
950
993
|
}
|
|
951
994
|
export type GetNodeParameterFn = {
|
|
952
995
|
getNodeParameter<T extends {
|
|
953
996
|
resource: string;
|
|
954
|
-
}>(parameterName:
|
|
997
|
+
}>(parameterName: "resource", itemIndex?: number): T["resource"];
|
|
955
998
|
getNodeParameter(parameterName: StringReturning.NodeParameter, itemIndex: number, fallbackValue?: string, options?: IGetNodeParameterOptions): string;
|
|
956
999
|
getNodeParameter(parameterName: RecordReturning.NodeParameter, itemIndex: number, fallbackValue?: IDataObject, options?: IGetNodeParameterOptions): IDataObject;
|
|
957
1000
|
getNodeParameter(parameterName: BooleanReturning.NodeParameter, itemIndex: number, fallbackValue?: boolean, options?: IGetNodeParameterOptions): boolean;
|
|
958
1001
|
getNodeParameter(parameterName: NumberReturning.NodeParameter, itemIndex: number, fallbackValue?: number, options?: IGetNodeParameterOptions): number;
|
|
959
|
-
getNodeParameter(parameterName: string, itemIndex: number, fallbackValue?:
|
|
1002
|
+
getNodeParameter(parameterName: string, itemIndex: number, fallbackValue?: unknown, options?: IGetNodeParameterOptions): NodeParameterValueType | object;
|
|
960
1003
|
};
|
|
961
1004
|
export {};
|
|
962
1005
|
}
|
|
@@ -968,7 +1011,7 @@ export interface INodeListSearchResult {
|
|
|
968
1011
|
results: INodeListSearchItems[];
|
|
969
1012
|
paginationToken?: unknown;
|
|
970
1013
|
}
|
|
971
|
-
export type IWorkflowNodeContext = ExecuteFunctions.GetNodeParameterFn & Pick<FunctionsBase,
|
|
1014
|
+
export type IWorkflowNodeContext = ExecuteFunctions.GetNodeParameterFn & Pick<FunctionsBase, "getNode" | "getWorkflow">;
|
|
972
1015
|
export interface ILocalLoadOptionsFunctions {
|
|
973
1016
|
getWorkflowNodeContext(nodeType: string): Promise<IWorkflowNodeContext | null>;
|
|
974
1017
|
}
|
|
@@ -979,7 +1022,7 @@ export type LogMetadata = {
|
|
|
979
1022
|
file?: string;
|
|
980
1023
|
function?: string;
|
|
981
1024
|
};
|
|
982
|
-
export type Logger = Record<Exclude<LogLevel,
|
|
1025
|
+
export type Logger = Record<Exclude<LogLevel, "silent">, (message: string, metadata?: LogMetadata) => void>;
|
|
983
1026
|
export interface FunctionsBase {
|
|
984
1027
|
logger: Logger;
|
|
985
1028
|
getCredentials<T extends object = ICredentialDataDecryptedObject>(type: string, itemIndex?: number): Promise<T>;
|
|
@@ -1050,14 +1093,14 @@ export interface INodeVersionedType {
|
|
|
1050
1093
|
getNodeType: (version?: number) => INodeType;
|
|
1051
1094
|
}
|
|
1052
1095
|
export interface INodeCredentialTestResult {
|
|
1053
|
-
status:
|
|
1096
|
+
status: "OK" | "Error";
|
|
1054
1097
|
message: string;
|
|
1055
1098
|
}
|
|
1056
1099
|
export interface INodeCredentialTestRequest {
|
|
1057
1100
|
nodeToTestWith?: string;
|
|
1058
1101
|
credentials: ICredentialsDecrypted;
|
|
1059
1102
|
}
|
|
1060
|
-
export type WebhookSetupMethodNames =
|
|
1103
|
+
export type WebhookSetupMethodNames = "checkExists" | "create" | "delete";
|
|
1061
1104
|
export interface IWebhookSetupMethods {
|
|
1062
1105
|
[key: string]: ((this: IHookFunctions) => Promise<boolean>) | undefined;
|
|
1063
1106
|
checkExists?: (this: IHookFunctions) => Promise<boolean>;
|
|
@@ -1104,7 +1147,7 @@ export declare const NodeConnectionTypes: {
|
|
|
1104
1147
|
readonly Main: "main";
|
|
1105
1148
|
};
|
|
1106
1149
|
export type NodeConnectionType = (typeof NodeConnectionTypes)[keyof typeof NodeConnectionTypes];
|
|
1107
|
-
export type INodeIssueTypes =
|
|
1150
|
+
export type INodeIssueTypes = "credentials" | "execution" | "parameters" | "typeUnknown";
|
|
1108
1151
|
export interface INodeIssueObjectProperty {
|
|
1109
1152
|
[key: string]: string[];
|
|
1110
1153
|
}
|
|
@@ -1123,7 +1166,7 @@ export interface INodeIssues {
|
|
|
1123
1166
|
export interface IWorfklowIssues {
|
|
1124
1167
|
[key: string]: INodeIssues;
|
|
1125
1168
|
}
|
|
1126
|
-
export type ThemeIconColor =
|
|
1169
|
+
export type ThemeIconColor = "gray" | "black" | "blue" | "light-blue" | "dark-blue" | "orange" | "orange-red" | "pink-red" | "red" | "light-green" | "green" | "dark-green" | "azure" | "purple" | "crimson";
|
|
1127
1170
|
export type Themed<T> = T | {
|
|
1128
1171
|
light: T;
|
|
1129
1172
|
dark: T;
|
|
@@ -1156,13 +1199,13 @@ export interface IPostReceiveBase {
|
|
|
1156
1199
|
errorMessage?: string;
|
|
1157
1200
|
}
|
|
1158
1201
|
export interface IPostReceiveFilter extends IPostReceiveBase {
|
|
1159
|
-
type:
|
|
1202
|
+
type: "filter";
|
|
1160
1203
|
properties: {
|
|
1161
1204
|
pass: boolean | string;
|
|
1162
1205
|
};
|
|
1163
1206
|
}
|
|
1164
1207
|
export interface IPostReceiveLimit extends IPostReceiveBase {
|
|
1165
|
-
type:
|
|
1208
|
+
type: "limit";
|
|
1166
1209
|
properties: {
|
|
1167
1210
|
maxResults: number | string;
|
|
1168
1211
|
};
|
|
@@ -1178,35 +1221,35 @@ export interface INodeRequestSend {
|
|
|
1178
1221
|
paginate?: boolean | string;
|
|
1179
1222
|
property?: string;
|
|
1180
1223
|
propertyInDotNotation?: boolean;
|
|
1181
|
-
type?:
|
|
1224
|
+
type?: "body" | "query";
|
|
1182
1225
|
value?: string;
|
|
1183
1226
|
}
|
|
1184
1227
|
export interface IPostReceiveBinaryData extends IPostReceiveBase {
|
|
1185
|
-
type:
|
|
1228
|
+
type: "binaryData";
|
|
1186
1229
|
properties: {
|
|
1187
1230
|
destinationProperty: string;
|
|
1188
1231
|
};
|
|
1189
1232
|
}
|
|
1190
1233
|
export interface IPostReceiveRootProperty extends IPostReceiveBase {
|
|
1191
|
-
type:
|
|
1234
|
+
type: "rootProperty";
|
|
1192
1235
|
properties: {
|
|
1193
1236
|
property: string;
|
|
1194
1237
|
};
|
|
1195
1238
|
}
|
|
1196
1239
|
export interface IPostReceiveSet extends IPostReceiveBase {
|
|
1197
|
-
type:
|
|
1240
|
+
type: "set";
|
|
1198
1241
|
properties: {
|
|
1199
1242
|
value: string;
|
|
1200
1243
|
};
|
|
1201
1244
|
}
|
|
1202
1245
|
export interface IPostReceiveSetKeyValue extends IPostReceiveBase {
|
|
1203
|
-
type:
|
|
1246
|
+
type: "setKeyValue";
|
|
1204
1247
|
properties: {
|
|
1205
1248
|
[key: string]: string | number;
|
|
1206
1249
|
};
|
|
1207
1250
|
}
|
|
1208
1251
|
export interface IPostReceiveSort extends IPostReceiveBase {
|
|
1209
|
-
type:
|
|
1252
|
+
type: "sort";
|
|
1210
1253
|
properties: {
|
|
1211
1254
|
key: string;
|
|
1212
1255
|
};
|
|
@@ -1294,25 +1337,25 @@ export interface IWebhookDescription {
|
|
|
1294
1337
|
restartWebhook?: boolean;
|
|
1295
1338
|
}
|
|
1296
1339
|
export interface IWorkflowDataProxyData {
|
|
1297
|
-
[key: string]:
|
|
1298
|
-
$binary:
|
|
1299
|
-
$data:
|
|
1300
|
-
$env:
|
|
1301
|
-
$evaluateExpression:
|
|
1302
|
-
$item:
|
|
1303
|
-
$items:
|
|
1304
|
-
$json:
|
|
1305
|
-
$node:
|
|
1306
|
-
$parameter:
|
|
1307
|
-
$position:
|
|
1308
|
-
$workflow:
|
|
1309
|
-
$:
|
|
1310
|
-
$input:
|
|
1311
|
-
$thisItem:
|
|
1340
|
+
[key: string]: unknown;
|
|
1341
|
+
$binary: unknown;
|
|
1342
|
+
$data: unknown;
|
|
1343
|
+
$env: unknown;
|
|
1344
|
+
$evaluateExpression: unknown;
|
|
1345
|
+
$item: unknown;
|
|
1346
|
+
$items: unknown;
|
|
1347
|
+
$json: unknown;
|
|
1348
|
+
$node: unknown;
|
|
1349
|
+
$parameter: unknown;
|
|
1350
|
+
$position: unknown;
|
|
1351
|
+
$workflow: unknown;
|
|
1352
|
+
$: unknown;
|
|
1353
|
+
$input: unknown;
|
|
1354
|
+
$thisItem: unknown;
|
|
1312
1355
|
$thisRunIndex: number;
|
|
1313
1356
|
$thisItemIndex: number;
|
|
1314
|
-
$now:
|
|
1315
|
-
$today:
|
|
1357
|
+
$now: unknown;
|
|
1358
|
+
$today: unknown;
|
|
1316
1359
|
}
|
|
1317
1360
|
export type IWorkflowDataProxyAdditionalKeys = IDataObject;
|
|
1318
1361
|
export interface IWorkflowMetadata {
|
|
@@ -1320,14 +1363,14 @@ export interface IWorkflowMetadata {
|
|
|
1320
1363
|
name?: string;
|
|
1321
1364
|
active: boolean;
|
|
1322
1365
|
}
|
|
1323
|
-
export type WebhookHttpMethod =
|
|
1366
|
+
export type WebhookHttpMethod = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT" | "OPTIONS";
|
|
1324
1367
|
export interface IWebhookResponseData {
|
|
1325
1368
|
workflowData?: INodeExecutionData[][];
|
|
1326
|
-
webhookResponse?:
|
|
1369
|
+
webhookResponse?: unknown;
|
|
1327
1370
|
noWebhookResponse?: boolean;
|
|
1328
1371
|
}
|
|
1329
|
-
export type WebhookResponseData =
|
|
1330
|
-
export type WebhookResponseMode =
|
|
1372
|
+
export type WebhookResponseData = "allEntries" | "firstEntryJson" | "firstEntryBinary" | "noData";
|
|
1373
|
+
export type WebhookResponseMode = "onReceived" | "lastNode";
|
|
1331
1374
|
export interface INodeTypes {
|
|
1332
1375
|
nodeTypes: INodeTypeData;
|
|
1333
1376
|
init(nodeTypes?: INodeTypeData): Promise<void>;
|
|
@@ -1354,7 +1397,7 @@ export interface IRun {
|
|
|
1354
1397
|
startedAt: Date;
|
|
1355
1398
|
stoppedAt?: Date;
|
|
1356
1399
|
}
|
|
1357
|
-
export type EnsureTypeOptions =
|
|
1400
|
+
export type EnsureTypeOptions = "string" | "number" | "boolean" | "object" | "array" | "json";
|
|
1358
1401
|
export interface IGetNodeParameterOptions {
|
|
1359
1402
|
contextNode?: INode;
|
|
1360
1403
|
ensureType?: EnsureTypeOptions;
|
|
@@ -1396,7 +1439,7 @@ export interface IWaitingForExecution {
|
|
|
1396
1439
|
};
|
|
1397
1440
|
}
|
|
1398
1441
|
export interface IWorkflowBase {
|
|
1399
|
-
id?:
|
|
1442
|
+
id?: unknown;
|
|
1400
1443
|
name: string;
|
|
1401
1444
|
active: boolean;
|
|
1402
1445
|
createdAt: Date;
|
|
@@ -1413,7 +1456,7 @@ export interface IWorkflowCredentials {
|
|
|
1413
1456
|
};
|
|
1414
1457
|
}
|
|
1415
1458
|
export interface IWorkflowExecuteHooks {
|
|
1416
|
-
[key: string]: Array<(...args:
|
|
1459
|
+
[key: string]: Array<(...args: never[]) => Promise<void>> | undefined;
|
|
1417
1460
|
nodeExecuteAfter?: Array<(nodeName: string, data: ITaskData, executionData: IRunExecutionData) => Promise<void>>;
|
|
1418
1461
|
nodeExecuteBefore?: Array<(nodeName: string) => Promise<void>>;
|
|
1419
1462
|
workflowExecuteAfter?: Array<(data: IRun, newStaticData: IDataObject) => Promise<void>>;
|
|
@@ -1423,13 +1466,13 @@ export interface IWorkflowExecuteHooks {
|
|
|
1423
1466
|
export interface IWorkflowExecuteAdditionalData {
|
|
1424
1467
|
credentialsHelper: ICredentialsHelper;
|
|
1425
1468
|
encryptionKey: string;
|
|
1426
|
-
executeWorkflow: (workflowInfo: IExecuteWorkflowInfo, additionalData: IWorkflowExecuteAdditionalData, inputData?: INodeExecutionData[], parentExecutionId?: string, loadedWorkflowData?: IWorkflowBase, loadedRunData?:
|
|
1469
|
+
executeWorkflow: (workflowInfo: IExecuteWorkflowInfo, additionalData: IWorkflowExecuteAdditionalData, inputData?: INodeExecutionData[], parentExecutionId?: string, loadedWorkflowData?: IWorkflowBase, loadedRunData?: unknown) => Promise<unknown>;
|
|
1427
1470
|
executionId?: string;
|
|
1428
1471
|
hooks?: WorkflowHooks;
|
|
1429
1472
|
httpResponse?: express.Response;
|
|
1430
1473
|
httpRequest?: express.Request;
|
|
1431
1474
|
restApiUrl: string;
|
|
1432
|
-
sendMessageToUI?: (source: string, message:
|
|
1475
|
+
sendMessageToUI?: (source: string, message: unknown) => void;
|
|
1433
1476
|
timezone: string;
|
|
1434
1477
|
webhookBaseUrl: string;
|
|
1435
1478
|
webhookWaitingBaseUrl: string;
|
|
@@ -1438,8 +1481,8 @@ export interface IWorkflowExecuteAdditionalData {
|
|
|
1438
1481
|
executionTimeoutTimestamp?: number;
|
|
1439
1482
|
userId: string;
|
|
1440
1483
|
}
|
|
1441
|
-
export type WorkflowExecuteMode =
|
|
1442
|
-
export type WorkflowActivateMode =
|
|
1484
|
+
export type WorkflowExecuteMode = "cli" | "error" | "integrated" | "internal" | "manual" | "retry" | "trigger" | "webhook";
|
|
1485
|
+
export type WorkflowActivateMode = "init" | "create" | "update" | "activate" | "manual";
|
|
1443
1486
|
export interface IWorkflowHooksOptionalParameters {
|
|
1444
1487
|
parentProcessMode?: string;
|
|
1445
1488
|
retryOf?: string;
|
|
@@ -1448,7 +1491,7 @@ export interface IWorkflowHooksOptionalParameters {
|
|
|
1448
1491
|
export interface IWorkflowSettings {
|
|
1449
1492
|
[key: string]: IDataObject | string | number | boolean | undefined;
|
|
1450
1493
|
}
|
|
1451
|
-
export type LogTypes =
|
|
1494
|
+
export type LogTypes = "debug" | "verbose" | "info" | "warn" | "error";
|
|
1452
1495
|
export interface ILogger {
|
|
1453
1496
|
log: (type: LogTypes, message: string, meta?: object) => void;
|
|
1454
1497
|
debug: (message: string, meta?: object) => void;
|
|
@@ -1472,7 +1515,7 @@ export interface INodeInputConfiguration {
|
|
|
1472
1515
|
maxConnections?: number;
|
|
1473
1516
|
}
|
|
1474
1517
|
export interface INodeOutputConfiguration {
|
|
1475
|
-
category?:
|
|
1518
|
+
category?: "error";
|
|
1476
1519
|
displayName?: string;
|
|
1477
1520
|
maxConnections?: number;
|
|
1478
1521
|
required?: boolean;
|
|
@@ -1519,11 +1562,11 @@ export type Entity<M, K> = K extends keyof M ? {
|
|
|
1519
1562
|
export type PropertiesOf<M extends {
|
|
1520
1563
|
resource: string;
|
|
1521
1564
|
operation: string;
|
|
1522
|
-
}> = Array<Omit<INodeProperties,
|
|
1565
|
+
}> = Array<Omit<INodeProperties, "displayOptions"> & {
|
|
1523
1566
|
displayOptions?: {
|
|
1524
|
-
[key in
|
|
1525
|
-
resource?: Array<M[
|
|
1526
|
-
operation?: Array<M[
|
|
1567
|
+
[key in "show" | "hide"]?: {
|
|
1568
|
+
resource?: Array<M["resource"]>;
|
|
1569
|
+
operation?: Array<M["operation"]>;
|
|
1527
1570
|
[otherKey: string]: NodeParameterValue[] | undefined;
|
|
1528
1571
|
};
|
|
1529
1572
|
};
|
|
@@ -1575,5 +1618,6 @@ export interface SupplyData {
|
|
|
1575
1618
|
response: unknown;
|
|
1576
1619
|
closeFunction?: CloseFunction;
|
|
1577
1620
|
}
|
|
1578
|
-
export type AiEvent =
|
|
1621
|
+
export type AiEvent = "ai-messages-retrieved-from-memory" | "ai-message-added-to-memory" | "ai-output-parsed" | "ai-documents-retrieved" | "ai-document-embedded" | "ai-query-embedded" | "ai-document-processed" | "ai-text-split" | "ai-tool-called" | "ai-vector-store-searched" | "ai-llm-generated-output" | "ai-llm-errored" | "ai-vector-store-populated" | "ai-vector-store-updated";
|
|
1579
1622
|
export {};
|
|
1623
|
+
//# sourceMappingURL=Interfaces.d.ts.map
|