@fsai-flow/core 0.0.1

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.
Files changed (113) hide show
  1. package/README.md +11 -0
  2. package/dist/README.md +11 -0
  3. package/dist/package.json +44 -0
  4. package/dist/src/index.d.ts +15 -0
  5. package/dist/src/index.js +29 -0
  6. package/dist/src/index.js.map +1 -0
  7. package/dist/src/lib/ActiveWebhooks.d.ts +59 -0
  8. package/dist/src/lib/ActiveWebhooks.js +184 -0
  9. package/dist/src/lib/ActiveWebhooks.js.map +1 -0
  10. package/dist/src/lib/ActiveWorkflows.d.ts +58 -0
  11. package/dist/src/lib/ActiveWorkflows.js +244 -0
  12. package/dist/src/lib/ActiveWorkflows.js.map +1 -0
  13. package/dist/src/lib/BinaryDataManager/FileSystem.d.ts +26 -0
  14. package/dist/src/lib/BinaryDataManager/FileSystem.js +179 -0
  15. package/dist/src/lib/BinaryDataManager/FileSystem.js.map +1 -0
  16. package/dist/src/lib/BinaryDataManager/index.d.ts +21 -0
  17. package/dist/src/lib/BinaryDataManager/index.js +146 -0
  18. package/dist/src/lib/BinaryDataManager/index.js.map +1 -0
  19. package/dist/src/lib/ChangeCase.d.ts +9 -0
  20. package/dist/src/lib/ChangeCase.js +43 -0
  21. package/dist/src/lib/ChangeCase.js.map +1 -0
  22. package/dist/src/lib/Constants.d.ts +14 -0
  23. package/dist/src/lib/Constants.js +19 -0
  24. package/dist/src/lib/Constants.js.map +1 -0
  25. package/dist/src/lib/Credentials.d.ts +27 -0
  26. package/dist/src/lib/Credentials.js +89 -0
  27. package/dist/src/lib/Credentials.js.map +1 -0
  28. package/dist/src/lib/FileSystem.d.ts +26 -0
  29. package/dist/src/lib/FileSystem.js +179 -0
  30. package/dist/src/lib/FileSystem.js.map +1 -0
  31. package/dist/src/lib/InputConnectionDataLegacy.d.ts +2 -0
  32. package/dist/src/lib/InputConnectionDataLegacy.js +79 -0
  33. package/dist/src/lib/InputConnectionDataLegacy.js.map +1 -0
  34. package/dist/src/lib/Interfaces.d.ts +148 -0
  35. package/dist/src/lib/Interfaces.js +3 -0
  36. package/dist/src/lib/Interfaces.js.map +1 -0
  37. package/dist/src/lib/LoadNodeParameterOptions.d.ts +39 -0
  38. package/dist/src/lib/LoadNodeParameterOptions.js +150 -0
  39. package/dist/src/lib/LoadNodeParameterOptions.js.map +1 -0
  40. package/dist/src/lib/NodeExecuteFunctions.d.ts +226 -0
  41. package/dist/src/lib/NodeExecuteFunctions.js +2483 -0
  42. package/dist/src/lib/NodeExecuteFunctions.js.map +1 -0
  43. package/dist/src/lib/NodesLoader/constants.d.ts +5 -0
  44. package/dist/src/lib/NodesLoader/constants.js +106 -0
  45. package/dist/src/lib/NodesLoader/constants.js.map +1 -0
  46. package/dist/src/lib/NodesLoader/custom-directory-loader.d.ts +9 -0
  47. package/dist/src/lib/NodesLoader/custom-directory-loader.js +36 -0
  48. package/dist/src/lib/NodesLoader/custom-directory-loader.js.map +1 -0
  49. package/dist/src/lib/NodesLoader/directory-loader.d.ts +66 -0
  50. package/dist/src/lib/NodesLoader/directory-loader.js +325 -0
  51. package/dist/src/lib/NodesLoader/directory-loader.js.map +1 -0
  52. package/dist/src/lib/NodesLoader/index.d.ts +5 -0
  53. package/dist/src/lib/NodesLoader/index.js +12 -0
  54. package/dist/src/lib/NodesLoader/index.js.map +1 -0
  55. package/dist/src/lib/NodesLoader/lazy-package-directory-loader.d.ts +7 -0
  56. package/dist/src/lib/NodesLoader/lazy-package-directory-loader.js +52 -0
  57. package/dist/src/lib/NodesLoader/lazy-package-directory-loader.js.map +1 -0
  58. package/dist/src/lib/NodesLoader/load-class-in-isolation.d.ts +1 -0
  59. package/dist/src/lib/NodesLoader/load-class-in-isolation.js +22 -0
  60. package/dist/src/lib/NodesLoader/load-class-in-isolation.js.map +1 -0
  61. package/dist/src/lib/NodesLoader/package-directory-loader.d.ts +17 -0
  62. package/dist/src/lib/NodesLoader/package-directory-loader.js +100 -0
  63. package/dist/src/lib/NodesLoader/package-directory-loader.js.map +1 -0
  64. package/dist/src/lib/NodesLoader/types.d.ts +14 -0
  65. package/dist/src/lib/NodesLoader/types.js +3 -0
  66. package/dist/src/lib/NodesLoader/types.js.map +1 -0
  67. package/dist/src/lib/UserSettings.d.ts +80 -0
  68. package/dist/src/lib/UserSettings.js +261 -0
  69. package/dist/src/lib/UserSettings.js.map +1 -0
  70. package/dist/src/lib/WorkflowExecute.d.ts +53 -0
  71. package/dist/src/lib/WorkflowExecute.js +835 -0
  72. package/dist/src/lib/WorkflowExecute.js.map +1 -0
  73. package/dist/src/lib/index.d.ts +21 -0
  74. package/dist/src/lib/index.js +146 -0
  75. package/dist/src/lib/index.js.map +1 -0
  76. package/dist/src/utils/crypto.d.ts +1 -0
  77. package/dist/src/utils/crypto.js +8 -0
  78. package/dist/src/utils/crypto.js.map +1 -0
  79. package/eslint.config.js +19 -0
  80. package/jest.config.ts +10 -0
  81. package/package.json +44 -0
  82. package/project.json +19 -0
  83. package/src/index.ts +27 -0
  84. package/src/lib/ActiveWebhooks.ts +245 -0
  85. package/src/lib/ActiveWorkflows.ts +304 -0
  86. package/src/lib/BinaryDataManager/FileSystem.ts +214 -0
  87. package/src/lib/BinaryDataManager/index.ts +187 -0
  88. package/src/lib/ChangeCase.ts +45 -0
  89. package/src/lib/Constants.ts +16 -0
  90. package/src/lib/Credentials.ts +108 -0
  91. package/src/lib/FileSystem.ts +214 -0
  92. package/src/lib/InputConnectionDataLegacy.ts +123 -0
  93. package/src/lib/Interfaces.ts +338 -0
  94. package/src/lib/LoadNodeParameterOptions.ts +235 -0
  95. package/src/lib/NodeExecuteFunctions.ts +3704 -0
  96. package/src/lib/NodesLoader/constants.ts +112 -0
  97. package/src/lib/NodesLoader/custom-directory-loader.ts +31 -0
  98. package/src/lib/NodesLoader/directory-loader.ts +458 -0
  99. package/src/lib/NodesLoader/index.ts +5 -0
  100. package/src/lib/NodesLoader/lazy-package-directory-loader.ts +55 -0
  101. package/src/lib/NodesLoader/load-class-in-isolation.ts +19 -0
  102. package/src/lib/NodesLoader/package-directory-loader.ts +107 -0
  103. package/src/lib/NodesLoader/types.ts +14 -0
  104. package/src/lib/UserSettings.ts +292 -0
  105. package/src/lib/WorkflowExecute.ts +1108 -0
  106. package/src/lib/index.ts +187 -0
  107. package/src/utils/crypto.ts +5 -0
  108. package/tests/Credentials.test.ts +88 -0
  109. package/tests/Helpers.ts +808 -0
  110. package/tests/WorkflowExecute.test.ts +1242 -0
  111. package/tsconfig.json +42 -0
  112. package/tsconfig.lib.json +10 -0
  113. package/tsconfig.spec.json +14 -0
