n8n-nodes-base 1.94.1 → 1.95.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.
Files changed (33) hide show
  1. package/dist/credentials/GithubOAuth2Api.credentials.js +2 -2
  2. package/dist/credentials/GithubOAuth2Api.credentials.js.map +1 -1
  3. package/dist/credentials/PerplexityApi.credentials.js +70 -0
  4. package/dist/credentials/PerplexityApi.credentials.js.map +1 -0
  5. package/dist/known/credentials.json +7 -0
  6. package/dist/known/nodes.json +4 -0
  7. package/dist/nodes/Evaluation/EvaluationTrigger/EvaluationTrigger.node.ee.js +12 -22
  8. package/dist/nodes/Evaluation/EvaluationTrigger/EvaluationTrigger.node.ee.js.map +1 -1
  9. package/dist/nodes/JinaAI/JinaAi.node.js +1 -1
  10. package/dist/nodes/JinaAI/JinaAi.node.js.map +1 -1
  11. package/dist/nodes/Perplexity/GenericFunctions.js +49 -0
  12. package/dist/nodes/Perplexity/GenericFunctions.js.map +1 -0
  13. package/dist/nodes/Perplexity/Perplexity.node.js +78 -0
  14. package/dist/nodes/Perplexity/Perplexity.node.js.map +1 -0
  15. package/dist/nodes/Perplexity/Perplexity.node.json +18 -0
  16. package/dist/nodes/Perplexity/descriptions/chat/Chat.resource.js +72 -0
  17. package/dist/nodes/Perplexity/descriptions/chat/Chat.resource.js.map +1 -0
  18. package/dist/nodes/Perplexity/descriptions/chat/complete.operation.js +328 -0
  19. package/dist/nodes/Perplexity/descriptions/chat/complete.operation.js.map +1 -0
  20. package/dist/nodes/Perplexity/descriptions/index.js +39 -0
  21. package/dist/nodes/Perplexity/descriptions/index.js.map +1 -0
  22. package/dist/nodes/Perplexity/perplexity.svg +35 -0
  23. package/dist/nodes/RespondToWebhook/RespondToWebhook.node.js +14 -3
  24. package/dist/nodes/RespondToWebhook/RespondToWebhook.node.js.map +1 -1
  25. package/dist/nodes/RespondToWebhook/utils.js +3 -2
  26. package/dist/nodes/RespondToWebhook/utils.js.map +1 -1
  27. package/dist/nodes/Telegram/Telegram.node.js +1 -1
  28. package/dist/nodes/Telegram/Telegram.node.js.map +1 -1
  29. package/dist/nodes/Transform/Sort/Sort.node.js +2 -2
  30. package/dist/nodes/Transform/Sort/Sort.node.js.map +1 -1
  31. package/dist/types/credentials.json +2 -1
  32. package/dist/types/nodes.json +7 -6
  33. package/package.json +10 -7
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../nodes/Perplexity/descriptions/chat/Chat.resource.ts"],"sourcesContent":["import type { INodeProperties } from 'n8n-workflow';\n\nimport * as complete from './complete.operation';\nimport { sendErrorPostReceive } from '../../GenericFunctions';\n\nexport const description: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Operation',\n\t\tname: 'operation',\n\t\ttype: 'options',\n\t\tnoDataExpression: true,\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['chat'],\n\t\t\t},\n\t\t},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tname: 'Message a Model',\n\t\t\t\tvalue: 'complete',\n\t\t\t\taction: 'Message a model',\n\t\t\t\tdescription: 'Create one or more completions for a given text',\n\t\t\t\trouting: {\n\t\t\t\t\trequest: {\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\turl: '/chat/completions',\n\t\t\t\t\t},\n\t\t\t\t\toutput: {\n\t\t\t\t\t\tpostReceive: [sendErrorPostReceive],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t\tdefault: 'complete',\n\t},\n\n\t...complete.description,\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,eAA0B;AAC1B,8BAAqC;AAE9B,MAAM,cAAiC;AAAA,EAC7C;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,UAAU,CAAC,MAAM;AAAA,MAClB;AAAA,IACD;AAAA,IACA,SAAS;AAAA,MACR;AAAA,QACC,MAAM;AAAA,QACN,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,aAAa;AAAA,QACb,SAAS;AAAA,UACR,SAAS;AAAA,YACR,QAAQ;AAAA,YACR,KAAK;AAAA,UACN;AAAA,UACA,QAAQ;AAAA,YACP,aAAa,CAAC,4CAAoB;AAAA,UACnC;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA,IACA,SAAS;AAAA,EACV;AAAA,EAEA,GAAG,SAAS;AACb;","names":[]}
@@ -0,0 +1,328 @@
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 complete_operation_exports = {};
20
+ __export(complete_operation_exports, {
21
+ description: () => description
22
+ });
23
+ module.exports = __toCommonJS(complete_operation_exports);
24
+ var import_n8n_workflow = require("n8n-workflow");
25
+ const properties = [
26
+ {
27
+ displayName: "Model",
28
+ name: "model",
29
+ type: "options",
30
+ default: "r1-1776",
31
+ required: true,
32
+ options: [
33
+ { name: "R1-1776", value: "r1-1776" },
34
+ { name: "Sonar", value: "sonar" },
35
+ { name: "Sonar Deep Research", value: "sonar-deep-research" },
36
+ { name: "Sonar Pro", value: "sonar-pro" },
37
+ { name: "Sonar Reasoning", value: "sonar-reasoning" },
38
+ { name: "Sonar Reasoning Pro", value: "sonar-reasoning-pro" }
39
+ ],
40
+ description: "The model which will generate the completion",
41
+ routing: {
42
+ send: {
43
+ type: "body",
44
+ property: "model"
45
+ }
46
+ }
47
+ },
48
+ {
49
+ displayName: "Messages",
50
+ name: "messages",
51
+ type: "fixedCollection",
52
+ description: "Any optional system messages must be sent first, followed by alternating user and assistant messages",
53
+ required: true,
54
+ typeOptions: {
55
+ multipleValues: true,
56
+ sortable: true
57
+ },
58
+ placeholder: "Add Message",
59
+ default: {
60
+ message: [
61
+ {
62
+ role: "user",
63
+ content: ""
64
+ }
65
+ ]
66
+ },
67
+ options: [
68
+ {
69
+ displayName: "Message",
70
+ name: "message",
71
+ values: [
72
+ {
73
+ displayName: "Text",
74
+ name: "content",
75
+ type: "string",
76
+ default: "",
77
+ description: "The content of the message to be sent",
78
+ typeOptions: {
79
+ rows: 2
80
+ }
81
+ },
82
+ {
83
+ displayName: "Role",
84
+ name: "role",
85
+ required: true,
86
+ type: "options",
87
+ options: [
88
+ {
89
+ name: "Assistant",
90
+ value: "assistant",
91
+ description: "Tell the model to adopt a specific tone or personality. Must alternate with user messages."
92
+ },
93
+ {
94
+ name: "System",
95
+ value: "system",
96
+ description: "Set the models behavior or context. Must come before user and assistant messages."
97
+ },
98
+ {
99
+ name: "User",
100
+ value: "user",
101
+ description: "Send a message as a user and get a response from the model"
102
+ }
103
+ ],
104
+ default: "user",
105
+ description: "Role in shaping the model's response, it tells the model how it should behave and interact with the user"
106
+ }
107
+ ]
108
+ }
109
+ ],
110
+ routing: {
111
+ send: {
112
+ type: "body",
113
+ property: "messages",
114
+ value: "={{ $value.message }}"
115
+ }
116
+ }
117
+ },
118
+ {
119
+ displayName: "Simplify Output",
120
+ name: "simplify",
121
+ type: "boolean",
122
+ default: false,
123
+ description: "Whether to return only essential fields (ID, citations, message)",
124
+ routing: {
125
+ output: {
126
+ postReceive: [
127
+ {
128
+ type: "set",
129
+ enabled: "={{ $value }}",
130
+ properties: {
131
+ value: '={{ { "id": $response.body?.id, "created": $response.body?.created, "citations": $response.body?.citations, "message": $response.body?.choices?.[0]?.message?.content } }}'
132
+ }
133
+ }
134
+ ]
135
+ }
136
+ }
137
+ },
138
+ {
139
+ displayName: "Options",
140
+ name: "options",
141
+ type: "collection",
142
+ placeholder: "Add Option",
143
+ default: {},
144
+ options: [
145
+ {
146
+ displayName: "Frequency Penalty",
147
+ name: "frequencyPenalty",
148
+ type: "number",
149
+ default: 1,
150
+ typeOptions: {
151
+ minValue: 1
152
+ },
153
+ description: "Values greater than 1.0 penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim",
154
+ routing: {
155
+ send: {
156
+ type: "body",
157
+ property: "frequency_penalty"
158
+ }
159
+ }
160
+ },
161
+ {
162
+ displayName: "Maximum Number of Tokens",
163
+ name: "maxTokens",
164
+ type: "number",
165
+ default: 1,
166
+ description: "The maximum number of tokens to generate in the completion. The number of tokens requested plus the number of prompt tokens sent in messages must not exceed the context window token limit of model requested.",
167
+ routing: {
168
+ send: {
169
+ type: "body",
170
+ property: "max_tokens"
171
+ }
172
+ }
173
+ },
174
+ {
175
+ displayName: "Output Randomness (Temperature)",
176
+ name: "temperature",
177
+ type: "number",
178
+ default: 0.2,
179
+ description: "The amount of randomness in the response, valued between 0 inclusive and 2 exclusive. Higher values are more random, and lower values are more deterministic.",
180
+ typeOptions: {
181
+ minValue: 0,
182
+ maxValue: 1.99
183
+ },
184
+ routing: {
185
+ send: {
186
+ type: "body",
187
+ property: "temperature"
188
+ }
189
+ }
190
+ },
191
+ {
192
+ displayName: "Top K",
193
+ name: "topK",
194
+ type: "number",
195
+ default: 0,
196
+ description: "The number of tokens to keep for highest Top K filtering, specified as an integer between 0 and 2048 inclusive. If set to 0, Top K filtering is disabled. We recommend either altering Top K or Top P, but not both.",
197
+ typeOptions: {
198
+ minValue: 0,
199
+ maxValue: 2048
200
+ },
201
+ routing: {
202
+ send: {
203
+ type: "body",
204
+ property: "top_k"
205
+ }
206
+ }
207
+ },
208
+ {
209
+ displayName: "Top P",
210
+ name: "topP",
211
+ type: "number",
212
+ default: 0.9,
213
+ description: "The nucleus sampling threshold, valued between 0 and 1 inclusive. For each subsequent token, the model considers the results of the tokens with Top P probability mass. We recommend either altering Top K or Top P, but not both.",
214
+ typeOptions: {
215
+ minValue: 0,
216
+ maxValue: 1
217
+ },
218
+ routing: {
219
+ send: {
220
+ type: "body",
221
+ property: "top_p"
222
+ }
223
+ }
224
+ },
225
+ {
226
+ displayName: "Presence Penalty",
227
+ name: "presencePenalty",
228
+ type: "number",
229
+ default: 0,
230
+ description: "A value between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.",
231
+ typeOptions: {
232
+ minValue: -2,
233
+ maxValue: 2
234
+ },
235
+ routing: {
236
+ send: {
237
+ type: "body",
238
+ property: "presence_penalty"
239
+ }
240
+ }
241
+ },
242
+ {
243
+ displayName: "Return Images",
244
+ name: "returnImages",
245
+ type: "boolean",
246
+ default: false,
247
+ description: "Whether or not a request to an online model should return images. Requires Perplexity API usage Tier-2.",
248
+ routing: {
249
+ send: {
250
+ type: "body",
251
+ property: "return_images"
252
+ }
253
+ }
254
+ },
255
+ {
256
+ displayName: "Return Related Questions",
257
+ name: "returnRelatedQuestions",
258
+ type: "boolean",
259
+ default: false,
260
+ description: "Whether or not a request to an online model should return related questions. Requires Perplexity API usage Tier-2.",
261
+ routing: {
262
+ send: {
263
+ type: "body",
264
+ property: "return_related_questions"
265
+ }
266
+ }
267
+ },
268
+ {
269
+ displayName: "Search Domain Filter",
270
+ name: "searchDomainFilter",
271
+ type: "string",
272
+ default: "",
273
+ description: "Limit the citations used by the online model to URLs from the specified domains. For blacklisting, add a <code>-</code> to the beginning of the domain string (e.g., <code>-domain1</code>). Currently limited to 3 domains. Requires Perplexity API usage Tier-3.",
274
+ placeholder: "e.g. domain1,domain2,-domain3",
275
+ routing: {
276
+ send: {
277
+ type: "body",
278
+ property: "search_domain_filter",
279
+ value: '={{ $value.split(",").map(domain => domain.trim()) }}'
280
+ }
281
+ }
282
+ },
283
+ {
284
+ displayName: "Search Recency Filter",
285
+ name: "searchRecency",
286
+ type: "options",
287
+ options: [
288
+ {
289
+ name: "Day",
290
+ value: "day"
291
+ },
292
+ {
293
+ name: "Hour",
294
+ value: "hour"
295
+ },
296
+ {
297
+ name: "Month",
298
+ value: "month"
299
+ },
300
+ {
301
+ name: "Week",
302
+ value: "week"
303
+ }
304
+ ],
305
+ default: "month",
306
+ description: "Returns search results within the specified time interval",
307
+ routing: {
308
+ send: {
309
+ type: "body",
310
+ property: "search_recency"
311
+ }
312
+ }
313
+ }
314
+ ]
315
+ }
316
+ ];
317
+ const displayOptions = {
318
+ show: {
319
+ resource: ["chat"],
320
+ operation: ["complete"]
321
+ }
322
+ };
323
+ const description = (0, import_n8n_workflow.updateDisplayOptions)(displayOptions, properties);
324
+ // Annotate the CommonJS export names for ESM import in node:
325
+ 0 && (module.exports = {
326
+ description
327
+ });
328
+ //# sourceMappingURL=complete.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../nodes/Perplexity/descriptions/chat/complete.operation.ts"],"sourcesContent":["import type { INodeProperties } from 'n8n-workflow';\nimport { updateDisplayOptions } from 'n8n-workflow';\n\nconst properties: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Model',\n\t\tname: 'model',\n\t\ttype: 'options',\n\t\tdefault: 'r1-1776',\n\t\trequired: true,\n\t\toptions: [\n\t\t\t{ name: 'R1-1776', value: 'r1-1776' },\n\t\t\t{ name: 'Sonar', value: 'sonar' },\n\t\t\t{ name: 'Sonar Deep Research', value: 'sonar-deep-research' },\n\t\t\t{ name: 'Sonar Pro', value: 'sonar-pro' },\n\t\t\t{ name: 'Sonar Reasoning', value: 'sonar-reasoning' },\n\t\t\t{ name: 'Sonar Reasoning Pro', value: 'sonar-reasoning-pro' },\n\t\t],\n\t\tdescription: 'The model which will generate the completion',\n\t\trouting: {\n\t\t\tsend: {\n\t\t\t\ttype: 'body',\n\t\t\t\tproperty: 'model',\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'Messages',\n\t\tname: 'messages',\n\t\ttype: 'fixedCollection',\n\t\tdescription:\n\t\t\t'Any optional system messages must be sent first, followed by alternating user and assistant messages',\n\t\trequired: true,\n\t\ttypeOptions: {\n\t\t\tmultipleValues: true,\n\t\t\tsortable: true,\n\t\t},\n\t\tplaceholder: 'Add Message',\n\t\tdefault: {\n\t\t\tmessage: [\n\t\t\t\t{\n\t\t\t\t\trole: 'user',\n\t\t\t\t\tcontent: '',\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Message',\n\t\t\t\tname: 'message',\n\t\t\t\tvalues: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Text',\n\t\t\t\t\t\tname: 'content',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tdescription: 'The content of the message to be sent',\n\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\trows: 2,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Role',\n\t\t\t\t\t\tname: 'role',\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Assistant',\n\t\t\t\t\t\t\t\tvalue: 'assistant',\n\t\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t\t'Tell the model to adopt a specific tone or personality. Must alternate with user messages.',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'System',\n\t\t\t\t\t\t\t\tvalue: 'system',\n\t\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t\t'Set the models behavior or context. Must come before user and assistant messages.',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'User',\n\t\t\t\t\t\t\t\tvalue: 'user',\n\t\t\t\t\t\t\t\tdescription: 'Send a message as a user and get a response from the model',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\tdefault: 'user',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\"Role in shaping the model's response, it tells the model how it should behave and interact with the user\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t\trouting: {\n\t\t\tsend: {\n\t\t\t\ttype: 'body',\n\t\t\t\tproperty: 'messages',\n\t\t\t\tvalue: '={{ $value.message }}',\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'Simplify Output',\n\t\tname: 'simplify',\n\t\ttype: 'boolean',\n\t\tdefault: false,\n\t\tdescription: 'Whether to return only essential fields (ID, citations, message)',\n\t\trouting: {\n\t\t\toutput: {\n\t\t\t\tpostReceive: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: 'set',\n\t\t\t\t\t\tenabled: '={{ $value }}',\n\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\tvalue:\n\t\t\t\t\t\t\t\t'={{ { \"id\": $response.body?.id, \"created\": $response.body?.created, \"citations\": $response.body?.citations, \"message\": $response.body?.choices?.[0]?.message?.content } }}',\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\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\ttype: 'collection',\n\t\tplaceholder: 'Add Option',\n\t\tdefault: {},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Frequency Penalty',\n\t\t\t\tname: 'frequencyPenalty',\n\t\t\t\ttype: 'number',\n\t\t\t\tdefault: 1,\n\t\t\t\ttypeOptions: {\n\t\t\t\t\tminValue: 1,\n\t\t\t\t},\n\t\t\t\tdescription:\n\t\t\t\t\t\"Values greater than 1.0 penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim\",\n\t\t\t\trouting: {\n\t\t\t\t\tsend: {\n\t\t\t\t\t\ttype: 'body',\n\t\t\t\t\t\tproperty: 'frequency_penalty',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Maximum Number of Tokens',\n\t\t\t\tname: 'maxTokens',\n\t\t\t\ttype: 'number',\n\t\t\t\tdefault: 1,\n\t\t\t\tdescription:\n\t\t\t\t\t'The maximum number of tokens to generate in the completion. The number of tokens requested plus the number of prompt tokens sent in messages must not exceed the context window token limit of model requested.',\n\t\t\t\trouting: {\n\t\t\t\t\tsend: {\n\t\t\t\t\t\ttype: 'body',\n\t\t\t\t\t\tproperty: 'max_tokens',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Output Randomness (Temperature)',\n\t\t\t\tname: 'temperature',\n\t\t\t\ttype: 'number',\n\t\t\t\tdefault: 0.2,\n\t\t\t\tdescription:\n\t\t\t\t\t'The amount of randomness in the response, valued between 0 inclusive and 2 exclusive. Higher values are more random, and lower values are more deterministic.',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\tminValue: 0,\n\t\t\t\t\tmaxValue: 1.99,\n\t\t\t\t},\n\t\t\t\trouting: {\n\t\t\t\t\tsend: {\n\t\t\t\t\t\ttype: 'body',\n\t\t\t\t\t\tproperty: 'temperature',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Top K',\n\t\t\t\tname: 'topK',\n\t\t\t\ttype: 'number',\n\t\t\t\tdefault: 0,\n\t\t\t\tdescription:\n\t\t\t\t\t'The number of tokens to keep for highest Top K filtering, specified as an integer between 0 and 2048 inclusive. If set to 0, Top K filtering is disabled. We recommend either altering Top K or Top P, but not both.',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\tminValue: 0,\n\t\t\t\t\tmaxValue: 2048,\n\t\t\t\t},\n\t\t\t\trouting: {\n\t\t\t\t\tsend: {\n\t\t\t\t\t\ttype: 'body',\n\t\t\t\t\t\tproperty: 'top_k',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Top P',\n\t\t\t\tname: 'topP',\n\t\t\t\ttype: 'number',\n\t\t\t\tdefault: 0.9,\n\t\t\t\tdescription:\n\t\t\t\t\t'The nucleus sampling threshold, valued between 0 and 1 inclusive. For each subsequent token, the model considers the results of the tokens with Top P probability mass. We recommend either altering Top K or Top P, but not both.',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\tminValue: 0,\n\t\t\t\t\tmaxValue: 1,\n\t\t\t\t},\n\t\t\t\trouting: {\n\t\t\t\t\tsend: {\n\t\t\t\t\t\ttype: 'body',\n\t\t\t\t\t\tproperty: 'top_p',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Presence Penalty',\n\t\t\t\tname: 'presencePenalty',\n\t\t\t\ttype: 'number',\n\t\t\t\tdefault: 0,\n\t\t\t\tdescription:\n\t\t\t\t\t\"A value between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\",\n\t\t\t\ttypeOptions: {\n\t\t\t\t\tminValue: -2.0,\n\t\t\t\t\tmaxValue: 2.0,\n\t\t\t\t},\n\t\t\t\trouting: {\n\t\t\t\t\tsend: {\n\t\t\t\t\t\ttype: 'body',\n\t\t\t\t\t\tproperty: 'presence_penalty',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Return Images',\n\t\t\t\tname: 'returnImages',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdefault: false,\n\t\t\t\tdescription:\n\t\t\t\t\t'Whether or not a request to an online model should return images. Requires Perplexity API usage Tier-2.',\n\t\t\t\trouting: {\n\t\t\t\t\tsend: {\n\t\t\t\t\t\ttype: 'body',\n\t\t\t\t\t\tproperty: 'return_images',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Return Related Questions',\n\t\t\t\tname: 'returnRelatedQuestions',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdefault: false,\n\t\t\t\tdescription:\n\t\t\t\t\t'Whether or not a request to an online model should return related questions. Requires Perplexity API usage Tier-2.',\n\t\t\t\trouting: {\n\t\t\t\t\tsend: {\n\t\t\t\t\t\ttype: 'body',\n\t\t\t\t\t\tproperty: 'return_related_questions',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Search Domain Filter',\n\t\t\t\tname: 'searchDomainFilter',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t\tdescription:\n\t\t\t\t\t'Limit the citations used by the online model to URLs from the specified domains. For blacklisting, add a <code>-</code> to the beginning of the domain string (e.g., <code>-domain1</code>). Currently limited to 3 domains. Requires Perplexity API usage Tier-3.',\n\t\t\t\tplaceholder: 'e.g. domain1,domain2,-domain3',\n\t\t\t\trouting: {\n\t\t\t\t\tsend: {\n\t\t\t\t\t\ttype: 'body',\n\t\t\t\t\t\tproperty: 'search_domain_filter',\n\t\t\t\t\t\tvalue: '={{ $value.split(\",\").map(domain => domain.trim()) }}',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Search Recency Filter',\n\t\t\t\tname: 'searchRecency',\n\t\t\t\ttype: 'options',\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Day',\n\t\t\t\t\t\tvalue: 'day',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Hour',\n\t\t\t\t\t\tvalue: 'hour',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Month',\n\t\t\t\t\t\tvalue: 'month',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Week',\n\t\t\t\t\t\tvalue: 'week',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'month',\n\t\t\t\tdescription: 'Returns search results within the specified time interval',\n\t\t\t\trouting: {\n\t\t\t\t\tsend: {\n\t\t\t\t\t\ttype: 'body',\n\t\t\t\t\t\tproperty: 'search_recency',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n];\n\nconst displayOptions = {\n\tshow: {\n\t\tresource: ['chat'],\n\t\toperation: ['complete'],\n\t},\n};\n\nexport const description = updateDisplayOptions(displayOptions, properties);\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,0BAAqC;AAErC,MAAM,aAAgC;AAAA,EACrC;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,UAAU;AAAA,IACV,SAAS;AAAA,MACR,EAAE,MAAM,WAAW,OAAO,UAAU;AAAA,MACpC,EAAE,MAAM,SAAS,OAAO,QAAQ;AAAA,MAChC,EAAE,MAAM,uBAAuB,OAAO,sBAAsB;AAAA,MAC5D,EAAE,MAAM,aAAa,OAAO,YAAY;AAAA,MACxC,EAAE,MAAM,mBAAmB,OAAO,kBAAkB;AAAA,MACpD,EAAE,MAAM,uBAAuB,OAAO,sBAAsB;AAAA,IAC7D;AAAA,IACA,aAAa;AAAA,IACb,SAAS;AAAA,MACR,MAAM;AAAA,QACL,MAAM;AAAA,QACN,UAAU;AAAA,MACX;AAAA,IACD;AAAA,EACD;AAAA,EACA;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,aACC;AAAA,IACD,UAAU;AAAA,IACV,aAAa;AAAA,MACZ,gBAAgB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A,QACD;AAAA,QACA,SAAS;AAAA,QACT,aAAa;AAAA,QACb,SAAS;AAAA,UACR,MAAM;AAAA,YACL,MAAM;AAAA,YACN,UAAU;AAAA,UACX;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACD;AAEA,MAAM,iBAAiB;AAAA,EACtB,MAAM;AAAA,IACL,UAAU,CAAC,MAAM;AAAA,IACjB,WAAW,CAAC,UAAU;AAAA,EACvB;AACD;AAEO,MAAM,kBAAc,0CAAqB,gBAAgB,UAAU;","names":[]}
@@ -0,0 +1,39 @@
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 descriptions_exports = {};
30
+ __export(descriptions_exports, {
31
+ chat: () => chat
32
+ });
33
+ module.exports = __toCommonJS(descriptions_exports);
34
+ var chat = __toESM(require("./chat/Chat.resource"));
35
+ // Annotate the CommonJS export names for ESM import in node:
36
+ 0 && (module.exports = {
37
+ chat
38
+ });
39
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../nodes/Perplexity/descriptions/index.ts"],"sourcesContent":["export * as chat from './chat/Chat.resource';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAAsB;","names":[]}
@@ -0,0 +1,35 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
3
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
+ <svg version="1.0" xmlns="http://www.w3.org/2000/svg"
5
+ width="270.000000pt" height="270.000000pt" viewBox="0 0 270.000000 270.000000"
6
+ preserveAspectRatio="xMidYMid meet">
7
+ <metadata>
8
+ Created by potrace 1.14, written by Peter Selinger 2001-2017
9
+ </metadata>
10
+ <g transform="translate(0.000000,270.000000) scale(0.100000,-0.100000)"
11
+ fill="#000000" stroke="none">
12
+ <path d="M185 2691 c-86 -21 -158 -93 -175 -175 -7 -35 -10 -415 -8 -1196 3
13
+ -1276 -2 -1180 73 -1253 20 -20 54 -42 74 -49 53 -19 2349 -19 2402 0 20 7 54
14
+ 29 74 49 75 73 70 -23 73 1253 2 817 -1 1161 -9 1200 -9 46 -19 63 -64 106
15
+ -42 41 -63 54 -104 63 -59 13 -2284 14 -2336 2z m786 -547 l314 -255 3 255 2
16
+ 256 60 0 60 0 2 -255 3 -256 315 257 315 257 3 -292 2 -291 135 0 135 0 0
17
+ -450 0 -450 -135 0 -135 0 -2 -296 -3 -295 -312 275 c-172 152 -315 276 -318
18
+ 276 -3 0 -5 -133 -5 -295 l0 -295 -60 0 -60 0 0 295 c0 162 -2 295 -5 295 -3
19
+ 0 -146 -124 -318 -276 l-312 -276 -3 296 -2 296 -135 0 -135 0 0 450 0 450
20
+ 135 0 135 0 0 290 c0 160 2 290 4 290 2 0 145 -115 317 -256z"/>
21
+ <path d="M780 1981 l0 -161 215 0 216 0 -203 151 c-112 84 -209 156 -215 162
22
+ -10 7 -13 -24 -13 -152z"/>
23
+ <path d="M1706 1982 l-210 -157 209 -3 c114 -1 210 -1 212 1 2 2 2 74 1 160
24
+ l-3 156 -209 -157z"/>
25
+ <path d="M510 1370 l0 -330 70 0 70 0 0 88 0 88 38 35 c20 20 146 127 280 239
26
+ 133 111 242 204 242 206 0 2 -157 4 -350 4 l-350 0 0 -330z"/>
27
+ <path d="M1490 1696 c0 -2 126 -102 280 -223 l280 -218 0 -107 0 -108 70 0 70
28
+ 0 0 330 0 330 -350 0 c-192 0 -350 -2 -350 -4z"/>
29
+ <path d="M1028 1392 l-247 -217 0 -283 c-1 -233 1 -282 12 -275 8 4 122 104
30
+ 255 222 l242 214 0 278 c0 154 -3 279 -7 279 -5 0 -119 -98 -255 -218z"/>
31
+ <path d="M1410 1332 l0 -279 242 -214 c133 -118 247 -218 255 -222 11 -7 13
32
+ 42 12 275 l0 283 -245 215 c-135 118 -249 217 -254 218 -6 2 -10 -101 -10
33
+ -276z"/>
34
+ </g>
35
+ </svg>
@@ -92,13 +92,13 @@ class RespondToWebhook {
92
92
  icon: { light: "file:webhook.svg", dark: "file:webhook.dark.svg" },
93
93
  name: "respondToWebhook",
94
94
  group: ["transform"],
95
- version: [1, 1.1, 1.2, 1.3],
95
+ version: [1, 1.1, 1.2, 1.3, 1.4],
96
96
  description: "Returns data for Webhook",
97
97
  defaults: {
98
98
  name: "Respond to Webhook"
99
99
  },
100
100
  inputs: [import_n8n_workflow.NodeConnectionTypes.Main],
101
- outputs: `={{(${import_utils.configuredOutputs})($nodeVersion)}}`,
101
+ outputs: `={{(${import_utils.configuredOutputs})($nodeVersion, $parameter)}}`,
102
102
  credentials: [
103
103
  {
104
104
  name: "jwtAuth",
@@ -111,6 +111,15 @@ class RespondToWebhook {
111
111
  }
112
112
  ],
113
113
  properties: [
114
+ {
115
+ displayName: "Enable Response Output Branch",
116
+ name: "enableResponseOutput",
117
+ type: "boolean",
118
+ default: false,
119
+ description: "Whether to provide an additional output branch with the response sent to the webhook",
120
+ isNodeSetting: true,
121
+ displayOptions: { show: { "@version": [{ _cnd: { gte: 1.4 } }] } }
122
+ },
114
123
  {
115
124
  displayName: `Verify that the "Webhook" node's "Respond" parameter is set to "Using Respond to Webhook Node". <a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.respondtowebhook/" target="_blank">More details`,
116
125
  name: "generalNotice",
@@ -447,7 +456,9 @@ class RespondToWebhook {
447
456
  }
448
457
  throw error;
449
458
  }
450
- if (nodeVersion >= 1.3) {
459
+ if (nodeVersion === 1.3) {
460
+ return [items, [{ json: { response } }]];
461
+ } else if (nodeVersion >= 1.4 && this.getNodeParameter("enableResponseOutput", 0, false)) {
451
462
  return [items, [{ json: { response } }]];
452
463
  }
453
464
  return [items];
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../nodes/RespondToWebhook/RespondToWebhook.node.ts"],"sourcesContent":["import jwt from 'jsonwebtoken';\nimport set from 'lodash/set';\nimport type {\n\tIDataObject,\n\tIExecuteFunctions,\n\tIN8nHttpFullResponse,\n\tIN8nHttpResponse,\n\tINodeExecutionData,\n\tINodeProperties,\n\tINodeType,\n\tINodeTypeDescription,\n} from 'n8n-workflow';\nimport {\n\tjsonParse,\n\tBINARY_ENCODING,\n\tNodeOperationError,\n\tNodeConnectionTypes,\n\tWEBHOOK_NODE_TYPE,\n\tFORM_TRIGGER_NODE_TYPE,\n\tCHAT_TRIGGER_NODE_TYPE,\n\tWAIT_NODE_TYPE,\n} from 'n8n-workflow';\nimport type { Readable } from 'stream';\n\nimport { configuredOutputs } from './utils';\nimport { formatPrivateKey, generatePairedItemData } from '../../utils/utilities';\n\nconst respondWithProperty: INodeProperties = {\n\tdisplayName: 'Respond With',\n\tname: 'respondWith',\n\ttype: 'options',\n\toptions: [\n\t\t{\n\t\t\tname: 'All Incoming Items',\n\t\t\tvalue: 'allIncomingItems',\n\t\t\tdescription: 'Respond with all input JSON items',\n\t\t},\n\t\t{\n\t\t\tname: 'Binary File',\n\t\t\tvalue: 'binary',\n\t\t\tdescription: 'Respond with incoming file binary data',\n\t\t},\n\t\t{\n\t\t\tname: 'First Incoming Item',\n\t\t\tvalue: 'firstIncomingItem',\n\t\t\tdescription: 'Respond with the first input JSON item',\n\t\t},\n\t\t{\n\t\t\tname: 'JSON',\n\t\t\tvalue: 'json',\n\t\t\tdescription: 'Respond with a custom JSON body',\n\t\t},\n\t\t{\n\t\t\tname: 'JWT Token',\n\t\t\tvalue: 'jwt',\n\t\t\tdescription: 'Respond with a JWT token',\n\t\t},\n\t\t{\n\t\t\tname: 'No Data',\n\t\t\tvalue: 'noData',\n\t\t\tdescription: 'Respond with an empty body',\n\t\t},\n\t\t{\n\t\t\tname: 'Redirect',\n\t\t\tvalue: 'redirect',\n\t\t\tdescription: 'Respond with a redirect to a given URL',\n\t\t},\n\t\t{\n\t\t\tname: 'Text',\n\t\t\tvalue: 'text',\n\t\t\tdescription: 'Respond with a simple text message body',\n\t\t},\n\t],\n\tdefault: 'firstIncomingItem',\n\tdescription: 'The data that should be returned',\n};\n\nexport class RespondToWebhook implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Respond to Webhook',\n\t\ticon: { light: 'file:webhook.svg', dark: 'file:webhook.dark.svg' },\n\t\tname: 'respondToWebhook',\n\t\tgroup: ['transform'],\n\t\tversion: [1, 1.1, 1.2, 1.3],\n\t\tdescription: 'Returns data for Webhook',\n\t\tdefaults: {\n\t\t\tname: 'Respond to Webhook',\n\t\t},\n\t\tinputs: [NodeConnectionTypes.Main],\n\t\toutputs: `={{(${configuredOutputs})($nodeVersion)}}`,\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'jwtAuth',\n\t\t\t\trequired: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['jwt'],\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:\n\t\t\t\t\t'Verify that the \"Webhook\" node\\'s \"Respond\" parameter is set to \"Using Respond to Webhook Node\". <a href=\"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.respondtowebhook/\" target=\"_blank\">More details',\n\t\t\t\tname: 'generalNotice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\t...respondWithProperty,\n\t\t\t\tdisplayOptions: { show: { '@version': [1, 1.1] } },\n\t\t\t},\n\t\t\t{\n\t\t\t\t...respondWithProperty,\n\t\t\t\tnoDataExpression: true,\n\t\t\t\tdisplayOptions: { show: { '@version': [{ _cnd: { gte: 1.2 } }] } },\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\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['jwt'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName:\n\t\t\t\t\t'When using expressions, note that this node will only run for the first item in the input data',\n\t\t\t\tname: 'webhookNotice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['json', 'text', 'jwt'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Redirect URL',\n\t\t\t\tname: 'redirectURL',\n\t\t\t\ttype: 'string',\n\t\t\t\trequired: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['redirect'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '',\n\t\t\t\tplaceholder: 'e.g. http://www.n8n.io',\n\t\t\t\tdescription: 'The URL to redirect to',\n\t\t\t\tvalidateType: 'url',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Response Body',\n\t\t\t\tname: 'responseBody',\n\t\t\t\ttype: 'json',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['json'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '{\\n \"myField\": \"value\"\\n}',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\trows: 4,\n\t\t\t\t},\n\t\t\t\tdescription: 'The HTTP response JSON data',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Payload',\n\t\t\t\tname: 'payload',\n\t\t\t\ttype: 'json',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['jwt'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '{\\n \"myField\": \"value\"\\n}',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\trows: 4,\n\t\t\t\t},\n\t\t\t\tvalidateType: 'object',\n\t\t\t\tdescription: 'The payload to include in the JWT token',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Response Body',\n\t\t\t\tname: 'responseBody',\n\t\t\t\ttype: 'string',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['text'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\ttypeOptions: {\n\t\t\t\t\trows: 2,\n\t\t\t\t},\n\t\t\t\tdefault: '',\n\t\t\t\tplaceholder: 'e.g. Workflow completed',\n\t\t\t\tdescription: 'The HTTP response text data',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Response Data Source',\n\t\t\t\tname: 'responseDataSource',\n\t\t\t\ttype: 'options',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['binary'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Choose Automatically From Input',\n\t\t\t\t\t\tvalue: 'automatically',\n\t\t\t\t\t\tdescription: 'Use if input data will contain a single piece of binary data',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Specify Myself',\n\t\t\t\t\t\tvalue: 'set',\n\t\t\t\t\t\tdescription: 'Enter the name of the input field the binary data will be in',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'automatically',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Input Field Name',\n\t\t\t\tname: 'inputFieldName',\n\t\t\t\ttype: 'string',\n\t\t\t\trequired: true,\n\t\t\t\tdefault: 'data',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['binary'],\n\t\t\t\t\t\tresponseDataSource: ['set'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdescription: 'The name of the node input field with the binary data',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tdisplayName: 'Options',\n\t\t\t\tname: 'options',\n\t\t\t\ttype: 'collection',\n\t\t\t\tplaceholder: 'Add option',\n\t\t\t\tdefault: {},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Response Code',\n\t\t\t\t\t\tname: 'responseCode',\n\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\tminValue: 100,\n\t\t\t\t\t\t\tmaxValue: 599,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdefault: 200,\n\t\t\t\t\t\tdescription: 'The HTTP response code to return. Defaults to 200.',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Response Headers',\n\t\t\t\t\t\tname: 'responseHeaders',\n\t\t\t\t\t\tplaceholder: 'Add Response Header',\n\t\t\t\t\t\tdescription: 'Add headers to the webhook response',\n\t\t\t\t\t\ttype: 'fixedCollection',\n\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\tmultipleValues: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdefault: {},\n\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'entries',\n\t\t\t\t\t\t\t\tdisplayName: 'Entries',\n\t\t\t\t\t\t\t\tvalues: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tdisplayName: 'Name',\n\t\t\t\t\t\t\t\t\t\tname: 'name',\n\t\t\t\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\t\t\t\tdescription: 'Name of the header',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tdisplayName: 'Value',\n\t\t\t\t\t\t\t\t\t\tname: 'value',\n\t\t\t\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\t\t\t\tdescription: 'Value of the header',\n\t\t\t\t\t\t\t\t\t},\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\t{\n\t\t\t\t\t\tdisplayName: 'Put Response in Field',\n\t\t\t\t\t\tname: 'responseKey',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t['/respondWith']: ['allIncomingItems', 'firstIncomingItem'],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tdescription: 'The name of the response field to put all items in',\n\t\t\t\t\t\tplaceholder: 'e.g. data',\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): Promise<INodeExecutionData[][]> {\n\t\tconst items = this.getInputData();\n\t\tconst nodeVersion = this.getNode().typeVersion;\n\n\t\tconst WEBHOOK_NODE_TYPES = [\n\t\t\tWEBHOOK_NODE_TYPE,\n\t\t\tFORM_TRIGGER_NODE_TYPE,\n\t\t\tCHAT_TRIGGER_NODE_TYPE,\n\t\t\tWAIT_NODE_TYPE,\n\t\t];\n\n\t\tlet response: IN8nHttpFullResponse;\n\n\t\ttry {\n\t\t\tif (nodeVersion >= 1.1) {\n\t\t\t\tconst connectedNodes = this.getParentNodes(this.getNode().name);\n\t\t\t\tif (!connectedNodes.some(({ type }) => WEBHOOK_NODE_TYPES.includes(type))) {\n\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t\tnew Error('No Webhook node found in the workflow'),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t'Insert a Webhook node to your workflow and set the “Respond” parameter to “Using Respond to Webhook Node” ',\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst respondWith = this.getNodeParameter('respondWith', 0) as string;\n\t\t\tconst options = this.getNodeParameter('options', 0, {});\n\n\t\t\tconst headers = {} as IDataObject;\n\t\t\tif (options.responseHeaders) {\n\t\t\t\tfor (const header of (options.responseHeaders as IDataObject).entries as IDataObject[]) {\n\t\t\t\t\tif (typeof header.name !== 'string') {\n\t\t\t\t\t\theader.name = header.name?.toString();\n\t\t\t\t\t}\n\t\t\t\t\theaders[header.name?.toLowerCase() as string] = header.value?.toString();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet statusCode = (options.responseCode as number) || 200;\n\t\t\tlet responseBody: IN8nHttpResponse | Readable;\n\t\t\tif (respondWith === 'json') {\n\t\t\t\tconst responseBodyParameter = this.getNodeParameter('responseBody', 0) as string;\n\t\t\t\tif (responseBodyParameter) {\n\t\t\t\t\tif (typeof responseBodyParameter === 'object') {\n\t\t\t\t\t\tresponseBody = responseBodyParameter;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponseBody = jsonParse(responseBodyParameter);\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\tthrow new NodeOperationError(this.getNode(), error as Error, {\n\t\t\t\t\t\t\t\tmessage: \"Invalid JSON in 'Response Body' field\",\n\t\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t\t\"Check that the syntax of the JSON in the 'Response Body' parameter is valid\",\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} else if (respondWith === 'jwt') {\n\t\t\t\ttry {\n\t\t\t\t\tconst { keyType, secret, algorithm, privateKey } = await this.getCredentials<{\n\t\t\t\t\t\tkeyType: 'passphrase' | 'pemKey';\n\t\t\t\t\t\tprivateKey: string;\n\t\t\t\t\t\tsecret: string;\n\t\t\t\t\t\talgorithm: jwt.Algorithm;\n\t\t\t\t\t}>('jwtAuth');\n\n\t\t\t\t\tlet secretOrPrivateKey;\n\n\t\t\t\t\tif (keyType === 'passphrase') {\n\t\t\t\t\t\tsecretOrPrivateKey = secret;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsecretOrPrivateKey = formatPrivateKey(privateKey);\n\t\t\t\t\t}\n\t\t\t\t\tconst payload = this.getNodeParameter('payload', 0, {}) as IDataObject;\n\t\t\t\t\tconst token = jwt.sign(payload, secretOrPrivateKey, { algorithm });\n\t\t\t\t\tresponseBody = { token };\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthrow new NodeOperationError(this.getNode(), error as Error, {\n\t\t\t\t\t\tmessage: 'Error signing JWT token',\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else if (respondWith === 'allIncomingItems') {\n\t\t\t\tconst respondItems = items.map((item) => item.json);\n\t\t\t\tresponseBody = options.responseKey\n\t\t\t\t\t? set({}, options.responseKey as string, respondItems)\n\t\t\t\t\t: respondItems;\n\t\t\t} else if (respondWith === 'firstIncomingItem') {\n\t\t\t\tresponseBody = options.responseKey\n\t\t\t\t\t? set({}, options.responseKey as string, items[0].json)\n\t\t\t\t\t: items[0].json;\n\t\t\t} else if (respondWith === 'text') {\n\t\t\t\tresponseBody = this.getNodeParameter('responseBody', 0) as string;\n\t\t\t} else if (respondWith === 'binary') {\n\t\t\t\tconst item = items[0];\n\n\t\t\t\tif (item.binary === undefined) {\n\t\t\t\t\tthrow new NodeOperationError(this.getNode(), 'No binary data exists on the first item!');\n\t\t\t\t}\n\n\t\t\t\tlet responseBinaryPropertyName: string;\n\n\t\t\t\tconst responseDataSource = this.getNodeParameter('responseDataSource', 0) as string;\n\n\t\t\t\tif (responseDataSource === 'set') {\n\t\t\t\t\tresponseBinaryPropertyName = this.getNodeParameter('inputFieldName', 0) as string;\n\t\t\t\t} else {\n\t\t\t\t\tconst binaryKeys = Object.keys(item.binary);\n\t\t\t\t\tif (binaryKeys.length === 0) {\n\t\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t\t\t'No binary data exists on the first item!',\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tresponseBinaryPropertyName = binaryKeys[0];\n\t\t\t\t}\n\n\t\t\t\tconst binaryData = this.helpers.assertBinaryData(0, responseBinaryPropertyName);\n\t\t\t\tif (binaryData.id) {\n\t\t\t\t\tresponseBody = { binaryData };\n\t\t\t\t} else {\n\t\t\t\t\tresponseBody = Buffer.from(binaryData.data, BINARY_ENCODING);\n\t\t\t\t\theaders['content-length'] = (responseBody as Buffer).length;\n\t\t\t\t}\n\n\t\t\t\tif (!headers['content-type']) {\n\t\t\t\t\theaders['content-type'] = binaryData.mimeType;\n\t\t\t\t}\n\t\t\t} else if (respondWith === 'redirect') {\n\t\t\t\theaders.location = this.getNodeParameter('redirectURL', 0) as string;\n\t\t\t\tstatusCode = (options.responseCode as number) ?? 307;\n\t\t\t} else if (respondWith !== 'noData') {\n\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t`The Response Data option \"${respondWith}\" is not supported!`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tresponse = {\n\t\t\t\tbody: responseBody,\n\t\t\t\theaders,\n\t\t\t\tstatusCode,\n\t\t\t};\n\n\t\t\tthis.sendResponse(response);\n\t\t} catch (error) {\n\t\t\tif (this.continueOnFail()) {\n\t\t\t\tconst itemData = generatePairedItemData(items.length);\n\t\t\t\tconst returnData = this.helpers.constructExecutionMetaData(\n\t\t\t\t\t[{ json: { error: error.message } }],\n\t\t\t\t\t{ itemData },\n\t\t\t\t);\n\t\t\t\treturn [returnData];\n\t\t\t}\n\n\t\t\tthrow error;\n\t\t}\n\n\t\tif (nodeVersion >= 1.3) {\n\t\t\treturn [items, [{ json: { response } }]];\n\t\t}\n\n\t\treturn [items];\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAgB;AAChB,iBAAgB;AAWhB,0BASO;AAGP,mBAAkC;AAClC,uBAAyD;AAEzD,MAAM,sBAAuC;AAAA,EAC5C,aAAa;AAAA,EACb,MAAM;AAAA,EACN,MAAM;AAAA,EACN,SAAS;AAAA,IACR;AAAA,MACC,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aAAa;AAAA,IACd;AAAA,IACA;AAAA,MACC,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aAAa;AAAA,IACd;AAAA,IACA;AAAA,MACC,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aAAa;AAAA,IACd;AAAA,IACA;AAAA,MACC,MAAM;AAAA,MACN,OAAO;AAAA,MACP,a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AAC;AACzD,qBAAc,QAAQ,gBAA2B;AAAA,MAClD,WAAW,gBAAgB,UAAU;AACpC,cAAM,IAAI;AAAA,UACT,KAAK,QAAQ;AAAA,UACb,6BAA6B,WAAW;AAAA,QACzC;AAAA,MACD;AAEA,iBAAW;AAAA,QACV,MAAM;AAAA,QACN;AAAA,QACA;AAAA,MACD;AAEA,WAAK,aAAa,QAAQ;AAAA,IAC3B,SAAS,OAAO;AACf,UAAI,KAAK,eAAe,GAAG;AAC1B,cAAM,eAAW,yCAAuB,MAAM,MAAM;AACpD,cAAM,aAAa,KAAK,QAAQ;AAAA,UAC/B,CAAC,EAAE,MAAM,EAAE,OAAO,MAAM,QAAQ,EAAE,CAAC;AAAA,UACnC,EAAE,SAAS;AAAA,QACZ;AACA,eAAO,CAAC,UAAU;AAAA,MACnB;AAEA,YAAM;AAAA,IACP;AAEA,QAAI,eAAe,KAAK;AACvB,aAAO,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAAA,IACxC;AAEA,WAAO,CAAC,KAAK;AAAA,EACd;AACD;","names":["jwt","set"]}
1
+ {"version":3,"sources":["../../../nodes/RespondToWebhook/RespondToWebhook.node.ts"],"sourcesContent":["import jwt from 'jsonwebtoken';\nimport set from 'lodash/set';\nimport type {\n\tIDataObject,\n\tIExecuteFunctions,\n\tIN8nHttpFullResponse,\n\tIN8nHttpResponse,\n\tINodeExecutionData,\n\tINodeProperties,\n\tINodeType,\n\tINodeTypeDescription,\n} from 'n8n-workflow';\nimport {\n\tjsonParse,\n\tBINARY_ENCODING,\n\tNodeOperationError,\n\tNodeConnectionTypes,\n\tWEBHOOK_NODE_TYPE,\n\tFORM_TRIGGER_NODE_TYPE,\n\tCHAT_TRIGGER_NODE_TYPE,\n\tWAIT_NODE_TYPE,\n} from 'n8n-workflow';\nimport type { Readable } from 'stream';\n\nimport { configuredOutputs } from './utils';\nimport { formatPrivateKey, generatePairedItemData } from '../../utils/utilities';\n\nconst respondWithProperty: INodeProperties = {\n\tdisplayName: 'Respond With',\n\tname: 'respondWith',\n\ttype: 'options',\n\toptions: [\n\t\t{\n\t\t\tname: 'All Incoming Items',\n\t\t\tvalue: 'allIncomingItems',\n\t\t\tdescription: 'Respond with all input JSON items',\n\t\t},\n\t\t{\n\t\t\tname: 'Binary File',\n\t\t\tvalue: 'binary',\n\t\t\tdescription: 'Respond with incoming file binary data',\n\t\t},\n\t\t{\n\t\t\tname: 'First Incoming Item',\n\t\t\tvalue: 'firstIncomingItem',\n\t\t\tdescription: 'Respond with the first input JSON item',\n\t\t},\n\t\t{\n\t\t\tname: 'JSON',\n\t\t\tvalue: 'json',\n\t\t\tdescription: 'Respond with a custom JSON body',\n\t\t},\n\t\t{\n\t\t\tname: 'JWT Token',\n\t\t\tvalue: 'jwt',\n\t\t\tdescription: 'Respond with a JWT token',\n\t\t},\n\t\t{\n\t\t\tname: 'No Data',\n\t\t\tvalue: 'noData',\n\t\t\tdescription: 'Respond with an empty body',\n\t\t},\n\t\t{\n\t\t\tname: 'Redirect',\n\t\t\tvalue: 'redirect',\n\t\t\tdescription: 'Respond with a redirect to a given URL',\n\t\t},\n\t\t{\n\t\t\tname: 'Text',\n\t\t\tvalue: 'text',\n\t\t\tdescription: 'Respond with a simple text message body',\n\t\t},\n\t],\n\tdefault: 'firstIncomingItem',\n\tdescription: 'The data that should be returned',\n};\n\nexport class RespondToWebhook implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Respond to Webhook',\n\t\ticon: { light: 'file:webhook.svg', dark: 'file:webhook.dark.svg' },\n\t\tname: 'respondToWebhook',\n\t\tgroup: ['transform'],\n\t\tversion: [1, 1.1, 1.2, 1.3, 1.4],\n\t\tdescription: 'Returns data for Webhook',\n\t\tdefaults: {\n\t\t\tname: 'Respond to Webhook',\n\t\t},\n\t\tinputs: [NodeConnectionTypes.Main],\n\t\toutputs: `={{(${configuredOutputs})($nodeVersion, $parameter)}}`,\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'jwtAuth',\n\t\t\t\trequired: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['jwt'],\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: 'Enable Response Output Branch',\n\t\t\t\tname: 'enableResponseOutput',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdefault: false,\n\t\t\t\tdescription:\n\t\t\t\t\t'Whether to provide an additional output branch with the response sent to the webhook',\n\t\t\t\tisNodeSetting: true,\n\t\t\t\tdisplayOptions: { show: { '@version': [{ _cnd: { gte: 1.4 } }] } },\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName:\n\t\t\t\t\t'Verify that the \"Webhook\" node\\'s \"Respond\" parameter is set to \"Using Respond to Webhook Node\". <a href=\"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.respondtowebhook/\" target=\"_blank\">More details',\n\t\t\t\tname: 'generalNotice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\t...respondWithProperty,\n\t\t\t\tdisplayOptions: { show: { '@version': [1, 1.1] } },\n\t\t\t},\n\t\t\t{\n\t\t\t\t...respondWithProperty,\n\t\t\t\tnoDataExpression: true,\n\t\t\t\tdisplayOptions: { show: { '@version': [{ _cnd: { gte: 1.2 } }] } },\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\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['jwt'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName:\n\t\t\t\t\t'When using expressions, note that this node will only run for the first item in the input data',\n\t\t\t\tname: 'webhookNotice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['json', 'text', 'jwt'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Redirect URL',\n\t\t\t\tname: 'redirectURL',\n\t\t\t\ttype: 'string',\n\t\t\t\trequired: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['redirect'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '',\n\t\t\t\tplaceholder: 'e.g. http://www.n8n.io',\n\t\t\t\tdescription: 'The URL to redirect to',\n\t\t\t\tvalidateType: 'url',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Response Body',\n\t\t\t\tname: 'responseBody',\n\t\t\t\ttype: 'json',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['json'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '{\\n \"myField\": \"value\"\\n}',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\trows: 4,\n\t\t\t\t},\n\t\t\t\tdescription: 'The HTTP response JSON data',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Payload',\n\t\t\t\tname: 'payload',\n\t\t\t\ttype: 'json',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['jwt'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '{\\n \"myField\": \"value\"\\n}',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\trows: 4,\n\t\t\t\t},\n\t\t\t\tvalidateType: 'object',\n\t\t\t\tdescription: 'The payload to include in the JWT token',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Response Body',\n\t\t\t\tname: 'responseBody',\n\t\t\t\ttype: 'string',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['text'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\ttypeOptions: {\n\t\t\t\t\trows: 2,\n\t\t\t\t},\n\t\t\t\tdefault: '',\n\t\t\t\tplaceholder: 'e.g. Workflow completed',\n\t\t\t\tdescription: 'The HTTP response text data',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Response Data Source',\n\t\t\t\tname: 'responseDataSource',\n\t\t\t\ttype: 'options',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['binary'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Choose Automatically From Input',\n\t\t\t\t\t\tvalue: 'automatically',\n\t\t\t\t\t\tdescription: 'Use if input data will contain a single piece of binary data',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Specify Myself',\n\t\t\t\t\t\tvalue: 'set',\n\t\t\t\t\t\tdescription: 'Enter the name of the input field the binary data will be in',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'automatically',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Input Field Name',\n\t\t\t\tname: 'inputFieldName',\n\t\t\t\ttype: 'string',\n\t\t\t\trequired: true,\n\t\t\t\tdefault: 'data',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['binary'],\n\t\t\t\t\t\tresponseDataSource: ['set'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdescription: 'The name of the node input field with the binary data',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tdisplayName: 'Options',\n\t\t\t\tname: 'options',\n\t\t\t\ttype: 'collection',\n\t\t\t\tplaceholder: 'Add option',\n\t\t\t\tdefault: {},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Response Code',\n\t\t\t\t\t\tname: 'responseCode',\n\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\tminValue: 100,\n\t\t\t\t\t\t\tmaxValue: 599,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdefault: 200,\n\t\t\t\t\t\tdescription: 'The HTTP response code to return. Defaults to 200.',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Response Headers',\n\t\t\t\t\t\tname: 'responseHeaders',\n\t\t\t\t\t\tplaceholder: 'Add Response Header',\n\t\t\t\t\t\tdescription: 'Add headers to the webhook response',\n\t\t\t\t\t\ttype: 'fixedCollection',\n\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\tmultipleValues: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdefault: {},\n\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'entries',\n\t\t\t\t\t\t\t\tdisplayName: 'Entries',\n\t\t\t\t\t\t\t\tvalues: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tdisplayName: 'Name',\n\t\t\t\t\t\t\t\t\t\tname: 'name',\n\t\t\t\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\t\t\t\tdescription: 'Name of the header',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tdisplayName: 'Value',\n\t\t\t\t\t\t\t\t\t\tname: 'value',\n\t\t\t\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\t\t\t\tdescription: 'Value of the header',\n\t\t\t\t\t\t\t\t\t},\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\t{\n\t\t\t\t\t\tdisplayName: 'Put Response in Field',\n\t\t\t\t\t\tname: 'responseKey',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t['/respondWith']: ['allIncomingItems', 'firstIncomingItem'],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tdescription: 'The name of the response field to put all items in',\n\t\t\t\t\t\tplaceholder: 'e.g. data',\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): Promise<INodeExecutionData[][]> {\n\t\tconst items = this.getInputData();\n\t\tconst nodeVersion = this.getNode().typeVersion;\n\n\t\tconst WEBHOOK_NODE_TYPES = [\n\t\t\tWEBHOOK_NODE_TYPE,\n\t\t\tFORM_TRIGGER_NODE_TYPE,\n\t\t\tCHAT_TRIGGER_NODE_TYPE,\n\t\t\tWAIT_NODE_TYPE,\n\t\t];\n\n\t\tlet response: IN8nHttpFullResponse;\n\n\t\ttry {\n\t\t\tif (nodeVersion >= 1.1) {\n\t\t\t\tconst connectedNodes = this.getParentNodes(this.getNode().name);\n\t\t\t\tif (!connectedNodes.some(({ type }) => WEBHOOK_NODE_TYPES.includes(type))) {\n\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t\tnew Error('No Webhook node found in the workflow'),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t'Insert a Webhook node to your workflow and set the “Respond” parameter to “Using Respond to Webhook Node” ',\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst respondWith = this.getNodeParameter('respondWith', 0) as string;\n\t\t\tconst options = this.getNodeParameter('options', 0, {});\n\n\t\t\tconst headers = {} as IDataObject;\n\t\t\tif (options.responseHeaders) {\n\t\t\t\tfor (const header of (options.responseHeaders as IDataObject).entries as IDataObject[]) {\n\t\t\t\t\tif (typeof header.name !== 'string') {\n\t\t\t\t\t\theader.name = header.name?.toString();\n\t\t\t\t\t}\n\t\t\t\t\theaders[header.name?.toLowerCase() as string] = header.value?.toString();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet statusCode = (options.responseCode as number) || 200;\n\t\t\tlet responseBody: IN8nHttpResponse | Readable;\n\t\t\tif (respondWith === 'json') {\n\t\t\t\tconst responseBodyParameter = this.getNodeParameter('responseBody', 0) as string;\n\t\t\t\tif (responseBodyParameter) {\n\t\t\t\t\tif (typeof responseBodyParameter === 'object') {\n\t\t\t\t\t\tresponseBody = responseBodyParameter;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponseBody = jsonParse(responseBodyParameter);\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\tthrow new NodeOperationError(this.getNode(), error as Error, {\n\t\t\t\t\t\t\t\tmessage: \"Invalid JSON in 'Response Body' field\",\n\t\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t\t\"Check that the syntax of the JSON in the 'Response Body' parameter is valid\",\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} else if (respondWith === 'jwt') {\n\t\t\t\ttry {\n\t\t\t\t\tconst { keyType, secret, algorithm, privateKey } = await this.getCredentials<{\n\t\t\t\t\t\tkeyType: 'passphrase' | 'pemKey';\n\t\t\t\t\t\tprivateKey: string;\n\t\t\t\t\t\tsecret: string;\n\t\t\t\t\t\talgorithm: jwt.Algorithm;\n\t\t\t\t\t}>('jwtAuth');\n\n\t\t\t\t\tlet secretOrPrivateKey;\n\n\t\t\t\t\tif (keyType === 'passphrase') {\n\t\t\t\t\t\tsecretOrPrivateKey = secret;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsecretOrPrivateKey = formatPrivateKey(privateKey);\n\t\t\t\t\t}\n\t\t\t\t\tconst payload = this.getNodeParameter('payload', 0, {}) as IDataObject;\n\t\t\t\t\tconst token = jwt.sign(payload, secretOrPrivateKey, { algorithm });\n\t\t\t\t\tresponseBody = { token };\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthrow new NodeOperationError(this.getNode(), error as Error, {\n\t\t\t\t\t\tmessage: 'Error signing JWT token',\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else if (respondWith === 'allIncomingItems') {\n\t\t\t\tconst respondItems = items.map((item) => item.json);\n\t\t\t\tresponseBody = options.responseKey\n\t\t\t\t\t? set({}, options.responseKey as string, respondItems)\n\t\t\t\t\t: respondItems;\n\t\t\t} else if (respondWith === 'firstIncomingItem') {\n\t\t\t\tresponseBody = options.responseKey\n\t\t\t\t\t? set({}, options.responseKey as string, items[0].json)\n\t\t\t\t\t: items[0].json;\n\t\t\t} else if (respondWith === 'text') {\n\t\t\t\tresponseBody = this.getNodeParameter('responseBody', 0) as string;\n\t\t\t} else if (respondWith === 'binary') {\n\t\t\t\tconst item = items[0];\n\n\t\t\t\tif (item.binary === undefined) {\n\t\t\t\t\tthrow new NodeOperationError(this.getNode(), 'No binary data exists on the first item!');\n\t\t\t\t}\n\n\t\t\t\tlet responseBinaryPropertyName: string;\n\n\t\t\t\tconst responseDataSource = this.getNodeParameter('responseDataSource', 0) as string;\n\n\t\t\t\tif (responseDataSource === 'set') {\n\t\t\t\t\tresponseBinaryPropertyName = this.getNodeParameter('inputFieldName', 0) as string;\n\t\t\t\t} else {\n\t\t\t\t\tconst binaryKeys = Object.keys(item.binary);\n\t\t\t\t\tif (binaryKeys.length === 0) {\n\t\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t\t\t'No binary data exists on the first item!',\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tresponseBinaryPropertyName = binaryKeys[0];\n\t\t\t\t}\n\n\t\t\t\tconst binaryData = this.helpers.assertBinaryData(0, responseBinaryPropertyName);\n\t\t\t\tif (binaryData.id) {\n\t\t\t\t\tresponseBody = { binaryData };\n\t\t\t\t} else {\n\t\t\t\t\tresponseBody = Buffer.from(binaryData.data, BINARY_ENCODING);\n\t\t\t\t\theaders['content-length'] = (responseBody as Buffer).length;\n\t\t\t\t}\n\n\t\t\t\tif (!headers['content-type']) {\n\t\t\t\t\theaders['content-type'] = binaryData.mimeType;\n\t\t\t\t}\n\t\t\t} else if (respondWith === 'redirect') {\n\t\t\t\theaders.location = this.getNodeParameter('redirectURL', 0) as string;\n\t\t\t\tstatusCode = (options.responseCode as number) ?? 307;\n\t\t\t} else if (respondWith !== 'noData') {\n\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t`The Response Data option \"${respondWith}\" is not supported!`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tresponse = {\n\t\t\t\tbody: responseBody,\n\t\t\t\theaders,\n\t\t\t\tstatusCode,\n\t\t\t};\n\n\t\t\tthis.sendResponse(response);\n\t\t} catch (error) {\n\t\t\tif (this.continueOnFail()) {\n\t\t\t\tconst itemData = generatePairedItemData(items.length);\n\t\t\t\tconst returnData = this.helpers.constructExecutionMetaData(\n\t\t\t\t\t[{ json: { error: error.message } }],\n\t\t\t\t\t{ itemData },\n\t\t\t\t);\n\t\t\t\treturn [returnData];\n\t\t\t}\n\n\t\t\tthrow error;\n\t\t}\n\n\t\tif (nodeVersion === 1.3) {\n\t\t\treturn [items, [{ json: { response } }]];\n\t\t} else if (nodeVersion >= 1.4 && this.getNodeParameter('enableResponseOutput', 0, false)) {\n\t\t\treturn [items, [{ json: { response } }]];\n\t\t}\n\n\t\treturn [items];\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAgB;AAChB,iBAAgB;AAWhB,0BASO;A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AAS,EAAE,CAAC,CAAC;AAAA,IACxC,WAAW,eAAe,OAAO,KAAK,iBAAiB,wBAAwB,GAAG,KAAK,GAAG;AACzF,aAAO,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAAA,IACxC;AAEA,WAAO,CAAC,KAAK;AAAA,EACd;AACD;","names":["jwt","set"]}
@@ -21,8 +21,9 @@ __export(utils_exports, {
21
21
  configuredOutputs: () => configuredOutputs
22
22
  });
23
23
  module.exports = __toCommonJS(utils_exports);
24
- const configuredOutputs = (version) => {
25
- if (version >= 1.3) {
24
+ const configuredOutputs = (version, parameters) => {
25
+ const multipleOutputs = version === 1.3 || version >= 1.4 && parameters.enableResponseOutput;
26
+ if (multipleOutputs) {
26
27
  return [
27
28
  {
28
29
  type: "main",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../nodes/RespondToWebhook/utils.ts"],"sourcesContent":["export const configuredOutputs = (version: number) => {\n\tif (version >= 1.3) {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttype: 'main',\n\t\t\t\tdisplayName: 'Input Data',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'main',\n\t\t\t\tdisplayName: 'Response',\n\t\t\t},\n\t\t];\n\t}\n\n\treturn ['main'];\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,oBAAoB,CAAC,YAAoB;AACrD,MAAI,WAAW,KAAK;AACnB,WAAO;AAAA,MACN;AAAA,QACC,MAAM;AAAA,QACN,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,MAAM;AAAA,QACN,aAAa;AAAA,MACd;AAAA,IACD;AAAA,EACD;AAEA,SAAO,CAAC,MAAM;AACf;","names":[]}
1
+ {"version":3,"sources":["../../../nodes/RespondToWebhook/utils.ts"],"sourcesContent":["export const configuredOutputs = (\n\tversion: number,\n\tparameters: { enableResponseOutput?: boolean },\n) => {\n\tconst multipleOutputs = version === 1.3 || (version >= 1.4 && parameters.enableResponseOutput);\n\tif (multipleOutputs) {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttype: 'main',\n\t\t\t\tdisplayName: 'Input Data',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'main',\n\t\t\t\tdisplayName: 'Response',\n\t\t\t},\n\t\t];\n\t}\n\n\treturn ['main'];\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,oBAAoB,CAChC,SACA,eACI;AACJ,QAAM,kBAAkB,YAAY,OAAQ,WAAW,OAAO,WAAW;AACzE,MAAI,iBAAiB;AACpB,WAAO;AAAA,MACN;AAAA,QACC,MAAM;AAAA,QACN,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,MAAM;AAAA,QACN,aAAa;AAAA,MACd;AAAA,IACD;AAAA,EACD;AAEA,SAAO,CAAC,MAAM;AACf;","names":[]}
@@ -224,7 +224,7 @@ class Telegram {
224
224
  name: "Edit Message Text",
225
225
  value: "editMessageText",
226
226
  description: "Edit a text message",
227
- action: "Edit a test message"
227
+ action: "Edit a text message"
228
228
  },
229
229
  {
230
230
  name: "Pin Chat Message",