@fsai-flow/workflow 0.0.2 → 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/README.md +31 -0
- package/dist/package.json +42 -0
- package/dist/src/index.d.ts +22 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +68 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/lib/Constants.d.ts +69 -0
- package/dist/src/lib/Constants.d.ts.map +1 -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 +7 -0
- package/dist/src/lib/DeferredPromise.d.ts.map +1 -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 +66 -0
- package/dist/src/lib/Expression.d.ts.map +1 -0
- package/dist/src/lib/Expression.js +247 -0
- package/dist/src/lib/Expression.js.map +1 -0
- package/dist/src/lib/Interfaces.d.ts +1623 -0
- package/dist/src/lib/Interfaces.d.ts.map +1 -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 +10 -0
- package/dist/src/lib/LoggerProxy.d.ts.map +1 -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 +5 -0
- package/dist/src/lib/MetadataUtils.d.ts.map +1 -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 +83 -0
- package/dist/src/lib/NodeErrors.d.ts.map +1 -0
- package/dist/src/lib/NodeErrors.js +284 -0
- package/dist/src/lib/NodeErrors.js.map +1 -0
- package/dist/src/lib/NodeHelpers.d.ts +199 -0
- package/dist/src/lib/NodeHelpers.d.ts.map +1 -0
- package/dist/src/lib/NodeHelpers.js +1335 -0
- package/dist/src/lib/NodeHelpers.js.map +1 -0
- package/dist/src/lib/ObservableObject.d.ts +6 -0
- package/dist/src/lib/ObservableObject.d.ts.map +1 -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 +24 -0
- package/dist/src/lib/RoutingNode.d.ts.map +1 -0
- package/dist/src/lib/RoutingNode.js +528 -0
- package/dist/src/lib/RoutingNode.js.map +1 -0
- package/dist/src/lib/TelemetryHelpers.d.ts +4 -0
- package/dist/src/lib/TelemetryHelpers.d.ts.map +1 -0
- package/dist/src/lib/TelemetryHelpers.js +67 -0
- package/dist/src/lib/TelemetryHelpers.js.map +1 -0
- package/dist/src/lib/TypeValidation.d.ts +22 -0
- package/dist/src/lib/TypeValidation.d.ts.map +1 -0
- package/dist/src/lib/TypeValidation.js +376 -0
- package/dist/src/lib/TypeValidation.js.map +1 -0
- package/dist/src/lib/VersionedNodeType.d.ts +10 -0
- package/dist/src/lib/VersionedNodeType.d.ts.map +1 -0
- package/dist/src/lib/VersionedNodeType.js +24 -0
- package/dist/src/lib/VersionedNodeType.js.map +1 -0
- package/dist/src/lib/Workflow.d.ts +249 -0
- package/dist/src/lib/Workflow.d.ts.map +1 -0
- package/dist/src/lib/Workflow.js +899 -0
- package/dist/src/lib/Workflow.js.map +1 -0
- package/dist/src/lib/WorkflowDataProxy.d.ts +88 -0
- package/dist/src/lib/WorkflowDataProxy.d.ts.map +1 -0
- package/dist/src/lib/WorkflowDataProxy.js +583 -0
- package/dist/src/lib/WorkflowDataProxy.js.map +1 -0
- package/dist/src/lib/WorkflowErrors.d.ts +10 -0
- package/dist/src/lib/WorkflowErrors.d.ts.map +1 -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 +12 -0
- package/dist/src/lib/WorkflowHooks.d.ts.map +1 -0
- package/dist/src/lib/WorkflowHooks.js +32 -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.d.ts.map +1 -0
- package/dist/src/lib/errors/base/base.error.js +47 -0
- package/dist/src/lib/errors/base/base.error.js.map +1 -0
- package/dist/src/lib/errors/base/operational.error.d.ts +16 -0
- package/dist/src/lib/errors/base/operational.error.d.ts.map +1 -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 +14 -0
- package/dist/src/lib/errors/error.types.d.ts.map +1 -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 +2 -0
- package/dist/src/lib/errors/index.d.ts.map +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 +20 -0
- package/dist/src/lib/result.d.ts.map +1 -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 +51 -0
- package/dist/src/lib/utils.d.ts.map +1 -0
- package/dist/src/lib/utils.js +119 -0
- package/dist/src/lib/utils.js.map +1 -0
- package/package.json +49 -35
- 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 -2262
- 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 -166
- 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
|
@@ -0,0 +1,1623 @@
|
|
|
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
|
+
}
|
|
71
|
+
export interface IAdditionalCredentialOptions {
|
|
72
|
+
oauth2?: IOAuth2Options;
|
|
73
|
+
credentialsDecrypted?: ICredentialsDecrypted;
|
|
74
|
+
}
|
|
75
|
+
export type IAllExecuteFunctions = IExecuteFunctions | IExecutePaginationFunctions | IExecuteSingleFunctions | IHookFunctions | ILoadOptionsFunctions | IPollFunctions | ITriggerFunctions | IWebhookFunctions | ISupplyDataFunctions;
|
|
76
|
+
export interface IBinaryData {
|
|
77
|
+
[key: string]: string | undefined;
|
|
78
|
+
data: string;
|
|
79
|
+
mimeType: string;
|
|
80
|
+
fileName?: string;
|
|
81
|
+
directory?: string;
|
|
82
|
+
fileExtension?: string;
|
|
83
|
+
id?: string;
|
|
84
|
+
}
|
|
85
|
+
export interface IOAuth2Options {
|
|
86
|
+
includeCredentialsOnRefreshOnBody?: boolean;
|
|
87
|
+
property?: string;
|
|
88
|
+
tokenType?: string;
|
|
89
|
+
keepBearer?: boolean;
|
|
90
|
+
tokenExpiredStatusCode?: number;
|
|
91
|
+
}
|
|
92
|
+
export interface IConnection {
|
|
93
|
+
node: string;
|
|
94
|
+
type: string;
|
|
95
|
+
index: number;
|
|
96
|
+
}
|
|
97
|
+
export type ExecutionError = WorkflowOperationError | NodeOperationError | NodeApiError;
|
|
98
|
+
export interface IGetCredentials {
|
|
99
|
+
get(type: string, id: string | null): Promise<ICredentialsEncrypted>;
|
|
100
|
+
}
|
|
101
|
+
export declare abstract class ICredentials {
|
|
102
|
+
id?: string;
|
|
103
|
+
name: string;
|
|
104
|
+
type: string;
|
|
105
|
+
data: string | undefined;
|
|
106
|
+
nodesAccess: ICredentialNodeAccess[];
|
|
107
|
+
constructor(nodeCredentials: INodeCredentialsDetails, type: string, nodesAccess: ICredentialNodeAccess[], data?: string);
|
|
108
|
+
abstract getData(encryptionKey: string, nodeType?: string): ICredentialDataDecryptedObject;
|
|
109
|
+
abstract getDataKey(key: string, encryptionKey: string, nodeType?: string): CredentialInformation;
|
|
110
|
+
abstract getDataToSave(): ICredentialsEncrypted;
|
|
111
|
+
abstract hasNodeAccess(nodeType: string): boolean;
|
|
112
|
+
abstract setData(data: ICredentialDataDecryptedObject, encryptionKey: string): void;
|
|
113
|
+
abstract setDataKey(key: string, data: CredentialInformation, encryptionKey: string): void;
|
|
114
|
+
}
|
|
115
|
+
export interface ICredentialNodeAccess {
|
|
116
|
+
nodeType: string;
|
|
117
|
+
user?: string;
|
|
118
|
+
date?: Date;
|
|
119
|
+
}
|
|
120
|
+
export interface ICredentialsDecrypted {
|
|
121
|
+
id: string | number;
|
|
122
|
+
name: string;
|
|
123
|
+
type: string;
|
|
124
|
+
nodesAccess: ICredentialNodeAccess[];
|
|
125
|
+
data?: ICredentialDataDecryptedObject;
|
|
126
|
+
}
|
|
127
|
+
export interface ICredentialsEncrypted {
|
|
128
|
+
id?: string | number;
|
|
129
|
+
name: string;
|
|
130
|
+
type: string;
|
|
131
|
+
nodesAccess: ICredentialNodeAccess[];
|
|
132
|
+
data?: string;
|
|
133
|
+
}
|
|
134
|
+
export type NodeTypeAndVersion = {
|
|
135
|
+
name: string;
|
|
136
|
+
type: string;
|
|
137
|
+
typeVersion: number;
|
|
138
|
+
disabled: boolean;
|
|
139
|
+
parameters?: INodeParameters;
|
|
140
|
+
};
|
|
141
|
+
export interface ICredentialsExpressionResolveValues {
|
|
142
|
+
connectionInputData: INodeExecutionData[];
|
|
143
|
+
itemIndex: number;
|
|
144
|
+
node: INode;
|
|
145
|
+
runExecutionData: IRunExecutionData | null;
|
|
146
|
+
runIndex: number;
|
|
147
|
+
workflow: Workflow;
|
|
148
|
+
}
|
|
149
|
+
export interface IRequestOptionsSimplified {
|
|
150
|
+
auth?: {
|
|
151
|
+
username: string;
|
|
152
|
+
password: string;
|
|
153
|
+
};
|
|
154
|
+
body: IDataObject;
|
|
155
|
+
headers: IDataObject;
|
|
156
|
+
qs: IDataObject;
|
|
157
|
+
}
|
|
158
|
+
export declare abstract class ICredentialsHelper {
|
|
159
|
+
encryptionKey: string;
|
|
160
|
+
constructor(encryptionKey: string);
|
|
161
|
+
abstract getParentTypes(name: string): string[];
|
|
162
|
+
abstract authenticate(credentials: ICredentialDataDecryptedObject, typeName: string, requestOptions: IHttpRequestOptions | IRequestOptionsSimplified, workflow: Workflow, node: INode): Promise<IHttpRequestOptions>;
|
|
163
|
+
abstract getCredentials(nodeCredentials: INodeCredentialsDetails, type: string): Promise<ICredentials>;
|
|
164
|
+
abstract getDecrypted(nodeCredentials: INodeCredentialsDetails, type: string, mode: WorkflowExecuteMode, raw?: boolean, expressionResolveValues?: ICredentialsExpressionResolveValues): Promise<ICredentialDataDecryptedObject>;
|
|
165
|
+
abstract updateCredentials(nodeCredentials: INodeCredentialsDetails, type: string, data: ICredentialDataDecryptedObject): Promise<void>;
|
|
166
|
+
}
|
|
167
|
+
export interface IAuthenticateBase {
|
|
168
|
+
type: string;
|
|
169
|
+
properties: {
|
|
170
|
+
[key: string]: string;
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
export declare abstract class Node {
|
|
174
|
+
abstract description: INodeTypeDescription;
|
|
175
|
+
execute?(context: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
176
|
+
webhook?(context: IWebhookFunctions): Promise<IWebhookResponseData>;
|
|
177
|
+
poll?(context: IPollFunctions): Promise<INodeExecutionData[][] | null>;
|
|
178
|
+
}
|
|
179
|
+
export interface IAuthenticateBasicAuth extends IAuthenticateBase {
|
|
180
|
+
type: "basicAuth";
|
|
181
|
+
properties: {
|
|
182
|
+
userPropertyName?: string;
|
|
183
|
+
passwordPropertyName?: string;
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
export interface IAuthenticateBearer extends IAuthenticateBase {
|
|
187
|
+
type: "bearer";
|
|
188
|
+
properties: {
|
|
189
|
+
tokenPropertyName?: string;
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
export interface IAuthenticateHeaderAuth extends IAuthenticateBase {
|
|
193
|
+
type: "headerAuth";
|
|
194
|
+
properties: {
|
|
195
|
+
name: string;
|
|
196
|
+
value: string;
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
export interface IAuthenticateQueryAuth extends IAuthenticateBase {
|
|
200
|
+
type: "queryAuth";
|
|
201
|
+
properties: {
|
|
202
|
+
key: string;
|
|
203
|
+
value: string;
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
export type IAuthenticate = ((credentials: ICredentialDataDecryptedObject, requestOptions: IHttpRequestOptions) => Promise<IHttpRequestOptions>) | IAuthenticateBasicAuth | IAuthenticateBearer | IAuthenticateHeaderAuth | IAuthenticateQueryAuth;
|
|
207
|
+
export interface IAuthenticateRuleBase {
|
|
208
|
+
type: string;
|
|
209
|
+
properties: {
|
|
210
|
+
[key: string]: string | number;
|
|
211
|
+
};
|
|
212
|
+
errorMessage?: string;
|
|
213
|
+
}
|
|
214
|
+
export interface IAuthenticateRuleResponseCode extends IAuthenticateRuleBase {
|
|
215
|
+
type: "responseCode";
|
|
216
|
+
properties: {
|
|
217
|
+
value: number;
|
|
218
|
+
message: string;
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
export interface ICredentialTestRequest {
|
|
222
|
+
request: IHttpRequestOptions;
|
|
223
|
+
rules?: IAuthenticateRuleResponseCode[];
|
|
224
|
+
}
|
|
225
|
+
export interface ICredentialTestRequestData {
|
|
226
|
+
nodeType?: INodeType;
|
|
227
|
+
testRequest: ICredentialTestRequest;
|
|
228
|
+
}
|
|
229
|
+
export type IconRef = `fa:${string}` | `node:${string}.${string}`;
|
|
230
|
+
export type IconFile = `file:${string}.png` | `file:${string}.svg`;
|
|
231
|
+
export type Icon = IconRef | Themed<IconFile>;
|
|
232
|
+
type ICredentialHttpRequestNode = {
|
|
233
|
+
name: string;
|
|
234
|
+
docsUrl: string;
|
|
235
|
+
hidden?: boolean;
|
|
236
|
+
} & ({
|
|
237
|
+
apiBaseUrl: string;
|
|
238
|
+
} | {
|
|
239
|
+
apiBaseUrlPlaceholder: string;
|
|
240
|
+
});
|
|
241
|
+
export interface ICredentialType {
|
|
242
|
+
name: string;
|
|
243
|
+
displayName: string;
|
|
244
|
+
icon?: Icon | string;
|
|
245
|
+
iconColor?: ThemeIconColor;
|
|
246
|
+
iconUrl?: Themed<string>;
|
|
247
|
+
extends?: string[];
|
|
248
|
+
properties: INodeProperties[];
|
|
249
|
+
documentationUrl?: string;
|
|
250
|
+
__overwrittenProperties?: string[];
|
|
251
|
+
authenticate?: IAuthenticate;
|
|
252
|
+
test?: ICredentialTestRequest;
|
|
253
|
+
httpRequestNode?: ICredentialHttpRequestNode;
|
|
254
|
+
supportedNodes?: string[];
|
|
255
|
+
}
|
|
256
|
+
export interface ICredentialTypes {
|
|
257
|
+
credentialTypes?: ICredentialTypeData;
|
|
258
|
+
init(credentialTypes?: ICredentialTypeData): Promise<void>;
|
|
259
|
+
getAll(): ICredentialType[];
|
|
260
|
+
getByName(credentialType: string): ICredentialType;
|
|
261
|
+
}
|
|
262
|
+
export interface ICredentialData {
|
|
263
|
+
id?: string;
|
|
264
|
+
name: string;
|
|
265
|
+
data: string;
|
|
266
|
+
nodesAccess: ICredentialNodeAccess[];
|
|
267
|
+
}
|
|
268
|
+
export type CredentialInformation = string | number | boolean | IDataObject;
|
|
269
|
+
export interface ICredentialDataDecryptedObject {
|
|
270
|
+
[key: string]: CredentialInformation;
|
|
271
|
+
}
|
|
272
|
+
export type NodeInputConnections = IConnection[][];
|
|
273
|
+
export interface INodeConnections {
|
|
274
|
+
[key: string]: NodeInputConnections;
|
|
275
|
+
}
|
|
276
|
+
export interface IConnections {
|
|
277
|
+
[key: string]: INodeConnections;
|
|
278
|
+
}
|
|
279
|
+
export type GenericValue = string | object | number | boolean | undefined | null;
|
|
280
|
+
export type IExecuteResponsePromiseData = IDataObject | IN8nHttpFullResponse;
|
|
281
|
+
export interface INodeTypeNameVersion {
|
|
282
|
+
name: string;
|
|
283
|
+
version: number;
|
|
284
|
+
}
|
|
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;
|
|
291
|
+
export interface IExecuteData {
|
|
292
|
+
data: ITaskDataConnections;
|
|
293
|
+
node: INode;
|
|
294
|
+
}
|
|
295
|
+
export type IContextObject = {
|
|
296
|
+
[key: string]: unknown;
|
|
297
|
+
};
|
|
298
|
+
export interface IExecuteContextData {
|
|
299
|
+
[key: string]: IContextObject;
|
|
300
|
+
}
|
|
301
|
+
export type IHttpRequestMethods = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT";
|
|
302
|
+
export interface IHttpRequestOptions {
|
|
303
|
+
url: string;
|
|
304
|
+
baseURL?: string;
|
|
305
|
+
headers?: IDataObject;
|
|
306
|
+
method?: IHttpRequestMethods;
|
|
307
|
+
body?: FormData | GenericValue | GenericValue[] | Buffer | URLSearchParams;
|
|
308
|
+
qs?: IDataObject;
|
|
309
|
+
arrayFormat?: "indices" | "brackets" | "repeat" | "comma";
|
|
310
|
+
auth?: {
|
|
311
|
+
username: string;
|
|
312
|
+
password: string;
|
|
313
|
+
};
|
|
314
|
+
disableFollowRedirect?: boolean;
|
|
315
|
+
encoding?: "arraybuffer" | "blob" | "document" | "json" | "text" | "stream";
|
|
316
|
+
skipSslCertificateValidation?: boolean;
|
|
317
|
+
returnFullResponse?: boolean;
|
|
318
|
+
ignoreHttpStatusErrors?: boolean;
|
|
319
|
+
proxy?: {
|
|
320
|
+
host: string;
|
|
321
|
+
port: number;
|
|
322
|
+
auth?: {
|
|
323
|
+
username: string;
|
|
324
|
+
password: string;
|
|
325
|
+
};
|
|
326
|
+
protocol?: string;
|
|
327
|
+
};
|
|
328
|
+
timeout?: number;
|
|
329
|
+
json?: boolean;
|
|
330
|
+
}
|
|
331
|
+
export type IN8nHttpResponse = IDataObject | Buffer | GenericValue | GenericValue[] | null;
|
|
332
|
+
export interface IN8nHttpFullResponse {
|
|
333
|
+
body: IN8nHttpResponse;
|
|
334
|
+
headers: IDataObject;
|
|
335
|
+
statusCode: number;
|
|
336
|
+
statusMessage?: string;
|
|
337
|
+
}
|
|
338
|
+
export interface IN8nRequestOperations {
|
|
339
|
+
pagination?: IN8nRequestOperationPaginationOffset | ((this: IExecutePaginationFunctions, requestOptions: IRequestOptionsFromParameters) => Promise<INodeExecutionData[]>);
|
|
340
|
+
}
|
|
341
|
+
export interface IN8nRequestOperationPaginationBase {
|
|
342
|
+
type: string;
|
|
343
|
+
properties: {
|
|
344
|
+
[key: string]: string | number;
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
export interface IN8nRequestOperationPaginationOffset extends IN8nRequestOperationPaginationBase {
|
|
348
|
+
type: "offset";
|
|
349
|
+
properties: {
|
|
350
|
+
limitParameter: string;
|
|
351
|
+
offsetParameter: string;
|
|
352
|
+
pageSize: number;
|
|
353
|
+
rootProperty?: string;
|
|
354
|
+
type: "body" | "query";
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
export interface ITaskSubRunMetadata {
|
|
358
|
+
node: string;
|
|
359
|
+
runIndex: number;
|
|
360
|
+
}
|
|
361
|
+
export interface RelatedExecution {
|
|
362
|
+
executionId: string;
|
|
363
|
+
workflowId: string;
|
|
364
|
+
}
|
|
365
|
+
export interface ITaskMetadata {
|
|
366
|
+
subRun?: ITaskSubRunMetadata[];
|
|
367
|
+
parentExecution?: RelatedExecution;
|
|
368
|
+
subExecution?: RelatedExecution;
|
|
369
|
+
subExecutionsCount?: number;
|
|
370
|
+
}
|
|
371
|
+
export type AINodeConnectionType = Exclude<NodeConnectionType, typeof NodeConnectionTypes.Main>;
|
|
372
|
+
declare namespace RecordReturning {
|
|
373
|
+
type NodeParameter = "additionalFields" | "filters" | "options" | "updateFields";
|
|
374
|
+
}
|
|
375
|
+
export interface IExecuteFunctions {
|
|
376
|
+
continueOnFail(): boolean;
|
|
377
|
+
evaluateExpression(expression: string, itemIndex: number): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[];
|
|
378
|
+
executeWorkflow(workflowInfo: IExecuteWorkflowInfo, inputData?: INodeExecutionData[]): Promise<unknown>;
|
|
379
|
+
getContext(type: string): IContextObject;
|
|
380
|
+
getCredentials(type: string, itemIndex?: number): Promise<ICredentialDataDecryptedObject | undefined>;
|
|
381
|
+
getCredentials<T extends object = ICredentialDataDecryptedObject>(type: string, itemIndex?: number): Promise<T>;
|
|
382
|
+
getInputData(inputIndex?: number, inputName?: string): INodeExecutionData[];
|
|
383
|
+
getInstanceId(): string;
|
|
384
|
+
getMode(): WorkflowExecuteMode;
|
|
385
|
+
getNode(): INode;
|
|
386
|
+
getNodeParameter<T extends {
|
|
387
|
+
resource: string;
|
|
388
|
+
}>(parameterName: "resource", itemIndex?: number): T["resource"];
|
|
389
|
+
getNodeParameter(parameterName: string, itemIndex: number, fallbackValue?: unknown, options?: IGetNodeParameterOptions): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object;
|
|
390
|
+
getNodeParameter(parameterName: RecordReturning.NodeParameter, itemIndex: number, fallbackValue?: IDataObject, options?: IGetNodeParameterOptions): IDataObject;
|
|
391
|
+
getExecutionCancelSignal(): AbortSignal | undefined;
|
|
392
|
+
getWorkflowDataProxy(itemIndex: number): IWorkflowDataProxyData;
|
|
393
|
+
getWorkflowStaticData(type: string): IDataObject;
|
|
394
|
+
getRestApiUrl(): string;
|
|
395
|
+
getTimezone(): string;
|
|
396
|
+
getWorkflow(): IWorkflowMetadata;
|
|
397
|
+
prepareOutputData(outputData: INodeExecutionData[], outputIndex?: number): Promise<INodeExecutionData[][]>;
|
|
398
|
+
putExecutionToWait(waitTill: Date): Promise<void>;
|
|
399
|
+
sendMessageToUI(message: unknown): void;
|
|
400
|
+
sendResponse(response: IExecuteResponsePromiseData): void;
|
|
401
|
+
addInputData(data: INodeExecutionData[][] | ExecutionError, node: INode): {
|
|
402
|
+
index: number;
|
|
403
|
+
inputExecutionData: IRunExecutionData;
|
|
404
|
+
};
|
|
405
|
+
addOutputData(data: INodeExecutionData[][] | ExecutionError, node: INode): {
|
|
406
|
+
outputExecutionData: IRunExecutionData;
|
|
407
|
+
};
|
|
408
|
+
getInputConnectionData(connectionType: AINodeConnectionType, itemIndex: number, inputIndex?: number): Promise<unknown>;
|
|
409
|
+
getNodeOutputs?(): INodeOutputConfiguration[];
|
|
410
|
+
helpers: {
|
|
411
|
+
httpRequest(requestOptions: IHttpRequestOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
412
|
+
httpRequestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: IHttpRequestOptions, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
413
|
+
assertBinaryData(itemIndex: number, propertyName: string, inputIndex?: number): IBinaryData;
|
|
414
|
+
getBinaryDataBuffer(itemIndex: number, propertyName: string, inputIndex?: number): Promise<Buffer>;
|
|
415
|
+
[key: string]: (...args: never[]) => unknown;
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
export interface INodeInputFilter {
|
|
419
|
+
nodes: string[];
|
|
420
|
+
}
|
|
421
|
+
export interface INodeInputConfiguration {
|
|
422
|
+
category?: string;
|
|
423
|
+
displayName?: string;
|
|
424
|
+
required?: boolean;
|
|
425
|
+
type: NodeConnectionType;
|
|
426
|
+
filter?: INodeInputFilter;
|
|
427
|
+
maxConnections?: number;
|
|
428
|
+
}
|
|
429
|
+
export interface INodeOutputConfiguration {
|
|
430
|
+
category?: "error";
|
|
431
|
+
displayName?: string;
|
|
432
|
+
maxConnections?: number;
|
|
433
|
+
required?: boolean;
|
|
434
|
+
type: NodeConnectionType;
|
|
435
|
+
}
|
|
436
|
+
export type ISupplyDataFunctions = {
|
|
437
|
+
logger: Logger;
|
|
438
|
+
continueOnFail(): boolean;
|
|
439
|
+
evaluateExpression(expression: string, itemIndex: number): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[];
|
|
440
|
+
executeWorkflow(workflowInfo: IExecuteWorkflowInfo, inputData?: INodeExecutionData[]): Promise<unknown>;
|
|
441
|
+
getContext(type: string): IContextObject;
|
|
442
|
+
getCredentials(type: string, itemIndex?: number): Promise<ICredentialDataDecryptedObject | undefined>;
|
|
443
|
+
getInputData(inputIndex?: number, inputName?: string): INodeExecutionData[];
|
|
444
|
+
getInstanceId(): string;
|
|
445
|
+
getMode(): WorkflowExecuteMode;
|
|
446
|
+
getNode(): INode;
|
|
447
|
+
getNodeParameter<T extends {
|
|
448
|
+
resource: string;
|
|
449
|
+
}>(parameterName: "resource", itemIndex?: number): T["resource"];
|
|
450
|
+
getNodeParameter(parameterName: string, itemIndex: number, fallbackValue?: unknown): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object;
|
|
451
|
+
getWorkflowDataProxy(itemIndex: number): IWorkflowDataProxyData;
|
|
452
|
+
getWorkflowStaticData(type: string): IDataObject;
|
|
453
|
+
getRestApiUrl(): string;
|
|
454
|
+
getTimezone(): string;
|
|
455
|
+
getWorkflow(): IWorkflowMetadata;
|
|
456
|
+
prepareOutputData(outputData: INodeExecutionData[], outputIndex?: number): Promise<INodeExecutionData[][]>;
|
|
457
|
+
putExecutionToWait(waitTill: Date): Promise<void>;
|
|
458
|
+
sendMessageToUI(message: unknown): void;
|
|
459
|
+
sendResponse(response: IExecuteResponsePromiseData): void;
|
|
460
|
+
getInputConnectionData(connectionType: NodeConnectionType, itemIndex: number, inputIndex?: number): Promise<unknown>;
|
|
461
|
+
addInputData(data: INodeExecutionData[][] | ExecutionError, node: INode): {
|
|
462
|
+
index: number;
|
|
463
|
+
inputExecutionData: IRunExecutionData;
|
|
464
|
+
};
|
|
465
|
+
addOutputData(data: INodeExecutionData[][] | ExecutionError, node: INode): {
|
|
466
|
+
outputExecutionData: IRunExecutionData;
|
|
467
|
+
};
|
|
468
|
+
helpers: {
|
|
469
|
+
httpRequest(requestOptions: IHttpRequestOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
470
|
+
httpRequestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: IHttpRequestOptions, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
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>;
|
|
475
|
+
prepareBinaryData(binaryData: Buffer, filePath?: string, mimeType?: string): Promise<IBinaryData>;
|
|
476
|
+
assertBinaryData(itemIndex: number, propertyName: string, inputIndex?: number): IBinaryData;
|
|
477
|
+
getBinaryDataBuffer(itemIndex: number, propertyName: string, inputIndex?: number): Promise<Buffer>;
|
|
478
|
+
returnJsonArray(jsonData: IDataObject | IDataObject[]): INodeExecutionData[];
|
|
479
|
+
normalizeItems(items: INodeExecutionData | INodeExecutionData[]): INodeExecutionData[];
|
|
480
|
+
[key: string]: (...args: never[]) => unknown;
|
|
481
|
+
};
|
|
482
|
+
};
|
|
483
|
+
export interface IExecuteSingleFunctions {
|
|
484
|
+
continueOnFail(): boolean;
|
|
485
|
+
evaluateExpression(expression: string, itemIndex: number | undefined): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[];
|
|
486
|
+
getContext(type: string): IContextObject;
|
|
487
|
+
getCredentials(type: string): Promise<ICredentialDataDecryptedObject | undefined>;
|
|
488
|
+
getInputData(inputIndex?: number, inputName?: string): INodeExecutionData;
|
|
489
|
+
getMode(): WorkflowExecuteMode;
|
|
490
|
+
getNode(): INode;
|
|
491
|
+
getNodeParameter(parameterName: string, fallbackValue?: unknown): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object;
|
|
492
|
+
getRestApiUrl(): string;
|
|
493
|
+
getTimezone(): string;
|
|
494
|
+
getWorkflow(): IWorkflowMetadata;
|
|
495
|
+
getWorkflowDataProxy(): IWorkflowDataProxyData;
|
|
496
|
+
getWorkflowStaticData(type: string): IDataObject;
|
|
497
|
+
helpers: {
|
|
498
|
+
httpRequest(requestOptions: IHttpRequestOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
499
|
+
httpRequestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: IHttpRequestOptions, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
500
|
+
prepareBinaryData(binaryData: Buffer, filePath?: string, mimeType?: string): Promise<IBinaryData>;
|
|
501
|
+
[key: string]: (...args: never[]) => unknown;
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
export interface IExecutePaginationFunctions extends IExecuteSingleFunctions {
|
|
505
|
+
makeRoutingRequest(this: IAllExecuteFunctions, requestOptions: IRequestOptionsFromParameters): Promise<INodeExecutionData[]>;
|
|
506
|
+
}
|
|
507
|
+
export interface IExecuteWorkflowInfo {
|
|
508
|
+
code?: IWorkflowBase;
|
|
509
|
+
id?: string;
|
|
510
|
+
}
|
|
511
|
+
export type ICredentialTestFunction = (this: ICredentialTestFunctions, credential: ICredentialsDecrypted) => Promise<INodeCredentialTestResult>;
|
|
512
|
+
export interface ICredentialTestFunctions {
|
|
513
|
+
helpers: {
|
|
514
|
+
[key: string]: (...args: never[]) => unknown;
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
export interface ILoadOptionsFunctions {
|
|
518
|
+
getCredentials(type: string): Promise<ICredentialDataDecryptedObject | undefined>;
|
|
519
|
+
getNode(): INode;
|
|
520
|
+
getNodeParameter(parameterName: string, fallbackValue?: unknown): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object;
|
|
521
|
+
getCurrentNodeParameter(parameterName: string): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object | undefined;
|
|
522
|
+
getCurrentNodeParameters(): INodeParameters | undefined;
|
|
523
|
+
getTimezone(): string;
|
|
524
|
+
getRestApiUrl(): string;
|
|
525
|
+
helpers: {
|
|
526
|
+
httpRequest(requestOptions: IHttpRequestOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
527
|
+
requestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: unknown, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<unknown>;
|
|
528
|
+
httpRequestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: IHttpRequestOptions, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
529
|
+
[key: string]: ((...args: never[]) => unknown) | undefined;
|
|
530
|
+
};
|
|
531
|
+
}
|
|
532
|
+
export interface IHookFunctions {
|
|
533
|
+
getCredentials(type: string): Promise<ICredentialDataDecryptedObject | undefined>;
|
|
534
|
+
getMode(): WorkflowExecuteMode;
|
|
535
|
+
getActivationMode(): WorkflowActivateMode;
|
|
536
|
+
getNode(): INode;
|
|
537
|
+
getNodeWebhookUrl: (name: string) => string | undefined;
|
|
538
|
+
getNodeParameter(parameterName: string, fallbackValue?: unknown): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object;
|
|
539
|
+
getTimezone(): string;
|
|
540
|
+
getWebhookDescription(name: string): IWebhookDescription | undefined;
|
|
541
|
+
getWebhookName(): string;
|
|
542
|
+
getWorkflow(): IWorkflowMetadata;
|
|
543
|
+
getWorkflowStaticData(type: string): IDataObject;
|
|
544
|
+
helpers: {
|
|
545
|
+
httpRequest(requestOptions: IHttpRequestOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
546
|
+
httpRequestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: IHttpRequestOptions, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
547
|
+
[key: string]: (...args: never[]) => unknown;
|
|
548
|
+
};
|
|
549
|
+
}
|
|
550
|
+
export interface IPollFunctions {
|
|
551
|
+
__emit(data: INodeExecutionData[][]): void;
|
|
552
|
+
getCredentials(type: string): Promise<ICredentialDataDecryptedObject | undefined>;
|
|
553
|
+
getMode(): WorkflowExecuteMode;
|
|
554
|
+
getActivationMode(): WorkflowActivateMode;
|
|
555
|
+
getNode(): INode;
|
|
556
|
+
getNodeParameter(parameterName: string, fallbackValue?: unknown): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object;
|
|
557
|
+
getRestApiUrl(): string;
|
|
558
|
+
getTimezone(): string;
|
|
559
|
+
getWorkflow(): IWorkflowMetadata;
|
|
560
|
+
getWorkflowStaticData(type: string): IDataObject;
|
|
561
|
+
helpers: {
|
|
562
|
+
httpRequest(requestOptions: IHttpRequestOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
563
|
+
httpRequestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: IHttpRequestOptions, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
564
|
+
[key: string]: (...args: never[]) => unknown;
|
|
565
|
+
};
|
|
566
|
+
}
|
|
567
|
+
export interface ITriggerFunctions {
|
|
568
|
+
emit(data: INodeExecutionData[][], responsePromise?: IDeferredPromise<IExecuteResponsePromiseData>): void;
|
|
569
|
+
getCredentials(type: string): Promise<ICredentialDataDecryptedObject | undefined>;
|
|
570
|
+
getMode(): WorkflowExecuteMode;
|
|
571
|
+
getActivationMode(): WorkflowActivateMode;
|
|
572
|
+
getNode(): INode;
|
|
573
|
+
getNodeParameter(parameterName: string, fallbackValue?: unknown): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object;
|
|
574
|
+
getRestApiUrl(): string;
|
|
575
|
+
getTimezone(): string;
|
|
576
|
+
getWorkflow(): IWorkflowMetadata;
|
|
577
|
+
getWorkflowStaticData(type: string): IDataObject;
|
|
578
|
+
helpers: {
|
|
579
|
+
httpRequest(requestOptions: IHttpRequestOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
580
|
+
httpRequestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: IHttpRequestOptions, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
581
|
+
[key: string]: (...args: never[]) => unknown;
|
|
582
|
+
};
|
|
583
|
+
}
|
|
584
|
+
export type ResourceLocatorModes = "id" | "url" | "list" | string;
|
|
585
|
+
export interface INodeParameterResourceLocator {
|
|
586
|
+
__rl: true;
|
|
587
|
+
mode: ResourceLocatorModes;
|
|
588
|
+
value: NodeParameterValue;
|
|
589
|
+
cachedResultName?: string;
|
|
590
|
+
cachedResultUrl?: string;
|
|
591
|
+
__regex?: string;
|
|
592
|
+
}
|
|
593
|
+
export interface ResourceMapperField {
|
|
594
|
+
id: string;
|
|
595
|
+
displayName: string;
|
|
596
|
+
defaultMatch: boolean;
|
|
597
|
+
canBeUsedToMatch?: boolean;
|
|
598
|
+
required: boolean;
|
|
599
|
+
display: boolean;
|
|
600
|
+
type?: FieldType;
|
|
601
|
+
removed?: boolean;
|
|
602
|
+
options?: INodePropertyOptions[];
|
|
603
|
+
readOnly?: boolean;
|
|
604
|
+
}
|
|
605
|
+
export interface IDataObject {
|
|
606
|
+
[key: string]: GenericValue | IDataObject | GenericValue[] | IDataObject[];
|
|
607
|
+
}
|
|
608
|
+
export type ResourceMapperValue = {
|
|
609
|
+
mappingMode: string;
|
|
610
|
+
value: {
|
|
611
|
+
[key: string]: string | number | boolean | null;
|
|
612
|
+
} | null;
|
|
613
|
+
matchingColumns: string[];
|
|
614
|
+
schema: ResourceMapperField[];
|
|
615
|
+
attemptToConvertTypes: boolean;
|
|
616
|
+
convertFieldsToString: boolean;
|
|
617
|
+
};
|
|
618
|
+
export type FilterOperatorType = "string" | "number" | "boolean" | "array" | "object" | "dateTime" | "any";
|
|
619
|
+
export interface FilterOperatorValue {
|
|
620
|
+
type: FilterOperatorType;
|
|
621
|
+
operation: string;
|
|
622
|
+
rightType?: FilterOperatorType;
|
|
623
|
+
singleValue?: boolean;
|
|
624
|
+
}
|
|
625
|
+
export type FilterOptionsValue = {
|
|
626
|
+
caseSensitive: boolean;
|
|
627
|
+
leftValue: string;
|
|
628
|
+
typeValidation: "strict" | "loose";
|
|
629
|
+
version: 1 | 2;
|
|
630
|
+
};
|
|
631
|
+
export type FilterConditionValue = {
|
|
632
|
+
id: string;
|
|
633
|
+
leftValue: NodeParameterValue | NodeParameterValue[];
|
|
634
|
+
operator: FilterOperatorValue;
|
|
635
|
+
rightValue: NodeParameterValue | NodeParameterValue[];
|
|
636
|
+
};
|
|
637
|
+
export type FilterTypeCombinator = "and" | "or";
|
|
638
|
+
export type FilterValue = {
|
|
639
|
+
options: FilterOptionsValue;
|
|
640
|
+
conditions: FilterConditionValue[];
|
|
641
|
+
combinator: FilterTypeCombinator;
|
|
642
|
+
};
|
|
643
|
+
export type AssignmentValue = {
|
|
644
|
+
id: string;
|
|
645
|
+
name: string;
|
|
646
|
+
value: NodeParameterValue;
|
|
647
|
+
type?: string;
|
|
648
|
+
};
|
|
649
|
+
export type AssignmentCollectionValue = {
|
|
650
|
+
assignments: AssignmentValue[];
|
|
651
|
+
};
|
|
652
|
+
export type NodeParameterValueType = NodeParameterValue | INodeParameters | INodeParameterResourceLocator | ResourceMapperValue | FilterValue | AssignmentCollectionValue | NodeParameterValue[] | INodeParameters[] | INodeParameterResourceLocator[] | ResourceMapperValue[];
|
|
653
|
+
interface NodeHelperFunctions {
|
|
654
|
+
copyBinaryFile(filePath: string, fileName: string, mimeType?: string): Promise<IBinaryData>;
|
|
655
|
+
}
|
|
656
|
+
export interface IWebhookFunctions {
|
|
657
|
+
logger: Logger;
|
|
658
|
+
getBodyData(): IDataObject;
|
|
659
|
+
getCredentials(type: string): Promise<ICredentialDataDecryptedObject | undefined>;
|
|
660
|
+
getHeaderData(): object;
|
|
661
|
+
getMode(): WorkflowExecuteMode;
|
|
662
|
+
getNode(): INode;
|
|
663
|
+
getNodeParameter(parameterName: string, fallbackValue?: unknown, options?: IGetNodeParameterOptions): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object;
|
|
664
|
+
evaluateExpression(expression: string, itemIndex?: number): NodeParameterValueType;
|
|
665
|
+
getNodeWebhookUrl: (name: string) => string | undefined;
|
|
666
|
+
getParamsData(): object;
|
|
667
|
+
getQueryData(): object;
|
|
668
|
+
getRequestObject(): express.Request;
|
|
669
|
+
getResponseObject(): express.Response;
|
|
670
|
+
getParentNodes(nodeName: string): NodeTypeAndVersion[];
|
|
671
|
+
getInstanceId(): string;
|
|
672
|
+
getTimezone(): string;
|
|
673
|
+
getWebhookName(): string;
|
|
674
|
+
getWorkflowStaticData(type: string): IDataObject;
|
|
675
|
+
getWorkflow(): IWorkflowMetadata;
|
|
676
|
+
getChildNodes(nodeName: string, options?: {
|
|
677
|
+
includeNodeParameters?: boolean;
|
|
678
|
+
}): NodeTypeAndVersion[];
|
|
679
|
+
prepareOutputData(outputData: INodeExecutionData[], outputIndex?: number): Promise<INodeExecutionData[][]>;
|
|
680
|
+
nodeHelpers: NodeHelperFunctions;
|
|
681
|
+
helpers: {
|
|
682
|
+
httpRequest(requestOptions: IHttpRequestOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
683
|
+
httpRequestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: IHttpRequestOptions, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
|
684
|
+
[key: string]: (...args: never[]) => unknown;
|
|
685
|
+
};
|
|
686
|
+
addInputData(data: INodeExecutionData[][] | ExecutionError, node?: INode): {
|
|
687
|
+
index: number;
|
|
688
|
+
inputExecutionData: IRunExecutionData;
|
|
689
|
+
};
|
|
690
|
+
addOutputData(data: INodeExecutionData[][] | ExecutionError, node?: INode): {
|
|
691
|
+
outputExecutionData: IRunExecutionData;
|
|
692
|
+
};
|
|
693
|
+
logAiEvent(event: AiEvent, data?: string): void;
|
|
694
|
+
}
|
|
695
|
+
export interface INodeCredentialsDetails {
|
|
696
|
+
id: string | null;
|
|
697
|
+
name: string;
|
|
698
|
+
}
|
|
699
|
+
export interface INodeCredentials {
|
|
700
|
+
[key: string]: INodeCredentialsDetails;
|
|
701
|
+
}
|
|
702
|
+
export type OnError = "continueErrorOutput" | "continueRegularOutput" | "stopWorkflow";
|
|
703
|
+
export interface INode {
|
|
704
|
+
id: string;
|
|
705
|
+
name: string;
|
|
706
|
+
typeVersion: number | number[];
|
|
707
|
+
type: string;
|
|
708
|
+
position: [number, number];
|
|
709
|
+
disabled?: boolean;
|
|
710
|
+
notes?: string;
|
|
711
|
+
notesInFlow?: boolean;
|
|
712
|
+
retryOnFail?: boolean;
|
|
713
|
+
maxTries?: number;
|
|
714
|
+
waitBetweenTries?: number;
|
|
715
|
+
alwaysOutputData?: boolean;
|
|
716
|
+
executeOnce?: boolean;
|
|
717
|
+
onError?: OnError;
|
|
718
|
+
continueOnFail?: boolean;
|
|
719
|
+
parameters: INodeParameters;
|
|
720
|
+
credentials?: INodeCredentials;
|
|
721
|
+
webhookId?: string;
|
|
722
|
+
extendsCredential?: string;
|
|
723
|
+
rewireOutputLogTo?: NodeConnectionType;
|
|
724
|
+
}
|
|
725
|
+
export interface INodes {
|
|
726
|
+
[key: string]: INode;
|
|
727
|
+
}
|
|
728
|
+
export interface IObservableObject {
|
|
729
|
+
[key: string]: unknown;
|
|
730
|
+
__dataChanged: boolean;
|
|
731
|
+
}
|
|
732
|
+
export interface IBinaryKeyData {
|
|
733
|
+
[key: string]: IBinaryData;
|
|
734
|
+
}
|
|
735
|
+
export interface INodeExecutionData {
|
|
736
|
+
[key: string]: IDataObject | IBinaryKeyData | NodeApiError | NodeOperationError | undefined;
|
|
737
|
+
json: IDataObject;
|
|
738
|
+
binary?: IBinaryKeyData;
|
|
739
|
+
error?: NodeApiError | NodeOperationError;
|
|
740
|
+
}
|
|
741
|
+
export interface INodeExecuteFunctions {
|
|
742
|
+
getExecutePollFunctions: IGetExecutePollFunctions;
|
|
743
|
+
getExecuteTriggerFunctions: IGetExecuteTriggerFunctions;
|
|
744
|
+
getExecuteFunctions: IGetExecuteFunctions;
|
|
745
|
+
getExecuteSingleFunctions: IGetExecuteSingleFunctions;
|
|
746
|
+
getExecuteHookFunctions: IGetExecuteHookFunctions;
|
|
747
|
+
getExecuteWebhookFunctions: IGetExecuteWebhookFunctions;
|
|
748
|
+
}
|
|
749
|
+
export type NodeParameterValue = string | number | boolean | undefined | null;
|
|
750
|
+
export interface INodeParameters {
|
|
751
|
+
[key: string]: NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[];
|
|
752
|
+
}
|
|
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";
|
|
756
|
+
export type CodeNodeEditorLanguage = (typeof CODE_LANGUAGES)[number];
|
|
757
|
+
export type CodeExecutionMode = (typeof CODE_EXECUTION_MODES)[number];
|
|
758
|
+
export interface ILoadOptions {
|
|
759
|
+
routing?: {
|
|
760
|
+
operations?: IN8nRequestOperations;
|
|
761
|
+
output?: INodeRequestOutput;
|
|
762
|
+
request?: IHttpRequestOptionsFromParameters;
|
|
763
|
+
};
|
|
764
|
+
}
|
|
765
|
+
export interface INodePropertyTypeOptions {
|
|
766
|
+
alwaysOpenEditWindow?: boolean;
|
|
767
|
+
codeAutocomplete?: CodeAutocompleteTypes;
|
|
768
|
+
editor?: EditorTypes;
|
|
769
|
+
loadOptionsDependsOn?: string[];
|
|
770
|
+
loadOptionsMethod?: string;
|
|
771
|
+
loadOptions?: ILoadOptions;
|
|
772
|
+
maxValue?: number;
|
|
773
|
+
minValue?: number;
|
|
774
|
+
multipleValues?: boolean;
|
|
775
|
+
multipleValueButtonText?: string;
|
|
776
|
+
numberPrecision?: number;
|
|
777
|
+
password?: boolean;
|
|
778
|
+
rows?: number;
|
|
779
|
+
showAlpha?: boolean;
|
|
780
|
+
sortable?: boolean;
|
|
781
|
+
[key: string]: unknown;
|
|
782
|
+
}
|
|
783
|
+
export type DisplayCondition = {
|
|
784
|
+
_cnd: {
|
|
785
|
+
eq: NodeParameterValue;
|
|
786
|
+
};
|
|
787
|
+
} | {
|
|
788
|
+
_cnd: {
|
|
789
|
+
not: NodeParameterValue;
|
|
790
|
+
};
|
|
791
|
+
} | {
|
|
792
|
+
_cnd: {
|
|
793
|
+
gte: number | string;
|
|
794
|
+
};
|
|
795
|
+
} | {
|
|
796
|
+
_cnd: {
|
|
797
|
+
lte: number | string;
|
|
798
|
+
};
|
|
799
|
+
} | {
|
|
800
|
+
_cnd: {
|
|
801
|
+
gt: number | string;
|
|
802
|
+
};
|
|
803
|
+
} | {
|
|
804
|
+
_cnd: {
|
|
805
|
+
lt: number | string;
|
|
806
|
+
};
|
|
807
|
+
} | {
|
|
808
|
+
_cnd: {
|
|
809
|
+
between: {
|
|
810
|
+
from: number | string;
|
|
811
|
+
to: number | string;
|
|
812
|
+
};
|
|
813
|
+
};
|
|
814
|
+
} | {
|
|
815
|
+
_cnd: {
|
|
816
|
+
startsWith: string;
|
|
817
|
+
};
|
|
818
|
+
} | {
|
|
819
|
+
_cnd: {
|
|
820
|
+
endsWith: string;
|
|
821
|
+
};
|
|
822
|
+
} | {
|
|
823
|
+
_cnd: {
|
|
824
|
+
includes: string;
|
|
825
|
+
};
|
|
826
|
+
} | {
|
|
827
|
+
_cnd: {
|
|
828
|
+
regex: string;
|
|
829
|
+
};
|
|
830
|
+
} | {
|
|
831
|
+
_cnd: {
|
|
832
|
+
exists: true;
|
|
833
|
+
};
|
|
834
|
+
};
|
|
835
|
+
export interface IDisplayOptions {
|
|
836
|
+
hide?: {
|
|
837
|
+
[key: string]: Array<NodeParameterValue | DisplayCondition> | NodeParameterValue[] | undefined;
|
|
838
|
+
};
|
|
839
|
+
show?: {
|
|
840
|
+
[key: string]: Array<NodeParameterValue | DisplayCondition> | NodeParameterValue[] | undefined;
|
|
841
|
+
};
|
|
842
|
+
}
|
|
843
|
+
export type FieldTypeMap = {
|
|
844
|
+
boolean: boolean;
|
|
845
|
+
number: number;
|
|
846
|
+
string: string;
|
|
847
|
+
"string-alphanumeric": string;
|
|
848
|
+
dateTime: string;
|
|
849
|
+
time: string;
|
|
850
|
+
array: unknown[];
|
|
851
|
+
object: object;
|
|
852
|
+
options: unknown;
|
|
853
|
+
url: string;
|
|
854
|
+
jwt: string;
|
|
855
|
+
"form-fields": FormFieldsParameter;
|
|
856
|
+
};
|
|
857
|
+
export type ValidationResult<T extends FieldType = FieldType> = {
|
|
858
|
+
valid: false;
|
|
859
|
+
errorMessage: string;
|
|
860
|
+
} | {
|
|
861
|
+
valid: true;
|
|
862
|
+
newValue?: FieldTypeMap[T];
|
|
863
|
+
};
|
|
864
|
+
export type FieldType = keyof FieldTypeMap;
|
|
865
|
+
export declare namespace MultiPartFormData {
|
|
866
|
+
interface File {
|
|
867
|
+
filepath: string;
|
|
868
|
+
mimetype?: string;
|
|
869
|
+
originalFilename?: string;
|
|
870
|
+
newFilename: string;
|
|
871
|
+
size?: number;
|
|
872
|
+
}
|
|
873
|
+
type Request = express.Request<Record<string, never>, Record<string, never>, {
|
|
874
|
+
data: Record<string, string | string[]>;
|
|
875
|
+
files: Record<string, File | File[]>;
|
|
876
|
+
}>;
|
|
877
|
+
}
|
|
878
|
+
export interface IVersionedNodeType {
|
|
879
|
+
nodeVersions: {
|
|
880
|
+
[key: number]: INodeType;
|
|
881
|
+
};
|
|
882
|
+
currentVersion: number;
|
|
883
|
+
description: INodeTypeBaseDescription;
|
|
884
|
+
getNodeType: (version?: number) => INodeType;
|
|
885
|
+
}
|
|
886
|
+
export interface INodePropertyModeValidation {
|
|
887
|
+
type: string;
|
|
888
|
+
properties: Record<string, unknown>;
|
|
889
|
+
}
|
|
890
|
+
export type INodePropertyValueExtractorFunction = (this: IExecuteSingleFunctions, value: string | NodeParameterValue) => Promise<string | NodeParameterValue> | (string | NodeParameterValue);
|
|
891
|
+
export interface INodePropertyValueExtractorBase {
|
|
892
|
+
type: string;
|
|
893
|
+
}
|
|
894
|
+
export interface INodePropertyValueExtractorRegex extends INodePropertyValueExtractorBase {
|
|
895
|
+
type: "regex";
|
|
896
|
+
regex: string | RegExp;
|
|
897
|
+
}
|
|
898
|
+
export type INodePropertyValueExtractor = INodePropertyValueExtractorRegex;
|
|
899
|
+
export interface INodePropertyModeTypeOptions {
|
|
900
|
+
searchListMethod?: string;
|
|
901
|
+
searchFilterRequired?: boolean;
|
|
902
|
+
searchable?: boolean;
|
|
903
|
+
}
|
|
904
|
+
export interface INodePropertyMode {
|
|
905
|
+
displayName: string;
|
|
906
|
+
name: string;
|
|
907
|
+
type: "string" | "list";
|
|
908
|
+
hint?: string;
|
|
909
|
+
validation?: Array<INodePropertyModeValidation | ((this: IExecuteSingleFunctions, value: string) => void)>;
|
|
910
|
+
placeholder?: string;
|
|
911
|
+
url?: string;
|
|
912
|
+
extractValue?: INodePropertyValueExtractor;
|
|
913
|
+
initType?: string;
|
|
914
|
+
entryTypes?: {
|
|
915
|
+
[name: string]: {
|
|
916
|
+
selectable?: boolean;
|
|
917
|
+
hidden?: boolean;
|
|
918
|
+
queryable?: boolean;
|
|
919
|
+
data?: {
|
|
920
|
+
request?: IHttpRequestOptions;
|
|
921
|
+
output?: INodeRequestOutput;
|
|
922
|
+
};
|
|
923
|
+
};
|
|
924
|
+
};
|
|
925
|
+
search?: INodePropertyRouting;
|
|
926
|
+
typeOptions?: INodePropertyModeTypeOptions;
|
|
927
|
+
}
|
|
928
|
+
export interface INodeProperties {
|
|
929
|
+
displayName: string;
|
|
930
|
+
name: string;
|
|
931
|
+
type: NodePropertyTypes;
|
|
932
|
+
typeOptions?: INodePropertyTypeOptions;
|
|
933
|
+
default: NodeParameterValue | INodeParameters | INodeParameters[] | NodeParameterValue[];
|
|
934
|
+
description?: string;
|
|
935
|
+
hint?: string;
|
|
936
|
+
displayOptions?: IDisplayOptions;
|
|
937
|
+
options?: Array<INodePropertyOptions | INodeProperties | INodePropertyCollection>;
|
|
938
|
+
placeholder?: string;
|
|
939
|
+
isNodeSetting?: boolean;
|
|
940
|
+
noDataExpression?: boolean;
|
|
941
|
+
required?: boolean;
|
|
942
|
+
routing?: INodePropertyRouting;
|
|
943
|
+
modes?: INodePropertyMode[];
|
|
944
|
+
validateType?: FieldType;
|
|
945
|
+
ignoreValidationDuringExecution?: boolean;
|
|
946
|
+
disabledOptions?: {
|
|
947
|
+
show?: {
|
|
948
|
+
[key: string]: Array<NodeParameterValue | DisplayCondition> | NodeParameterValue[] | undefined;
|
|
949
|
+
};
|
|
950
|
+
};
|
|
951
|
+
}
|
|
952
|
+
export interface INodePropertyOptions {
|
|
953
|
+
name: string;
|
|
954
|
+
value: string | number | boolean;
|
|
955
|
+
action?: string;
|
|
956
|
+
description?: string;
|
|
957
|
+
routing?: INodePropertyRouting;
|
|
958
|
+
outputConnectionType?: NodeConnectionType;
|
|
959
|
+
}
|
|
960
|
+
export interface INodePropertyCollection {
|
|
961
|
+
displayName: string;
|
|
962
|
+
name: string;
|
|
963
|
+
values: INodeProperties[];
|
|
964
|
+
}
|
|
965
|
+
export interface IParameterDependencies {
|
|
966
|
+
[key: string]: string[];
|
|
967
|
+
}
|
|
968
|
+
export interface IPollResponse {
|
|
969
|
+
closeFunction?: () => Promise<void>;
|
|
970
|
+
}
|
|
971
|
+
export interface ITriggerResponse {
|
|
972
|
+
closeFunction?: () => Promise<void>;
|
|
973
|
+
manualTriggerFunction?: () => Promise<void>;
|
|
974
|
+
manualTriggerResponse?: Promise<INodeExecutionData[][]>;
|
|
975
|
+
}
|
|
976
|
+
export interface SupplyData {
|
|
977
|
+
metadata?: IDataObject;
|
|
978
|
+
response: unknown;
|
|
979
|
+
closeFunction?: () => Promise<void>;
|
|
980
|
+
}
|
|
981
|
+
declare namespace ExecuteFunctions {
|
|
982
|
+
namespace StringReturning {
|
|
983
|
+
type NodeParameter = "binaryProperty" | "binaryPropertyName" | "binaryPropertyOutput" | "dataPropertyName" | "dataBinaryProperty" | "resource" | "operation" | "filePath" | "encodingType";
|
|
984
|
+
}
|
|
985
|
+
namespace NumberReturning {
|
|
986
|
+
type NodeParameter = "limit";
|
|
987
|
+
}
|
|
988
|
+
namespace BooleanReturning {
|
|
989
|
+
type NodeParameter = "binaryData" | "download" | "jsonParameters" | "returnAll" | "rawData" | "resolveData";
|
|
990
|
+
}
|
|
991
|
+
namespace RecordReturning {
|
|
992
|
+
type NodeParameter = "additionalFields" | "filters" | "options" | "updateFields";
|
|
993
|
+
}
|
|
994
|
+
export type GetNodeParameterFn = {
|
|
995
|
+
getNodeParameter<T extends {
|
|
996
|
+
resource: string;
|
|
997
|
+
}>(parameterName: "resource", itemIndex?: number): T["resource"];
|
|
998
|
+
getNodeParameter(parameterName: StringReturning.NodeParameter, itemIndex: number, fallbackValue?: string, options?: IGetNodeParameterOptions): string;
|
|
999
|
+
getNodeParameter(parameterName: RecordReturning.NodeParameter, itemIndex: number, fallbackValue?: IDataObject, options?: IGetNodeParameterOptions): IDataObject;
|
|
1000
|
+
getNodeParameter(parameterName: BooleanReturning.NodeParameter, itemIndex: number, fallbackValue?: boolean, options?: IGetNodeParameterOptions): boolean;
|
|
1001
|
+
getNodeParameter(parameterName: NumberReturning.NodeParameter, itemIndex: number, fallbackValue?: number, options?: IGetNodeParameterOptions): number;
|
|
1002
|
+
getNodeParameter(parameterName: string, itemIndex: number, fallbackValue?: unknown, options?: IGetNodeParameterOptions): NodeParameterValueType | object;
|
|
1003
|
+
};
|
|
1004
|
+
export {};
|
|
1005
|
+
}
|
|
1006
|
+
export interface INodeListSearchItems extends INodePropertyOptions {
|
|
1007
|
+
icon?: string;
|
|
1008
|
+
url?: string;
|
|
1009
|
+
}
|
|
1010
|
+
export interface INodeListSearchResult {
|
|
1011
|
+
results: INodeListSearchItems[];
|
|
1012
|
+
paginationToken?: unknown;
|
|
1013
|
+
}
|
|
1014
|
+
export type IWorkflowNodeContext = ExecuteFunctions.GetNodeParameterFn & Pick<FunctionsBase, "getNode" | "getWorkflow">;
|
|
1015
|
+
export interface ILocalLoadOptionsFunctions {
|
|
1016
|
+
getWorkflowNodeContext(nodeType: string): Promise<IWorkflowNodeContext | null>;
|
|
1017
|
+
}
|
|
1018
|
+
export type LogLevel = (typeof LOG_LEVELS)[number];
|
|
1019
|
+
export type LogMetadata = {
|
|
1020
|
+
[key: string]: unknown;
|
|
1021
|
+
scopes?: unknown[];
|
|
1022
|
+
file?: string;
|
|
1023
|
+
function?: string;
|
|
1024
|
+
};
|
|
1025
|
+
export type Logger = Record<Exclude<LogLevel, "silent">, (message: string, metadata?: LogMetadata) => void>;
|
|
1026
|
+
export interface FunctionsBase {
|
|
1027
|
+
logger: Logger;
|
|
1028
|
+
getCredentials<T extends object = ICredentialDataDecryptedObject>(type: string, itemIndex?: number): Promise<T>;
|
|
1029
|
+
getCredentialsProperties(type: string): INodeProperties[];
|
|
1030
|
+
getExecutionId(): string;
|
|
1031
|
+
getNode(): INode;
|
|
1032
|
+
getWorkflow(): IWorkflowMetadata;
|
|
1033
|
+
getWorkflowStaticData(type: string): IDataObject;
|
|
1034
|
+
getTimezone(): string;
|
|
1035
|
+
getRestApiUrl(): string;
|
|
1036
|
+
getInstanceBaseUrl(): string;
|
|
1037
|
+
getInstanceId(): string;
|
|
1038
|
+
getChildNodes(nodeName: string, options?: {
|
|
1039
|
+
includeNodeParameters?: boolean;
|
|
1040
|
+
}): NodeTypeAndVersion[];
|
|
1041
|
+
getParentNodes(nodeName: string): NodeTypeAndVersion[];
|
|
1042
|
+
getKnownNodeTypes(): IDataObject;
|
|
1043
|
+
getMode?: () => WorkflowExecuteMode;
|
|
1044
|
+
getActivationMode?: () => WorkflowActivateMode;
|
|
1045
|
+
/** @deprecated */
|
|
1046
|
+
prepareOutputData(outputData: INodeExecutionData[]): Promise<INodeExecutionData[][]>;
|
|
1047
|
+
}
|
|
1048
|
+
export interface ResourceMapperFields {
|
|
1049
|
+
fields: ResourceMapperField[];
|
|
1050
|
+
emptyFieldsNotice?: string;
|
|
1051
|
+
}
|
|
1052
|
+
export interface INodeType {
|
|
1053
|
+
description: INodeTypeDescription;
|
|
1054
|
+
supplyData?(this: ISupplyDataFunctions | IWebhookFunctions, itemIndex: number): Promise<SupplyData>;
|
|
1055
|
+
execute?(this: IExecuteFunctions): Promise<INodeExecutionData[][] | null>;
|
|
1056
|
+
executeSingle?(this: IExecuteSingleFunctions): Promise<INodeExecutionData>;
|
|
1057
|
+
poll?(this: IPollFunctions): Promise<INodeExecutionData[][] | null>;
|
|
1058
|
+
trigger?(this: ITriggerFunctions): Promise<ITriggerResponse | undefined>;
|
|
1059
|
+
webhook?(this: IWebhookFunctions, workflow?: Workflow): Promise<IWebhookResponseData>;
|
|
1060
|
+
hooks?: {
|
|
1061
|
+
[key: string]: (this: IHookFunctions) => Promise<boolean>;
|
|
1062
|
+
};
|
|
1063
|
+
methods?: {
|
|
1064
|
+
loadOptions?: {
|
|
1065
|
+
[key: string]: (this: ILoadOptionsFunctions) => Promise<INodePropertyOptions[]>;
|
|
1066
|
+
};
|
|
1067
|
+
listSearch?: {
|
|
1068
|
+
[key: string]: (this: ILoadOptionsFunctions, filter?: string, paginationToken?: string) => Promise<INodeListSearchResult>;
|
|
1069
|
+
};
|
|
1070
|
+
credentialTest?: {
|
|
1071
|
+
[functionName: string]: ICredentialTestFunction;
|
|
1072
|
+
};
|
|
1073
|
+
resourceMapping?: {
|
|
1074
|
+
[functionName: string]: (this: ILoadOptionsFunctions) => Promise<ResourceMapperFields>;
|
|
1075
|
+
};
|
|
1076
|
+
localResourceMapping?: {
|
|
1077
|
+
[functionName: string]: (this: ILocalLoadOptionsFunctions) => Promise<ResourceMapperFields>;
|
|
1078
|
+
};
|
|
1079
|
+
actionHandler?: {
|
|
1080
|
+
[functionName: string]: (this: ILoadOptionsFunctions, payload: IDataObject | string | undefined) => Promise<NodeParameterValueType>;
|
|
1081
|
+
};
|
|
1082
|
+
};
|
|
1083
|
+
webhookMethods?: {
|
|
1084
|
+
[key: string]: IWebhookSetupMethods;
|
|
1085
|
+
};
|
|
1086
|
+
}
|
|
1087
|
+
export interface INodeVersionedType {
|
|
1088
|
+
nodeVersions: {
|
|
1089
|
+
[key: number]: INodeType;
|
|
1090
|
+
};
|
|
1091
|
+
currentVersion: number;
|
|
1092
|
+
description: INodeTypeBaseDescription;
|
|
1093
|
+
getNodeType: (version?: number) => INodeType;
|
|
1094
|
+
}
|
|
1095
|
+
export interface INodeCredentialTestResult {
|
|
1096
|
+
status: "OK" | "Error";
|
|
1097
|
+
message: string;
|
|
1098
|
+
}
|
|
1099
|
+
export interface INodeCredentialTestRequest {
|
|
1100
|
+
nodeToTestWith?: string;
|
|
1101
|
+
credentials: ICredentialsDecrypted;
|
|
1102
|
+
}
|
|
1103
|
+
export type WebhookSetupMethodNames = "checkExists" | "create" | "delete";
|
|
1104
|
+
export interface IWebhookSetupMethods {
|
|
1105
|
+
[key: string]: ((this: IHookFunctions) => Promise<boolean>) | undefined;
|
|
1106
|
+
checkExists?: (this: IHookFunctions) => Promise<boolean>;
|
|
1107
|
+
create?: (this: IHookFunctions) => Promise<boolean>;
|
|
1108
|
+
delete?: (this: IHookFunctions) => Promise<boolean>;
|
|
1109
|
+
}
|
|
1110
|
+
export interface INodeCredentialDescription {
|
|
1111
|
+
name: string;
|
|
1112
|
+
required?: boolean;
|
|
1113
|
+
displayOptions?: IDisplayOptions;
|
|
1114
|
+
testedBy?: ICredentialTestRequest | string;
|
|
1115
|
+
}
|
|
1116
|
+
export type FormFieldsParameter = Array<{
|
|
1117
|
+
fieldLabel: string;
|
|
1118
|
+
elementName?: string;
|
|
1119
|
+
fieldType?: string;
|
|
1120
|
+
requiredField?: boolean;
|
|
1121
|
+
fieldOptions?: {
|
|
1122
|
+
values: Array<{
|
|
1123
|
+
option: string;
|
|
1124
|
+
}>;
|
|
1125
|
+
};
|
|
1126
|
+
multiselect?: boolean;
|
|
1127
|
+
multipleFiles?: boolean;
|
|
1128
|
+
acceptFileTypes?: string;
|
|
1129
|
+
formatDate?: string;
|
|
1130
|
+
html?: string;
|
|
1131
|
+
placeholder?: string;
|
|
1132
|
+
fieldName?: string;
|
|
1133
|
+
fieldValue?: string;
|
|
1134
|
+
}>;
|
|
1135
|
+
export declare const NodeConnectionTypes: {
|
|
1136
|
+
readonly AiAgent: "ai_agent";
|
|
1137
|
+
readonly AiChain: "ai_chain";
|
|
1138
|
+
readonly AiDocument: "ai_document";
|
|
1139
|
+
readonly AiEmbedding: "ai_embedding";
|
|
1140
|
+
readonly AiLanguageModel: "ai_languageModel";
|
|
1141
|
+
readonly AiMemory: "ai_memory";
|
|
1142
|
+
readonly AiOutputParser: "ai_outputParser";
|
|
1143
|
+
readonly AiRetriever: "ai_retriever";
|
|
1144
|
+
readonly AiTextSplitter: "ai_textSplitter";
|
|
1145
|
+
readonly AiTool: "ai_tool";
|
|
1146
|
+
readonly AiVectorStore: "ai_vectorStore";
|
|
1147
|
+
readonly Main: "main";
|
|
1148
|
+
};
|
|
1149
|
+
export type NodeConnectionType = (typeof NodeConnectionTypes)[keyof typeof NodeConnectionTypes];
|
|
1150
|
+
export type INodeIssueTypes = "credentials" | "execution" | "parameters" | "typeUnknown";
|
|
1151
|
+
export interface INodeIssueObjectProperty {
|
|
1152
|
+
[key: string]: string[];
|
|
1153
|
+
}
|
|
1154
|
+
export interface INodeIssueData {
|
|
1155
|
+
node: string;
|
|
1156
|
+
type: INodeIssueTypes;
|
|
1157
|
+
value: boolean | string | string[] | INodeIssueObjectProperty;
|
|
1158
|
+
}
|
|
1159
|
+
export interface INodeIssues {
|
|
1160
|
+
execution?: boolean;
|
|
1161
|
+
credentials?: INodeIssueObjectProperty;
|
|
1162
|
+
parameters?: INodeIssueObjectProperty;
|
|
1163
|
+
typeUnknown?: boolean;
|
|
1164
|
+
[key: string]: undefined | boolean | INodeIssueObjectProperty;
|
|
1165
|
+
}
|
|
1166
|
+
export interface IWorfklowIssues {
|
|
1167
|
+
[key: string]: INodeIssues;
|
|
1168
|
+
}
|
|
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";
|
|
1170
|
+
export type Themed<T> = T | {
|
|
1171
|
+
light: T;
|
|
1172
|
+
dark: T;
|
|
1173
|
+
};
|
|
1174
|
+
export interface INodeTypeBaseDescription {
|
|
1175
|
+
displayName: string;
|
|
1176
|
+
name: string;
|
|
1177
|
+
icon?: string | Icon;
|
|
1178
|
+
iconColor?: ThemeIconColor;
|
|
1179
|
+
iconUrl?: Themed<string>;
|
|
1180
|
+
group: string[];
|
|
1181
|
+
description: string;
|
|
1182
|
+
documentationUrl?: string;
|
|
1183
|
+
subtitle?: string;
|
|
1184
|
+
defaultVersion?: number;
|
|
1185
|
+
codex?: CodexData;
|
|
1186
|
+
}
|
|
1187
|
+
export interface INodePropertyRouting {
|
|
1188
|
+
operations?: IN8nRequestOperations;
|
|
1189
|
+
output?: INodeRequestOutput;
|
|
1190
|
+
request?: IHttpRequestOptionsFromParameters;
|
|
1191
|
+
send?: INodeRequestSend;
|
|
1192
|
+
}
|
|
1193
|
+
export interface IPostReceiveBase {
|
|
1194
|
+
type: string;
|
|
1195
|
+
enabled?: boolean | string;
|
|
1196
|
+
properties: {
|
|
1197
|
+
[key: string]: string | number | boolean | IDataObject;
|
|
1198
|
+
};
|
|
1199
|
+
errorMessage?: string;
|
|
1200
|
+
}
|
|
1201
|
+
export interface IPostReceiveFilter extends IPostReceiveBase {
|
|
1202
|
+
type: "filter";
|
|
1203
|
+
properties: {
|
|
1204
|
+
pass: boolean | string;
|
|
1205
|
+
};
|
|
1206
|
+
}
|
|
1207
|
+
export interface IPostReceiveLimit extends IPostReceiveBase {
|
|
1208
|
+
type: "limit";
|
|
1209
|
+
properties: {
|
|
1210
|
+
maxResults: number | string;
|
|
1211
|
+
};
|
|
1212
|
+
}
|
|
1213
|
+
export type PostReceiveAction = ((this: IExecuteSingleFunctions, items: INodeExecutionData[], response: IN8nHttpFullResponse) => Promise<INodeExecutionData[]>) | IPostReceiveBinaryData | IPostReceiveFilter | IPostReceiveLimit | IPostReceiveRootProperty | IPostReceiveSet | IPostReceiveSetKeyValue | IPostReceiveSort;
|
|
1214
|
+
export type PreSendAction = (this: IExecuteSingleFunctions, requestOptions: IHttpRequestOptions) => Promise<IHttpRequestOptions>;
|
|
1215
|
+
export interface INodeRequestOutput {
|
|
1216
|
+
maxResults?: number | string;
|
|
1217
|
+
postReceive?: PostReceiveAction[];
|
|
1218
|
+
}
|
|
1219
|
+
export interface INodeRequestSend {
|
|
1220
|
+
preSend?: PreSendAction[];
|
|
1221
|
+
paginate?: boolean | string;
|
|
1222
|
+
property?: string;
|
|
1223
|
+
propertyInDotNotation?: boolean;
|
|
1224
|
+
type?: "body" | "query";
|
|
1225
|
+
value?: string;
|
|
1226
|
+
}
|
|
1227
|
+
export interface IPostReceiveBinaryData extends IPostReceiveBase {
|
|
1228
|
+
type: "binaryData";
|
|
1229
|
+
properties: {
|
|
1230
|
+
destinationProperty: string;
|
|
1231
|
+
};
|
|
1232
|
+
}
|
|
1233
|
+
export interface IPostReceiveRootProperty extends IPostReceiveBase {
|
|
1234
|
+
type: "rootProperty";
|
|
1235
|
+
properties: {
|
|
1236
|
+
property: string;
|
|
1237
|
+
};
|
|
1238
|
+
}
|
|
1239
|
+
export interface IPostReceiveSet extends IPostReceiveBase {
|
|
1240
|
+
type: "set";
|
|
1241
|
+
properties: {
|
|
1242
|
+
value: string;
|
|
1243
|
+
};
|
|
1244
|
+
}
|
|
1245
|
+
export interface IPostReceiveSetKeyValue extends IPostReceiveBase {
|
|
1246
|
+
type: "setKeyValue";
|
|
1247
|
+
properties: {
|
|
1248
|
+
[key: string]: string | number;
|
|
1249
|
+
};
|
|
1250
|
+
}
|
|
1251
|
+
export interface IPostReceiveSort extends IPostReceiveBase {
|
|
1252
|
+
type: "sort";
|
|
1253
|
+
properties: {
|
|
1254
|
+
key: string;
|
|
1255
|
+
};
|
|
1256
|
+
}
|
|
1257
|
+
export interface IHttpRequestOptionsFromParameters extends Partial<IHttpRequestOptions> {
|
|
1258
|
+
url?: string;
|
|
1259
|
+
}
|
|
1260
|
+
export interface IRequestOptionsFromParameters {
|
|
1261
|
+
maxResults?: number | string;
|
|
1262
|
+
options: IHttpRequestOptionsFromParameters;
|
|
1263
|
+
paginate?: boolean | string;
|
|
1264
|
+
preSend: PreSendAction[];
|
|
1265
|
+
postReceive: Array<{
|
|
1266
|
+
data: {
|
|
1267
|
+
parameterValue: string | IDataObject | undefined;
|
|
1268
|
+
};
|
|
1269
|
+
actions: PostReceiveAction[];
|
|
1270
|
+
}>;
|
|
1271
|
+
requestOperations?: IN8nRequestOperations;
|
|
1272
|
+
}
|
|
1273
|
+
export type TriggerPanelDefinition = {
|
|
1274
|
+
hideContent?: boolean | string;
|
|
1275
|
+
header?: string;
|
|
1276
|
+
executionsHelp?: string | {
|
|
1277
|
+
active: string;
|
|
1278
|
+
inactive: string;
|
|
1279
|
+
};
|
|
1280
|
+
activationHint?: string | {
|
|
1281
|
+
active: string;
|
|
1282
|
+
inactive: string;
|
|
1283
|
+
};
|
|
1284
|
+
};
|
|
1285
|
+
export type ExpressionString = `={{${string}}}`;
|
|
1286
|
+
export interface INodeTypeDescription extends INodeTypeBaseDescription {
|
|
1287
|
+
version: number | number[];
|
|
1288
|
+
defaults: INodeParameters;
|
|
1289
|
+
triggerPanel?: TriggerPanelDefinition | boolean;
|
|
1290
|
+
eventTriggerDescription?: string;
|
|
1291
|
+
activationMessage?: string;
|
|
1292
|
+
inputs: Array<NodeConnectionType | INodeInputConfiguration>;
|
|
1293
|
+
inputNames?: string[];
|
|
1294
|
+
outputs: Array<NodeConnectionType | INodeOutputConfiguration>;
|
|
1295
|
+
outputNames?: string[];
|
|
1296
|
+
properties: INodeProperties[];
|
|
1297
|
+
credentials?: INodeCredentialDescription[];
|
|
1298
|
+
maxNodes?: number;
|
|
1299
|
+
polling?: boolean;
|
|
1300
|
+
requestDefaults?: IHttpRequestOptionsFromParameters;
|
|
1301
|
+
requestOperations?: IN8nRequestOperations;
|
|
1302
|
+
hooks?: {
|
|
1303
|
+
[key: string]: INodeHookDescription[] | undefined;
|
|
1304
|
+
activate?: INodeHookDescription[];
|
|
1305
|
+
deactivate?: INodeHookDescription[];
|
|
1306
|
+
};
|
|
1307
|
+
webhooks?: IWebhookDescription[];
|
|
1308
|
+
translation?: {
|
|
1309
|
+
[key: string]: object;
|
|
1310
|
+
};
|
|
1311
|
+
supportsCORS?: true | undefined;
|
|
1312
|
+
__loadOptionsMethods?: string[];
|
|
1313
|
+
}
|
|
1314
|
+
export interface INodeHookDescription {
|
|
1315
|
+
method: string;
|
|
1316
|
+
}
|
|
1317
|
+
export interface IWebhookData {
|
|
1318
|
+
httpMethod: WebhookHttpMethod;
|
|
1319
|
+
node: string;
|
|
1320
|
+
path: string;
|
|
1321
|
+
webhookDescription: IWebhookDescription;
|
|
1322
|
+
workflowId: string;
|
|
1323
|
+
workflowExecuteAdditionalData: IWorkflowExecuteAdditionalData;
|
|
1324
|
+
webhookId?: string;
|
|
1325
|
+
}
|
|
1326
|
+
export interface IWebhookDescription {
|
|
1327
|
+
[key: string]: WebhookHttpMethod | WebhookResponseMode | boolean | string | undefined;
|
|
1328
|
+
httpMethod: WebhookHttpMethod | string;
|
|
1329
|
+
isFullPath?: boolean;
|
|
1330
|
+
name: string;
|
|
1331
|
+
path: string;
|
|
1332
|
+
responseBinaryPropertyName?: string;
|
|
1333
|
+
responseContentType?: string;
|
|
1334
|
+
responsePropertyName?: string;
|
|
1335
|
+
responseMode?: WebhookResponseMode | string;
|
|
1336
|
+
responseData?: WebhookResponseData | string;
|
|
1337
|
+
restartWebhook?: boolean;
|
|
1338
|
+
}
|
|
1339
|
+
export interface IWorkflowDataProxyData {
|
|
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;
|
|
1355
|
+
$thisRunIndex: number;
|
|
1356
|
+
$thisItemIndex: number;
|
|
1357
|
+
$now: unknown;
|
|
1358
|
+
$today: unknown;
|
|
1359
|
+
}
|
|
1360
|
+
export type IWorkflowDataProxyAdditionalKeys = IDataObject;
|
|
1361
|
+
export interface IWorkflowMetadata {
|
|
1362
|
+
id?: number | string;
|
|
1363
|
+
name?: string;
|
|
1364
|
+
active: boolean;
|
|
1365
|
+
}
|
|
1366
|
+
export type WebhookHttpMethod = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT" | "OPTIONS";
|
|
1367
|
+
export interface IWebhookResponseData {
|
|
1368
|
+
workflowData?: INodeExecutionData[][];
|
|
1369
|
+
webhookResponse?: unknown;
|
|
1370
|
+
noWebhookResponse?: boolean;
|
|
1371
|
+
}
|
|
1372
|
+
export type WebhookResponseData = "allEntries" | "firstEntryJson" | "firstEntryBinary" | "noData";
|
|
1373
|
+
export type WebhookResponseMode = "onReceived" | "lastNode";
|
|
1374
|
+
export interface INodeTypes {
|
|
1375
|
+
nodeTypes: INodeTypeData;
|
|
1376
|
+
init(nodeTypes?: INodeTypeData): Promise<void>;
|
|
1377
|
+
getAll(): Array<INodeType | INodeVersionedType>;
|
|
1378
|
+
getByNameAndVersion(nodeType: string, version?: number | number[]): INodeType | undefined;
|
|
1379
|
+
}
|
|
1380
|
+
export interface ICredentialTypeData {
|
|
1381
|
+
[key: string]: {
|
|
1382
|
+
type: ICredentialType;
|
|
1383
|
+
sourcePath: string;
|
|
1384
|
+
};
|
|
1385
|
+
}
|
|
1386
|
+
export interface INodeTypeData {
|
|
1387
|
+
[key: string]: {
|
|
1388
|
+
type: INodeType | INodeVersionedType;
|
|
1389
|
+
sourcePath: string;
|
|
1390
|
+
};
|
|
1391
|
+
}
|
|
1392
|
+
export interface IRun {
|
|
1393
|
+
data: IRunExecutionData;
|
|
1394
|
+
finished?: boolean;
|
|
1395
|
+
mode: WorkflowExecuteMode;
|
|
1396
|
+
waitTill?: Date;
|
|
1397
|
+
startedAt: Date;
|
|
1398
|
+
stoppedAt?: Date;
|
|
1399
|
+
}
|
|
1400
|
+
export type EnsureTypeOptions = "string" | "number" | "boolean" | "object" | "array" | "json";
|
|
1401
|
+
export interface IGetNodeParameterOptions {
|
|
1402
|
+
contextNode?: INode;
|
|
1403
|
+
ensureType?: EnsureTypeOptions;
|
|
1404
|
+
extractValue?: boolean;
|
|
1405
|
+
rawExpressions?: boolean;
|
|
1406
|
+
}
|
|
1407
|
+
export interface IRunExecutionData {
|
|
1408
|
+
startData?: {
|
|
1409
|
+
destinationNode?: string;
|
|
1410
|
+
runNodeFilter?: string[];
|
|
1411
|
+
};
|
|
1412
|
+
resultData: {
|
|
1413
|
+
error?: ExecutionError;
|
|
1414
|
+
runData: IRunData;
|
|
1415
|
+
lastNodeExecuted?: string;
|
|
1416
|
+
};
|
|
1417
|
+
executionData?: {
|
|
1418
|
+
contextData: IExecuteContextData;
|
|
1419
|
+
nodeExecutionStack: IExecuteData[];
|
|
1420
|
+
waitingExecution: IWaitingForExecution;
|
|
1421
|
+
};
|
|
1422
|
+
waitTill?: Date;
|
|
1423
|
+
}
|
|
1424
|
+
export interface IRunData {
|
|
1425
|
+
[key: string]: ITaskData[];
|
|
1426
|
+
}
|
|
1427
|
+
export interface ITaskData {
|
|
1428
|
+
startTime: number;
|
|
1429
|
+
executionTime: number;
|
|
1430
|
+
data?: ITaskDataConnections;
|
|
1431
|
+
error?: ExecutionError;
|
|
1432
|
+
}
|
|
1433
|
+
export interface ITaskDataConnections {
|
|
1434
|
+
[key: string]: Array<INodeExecutionData[] | null>;
|
|
1435
|
+
}
|
|
1436
|
+
export interface IWaitingForExecution {
|
|
1437
|
+
[key: string]: {
|
|
1438
|
+
[key: number]: ITaskDataConnections;
|
|
1439
|
+
};
|
|
1440
|
+
}
|
|
1441
|
+
export interface IWorkflowBase {
|
|
1442
|
+
id?: unknown;
|
|
1443
|
+
name: string;
|
|
1444
|
+
active: boolean;
|
|
1445
|
+
createdAt: Date;
|
|
1446
|
+
updatedAt: Date;
|
|
1447
|
+
nodes: INode[];
|
|
1448
|
+
connections: IConnections;
|
|
1449
|
+
settings?: IWorkflowSettings;
|
|
1450
|
+
staticData?: IDataObject;
|
|
1451
|
+
teamId?: string | null;
|
|
1452
|
+
}
|
|
1453
|
+
export interface IWorkflowCredentials {
|
|
1454
|
+
[credentialType: string]: {
|
|
1455
|
+
[id: string]: ICredentialsEncrypted;
|
|
1456
|
+
};
|
|
1457
|
+
}
|
|
1458
|
+
export interface IWorkflowExecuteHooks {
|
|
1459
|
+
[key: string]: Array<(...args: never[]) => Promise<void>> | undefined;
|
|
1460
|
+
nodeExecuteAfter?: Array<(nodeName: string, data: ITaskData, executionData: IRunExecutionData) => Promise<void>>;
|
|
1461
|
+
nodeExecuteBefore?: Array<(nodeName: string) => Promise<void>>;
|
|
1462
|
+
workflowExecuteAfter?: Array<(data: IRun, newStaticData: IDataObject) => Promise<void>>;
|
|
1463
|
+
workflowExecuteBefore?: Array<(workflow: Workflow, data: IRunExecutionData) => Promise<void>>;
|
|
1464
|
+
sendResponse?: Array<(response: IExecuteResponsePromiseData) => Promise<void>>;
|
|
1465
|
+
}
|
|
1466
|
+
export interface IWorkflowExecuteAdditionalData {
|
|
1467
|
+
credentialsHelper: ICredentialsHelper;
|
|
1468
|
+
encryptionKey: string;
|
|
1469
|
+
executeWorkflow: (workflowInfo: IExecuteWorkflowInfo, additionalData: IWorkflowExecuteAdditionalData, inputData?: INodeExecutionData[], parentExecutionId?: string, loadedWorkflowData?: IWorkflowBase, loadedRunData?: unknown) => Promise<unknown>;
|
|
1470
|
+
executionId?: string;
|
|
1471
|
+
hooks?: WorkflowHooks;
|
|
1472
|
+
httpResponse?: express.Response;
|
|
1473
|
+
httpRequest?: express.Request;
|
|
1474
|
+
restApiUrl: string;
|
|
1475
|
+
sendMessageToUI?: (source: string, message: unknown) => void;
|
|
1476
|
+
timezone: string;
|
|
1477
|
+
webhookBaseUrl: string;
|
|
1478
|
+
webhookWaitingBaseUrl: string;
|
|
1479
|
+
webhookTestBaseUrl: string;
|
|
1480
|
+
currentNodeParameters?: INodeParameters;
|
|
1481
|
+
executionTimeoutTimestamp?: number;
|
|
1482
|
+
userId: string;
|
|
1483
|
+
}
|
|
1484
|
+
export type WorkflowExecuteMode = "cli" | "error" | "integrated" | "internal" | "manual" | "retry" | "trigger" | "webhook";
|
|
1485
|
+
export type WorkflowActivateMode = "init" | "create" | "update" | "activate" | "manual";
|
|
1486
|
+
export interface IWorkflowHooksOptionalParameters {
|
|
1487
|
+
parentProcessMode?: string;
|
|
1488
|
+
retryOf?: string;
|
|
1489
|
+
sessionId?: string;
|
|
1490
|
+
}
|
|
1491
|
+
export interface IWorkflowSettings {
|
|
1492
|
+
[key: string]: IDataObject | string | number | boolean | undefined;
|
|
1493
|
+
}
|
|
1494
|
+
export type LogTypes = "debug" | "verbose" | "info" | "warn" | "error";
|
|
1495
|
+
export interface ILogger {
|
|
1496
|
+
log: (type: LogTypes, message: string, meta?: object) => void;
|
|
1497
|
+
debug: (message: string, meta?: object) => void;
|
|
1498
|
+
verbose: (message: string, meta?: object) => void;
|
|
1499
|
+
info: (message: string, meta?: object) => void;
|
|
1500
|
+
warn: (message: string, meta?: object) => void;
|
|
1501
|
+
error: (message: string, meta?: object) => void;
|
|
1502
|
+
}
|
|
1503
|
+
export interface IStatusCodeMessages {
|
|
1504
|
+
[key: string]: string;
|
|
1505
|
+
}
|
|
1506
|
+
export interface INodeInputFilter {
|
|
1507
|
+
nodes: string[];
|
|
1508
|
+
}
|
|
1509
|
+
export interface INodeInputConfiguration {
|
|
1510
|
+
category?: string;
|
|
1511
|
+
displayName?: string;
|
|
1512
|
+
required?: boolean;
|
|
1513
|
+
type: NodeConnectionType;
|
|
1514
|
+
filter?: INodeInputFilter;
|
|
1515
|
+
maxConnections?: number;
|
|
1516
|
+
}
|
|
1517
|
+
export interface INodeOutputConfiguration {
|
|
1518
|
+
category?: "error";
|
|
1519
|
+
displayName?: string;
|
|
1520
|
+
maxConnections?: number;
|
|
1521
|
+
required?: boolean;
|
|
1522
|
+
type: NodeConnectionType;
|
|
1523
|
+
}
|
|
1524
|
+
export type NodeLoadingDetails = LoadingDetails;
|
|
1525
|
+
export type LoadingDetails = {
|
|
1526
|
+
className: string;
|
|
1527
|
+
sourcePath: string;
|
|
1528
|
+
};
|
|
1529
|
+
export type CredentialLoadingDetails = LoadingDetails & {
|
|
1530
|
+
supportedNodes?: string[];
|
|
1531
|
+
extends?: string[];
|
|
1532
|
+
};
|
|
1533
|
+
export type DocumentationLink = {
|
|
1534
|
+
url: string;
|
|
1535
|
+
};
|
|
1536
|
+
export type KnownNodesAndCredentials = {
|
|
1537
|
+
nodes: Record<string, NodeLoadingDetails>;
|
|
1538
|
+
credentials: Record<string, CredentialLoadingDetails>;
|
|
1539
|
+
};
|
|
1540
|
+
export type CodexData = {
|
|
1541
|
+
categories?: string[];
|
|
1542
|
+
subcategories?: {
|
|
1543
|
+
[category: string]: string[];
|
|
1544
|
+
};
|
|
1545
|
+
resources?: {
|
|
1546
|
+
credentialDocumentation?: DocumentationLink[];
|
|
1547
|
+
primaryDocumentation?: DocumentationLink[];
|
|
1548
|
+
};
|
|
1549
|
+
alias?: string[];
|
|
1550
|
+
};
|
|
1551
|
+
export type JsonValue = string | number | boolean | null | JsonObject | JsonValue[];
|
|
1552
|
+
export type JsonObject = {
|
|
1553
|
+
[key: string]: JsonValue;
|
|
1554
|
+
};
|
|
1555
|
+
export type AllEntities<M> = M extends {
|
|
1556
|
+
[key: string]: string;
|
|
1557
|
+
} ? Entity<M, keyof M> : never;
|
|
1558
|
+
export type Entity<M, K> = K extends keyof M ? {
|
|
1559
|
+
resource: K;
|
|
1560
|
+
operation: M[K];
|
|
1561
|
+
} : never;
|
|
1562
|
+
export type PropertiesOf<M extends {
|
|
1563
|
+
resource: string;
|
|
1564
|
+
operation: string;
|
|
1565
|
+
}> = Array<Omit<INodeProperties, "displayOptions"> & {
|
|
1566
|
+
displayOptions?: {
|
|
1567
|
+
[key in "show" | "hide"]?: {
|
|
1568
|
+
resource?: Array<M["resource"]>;
|
|
1569
|
+
operation?: Array<M["operation"]>;
|
|
1570
|
+
[otherKey: string]: NodeParameterValue[] | undefined;
|
|
1571
|
+
};
|
|
1572
|
+
};
|
|
1573
|
+
}>;
|
|
1574
|
+
export interface INodesGraph {
|
|
1575
|
+
node_types: string[];
|
|
1576
|
+
node_connections: IDataObject[];
|
|
1577
|
+
nodes: INodesGraphNode;
|
|
1578
|
+
}
|
|
1579
|
+
export interface INodesGraphNode {
|
|
1580
|
+
[key: string]: INodeGraphItem;
|
|
1581
|
+
}
|
|
1582
|
+
export interface INodeGraphItem {
|
|
1583
|
+
type: string;
|
|
1584
|
+
resource?: string;
|
|
1585
|
+
operation?: string;
|
|
1586
|
+
domain?: string;
|
|
1587
|
+
position: [number, number];
|
|
1588
|
+
mode?: string;
|
|
1589
|
+
}
|
|
1590
|
+
export interface INodeNameIndex {
|
|
1591
|
+
[name: string]: string;
|
|
1592
|
+
}
|
|
1593
|
+
export interface INodesGraphResult {
|
|
1594
|
+
nodeGraph: INodesGraph;
|
|
1595
|
+
nameIndices: INodeNameIndex;
|
|
1596
|
+
}
|
|
1597
|
+
export interface ITelemetryClientConfig {
|
|
1598
|
+
url: string;
|
|
1599
|
+
key: string;
|
|
1600
|
+
}
|
|
1601
|
+
export interface ITelemetrySettings {
|
|
1602
|
+
enabled: boolean;
|
|
1603
|
+
config?: ITelemetryClientConfig;
|
|
1604
|
+
}
|
|
1605
|
+
export interface ISourceData {
|
|
1606
|
+
previousNode: string;
|
|
1607
|
+
previousNodeOutput?: number;
|
|
1608
|
+
previousNodeRun?: number;
|
|
1609
|
+
}
|
|
1610
|
+
export interface IPairedItemData {
|
|
1611
|
+
item: number;
|
|
1612
|
+
input?: number;
|
|
1613
|
+
sourceOverwrite?: ISourceData;
|
|
1614
|
+
}
|
|
1615
|
+
export type CloseFunction = () => Promise<void>;
|
|
1616
|
+
export interface SupplyData {
|
|
1617
|
+
metadata?: IDataObject;
|
|
1618
|
+
response: unknown;
|
|
1619
|
+
closeFunction?: CloseFunction;
|
|
1620
|
+
}
|
|
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";
|
|
1622
|
+
export {};
|
|
1623
|
+
//# sourceMappingURL=Interfaces.d.ts.map
|