@@ -0,0 +1,148 @@
1
+ import { IAdditionalCredentialOptions, IAllExecuteFunctions, IBinaryData, ICredentialTestFunctions as ICredentialTestFunctionsBase, ICredentialType, IDataObject, IExecuteFunctions as IExecuteFunctionsBase, IExecuteSingleFunctions as IExecuteSingleFunctionsBase, IHookFunctions as IHookFunctionsBase, IHttpRequestOptions, ILoadOptionsFunctions as ILoadOptionsFunctionsBase, INodeExecutionData, INodeType, IOAuth2Options, IPollFunctions as IPollFunctionsBase, IPollResponse, ITriggerFunctions as ITriggerFunctionsBase, ITriggerResponse, IWebhookFunctions as IWebhookFunctionsBase, IWorkflowSettings as IWorkflowSettingsWorkflow } from '@fsai-flow/workflow';
2
+ import { OptionsWithUri, OptionsWithUrl } from 'request';
3
+ import * as requestPromise from 'request-promise-native';
4
+ interface Constructable<T> {
5
+ new (): T;
6
+ }
7
+ export interface IProcessMessage {
8
+ data?: any;
9
+ type: string;
10
+ }
11
+ export type Class<T = object, A extends unknown[] = unknown[]> = new (...args: A) => T;
12
+ export interface IExecuteFunctions extends IExecuteFunctionsBase {
13
+ helpers: {
14
+ httpRequest(requestOptions: IHttpRequestOptions): Promise<any>;
15
+ prepareBinaryData(binaryData: Buffer, filePath?: string, mimeType?: string): Promise<IBinaryData>;
16
+ assertBinaryData(itemIndex: number, propertyName: string, inputIndex?: number): IBinaryData;
17
+ getBinaryDataBuffer(itemIndex: number, propertyName: string, inputIndex?: number): Promise<Buffer>;
18
+ request: (uriOrObject: string | IDataObject | any, options?: IDataObject) => Promise<any>;
19
+ requestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUri | requestPromise.RequestPromiseOptions, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<any>;
20
+ requestOAuth2(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUri | requestPromise.RequestPromiseOptions, oAuth2Options?: IOAuth2Options): Promise<any>;
21
+ requestOAuth1(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUrl | requestPromise.RequestPromiseOptions): Promise<any>;
22
+ returnJsonArray(jsonData: IDataObject | IDataObject[]): INodeExecutionData[];
23
+ normalizeItems(items: INodeExecutionData | INodeExecutionData[]): INodeExecutionData[];
24
+ httpRequestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: IHttpRequestOptions): Promise<any>;
25
+ };
26
+ }
27
+ export interface IExecuteSingleFunctions extends IExecuteSingleFunctionsBase {
28
+ helpers: {
29
+ httpRequest(requestOptions: IHttpRequestOptions): Promise<any>;
30
+ prepareBinaryData(binaryData: Buffer, filePath?: string, mimeType?: string): Promise<IBinaryData>;
31
+ request: (uriOrObject: string | IDataObject | any, options?: IDataObject) => Promise<any>;
32
+ requestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUri | requestPromise.RequestPromiseOptions, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<any>;
33
+ requestOAuth2(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUri | requestPromise.RequestPromiseOptions, oAuth2Options?: IOAuth2Options): Promise<any>;
34
+ requestOAuth1(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUrl | requestPromise.RequestPromiseOptions): Promise<any>;
35
+ httpRequestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: IHttpRequestOptions): Promise<any>;
36
+ };
37
+ }
38
+ export interface IPollFunctions extends IPollFunctionsBase {
39
+ helpers: {
40
+ httpRequest(requestOptions: IHttpRequestOptions): Promise<any>;
41
+ prepareBinaryData(binaryData: Buffer, filePath?: string, mimeType?: string): Promise<IBinaryData>;
42
+ request: (uriOrObject: string | IDataObject | any, options?: IDataObject) => Promise<any>;
43
+ requestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUri | requestPromise.RequestPromiseOptions, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<any>;
44
+ requestOAuth2(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUri | requestPromise.RequestPromiseOptions, oAuth2Options?: IOAuth2Options): Promise<any>;
45
+ requestOAuth1(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUrl | requestPromise.RequestPromiseOptions): Promise<any>;
46
+ returnJsonArray(jsonData: IDataObject | IDataObject[]): INodeExecutionData[];
47
+ httpRequestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: IHttpRequestOptions): Promise<any>;
48
+ };
49
+ }
50
+ export interface IResponseError extends Error {
51
+ statusCode?: number;
52
+ }
53
+ export interface ITriggerFunctions extends ITriggerFunctionsBase {
54
+ helpers: {
55
+ httpRequest(requestOptions: IHttpRequestOptions): Promise<any>;
56
+ prepareBinaryData(binaryData: Buffer, filePath?: string, mimeType?: string): Promise<IBinaryData>;
57
+ request: (uriOrObject: string | IDataObject | any, options?: IDataObject) => Promise<any>;
58
+ requestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUri | requestPromise.RequestPromiseOptions, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<any>;
59
+ requestOAuth2(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUri | requestPromise.RequestPromiseOptions, oAuth2Options?: IOAuth2Options): Promise<any>;
60
+ requestOAuth1(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUrl | requestPromise.RequestPromiseOptions): Promise<any>;
61
+ returnJsonArray(jsonData: IDataObject | IDataObject[]): INodeExecutionData[];
62
+ httpRequestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: IHttpRequestOptions): Promise<any>;
63
+ };
64
+ }
65
+ export interface ITriggerTime {
66
+ mode: string;
67
+ hour: number;
68
+ minute: number;
69
+ dayOfMonth: number;
70
+ weekeday: number;
71
+ [key: string]: string | number;
72
+ }
73
+ export interface IUserSettings {
74
+ encryptionKey?: string;
75
+ tunnelSubdomain?: string;
76
+ instanceId?: string;
77
+ }
78
+ export interface ILoadOptionsFunctions extends ILoadOptionsFunctionsBase {
79
+ helpers: {
80
+ httpRequest(requestOptions: IHttpRequestOptions): Promise<any>;
81
+ request?: (uriOrObject: string | IDataObject | any, options?: IDataObject) => Promise<any>;
82
+ requestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUri | requestPromise.RequestPromiseOptions, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<any>;
83
+ requestOAuth2?: (this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUri | requestPromise.RequestPromiseOptions, oAuth2Options?: IOAuth2Options) => Promise<any>;
84
+ requestOAuth1?(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUrl | requestPromise.RequestPromiseOptions): Promise<any>;
85
+ httpRequestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: IHttpRequestOptions): Promise<any>;
86
+ };
87
+ }
88
+ export interface ICredentialTestFunctions extends ICredentialTestFunctionsBase {
89
+ helpers: {
90
+ request?: (uriOrObject: string | IDataObject | any, options?: IDataObject) => Promise<any>;
91
+ };
92
+ }
93
+ export interface IHookFunctions extends IHookFunctionsBase {
94
+ helpers: {
95
+ httpRequest(requestOptions: IHttpRequestOptions): Promise<any>;
96
+ request: (uriOrObject: string | IDataObject | any, options?: IDataObject) => Promise<any>;
97
+ requestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUri | requestPromise.RequestPromiseOptions, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<any>;
98
+ requestOAuth2(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUri | requestPromise.RequestPromiseOptions, oAuth2Options?: IOAuth2Options): Promise<any>;
99
+ requestOAuth1(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUrl | requestPromise.RequestPromiseOptions): Promise<any>;
100
+ httpRequestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: IHttpRequestOptions): Promise<any>;
101
+ };
102
+ }
103
+ export interface IWebhookFunctions extends IWebhookFunctionsBase {
104
+ helpers: {
105
+ httpRequest(requestOptions: IHttpRequestOptions): Promise<any>;
106
+ prepareBinaryData(binaryData: Buffer, filePath?: string, mimeType?: string): Promise<IBinaryData>;
107
+ request: (uriOrObject: string | IDataObject | any, options?: IDataObject) => Promise<any>;
108
+ requestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUri | requestPromise.RequestPromiseOptions, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<any>;
109
+ requestOAuth2(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUri | requestPromise.RequestPromiseOptions, oAuth2Options?: IOAuth2Options): Promise<any>;
110
+ requestOAuth1(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUrl | requestPromise.RequestPromiseOptions): Promise<any>;
111
+ returnJsonArray(jsonData: IDataObject | IDataObject[]): INodeExecutionData[];
112
+ httpRequestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: IHttpRequestOptions): Promise<any>;
113
+ };
114
+ }
115
+ export interface IWorkflowSettings extends IWorkflowSettingsWorkflow {
116
+ errorWorkflow?: string;
117
+ timezone?: string;
118
+ saveManualRuns?: boolean;
119
+ }
120
+ export interface INodeDefinitionFile {
121
+ [key: string]: Constructable<INodeType | ICredentialType>;
122
+ }
123
+ export interface INodeInputDataConnections {
124
+ [key: string]: INodeExecutionData[][];
125
+ }
126
+ export interface IWorkflowData {
127
+ pollResponses?: IPollResponse[];
128
+ triggerResponses?: ITriggerResponse[];
129
+ }
130
+ export interface IBinaryDataConfig {
131
+ mode: 'default' | 'filesystem';
132
+ availableModes: string;
133
+ localStoragePath: string;
134
+ binaryDataTTL: number;
135
+ persistedBinaryDataTTL: number;
136
+ }
137
+ export interface IBinaryDataManager {
138
+ init(startPurger: boolean): Promise<void>;
139
+ storeBinaryData(binaryBuffer: Buffer, executionId: string): Promise<string>;
140
+ retrieveBinaryDataByIdentifier(identifier: string): Promise<Buffer>;
141
+ markDataForDeletionByExecutionId(executionId: string): Promise<void>;
142
+ deleteMarkedFiles(): Promise<unknown>;
143
+ deleteBinaryDataByIdentifier(identifier: string): Promise<void>;
144
+ duplicateBinaryDataByIdentifier(binaryDataId: string, prefix: string): Promise<string>;
145
+ deleteBinaryDataByExecutionId(executionId: string): Promise<void>;
146
+ persistBinaryDataForExecutionId(executionId: string): Promise<void>;
147
+ }
148
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Interfaces.js","sourceRoot":"","sources":["../../../src/lib/Interfaces.ts"],"names":[],"mappings":""}
@@ -0,0 +1,39 @@
1
+ import { ILoadOptions, INode, INodeCredentials, INodeParameters, INodePropertyOptions, INodeTypeNameVersion, INodeTypes, IWorkflowExecuteAdditionalData, Workflow } from '@fsai-flow/workflow';
2
+ export declare class LoadNodeParameterOptions {
3
+ currentNodeParameters: INodeParameters;
4
+ path: string;
5
+ workflow: Workflow;
6
+ constructor(nodeTypeNameAndVersion: INodeTypeNameVersion, nodeTypes: INodeTypes, path: string, currentNodeParameters: INodeParameters, credentials?: INodeCredentials);
7
+ /**
8
+ * Returns data of a fake workflow
9
+ *
10
+ * @returns
11
+ * @memberof LoadNodeParameterOptions
12
+ */
13
+ getWorkflowData(): {
14
+ name: string;
15
+ active: boolean;
16
+ connections: {};
17
+ nodes: INode[];
18
+ createdAt: Date;
19
+ updatedAt: Date;
20
+ };
21
+ /**
22
+ * Returns the available options via a predefined method
23
+ *
24
+ * @param {string} methodName The name of the method of which to get the data from
25
+ * @param {IWorkflowExecuteAdditionalData} additionalData
26
+ * @returns {Promise<INodePropertyOptions[]>}
27
+ * @memberof LoadNodeParameterOptions
28
+ */
29
+ getOptionsViaMethodName(methodName: string, additionalData: IWorkflowExecuteAdditionalData): Promise<INodePropertyOptions[]>;
30
+ /**
31
+ * Returns the available options via a load request informatoin
32
+ *
33
+ * @param {ILoadOptions} loadOptions The load options which also contain the request information
34
+ * @param {IWorkflowExecuteAdditionalData} additionalData
35
+ * @returns {Promise<INodePropertyOptions[]>}
36
+ * @memberof LoadNodeParameterOptions
37
+ */
38
+ getOptionsViaRequestProperty(loadOptions: ILoadOptions, additionalData: IWorkflowExecuteAdditionalData): Promise<INodePropertyOptions[]>;
39
+ }
@@ -0,0 +1,150 @@
1
+ "use strict";
2
+ /* eslint-disable no-restricted-syntax */
3
+ /* eslint-disable @typescript-eslint/no-unsafe-return */
4
+ /* eslint-disable @typescript-eslint/no-unsafe-member-access */
5
+ /* eslint-disable @typescript-eslint/restrict-template-expressions */
6
+ /* eslint-disable @typescript-eslint/no-unsafe-call */
7
+ /* eslint-disable @typescript-eslint/no-unsafe-assignment */
8
+ /* eslint-disable @typescript-eslint/no-non-null-assertion */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.LoadNodeParameterOptions = void 0;
11
+ const tslib_1 = require("tslib");
12
+ const workflow_1 = require("@fsai-flow/workflow");
13
+ // eslint-disable-next-line import/no-cycle
14
+ const src_1 = require("../../src");
15
+ const TEMP_NODE_NAME = 'Temp-Node';
16
+ const TEMP_WORKFLOW_NAME = 'Temp-Workflow';
17
+ class LoadNodeParameterOptions {
18
+ constructor(nodeTypeNameAndVersion, nodeTypes, path, currentNodeParameters, credentials) {
19
+ const nodeType = nodeTypes.getByNameAndVersion(nodeTypeNameAndVersion.name, nodeTypeNameAndVersion.version);
20
+ this.currentNodeParameters = currentNodeParameters;
21
+ this.path = path;
22
+ if (nodeType === undefined) {
23
+ throw new Error(`The node-type "${nodeTypeNameAndVersion.name} v${nodeTypeNameAndVersion.version}" is not known!`);
24
+ }
25
+ const nodeData = {
26
+ parameters: currentNodeParameters,
27
+ name: TEMP_NODE_NAME,
28
+ type: nodeTypeNameAndVersion.name,
29
+ typeVersion: nodeTypeNameAndVersion.version,
30
+ position: [0, 0],
31
+ id: '',
32
+ };
33
+ if (credentials) {
34
+ nodeData.credentials = credentials;
35
+ }
36
+ const workflowData = {
37
+ nodes: [nodeData],
38
+ connections: {},
39
+ };
40
+ this.workflow = new workflow_1.Workflow({
41
+ nodes: workflowData.nodes,
42
+ connections: workflowData.connections,
43
+ active: false,
44
+ nodeTypes,
45
+ });
46
+ }
47
+ /**
48
+ * Returns data of a fake workflow
49
+ *
50
+ * @returns
51
+ * @memberof LoadNodeParameterOptions
52
+ */
53
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
54
+ getWorkflowData() {
55
+ return {
56
+ name: TEMP_WORKFLOW_NAME,
57
+ active: false,
58
+ connections: {},
59
+ nodes: Object.values(this.workflow.nodes),
60
+ createdAt: new Date(),
61
+ updatedAt: new Date(),
62
+ };
63
+ }
64
+ /**
65
+ * Returns the available options via a predefined method
66
+ *
67
+ * @param {string} methodName The name of the method of which to get the data from
68
+ * @param {IWorkflowExecuteAdditionalData} additionalData
69
+ * @returns {Promise<INodePropertyOptions[]>}
70
+ * @memberof LoadNodeParameterOptions
71
+ */
72
+ getOptionsViaMethodName(methodName, additionalData) {
73
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
74
+ const node = this.workflow.getNode(TEMP_NODE_NAME);
75
+ const nodeType = this.workflow.nodeTypes.getByNameAndVersion(node.type, node === null || node === void 0 ? void 0 : node.typeVersion);
76
+ if (!nodeType ||
77
+ nodeType.methods === undefined ||
78
+ nodeType.methods.loadOptions === undefined ||
79
+ nodeType.methods.loadOptions[methodName] === undefined) {
80
+ throw new Error(`The node-type "${node.type}" does not have the method "${methodName}" defined!`);
81
+ }
82
+ const thisArgs = src_1.NodeExecuteFunctions.getLoadOptionsFunctions(this.workflow, node, this.path, additionalData);
83
+ try {
84
+ return yield nodeType.methods.loadOptions[methodName].call(thisArgs);
85
+ }
86
+ catch (error) {
87
+ return [{
88
+ name: 'Error trying to load options',
89
+ value: '',
90
+ description: error.message || 'Error trying to load options.'
91
+ }];
92
+ }
93
+ });
94
+ }
95
+ /**
96
+ * Returns the available options via a load request informatoin
97
+ *
98
+ * @param {ILoadOptions} loadOptions The load options which also contain the request information
99
+ * @param {IWorkflowExecuteAdditionalData} additionalData
100
+ * @returns {Promise<INodePropertyOptions[]>}
101
+ * @memberof LoadNodeParameterOptions
102
+ */
103
+ getOptionsViaRequestProperty(loadOptions, additionalData) {
104
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
105
+ const node = this.workflow.getNode(TEMP_NODE_NAME);
106
+ const nodeType = this.workflow.nodeTypes.getByNameAndVersion(node.type, node === null || node === void 0 ? void 0 : node.typeVersion);
107
+ if (nodeType === undefined ||
108
+ !nodeType.description.requestDefaults ||
109
+ !nodeType.description.requestDefaults.baseURL) {
110
+ // This in in here for now for security reasons.
111
+ // Background: As the full data for the request to make does get send, and the auth data
112
+ // will then be applied, would it be possible to retrieve that data like that. By at least
113
+ // requiring a baseURL to be defined can at least not a random server be called.
114
+ // In the future this code has to get improved that it does not use the request information from
115
+ // the request rather resolves it via the parameter-path and nodeType data.
116
+ throw new Error(`The node-type "${node.type}" does not exist or does not have "requestDefaults.baseURL" defined!`);
117
+ }
118
+ const mode = 'internal';
119
+ const runIndex = 0;
120
+ const connectionInputData = [];
121
+ const runExecutionData = { resultData: { runData: {} } };
122
+ const routingNode = new workflow_1.RoutingNode(this.workflow, node, connectionInputData, runExecutionData !== null && runExecutionData !== void 0 ? runExecutionData : null, additionalData, mode);
123
+ // Create copy of node-type with the single property we want to get the data off
124
+ const tempNode = Object.assign(Object.assign({}, nodeType), {
125
+ description: Object.assign(Object.assign({}, nodeType.description), { properties: [
126
+ {
127
+ displayName: '',
128
+ type: 'string',
129
+ name: '',
130
+ default: '',
131
+ routing: loadOptions.routing,
132
+ },
133
+ ] }),
134
+ });
135
+ const inputData = {
136
+ main: [[{ json: {} }]],
137
+ };
138
+ const optionsData = yield routingNode.runNode(inputData, runIndex, tempNode, src_1.NodeExecuteFunctions);
139
+ if ((optionsData === null || optionsData === void 0 ? void 0 : optionsData.length) === 0) {
140
+ return [];
141
+ }
142
+ if (!Array.isArray(optionsData)) {
143
+ throw new Error('The returned data is not an array!');
144
+ }
145
+ return optionsData[0].map((item) => item.json);
146
+ });
147
+ }
148
+ }
149
+ exports.LoadNodeParameterOptions = LoadNodeParameterOptions;
150
+ //# sourceMappingURL=LoadNodeParameterOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadNodeParameterOptions.js","sourceRoot":"","sources":["../../../src/lib/LoadNodeParameterOptions.ts"],"names":[],"mappings":";AAAA,yCAAyC;AACzC,wDAAwD;AACxD,+DAA+D;AAC/D,qEAAqE;AACrE,sDAAsD;AACtD,4DAA4D;AAC5D,6DAA6D;;;;AAE7D,kDAgB6B;AAE7B,2CAA2C;AAC3C,mCAAiD;AAEjD,MAAM,cAAc,GAAG,WAAW,CAAC;AACnC,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAE3C,MAAa,wBAAwB;IAOpC,YACC,sBAA4C,EAC5C,SAAqB,EACrB,IAAY,EACZ,qBAAsC,EACtC,WAA8B;QAE9B,MAAM,QAAQ,GAAG,SAAS,CAAC,mBAAmB,CAC7C,sBAAsB,CAAC,IAAI,EAC3B,sBAAsB,CAAC,OAAO,CAC9B,CAAC;QACF,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;QACnD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,QAAQ,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gBAC/B,OAAO,EAAE,CAAC;YACX,CAAC;YAED,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;gBACjC,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;YACvD,CAAC;YAED,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAsC,CAAC;QACrF,CAAC;KAAA;CACD;AA1MD,4DA0MC"}
@@ -0,0 +1,226 @@
1
+ import { IAdditionalCredentialOptions, IAllExecuteFunctions, IBinaryData, ICredentialDataDecryptedObject, IDataObject, IExecuteFunctions, IExecuteSingleFunctions, IHttpRequestOptions, INode, INodeExecutionData, INodeParameters, INodeType, IOAuth2Options, IPollFunctions, IRunExecutionData, ITaskDataConnections, ITriggerFunctions, IWebhookData, IWebhookDescription, IWebhookFunctions, IWorkflowDataProxyAdditionalKeys, IWorkflowExecuteAdditionalData, IWorkflowMetadata, NodeParameterValue, Workflow, WorkflowActivateMode, WorkflowExecuteMode, ISupplyDataFunctions, NodeConnectionType, CloseFunction } from '@fsai-flow/workflow';
2
+ import { OptionsWithUri, OptionsWithUrl } from 'request';
3
+ import * as requestPromise from 'request-promise-native';
4
+ import { ICredentialTestFunctions, IHookFunctions, ILoadOptionsFunctions } from '../../src';
5
+ /**
6
+ * Returns binary data buffer for given item index and property name.
7
+ *
8
+ * @export
9
+ * @param {ITaskDataConnections} inputData
10
+ * @param {number} itemIndex
11
+ * @param {string} propertyName
12
+ * @param {number} inputIndex
13
+ * @returns {Promise<Buffer>}
14
+ */
15
+ export declare function getBinaryDataBuffer(inputData: ITaskDataConnections, itemIndex: number, propertyName: string, inputIndex: number): Promise<Buffer>;
16
+ /**
17
+ * Takes a buffer and converts it into the format n8n uses. It encodes the binary data as
18
+ * base64 and adds metadata.
19
+ *
20
+ * @export
21
+ * @param {Buffer} binaryData
22
+ * @param {string} [filePath]
23
+ * @param {string} [mimeType]
24
+ * @returns {Promise<IBinaryData>}
25
+ */
26
+ export declare function prepareBinaryData(binaryData: Buffer, executionId: string, filePath?: string, mimeType?: string): Promise<IBinaryData>;
27
+ export declare function getCurrentOAuth2AccessToken(this: IAllExecuteFunctions, credentialsType: string, node: INode, additionalData: IWorkflowExecuteAdditionalData, oAuth2Options?: IOAuth2Options): Promise<string>;
28
+ export declare function requestOAuth2(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUri | requestPromise.RequestPromiseOptions | IHttpRequestOptions, node: INode, additionalData: IWorkflowExecuteAdditionalData, oAuth2Options?: IOAuth2Options, isN8nRequest?: boolean): Promise<any>;
29
+ export declare function requestOAuth1(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUrl | OptionsWithUri | requestPromise.RequestPromiseOptions | IHttpRequestOptions, isN8nRequest?: boolean): Promise<any>;
30
+ export declare function httpRequestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: IHttpRequestOptions, workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<any>;
31
+ /**
32
+ * Takes generic input data and brings it into the json format n8n uses.
33
+ *
34
+ * @export
35
+ * @param {(IDataObject | IDataObject[])} jsonData
36
+ * @returns {INodeExecutionData[]}
37
+ */
38
+ export declare function returnJsonArray(jsonData: IDataObject | IDataObject[]): INodeExecutionData[];
39
+ /**
40
+ * Automatically put the objects under a 'json' key and don't error,
41
+ * if some objects contain json/binary keys and others don't, throws error 'Inconsistent item format'
42
+ *
43
+ * @export
44
+ * @param {INodeExecutionData | INodeExecutionData[]} executionData
45
+ * @returns {INodeExecutionData[]}
46
+ */
47
+ export declare function normalizeItems(executionData: INodeExecutionData | INodeExecutionData[]): INodeExecutionData[];
48
+ export declare function requestWithAuthentication(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUri | requestPromise.RequestPromiseOptions, workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, additionalCredentialOptions?: IAdditionalCredentialOptions): Promise<any>;
49
+ /**
50
+ * Returns the additional keys for Expressions and Function-Nodes
51
+ *
52
+ * @export
53
+ * @param {IWorkflowExecuteAdditionalData} additionalData
54
+ * @returns {(IWorkflowDataProxyAdditionalKeys)}
55
+ */
56
+ export declare function getAdditionalKeys(additionalData: IWorkflowExecuteAdditionalData): IWorkflowDataProxyAdditionalKeys;
57
+ /**
58
+ * Returns the requested decrypted credentials if the node has access to them.
59
+ *
60
+ * @export
61
+ * @param {Workflow} workflow Workflow which requests the data
62
+ * @param {INode} node Node which request the data
63
+ * @param {string} type The credential type to return
64
+ * @param {IWorkflowExecuteAdditionalData} additionalData
65
+ * @returns {(ICredentialDataDecryptedObject | undefined)}
66
+ */
67
+ export declare function getCredentials(workflow: Workflow, node: INode, type: string, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, runExecutionData?: IRunExecutionData | null, runIndex?: number, connectionInputData?: INodeExecutionData[], itemIndex?: number): Promise<ICredentialDataDecryptedObject | undefined>;
68
+ /**
69
+ * Returns a copy of the node
70
+ *
71
+ * @export
72
+ * @param {INode} node
73
+ * @returns {INode}
74
+ */
75
+ export declare function getNode(node: INode): INode;
76
+ /**
77
+ * Returns the requested resolved (all expressions replaced) node parameters.
78
+ *
79
+ * @export
80
+ * @param {Workflow} workflow
81
+ * @param {(IRunExecutionData | null)} runExecutionData
82
+ * @param {number} runIndex
83
+ * @param {INodeExecutionData[]} connectionInputData
84
+ * @param {INode} node
85
+ * @param {string} parameterName
86
+ * @param {number} itemIndex
87
+ * @param {*} [fallbackValue]
88
+ * @returns {(NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object)}
89
+ */
90
+ export declare function getNodeParameter(workflow: Workflow, runExecutionData: IRunExecutionData | null, runIndex: number, connectionInputData: INodeExecutionData[], node: INode, parameterName: string, itemIndex: number, mode: WorkflowExecuteMode, additionalKeys: IWorkflowDataProxyAdditionalKeys, fallbackValue?: any): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object;
91
+ /**
92
+ * Returns if execution should be continued even if there was an error.
93
+ *
94
+ * @export
95
+ * @param {INode} node
96
+ * @returns {boolean}
97
+ */
98
+ export declare function continueOnFail(node: INode): boolean;
99
+ /**
100
+ * Returns the webhook URL of the webhook with the given name
101
+ *
102
+ * @export
103
+ * @param {string} name
104
+ * @param {Workflow} workflow
105
+ * @param {INode} node
106
+ * @param {IWorkflowExecuteAdditionalData} additionalData
107
+ * @param {boolean} [isTest]
108
+ * @returns {(string | undefined)}
109
+ */
110
+ export declare function getNodeWebhookUrl(name: string, workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, additionalKeys: IWorkflowDataProxyAdditionalKeys, isTest?: boolean): string | undefined;
111
+ /**
112
+ * Returns the timezone for the workflow
113
+ *
114
+ * @export
115
+ * @param {Workflow} workflow
116
+ * @param {IWorkflowExecuteAdditionalData} additionalData
117
+ * @returns {string}
118
+ */
119
+ export declare function getTimezone(workflow: Workflow, additionalData: IWorkflowExecuteAdditionalData): string;
120
+ /**
121
+ * Returns the full webhook description of the webhook with the given name
122
+ *
123
+ * @export
124
+ * @param {string} name
125
+ * @param {Workflow} workflow
126
+ * @param {INode} node
127
+ * @returns {(IWebhookDescription | undefined)}
128
+ */
129
+ export declare function getWebhookDescription(name: string, workflow: Workflow, node: INode): IWebhookDescription | undefined;
130
+ /**
131
+ * Returns the workflow metadata
132
+ *
133
+ * @export
134
+ * @param {Workflow} workflow
135
+ * @returns {IWorkflowMetadata}
136
+ */
137
+ export declare function getWorkflowMetadata(workflow: Workflow): IWorkflowMetadata;
138
+ /**
139
+ * Returns the execute functions the poll nodes have access to.
140
+ *
141
+ * @export
142
+ * @param {Workflow} workflow
143
+ * @param {INode} node
144
+ * @param {IWorkflowExecuteAdditionalData} additionalData
145
+ * @param {WorkflowExecuteMode} mode
146
+ * @returns {ITriggerFunctions}
147
+ */
148
+ export declare function getExecutePollFunctions(workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, activation: WorkflowActivateMode): IPollFunctions;
149
+ /**
150
+ * Returns the execute functions the trigger nodes have access to.
151
+ *
152
+ * @export
153
+ * @param {Workflow} workflow
154
+ * @param {INode} node
155
+ * @param {IWorkflowExecuteAdditionalData} additionalData
156
+ * @param {WorkflowExecuteMode} mode
157
+ * @returns {ITriggerFunctions}
158
+ */
159
+ export declare function getExecuteTriggerFunctions(workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, activation: WorkflowActivateMode): ITriggerFunctions;
160
+ /**
161
+ * Returns the execute functions regular nodes have access to.
162
+ *
163
+ * @export
164
+ * @param {Workflow} workflow
165
+ * @param {IRunExecutionData} runExecutionData
166
+ * @param {number} runIndex
167
+ * @param {INodeExecutionData[]} connectionInputData
168
+ * @param {ITaskDataConnections} inputData
169
+ * @param {INode} node
170
+ * @param {IWorkflowExecuteAdditionalData} additionalData
171
+ * @param {WorkflowExecuteMode} mode
172
+ * @returns {IExecuteFunctions}
173
+ */
174
+ export declare function getExecuteFunctions(workflow: Workflow, runExecutionData: IRunExecutionData, runIndex: number, connectionInputData: INodeExecutionData[], inputData: ITaskDataConnections, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, nodeTypeData: INodeType, closeFunctions: CloseFunction[]): IExecuteFunctions;
175
+ /**
176
+ * Returns the execute functions regular nodes have access to when single-function is defined.
177
+ *
178
+ * @export
179
+ * @param {Workflow} workflow
180
+ * @param {IRunExecutionData} runExecutionData
181
+ * @param {number} runIndex
182
+ * @param {INodeExecutionData[]} connectionInputData
183
+ * @param {ITaskDataConnections} inputData
184
+ * @param {INode} node
185
+ * @param {number} itemIndex
186
+ * @param {IWorkflowExecuteAdditionalData} additionalData
187
+ * @param {WorkflowExecuteMode} mode
188
+ * @returns {IExecuteSingleFunctions}
189
+ */
190
+ export declare function getExecuteSingleFunctions(workflow: Workflow, runExecutionData: IRunExecutionData, runIndex: number, connectionInputData: INodeExecutionData[], inputData: ITaskDataConnections, node: INode, itemIndex: number, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode): IExecuteSingleFunctions;
191
+ export declare function getCredentialTestFunctions(): ICredentialTestFunctions;
192
+ /**
193
+ * Returns the execute functions regular nodes have access to in load-options-function.
194
+ *
195
+ * @export
196
+ * @param {Workflow} workflow
197
+ * @param {INode} node
198
+ * @param {IWorkflowExecuteAdditionalData} additionalData
199
+ * @returns {ILoadOptionsFunctions}
200
+ */
201
+ export declare function getLoadOptionsFunctions(workflow: Workflow, node: INode, path: string, additionalData: IWorkflowExecuteAdditionalData): ILoadOptionsFunctions;
202
+ /**
203
+ * Returns the execute functions regular nodes have access to in hook-function.
204
+ *
205
+ * @export
206
+ * @param {Workflow} workflow
207
+ * @param {INode} node
208
+ * @param {IWorkflowExecuteAdditionalData} additionalData
209
+ * @param {WorkflowExecuteMode} mode
210
+ * @returns {IHookFunctions}
211
+ */
212
+ export declare function getExecuteHookFunctions(workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, activation: WorkflowActivateMode, isTest?: boolean, webhookData?: IWebhookData): IHookFunctions;
213
+ /**
214
+ * Returns the execute functions regular nodes have access to when webhook-function is defined.
215
+ *
216
+ * @export
217
+ * @param {Workflow} workflow
218
+ * @param {IRunExecutionData} runExecutionData
219
+ * @param {INode} node
220
+ * @param {IWorkflowExecuteAdditionalData} additionalData
221
+ * @param {WorkflowExecuteMode} mode
222
+ * @returns {IWebhookFunctions}
223
+ */
224
+ export declare function getExecuteWebhookFunctions(workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, webhookData: IWebhookData, runExecutionData: IRunExecutionData | undefined): IWebhookFunctions;
225
+ export declare function getSupplyDataFunctions(workflow: Workflow, runExecutionData: IRunExecutionData, runIndex: number, connectionInputData: INodeExecutionData[], inputData: ITaskDataConnections, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, nodeTypeData: INodeType, closeFunctions: CloseFunction[]): ISupplyDataFunctions;
226
+ export declare function getInputConnectionData(this: IExecuteFunctions | ISupplyDataFunctions, workflow: Workflow, runExecutionData: IRunExecutionData, runIndex: number, connectionInputData: INodeExecutionData[], inputData: ITaskDataConnections, additionalData: IWorkflowExecuteAdditionalData, connectionType: NodeConnectionType, mode: WorkflowExecuteMode, itemIndex: number, nodeTypeData: INodeType, closeFunctions: CloseFunction[]): Promise<unknown>;