@n8n/n8n-nodes-langchain 1.115.1 → 1.116.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. package/dist/credentials/AnthropicApi.credentials.js +39 -8
  2. package/dist/credentials/AnthropicApi.credentials.js.map +1 -1
  3. package/dist/credentials/LemonadeApi.credentials.js +70 -0
  4. package/dist/credentials/LemonadeApi.credentials.js.map +1 -0
  5. package/dist/known/credentials.json +9 -0
  6. package/dist/known/nodes.json +12 -0
  7. package/dist/nodes/agents/Agent/Agent.node.js +1 -2
  8. package/dist/nodes/agents/Agent/Agent.node.js.map +1 -1
  9. package/dist/nodes/agents/Agent/V1/AgentV1.node.js +2 -0
  10. package/dist/nodes/agents/Agent/V1/AgentV1.node.js.map +1 -1
  11. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/description.js +13 -1
  12. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/description.js.map +1 -1
  13. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/execute.js +49 -30
  14. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/execute.js.map +1 -1
  15. package/dist/nodes/chains/ChainLLM/methods/chainExecutor.js +3 -0
  16. package/dist/nodes/chains/ChainLLM/methods/chainExecutor.js.map +1 -1
  17. package/dist/nodes/embeddings/EmbeddingsLemonade/EmbeddingsLemonade.node.js +87 -0
  18. package/dist/nodes/embeddings/EmbeddingsLemonade/EmbeddingsLemonade.node.js.map +1 -0
  19. package/dist/nodes/embeddings/EmbeddingsLemonade/lemonade.svg +53 -0
  20. package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.js +17 -0
  21. package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.js.map +1 -1
  22. package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js +12 -8
  23. package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js.map +1 -1
  24. package/dist/nodes/llms/LMChatLemonade/LmChatLemonade.node.js +106 -0
  25. package/dist/nodes/llms/LMChatLemonade/LmChatLemonade.node.js.map +1 -0
  26. package/dist/nodes/llms/LMChatLemonade/lemonade.svg +53 -0
  27. package/dist/nodes/llms/LMChatOpenAi/methods/loadModels.js +6 -5
  28. package/dist/nodes/llms/LMChatOpenAi/methods/loadModels.js.map +1 -1
  29. package/dist/nodes/llms/LMLemonade/LmLemonade.node.js +107 -0
  30. package/dist/nodes/llms/LMLemonade/LmLemonade.node.js.map +1 -0
  31. package/dist/nodes/llms/LMLemonade/description.js +147 -0
  32. package/dist/nodes/llms/LMLemonade/description.js.map +1 -0
  33. package/dist/nodes/llms/LMLemonade/lemonade.svg +53 -0
  34. package/dist/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.js +3 -0
  35. package/dist/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.js.map +1 -1
  36. package/dist/nodes/llms/LmChatMistralCloud/LmChatMistralCloud.node.js +14 -1
  37. package/dist/nodes/llms/LmChatMistralCloud/LmChatMistralCloud.node.js.map +1 -1
  38. package/dist/nodes/mcp/McpClientTool/McpClientTool.node.js +107 -47
  39. package/dist/nodes/mcp/McpClientTool/McpClientTool.node.js.map +1 -1
  40. package/dist/nodes/tools/ToolWorkflow/v2/utils/WorkflowToolService.js +2 -1
  41. package/dist/nodes/tools/ToolWorkflow/v2/utils/WorkflowToolService.js.map +1 -1
  42. package/dist/nodes/vector_store/VectorStoreQdrant/VectorStoreQdrant.node.js +43 -4
  43. package/dist/nodes/vector_store/VectorStoreQdrant/VectorStoreQdrant.node.js.map +1 -1
  44. package/dist/nodes/vendors/Anthropic/transport/index.js +9 -5
  45. package/dist/nodes/vendors/Anthropic/transport/index.js.map +1 -1
  46. package/dist/nodes/vendors/OpenAi/OpenAi.node.js +50 -11
  47. package/dist/nodes/vendors/OpenAi/OpenAi.node.js.map +1 -1
  48. package/dist/nodes/vendors/OpenAi/helpers/binary-data.js +3 -3
  49. package/dist/nodes/vendors/OpenAi/helpers/binary-data.js.map +1 -1
  50. package/dist/nodes/vendors/OpenAi/helpers/description.js +75 -0
  51. package/dist/nodes/vendors/OpenAi/helpers/description.js.map +1 -0
  52. package/dist/nodes/vendors/OpenAi/helpers/interfaces.js.map +1 -1
  53. package/dist/nodes/vendors/OpenAi/helpers/modelFiltering.js +34 -0
  54. package/dist/nodes/vendors/OpenAi/helpers/modelFiltering.js.map +1 -0
  55. package/dist/nodes/vendors/OpenAi/helpers/polling.js +52 -0
  56. package/dist/nodes/vendors/OpenAi/helpers/polling.js.map +1 -0
  57. package/dist/nodes/vendors/OpenAi/helpers/utils.js +27 -0
  58. package/dist/nodes/vendors/OpenAi/helpers/utils.js.map +1 -1
  59. package/dist/nodes/vendors/OpenAi/methods/listSearch.js +10 -6
  60. package/dist/nodes/vendors/OpenAi/methods/listSearch.js.map +1 -1
  61. package/dist/nodes/vendors/OpenAi/v1/OpenAiV1.node.js +110 -0
  62. package/dist/nodes/vendors/OpenAi/v1/OpenAiV1.node.js.map +1 -0
  63. package/dist/nodes/vendors/OpenAi/{actions → v1/actions}/assistant/create.operation.js +1 -1
  64. package/dist/nodes/vendors/OpenAi/v1/actions/assistant/create.operation.js.map +1 -0
  65. package/dist/nodes/vendors/OpenAi/{actions → v1/actions}/assistant/deleteAssistant.operation.js +1 -1
  66. package/dist/nodes/vendors/OpenAi/v1/actions/assistant/deleteAssistant.operation.js.map +1 -0
  67. package/dist/nodes/vendors/OpenAi/v1/actions/assistant/index.js.map +1 -0
  68. package/dist/nodes/vendors/OpenAi/{actions → v1/actions}/assistant/list.operation.js +1 -1
  69. package/dist/nodes/vendors/OpenAi/v1/actions/assistant/list.operation.js.map +1 -0
  70. package/dist/nodes/vendors/OpenAi/{actions → v1/actions}/assistant/message.operation.js +5 -5
  71. package/dist/nodes/vendors/OpenAi/v1/actions/assistant/message.operation.js.map +1 -0
  72. package/dist/nodes/vendors/OpenAi/{actions → v1/actions}/assistant/update.operation.js +1 -1
  73. package/dist/nodes/vendors/OpenAi/v1/actions/assistant/update.operation.js.map +1 -0
  74. package/dist/nodes/vendors/OpenAi/{actions → v1/actions}/audio/generate.operation.js +1 -1
  75. package/dist/nodes/vendors/OpenAi/v1/actions/audio/generate.operation.js.map +1 -0
  76. package/dist/nodes/vendors/OpenAi/v1/actions/audio/index.js.map +1 -0
  77. package/dist/nodes/vendors/OpenAi/{actions → v1/actions}/audio/transcribe.operation.js +2 -2
  78. package/dist/nodes/vendors/OpenAi/v1/actions/audio/transcribe.operation.js.map +1 -0
  79. package/dist/nodes/vendors/OpenAi/{actions → v1/actions}/audio/translate.operation.js +2 -2
  80. package/dist/nodes/vendors/OpenAi/v1/actions/audio/translate.operation.js.map +1 -0
  81. package/dist/nodes/vendors/OpenAi/v1/actions/descriptions.js.map +1 -0
  82. package/dist/nodes/vendors/OpenAi/{actions → v1/actions}/file/deleteFile.operation.js +1 -1
  83. package/dist/nodes/vendors/OpenAi/v1/actions/file/deleteFile.operation.js.map +1 -0
  84. package/dist/nodes/vendors/OpenAi/v1/actions/file/index.js.map +1 -0
  85. package/dist/nodes/vendors/OpenAi/{actions → v1/actions}/file/list.operation.js +1 -1
  86. package/dist/nodes/vendors/OpenAi/v1/actions/file/list.operation.js.map +1 -0
  87. package/dist/nodes/vendors/OpenAi/{actions → v1/actions}/file/upload.operation.js +2 -2
  88. package/dist/nodes/vendors/OpenAi/v1/actions/file/upload.operation.js.map +1 -0
  89. package/dist/nodes/vendors/OpenAi/{actions → v1/actions}/image/analyze.operation.js +1 -1
  90. package/dist/nodes/vendors/OpenAi/v1/actions/image/analyze.operation.js.map +1 -0
  91. package/dist/nodes/vendors/OpenAi/{actions → v1/actions}/image/generate.operation.js +1 -1
  92. package/dist/nodes/vendors/OpenAi/v1/actions/image/generate.operation.js.map +1 -0
  93. package/dist/nodes/vendors/OpenAi/v1/actions/image/index.js.map +1 -0
  94. package/dist/nodes/vendors/OpenAi/v1/actions/node.type.js.map +1 -0
  95. package/dist/nodes/vendors/OpenAi/{actions → v1/actions}/router.js +1 -1
  96. package/dist/nodes/vendors/OpenAi/v1/actions/router.js.map +1 -0
  97. package/dist/nodes/vendors/OpenAi/{actions → v1/actions}/text/classify.operation.js +1 -1
  98. package/dist/nodes/vendors/OpenAi/v1/actions/text/classify.operation.js.map +1 -0
  99. package/dist/nodes/vendors/OpenAi/v1/actions/text/index.js.map +1 -0
  100. package/dist/nodes/vendors/OpenAi/{actions → v1/actions}/text/message.operation.js +4 -4
  101. package/dist/nodes/vendors/OpenAi/v1/actions/text/message.operation.js.map +1 -0
  102. package/dist/nodes/vendors/OpenAi/v2/OpenAiV2.node.js +116 -0
  103. package/dist/nodes/vendors/OpenAi/v2/OpenAiV2.node.js.map +1 -0
  104. package/dist/nodes/vendors/OpenAi/v2/actions/audio/generate.operation.js +197 -0
  105. package/dist/nodes/vendors/OpenAi/v2/actions/audio/generate.operation.js.map +1 -0
  106. package/dist/nodes/vendors/OpenAi/v2/actions/audio/index.js +96 -0
  107. package/dist/nodes/vendors/OpenAi/v2/actions/audio/index.js.map +1 -0
  108. package/dist/nodes/vendors/OpenAi/v2/actions/audio/transcribe.operation.js +121 -0
  109. package/dist/nodes/vendors/OpenAi/v2/actions/audio/transcribe.operation.js.map +1 -0
  110. package/dist/nodes/vendors/OpenAi/v2/actions/audio/translate.operation.js +111 -0
  111. package/dist/nodes/vendors/OpenAi/v2/actions/audio/translate.operation.js.map +1 -0
  112. package/dist/nodes/vendors/OpenAi/v2/actions/conversation/create.operation.js +120 -0
  113. package/dist/nodes/vendors/OpenAi/v2/actions/conversation/create.operation.js.map +1 -0
  114. package/dist/nodes/vendors/OpenAi/v2/actions/conversation/get.operation.js +60 -0
  115. package/dist/nodes/vendors/OpenAi/v2/actions/conversation/get.operation.js.map +1 -0
  116. package/dist/nodes/vendors/OpenAi/v2/actions/conversation/index.js +94 -0
  117. package/dist/nodes/vendors/OpenAi/v2/actions/conversation/index.js.map +1 -0
  118. package/dist/nodes/vendors/OpenAi/v2/actions/conversation/remove.operation.js +60 -0
  119. package/dist/nodes/vendors/OpenAi/v2/actions/conversation/remove.operation.js.map +1 -0
  120. package/dist/nodes/vendors/OpenAi/v2/actions/conversation/update.operation.js +75 -0
  121. package/dist/nodes/vendors/OpenAi/v2/actions/conversation/update.operation.js.map +1 -0
  122. package/dist/nodes/vendors/OpenAi/v2/actions/descriptions.js +279 -0
  123. package/dist/nodes/vendors/OpenAi/v2/actions/descriptions.js.map +1 -0
  124. package/dist/nodes/vendors/OpenAi/v2/actions/file/deleteFile.operation.js +84 -0
  125. package/dist/nodes/vendors/OpenAi/v2/actions/file/deleteFile.operation.js.map +1 -0
  126. package/dist/nodes/vendors/OpenAi/v2/actions/file/index.js +84 -0
  127. package/dist/nodes/vendors/OpenAi/v2/actions/file/index.js.map +1 -0
  128. package/dist/nodes/vendors/OpenAi/v2/actions/file/list.operation.js +92 -0
  129. package/dist/nodes/vendors/OpenAi/v2/actions/file/list.operation.js.map +1 -0
  130. package/dist/nodes/vendors/OpenAi/v2/actions/file/upload.operation.js +130 -0
  131. package/dist/nodes/vendors/OpenAi/v2/actions/file/upload.operation.js.map +1 -0
  132. package/dist/nodes/vendors/OpenAi/v2/actions/image/analyze.operation.js +211 -0
  133. package/dist/nodes/vendors/OpenAi/v2/actions/image/analyze.operation.js.map +1 -0
  134. package/dist/nodes/vendors/OpenAi/v2/actions/image/edit.operation.js +464 -0
  135. package/dist/nodes/vendors/OpenAi/v2/actions/image/edit.operation.js.map +1 -0
  136. package/dist/nodes/vendors/OpenAi/v2/actions/image/generate.operation.js +319 -0
  137. package/dist/nodes/vendors/OpenAi/v2/actions/image/generate.operation.js.map +1 -0
  138. package/dist/nodes/vendors/OpenAi/v2/actions/image/index.js +84 -0
  139. package/dist/nodes/vendors/OpenAi/v2/actions/image/index.js.map +1 -0
  140. package/dist/nodes/vendors/OpenAi/v2/actions/node.type.js +17 -0
  141. package/dist/nodes/vendors/OpenAi/v2/actions/node.type.js.map +1 -0
  142. package/dist/nodes/vendors/OpenAi/v2/actions/router.js +111 -0
  143. package/dist/nodes/vendors/OpenAi/v2/actions/router.js.map +1 -0
  144. package/dist/nodes/vendors/OpenAi/v2/actions/text/classify.operation.js +102 -0
  145. package/dist/nodes/vendors/OpenAi/v2/actions/text/classify.operation.js.map +1 -0
  146. package/dist/nodes/vendors/OpenAi/v2/actions/text/helpers/responses.js +277 -0
  147. package/dist/nodes/vendors/OpenAi/v2/actions/text/helpers/responses.js.map +1 -0
  148. package/dist/nodes/vendors/OpenAi/v2/actions/text/index.js +75 -0
  149. package/dist/nodes/vendors/OpenAi/v2/actions/text/index.js.map +1 -0
  150. package/dist/nodes/vendors/OpenAi/v2/actions/text/response.operation.js +774 -0
  151. package/dist/nodes/vendors/OpenAi/v2/actions/text/response.operation.js.map +1 -0
  152. package/dist/nodes/vendors/OpenAi/v2/actions/video/generate.operation.js +199 -0
  153. package/dist/nodes/vendors/OpenAi/v2/actions/video/generate.operation.js.map +1 -0
  154. package/dist/nodes/vendors/OpenAi/v2/actions/video/index.js +64 -0
  155. package/dist/nodes/vendors/OpenAi/v2/actions/video/index.js.map +1 -0
  156. package/dist/types/credentials.json +2 -1
  157. package/dist/types/nodes.json +10 -6
  158. package/dist/utils/helpers.js +22 -2
  159. package/dist/utils/helpers.js.map +1 -1
  160. package/package.json +14 -10
  161. package/dist/nodes/vendors/OpenAi/actions/assistant/create.operation.js.map +0 -1
  162. package/dist/nodes/vendors/OpenAi/actions/assistant/deleteAssistant.operation.js.map +0 -1
  163. package/dist/nodes/vendors/OpenAi/actions/assistant/index.js.map +0 -1
  164. package/dist/nodes/vendors/OpenAi/actions/assistant/list.operation.js.map +0 -1
  165. package/dist/nodes/vendors/OpenAi/actions/assistant/message.operation.js.map +0 -1
  166. package/dist/nodes/vendors/OpenAi/actions/assistant/update.operation.js.map +0 -1
  167. package/dist/nodes/vendors/OpenAi/actions/audio/generate.operation.js.map +0 -1
  168. package/dist/nodes/vendors/OpenAi/actions/audio/index.js.map +0 -1
  169. package/dist/nodes/vendors/OpenAi/actions/audio/transcribe.operation.js.map +0 -1
  170. package/dist/nodes/vendors/OpenAi/actions/audio/translate.operation.js.map +0 -1
  171. package/dist/nodes/vendors/OpenAi/actions/descriptions.js.map +0 -1
  172. package/dist/nodes/vendors/OpenAi/actions/file/deleteFile.operation.js.map +0 -1
  173. package/dist/nodes/vendors/OpenAi/actions/file/index.js.map +0 -1
  174. package/dist/nodes/vendors/OpenAi/actions/file/list.operation.js.map +0 -1
  175. package/dist/nodes/vendors/OpenAi/actions/file/upload.operation.js.map +0 -1
  176. package/dist/nodes/vendors/OpenAi/actions/image/analyze.operation.js.map +0 -1
  177. package/dist/nodes/vendors/OpenAi/actions/image/generate.operation.js.map +0 -1
  178. package/dist/nodes/vendors/OpenAi/actions/image/index.js.map +0 -1
  179. package/dist/nodes/vendors/OpenAi/actions/node.type.js.map +0 -1
  180. package/dist/nodes/vendors/OpenAi/actions/router.js.map +0 -1
  181. package/dist/nodes/vendors/OpenAi/actions/text/classify.operation.js.map +0 -1
  182. package/dist/nodes/vendors/OpenAi/actions/text/index.js.map +0 -1
  183. package/dist/nodes/vendors/OpenAi/actions/text/message.operation.js.map +0 -1
  184. package/dist/nodes/vendors/OpenAi/actions/versionDescription.js +0 -160
  185. package/dist/nodes/vendors/OpenAi/actions/versionDescription.js.map +0 -1
  186. /package/dist/nodes/vendors/OpenAi/{actions → v1/actions}/assistant/index.js +0 -0
  187. /package/dist/nodes/vendors/OpenAi/{actions → v1/actions}/audio/index.js +0 -0
  188. /package/dist/nodes/vendors/OpenAi/{actions → v1/actions}/descriptions.js +0 -0
  189. /package/dist/nodes/vendors/OpenAi/{actions → v1/actions}/file/index.js +0 -0
  190. /package/dist/nodes/vendors/OpenAi/{actions → v1/actions}/image/index.js +0 -0
  191. /package/dist/nodes/vendors/OpenAi/{actions → v1/actions}/node.type.js +0 -0
  192. /package/dist/nodes/vendors/OpenAi/{actions → v1/actions}/text/index.js +0 -0
