n8n-nodes-base 1.92.0 → 1.93.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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/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 +13 -9
- /package/dist/{credentials/icons/SharePoint.svg → nodes/Microsoft/SharePoint/microsoftSharePoint.svg} +0 -0
|
@@ -0,0 +1,146 @@
|
|
|
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 Description_node_exports = {};
|
|
20
|
+
__export(Description_node_exports, {
|
|
21
|
+
setCheckIfEvaluatingProperties: () => setCheckIfEvaluatingProperties,
|
|
22
|
+
setMetricsProperties: () => setMetricsProperties,
|
|
23
|
+
setOutputProperties: () => setOutputProperties
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(Description_node_exports);
|
|
26
|
+
var import_GoogleSheetsTrigger = require("../../Google/Sheet/GoogleSheetsTrigger.node");
|
|
27
|
+
const setOutputProperties = [
|
|
28
|
+
{
|
|
29
|
+
displayName: "Credentials",
|
|
30
|
+
name: "credentials",
|
|
31
|
+
type: "credentials",
|
|
32
|
+
default: ""
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
...import_GoogleSheetsTrigger.document,
|
|
36
|
+
displayName: "Document Containing Dataset",
|
|
37
|
+
displayOptions: {
|
|
38
|
+
show: {
|
|
39
|
+
operation: ["setOutputs"]
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
...import_GoogleSheetsTrigger.sheet,
|
|
45
|
+
displayName: "Sheet Containing Dataset",
|
|
46
|
+
displayOptions: {
|
|
47
|
+
show: {
|
|
48
|
+
operation: ["setOutputs"]
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
displayName: "Outputs",
|
|
54
|
+
name: "outputs",
|
|
55
|
+
placeholder: "Add Output",
|
|
56
|
+
type: "fixedCollection",
|
|
57
|
+
typeOptions: {
|
|
58
|
+
multipleValueButtonText: "Add Output",
|
|
59
|
+
multipleValues: true
|
|
60
|
+
},
|
|
61
|
+
default: {},
|
|
62
|
+
options: [
|
|
63
|
+
{
|
|
64
|
+
displayName: "Filter",
|
|
65
|
+
name: "values",
|
|
66
|
+
values: [
|
|
67
|
+
{
|
|
68
|
+
displayName: "Name",
|
|
69
|
+
name: "outputName",
|
|
70
|
+
type: "string",
|
|
71
|
+
default: ""
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
displayName: "Value",
|
|
75
|
+
name: "outputValue",
|
|
76
|
+
type: "string",
|
|
77
|
+
default: ""
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
displayOptions: {
|
|
83
|
+
show: {
|
|
84
|
+
operation: ["setOutputs"]
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
];
|
|
89
|
+
const setCheckIfEvaluatingProperties = [
|
|
90
|
+
{
|
|
91
|
+
displayName: "Routes to the \u2018evaluation\u2019 branch if the execution started from an evaluation trigger. Otherwise routes to the \u2018normal\u2019 branch.",
|
|
92
|
+
name: "notice",
|
|
93
|
+
type: "notice",
|
|
94
|
+
default: "",
|
|
95
|
+
displayOptions: {
|
|
96
|
+
show: {
|
|
97
|
+
operation: ["checkIfEvaluating"]
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
];
|
|
102
|
+
const setMetricsProperties = [
|
|
103
|
+
{
|
|
104
|
+
displayName: "Calculate the score(s) for the evaluation, then map them into this node. They will be displayed in the \u2018evaluations\u2019 tab, not the Google Sheet. <a href='https://docs.n8n.io/advanced-ai/evaluations/metric-based-evaluations/#2-calculate-metrics' target='_blank'>View metric examples</a>",
|
|
105
|
+
name: "notice",
|
|
106
|
+
type: "notice",
|
|
107
|
+
default: "",
|
|
108
|
+
displayOptions: {
|
|
109
|
+
show: {
|
|
110
|
+
operation: ["setMetrics"]
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
displayName: "Metrics to Return",
|
|
116
|
+
name: "metrics",
|
|
117
|
+
type: "assignmentCollection",
|
|
118
|
+
default: {
|
|
119
|
+
assignments: [
|
|
120
|
+
{
|
|
121
|
+
name: "",
|
|
122
|
+
value: "",
|
|
123
|
+
type: "number"
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
typeOptions: {
|
|
128
|
+
assignment: {
|
|
129
|
+
disableType: true,
|
|
130
|
+
defaultType: "number"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
displayOptions: {
|
|
134
|
+
show: {
|
|
135
|
+
operation: ["setMetrics"]
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
];
|
|
140
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
141
|
+
0 && (module.exports = {
|
|
142
|
+
setCheckIfEvaluatingProperties,
|
|
143
|
+
setMetricsProperties,
|
|
144
|
+
setOutputProperties
|
|
145
|
+
});
|
|
146
|
+
//# sourceMappingURL=Description.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../nodes/Evaluation/Evaluation/Description.node.ts"],"sourcesContent":["import type { INodeProperties } from 'n8n-workflow';\n\nimport { document, sheet } from '../../Google/Sheet/GoogleSheetsTrigger.node';\n\nexport const setOutputProperties: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Credentials',\n\t\tname: 'credentials',\n\t\ttype: 'credentials',\n\t\tdefault: '',\n\t},\n\t{\n\t\t...document,\n\t\tdisplayName: 'Document Containing Dataset',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\toperation: ['setOutputs'],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\t...sheet,\n\t\tdisplayName: 'Sheet Containing Dataset',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\toperation: ['setOutputs'],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'Outputs',\n\t\tname: 'outputs',\n\t\tplaceholder: 'Add Output',\n\t\ttype: 'fixedCollection',\n\t\ttypeOptions: {\n\t\t\tmultipleValueButtonText: 'Add Output',\n\t\t\tmultipleValues: true,\n\t\t},\n\t\tdefault: {},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Filter',\n\t\t\t\tname: 'values',\n\t\t\t\tvalues: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Name',\n\t\t\t\t\t\tname: 'outputName',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Value',\n\t\t\t\t\t\tname: 'outputValue',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\toperation: ['setOutputs'],\n\t\t\t},\n\t\t},\n\t},\n];\n\nexport const setCheckIfEvaluatingProperties: INodeProperties[] = [\n\t{\n\t\tdisplayName:\n\t\t\t'Routes to the ‘evaluation’ branch if the execution started from an evaluation trigger. Otherwise routes to the ‘normal’ branch.',\n\t\tname: 'notice',\n\t\ttype: 'notice',\n\t\tdefault: '',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\toperation: ['checkIfEvaluating'],\n\t\t\t},\n\t\t},\n\t},\n];\n\nexport const setMetricsProperties: INodeProperties[] = [\n\t{\n\t\tdisplayName:\n\t\t\t\"Calculate the score(s) for the evaluation, then map them into this node. They will be displayed in the ‘evaluations’ tab, not the Google Sheet. <a href='https://docs.n8n.io/advanced-ai/evaluations/metric-based-evaluations/#2-calculate-metrics' target='_blank'>View metric examples</a>\",\n\t\tname: 'notice',\n\t\ttype: 'notice',\n\t\tdefault: '',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\toperation: ['setMetrics'],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'Metrics to Return',\n\t\tname: 'metrics',\n\t\ttype: 'assignmentCollection',\n\t\tdefault: {\n\t\t\tassignments: [\n\t\t\t\t{\n\t\t\t\t\tname: '',\n\t\t\t\t\tvalue: '',\n\t\t\t\t\ttype: 'number',\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t\ttypeOptions: {\n\t\t\tassignment: {\n\t\t\t\tdisableType: true,\n\t\t\t\tdefaultType: 'number',\n\t\t\t},\n\t\t},\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\toperation: ['setMetrics'],\n\t\t\t},\n\t\t},\n\t},\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,iCAAgC;AAEzB,MAAM,sBAAyC;AAAA,EACrD;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EACV;AAAA,EACA;AAAA,IACC,GAAG;AAAA,IACH,aAAa;AAAA,IACb,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,WAAW,CAAC,YAAY;AAAA,MACzB;AAAA,IACD;AAAA,EACD;AAAA,EACA;AAAA,IACC,GAAG;AAAA,IACH,aAAa;AAAA,IACb,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,WAAW,CAAC,YAAY;AAAA,MACzB;AAAA,IACD;AAAA,EACD;AAAA,EACA;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,aAAa;AAAA,IACb,MAAM;AAAA,IACN,aAAa;AAAA,MACZ,yBAAyB;AAAA,MACzB,gBAAgB;AAAA,IACjB;AAAA,IACA,SAAS,CAAC;AAAA,IACV,SAAS;AAAA,MACR;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,QAAQ;AAAA,UACP;AAAA,YACC,aAAa;AAAA,YACb,MAAM;AAAA,YACN,MAAM;AAAA,YACN,SAAS;AAAA,UACV;AAAA,UACA;AAAA,YACC,aAAa;AAAA,YACb,MAAM;AAAA,YACN,MAAM;AAAA,YACN,SAAS;AAAA,UACV;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA,IACA,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,WAAW,CAAC,YAAY;AAAA,MACzB;AAAA,IACD;AAAA,EACD;AACD;AAEO,MAAM,iCAAoD;AAAA,EAChE;AAAA,IACC,aACC;AAAA,IACD,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,WAAW,CAAC,mBAAmB;AAAA,MAChC;AAAA,IACD;AAAA,EACD;AACD;AAEO,MAAM,uBAA0C;AAAA,EACtD;AAAA,IACC,aACC;AAAA,IACD,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,WAAW,CAAC,YAAY;AAAA,MACzB;AAAA,IACD;AAAA,EACD;AAAA,EACA;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,MACR,aAAa;AAAA,QACZ;AAAA,UACC,MAAM;AAAA,UACN,OAAO;AAAA,UACP,MAAM;AAAA,QACP;AAAA,MACD;AAAA,IACD;AAAA,IACA,aAAa;AAAA,MACZ,YAAY;AAAA,QACX,aAAa;AAAA,QACb,aAAa;AAAA,MACd;AAAA,IACD;AAAA,IACA,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,WAAW,CAAC,YAAY;AAAA,MACzB;AAAA,IACD;AAAA,EACD;AACD;","names":[]}
|
|
@@ -0,0 +1,117 @@
|
|
|
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 Evaluation_node_ee_exports = {};
|
|
20
|
+
__export(Evaluation_node_ee_exports, {
|
|
21
|
+
Evaluation: () => Evaluation
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(Evaluation_node_ee_exports);
|
|
24
|
+
var import_n8n_workflow = require("n8n-workflow");
|
|
25
|
+
var import_Description = require("./Description.node");
|
|
26
|
+
var import_versionDescription = require("../../Google/Sheet/v2/actions/versionDescription");
|
|
27
|
+
var import_methods = require("../methods");
|
|
28
|
+
var import_evaluationUtils = require("../utils/evaluationUtils");
|
|
29
|
+
class Evaluation {
|
|
30
|
+
constructor() {
|
|
31
|
+
this.description = {
|
|
32
|
+
displayName: "Evaluation",
|
|
33
|
+
icon: "fa:check-double",
|
|
34
|
+
name: "evaluation",
|
|
35
|
+
group: ["transform"],
|
|
36
|
+
version: 4.6,
|
|
37
|
+
description: "Runs an evaluation",
|
|
38
|
+
eventTriggerDescription: "",
|
|
39
|
+
subtitle: '={{$parameter["operation"]}}',
|
|
40
|
+
defaults: {
|
|
41
|
+
name: "Evaluation",
|
|
42
|
+
color: "#c3c9d5"
|
|
43
|
+
},
|
|
44
|
+
inputs: [import_n8n_workflow.NodeConnectionTypes.Main],
|
|
45
|
+
outputs: `={{(${import_evaluationUtils.setOutputs})($parameter)}}`,
|
|
46
|
+
codex: {
|
|
47
|
+
alias: ["Test", "Metrics", "Evals", "Set Output", "Set Metrics"]
|
|
48
|
+
},
|
|
49
|
+
credentials: [
|
|
50
|
+
{
|
|
51
|
+
name: "googleApi",
|
|
52
|
+
required: true,
|
|
53
|
+
displayOptions: {
|
|
54
|
+
show: {
|
|
55
|
+
authentication: ["serviceAccount"],
|
|
56
|
+
operation: ["setOutputs"]
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
testedBy: "googleApiCredentialTest"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: "googleSheetsOAuth2Api",
|
|
63
|
+
required: true,
|
|
64
|
+
displayOptions: {
|
|
65
|
+
show: {
|
|
66
|
+
authentication: ["oAuth2"],
|
|
67
|
+
operation: ["setOutputs"]
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
properties: [
|
|
73
|
+
{
|
|
74
|
+
displayName: "Operation",
|
|
75
|
+
name: "operation",
|
|
76
|
+
type: "options",
|
|
77
|
+
noDataExpression: true,
|
|
78
|
+
options: [
|
|
79
|
+
{
|
|
80
|
+
name: "Set Outputs",
|
|
81
|
+
value: "setOutputs"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "Set Metrics",
|
|
85
|
+
value: "setMetrics"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: "Check If Evaluating",
|
|
89
|
+
value: "checkIfEvaluating"
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
default: "setOutputs"
|
|
93
|
+
},
|
|
94
|
+
import_versionDescription.authentication,
|
|
95
|
+
...import_Description.setOutputProperties,
|
|
96
|
+
...import_Description.setMetricsProperties,
|
|
97
|
+
...import_Description.setCheckIfEvaluatingProperties
|
|
98
|
+
]
|
|
99
|
+
};
|
|
100
|
+
this.methods = { loadOptions: import_methods.loadOptions, listSearch: import_methods.listSearch };
|
|
101
|
+
}
|
|
102
|
+
async execute() {
|
|
103
|
+
const operation = this.getNodeParameter("operation", 0);
|
|
104
|
+
if (operation === "setOutputs") {
|
|
105
|
+
return await import_evaluationUtils.setOutput.call(this);
|
|
106
|
+
} else if (operation === "setMetrics") {
|
|
107
|
+
return await import_evaluationUtils.setMetrics.call(this);
|
|
108
|
+
} else {
|
|
109
|
+
return await import_evaluationUtils.checkIfEvaluating.call(this);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
114
|
+
0 && (module.exports = {
|
|
115
|
+
Evaluation
|
|
116
|
+
});
|
|
117
|
+
//# sourceMappingURL=Evaluation.node.ee.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../nodes/Evaluation/Evaluation/Evaluation.node.ee.ts"],"sourcesContent":["/* eslint-disable n8n-nodes-base/node-filename-against-convention */\nimport type {\n\tIExecuteFunctions,\n\tINodeType,\n\tINodeTypeDescription,\n\tINodeExecutionData,\n} from 'n8n-workflow';\nimport { NodeConnectionTypes } from 'n8n-workflow';\n\nimport {\n\tsetCheckIfEvaluatingProperties,\n\tsetMetricsProperties,\n\tsetOutputProperties,\n} from './Description.node';\nimport { authentication } from '../../Google/Sheet/v2/actions/versionDescription';\nimport { listSearch, loadOptions } from '../methods';\nimport { checkIfEvaluating, setMetrics, setOutputs, setOutput } from '../utils/evaluationUtils';\n\nexport class Evaluation implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Evaluation',\n\t\ticon: 'fa:check-double',\n\t\tname: 'evaluation',\n\t\tgroup: ['transform'],\n\t\tversion: 4.6,\n\t\tdescription: 'Runs an evaluation',\n\t\teventTriggerDescription: '',\n\t\tsubtitle: '={{$parameter[\"operation\"]}}',\n\t\tdefaults: {\n\t\t\tname: 'Evaluation',\n\t\t\tcolor: '#c3c9d5',\n\t\t},\n\t\tinputs: [NodeConnectionTypes.Main],\n\t\toutputs: `={{(${setOutputs})($parameter)}}`,\n\t\tcodex: {\n\t\t\talias: ['Test', 'Metrics', 'Evals', 'Set Output', 'Set Metrics'],\n\t\t},\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'googleApi',\n\t\t\t\trequired: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tauthentication: ['serviceAccount'],\n\t\t\t\t\t\toperation: ['setOutputs'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\ttestedBy: 'googleApiCredentialTest',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'googleSheetsOAuth2Api',\n\t\t\t\trequired: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tauthentication: ['oAuth2'],\n\t\t\t\t\t\toperation: ['setOutputs'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Operation',\n\t\t\t\tname: 'operation',\n\t\t\t\ttype: 'options',\n\t\t\t\tnoDataExpression: true,\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Set Outputs',\n\t\t\t\t\t\tvalue: 'setOutputs',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Set Metrics',\n\t\t\t\t\t\tvalue: 'setMetrics',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Check If Evaluating',\n\t\t\t\t\t\tvalue: 'checkIfEvaluating',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'setOutputs',\n\t\t\t},\n\t\t\tauthentication,\n\t\t\t...setOutputProperties,\n\t\t\t...setMetricsProperties,\n\t\t\t...setCheckIfEvaluatingProperties,\n\t\t],\n\t};\n\n\tmethods = { loadOptions, listSearch };\n\n\tasync execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {\n\t\tconst operation = this.getNodeParameter('operation', 0);\n\n\t\tif (operation === 'setOutputs') {\n\t\t\treturn await setOutput.call(this);\n\t\t} else if (operation === 'setMetrics') {\n\t\t\treturn await setMetrics.call(this);\n\t\t} else {\n\t\t\t// operation === 'checkIfEvaluating'\n\t\t\treturn await checkIfEvaluating.call(this);\n\t\t}\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,0BAAoC;AAEpC,yBAIO;AACP,gCAA+B;AAC/B,qBAAwC;AACxC,6BAAqE;AAE9D,MAAM,WAAgC;AAAA,EAAtC;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO,CAAC,WAAW;AAAA,MACnB,SAAS;AAAA,MACT,aAAa;AAAA,MACb,yBAAyB;AAAA,MACzB,UAAU;AAAA,MACV,UAAU;AAAA,QACT,MAAM;AAAA,QACN,OAAO;AAAA,MACR;AAAA,MACA,QAAQ,CAAC,wCAAoB,IAAI;AAAA,MACjC,SAAS,OAAO,iCAAU;AAAA,MAC1B,OAAO;AAAA,QACN,OAAO,CAAC,QAAQ,WAAW,SAAS,cAAc,aAAa;AAAA,MAChE;AAAA,MACA,aAAa;AAAA,QACZ;AAAA,UACC,MAAM;AAAA,UACN,UAAU;AAAA,UACV,gBAAgB;AAAA,YACf,MAAM;AAAA,cACL,gBAAgB,CAAC,gBAAgB;AAAA,cACjC,WAAW,CAAC,YAAY;AAAA,YACzB;AAAA,UACD;AAAA,UACA,UAAU;AAAA,QACX;AAAA,QACA;AAAA,UACC,MAAM;AAAA,UACN,UAAU;AAAA,UACV,gBAAgB;AAAA,YACf,MAAM;AAAA,cACL,gBAAgB,CAAC,QAAQ;AAAA,cACzB,WAAW,CAAC,YAAY;AAAA,YACzB;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA,MACA,YAAY;AAAA,QACX;AAAA,UACC,aAAa;AAAA,UACb,MAAM;AAAA,UACN,MAAM;AAAA,UACN,kBAAkB;AAAA,UAClB,SAAS;AAAA,YACR;AAAA,cACC,MAAM;AAAA,cACN,OAAO;AAAA,YACR;AAAA,YACA;AAAA,cACC,MAAM;AAAA,cACN,OAAO;AAAA,YACR;AAAA,YACA;AAAA,cACC,MAAM;AAAA,cACN,OAAO;AAAA,YACR;AAAA,UACD;AAAA,UACA,SAAS;AAAA,QACV;AAAA,QACA;AAAA,QACA,GAAG;AAAA,QACH,GAAG;AAAA,QACH,GAAG;AAAA,MACJ;AAAA,IACD;AAEA,mBAAU,EAAE,yCAAa,sCAAW;AAAA;AAAA,EAEpC,MAAM,UAAkE;AACvE,UAAM,YAAY,KAAK,iBAAiB,aAAa,CAAC;AAEtD,QAAI,cAAc,cAAc;AAC/B,aAAO,MAAM,iCAAU,KAAK,IAAI;AAAA,IACjC,WAAW,cAAc,cAAc;AACtC,aAAO,MAAM,kCAAW,KAAK,IAAI;AAAA,IAClC,OAAO;AAEN,aAAO,MAAM,yCAAkB,KAAK,IAAI;AAAA,IACzC;AAAA,EACD;AACD;","names":[]}
|
|
@@ -0,0 +1,187 @@
|
|
|
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 EvaluationTrigger_node_ee_exports = {};
|
|
20
|
+
__export(EvaluationTrigger_node_ee_exports, {
|
|
21
|
+
EvaluationTrigger: () => EvaluationTrigger,
|
|
22
|
+
startingRow: () => startingRow
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(EvaluationTrigger_node_ee_exports);
|
|
25
|
+
var import_n8n_workflow = require("n8n-workflow");
|
|
26
|
+
var import_GoogleSheetsTrigger = require("../../Google/Sheet/GoogleSheetsTrigger.node");
|
|
27
|
+
var import_read = require("../../Google/Sheet/v2/actions/sheet/read.operation");
|
|
28
|
+
var import_versionDescription = require("../../Google/Sheet/v2/actions/versionDescription");
|
|
29
|
+
var import_methods = require("../methods");
|
|
30
|
+
var import_evaluationTriggerUtils = require("../utils/evaluationTriggerUtils");
|
|
31
|
+
let startingRow = 2;
|
|
32
|
+
class EvaluationTrigger {
|
|
33
|
+
constructor() {
|
|
34
|
+
this.description = {
|
|
35
|
+
displayName: "Evaluation Trigger",
|
|
36
|
+
icon: "fa:check-double",
|
|
37
|
+
name: "evaluationTrigger",
|
|
38
|
+
group: ["trigger"],
|
|
39
|
+
version: 4.6,
|
|
40
|
+
description: "Run a test dataset through your workflow to check performance",
|
|
41
|
+
eventTriggerDescription: "",
|
|
42
|
+
defaults: {
|
|
43
|
+
name: "When fetching a dataset row",
|
|
44
|
+
color: "#c3c9d5"
|
|
45
|
+
},
|
|
46
|
+
inputs: [],
|
|
47
|
+
outputs: [import_n8n_workflow.NodeConnectionTypes.Main],
|
|
48
|
+
properties: [
|
|
49
|
+
{
|
|
50
|
+
displayName: 'Pulls a test dataset from a Google Sheet. The workflow will run once for each row, in sequence. Tips for wiring this node up <a href="https://docs.n8n.io/advanced-ai/evaluations/tips-and-common-issues/#combining-multiple-triggers">here</a>.',
|
|
51
|
+
name: "notice",
|
|
52
|
+
type: "notice",
|
|
53
|
+
default: ""
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
displayName: "Credentials",
|
|
57
|
+
name: "credentials",
|
|
58
|
+
type: "credentials",
|
|
59
|
+
default: ""
|
|
60
|
+
},
|
|
61
|
+
import_versionDescription.authentication,
|
|
62
|
+
{
|
|
63
|
+
...import_GoogleSheetsTrigger.document,
|
|
64
|
+
displayName: "Document Containing Dataset",
|
|
65
|
+
hint: 'Example dataset format <a href="https://docs.google.com/spreadsheets/d/1vD_IdeFUg7sHsK9okL6Doy1rGOkWTnPJV3Dro4FBUsY/edit?gid=0#gid=0">here</a>'
|
|
66
|
+
},
|
|
67
|
+
{ ...import_GoogleSheetsTrigger.sheet, displayName: "Sheet Containing Dataset" },
|
|
68
|
+
{
|
|
69
|
+
displayName: "Limit Rows",
|
|
70
|
+
name: "limitRows",
|
|
71
|
+
type: "boolean",
|
|
72
|
+
default: false,
|
|
73
|
+
noDataExpression: true,
|
|
74
|
+
description: "Whether to limit number of rows to process"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
displayName: "Max Rows to Process",
|
|
78
|
+
name: "maxRows",
|
|
79
|
+
type: "number",
|
|
80
|
+
default: 10,
|
|
81
|
+
description: "Maximum number of rows to process",
|
|
82
|
+
noDataExpression: false,
|
|
83
|
+
displayOptions: { show: { limitRows: [true] } }
|
|
84
|
+
},
|
|
85
|
+
import_read.readFilter
|
|
86
|
+
],
|
|
87
|
+
codex: {
|
|
88
|
+
alias: ["Test", "Metrics", "Evals", "Set Output", "Set Metrics"]
|
|
89
|
+
},
|
|
90
|
+
credentials: [
|
|
91
|
+
{
|
|
92
|
+
name: "googleApi",
|
|
93
|
+
required: true,
|
|
94
|
+
displayOptions: {
|
|
95
|
+
show: {
|
|
96
|
+
authentication: ["serviceAccount"]
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
testedBy: "googleApiCredentialTest"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: "googleSheetsOAuth2Api",
|
|
103
|
+
required: true,
|
|
104
|
+
displayOptions: {
|
|
105
|
+
show: {
|
|
106
|
+
authentication: ["oAuth2"]
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
};
|
|
112
|
+
this.methods = { loadOptions: import_methods.loadOptions, listSearch: import_methods.listSearch };
|
|
113
|
+
}
|
|
114
|
+
async execute(startRow) {
|
|
115
|
+
if (startRow) {
|
|
116
|
+
startingRow = startRow;
|
|
117
|
+
}
|
|
118
|
+
const inputData = this.getInputData();
|
|
119
|
+
const MAX_ROWS = 1e3;
|
|
120
|
+
const maxRows = this.getNodeParameter("limitRows", 0) ? this.getNodeParameter("maxRows", 0) + 1 : MAX_ROWS;
|
|
121
|
+
const rangeOptions = {
|
|
122
|
+
rangeDefinition: "specifyRange",
|
|
123
|
+
headerRow: 1,
|
|
124
|
+
firstDataRow: startingRow
|
|
125
|
+
};
|
|
126
|
+
const googleSheetInstance = import_evaluationTriggerUtils.getGoogleSheet.call(this);
|
|
127
|
+
const googleSheet = await import_evaluationTriggerUtils.getSheet.call(this, googleSheetInstance);
|
|
128
|
+
const allRows = await import_evaluationTriggerUtils.getResults.call(this, [], googleSheetInstance, googleSheet, rangeOptions);
|
|
129
|
+
if (inputData[0].json.requestDataset) {
|
|
130
|
+
const testRunnerResult = await import_evaluationTriggerUtils.getResults.call(
|
|
131
|
+
this,
|
|
132
|
+
[],
|
|
133
|
+
googleSheetInstance,
|
|
134
|
+
googleSheet,
|
|
135
|
+
{}
|
|
136
|
+
);
|
|
137
|
+
const result = testRunnerResult.filter((row) => row?.json?.row_number <= maxRows);
|
|
138
|
+
return [result];
|
|
139
|
+
}
|
|
140
|
+
const hasFilter = this.getNodeParameter("filtersUI.values", 0, []);
|
|
141
|
+
if (hasFilter.length > 0) {
|
|
142
|
+
const currentRow = allRows[0];
|
|
143
|
+
const currentRowNumber = currentRow.json?.row_number;
|
|
144
|
+
if (currentRow === void 0) {
|
|
145
|
+
startingRow = 2;
|
|
146
|
+
throw new import_n8n_workflow.NodeOperationError(this.getNode(), "No row found");
|
|
147
|
+
}
|
|
148
|
+
const rowsLeft = await import_evaluationTriggerUtils.getNumberOfRowsLeftFiltered.call(
|
|
149
|
+
this,
|
|
150
|
+
googleSheetInstance,
|
|
151
|
+
googleSheet.title,
|
|
152
|
+
currentRowNumber + 1,
|
|
153
|
+
maxRows
|
|
154
|
+
);
|
|
155
|
+
currentRow.json._rowsLeft = rowsLeft;
|
|
156
|
+
startingRow = currentRowNumber + 1;
|
|
157
|
+
if (rowsLeft === 0) {
|
|
158
|
+
startingRow = 2;
|
|
159
|
+
}
|
|
160
|
+
return [[currentRow]];
|
|
161
|
+
} else {
|
|
162
|
+
const currentRow = allRows.find((row) => row?.json?.row_number === startingRow);
|
|
163
|
+
const rowsLeft = await import_evaluationTriggerUtils.getRowsLeft.call(
|
|
164
|
+
this,
|
|
165
|
+
googleSheetInstance,
|
|
166
|
+
googleSheet.title,
|
|
167
|
+
`${googleSheet.title}!${startingRow}:${maxRows}`
|
|
168
|
+
);
|
|
169
|
+
if (currentRow === void 0) {
|
|
170
|
+
startingRow = 2;
|
|
171
|
+
throw new import_n8n_workflow.NodeOperationError(this.getNode(), "No row found");
|
|
172
|
+
}
|
|
173
|
+
currentRow.json._rowsLeft = rowsLeft;
|
|
174
|
+
startingRow += 1;
|
|
175
|
+
if (rowsLeft === 0) {
|
|
176
|
+
startingRow = 2;
|
|
177
|
+
}
|
|
178
|
+
return [[currentRow]];
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
183
|
+
0 && (module.exports = {
|
|
184
|
+
EvaluationTrigger,
|
|
185
|
+
startingRow
|
|
186
|
+
});
|
|
187
|
+
//# sourceMappingURL=EvaluationTrigger.node.ee.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../nodes/Evaluation/EvaluationTrigger/EvaluationTrigger.node.ee.ts"],"sourcesContent":["/* eslint-disable n8n-nodes-base/node-filename-against-convention */\nimport type {\n\tINodeType,\n\tINodeTypeDescription,\n\tIExecuteFunctions,\n\tINodeExecutionData,\n} from 'n8n-workflow';\nimport { NodeConnectionTypes, NodeOperationError } from 'n8n-workflow';\n\nimport { document, sheet } from '../../Google/Sheet/GoogleSheetsTrigger.node';\nimport { readFilter } from '../../Google/Sheet/v2/actions/sheet/read.operation';\nimport { authentication } from '../../Google/Sheet/v2/actions/versionDescription';\nimport type { ILookupValues } from '../../Google/Sheet/v2/helpers/GoogleSheets.types';\nimport { listSearch, loadOptions } from '../methods';\nimport {\n\tgetGoogleSheet,\n\tgetResults,\n\tgetRowsLeft,\n\tgetNumberOfRowsLeftFiltered,\n\tgetSheet,\n} from '../utils/evaluationTriggerUtils';\n\nexport let startingRow = 2;\n\nexport class EvaluationTrigger implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Evaluation Trigger',\n\t\ticon: 'fa:check-double',\n\t\tname: 'evaluationTrigger',\n\t\tgroup: ['trigger'],\n\t\tversion: 4.6,\n\t\tdescription: 'Run a test dataset through your workflow to check performance',\n\t\teventTriggerDescription: '',\n\t\tdefaults: {\n\t\t\tname: 'When fetching a dataset row',\n\t\t\tcolor: '#c3c9d5',\n\t\t},\n\t\tinputs: [],\n\t\toutputs: [NodeConnectionTypes.Main],\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName:\n\t\t\t\t\t'Pulls a test dataset from a Google Sheet. The workflow will run once for each row, in sequence. Tips for wiring this node up <a href=\"https://docs.n8n.io/advanced-ai/evaluations/tips-and-common-issues/#combining-multiple-triggers\">here</a>.',\n\t\t\t\tname: 'notice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Credentials',\n\t\t\t\tname: 'credentials',\n\t\t\t\ttype: 'credentials',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\tauthentication,\n\t\t\t{\n\t\t\t\t...document,\n\t\t\t\tdisplayName: 'Document Containing Dataset',\n\t\t\t\thint: 'Example dataset format <a href=\"https://docs.google.com/spreadsheets/d/1vD_IdeFUg7sHsK9okL6Doy1rGOkWTnPJV3Dro4FBUsY/edit?gid=0#gid=0\">here</a>',\n\t\t\t},\n\t\t\t{ ...sheet, displayName: 'Sheet Containing Dataset' },\n\t\t\t{\n\t\t\t\tdisplayName: 'Limit Rows',\n\t\t\t\tname: 'limitRows',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdefault: false,\n\t\t\t\tnoDataExpression: true,\n\t\t\t\tdescription: 'Whether to limit number of rows to process',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Max Rows to Process',\n\t\t\t\tname: 'maxRows',\n\t\t\t\ttype: 'number',\n\t\t\t\tdefault: 10,\n\t\t\t\tdescription: 'Maximum number of rows to process',\n\t\t\t\tnoDataExpression: false,\n\t\t\t\tdisplayOptions: { show: { limitRows: [true] } },\n\t\t\t},\n\t\t\treadFilter,\n\t\t],\n\t\tcodex: {\n\t\t\talias: ['Test', 'Metrics', 'Evals', 'Set Output', 'Set Metrics'],\n\t\t},\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'googleApi',\n\t\t\t\trequired: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tauthentication: ['serviceAccount'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\ttestedBy: 'googleApiCredentialTest',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'googleSheetsOAuth2Api',\n\t\t\t\trequired: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tauthentication: ['oAuth2'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t};\n\n\tmethods = { loadOptions, listSearch };\n\n\tasync execute(this: IExecuteFunctions, startRow?: number): Promise<INodeExecutionData[][]> {\n\t\t// We need to allow tests to reset the startingRow\n\t\tif (startRow) {\n\t\t\tstartingRow = startRow;\n\t\t}\n\n\t\tconst inputData = this.getInputData();\n\n\t\tconst MAX_ROWS = 1000;\n\n\t\tconst maxRows = this.getNodeParameter('limitRows', 0)\n\t\t\t? (this.getNodeParameter('maxRows', 0) as number) + 1\n\t\t\t: MAX_ROWS;\n\n\t\tconst rangeOptions = {\n\t\t\trangeDefinition: 'specifyRange',\n\t\t\theaderRow: 1,\n\t\t\tfirstDataRow: startingRow,\n\t\t};\n\n\t\tconst googleSheetInstance = getGoogleSheet.call(this);\n\n\t\tconst googleSheet = await getSheet.call(this, googleSheetInstance);\n\n\t\tconst allRows = await getResults.call(this, [], googleSheetInstance, googleSheet, rangeOptions);\n\n\t\t// This is for test runner which requires a different return format\n\t\tif (inputData[0].json.requestDataset) {\n\t\t\tconst testRunnerResult = await getResults.call(\n\t\t\t\tthis,\n\t\t\t\t[],\n\t\t\t\tgoogleSheetInstance,\n\t\t\t\tgoogleSheet,\n\t\t\t\t{},\n\t\t\t);\n\n\t\t\tconst result = testRunnerResult.filter((row) => (row?.json?.row_number as number) <= maxRows);\n\n\t\t\treturn [result];\n\t\t}\n\n\t\tconst hasFilter = this.getNodeParameter('filtersUI.values', 0, []) as ILookupValues[];\n\n\t\tif (hasFilter.length > 0) {\n\t\t\tconst currentRow = allRows[0];\n\t\t\tconst currentRowNumber = currentRow.json?.row_number as number;\n\n\t\t\tif (currentRow === undefined) {\n\t\t\t\tstartingRow = 2;\n\n\t\t\t\tthrow new NodeOperationError(this.getNode(), 'No row found');\n\t\t\t}\n\n\t\t\tconst rowsLeft = await getNumberOfRowsLeftFiltered.call(\n\t\t\t\tthis,\n\t\t\t\tgoogleSheetInstance,\n\t\t\t\tgoogleSheet.title,\n\t\t\t\tcurrentRowNumber + 1,\n\t\t\t\tmaxRows,\n\t\t\t);\n\n\t\t\tcurrentRow.json._rowsLeft = rowsLeft;\n\n\t\t\tstartingRow = currentRowNumber + 1;\n\n\t\t\tif (rowsLeft === 0) {\n\t\t\t\tstartingRow = 2;\n\t\t\t}\n\n\t\t\treturn [[currentRow]];\n\t\t} else {\n\t\t\tconst currentRow = allRows.find((row) => (row?.json?.row_number as number) === startingRow);\n\n\t\t\tconst rowsLeft = await getRowsLeft.call(\n\t\t\t\tthis,\n\t\t\t\tgoogleSheetInstance,\n\t\t\t\tgoogleSheet.title,\n\t\t\t\t`${googleSheet.title}!${startingRow}:${maxRows}`,\n\t\t\t);\n\n\t\t\tif (currentRow === undefined) {\n\t\t\t\tstartingRow = 2;\n\n\t\t\t\tthrow new NodeOperationError(this.getNode(), 'No row found');\n\t\t\t}\n\n\t\t\tcurrentRow.json._rowsLeft = rowsLeft;\n\n\t\t\tstartingRow += 1;\n\n\t\t\tif (rowsLeft === 0) {\n\t\t\t\tstartingRow = 2;\n\t\t\t}\n\n\t\t\treturn [[currentRow]];\n\t\t}\n\t}\n}\n"],"mappings":"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","names":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var methods_exports = {};
|
|
30
|
+
__export(methods_exports, {
|
|
31
|
+
listSearch: () => listSearch,
|
|
32
|
+
loadOptions: () => loadOptions
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(methods_exports);
|
|
35
|
+
var loadOptions = __toESM(require("./loadOptions"));
|
|
36
|
+
var listSearch = __toESM(require("./../../Google/Sheet/v2/methods/listSearch"));
|
|
37
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
38
|
+
0 && (module.exports = {
|
|
39
|
+
listSearch,
|
|
40
|
+
loadOptions
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../nodes/Evaluation/methods/index.ts"],"sourcesContent":["export * as loadOptions from './loadOptions';\nexport * as listSearch from './../../Google/Sheet/v2/methods/listSearch';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA6B;AAC7B,iBAA4B;","names":[]}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 loadOptions_exports = {};
|
|
20
|
+
__export(loadOptions_exports, {
|
|
21
|
+
getSheetHeaderRowWithGeneratedColumnNames: () => getSheetHeaderRowWithGeneratedColumnNames
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(loadOptions_exports);
|
|
24
|
+
var import_loadOptions = require("../../Google/Sheet/v2/methods/loadOptions");
|
|
25
|
+
async function getSheetHeaderRowWithGeneratedColumnNames() {
|
|
26
|
+
const returnData = await import_loadOptions.getSheetHeaderRow.call(this);
|
|
27
|
+
return returnData.map((column, i) => {
|
|
28
|
+
if (column.value !== "") return column;
|
|
29
|
+
const indexBasedValue = `col_${i + 1}`;
|
|
30
|
+
return {
|
|
31
|
+
name: indexBasedValue,
|
|
32
|
+
value: indexBasedValue
|
|
33
|
+
};
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
+
0 && (module.exports = {
|
|
38
|
+
getSheetHeaderRowWithGeneratedColumnNames
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=loadOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../nodes/Evaluation/methods/loadOptions.ts"],"sourcesContent":["import type { ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';\n\nimport { getSheetHeaderRow } from '../../Google/Sheet/v2/methods/loadOptions';\n\nexport async function getSheetHeaderRowWithGeneratedColumnNames(\n\tthis: ILoadOptionsFunctions,\n): Promise<INodePropertyOptions[]> {\n\tconst returnData = await getSheetHeaderRow.call(this);\n\treturn returnData.map((column, i) => {\n\t\tif (column.value !== '') return column;\n\t\tconst indexBasedValue = `col_${i + 1}`;\n\t\treturn {\n\t\t\tname: indexBasedValue,\n\t\t\tvalue: indexBasedValue,\n\t\t};\n\t});\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,yBAAkC;AAElC,eAAsB,4CAEa;AAClC,QAAM,aAAa,MAAM,qCAAkB,KAAK,IAAI;AACpD,SAAO,WAAW,IAAI,CAAC,QAAQ,MAAM;AACpC,QAAI,OAAO,UAAU,GAAI,QAAO;AAChC,UAAM,kBAAkB,OAAO,IAAI,CAAC;AACpC,WAAO;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,IACR;AAAA,EACD,CAAC;AACF;","names":[]}
|