@n8n/n8n-nodes-langchain 1.46.0 → 1.48.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 (136) hide show
  1. package/dist/build.tsbuildinfo +1 -1
  2. package/dist/known/nodes.json +4 -0
  3. package/dist/nodes/agents/Agent/Agent.node.js +2 -0
  4. package/dist/nodes/agents/Agent/Agent.node.js.map +1 -1
  5. package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js +2 -3
  6. package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js.map +1 -1
  7. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js +2 -3
  8. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js.map +1 -1
  9. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.js +2 -3
  10. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.js.map +1 -1
  11. package/dist/nodes/agents/Agent/agents/ReActAgent/execute.js +2 -3
  12. package/dist/nodes/agents/Agent/agents/ReActAgent/execute.js.map +1 -1
  13. package/dist/nodes/agents/Agent/agents/SqlAgent/execute.js +2 -3
  14. package/dist/nodes/agents/Agent/agents/SqlAgent/execute.js.map +1 -1
  15. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/mysql.js +1 -2
  16. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/mysql.js.map +1 -1
  17. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/postgres.js +1 -2
  18. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/postgres.js.map +1 -1
  19. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/sqlite.js +1 -2
  20. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/sqlite.js.map +1 -1
  21. package/dist/nodes/agents/Agent/agents/ToolsAgent/execute.js +3 -7
  22. package/dist/nodes/agents/Agent/agents/ToolsAgent/execute.js.map +1 -1
  23. package/dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.js +1 -1
  24. package/dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.js.map +1 -1
  25. package/dist/nodes/agents/OpenAiAssistant/utils.js +3 -4
  26. package/dist/nodes/agents/OpenAiAssistant/utils.js.map +1 -1
  27. package/dist/nodes/chains/ChainLLM/ChainLlm.node.js +1 -1
  28. package/dist/nodes/chains/ChainLLM/ChainLlm.node.js.map +1 -1
  29. package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js +1 -1
  30. package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js.map +1 -1
  31. package/dist/nodes/chains/ChainSummarization/V2/ChainSummarizationV2.node.js +1 -1
  32. package/dist/nodes/chains/ChainSummarization/V2/ChainSummarizationV2.node.js.map +1 -1
  33. package/dist/nodes/chains/ChainSummarization/helpers.js +1 -2
  34. package/dist/nodes/chains/ChainSummarization/helpers.js.map +1 -1
  35. package/dist/nodes/code/Code.node.js +1 -1
  36. package/dist/nodes/code/Code.node.js.map +1 -1
  37. package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js +19 -3
  38. package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js.map +1 -1
  39. package/dist/nodes/llms/N8nLlmTracing.d.ts +1 -1
  40. package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js +0 -75
  41. package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js.map +1 -1
  42. package/dist/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.d.ts +5 -0
  43. package/dist/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.js +323 -0
  44. package/dist/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.js.map +1 -0
  45. package/dist/nodes/tools/ToolHttpRequest/descriptions.d.ts +7 -0
  46. package/dist/nodes/tools/ToolHttpRequest/descriptions.js +389 -0
  47. package/dist/nodes/tools/ToolHttpRequest/descriptions.js.map +1 -0
  48. package/dist/nodes/tools/ToolHttpRequest/httprequest.dark.svg +3 -0
  49. package/dist/nodes/tools/ToolHttpRequest/httprequest.svg +1 -0
  50. package/dist/nodes/tools/ToolHttpRequest/interfaces.d.ts +20 -0
  51. package/dist/nodes/tools/ToolHttpRequest/interfaces.js +3 -0
  52. package/dist/nodes/tools/ToolHttpRequest/interfaces.js.map +1 -0
  53. package/dist/nodes/tools/ToolHttpRequest/utils.d.ts +23 -0
  54. package/dist/nodes/tools/ToolHttpRequest/utils.js +525 -0
  55. package/dist/nodes/tools/ToolHttpRequest/utils.js.map +1 -0
  56. package/dist/nodes/trigger/ChatTrigger/GenericFunctions.js +1 -2
  57. package/dist/nodes/trigger/ChatTrigger/GenericFunctions.js.map +1 -1
  58. package/dist/nodes/trigger/ChatTrigger/templates.js +1 -2
  59. package/dist/nodes/trigger/ChatTrigger/templates.js.map +1 -1
  60. package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.d.ts +2 -2
  61. package/dist/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.d.ts +2 -2
  62. package/dist/nodes/vector_store/VectorStoreQdrant/VectorStoreQdrant.node.d.ts +2 -2
  63. package/dist/nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.d.ts +2 -2
  64. package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.d.ts +2 -2
  65. package/dist/nodes/vector_store/shared/createVectorStoreNode.d.ts +1 -1
  66. package/dist/nodes/vector_store/shared/methods/listSearch.js +3 -4
  67. package/dist/nodes/vector_store/shared/methods/listSearch.js.map +1 -1
  68. package/dist/nodes/vector_store/shared/processDocuments.js +2 -3
  69. package/dist/nodes/vector_store/shared/processDocuments.js.map +1 -1
  70. package/dist/nodes/vendors/OpenAi/actions/assistant/create.operation.d.ts +16 -16
  71. package/dist/nodes/vendors/OpenAi/actions/assistant/create.operation.js +2 -2
  72. package/dist/nodes/vendors/OpenAi/actions/assistant/create.operation.js.map +1 -1
  73. package/dist/nodes/vendors/OpenAi/actions/assistant/deleteAssistant.operation.d.ts +16 -16
  74. package/dist/nodes/vendors/OpenAi/actions/assistant/deleteAssistant.operation.js +2 -2
  75. package/dist/nodes/vendors/OpenAi/actions/assistant/deleteAssistant.operation.js.map +1 -1
  76. package/dist/nodes/vendors/OpenAi/actions/assistant/list.operation.d.ts +16 -16
  77. package/dist/nodes/vendors/OpenAi/actions/assistant/list.operation.js +2 -2
  78. package/dist/nodes/vendors/OpenAi/actions/assistant/list.operation.js.map +1 -1
  79. package/dist/nodes/vendors/OpenAi/actions/assistant/message.operation.d.ts +16 -16
  80. package/dist/nodes/vendors/OpenAi/actions/assistant/message.operation.js +2 -2
  81. package/dist/nodes/vendors/OpenAi/actions/assistant/message.operation.js.map +1 -1
  82. package/dist/nodes/vendors/OpenAi/actions/assistant/update.operation.d.ts +16 -16
  83. package/dist/nodes/vendors/OpenAi/actions/assistant/update.operation.js +2 -2
  84. package/dist/nodes/vendors/OpenAi/actions/assistant/update.operation.js.map +1 -1
  85. package/dist/nodes/vendors/OpenAi/actions/audio/generate.operation.d.ts +16 -16
  86. package/dist/nodes/vendors/OpenAi/actions/audio/generate.operation.js +2 -2
  87. package/dist/nodes/vendors/OpenAi/actions/audio/generate.operation.js.map +1 -1
  88. package/dist/nodes/vendors/OpenAi/actions/audio/transcribe.operation.d.ts +16 -16
  89. package/dist/nodes/vendors/OpenAi/actions/audio/transcribe.operation.js +2 -2
  90. package/dist/nodes/vendors/OpenAi/actions/audio/transcribe.operation.js.map +1 -1
  91. package/dist/nodes/vendors/OpenAi/actions/audio/translate.operation.d.ts +16 -16
  92. package/dist/nodes/vendors/OpenAi/actions/audio/translate.operation.js +2 -2
  93. package/dist/nodes/vendors/OpenAi/actions/audio/translate.operation.js.map +1 -1
  94. package/dist/nodes/vendors/OpenAi/actions/file/deleteFile.operation.d.ts +16 -16
  95. package/dist/nodes/vendors/OpenAi/actions/file/deleteFile.operation.js +2 -2
  96. package/dist/nodes/vendors/OpenAi/actions/file/deleteFile.operation.js.map +1 -1
  97. package/dist/nodes/vendors/OpenAi/actions/file/list.operation.d.ts +16 -16
  98. package/dist/nodes/vendors/OpenAi/actions/file/list.operation.js +2 -2
  99. package/dist/nodes/vendors/OpenAi/actions/file/list.operation.js.map +1 -1
  100. package/dist/nodes/vendors/OpenAi/actions/file/upload.operation.d.ts +16 -16
  101. package/dist/nodes/vendors/OpenAi/actions/file/upload.operation.js +2 -2
  102. package/dist/nodes/vendors/OpenAi/actions/file/upload.operation.js.map +1 -1
  103. package/dist/nodes/vendors/OpenAi/actions/image/analyze.operation.d.ts +16 -16
  104. package/dist/nodes/vendors/OpenAi/actions/image/analyze.operation.js +2 -2
  105. package/dist/nodes/vendors/OpenAi/actions/image/analyze.operation.js.map +1 -1
  106. package/dist/nodes/vendors/OpenAi/actions/image/generate.operation.d.ts +16 -16
  107. package/dist/nodes/vendors/OpenAi/actions/image/generate.operation.js +2 -2
  108. package/dist/nodes/vendors/OpenAi/actions/image/generate.operation.js.map +1 -1
  109. package/dist/nodes/vendors/OpenAi/actions/router.js +2 -3
  110. package/dist/nodes/vendors/OpenAi/actions/router.js.map +1 -1
  111. package/dist/nodes/vendors/OpenAi/actions/text/classify.operation.d.ts +16 -16
  112. package/dist/nodes/vendors/OpenAi/actions/text/classify.operation.js +2 -2
  113. package/dist/nodes/vendors/OpenAi/actions/text/classify.operation.js.map +1 -1
  114. package/dist/nodes/vendors/OpenAi/actions/text/message.operation.d.ts +16 -16
  115. package/dist/nodes/vendors/OpenAi/actions/text/message.operation.js +2 -2
  116. package/dist/nodes/vendors/OpenAi/actions/text/message.operation.js.map +1 -1
  117. package/dist/nodes/vendors/OpenAi/helpers/utils.js +3 -4
  118. package/dist/nodes/vendors/OpenAi/helpers/utils.js.map +1 -1
  119. package/dist/nodes/vendors/OpenAi/methods/listSearch.js +4 -5
  120. package/dist/nodes/vendors/OpenAi/methods/listSearch.js.map +1 -1
  121. package/dist/nodes/vendors/OpenAi/methods/loadOptions.js +1 -2
  122. package/dist/nodes/vendors/OpenAi/methods/loadOptions.js.map +1 -1
  123. package/dist/nodes/vendors/OpenAi/transport/index.js +1 -2
  124. package/dist/nodes/vendors/OpenAi/transport/index.js.map +1 -1
  125. package/dist/types/nodes.json +54 -53
  126. package/dist/utils/helpers.js +8 -8
  127. package/dist/utils/helpers.js.map +1 -1
  128. package/dist/utils/logWrapper.js +3 -4
  129. package/dist/utils/logWrapper.js.map +1 -1
  130. package/dist/utils/schemaParsing.js +3 -4
  131. package/dist/utils/schemaParsing.js.map +1 -1
  132. package/dist/utils/sharedFields.js +3 -3
  133. package/dist/utils/sharedFields.js.map +1 -1
  134. package/dist/utils/tracing.js +1 -2
  135. package/dist/utils/tracing.js.map +1 -1
  136. package/package.json +10 -5