@@ -0,0 +1,279 @@
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 descriptions_exports = {};
20
+ __export(descriptions_exports, {
21
+ messageOptions: () => messageOptions,
22
+ metadataProperty: () => metadataProperty,
23
+ modelRLC: () => modelRLC,
24
+ textMessageProperties: () => textMessageProperties
25
+ });
26
+ module.exports = __toCommonJS(descriptions_exports);
27
+ const modelRLC = (searchListMethod = "modelSearch") => ({
28
+ displayName: "Model",
29
+ name: "modelId",
30
+ type: "resourceLocator",
31
+ default: { mode: "list", value: "" },
32
+ required: true,
33
+ modes: [
34
+ {
35
+ displayName: "From List",
36
+ name: "list",
37
+ type: "list",
38
+ typeOptions: {
39
+ searchListMethod,
40
+ searchable: true
41
+ }
42
+ },
43
+ {
44
+ displayName: "ID",
45
+ name: "id",
46
+ type: "string",
47
+ placeholder: "e.g. gpt-4"
48
+ }
49
+ ]
50
+ });
51
+ const metadataProperty = {
52
+ displayName: "Metadata",
53
+ name: "metadata",
54
+ type: "json",
55
+ description: "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.",
56
+ default: "{}"
57
+ };
58
+ const imageMessageProperties = [
59
+ {
60
+ displayName: "Image Type",
61
+ name: "imageType",
62
+ type: "options",
63
+ default: "url",
64
+ options: [
65
+ { name: "Image URL", value: "url" },
66
+ { name: "File ID", value: "fileId" },
67
+ { name: "File Data", value: "base64" }
68
+ ],
69
+ displayOptions: {
70
+ show: {
71
+ type: ["image"]
72
+ }
73
+ }
74
+ },
75
+ {
76
+ displayName: "Image URL",
77
+ name: "imageUrl",
78
+ type: "string",
79
+ default: "",
80
+ placeholder: "e.g. https://example.com/image.jpeg",
81
+ description: "URL of the image to be sent",
82
+ displayOptions: {
83
+ show: {
84
+ type: ["image"],
85
+ imageType: ["url"]
86
+ }
87
+ }
88
+ },
89
+ {
90
+ displayName: "Image Data",
91
+ name: "binaryPropertyName",
92
+ type: "string",
93
+ default: "data",
94
+ placeholder: "e.g. data",
95
+ hint: "The name of the input field containing the binary file data to be processed",
96
+ description: "Name of the binary property which contains the image(s)",
97
+ displayOptions: {
98
+ show: {
99
+ type: ["image"],
100
+ imageType: ["base64"]
101
+ }
102
+ }
103
+ },
104
+ {
105
+ displayName: "File ID",
106
+ name: "fileId",
107
+ type: "string",
108
+ default: "",
109
+ description: "ID of the file to be sent",
110
+ displayOptions: {
111
+ show: {
112
+ type: ["image"],
113
+ imageType: ["fileId"]
114
+ }
115
+ }
116
+ },
117
+ {
118
+ displayName: "Detail",
119
+ name: "imageDetail",
120
+ type: "options",
121
+ default: "auto",
122
+ description: "The detail level of the image to be sent to the model",
123
+ options: [
124
+ { name: "Auto", value: "auto" },
125
+ { name: "Low", value: "low" },
126
+ { name: "High", value: "high" }
127
+ ],
128
+ displayOptions: {
129
+ show: {
130
+ type: ["image"]
131
+ }
132
+ }
133
+ }
134
+ ];
135
+ const textMessageProperties = [
136
+ {
137
+ displayName: "Prompt",
138
+ name: "content",
139
+ type: "string",
140
+ description: "The content of the message to be send",
141
+ default: "",
142
+ placeholder: "e.g. Hello, how can you help me?",
143
+ typeOptions: {
144
+ rows: 2
145
+ },
146
+ displayOptions: {
147
+ show: {
148
+ type: ["text"]
149
+ }
150
+ }
151
+ }
152
+ ];
153
+ const fileMessageProperties = [
154
+ {
155
+ displayName: "File Type",
156
+ name: "fileType",
157
+ type: "options",
158
+ default: "url",
159
+ options: [
160
+ { name: "File URL", value: "url" },
161
+ { name: "File ID", value: "fileId" },
162
+ { name: "File Data", value: "base64" }
163
+ ],
164
+ displayOptions: {
165
+ show: {
166
+ type: ["file"]
167
+ }
168
+ }
169
+ },
170
+ {
171
+ displayName: "File URL",
172
+ name: "fileUrl",
173
+ type: "string",
174
+ default: "",
175
+ placeholder: "e.g. https://example.com/file.pdf",
176
+ description: "URL of the file to be sent. Accepts base64 encoded files as well.",
177
+ displayOptions: {
178
+ show: {
179
+ type: ["file"],
180
+ fileType: ["url"]
181
+ }
182
+ }
183
+ },
184
+ {
185
+ displayName: "File ID",
186
+ name: "fileId",
187
+ type: "string",
188
+ default: "",
189
+ description: "ID of the file to be sent",
190
+ displayOptions: {
191
+ show: {
192
+ type: ["file"],
193
+ fileType: ["fileId"]
194
+ }
195
+ }
196
+ },
197
+ {
198
+ displayName: "File Data",
199
+ name: "binaryPropertyName",
200
+ type: "string",
201
+ default: "data",
202
+ placeholder: "e.g. data",
203
+ hint: "The name of the input field containing the binary file data to be processed",
204
+ description: "Name of the binary property which contains the file",
205
+ displayOptions: {
206
+ show: {
207
+ type: ["file"],
208
+ fileType: ["base64"]
209
+ }
210
+ }
211
+ },
212
+ {
213
+ displayName: "File Name",
214
+ name: "fileName",
215
+ type: "string",
216
+ default: "",
217
+ required: true,
218
+ displayOptions: {
219
+ show: {
220
+ type: ["file"],
221
+ fileType: ["base64"]
222
+ }
223
+ }
224
+ }
225
+ ];
226
+ const messageOptions = [
227
+ {
228
+ displayName: "Values",
229
+ name: "values",
230
+ values: [
231
+ {
232
+ displayName: "Type",
233
+ name: "type",
234
+ type: "options",
235
+ default: "text",
236
+ options: [
237
+ { name: "Text", value: "text" },
238
+ { name: "Image", value: "image" },
239
+ { name: "File", value: "file" }
240
+ ]
241
+ },
242
+ {
243
+ displayName: "Role",
244
+ name: "role",
245
+ type: "options",
246
+ description: "Role in shaping the model's response, it tells the model how it should behave and interact with the user",
247
+ options: [
248
+ {
249
+ name: "User",
250
+ value: "user",
251
+ description: "Send a message as a user and get a response from the model"
252
+ },
253
+ {
254
+ name: "Assistant",
255
+ value: "assistant",
256
+ description: "Tell the model to adopt a specific tone or personality"
257
+ },
258
+ {
259
+ name: "System",
260
+ value: "system",
261
+ description: "Usually used to set the model's behavior or context for the next user message"
262
+ }
263
+ ],
264
+ default: "user"
265
+ },
266
+ ...textMessageProperties,
267
+ ...imageMessageProperties,
268
+ ...fileMessageProperties
269
+ ]
270
+ }
271
+ ];
272
+ // Annotate the CommonJS export names for ESM import in node:
273
+ 0 && (module.exports = {
274
+ messageOptions,
275
+ metadataProperty,
276
+ modelRLC,
277
+ textMessageProperties
278
+ });
279
+ //# sourceMappingURL=descriptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../nodes/vendors/OpenAi/v2/actions/descriptions.ts"],"sourcesContent":["import type { INodeProperties, INodePropertyCollection } from 'n8n-workflow';\n\nexport const modelRLC = (searchListMethod: string = 'modelSearch'): INodeProperties => ({\n\tdisplayName: 'Model',\n\tname: 'modelId',\n\ttype: 'resourceLocator',\n\tdefault: { mode: 'list', value: '' },\n\trequired: true,\n\tmodes: [\n\t\t{\n\t\t\tdisplayName: 'From List',\n\t\t\tname: 'list',\n\t\t\ttype: 'list',\n\t\t\ttypeOptions: {\n\t\t\t\tsearchListMethod,\n\t\t\t\tsearchable: true,\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'ID',\n\t\t\tname: 'id',\n\t\t\ttype: 'string',\n\t\t\tplaceholder: 'e.g. gpt-4',\n\t\t},\n\t],\n});\n\nexport const metadataProperty: INodeProperties = {\n\tdisplayName: 'Metadata',\n\tname: 'metadata',\n\ttype: 'json',\n\tdescription:\n\t\t'Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.',\n\tdefault: '{}',\n};\n\nconst imageMessageProperties: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Image Type',\n\t\tname: 'imageType',\n\t\ttype: 'options',\n\t\tdefault: 'url',\n\t\toptions: [\n\t\t\t{ name: 'Image URL', value: 'url' },\n\t\t\t{ name: 'File ID', value: 'fileId' },\n\t\t\t{ name: 'File Data', value: 'base64' },\n\t\t],\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\ttype: ['image'],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'Image URL',\n\t\tname: 'imageUrl',\n\t\ttype: 'string',\n\t\tdefault: '',\n\t\tplaceholder: 'e.g. https://example.com/image.jpeg',\n\t\tdescription: 'URL of the image to be sent',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\ttype: ['image'],\n\t\t\t\timageType: ['url'],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'Image Data',\n\t\tname: 'binaryPropertyName',\n\t\ttype: 'string',\n\t\tdefault: 'data',\n\t\tplaceholder: 'e.g. data',\n\t\thint: 'The name of the input field containing the binary file data to be processed',\n\t\tdescription: 'Name of the binary property which contains the image(s)',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\ttype: ['image'],\n\t\t\t\timageType: ['base64'],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'File ID',\n\t\tname: 'fileId',\n\t\ttype: 'string',\n\t\tdefault: '',\n\t\tdescription: 'ID of the file to be sent',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\ttype: ['image'],\n\t\t\t\timageType: ['fileId'],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'Detail',\n\t\tname: 'imageDetail',\n\t\ttype: 'options',\n\t\tdefault: 'auto',\n\t\tdescription: 'The detail level of the image to be sent to the model',\n\t\toptions: [\n\t\t\t{ name: 'Auto', value: 'auto' },\n\t\t\t{ name: 'Low', value: 'low' },\n\t\t\t{ name: 'High', value: 'high' },\n\t\t],\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\ttype: ['image'],\n\t\t\t},\n\t\t},\n\t},\n];\n\nexport const textMessageProperties: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Prompt',\n\t\tname: 'content',\n\t\ttype: 'string',\n\t\tdescription: 'The content of the message to be send',\n\t\tdefault: '',\n\t\tplaceholder: 'e.g. Hello, how can you help me?',\n\t\ttypeOptions: {\n\t\t\trows: 2,\n\t\t},\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\ttype: ['text'],\n\t\t\t},\n\t\t},\n\t},\n];\n\nconst fileMessageProperties: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'File Type',\n\t\tname: 'fileType',\n\t\ttype: 'options',\n\t\tdefault: 'url',\n\t\toptions: [\n\t\t\t{ name: 'File URL', value: 'url' },\n\t\t\t{ name: 'File ID', value: 'fileId' },\n\t\t\t{ name: 'File Data', value: 'base64' },\n\t\t],\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\ttype: ['file'],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'File URL',\n\t\tname: 'fileUrl',\n\t\ttype: 'string',\n\t\tdefault: '',\n\t\tplaceholder: 'e.g. https://example.com/file.pdf',\n\t\tdescription: 'URL of the file to be sent. Accepts base64 encoded files as well.',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\ttype: ['file'],\n\t\t\t\tfileType: ['url'],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'File ID',\n\t\tname: 'fileId',\n\t\ttype: 'string',\n\t\tdefault: '',\n\t\tdescription: 'ID of the file to be sent',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\ttype: ['file'],\n\t\t\t\tfileType: ['fileId'],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'File Data',\n\t\tname: 'binaryPropertyName',\n\t\ttype: 'string',\n\t\tdefault: 'data',\n\t\tplaceholder: 'e.g. data',\n\t\thint: 'The name of the input field containing the binary file data to be processed',\n\t\tdescription: 'Name of the binary property which contains the file',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\ttype: ['file'],\n\t\t\t\tfileType: ['base64'],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'File Name',\n\t\tname: 'fileName',\n\t\ttype: 'string',\n\t\tdefault: '',\n\t\trequired: true,\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\ttype: ['file'],\n\t\t\t\tfileType: ['base64'],\n\t\t\t},\n\t\t},\n\t},\n];\n\nexport const messageOptions: INodePropertyCollection[] = [\n\t{\n\t\tdisplayName: 'Values',\n\t\tname: 'values',\n\t\tvalues: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Type',\n\t\t\t\tname: 'type',\n\t\t\t\ttype: 'options',\n\t\t\t\tdefault: 'text',\n\t\t\t\toptions: [\n\t\t\t\t\t{ name: 'Text', value: 'text' },\n\t\t\t\t\t{ name: 'Image', value: 'image' },\n\t\t\t\t\t{ name: 'File', value: 'file' },\n\t\t\t\t],\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Role',\n\t\t\t\tname: 'role',\n\t\t\t\ttype: 'options',\n\t\t\t\tdescription:\n\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\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'User',\n\t\t\t\t\t\tvalue: 'user',\n\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},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Assistant',\n\t\t\t\t\t\tvalue: 'assistant',\n\t\t\t\t\t\tdescription: 'Tell the model to adopt a specific tone or personality',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'System',\n\t\t\t\t\t\tvalue: 'system',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\"Usually used to set the model's behavior or context for the next user message\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'user',\n\t\t\t},\n\t\t\t...textMessageProperties,\n\t\t\t...imageMessageProperties,\n\t\t\t...fileMessageProperties,\n\t\t],\n\t},\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,WAAW,CAAC,mBAA2B,mBAAoC;AAAA,EACvF,aAAa;AAAA,EACb,MAAM;AAAA,EACN,MAAM;AAAA,EACN,SAAS,EAAE,MAAM,QAAQ,OAAO,GAAG;AAAA,EACnC,UAAU;AAAA,EACV,OAAO;AAAA,IACN;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,aAAa;AAAA,QACZ;AAAA,QACA,YAAY;AAAA,MACb;AAAA,IACD;AAAA,IACA;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,aAAa;AAAA,IACd;AAAA,EACD;AACD;AAEO,MAAM,mBAAoC;AAAA,EAChD,aAAa;AAAA,EACb,MAAM;AAAA,EACN,MAAM;AAAA,EACN,aACC;AAAA,EACD,SAAS;AACV;AAEA,MAAM,yBAA4C;AAAA,EACjD;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,MACR,EAAE,MAAM,aAAa,OAAO,MAAM;AAAA,MAClC,EAAE,MAAM,WAAW,OAAO,SAAS;AAAA,MACnC,EAAE,MAAM,aAAa,OAAO,SAAS;AAAA,IACtC;AAAA,IACA,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,MAAM,CAAC,OAAO;AAAA,MACf;AAAA,IACD;AA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Aa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,UAAU;AAAA,IACV,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,MAAM,CAAC,MAAM;AAAA,QACb,UAAU,CAAC,QAAQ;AAAA,MACpB;AAAA,IACD;AAAA,EACD;AACD;AAEO,MAAM,iBAA4C;AAAA,EACxD;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,QAAQ;AAAA,MACP;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,SAAS;AAAA,UACR,EAAE,MAAM,QAAQ,OAAO,OAAO;AAAA,UAC9B,EAAE,MAAM,SAAS,OAAO,QAAQ;AAAA,UAChC,EAAE,MAAM,QAAQ,OAAO,OAAO;AAAA,QAC/B;AAAA,MACD;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,aACC;AAAA,QACD,SAAS;AAAA,UACR;AAAA,YACC,MAAM;AAAA,YACN,OAAO;AAAA,YACP,aAAa;AAAA,UACd;AAAA,UACA;AAAA,YACC,MAAM;AAAA,YACN,OAAO;AAAA,YACP,aAAa;AAAA,UACd;AAAA,UACA;AAAA,YACC,MAAM;AAAA,YACN,OAAO;AAAA,YACP,aACC;AAAA,UACF;AAAA,QACD;AAAA,QACA,SAAS;AAAA,MACV;AAAA,MACA,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,IACJ;AAAA,EACD;AACD;","names":[]}
@@ -0,0 +1,84 @@
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 deleteFile_operation_exports = {};
20
+ __export(deleteFile_operation_exports, {
21
+ description: () => description,
22
+ execute: () => execute
23
+ });
24
+ module.exports = __toCommonJS(deleteFile_operation_exports);
25
+ var import_n8n_workflow = require("n8n-workflow");
26
+ var import_transport = require("../../../transport");
27
+ const properties = [
28
+ {
29
+ displayName: "File",
30
+ name: "fileId",
31
+ type: "resourceLocator",
32
+ default: { mode: "list", value: "" },
33
+ required: true,
34
+ modes: [
35
+ {
36
+ displayName: "From List",
37
+ name: "list",
38
+ type: "list",
39
+ typeOptions: {
40
+ searchListMethod: "fileSearch",
41
+ searchable: true
42
+ }
43
+ },
44
+ {
45
+ displayName: "ID",
46
+ name: "id",
47
+ type: "string",
48
+ validation: [
49
+ {
50
+ type: "regex",
51
+ properties: {
52
+ regex: "file-[a-zA-Z0-9]",
53
+ errorMessage: "Not a valid File ID"
54
+ }
55
+ }
56
+ ],
57
+ placeholder: "e.g. file-1234567890"
58
+ }
59
+ ]
60
+ }
61
+ ];
62
+ const displayOptions = {
63
+ show: {
64
+ operation: ["deleteFile"],
65
+ resource: ["file"]
66
+ }
67
+ };
68
+ const description = (0, import_n8n_workflow.updateDisplayOptions)(displayOptions, properties);
69
+ async function execute(i) {
70
+ const fileId = this.getNodeParameter("fileId", i, "", { extractValue: true });
71
+ const response = await import_transport.apiRequest.call(this, "DELETE", `/files/${fileId}`);
72
+ return [
73
+ {
74
+ json: response,
75
+ pairedItem: { item: i }
76
+ }
77
+ ];
78
+ }
79
+ // Annotate the CommonJS export names for ESM import in node:
80
+ 0 && (module.exports = {
81
+ description,
82
+ execute
83
+ });
84
+ //# sourceMappingURL=deleteFile.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../nodes/vendors/OpenAi/v2/actions/file/deleteFile.operation.ts"],"sourcesContent":["import type { INodeProperties, IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';\nimport { updateDisplayOptions } from 'n8n-workflow';\n\nimport { apiRequest } from '../../../transport';\n\nconst properties: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'File',\n\t\tname: 'fileId',\n\t\ttype: 'resourceLocator',\n\t\tdefault: { mode: 'list', value: '' },\n\t\trequired: true,\n\t\tmodes: [\n\t\t\t{\n\t\t\t\tdisplayName: 'From List',\n\t\t\t\tname: 'list',\n\t\t\t\ttype: 'list',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\tsearchListMethod: 'fileSearch',\n\t\t\t\t\tsearchable: true,\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'ID',\n\t\t\t\tname: 'id',\n\t\t\t\ttype: 'string',\n\t\t\t\tvalidation: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: 'regex',\n\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\tregex: 'file-[a-zA-Z0-9]',\n\t\t\t\t\t\t\terrorMessage: 'Not a valid File ID',\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tplaceholder: 'e.g. file-1234567890',\n\t\t\t},\n\t\t],\n\t},\n];\n\nconst displayOptions = {\n\tshow: {\n\t\toperation: ['deleteFile'],\n\t\tresource: ['file'],\n\t},\n};\n\nexport const description = updateDisplayOptions(displayOptions, properties);\n\nexport async function execute(this: IExecuteFunctions, i: number): Promise<INodeExecutionData[]> {\n\tconst fileId = this.getNodeParameter('fileId', i, '', { extractValue: true });\n\n\tconst response = await apiRequest.call(this, 'DELETE', `/files/${fileId}`);\n\n\treturn [\n\t\t{\n\t\t\tjson: response,\n\t\t\tpairedItem: { item: i },\n\t\t},\n\t];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,0BAAqC;AAErC,uBAA2B;AAE3B,MAAM,aAAgC;AAAA,EACrC;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS,EAAE,MAAM,QAAQ,OAAO,GAAG;AAAA,IACnC,UAAU;AAAA,IACV,OAAO;AAAA,MACN;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,aAAa;AAAA,UACZ,kBAAkB;AAAA,UAClB,YAAY;AAAA,QACb;AAAA,MACD;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,YAAY;AAAA,UACX;AAAA,YACC,MAAM;AAAA,YACN,YAAY;AAAA,cACX,OAAO;AAAA,cACP,cAAc;AAAA,YACf;AAAA,UACD;AAAA,QACD;AAAA,QACA,aAAa;AAAA,MACd;AAAA,IACD;AAAA,EACD;AACD;AAEA,MAAM,iBAAiB;AAAA,EACtB,MAAM;AAAA,IACL,WAAW,CAAC,YAAY;AAAA,IACxB,UAAU,CAAC,MAAM;AAAA,EAClB;AACD;AAEO,MAAM,kBAAc,0CAAqB,gBAAgB,UAAU;AAE1E,eAAsB,QAAiC,GAA0C;AAChG,QAAM,SAAS,KAAK,iBAAiB,UAAU,GAAG,IAAI,EAAE,cAAc,KAAK,CAAC;AAE5E,QAAM,WAAW,MAAM,4BAAW,KAAK,MAAM,UAAU,UAAU,MAAM,EAAE;AAEzE,SAAO;AAAA,IACN;AAAA,MACC,MAAM;AAAA,MACN,YAAY,EAAE,MAAM,EAAE;AAAA,IACvB;AAAA,EACD;AACD;","names":[]}
@@ -0,0 +1,84 @@
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 file_exports = {};
30
+ __export(file_exports, {
31
+ deleteFile: () => deleteFile,
32
+ description: () => description,
33
+ list: () => list,
34
+ upload: () => upload
35
+ });
36
+ module.exports = __toCommonJS(file_exports);
37
+ var deleteFile = __toESM(require("./deleteFile.operation"));
38
+ var list = __toESM(require("./list.operation"));
39
+ var upload = __toESM(require("./upload.operation"));
40
+ const description = [
41
+ {
42
+ displayName: "Operation",
43
+ name: "operation",
44
+ type: "options",
45
+ noDataExpression: true,
46
+ options: [
47
+ {
48
+ name: "Delete a File",
49
+ value: "deleteFile",
50
+ action: "Delete a file",
51
+ description: "Delete a file from the server"
52
+ },
53
+ {
54
+ name: "List Files",
55
+ value: "list",
56
+ action: "List files",
57
+ description: "Returns a list of files that belong to the user's organization"
58
+ },
59
+ {
60
+ name: "Upload a File",
61
+ value: "upload",
62
+ action: "Upload a file",
63
+ description: "Upload a file that can be used across various endpoints"
64
+ }
65
+ ],
66
+ default: "upload",
67
+ displayOptions: {
68
+ show: {
69
+ resource: ["file"]
70
+ }
71
+ }
72
+ },
73
+ ...upload.description,
74
+ ...deleteFile.description,
75
+ ...list.description
76
+ ];
77
+ // Annotate the CommonJS export names for ESM import in node:
78
+ 0 && (module.exports = {
79
+ deleteFile,
80
+ description,
81
+ list,
82
+ upload
83
+ });
84
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../nodes/vendors/OpenAi/v2/actions/file/index.ts"],"sourcesContent":["import type { INodeProperties } from 'n8n-workflow';\n\nimport * as deleteFile from './deleteFile.operation';\nimport * as list from './list.operation';\nimport * as upload from './upload.operation';\n\nexport { upload, deleteFile, list };\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\toptions: [\n\t\t\t{\n\t\t\t\tname: 'Delete a File',\n\t\t\t\tvalue: 'deleteFile',\n\t\t\t\taction: 'Delete a file',\n\t\t\t\tdescription: 'Delete a file from the server',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'List Files',\n\t\t\t\tvalue: 'list',\n\t\t\t\taction: 'List files',\n\t\t\t\tdescription: \"Returns a list of files that belong to the user's organization\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Upload a File',\n\t\t\t\tvalue: 'upload',\n\t\t\t\taction: 'Upload a file',\n\t\t\t\tdescription: 'Upload a file that can be used across various endpoints',\n\t\t\t},\n\t\t],\n\t\tdefault: 'upload',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['file'],\n\t\t\t},\n\t\t},\n\t},\n\n\t...upload.description,\n\t...deleteFile.description,\n\t...list.description,\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,iBAA4B;AAC5B,WAAsB;AACtB,aAAwB;AAIjB,MAAM,cAAiC;AAAA,EAC7C;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,kBAAkB;AAAA,IAClB,SAAS;AAAA,MACR;AAAA,QACC,MAAM;AAAA,QACN,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,MAAM;AAAA,QACN,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,MAAM;AAAA,QACN,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,aAAa;AAAA,MACd;AAAA,IACD;AAAA,IACA,SAAS;AAAA,IACT,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,UAAU,CAAC,MAAM;AAAA,MAClB;AAAA,IACD;AAAA,EACD;AAAA,EAEA,GAAG,OAAO;AAAA,EACV,GAAG,WAAW;AAAA,EACd,GAAG,KAAK;AACT;","names":[]}
@@ -0,0 +1,92 @@
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 list_operation_exports = {};
20
+ __export(list_operation_exports, {
21
+ description: () => description,
22
+ execute: () => execute
23
+ });
24
+ module.exports = __toCommonJS(list_operation_exports);
25
+ var import_n8n_workflow = require("n8n-workflow");
26
+ var import_transport = require("../../../transport");
27
+ const properties = [
28
+ {
29
+ displayName: "Options",
30
+ name: "options",
31
+ placeholder: "Add Option",
32
+ type: "collection",
33
+ default: {},
34
+ options: [
35
+ {
36
+ displayName: "Purpose",
37
+ name: "purpose",
38
+ type: "options",
39
+ default: "any",
40
+ description: "Only return files with the given purpose",
41
+ // eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items
42
+ options: [
43
+ {
44
+ name: "Any [Default]",
45
+ value: "any"
46
+ },
47
+ {
48
+ name: "Assistants",
49
+ value: "assistants"
50
+ },
51
+ {
52
+ name: "Fine-Tune",
53
+ value: "fine-tune"
54
+ },
55
+ {
56
+ name: "Vision",
57
+ value: "vision"
58
+ },
59
+ {
60
+ name: "User Data",
61
+ value: "user_data"
62
+ }
63
+ ]
64
+ }
65
+ ]
66
+ }
67
+ ];
68
+ const displayOptions = {
69
+ show: {
70
+ operation: ["list"],
71
+ resource: ["file"]
72
+ }
73
+ };
74
+ const description = (0, import_n8n_workflow.updateDisplayOptions)(displayOptions, properties);
75
+ async function execute(i) {
76
+ const options = this.getNodeParameter("options", i, {});
77
+ const qs = {};
78
+ if (options.purpose && options.purpose !== "any") {
79
+ qs.purpose = options.purpose;
80
+ }
81
+ const { data } = await import_transport.apiRequest.call(this, "GET", "/files", { qs });
82
+ return (data || []).map((file) => ({
83
+ json: file,
84
+ pairedItem: { item: i }
85
+ }));
86
+ }
87
+ // Annotate the CommonJS export names for ESM import in node:
88
+ 0 && (module.exports = {
89
+ description,
90
+ execute
91
+ });
92
+ //# sourceMappingURL=list.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../nodes/vendors/OpenAi/v2/actions/file/list.operation.ts"],"sourcesContent":["import type {\n\tIDataObject,\n\tINodeProperties,\n\tIExecuteFunctions,\n\tINodeExecutionData,\n} from 'n8n-workflow';\nimport { updateDisplayOptions } from 'n8n-workflow';\n\nimport { apiRequest } from '../../../transport';\n\nconst properties: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\tplaceholder: 'Add Option',\n\t\ttype: 'collection',\n\t\tdefault: {},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Purpose',\n\t\t\t\tname: 'purpose',\n\t\t\t\ttype: 'options',\n\t\t\t\tdefault: 'any',\n\t\t\t\tdescription: 'Only return files with the given purpose',\n\t\t\t\t// eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Any [Default]',\n\t\t\t\t\t\tvalue: 'any',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Assistants',\n\t\t\t\t\t\tvalue: 'assistants',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Fine-Tune',\n\t\t\t\t\t\tvalue: 'fine-tune',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Vision',\n\t\t\t\t\t\tvalue: 'vision',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'User Data',\n\t\t\t\t\t\tvalue: 'user_data',\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\toperation: ['list'],\n\t\tresource: ['file'],\n\t},\n};\n\nexport const description = updateDisplayOptions(displayOptions, properties);\n\nexport async function execute(this: IExecuteFunctions, i: number): Promise<INodeExecutionData[]> {\n\tconst options = this.getNodeParameter('options', i, {});\n\tconst qs: IDataObject = {};\n\n\tif (options.purpose && options.purpose !== 'any') {\n\t\tqs.purpose = options.purpose as string;\n\t}\n\n\tconst { data } = await apiRequest.call(this, 'GET', '/files', { qs });\n\n\treturn (data || []).map((file: IDataObject) => ({\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