n8n-nodes-base 1.92.0 → 1.93.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.
- package/dist/credentials/MicrosoftSharePointOAuth2Api.credentials.js +0 -9
- package/dist/credentials/MicrosoftSharePointOAuth2Api.credentials.js.map +1 -1
- package/dist/credentials/MicrosoftTeamsOAuth2Api.credentials.js +13 -0
- package/dist/credentials/MicrosoftTeamsOAuth2Api.credentials.js.map +1 -1
- package/dist/credentials/Snowflake.credentials.js +46 -2
- package/dist/credentials/Snowflake.credentials.js.map +1 -1
- package/dist/known/credentials.json +10 -1
- package/dist/known/nodes.json +20 -0
- package/dist/methods/defined.json +6 -0
- package/dist/methods/referenced.json +3 -0
- package/dist/nodes/Aws/IAM/AwsIam.node.js +95 -0
- package/dist/nodes/Aws/IAM/AwsIam.node.js.map +1 -0
- package/dist/nodes/Aws/IAM/AwsIam.node.json +18 -0
- package/dist/nodes/Aws/IAM/AwsIam.svg +18 -0
- package/dist/nodes/Aws/IAM/descriptions/common.js +188 -0
- package/dist/nodes/Aws/IAM/descriptions/common.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/group/Group.resource.js +175 -0
- package/dist/nodes/Aws/IAM/descriptions/group/Group.resource.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/group/create.operation.js +66 -0
- package/dist/nodes/Aws/IAM/descriptions/group/create.operation.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/group/delete.operation.js +43 -0
- package/dist/nodes/Aws/IAM/descriptions/group/delete.operation.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/group/get.operation.js +50 -0
- package/dist/nodes/Aws/IAM/descriptions/group/get.operation.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/group/getAll.operation.js +47 -0
- package/dist/nodes/Aws/IAM/descriptions/group/getAll.operation.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/group/update.operation.js +70 -0
- package/dist/nodes/Aws/IAM/descriptions/group/update.operation.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/index.js +42 -0
- package/dist/nodes/Aws/IAM/descriptions/index.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/user/User.resource.js +231 -0
- package/dist/nodes/Aws/IAM/descriptions/user/User.resource.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/user/addToGroup.operation.js +47 -0
- package/dist/nodes/Aws/IAM/descriptions/user/addToGroup.operation.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/user/create.operation.js +118 -0
- package/dist/nodes/Aws/IAM/descriptions/user/create.operation.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/user/delete.operation.js +43 -0
- package/dist/nodes/Aws/IAM/descriptions/user/delete.operation.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/user/get.operation.js +43 -0
- package/dist/nodes/Aws/IAM/descriptions/user/get.operation.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/user/getAll.operation.js +66 -0
- package/dist/nodes/Aws/IAM/descriptions/user/getAll.operation.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/user/removeFromGroup.operation.js +74 -0
- package/dist/nodes/Aws/IAM/descriptions/user/removeFromGroup.operation.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/user/update.operation.js +68 -0
- package/dist/nodes/Aws/IAM/descriptions/user/update.operation.js.map +1 -0
- package/dist/nodes/Aws/IAM/helpers/constants.js +47 -0
- package/dist/nodes/Aws/IAM/helpers/constants.js.map +1 -0
- package/dist/nodes/Aws/IAM/helpers/errorHandler.js +90 -0
- package/dist/nodes/Aws/IAM/helpers/errorHandler.js.map +1 -0
- package/dist/nodes/Aws/IAM/helpers/types.js +17 -0
- package/dist/nodes/Aws/IAM/helpers/types.js.map +1 -0
- package/dist/nodes/Aws/IAM/helpers/utils.js +279 -0
- package/dist/nodes/Aws/IAM/helpers/utils.js.map +1 -0
- package/dist/nodes/Aws/IAM/methods/index.js +39 -0
- package/dist/nodes/Aws/IAM/methods/index.js.map +1 -0
- package/dist/nodes/Aws/IAM/methods/listSearch.js +132 -0
- package/dist/nodes/Aws/IAM/methods/listSearch.js.map +1 -0
- package/dist/nodes/Aws/IAM/transport/index.js +64 -0
- package/dist/nodes/Aws/IAM/transport/index.js.map +1 -0
- package/dist/nodes/Cron/Cron.node.js +1 -1
- package/dist/nodes/Cron/Cron.node.js.map +1 -1
- package/dist/nodes/EmailReadImap/v1/EmailReadImapV1.node.js +2 -2
- package/dist/nodes/EmailReadImap/v1/EmailReadImapV1.node.js.map +1 -1
- package/dist/nodes/EmailReadImap/v2/EmailReadImapV2.node.js +2 -2
- package/dist/nodes/EmailReadImap/v2/EmailReadImapV2.node.js.map +1 -1
- package/dist/nodes/Evaluation/Evaluation/Description.node.js +146 -0
- package/dist/nodes/Evaluation/Evaluation/Description.node.js.map +1 -0
- package/dist/nodes/Evaluation/Evaluation/Evaluation.node.ee.js +117 -0
- package/dist/nodes/Evaluation/Evaluation/Evaluation.node.ee.js.map +1 -0
- package/dist/nodes/Evaluation/EvaluationTrigger/EvaluationTrigger.node.ee.js +187 -0
- package/dist/nodes/Evaluation/EvaluationTrigger/EvaluationTrigger.node.ee.js.map +1 -0
- package/dist/nodes/Evaluation/methods/index.js +42 -0
- package/dist/nodes/Evaluation/methods/index.js.map +1 -0
- package/dist/nodes/Evaluation/methods/loadOptions.js +40 -0
- package/dist/nodes/Evaluation/methods/loadOptions.js.map +1 -0
- package/dist/nodes/Evaluation/utils/evaluationTriggerUtils.js +119 -0
- package/dist/nodes/Evaluation/utils/evaluationTriggerUtils.js.map +1 -0
- package/dist/nodes/Evaluation/utils/evaluationUtils.js +171 -0
- package/dist/nodes/Evaluation/utils/evaluationUtils.js.map +1 -0
- package/dist/nodes/ExecuteWorkflow/ExecuteWorkflowTrigger/ExecuteWorkflowTrigger.node.js +4 -3
- package/dist/nodes/ExecuteWorkflow/ExecuteWorkflowTrigger/ExecuteWorkflowTrigger.node.js.map +1 -1
- package/dist/nodes/Form/common.descriptions.js +2 -2
- package/dist/nodes/Form/common.descriptions.js.map +1 -1
- package/dist/nodes/Google/Sheet/GoogleSheetsTrigger.node.js +113 -107
- package/dist/nodes/Google/Sheet/GoogleSheetsTrigger.node.js.map +1 -1
- package/dist/nodes/Google/Sheet/v2/actions/sheet/read.operation.js +52 -106
- package/dist/nodes/Google/Sheet/v2/actions/sheet/read.operation.js.map +1 -1
- package/dist/nodes/Google/Sheet/v2/actions/utils/readOperation.js +97 -0
- package/dist/nodes/Google/Sheet/v2/actions/utils/readOperation.js.map +1 -0
- package/dist/nodes/Google/Sheet/v2/actions/versionDescription.js +20 -17
- package/dist/nodes/Google/Sheet/v2/actions/versionDescription.js.map +1 -1
- package/dist/nodes/Google/YouTube/YouTube.node.js +4 -2
- package/dist/nodes/Google/YouTube/YouTube.node.js.map +1 -1
- package/dist/nodes/Interval/Interval.node.js +1 -1
- package/dist/nodes/Interval/Interval.node.js.map +1 -1
- package/dist/nodes/Jira/Jira.node.js +34 -15
- package/dist/nodes/Jira/Jira.node.js.map +1 -1
- package/dist/nodes/LocalFileTrigger/LocalFileTrigger.node.js +2 -2
- package/dist/nodes/LocalFileTrigger/LocalFileTrigger.node.js.map +1 -1
- package/dist/nodes/MQTT/MqttTrigger.node.js +2 -2
- package/dist/nodes/MQTT/MqttTrigger.node.js.map +1 -1
- package/dist/nodes/ManualTrigger/ManualTrigger.node.js +1 -1
- package/dist/nodes/ManualTrigger/ManualTrigger.node.js.map +1 -1
- package/dist/nodes/Microsoft/SharePoint/MicrosoftSharePoint.node.js +93 -0
- package/dist/nodes/Microsoft/SharePoint/MicrosoftSharePoint.node.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/MicrosoftSharepoint.node.json +18 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/common.descriptions.js +190 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/common.descriptions.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/file/File.resource.js +108 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/file/File.resource.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/file/download.operation.js +62 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/file/download.operation.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/file/update.operation.js +129 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/file/update.operation.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/file/upload.operation.js +77 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/file/upload.operation.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/index.js +45 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/index.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/Item.resource.js +175 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/Item.resource.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/create.operation.js +100 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/create.operation.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/delete.operation.js +62 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/delete.operation.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/get.operation.js +83 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/get.operation.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/getAll.operation.js +203 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/getAll.operation.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/update.operation.js +100 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/update.operation.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/upsert.operation.js +100 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/upsert.operation.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/list/List.resource.js +99 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/list/List.resource.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/list/get.operation.js +65 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/list/get.operation.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/list/getAll.operation.js +105 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/list/getAll.operation.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/helpers/interfaces.js +17 -0
- package/dist/nodes/Microsoft/SharePoint/helpers/interfaces.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/helpers/utils.js +252 -0
- package/dist/nodes/Microsoft/SharePoint/helpers/utils.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/methods/index.js +42 -0
- package/dist/nodes/Microsoft/SharePoint/methods/index.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/methods/listSearch.js +222 -0
- package/dist/nodes/Microsoft/SharePoint/methods/listSearch.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/methods/resourceMapping.js +104 -0
- package/dist/nodes/Microsoft/SharePoint/methods/resourceMapping.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/test/credentials.js +54 -0
- package/dist/nodes/Microsoft/SharePoint/test/credentials.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/transport/index.js +46 -0
- package/dist/nodes/Microsoft/SharePoint/transport/index.js.map +1 -0
- package/dist/nodes/Microsoft/Teams/MicrosoftTeamsTrigger.node.js +387 -0
- package/dist/nodes/Microsoft/Teams/MicrosoftTeamsTrigger.node.js.map +1 -0
- package/dist/nodes/Microsoft/Teams/MicrosoftTeamsTrigger.node.json +18 -0
- package/dist/nodes/Microsoft/Teams/v2/helpers/types.js +17 -0
- package/dist/nodes/Microsoft/Teams/v2/helpers/types.js.map +1 -0
- package/dist/nodes/Microsoft/Teams/v2/helpers/utils-trigger.js +147 -0
- package/dist/nodes/Microsoft/Teams/v2/helpers/utils-trigger.js.map +1 -0
- package/dist/nodes/Microsoft/Teams/v2/transport/index.js.map +1 -1
- package/dist/nodes/PostBin/BinDescription.js +1 -1
- package/dist/nodes/PostBin/BinDescription.js.map +1 -1
- package/dist/nodes/PostBin/GenericFunctions.js +5 -5
- package/dist/nodes/PostBin/GenericFunctions.js.map +1 -1
- package/dist/nodes/PostBin/PostBin.node.js +1 -1
- package/dist/nodes/PostBin/PostBin.node.js.map +1 -1
- package/dist/nodes/PostBin/RequestDescription.js +2 -2
- package/dist/nodes/PostBin/RequestDescription.js.map +1 -1
- package/dist/nodes/Postgres/PostgresTrigger.node.js +2 -2
- package/dist/nodes/Postgres/PostgresTrigger.node.js.map +1 -1
- package/dist/nodes/RabbitMQ/RabbitMQTrigger.node.js +2 -2
- package/dist/nodes/RabbitMQ/RabbitMQTrigger.node.js.map +1 -1
- package/dist/nodes/RespondToWebhook/RespondToWebhook.node.js +8 -3
- package/dist/nodes/RespondToWebhook/RespondToWebhook.node.js.map +1 -1
- package/dist/nodes/RespondToWebhook/utils.js +43 -0
- package/dist/nodes/RespondToWebhook/utils.js.map +1 -0
- package/dist/nodes/Schedule/ScheduleTrigger.node.js +1 -1
- package/dist/nodes/Schedule/ScheduleTrigger.node.js.map +1 -1
- package/dist/nodes/Snowflake/GenericFunctions.js +34 -2
- package/dist/nodes/Snowflake/GenericFunctions.js.map +1 -1
- package/dist/nodes/Snowflake/Snowflake.node.js +5 -7
- package/dist/nodes/Snowflake/Snowflake.node.js.map +1 -1
- package/dist/nodes/SseTrigger/SseTrigger.node.js +2 -2
- package/dist/nodes/SseTrigger/SseTrigger.node.js.map +1 -1
- package/dist/types/credentials.json +6 -6
- package/dist/types/nodes.json +22 -17
- package/dist/utils/workflowInputsResourceMapping/GenericFunctions.js +12 -2
- package/dist/utils/workflowInputsResourceMapping/GenericFunctions.js.map +1 -1
- package/package.json +14 -10
- /package/dist/{credentials/icons/SharePoint.svg → nodes/Microsoft/SharePoint/microsoftSharePoint.svg} +0 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var evaluationTriggerUtils_exports = {};
|
|
20
|
+
__export(evaluationTriggerUtils_exports, {
|
|
21
|
+
getFilteredResults: () => getFilteredResults,
|
|
22
|
+
getGoogleSheet: () => getGoogleSheet,
|
|
23
|
+
getNumberOfRowsLeftFiltered: () => getNumberOfRowsLeftFiltered,
|
|
24
|
+
getResults: () => getResults,
|
|
25
|
+
getRowsLeft: () => getRowsLeft,
|
|
26
|
+
getSheet: () => getSheet
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(evaluationTriggerUtils_exports);
|
|
29
|
+
var import_readOperation = require("../../Google/Sheet/v2/actions/utils/readOperation");
|
|
30
|
+
var import_GoogleSheet = require("../../Google/Sheet/v2/helpers/GoogleSheet");
|
|
31
|
+
var import_GoogleSheets = require("../../Google/Sheet/v2/helpers/GoogleSheets.utils");
|
|
32
|
+
async function getSheet(googleSheet) {
|
|
33
|
+
const sheetWithinDocument = this.getNodeParameter("sheetName", 0, void 0, {
|
|
34
|
+
extractValue: true
|
|
35
|
+
});
|
|
36
|
+
const { mode: sheetMode } = this.getNodeParameter("sheetName", 0);
|
|
37
|
+
return await googleSheet.spreadsheetGetSheet(this.getNode(), sheetMode, sheetWithinDocument);
|
|
38
|
+
}
|
|
39
|
+
function getGoogleSheet() {
|
|
40
|
+
const { mode, value } = this.getNodeParameter("documentId", 0);
|
|
41
|
+
const spreadsheetId = (0, import_GoogleSheets.getSpreadsheetId)(this.getNode(), mode, value);
|
|
42
|
+
const googleSheet = new import_GoogleSheet.GoogleSheet(spreadsheetId, this);
|
|
43
|
+
return googleSheet;
|
|
44
|
+
}
|
|
45
|
+
async function getFilteredResults(operationResult, googleSheet, result, startingRow, endingRow) {
|
|
46
|
+
const sheetName = result.title;
|
|
47
|
+
operationResult = await import_readOperation.readSheet.call(
|
|
48
|
+
this,
|
|
49
|
+
googleSheet,
|
|
50
|
+
sheetName,
|
|
51
|
+
0,
|
|
52
|
+
operationResult,
|
|
53
|
+
this.getNode().typeVersion,
|
|
54
|
+
[],
|
|
55
|
+
void 0,
|
|
56
|
+
{
|
|
57
|
+
rangeDefinition: "specifyRange",
|
|
58
|
+
headerRow: 1,
|
|
59
|
+
firstDataRow: startingRow
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
return operationResult.filter((row) => row?.json?.row_number <= endingRow);
|
|
63
|
+
}
|
|
64
|
+
async function getNumberOfRowsLeftFiltered(googleSheet, sheetName, startingRow, endingRow) {
|
|
65
|
+
const remainderSheet = await import_readOperation.readSheet.call(
|
|
66
|
+
this,
|
|
67
|
+
googleSheet,
|
|
68
|
+
sheetName,
|
|
69
|
+
0,
|
|
70
|
+
[],
|
|
71
|
+
this.getNode().typeVersion,
|
|
72
|
+
[],
|
|
73
|
+
void 0,
|
|
74
|
+
{
|
|
75
|
+
rangeDefinition: "specifyRange",
|
|
76
|
+
headerRow: 1,
|
|
77
|
+
firstDataRow: startingRow
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
return remainderSheet.filter((row) => row?.json?.row_number <= endingRow).length;
|
|
81
|
+
}
|
|
82
|
+
async function getResults(operationResult, googleSheet, result, rangeOptions) {
|
|
83
|
+
const sheetName = result.title;
|
|
84
|
+
operationResult = await import_readOperation.readSheet.call(
|
|
85
|
+
this,
|
|
86
|
+
googleSheet,
|
|
87
|
+
sheetName,
|
|
88
|
+
0,
|
|
89
|
+
operationResult,
|
|
90
|
+
this.getNode().typeVersion,
|
|
91
|
+
[],
|
|
92
|
+
void 0,
|
|
93
|
+
rangeOptions
|
|
94
|
+
);
|
|
95
|
+
return operationResult;
|
|
96
|
+
}
|
|
97
|
+
async function getRowsLeft(googleSheet, sheetName, rangeString) {
|
|
98
|
+
const remainderSheet = await import_readOperation.readSheet.call(
|
|
99
|
+
this,
|
|
100
|
+
googleSheet,
|
|
101
|
+
sheetName,
|
|
102
|
+
0,
|
|
103
|
+
[],
|
|
104
|
+
this.getNode().typeVersion,
|
|
105
|
+
[],
|
|
106
|
+
rangeString
|
|
107
|
+
);
|
|
108
|
+
return remainderSheet.length;
|
|
109
|
+
}
|
|
110
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
111
|
+
0 && (module.exports = {
|
|
112
|
+
getFilteredResults,
|
|
113
|
+
getGoogleSheet,
|
|
114
|
+
getNumberOfRowsLeftFiltered,
|
|
115
|
+
getResults,
|
|
116
|
+
getRowsLeft,
|
|
117
|
+
getSheet
|
|
118
|
+
});
|
|
119
|
+
//# sourceMappingURL=evaluationTriggerUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../nodes/Evaluation/utils/evaluationTriggerUtils.ts"],"sourcesContent":["import type { IExecuteFunctions, INodeExecutionData, IDataObject } from 'n8n-workflow';\n\nimport { readSheet } from '../../Google/Sheet/v2/actions/utils/readOperation';\nimport { GoogleSheet } from '../../Google/Sheet/v2/helpers/GoogleSheet';\nimport type { ResourceLocator } from '../../Google/Sheet/v2/helpers/GoogleSheets.types';\nimport { getSpreadsheetId } from '../../Google/Sheet/v2/helpers/GoogleSheets.utils';\n\nexport async function getSheet(\n\tthis: IExecuteFunctions,\n\tgoogleSheet: GoogleSheet,\n): Promise<{\n\ttitle: string;\n\tsheetId: number;\n}> {\n\tconst sheetWithinDocument = this.getNodeParameter('sheetName', 0, undefined, {\n\t\textractValue: true,\n\t}) as string;\n\tconst { mode: sheetMode } = this.getNodeParameter('sheetName', 0) as {\n\t\tmode: ResourceLocator;\n\t};\n\n\treturn await googleSheet.spreadsheetGetSheet(this.getNode(), sheetMode, sheetWithinDocument);\n}\n\nexport function getGoogleSheet(this: IExecuteFunctions) {\n\tconst { mode, value } = this.getNodeParameter('documentId', 0) as IDataObject;\n\tconst spreadsheetId = getSpreadsheetId(this.getNode(), mode as ResourceLocator, value as string);\n\n\tconst googleSheet = new GoogleSheet(spreadsheetId, this);\n\n\treturn googleSheet;\n}\n\nexport async function getFilteredResults(\n\tthis: IExecuteFunctions,\n\toperationResult: INodeExecutionData[],\n\tgoogleSheet: GoogleSheet,\n\tresult: { title: string; sheetId: number },\n\tstartingRow: number,\n\tendingRow: number,\n): Promise<INodeExecutionData[]> {\n\tconst sheetName = result.title;\n\n\toperationResult = await readSheet.call(\n\t\tthis,\n\t\tgoogleSheet,\n\t\tsheetName,\n\t\t0,\n\t\toperationResult,\n\t\tthis.getNode().typeVersion,\n\t\t[],\n\t\tundefined,\n\t\t{\n\t\t\trangeDefinition: 'specifyRange',\n\t\t\theaderRow: 1,\n\t\t\tfirstDataRow: startingRow,\n\t\t},\n\t);\n\n\treturn operationResult.filter((row) => (row?.json?.row_number as number) <= endingRow);\n}\n\nexport async function getNumberOfRowsLeftFiltered(\n\tthis: IExecuteFunctions,\n\tgoogleSheet: GoogleSheet,\n\tsheetName: string,\n\tstartingRow: number,\n\tendingRow: number,\n) {\n\tconst remainderSheet: INodeExecutionData[] = await readSheet.call(\n\t\tthis,\n\t\tgoogleSheet,\n\t\tsheetName,\n\t\t0,\n\t\t[],\n\t\tthis.getNode().typeVersion,\n\t\t[],\n\t\tundefined,\n\t\t{\n\t\t\trangeDefinition: 'specifyRange',\n\t\t\theaderRow: 1,\n\t\t\tfirstDataRow: startingRow,\n\t\t},\n\t);\n\n\treturn remainderSheet.filter((row) => (row?.json?.row_number as number) <= endingRow).length;\n}\n\nexport async function getResults(\n\tthis: IExecuteFunctions,\n\toperationResult: INodeExecutionData[],\n\tgoogleSheet: GoogleSheet,\n\tresult: { title: string; sheetId: number },\n\trangeOptions: IDataObject,\n): Promise<INodeExecutionData[]> {\n\tconst sheetName = result.title;\n\n\toperationResult = await readSheet.call(\n\t\tthis,\n\t\tgoogleSheet,\n\t\tsheetName,\n\t\t0,\n\t\toperationResult,\n\t\tthis.getNode().typeVersion,\n\t\t[],\n\t\tundefined,\n\t\trangeOptions,\n\t);\n\n\treturn operationResult;\n}\n\nexport async function getRowsLeft(\n\tthis: IExecuteFunctions,\n\tgoogleSheet: GoogleSheet,\n\tsheetName: string,\n\trangeString: string,\n) {\n\tconst remainderSheet: INodeExecutionData[] = await readSheet.call(\n\t\tthis,\n\t\tgoogleSheet,\n\t\tsheetName,\n\t\t0,\n\t\t[],\n\t\tthis.getNode().typeVersion,\n\t\t[],\n\t\trangeString,\n\t);\n\n\treturn remainderSheet.length;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,2BAA0B;AAC1B,yBAA4B;AAE5B,0BAAiC;AAEjC,eAAsB,SAErB,aAIE;AACF,QAAM,sBAAsB,KAAK,iBAAiB,aAAa,GAAG,QAAW;AAAA,IAC5E,cAAc;AAAA,EACf,CAAC;AACD,QAAM,EAAE,MAAM,UAAU,IAAI,KAAK,iBAAiB,aAAa,CAAC;AAIhE,SAAO,MAAM,YAAY,oBAAoB,KAAK,QAAQ,GAAG,WAAW,mBAAmB;AAC5F;AAEO,SAAS,iBAAwC;AACvD,QAAM,EAAE,MAAM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;AAAA,IACA;AAAA,IACA,CAAC;AAAA,IACD,KAAK,QAAQ,EAAE;AAAA,IACf,CAAC;AAAA,IACD;AAAA,EACD;AAEA,SAAO,eAAe;AACvB;","names":[]}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var evaluationUtils_exports = {};
|
|
20
|
+
__export(evaluationUtils_exports, {
|
|
21
|
+
checkIfEvaluating: () => checkIfEvaluating,
|
|
22
|
+
setMetrics: () => setMetrics,
|
|
23
|
+
setOutput: () => setOutput,
|
|
24
|
+
setOutputs: () => setOutputs
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(evaluationUtils_exports);
|
|
27
|
+
var import_n8n_workflow = require("n8n-workflow");
|
|
28
|
+
var import_evaluationTriggerUtils = require("./evaluationTriggerUtils");
|
|
29
|
+
var import_utils = require("../../Set/v2/helpers/utils");
|
|
30
|
+
async function setOutput() {
|
|
31
|
+
const evaluationNode = this.getNode();
|
|
32
|
+
const parentNodes = this.getParentNodes(evaluationNode.name);
|
|
33
|
+
const evalTrigger = parentNodes.find((node) => node.type === "n8n-nodes-base.evaluationTrigger");
|
|
34
|
+
const evalTriggerOutput = evalTrigger ? this.evaluateExpression(`{{ $('${evalTrigger?.name}').isExecuted }}`, 0) : void 0;
|
|
35
|
+
if (!evalTrigger || !evalTriggerOutput) {
|
|
36
|
+
this.addExecutionHints({
|
|
37
|
+
message: "No outputs were set since the execution didn't start from an evaluation trigger",
|
|
38
|
+
location: "outputPane"
|
|
39
|
+
});
|
|
40
|
+
return [this.getInputData()];
|
|
41
|
+
}
|
|
42
|
+
const outputFields = this.getNodeParameter("outputs.values", 0, []);
|
|
43
|
+
if (outputFields.length === 0) {
|
|
44
|
+
throw new import_n8n_workflow.UserError("No outputs to set", {
|
|
45
|
+
description: "Add outputs to write back to the Google Sheet using the \u2018Add Output\u2019 button"
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
const googleSheetInstance = import_evaluationTriggerUtils.getGoogleSheet.call(this);
|
|
49
|
+
const googleSheet = await import_evaluationTriggerUtils.getSheet.call(this, googleSheetInstance);
|
|
50
|
+
const evaluationTrigger = this.evaluateExpression(
|
|
51
|
+
`{{ $('${evalTrigger.name}').first().json }}`,
|
|
52
|
+
0
|
|
53
|
+
);
|
|
54
|
+
const rowNumber = evaluationTrigger.row_number === "row_number" ? 1 : evaluationTrigger.row_number;
|
|
55
|
+
const columnNames = Object.keys(evaluationTrigger).filter(
|
|
56
|
+
(key) => key !== "row_number" && key !== "_rowsLeft"
|
|
57
|
+
);
|
|
58
|
+
outputFields.forEach(({ outputName }) => {
|
|
59
|
+
if (!columnNames.includes(outputName)) {
|
|
60
|
+
columnNames.push(outputName);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
await googleSheetInstance.updateRows(
|
|
64
|
+
googleSheet.title,
|
|
65
|
+
[columnNames],
|
|
66
|
+
"RAW",
|
|
67
|
+
// default value for Value Input Mode
|
|
68
|
+
1
|
|
69
|
+
// header row
|
|
70
|
+
);
|
|
71
|
+
const outputs = outputFields.reduce((acc, { outputName, outputValue }) => {
|
|
72
|
+
acc[outputName] = outputValue;
|
|
73
|
+
return acc;
|
|
74
|
+
}, {});
|
|
75
|
+
const preparedData = googleSheetInstance.prepareDataForUpdatingByRowNumber(
|
|
76
|
+
[
|
|
77
|
+
{
|
|
78
|
+
row_number: rowNumber,
|
|
79
|
+
...outputs
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
`${googleSheet.title}!A:Z`,
|
|
83
|
+
[columnNames]
|
|
84
|
+
);
|
|
85
|
+
await googleSheetInstance.batchUpdate(
|
|
86
|
+
preparedData.updateData,
|
|
87
|
+
"RAW"
|
|
88
|
+
// default value for Value Input Mode
|
|
89
|
+
);
|
|
90
|
+
return [this.getInputData()];
|
|
91
|
+
}
|
|
92
|
+
async function setMetrics() {
|
|
93
|
+
const items = this.getInputData();
|
|
94
|
+
const metrics = [];
|
|
95
|
+
for (let i = 0; i < items.length; i++) {
|
|
96
|
+
const dataToSave = this.getNodeParameter("metrics", i, {});
|
|
97
|
+
const newItem = {
|
|
98
|
+
json: {},
|
|
99
|
+
pairedItem: { item: i }
|
|
100
|
+
};
|
|
101
|
+
const newData = Object.fromEntries(
|
|
102
|
+
(dataToSave?.assignments ?? []).map((assignment) => {
|
|
103
|
+
const assignmentValue = typeof assignment.value === "number" ? assignment.value : Number(assignment.value);
|
|
104
|
+
if (isNaN(assignmentValue)) {
|
|
105
|
+
throw new import_n8n_workflow.NodeOperationError(
|
|
106
|
+
this.getNode(),
|
|
107
|
+
`Value for '${assignment.name}' isn't a number`,
|
|
108
|
+
{
|
|
109
|
+
description: `It\u2019s currently '${assignment.value}'. Metrics must be numeric.`
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
if (!assignment.name || isNaN(assignmentValue)) {
|
|
114
|
+
throw new import_n8n_workflow.NodeOperationError(this.getNode(), "Metric name missing", {
|
|
115
|
+
description: "Make sure each metric you define has a name"
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
const { name, value } = (0, import_utils.validateEntry)(
|
|
119
|
+
assignment.name,
|
|
120
|
+
assignment.type,
|
|
121
|
+
assignmentValue,
|
|
122
|
+
this.getNode(),
|
|
123
|
+
i,
|
|
124
|
+
false,
|
|
125
|
+
1
|
|
126
|
+
);
|
|
127
|
+
return [name, value];
|
|
128
|
+
})
|
|
129
|
+
);
|
|
130
|
+
const returnItem = import_utils.composeReturnItem.call(
|
|
131
|
+
this,
|
|
132
|
+
i,
|
|
133
|
+
newItem,
|
|
134
|
+
newData,
|
|
135
|
+
{ dotNotation: false, include: "none" },
|
|
136
|
+
1
|
|
137
|
+
);
|
|
138
|
+
metrics.push(returnItem);
|
|
139
|
+
}
|
|
140
|
+
return [metrics];
|
|
141
|
+
}
|
|
142
|
+
async function checkIfEvaluating() {
|
|
143
|
+
const evaluationExecutionResult = [];
|
|
144
|
+
const normalExecutionResult = [];
|
|
145
|
+
const evaluationNode = this.getNode();
|
|
146
|
+
const parentNodes = this.getParentNodes(evaluationNode.name);
|
|
147
|
+
const evalTrigger = parentNodes.find((node) => node.type === "n8n-nodes-base.evaluationTrigger");
|
|
148
|
+
const evalTriggerOutput = evalTrigger ? this.evaluateExpression(`{{ $('${evalTrigger?.name}').isExecuted }}`, 0) : void 0;
|
|
149
|
+
if (evalTriggerOutput) {
|
|
150
|
+
return [this.getInputData(), normalExecutionResult];
|
|
151
|
+
} else {
|
|
152
|
+
return [evaluationExecutionResult, this.getInputData()];
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
function setOutputs(parameters) {
|
|
156
|
+
if (parameters.operation === "checkIfEvaluating") {
|
|
157
|
+
return [
|
|
158
|
+
{ type: "main", displayName: "Evaluation" },
|
|
159
|
+
{ type: "main", displayName: "Normal" }
|
|
160
|
+
];
|
|
161
|
+
}
|
|
162
|
+
return [{ type: "main" }];
|
|
163
|
+
}
|
|
164
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
165
|
+
0 && (module.exports = {
|
|
166
|
+
checkIfEvaluating,
|
|
167
|
+
setMetrics,
|
|
168
|
+
setOutput,
|
|
169
|
+
setOutputs
|
|
170
|
+
});
|
|
171
|
+
//# sourceMappingURL=evaluationUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../nodes/Evaluation/utils/evaluationUtils.ts"],"sourcesContent":["import { NodeOperationError, UserError } from 'n8n-workflow';\nimport type {\n\tFieldType,\n\tINodeParameters,\n\tAssignmentCollectionValue,\n\tIDataObject,\n\tIExecuteFunctions,\n\tINodeExecutionData,\n} from 'n8n-workflow';\n\nimport { getGoogleSheet, getSheet } from './evaluationTriggerUtils';\nimport { composeReturnItem, validateEntry } from '../../Set/v2/helpers/utils';\n\nexport async function setOutput(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {\n\tconst evaluationNode = this.getNode();\n\tconst parentNodes = this.getParentNodes(evaluationNode.name);\n\n\tconst evalTrigger = parentNodes.find((node) => node.type === 'n8n-nodes-base.evaluationTrigger');\n\tconst evalTriggerOutput = evalTrigger\n\t\t? this.evaluateExpression(`{{ $('${evalTrigger?.name}').isExecuted }}`, 0)\n\t\t: undefined;\n\n\tif (!evalTrigger || !evalTriggerOutput) {\n\t\tthis.addExecutionHints({\n\t\t\tmessage: \"No outputs were set since the execution didn't start from an evaluation trigger\",\n\t\t\tlocation: 'outputPane',\n\t\t});\n\t\treturn [this.getInputData()];\n\t}\n\n\tconst outputFields = this.getNodeParameter('outputs.values', 0, []) as Array<{\n\t\toutputName: string;\n\t\toutputValue: string;\n\t}>;\n\n\tif (outputFields.length === 0) {\n\t\tthrow new UserError('No outputs to set', {\n\t\t\tdescription: 'Add outputs to write back to the Google Sheet using the ‘Add Output’ button',\n\t\t});\n\t}\n\n\tconst googleSheetInstance = getGoogleSheet.call(this);\n\tconst googleSheet = await getSheet.call(this, googleSheetInstance);\n\n\tconst evaluationTrigger = this.evaluateExpression(\n\t\t`{{ $('${evalTrigger.name}').first().json }}`,\n\t\t0,\n\t) as IDataObject;\n\n\tconst rowNumber =\n\t\tevaluationTrigger.row_number === 'row_number' ? 1 : evaluationTrigger.row_number;\n\n\tconst columnNames = Object.keys(evaluationTrigger).filter(\n\t\t(key) => key !== 'row_number' && key !== '_rowsLeft',\n\t);\n\n\toutputFields.forEach(({ outputName }) => {\n\t\tif (!columnNames.includes(outputName)) {\n\t\t\tcolumnNames.push(outputName);\n\t\t}\n\t});\n\n\tawait googleSheetInstance.updateRows(\n\t\tgoogleSheet.title,\n\t\t[columnNames],\n\t\t'RAW', // default value for Value Input Mode\n\t\t1, // header row\n\t);\n\n\tconst outputs = outputFields.reduce((acc, { outputName, outputValue }) => {\n\t\tacc[outputName] = outputValue;\n\t\treturn acc;\n\t}, {} as IDataObject);\n\n\tconst preparedData = googleSheetInstance.prepareDataForUpdatingByRowNumber(\n\t\t[\n\t\t\t{\n\t\t\t\trow_number: rowNumber,\n\t\t\t\t...outputs,\n\t\t\t},\n\t\t],\n\t\t`${googleSheet.title}!A:Z`,\n\t\t[columnNames],\n\t);\n\n\tawait googleSheetInstance.batchUpdate(\n\t\tpreparedData.updateData,\n\t\t'RAW', // default value for Value Input Mode\n\t);\n\n\treturn [this.getInputData()];\n}\n\nexport async function setMetrics(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {\n\tconst items = this.getInputData();\n\tconst metrics: INodeExecutionData[] = [];\n\n\tfor (let i = 0; i < items.length; i++) {\n\t\tconst dataToSave = this.getNodeParameter('metrics', i, {}) as AssignmentCollectionValue;\n\n\t\tconst newItem: INodeExecutionData = {\n\t\t\tjson: {},\n\t\t\tpairedItem: { item: i },\n\t\t};\n\t\tconst newData = Object.fromEntries(\n\t\t\t(dataToSave?.assignments ?? []).map((assignment) => {\n\t\t\t\tconst assignmentValue =\n\t\t\t\t\ttypeof assignment.value === 'number' ? assignment.value : Number(assignment.value);\n\n\t\t\t\tif (isNaN(assignmentValue)) {\n\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t\t`Value for '${assignment.name}' isn't a number`,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdescription: `It’s currently '${assignment.value}'. Metrics must be numeric.`,\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (!assignment.name || isNaN(assignmentValue)) {\n\t\t\t\t\tthrow new NodeOperationError(this.getNode(), 'Metric name missing', {\n\t\t\t\t\t\tdescription: 'Make sure each metric you define has a name',\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tconst { name, value } = validateEntry(\n\t\t\t\t\tassignment.name,\n\t\t\t\t\tassignment.type as FieldType,\n\t\t\t\t\tassignmentValue,\n\t\t\t\t\tthis.getNode(),\n\t\t\t\t\ti,\n\t\t\t\t\tfalse,\n\t\t\t\t\t1,\n\t\t\t\t);\n\n\t\t\t\treturn [name, value];\n\t\t\t}),\n\t\t);\n\n\t\tconst returnItem = composeReturnItem.call(\n\t\t\tthis,\n\t\t\ti,\n\t\t\tnewItem,\n\t\t\tnewData,\n\t\t\t{ dotNotation: false, include: 'none' },\n\t\t\t1,\n\t\t);\n\t\tmetrics.push(returnItem);\n\t}\n\n\treturn [metrics];\n}\n\nexport async function checkIfEvaluating(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {\n\tconst evaluationExecutionResult: INodeExecutionData[] = [];\n\tconst normalExecutionResult: INodeExecutionData[] = [];\n\n\tconst evaluationNode = this.getNode();\n\tconst parentNodes = this.getParentNodes(evaluationNode.name);\n\n\tconst evalTrigger = parentNodes.find((node) => node.type === 'n8n-nodes-base.evaluationTrigger');\n\tconst evalTriggerOutput = evalTrigger\n\t\t? this.evaluateExpression(`{{ $('${evalTrigger?.name}').isExecuted }}`, 0)\n\t\t: undefined;\n\n\tif (evalTriggerOutput) {\n\t\treturn [this.getInputData(), normalExecutionResult];\n\t} else {\n\t\treturn [evaluationExecutionResult, this.getInputData()];\n\t}\n}\n\nexport function setOutputs(parameters: INodeParameters) {\n\tif (parameters.operation === 'checkIfEvaluating') {\n\t\treturn [\n\t\t\t{ type: 'main', displayName: 'Evaluation' },\n\t\t\t{ type: 'main', displayName: 'Normal' },\n\t\t];\n\t}\n\n\treturn [{ type: 'main' }];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA8C;AAU9C,oCAAyC;AACzC,mBAAiD;AAEjD,eAAsB,YAAoE;AACzF,QAAM,iBAAiB,KAAK,QAAQ;AACpC,QAAM,cAAc,KAAK,eAAe,eAAe,IAAI;AAE3D,QAAM,cAAc,YAAY,KAAK,CAAC,SAAS,KAAK,SAAS,kCAAkC;AAC/F,QAAM,oBAAoB,cACvB,KAAK,mBAAmB,SAAS,aAAa,IAAI,oBAAoB,CAAC,IACvE;AAEH,MAAI,CAAC,eAAe,CAAC,mBAAmB;AACvC,SAAK,kBAAkB;AAAA,MACtB,SAAS;AAAA,MACT,UAAU;AAAA,IACX,CAAC;AACD,WAAO,CAAC,KAAK,aAAa,CAAC;AAAA,EAC5B;AAEA,QAAM,eAAe,KAAK,iBAAiB,kBAAkB,GAAG,CAAC,CAAC;AAKlE,MAAI,aAAa,WAAW,GAAG;AAC9B,UAAM,IAAI,8BAAU,qBAAqB;AAAA,MACxC,aAAa;AAAA,IACd,CAAC;AAAA,EACF;AAEA,QAAM,sBAAsB,6CAAe,KAAK,IAAI;AACpD,QAAM,cAAc,MAAM,uCAAS,KAAK,MAAM,mBAAmB;AAEjE,QAAM,oBAAoB,KAAK;AAAA,IAC9B,SAAS,YAAY,IAAI;AAAA,IACzB;AAAA,EACD;AAEA,QAAM,YACL,kBAAkB,eAAe,eAAe,IAAI,kBAAkB;AAEvE,QAAM,cAAc,OAAO,KAAK,iBAAiB,EAAE;AAAA,IAClD,CAAC,QAAQ,QAAQ,gBAAgB,QAAQ;AAAA,EAC1C;AAEA,eAAa,QAAQ,C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OAAO,CAAC;AACzB;","names":[]}
|
|
@@ -209,14 +209,15 @@ class ExecuteWorkflowTrigger {
|
|
|
209
209
|
} else {
|
|
210
210
|
const newParams = (0, import_GenericFunctions.getFieldEntries)(this);
|
|
211
211
|
const newKeys = new Set(newParams.fields.map((x) => x.name));
|
|
212
|
-
const itemsInSchema = inputData.map((
|
|
212
|
+
const itemsInSchema = inputData.map(({ json, binary }, index) => ({
|
|
213
213
|
json: {
|
|
214
214
|
...Object.fromEntries(newParams.fields.map((x) => [x.name, import_constants.FALLBACK_DEFAULT_VALUE])),
|
|
215
215
|
// Need to trim to the expected schema to support legacy Execute Workflow callers passing through all their data
|
|
216
216
|
// which we do not want to expose past this node.
|
|
217
|
-
...import_lodash.default.pickBy(
|
|
217
|
+
...import_lodash.default.pickBy(json, (_value, key) => newKeys.has(key))
|
|
218
218
|
},
|
|
219
|
-
index
|
|
219
|
+
index,
|
|
220
|
+
binary
|
|
220
221
|
}));
|
|
221
222
|
return [itemsInSchema];
|
|
222
223
|
}
|
package/dist/nodes/ExecuteWorkflow/ExecuteWorkflowTrigger/ExecuteWorkflowTrigger.node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../nodes/ExecuteWorkflow/ExecuteWorkflowTrigger/ExecuteWorkflowTrigger.node.ts"],"sourcesContent":["import _ from 'lodash';\nimport {\n\ttype INodeExecutionData,\n\tNodeConnectionTypes,\n\ttype IExecuteFunctions,\n\ttype INodeType,\n\ttype INodeTypeDescription,\n} from 'n8n-workflow';\n\nimport {\n\tINPUT_SOURCE,\n\tWORKFLOW_INPUTS,\n\tJSON_EXAMPLE,\n\tVALUES,\n\tTYPE_OPTIONS,\n\tPASSTHROUGH,\n\tFALLBACK_DEFAULT_VALUE,\n} from '../../../utils/workflowInputsResourceMapping/constants';\nimport { getFieldEntries } from '../../../utils/workflowInputsResourceMapping/GenericFunctions';\n\nexport class ExecuteWorkflowTrigger implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Execute Workflow Trigger',\n\t\tname: 'executeWorkflowTrigger',\n\t\ticon: 'fa:sign-out-alt',\n\t\tgroup: ['trigger'],\n\t\tversion: [1, 1.1],\n\t\tdescription:\n\t\t\t'Helpers for calling other n8n workflows. Used for designing modular, microservice-like workflows.',\n\t\teventTriggerDescription: '',\n\t\tmaxNodes: 1,\n\t\tdefaults: {\n\t\t\tname: 'When Executed by Another Workflow',\n\t\t\tcolor: '#ff6d5a',\n\t\t},\n\t\tinputs: [],\n\t\toutputs: [NodeConnectionTypes.Main],\n\t\thints: [\n\t\t\t{\n\t\t\t\tmessage:\n\t\t\t\t\t\"This workflow isn't set to accept any input data. Fill out the workflow input schema or change the workflow to accept any data passed to it.\",\n\t\t\t\t// This condition checks if we have no input fields, which gets a bit awkward:\n\t\t\t\t// For WORKFLOW_INPUTS: keys() only contains `VALUES` if at least one value is provided\n\t\t\t\t// For JSON_EXAMPLE: We remove all whitespace and check if we're left with an empty object. Note that we already error if the example is not valid JSON\n\t\t\t\tdisplayCondition:\n\t\t\t\t\t`={{$parameter['${INPUT_SOURCE}'] === '${WORKFLOW_INPUTS}' && !$parameter['${WORKFLOW_INPUTS}'].keys().length ` +\n\t\t\t\t\t`|| $parameter['${INPUT_SOURCE}'] === '${JSON_EXAMPLE}' && $parameter['${JSON_EXAMPLE}'].toString().replaceAll(' ', '').replaceAll('\\\\n', '') === '{}' }}`,\n\t\t\t\twhenToDisplay: 'always',\n\t\t\t\tlocation: 'ndv',\n\t\t\t},\n\t\t],\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Events',\n\t\t\t\tname: 'events',\n\t\t\t\ttype: 'hidden',\n\t\t\t\tnoDataExpression: true,\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Workflow Call',\n\t\t\t\t\t\tvalue: 'worklfow_call',\n\t\t\t\t\t\tdescription: 'When executed by another workflow using Execute Workflow Trigger',\n\t\t\t\t\t\taction: 'When executed by Another Workflow',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'worklfow_call',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName:\n\t\t\t\t\t\"When an ‘execute workflow’ node calls this workflow, the execution starts here. Any data passed into the 'execute workflow' node will be output by this node.\",\n\t\t\t\tname: 'notice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: { '@version': [{ _cnd: { eq: 1 } }] },\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'This node is out of date. Please upgrade by removing it and adding a new one',\n\t\t\t\tname: 'outdatedVersionWarning',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdisplayOptions: { show: { '@version': [{ _cnd: { eq: 1 } }] } },\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\t// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased\n\t\t\t\tdisplayName: 'Input data mode',\n\t\t\t\tname: INPUT_SOURCE,\n\t\t\t\ttype: 'options',\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\t// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased\n\t\t\t\t\t\tname: 'Define using fields below',\n\t\t\t\t\t\tvalue: WORKFLOW_INPUTS,\n\t\t\t\t\t\tdescription: 'Provide input fields via UI',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased\n\t\t\t\t\t\tname: 'Define using JSON example',\n\t\t\t\t\t\tvalue: JSON_EXAMPLE,\n\t\t\t\t\t\tdescription: 'Generate a schema from an example JSON object',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased\n\t\t\t\t\t\tname: 'Accept all data',\n\t\t\t\t\t\tvalue: PASSTHROUGH,\n\t\t\t\t\t\tdescription: 'Use all incoming data from the parent workflow',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: WORKFLOW_INPUTS,\n\t\t\t\tnoDataExpression: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: { '@version': [{ _cnd: { gte: 1.1 } }] },\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName:\n\t\t\t\t\t'Provide an example object to infer fields and their types.<br>To allow any type for a given field, set the value to null.',\n\t\t\t\tname: `${JSON_EXAMPLE}_notice`,\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: { '@version': [{ _cnd: { gte: 1.1 } }], inputSource: [JSON_EXAMPLE] },\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'JSON Example',\n\t\t\t\tname: JSON_EXAMPLE,\n\t\t\t\ttype: 'json',\n\t\t\t\tdefault: JSON.stringify(\n\t\t\t\t\t{\n\t\t\t\t\t\taField: 'a string',\n\t\t\t\t\t\taNumber: 123,\n\t\t\t\t\t\tthisFieldAcceptsAnyType: null,\n\t\t\t\t\t\tanArray: [],\n\t\t\t\t\t},\n\t\t\t\t\tnull,\n\t\t\t\t\t2,\n\t\t\t\t),\n\t\t\t\tnoDataExpression: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: { '@version': [{ _cnd: { gte: 1.1 } }], inputSource: [JSON_EXAMPLE] },\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Workflow Input Schema',\n\t\t\t\tname: WORKFLOW_INPUTS,\n\t\t\t\tplaceholder: 'Add field',\n\t\t\t\ttype: 'fixedCollection',\n\t\t\t\tdescription:\n\t\t\t\t\t'Define expected input fields. If no inputs are provided, all data from the calling workflow will be passed through.',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\tmultipleValues: true,\n\t\t\t\t\tsortable: true,\n\t\t\t\t\tminRequiredFields: 1,\n\t\t\t\t},\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: { '@version': [{ _cnd: { gte: 1.1 } }], inputSource: [WORKFLOW_INPUTS] },\n\t\t\t\t},\n\t\t\t\tdefault: {},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: VALUES,\n\t\t\t\t\t\tdisplayName: 'Values',\n\t\t\t\t\t\tvalues: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Name',\n\t\t\t\t\t\t\t\tname: 'name',\n\t\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\t\tplaceholder: 'e.g. fieldName',\n\t\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t\t'A unique name for this workflow input, used to reference it from another workflows',\n\t\t\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\t\t\tnoDataExpression: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Type',\n\t\t\t\t\t\t\t\tname: 'type',\n\t\t\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t\t\"Expected data type for this input value. Determines how this field's values are stored, validated, and displayed.\",\n\t\t\t\t\t\t\t\toptions: TYPE_OPTIONS,\n\t\t\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\t\t\tdefault: 'string',\n\t\t\t\t\t\t\t\tnoDataExpression: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t};\n\n\tasync execute(this: IExecuteFunctions) {\n\t\tconst inputData = this.getInputData();\n\t\tconst inputSource = this.getNodeParameter(INPUT_SOURCE, 0, PASSTHROUGH) as string;\n\n\t\t// Note on the data we receive from ExecuteWorkflow caller:\n\t\t//\n\t\t// The ExecuteWorkflow node typechecks all fields explicitly provided by the user here via the resourceMapper\n\t\t// and removes all fields that are in the schema, but `removed` in the resourceMapper.\n\t\t//\n\t\t// In passthrough and legacy node versions, inputData will line up since the resourceMapper is empty,\n\t\t// in which case all input is passed through.\n\t\t// In other cases we will already have matching types and fields provided by the resource mapper,\n\t\t// so we just need to be permissive on this end,\n\t\t// while ensuring we provide default values for fields in our schema, which are removed in the resourceMapper.\n\n\t\tif (inputSource === PASSTHROUGH) {\n\t\t\treturn [inputData];\n\t\t} else {\n\t\t\tconst newParams = getFieldEntries(this);\n\t\t\tconst newKeys = new Set(newParams.fields.map((x) => x.name));\n\t\t\tconst itemsInSchema: INodeExecutionData[] = inputData.map((row, index) => ({\n\t\t\t\tjson: {\n\t\t\t\t\t...Object.fromEntries(newParams.fields.map((x) => [x.name, FALLBACK_DEFAULT_VALUE])),\n\t\t\t\t\t// Need to trim to the expected schema to support legacy Execute Workflow callers passing through all their data\n\t\t\t\t\t// which we do not want to expose past this node.\n\t\t\t\t\t..._.pickBy(row.json, (_value, key) => newKeys.has(key)),\n\t\t\t\t},\n\t\t\t\tindex,\n\t\t\t}));\n\n\t\t\treturn [itemsInSchema];\n\t\t}\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAc;AACd,0BAMO;AAEP,uBAQO;AACP,8BAAgC;AAEzB,MAAM,uBAA4C;AAAA,EAAlD;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO,CAAC,SAAS;AAAA,MACjB,SAAS,CAAC,GAAG,GAAG;AAAA,MAChB,aACC;AAAA,MACD,yBAAyB;AAAA,MACzB,UAAU;AAAA,MACV,UAAU;AAAA,QACT,MAAM;AAAA,QACN,OAAO;AAAA,MACR;AAAA,MACA,QAAQ,CAAC;AAAA,MACT,SAAS,CAAC,wCAAoB,IAAI;AAAA,MAClC,OAAO;AAAA,QACN;AAAA,UACC,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;AAAA,kBACT,aAAa;AAAA,kBACb,aACC;AAAA,kBACD,UAAU;AAAA,kBACV,kBAAkB;AAAA,gBACnB;AAAA,gBACA;AAAA,kBACC,aAAa;AAAA,kBACb,MAAM;AAAA,kBACN,MAAM;AAAA,kBACN,aACC;AAAA,kBACD,SAAS;AAAA,kBACT,UAAU;AAAA,kBACV,SAAS;AAAA,kBACT,kBAAkB;AAAA,gBACnB;AAAA,cACD;AAAA,YACD;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA;AAAA,EAEA,MAAM,UAAiC;AACtC,UAAM,YAAY,KAAK,aAAa;AACpC,UAAM,cAAc,KAAK,iBAAiB,+BAAc,GAAG,4BAAW;AAatE,QAAI,gBAAgB,8BAAa;AAChC,aAAO,CAAC,SAAS;AAAA,IAClB,OAAO;AACN,YAAM,gBAAY,yCAAgB,IAAI;AACtC,YAAM,UAAU,IAAI,IAAI,UAAU,OAAO,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC;AAC3D,YAAM,gBAAsC,UAAU,IAAI,CAAC,KAAK,WAAW;AAAA,QAC1E,MAAM;AAAA,UACL,GAAG,OAAO,YAAY,UAAU,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,uCAAsB,CAAC,CAAC;AAAA;AAAA;AAAA,UAGnF,GAAG,cAAAA,QAAE,OAAO,IAAI,MAAM,CAAC,QAAQ,QAAQ,QAAQ,IAAI,GAAG,CAAC;AAAA,QACxD;AAAA,QACA;AAAA,MACD,EAAE;AAEF,aAAO,CAAC,aAAa;AAAA,IACtB;AAAA,EACD;AACD;","names":["_"]}
|
|
1
|
+
{"version":3,"sources":["../../../../nodes/ExecuteWorkflow/ExecuteWorkflowTrigger/ExecuteWorkflowTrigger.node.ts"],"sourcesContent":["import _ from 'lodash';\nimport {\n\ttype INodeExecutionData,\n\tNodeConnectionTypes,\n\ttype IExecuteFunctions,\n\ttype INodeType,\n\ttype INodeTypeDescription,\n} from 'n8n-workflow';\n\nimport {\n\tINPUT_SOURCE,\n\tWORKFLOW_INPUTS,\n\tJSON_EXAMPLE,\n\tVALUES,\n\tTYPE_OPTIONS,\n\tPASSTHROUGH,\n\tFALLBACK_DEFAULT_VALUE,\n} from '../../../utils/workflowInputsResourceMapping/constants';\nimport { getFieldEntries } from '../../../utils/workflowInputsResourceMapping/GenericFunctions';\n\nexport class ExecuteWorkflowTrigger implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Execute Workflow Trigger',\n\t\tname: 'executeWorkflowTrigger',\n\t\ticon: 'fa:sign-out-alt',\n\t\tgroup: ['trigger'],\n\t\tversion: [1, 1.1],\n\t\tdescription:\n\t\t\t'Helpers for calling other n8n workflows. Used for designing modular, microservice-like workflows.',\n\t\teventTriggerDescription: '',\n\t\tmaxNodes: 1,\n\t\tdefaults: {\n\t\t\tname: 'When Executed by Another Workflow',\n\t\t\tcolor: '#ff6d5a',\n\t\t},\n\t\tinputs: [],\n\t\toutputs: [NodeConnectionTypes.Main],\n\t\thints: [\n\t\t\t{\n\t\t\t\tmessage:\n\t\t\t\t\t\"This workflow isn't set to accept any input data. Fill out the workflow input schema or change the workflow to accept any data passed to it.\",\n\t\t\t\t// This condition checks if we have no input fields, which gets a bit awkward:\n\t\t\t\t// For WORKFLOW_INPUTS: keys() only contains `VALUES` if at least one value is provided\n\t\t\t\t// For JSON_EXAMPLE: We remove all whitespace and check if we're left with an empty object. Note that we already error if the example is not valid JSON\n\t\t\t\tdisplayCondition:\n\t\t\t\t\t`={{$parameter['${INPUT_SOURCE}'] === '${WORKFLOW_INPUTS}' && !$parameter['${WORKFLOW_INPUTS}'].keys().length ` +\n\t\t\t\t\t`|| $parameter['${INPUT_SOURCE}'] === '${JSON_EXAMPLE}' && $parameter['${JSON_EXAMPLE}'].toString().replaceAll(' ', '').replaceAll('\\\\n', '') === '{}' }}`,\n\t\t\t\twhenToDisplay: 'always',\n\t\t\t\tlocation: 'ndv',\n\t\t\t},\n\t\t],\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Events',\n\t\t\t\tname: 'events',\n\t\t\t\ttype: 'hidden',\n\t\t\t\tnoDataExpression: true,\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Workflow Call',\n\t\t\t\t\t\tvalue: 'worklfow_call',\n\t\t\t\t\t\tdescription: 'When executed by another workflow using Execute Workflow Trigger',\n\t\t\t\t\t\taction: 'When executed by Another Workflow',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'worklfow_call',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName:\n\t\t\t\t\t\"When an ‘execute workflow’ node calls this workflow, the execution starts here. Any data passed into the 'execute workflow' node will be output by this node.\",\n\t\t\t\tname: 'notice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: { '@version': [{ _cnd: { eq: 1 } }] },\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'This node is out of date. Please upgrade by removing it and adding a new one',\n\t\t\t\tname: 'outdatedVersionWarning',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdisplayOptions: { show: { '@version': [{ _cnd: { eq: 1 } }] } },\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\t// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased\n\t\t\t\tdisplayName: 'Input data mode',\n\t\t\t\tname: INPUT_SOURCE,\n\t\t\t\ttype: 'options',\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\t// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased\n\t\t\t\t\t\tname: 'Define using fields below',\n\t\t\t\t\t\tvalue: WORKFLOW_INPUTS,\n\t\t\t\t\t\tdescription: 'Provide input fields via UI',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased\n\t\t\t\t\t\tname: 'Define using JSON example',\n\t\t\t\t\t\tvalue: JSON_EXAMPLE,\n\t\t\t\t\t\tdescription: 'Generate a schema from an example JSON object',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased\n\t\t\t\t\t\tname: 'Accept all data',\n\t\t\t\t\t\tvalue: PASSTHROUGH,\n\t\t\t\t\t\tdescription: 'Use all incoming data from the parent workflow',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: WORKFLOW_INPUTS,\n\t\t\t\tnoDataExpression: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: { '@version': [{ _cnd: { gte: 1.1 } }] },\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName:\n\t\t\t\t\t'Provide an example object to infer fields and their types.<br>To allow any type for a given field, set the value to null.',\n\t\t\t\tname: `${JSON_EXAMPLE}_notice`,\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: { '@version': [{ _cnd: { gte: 1.1 } }], inputSource: [JSON_EXAMPLE] },\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'JSON Example',\n\t\t\t\tname: JSON_EXAMPLE,\n\t\t\t\ttype: 'json',\n\t\t\t\tdefault: JSON.stringify(\n\t\t\t\t\t{\n\t\t\t\t\t\taField: 'a string',\n\t\t\t\t\t\taNumber: 123,\n\t\t\t\t\t\tthisFieldAcceptsAnyType: null,\n\t\t\t\t\t\tanArray: [],\n\t\t\t\t\t},\n\t\t\t\t\tnull,\n\t\t\t\t\t2,\n\t\t\t\t),\n\t\t\t\tnoDataExpression: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: { '@version': [{ _cnd: { gte: 1.1 } }], inputSource: [JSON_EXAMPLE] },\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Workflow Input Schema',\n\t\t\t\tname: WORKFLOW_INPUTS,\n\t\t\t\tplaceholder: 'Add field',\n\t\t\t\ttype: 'fixedCollection',\n\t\t\t\tdescription:\n\t\t\t\t\t'Define expected input fields. If no inputs are provided, all data from the calling workflow will be passed through.',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\tmultipleValues: true,\n\t\t\t\t\tsortable: true,\n\t\t\t\t\tminRequiredFields: 1,\n\t\t\t\t},\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: { '@version': [{ _cnd: { gte: 1.1 } }], inputSource: [WORKFLOW_INPUTS] },\n\t\t\t\t},\n\t\t\t\tdefault: {},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: VALUES,\n\t\t\t\t\t\tdisplayName: 'Values',\n\t\t\t\t\t\tvalues: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Name',\n\t\t\t\t\t\t\t\tname: 'name',\n\t\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\t\tplaceholder: 'e.g. fieldName',\n\t\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t\t'A unique name for this workflow input, used to reference it from another workflows',\n\t\t\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\t\t\tnoDataExpression: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Type',\n\t\t\t\t\t\t\t\tname: 'type',\n\t\t\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t\t\"Expected data type for this input value. Determines how this field's values are stored, validated, and displayed.\",\n\t\t\t\t\t\t\t\toptions: TYPE_OPTIONS,\n\t\t\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\t\t\tdefault: 'string',\n\t\t\t\t\t\t\t\tnoDataExpression: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t};\n\n\tasync execute(this: IExecuteFunctions) {\n\t\tconst inputData = this.getInputData();\n\t\tconst inputSource = this.getNodeParameter(INPUT_SOURCE, 0, PASSTHROUGH) as string;\n\n\t\t// Note on the data we receive from ExecuteWorkflow caller:\n\t\t//\n\t\t// The ExecuteWorkflow node typechecks all fields explicitly provided by the user here via the resourceMapper\n\t\t// and removes all fields that are in the schema, but `removed` in the resourceMapper.\n\t\t//\n\t\t// In passthrough and legacy node versions, inputData will line up since the resourceMapper is empty,\n\t\t// in which case all input is passed through.\n\t\t// In other cases we will already have matching types and fields provided by the resource mapper,\n\t\t// so we just need to be permissive on this end,\n\t\t// while ensuring we provide default values for fields in our schema, which are removed in the resourceMapper.\n\n\t\tif (inputSource === PASSTHROUGH) {\n\t\t\treturn [inputData];\n\t\t} else {\n\t\t\tconst newParams = getFieldEntries(this);\n\t\t\tconst newKeys = new Set(newParams.fields.map((x) => x.name));\n\t\t\tconst itemsInSchema: INodeExecutionData[] = inputData.map(({ json, binary }, index) => ({\n\t\t\t\tjson: {\n\t\t\t\t\t...Object.fromEntries(newParams.fields.map((x) => [x.name, FALLBACK_DEFAULT_VALUE])),\n\t\t\t\t\t// Need to trim to the expected schema to support legacy Execute Workflow callers passing through all their data\n\t\t\t\t\t// which we do not want to expose past this node.\n\t\t\t\t\t..._.pickBy(json, (_value, key) => newKeys.has(key)),\n\t\t\t\t},\n\t\t\t\tindex,\n\t\t\t\tbinary,\n\t\t\t}));\n\n\t\t\treturn [itemsInSchema];\n\t\t}\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAc;AACd,0BAMO;AAEP,uBAQO;AACP,8BAAgC;AAEzB,MAAM,uBAA4C;AAAA,EAAlD;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA,M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AAA,MACD,EAAE;AAEF,aAAO,CAAC,aAAa;AAAA,IACtB;AAAA,EACD;AACD;","names":["_"]}
|
|
@@ -333,8 +333,8 @@ const formRespondMode = {
|
|
|
333
333
|
const formTriggerPanel = {
|
|
334
334
|
header: "Pull in a test form submission",
|
|
335
335
|
executionsHelp: {
|
|
336
|
-
inactive: `Form Trigger has two modes: test and production. <br /> <br /> <b>Use test mode while you build your workflow</b>. Click the '
|
|
337
|
-
active: `Form Trigger has two modes: test and production. <br /> <br /> <b>Use test mode while you build your workflow</b>. Click the '
|
|
336
|
+
inactive: `Form Trigger has two modes: test and production. <br /> <br /> <b>Use test mode while you build your workflow</b>. Click the 'Execute step' button, then fill out the test form that opens in a popup tab. The executions will show up in the editor.<br /> <br /> <b>Use production mode to run your workflow automatically</b>. <a data-key="activate">Activate</a> the workflow, then make requests to the production URL. Then every time there's a form submission via the Production Form URL, the workflow will execute. These executions will show up in the executions list, but not in the editor.`,
|
|
337
|
+
active: `Form Trigger has two modes: test and production. <br /> <br /> <b>Use test mode while you build your workflow</b>. Click the 'Execute step' button, then fill out the test form that opens in a popup tab. The executions will show up in the editor.<br /> <br /> <b>Use production mode to run your workflow automatically</b>. <a data-key="activate">Activate</a> the workflow, then make requests to the production URL. Then every time there's a form submission via the Production Form URL, the workflow will execute. These executions will show up in the executions list, but not in the editor.`
|
|
338
338
|
},
|
|
339
339
|
activationHint: {
|
|
340
340
|
active: "This node will also trigger automatically on new form submissions (but those executions won't show up here).",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../nodes/Form/common.descriptions.ts"],"sourcesContent":["import type { INodeProperties } from 'n8n-workflow';\n\nimport { appendAttributionOption } from '../../utils/descriptions';\n\nexport const placeholder: string = `\n<!-- Your custom HTML here --->\n\n\n`.trimStart();\n\nexport const webhookPath: INodeProperties = {\n\tdisplayName: 'Form Path',\n\tname: 'path',\n\ttype: 'string',\n\tdefault: '',\n\tplaceholder: 'webhook',\n\trequired: true,\n\tdescription: \"The final segment of the form's URL, both for test and production\",\n};\n\nexport const formTitle: INodeProperties = {\n\tdisplayName: 'Form Title',\n\tname: 'formTitle',\n\ttype: 'string',\n\tdefault: '',\n\tplaceholder: 'e.g. Contact us',\n\trequired: true,\n\tdescription: 'Shown at the top of the form',\n};\n\nexport const formDescription: INodeProperties = {\n\tdisplayName: 'Form Description',\n\tname: 'formDescription',\n\ttype: 'string',\n\tdefault: '',\n\tplaceholder: \"e.g. We'll get back to you soon\",\n\tdescription:\n\t\t'Shown underneath the Form Title. Can be used to prompt the user on how to complete the form. Accepts HTML.',\n\ttypeOptions: {\n\t\trows: 2,\n\t},\n};\n\nexport const formFields: INodeProperties = {\n\tdisplayName: 'Form Elements',\n\tname: 'formFields',\n\tplaceholder: 'Add Form Element',\n\ttype: 'fixedCollection',\n\tdefault: {},\n\ttypeOptions: {\n\t\tmultipleValues: true,\n\t\tsortable: true,\n\t},\n\toptions: [\n\t\t{\n\t\t\tdisplayName: 'Values',\n\t\t\tname: 'values',\n\t\t\tvalues: [\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Field Name',\n\t\t\t\t\tname: 'fieldLabel',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tplaceholder: 'e.g. What is your name?',\n\t\t\t\t\tdescription: 'Label that appears above the input field',\n\t\t\t\t\trequired: true,\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\thide: {\n\t\t\t\t\t\t\tfieldType: ['hiddenField', 'html'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Element Type',\n\t\t\t\t\tname: 'fieldType',\n\t\t\t\t\ttype: 'options',\n\t\t\t\t\tdefault: 'text',\n\t\t\t\t\tdescription: 'The type of field to add to the form',\n\t\t\t\t\toptions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'Custom HTML',\n\t\t\t\t\t\t\tvalue: 'html',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'Date',\n\t\t\t\t\t\t\tvalue: 'date',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'Dropdown List',\n\t\t\t\t\t\t\tvalue: 'dropdown',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'Email',\n\t\t\t\t\t\t\tvalue: 'email',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'File',\n\t\t\t\t\t\t\tvalue: 'file',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'Hidden Field',\n\t\t\t\t\t\t\tvalue: 'hiddenField',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'Number',\n\t\t\t\t\t\t\tvalue: 'number',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'Password',\n\t\t\t\t\t\t\tvalue: 'password',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'Text',\n\t\t\t\t\t\t\tvalue: 'text',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'Textarea',\n\t\t\t\t\t\t\tvalue: 'textarea',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\trequired: true,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Element Name',\n\t\t\t\t\tname: 'elementName',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tplaceholder: 'e.g. content-section',\n\t\t\t\t\tdescription: 'Optional field. It can be used to include the html in the output.',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tfieldType: ['html'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Placeholder',\n\t\t\t\t\tname: 'placeholder',\n\t\t\t\t\tdescription: 'Sample text to display inside the field',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\thide: {\n\t\t\t\t\t\t\tfieldType: ['dropdown', 'date', 'file', 'html', 'hiddenField'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Field Name',\n\t\t\t\t\tname: 'fieldName',\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t'The name of the field, used in input attributes and referenced by the workflow',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tfieldType: ['hiddenField'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Field Value',\n\t\t\t\t\tname: 'fieldValue',\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t'Input value can be set here or will be passed as a query parameter via Field Name if no value is set',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tfieldType: ['hiddenField'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Field Options',\n\t\t\t\t\tname: 'fieldOptions',\n\t\t\t\t\tplaceholder: 'Add Field Option',\n\t\t\t\t\tdescription: 'List of options that can be selected from the dropdown',\n\t\t\t\t\ttype: 'fixedCollection',\n\t\t\t\t\tdefault: { values: [{ option: '' }] },\n\t\t\t\t\trequired: true,\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tfieldType: ['dropdown'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\tmultipleValues: true,\n\t\t\t\t\t\tsortable: true,\n\t\t\t\t\t},\n\t\t\t\t\toptions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Values',\n\t\t\t\t\t\t\tname: 'values',\n\t\t\t\t\t\t\tvalues: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tdisplayName: 'Option',\n\t\t\t\t\t\t\t\t\tname: 'option',\n\t\t\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Multiple Choice',\n\t\t\t\t\tname: 'multiselect',\n\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\tdefault: false,\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t'Whether to allow the user to select multiple options from the dropdown list',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tfieldType: ['dropdown'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'HTML',\n\t\t\t\t\tname: 'html',\n\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\teditor: 'htmlEditor',\n\t\t\t\t\t},\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tnoDataExpression: true,\n\t\t\t\t\tdefault: placeholder,\n\t\t\t\t\tdescription: 'HTML elements to display on the form page',\n\t\t\t\t\thint: 'Does not accept <code><script></code>, <code><style></code> or <code><input></code> tags',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tfieldType: ['html'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Multiple Files',\n\t\t\t\t\tname: 'multipleFiles',\n\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\tdefault: true,\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t'Whether to allow the user to select multiple files from the file input or just one',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tfieldType: ['file'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Accepted File Types',\n\t\t\t\t\tname: 'acceptFileTypes',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tdescription: 'Comma-separated list of allowed file extensions',\n\t\t\t\t\thint: 'Leave empty to allow all file types',\n\t\t\t\t\tplaceholder: 'e.g. .jpg, .png',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tfieldType: ['file'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: \"The displayed date is formatted based on the locale of the user's browser\",\n\t\t\t\t\tname: 'formatDate',\n\t\t\t\t\ttype: 'notice',\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tfieldType: ['date'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Required Field',\n\t\t\t\t\tname: 'requiredField',\n\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\tdefault: false,\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t'Whether to require the user to enter a value for this field before submitting the form',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\thide: {\n\t\t\t\t\t\t\tfieldType: ['html', 'hiddenField'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t],\n};\n\nexport const formRespondMode: INodeProperties = {\n\tdisplayName: 'Respond When',\n\tname: 'responseMode',\n\ttype: 'options',\n\toptions: [\n\t\t{\n\t\t\tname: 'Form Is Submitted',\n\t\t\tvalue: 'onReceived',\n\t\t\tdescription: 'As soon as this node receives the form submission',\n\t\t},\n\t\t{\n\t\t\tname: 'Workflow Finishes',\n\t\t\tvalue: 'lastNode',\n\t\t\tdescription: 'When the last node of the workflow is executed',\n\t\t},\n\t\t{\n\t\t\tname: \"Using 'Respond to Webhook' Node\",\n\t\t\tvalue: 'responseNode',\n\t\t\tdescription: \"When the 'Respond to Webhook' node is executed\",\n\t\t},\n\t],\n\tdefault: 'onReceived',\n\tdescription: 'When to respond to the form submission',\n};\n\nexport const formTriggerPanel = {\n\theader: 'Pull in a test form submission',\n\texecutionsHelp: {\n\t\tinactive:\n\t\t\t\"Form Trigger has two modes: test and production. <br /> <br /> <b>Use test mode while you build your workflow</b>. Click the 'Test step' button, then fill out the test form that opens in a popup tab. The executions will show up in the editor.<br /> <br /> <b>Use production mode to run your workflow automatically</b>. <a data-key=\\\"activate\\\">Activate</a> the workflow, then make requests to the production URL. Then every time there's a form submission via the Production Form URL, the workflow will execute. These executions will show up in the executions list, but not in the editor.\",\n\t\tactive:\n\t\t\t\"Form Trigger has two modes: test and production. <br /> <br /> <b>Use test mode while you build your workflow</b>. Click the 'Test step' button, then fill out the test form that opens in a popup tab. The executions will show up in the editor.<br /> <br /> <b>Use production mode to run your workflow automatically</b>. <a data-key=\\\"activate\\\">Activate</a> the workflow, then make requests to the production URL. Then every time there's a form submission via the Production Form URL, the workflow will execute. These executions will show up in the executions list, but not in the editor.\",\n\t},\n\tactivationHint: {\n\t\tactive:\n\t\t\t\"This node will also trigger automatically on new form submissions (but those executions won't show up here).\",\n\t\tinactive:\n\t\t\t'<a data-key=\"activate\">Activate</a> this workflow to have it also run automatically for new form submissions created via the Production URL.',\n\t},\n};\n\nexport const respondWithOptions: INodeProperties = {\n\tdisplayName: 'Form Response',\n\tname: 'respondWithOptions',\n\ttype: 'fixedCollection',\n\tplaceholder: 'Add option',\n\tdefault: { values: { respondWith: 'text' } },\n\toptions: [\n\t\t{\n\t\t\tdisplayName: 'Values',\n\t\t\tname: 'values',\n\t\t\tvalues: [\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Respond With',\n\t\t\t\t\tname: 'respondWith',\n\t\t\t\t\ttype: 'options',\n\t\t\t\t\tdefault: 'text',\n\t\t\t\t\toptions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'Form Submitted Text',\n\t\t\t\t\t\t\tvalue: 'text',\n\t\t\t\t\t\t\tdescription: 'Show a response text to the user',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'Redirect URL',\n\t\t\t\t\t\t\tvalue: 'redirect',\n\t\t\t\t\t\t\tdescription: 'Redirect the user to a URL',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Text to Show',\n\t\t\t\t\tname: 'formSubmittedText',\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t\"The text displayed to users after they fill the form. Leave it empty if don't want to show any additional text.\",\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: 'Your response has been recorded',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\trespondWith: ['text'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased\n\t\t\t\t\tdisplayName: 'URL to Redirect to',\n\t\t\t\t\tname: 'redirectUrl',\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t'The URL to redirect users to after they fill the form. Must be a valid URL.',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tvalidateType: 'url',\n\t\t\t\t\tplaceholder: 'e.g. http://www.n8n.io',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\trespondWith: ['redirect'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t],\n};\n\nexport const appendAttributionToForm: INodeProperties = {\n\t...appendAttributionOption,\n\tdescription: 'Whether to include the link “Form automated with n8n” at the bottom of the form',\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,0BAAwC;AAEjC,MAAM,cAAsB;AAAA;AAAA;AAAA;AAAA,EAIjC,UAAU;AAEL,MAAM,cAA+B;AAAA,EAC3C,aAAa;AAAA,EACb,MAAM;AAAA,EACN,MAAM;AAAA,EACN,SAAS;AAAA,EACT,aAAa;AAAA,EACb,UAAU;AAAA,EACV,aAAa;AACd;AAEO,MAAM,YAA6B;AAAA,EACzC,aAAa;AAAA,EACb,MAAM;AAAA,EACN,MAAM;AAAA,EACN,SAAS;AAAA,EACT,aAAa;AAAA,EACb,UAAU;AAAA,EACV,aAAa;AACd;AAEO,MAAM,kBAAmC;AAAA,EAC/C,aAAa;AAAA,EACb,MAAM;AAAA,EACN,MAAM;AAAA,EACN,SAAS;AAAA,EACT,aAAa;AAAA,EACb,aACC;AAAA,EACD,aAAa;AAAA,IACZ,MAAM;AAAA,EACP;AACD;AAEO,MAAM,aAA8B;AAAA,EAC1C,aAAa;AAAA,EACb,MAAM;AAAA,EACN,aAAa;AAAA,EACb,MAAM;AAAA,EACN,SAAS,CAAC;AAAA,EACV,aAAa;AAAA,IACZ,gBAAgB;AAAA,IAChB,UAAU;AAAA,EACX;AAAA,EACA,SAAS;AAAA,IACR;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,QAAQ;AAAA,QACP;AAAA,UACC,aAAa;AAAA,U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,gBAAgB;AAAA,YACf,MAAM;AAAA,cACL,aAAa,CAAC,UAAU;AAAA,YACzB;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACD;AAEO,MAAM,0BAA2C;AAAA,EACvD,GAAG;AAAA,EACH,aAAa;AACd;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../nodes/Form/common.descriptions.ts"],"sourcesContent":["import type { INodeProperties } from 'n8n-workflow';\n\nimport { appendAttributionOption } from '../../utils/descriptions';\n\nexport const placeholder: string = `\n<!-- Your custom HTML here --->\n\n\n`.trimStart();\n\nexport const webhookPath: INodeProperties = {\n\tdisplayName: 'Form Path',\n\tname: 'path',\n\ttype: 'string',\n\tdefault: '',\n\tplaceholder: 'webhook',\n\trequired: true,\n\tdescription: \"The final segment of the form's URL, both for test and production\",\n};\n\nexport const formTitle: INodeProperties = {\n\tdisplayName: 'Form Title',\n\tname: 'formTitle',\n\ttype: 'string',\n\tdefault: '',\n\tplaceholder: 'e.g. Contact us',\n\trequired: true,\n\tdescription: 'Shown at the top of the form',\n};\n\nexport const formDescription: INodeProperties = {\n\tdisplayName: 'Form Description',\n\tname: 'formDescription',\n\ttype: 'string',\n\tdefault: '',\n\tplaceholder: \"e.g. We'll get back to you soon\",\n\tdescription:\n\t\t'Shown underneath the Form Title. Can be used to prompt the user on how to complete the form. Accepts HTML.',\n\ttypeOptions: {\n\t\trows: 2,\n\t},\n};\n\nexport const formFields: INodeProperties = {\n\tdisplayName: 'Form Elements',\n\tname: 'formFields',\n\tplaceholder: 'Add Form Element',\n\ttype: 'fixedCollection',\n\tdefault: {},\n\ttypeOptions: {\n\t\tmultipleValues: true,\n\t\tsortable: true,\n\t},\n\toptions: [\n\t\t{\n\t\t\tdisplayName: 'Values',\n\t\t\tname: 'values',\n\t\t\tvalues: [\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Field Name',\n\t\t\t\t\tname: 'fieldLabel',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tplaceholder: 'e.g. What is your name?',\n\t\t\t\t\tdescription: 'Label that appears above the input field',\n\t\t\t\t\trequired: true,\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\thide: {\n\t\t\t\t\t\t\tfieldType: ['hiddenField', 'html'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Element Type',\n\t\t\t\t\tname: 'fieldType',\n\t\t\t\t\ttype: 'options',\n\t\t\t\t\tdefault: 'text',\n\t\t\t\t\tdescription: 'The type of field to add to the form',\n\t\t\t\t\toptions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'Custom HTML',\n\t\t\t\t\t\t\tvalue: 'html',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'Date',\n\t\t\t\t\t\t\tvalue: 'date',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'Dropdown List',\n\t\t\t\t\t\t\tvalue: 'dropdown',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'Email',\n\t\t\t\t\t\t\tvalue: 'email',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'File',\n\t\t\t\t\t\t\tvalue: 'file',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'Hidden Field',\n\t\t\t\t\t\t\tvalue: 'hiddenField',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'Number',\n\t\t\t\t\t\t\tvalue: 'number',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'Password',\n\t\t\t\t\t\t\tvalue: 'password',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'Text',\n\t\t\t\t\t\t\tvalue: 'text',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'Textarea',\n\t\t\t\t\t\t\tvalue: 'textarea',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\trequired: true,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Element Name',\n\t\t\t\t\tname: 'elementName',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tplaceholder: 'e.g. content-section',\n\t\t\t\t\tdescription: 'Optional field. It can be used to include the html in the output.',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tfieldType: ['html'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Placeholder',\n\t\t\t\t\tname: 'placeholder',\n\t\t\t\t\tdescription: 'Sample text to display inside the field',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\thide: {\n\t\t\t\t\t\t\tfieldType: ['dropdown', 'date', 'file', 'html', 'hiddenField'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Field Name',\n\t\t\t\t\tname: 'fieldName',\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t'The name of the field, used in input attributes and referenced by the workflow',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tfieldType: ['hiddenField'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Field Value',\n\t\t\t\t\tname: 'fieldValue',\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t'Input value can be set here or will be passed as a query parameter via Field Name if no value is set',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tfieldType: ['hiddenField'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Field Options',\n\t\t\t\t\tname: 'fieldOptions',\n\t\t\t\t\tplaceholder: 'Add Field Option',\n\t\t\t\t\tdescription: 'List of options that can be selected from the dropdown',\n\t\t\t\t\ttype: 'fixedCollection',\n\t\t\t\t\tdefault: { values: [{ option: '' }] },\n\t\t\t\t\trequired: true,\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tfieldType: ['dropdown'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\tmultipleValues: true,\n\t\t\t\t\t\tsortable: true,\n\t\t\t\t\t},\n\t\t\t\t\toptions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Values',\n\t\t\t\t\t\t\tname: 'values',\n\t\t\t\t\t\t\tvalues: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tdisplayName: 'Option',\n\t\t\t\t\t\t\t\t\tname: 'option',\n\t\t\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Multiple Choice',\n\t\t\t\t\tname: 'multiselect',\n\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\tdefault: false,\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t'Whether to allow the user to select multiple options from the dropdown list',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tfieldType: ['dropdown'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'HTML',\n\t\t\t\t\tname: 'html',\n\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\teditor: 'htmlEditor',\n\t\t\t\t\t},\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tnoDataExpression: true,\n\t\t\t\t\tdefault: placeholder,\n\t\t\t\t\tdescription: 'HTML elements to display on the form page',\n\t\t\t\t\thint: 'Does not accept <code><script></code>, <code><style></code> or <code><input></code> tags',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tfieldType: ['html'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Multiple Files',\n\t\t\t\t\tname: 'multipleFiles',\n\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\tdefault: true,\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t'Whether to allow the user to select multiple files from the file input or just one',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tfieldType: ['file'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Accepted File Types',\n\t\t\t\t\tname: 'acceptFileTypes',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tdescription: 'Comma-separated list of allowed file extensions',\n\t\t\t\t\thint: 'Leave empty to allow all file types',\n\t\t\t\t\tplaceholder: 'e.g. .jpg, .png',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tfieldType: ['file'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: \"The displayed date is formatted based on the locale of the user's browser\",\n\t\t\t\t\tname: 'formatDate',\n\t\t\t\t\ttype: 'notice',\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tfieldType: ['date'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Required Field',\n\t\t\t\t\tname: 'requiredField',\n\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\tdefault: false,\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t'Whether to require the user to enter a value for this field before submitting the form',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\thide: {\n\t\t\t\t\t\t\tfieldType: ['html', 'hiddenField'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t],\n};\n\nexport const formRespondMode: INodeProperties = {\n\tdisplayName: 'Respond When',\n\tname: 'responseMode',\n\ttype: 'options',\n\toptions: [\n\t\t{\n\t\t\tname: 'Form Is Submitted',\n\t\t\tvalue: 'onReceived',\n\t\t\tdescription: 'As soon as this node receives the form submission',\n\t\t},\n\t\t{\n\t\t\tname: 'Workflow Finishes',\n\t\t\tvalue: 'lastNode',\n\t\t\tdescription: 'When the last node of the workflow is executed',\n\t\t},\n\t\t{\n\t\t\tname: \"Using 'Respond to Webhook' Node\",\n\t\t\tvalue: 'responseNode',\n\t\t\tdescription: \"When the 'Respond to Webhook' node is executed\",\n\t\t},\n\t],\n\tdefault: 'onReceived',\n\tdescription: 'When to respond to the form submission',\n};\n\nexport const formTriggerPanel = {\n\theader: 'Pull in a test form submission',\n\texecutionsHelp: {\n\t\tinactive:\n\t\t\t\"Form Trigger has two modes: test and production. <br /> <br /> <b>Use test mode while you build your workflow</b>. Click the 'Execute step' button, then fill out the test form that opens in a popup tab. The executions will show up in the editor.<br /> <br /> <b>Use production mode to run your workflow automatically</b>. <a data-key=\\\"activate\\\">Activate</a> the workflow, then make requests to the production URL. Then every time there's a form submission via the Production Form URL, the workflow will execute. These executions will show up in the executions list, but not in the editor.\",\n\t\tactive:\n\t\t\t\"Form Trigger has two modes: test and production. <br /> <br /> <b>Use test mode while you build your workflow</b>. Click the 'Execute step' button, then fill out the test form that opens in a popup tab. The executions will show up in the editor.<br /> <br /> <b>Use production mode to run your workflow automatically</b>. <a data-key=\\\"activate\\\">Activate</a> the workflow, then make requests to the production URL. Then every time there's a form submission via the Production Form URL, the workflow will execute. These executions will show up in the executions list, but not in the editor.\",\n\t},\n\tactivationHint: {\n\t\tactive:\n\t\t\t\"This node will also trigger automatically on new form submissions (but those executions won't show up here).\",\n\t\tinactive:\n\t\t\t'<a data-key=\"activate\">Activate</a> this workflow to have it also run automatically for new form submissions created via the Production URL.',\n\t},\n};\n\nexport const respondWithOptions: INodeProperties = {\n\tdisplayName: 'Form Response',\n\tname: 'respondWithOptions',\n\ttype: 'fixedCollection',\n\tplaceholder: 'Add option',\n\tdefault: { values: { respondWith: 'text' } },\n\toptions: [\n\t\t{\n\t\t\tdisplayName: 'Values',\n\t\t\tname: 'values',\n\t\t\tvalues: [\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Respond With',\n\t\t\t\t\tname: 'respondWith',\n\t\t\t\t\ttype: 'options',\n\t\t\t\t\tdefault: 'text',\n\t\t\t\t\toptions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'Form Submitted Text',\n\t\t\t\t\t\t\tvalue: 'text',\n\t\t\t\t\t\t\tdescription: 'Show a response text to the user',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'Redirect URL',\n\t\t\t\t\t\t\tvalue: 'redirect',\n\t\t\t\t\t\t\tdescription: 'Redirect the user to a URL',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Text to Show',\n\t\t\t\t\tname: 'formSubmittedText',\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t\"The text displayed to users after they fill the form. Leave it empty if don't want to show any additional text.\",\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: 'Your response has been recorded',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\trespondWith: ['text'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased\n\t\t\t\t\tdisplayName: 'URL to Redirect to',\n\t\t\t\t\tname: 'redirectUrl',\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t'The URL to redirect users to after they fill the form. Must be a valid URL.',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tvalidateType: 'url',\n\t\t\t\t\tplaceholder: 'e.g. http://www.n8n.io',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\trespondWith: ['redirect'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t],\n};\n\nexport const appendAttributionToForm: INodeProperties = {\n\t...appendAttributionOption,\n\tdescription: 'Whether to include the link “Form automated with n8n” at the bottom of the form',\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,0BAAwC;AAEjC,MAAM,cAAsB;AAAA;AAAA;AAAA;AAAA,EAIjC,UAAU;AAEL,MAAM,cAA+B;AAAA,EAC3C,aAAa;AAAA,EACb,MAAM;AAAA,EACN,MAAM;AAAA,EACN,SAAS;AAAA,EACT,aAAa;AAAA,EACb,UAAU;AAAA,EACV,aAAa;AACd;AAEO,MAAM,YAA6B;AAAA,EACzC,aAAa;AAAA,EACb,MAAM;AAAA,EACN,MAAM;AAAA,EACN,SAAS;AAAA,EACT,aAAa;AAAA,EACb,UA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