@@ -0,0 +1,7 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const specifyBySelector: INodeProperties;
3
+ export declare const parametersCollection: INodeProperties;
4
+ export declare const placeholderDefinitionsCollection: INodeProperties;
5
+ export declare const jsonInput: INodeProperties;
6
+ export declare const authenticationProperties: INodeProperties[];
7
+ export declare const optimizeResponseProperties: INodeProperties[];
@@ -0,0 +1,389 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.optimizeResponseProperties = exports.authenticationProperties = exports.jsonInput = exports.placeholderDefinitionsCollection = exports.parametersCollection = exports.specifyBySelector = void 0;
4
+ exports.specifyBySelector = {
5
+ displayName: 'Specify By',
6
+ name: 'specifyBy',
7
+ type: 'options',
8
+ options: [
9
+ {
10
+ name: 'Using Fields Below',
11
+ value: 'keypair',
12
+ },
13
+ {
14
+ name: 'Using JSON Below',
15
+ value: 'json',
16
+ },
17
+ {
18
+ name: 'Let Model Specify Entire Body',
19
+ value: 'model',
20
+ },
21
+ ],
22
+ default: 'keypair',
23
+ };
24
+ exports.parametersCollection = {
25
+ displayName: 'Parameters',
26
+ name: 'parameters',
27
+ type: 'fixedCollection',
28
+ typeOptions: {
29
+ multipleValues: true,
30
+ },
31
+ placeholder: 'Add Parameter',
32
+ default: {
33
+ values: [
34
+ {
35
+ name: '',
36
+ },
37
+ ],
38
+ },
39
+ options: [
40
+ {
41
+ name: 'values',
42
+ displayName: 'Values',
43
+ values: [
44
+ {
45
+ displayName: 'Name',
46
+ name: 'name',
47
+ type: 'string',
48
+ default: '',
49
+ },
50
+ {
51
+ displayName: 'Value Provided',
52
+ name: 'valueProvider',
53
+ type: 'options',
54
+ options: [
55
+ {
56
+ name: 'By Model (and is required)',
57
+ value: 'modelRequired',
58
+ },
59
+ {
60
+ name: 'By Model (but is optional)',
61
+ value: 'modelOptional',
62
+ },
63
+ {
64
+ name: 'Using Field Below',
65
+ value: 'fieldValue',
66
+ },
67
+ ],
68
+ default: 'modelRequired',
69
+ },
70
+ {
71
+ displayName: 'Value',
72
+ name: 'value',
73
+ type: 'string',
74
+ default: '',
75
+ hint: 'Use a {placeholder} for any data to be filled in by the model',
76
+ displayOptions: {
77
+ show: {
78
+ valueProvider: ['fieldValue'],
79
+ },
80
+ },
81
+ },
82
+ ],
83
+ },
84
+ ],
85
+ };
86
+ exports.placeholderDefinitionsCollection = {
87
+ displayName: 'Placeholder Definitions',
88
+ name: 'placeholderDefinitions',
89
+ type: 'fixedCollection',
90
+ typeOptions: {
91
+ multipleValues: true,
92
+ },
93
+ placeholder: 'Add Definition',
94
+ default: [],
95
+ options: [
96
+ {
97
+ name: 'values',
98
+ displayName: 'Values',
99
+ values: [
100
+ {
101
+ displayName: 'Placeholder Name',
102
+ name: 'name',
103
+ type: 'string',
104
+ default: '',
105
+ },
106
+ {
107
+ displayName: 'Description',
108
+ name: 'description',
109
+ type: 'string',
110
+ default: '',
111
+ },
112
+ {
113
+ displayName: 'Type',
114
+ name: 'type',
115
+ type: 'options',
116
+ options: [
117
+ {
118
+ name: 'Not Specified (Default)',
119
+ value: 'not specified',
120
+ },
121
+ {
122
+ name: 'String',
123
+ value: 'string',
124
+ },
125
+ {
126
+ name: 'Number',
127
+ value: 'number',
128
+ },
129
+ {
130
+ name: 'Boolean',
131
+ value: 'boolean',
132
+ },
133
+ {
134
+ name: 'JSON',
135
+ value: 'json',
136
+ },
137
+ ],
138
+ default: 'not specified',
139
+ },
140
+ ],
141
+ },
142
+ ],
143
+ };
144
+ exports.jsonInput = {
145
+ displayName: 'JSON',
146
+ name: 'json',
147
+ type: 'string',
148
+ typeOptions: {
149
+ rows: 5,
150
+ },
151
+ hint: 'Use a {placeholder} for any data to be filled in by the model',
152
+ default: '',
153
+ };
154
+ exports.authenticationProperties = [
155
+ {
156
+ displayName: 'Authentication',
157
+ name: 'authentication',
158
+ description: 'Select the type of authentication to use if needed, authentication would be done by n8n and your credentials will not be shared with the LLM',
159
+ noDataExpression: true,
160
+ type: 'options',
161
+ options: [
162
+ {
163
+ name: 'None',
164
+ value: 'none',
165
+ },
166
+ {
167
+ name: 'Predefined Credential Type',
168
+ value: 'predefinedCredentialType',
169
+ description: "We've already implemented auth for many services so that you don't have to set it up manually",
170
+ },
171
+ {
172
+ name: 'Generic Credential Type',
173
+ value: 'genericCredentialType',
174
+ description: 'Fully customizable. Choose between basic, header, OAuth2, etc.',
175
+ },
176
+ ],
177
+ default: 'none',
178
+ },
179
+ {
180
+ displayName: 'Credential Type',
181
+ name: 'nodeCredentialType',
182
+ type: 'credentialsSelect',
183
+ noDataExpression: true,
184
+ required: true,
185
+ default: '',
186
+ credentialTypes: ['extends:oAuth2Api', 'extends:oAuth1Api', 'has:authenticate'],
187
+ displayOptions: {
188
+ show: {
189
+ authentication: ['predefinedCredentialType'],
190
+ },
191
+ },
192
+ },
193
+ {
194
+ displayName: 'Make sure you have specified the scope(s) for the Service Account in the credential',
195
+ name: 'googleApiWarning',
196
+ type: 'notice',
197
+ default: '',
198
+ displayOptions: {
199
+ show: {
200
+ nodeCredentialType: ['googleApi'],
201
+ },
202
+ },
203
+ },
204
+ {
205
+ displayName: 'Generic Auth Type',
206
+ name: 'genericAuthType',
207
+ type: 'credentialsSelect',
208
+ required: true,
209
+ default: '',
210
+ credentialTypes: ['has:genericAuth'],
211
+ displayOptions: {
212
+ show: {
213
+ authentication: ['genericCredentialType'],
214
+ },
215
+ },
216
+ },
217
+ ];
218
+ exports.optimizeResponseProperties = [
219
+ {
220
+ displayName: 'Optimize Response',
221
+ name: 'optimizeResponse',
222
+ type: 'boolean',
223
+ default: false,
224
+ noDataExpression: true,
225
+ description: 'Whether the optimize the tool response to reduce amount of data passed to the LLM that could lead to better result and reduce cost',
226
+ },
227
+ {
228
+ displayName: 'Expected Response Type',
229
+ name: 'responseType',
230
+ type: 'options',
231
+ displayOptions: {
232
+ show: {
233
+ optimizeResponse: [true],
234
+ },
235
+ },
236
+ options: [
237
+ {
238
+ name: 'JSON',
239
+ value: 'json',
240
+ },
241
+ {
242
+ name: 'HTML',
243
+ value: 'html',
244
+ },
245
+ {
246
+ name: 'Text',
247
+ value: 'text',
248
+ },
249
+ ],
250
+ default: 'json',
251
+ },
252
+ {
253
+ displayName: 'Field Containing Data',
254
+ name: 'dataField',
255
+ type: 'string',
256
+ default: '',
257
+ placeholder: 'e.g. records',
258
+ description: 'Specify the name of the field in the response containing the data',
259
+ hint: 'leave blank to use whole response',
260
+ requiresDataPath: 'single',
261
+ displayOptions: {
262
+ show: {
263
+ optimizeResponse: [true],
264
+ responseType: ['json'],
265
+ },
266
+ },
267
+ },
268
+ {
269
+ displayName: 'Include Fields',
270
+ name: 'fieldsToInclude',
271
+ type: 'options',
272
+ description: 'What fields response object should include',
273
+ default: 'all',
274
+ displayOptions: {
275
+ show: {
276
+ optimizeResponse: [true],
277
+ responseType: ['json'],
278
+ },
279
+ },
280
+ options: [
281
+ {
282
+ name: 'All',
283
+ value: 'all',
284
+ description: 'Include all fields',
285
+ },
286
+ {
287
+ name: 'Selected',
288
+ value: 'selected',
289
+ description: 'Include only fields specified below',
290
+ },
291
+ {
292
+ name: 'Except',
293
+ value: 'except',
294
+ description: 'Exclude fields specified below',
295
+ },
296
+ ],
297
+ },
298
+ {
299
+ displayName: 'Fields',
300
+ name: 'fields',
301
+ type: 'string',
302
+ default: '',
303
+ placeholder: 'e.g. field1,field2',
304
+ description: 'Comma-separated list of the field names. Supports dot notation. You can drag the selected fields from the input panel.',
305
+ requiresDataPath: 'multiple',
306
+ displayOptions: {
307
+ show: {
308
+ optimizeResponse: [true],
309
+ responseType: ['json'],
310
+ },
311
+ hide: {
312
+ fieldsToInclude: ['all'],
313
+ },
314
+ },
315
+ },
316
+ {
317
+ displayName: 'Selector (CSS)',
318
+ name: 'cssSelector',
319
+ type: 'string',
320
+ description: 'Select specific element(e.g. body) or multiple elements(e.g. div) of chosen type in the response HTML.',
321
+ placeholder: 'e.g. body',
322
+ default: 'body',
323
+ displayOptions: {
324
+ show: {
325
+ optimizeResponse: [true],
326
+ responseType: ['html'],
327
+ },
328
+ },
329
+ },
330
+ {
331
+ displayName: 'Return Only Content',
332
+ name: 'onlyContent',
333
+ type: 'boolean',
334
+ default: false,
335
+ description: 'Whether to return only content of html elements, stripping html tags and attributes',
336
+ hint: 'Uses less tokens and may be easier for model to understand',
337
+ displayOptions: {
338
+ show: {
339
+ optimizeResponse: [true],
340
+ responseType: ['html'],
341
+ },
342
+ },
343
+ },
344
+ {
345
+ displayName: 'Elements To Omit',
346
+ name: 'elementsToOmit',
347
+ type: 'string',
348
+ displayOptions: {
349
+ show: {
350
+ optimizeResponse: [true],
351
+ responseType: ['html'],
352
+ onlyContent: [true],
353
+ },
354
+ },
355
+ default: '',
356
+ placeholder: 'e.g. img, .className, #ItemId',
357
+ description: 'Comma-separated list of selectors that would be excluded when extracting content',
358
+ },
359
+ {
360
+ displayName: 'Truncate Response',
361
+ name: 'truncateResponse',
362
+ type: 'boolean',
363
+ default: false,
364
+ hint: 'Helps save tokens',
365
+ displayOptions: {
366
+ show: {
367
+ optimizeResponse: [true],
368
+ responseType: ['text', 'html'],
369
+ },
370
+ },
371
+ },
372
+ {
373
+ displayName: 'Max Response Characters',
374
+ name: 'maxLength',
375
+ type: 'number',
376
+ default: 1000,
377
+ typeOptions: {
378
+ minValue: 1,
379
+ },
380
+ displayOptions: {
381
+ show: {
382
+ optimizeResponse: [true],
383
+ responseType: ['text', 'html'],
384
+ truncateResponse: [true],
385
+ },
386
+ },
387
+ },
388
+ ];
389
+ //# sourceMappingURL=descriptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"descriptions.js","sourceRoot":"","sources":["../../../../nodes/tools/ToolHttpRequest/descriptions.ts"],"names":[],"mappings":";;;AAEa,QAAA,iBAAiB,GAAoB;IACjD,WAAW,EAAE,YAAY;IACzB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,SAAS;IACf,OAAO,EAAE;QACR;YACC,IAAI,EAAE,oBAAoB;YAC1B,KAAK,EAAE,SAAS;SAChB;QACD;YACC,IAAI,EAAE,kBAAkB;YACxB,KAAK,EAAE,MAAM;SACb;QACD;YACC,IAAI,EAAE,+BAA+B;YACrC,KAAK,EAAE,OAAO;SACd;KACD;IACD,OAAO,EAAE,SAAS;CAClB,CAAC;AAEW,QAAA,oBAAoB,GAAoB;IACpD,WAAW,EAAE,YAAY;IACzB,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE;QACZ,cAAc,EAAE,IAAI;KACpB;IACD,WAAW,EAAE,eAAe;IAC5B,OAAO,EAAE;QACR,MAAM,EAAE;YACP;gBACC,IAAI,EAAE,EAAE;aACR;SACD;KACD;IACD,OAAO,EAAE;QACR;YACC,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,QAAQ;YACrB,MAAM,EAAE;gBACP;oBACC,WAAW,EAAE,MAAM;oBACnB,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,QAAQ;oBACd,OAAO,EAAE,EAAE;iBACX;gBACD;oBACC,WAAW,EAAE,gBAAgB;oBAC7B,IAAI,EAAE,eAAe;oBACrB,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE;wBACR;4BAEC,IAAI,EAAE,4BAA4B;4BAClC,KAAK,EAAE,eAAe;yBAC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,CAAC"}
@@ -0,0 +1,3 @@
1
+ <svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M40 20C40 8.95314 31.0469 0 20 0C8.95314 0 0 8.95314 0 20C0 31.0469 8.95314 40 20 40C31.0469 40 40 31.0469 40 20ZM20 36.9458C18.8852 36.9458 17.1378 35.967 15.4998 32.6985C14.7964 31.2918 14.1961 29.5431 13.7526 27.6847H26.1898C25.8045 29.5403 25.2044 31.2901 24.5002 32.6985C22.8622 35.967 21.1148 36.9458 20 36.9458ZM12.9064 20C12.9064 21.6097 13.0087 23.164 13.2003 24.6305H26.7997C26.9913 23.164 27.0936 21.6097 27.0936 20C27.0936 18.3903 26.9913 16.836 26.7997 15.3695H13.2003C13.0087 16.836 12.9064 18.3903 12.9064 20ZM20 3.05419C21.1149 3.05419 22.8622 4.03078 24.5001 7.30039C25.2066 8.71408 25.8072 10.4067 26.192 12.3153H13.7501C14.1933 10.4047 14.7942 8.71254 15.4998 7.30064C17.1377 4.03083 18.8851 3.05419 20 3.05419ZM30.1478 20C30.1478 18.4099 30.0543 16.8617 29.8227 15.3695H36.3042C36.7252 16.842 36.9458 18.3964 36.9458 20C36.9458 21.6036 36.7252 23.158 36.3042 24.6305H29.8227C30.0543 23.1383 30.1478 21.5901 30.1478 20ZM26.2767 4.25512C27.6365 6.36019 28.711 9.132 29.3774 12.3153H35.1046C33.2511 8.668 30.107 5.78346 26.2767 4.25512ZM10.6226 12.3153H4.89293C6.75147 8.66784 9.89351 5.78341 13.7232 4.25513C12.3635 6.36021 11.289 9.13201 10.6226 12.3153ZM3.05419 20C3.05419 21.603 3.27743 23.1575 3.69484 24.6305H10.1217C9.94619 23.142 9.85222 21.5943 9.85222 20C9.85222 18.4057 9.94619 16.858 10.1217 15.3695H3.69484C3.27743 16.8425 3.05419 18.397 3.05419 20ZM26.2766 35.7427C27.6365 33.6393 28.711 30.868 29.3774 27.6847H35.1046C33.251 31.3322 30.1068 34.2179 26.2766 35.7427ZM13.7234 35.7427C9.89369 34.2179 6.75155 31.3324 4.89293 27.6847H10.6226C11.289 30.868 12.3635 33.6393 13.7234 35.7427Z" fill="#8F87F7"/>
3
+ </svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><path fill="#0004F5" fill-rule="evenodd" d="M40 20C40 8.953 31.047 0 20 0S0 8.953 0 20s8.953 20 20 20 20-8.953 20-20M20 36.946c-1.115 0-2.862-.979-4.5-4.247-.704-1.407-1.304-3.156-1.747-5.014H26.19c-.386 1.855-.986 3.605-1.69 5.014-1.638 3.268-3.385 4.247-4.5 4.247M12.906 20c0 1.61.103 3.164.294 4.63h13.6a36 36 0 0 0 .294-4.63c0-1.61-.103-3.164-.294-4.63H13.2a36 36 0 0 0-.294 4.63M20 3.054c1.115 0 2.862.977 4.5 4.246.707 1.414 1.307 3.107 1.692 5.015H13.75c.443-1.91 1.044-3.602 1.75-5.014 1.638-3.27 3.385-4.247 4.5-4.247M30.148 20c0-1.59-.094-3.138-.325-4.63h6.481c.421 1.472.642 3.026.642 4.63s-.22 3.158-.642 4.63h-6.481c.231-1.492.325-3.04.325-4.63M26.277 4.255c1.36 2.105 2.434 4.877 3.1 8.06h5.728a16.98 16.98 0 0 0-8.828-8.06m-15.654 8.06h-5.73c1.858-3.647 5-6.532 8.83-8.06-1.36 2.105-2.434 4.877-3.1 8.06M3.054 20c0 1.603.223 3.157.64 4.63h6.428a40 40 0 0 1-.27-4.63c0-1.594.094-3.142.27-4.63H3.695a17 17 0 0 0-.64 4.63m23.223 15.743c1.36-2.104 2.434-4.875 3.1-8.058h5.728a16.96 16.96 0 0 1-8.828 8.058m-12.554 0a17 17 0 0 1-8.83-8.058h5.73c.666 3.183 1.74 5.954 3.1 8.058" clip-rule="evenodd"/></svg>
@@ -0,0 +1,20 @@
1
+ export type ToolParameter = {
2
+ name: string;
3
+ required: boolean;
4
+ type?: string;
5
+ description?: string;
6
+ sendIn: SendIn;
7
+ key?: string;
8
+ };
9
+ export type PlaceholderDefinition = {
10
+ name: string;
11
+ type?: string;
12
+ description: string;
13
+ };
14
+ export type ParametersValues = Array<{
15
+ name: string;
16
+ valueProvider: 'modelRequired' | 'modelOptional' | 'fieldValue';
17
+ value?: string;
18
+ }>;
19
+ export type ParameterInputType = 'keypair' | 'json' | 'model';
20
+ export type SendIn = 'body' | 'qs' | 'path' | 'headers';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../nodes/tools/ToolHttpRequest/interfaces.ts"],"names":[],"mappings":""}
@@ -0,0 +1,23 @@
1
+ import type { IExecuteFunctions, IHttpRequestOptions } from 'n8n-workflow';
2
+ import type { PlaceholderDefinition, SendIn, ToolParameter } from './interfaces';
3
+ export declare const configureHttpRequestFunction: (ctx: IExecuteFunctions, credentialsType: "predefinedCredentialType" | "genericCredentialType" | "none", itemIndex: number) => Promise<(options: IHttpRequestOptions) => Promise<any>>;
4
+ export declare const configureResponseOptimizer: (ctx: IExecuteFunctions, itemIndex: number) => (response: string) => string;
5
+ export declare const extractParametersFromText: (placeholders: PlaceholderDefinition[], text: string, sendIn: SendIn, key?: string) => ToolParameter[];
6
+ export declare const updateParametersAndOptions: (options: {
7
+ ctx: IExecuteFunctions;
8
+ itemIndex: number;
9
+ toolParameters: ToolParameter[];
10
+ placeholdersDefinitions: PlaceholderDefinition[];
11
+ requestOptions: IHttpRequestOptions;
12
+ rawRequestOptions: {
13
+ [key: string]: string;
14
+ };
15
+ requestOptionsProperty: "headers" | "qs" | "body";
16
+ inputTypePropertyName: string;
17
+ jsonPropertyName: string;
18
+ parametersPropertyName: string;
19
+ }) => void;
20
+ export declare const prepareToolDescription: (toolDescription: string, toolParameters: ToolParameter[]) => string;
21
+ export declare const configureToolFunction: (ctx: IExecuteFunctions, itemIndex: number, toolParameters: ToolParameter[], requestOptions: IHttpRequestOptions, rawRequestOptions: {
22
+ [key: string]: string;
23
+ }, httpRequest: (options: IHttpRequestOptions) => Promise<any>, optimizeResponse: (response: string) => string) => (query: string) => Promise<string>;