@n8n/n8n-nodes-langchain 2.18.1 → 2.18.2

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 (75) hide show
  1. package/dist/known/credentials.json +1 -0
  2. package/dist/known/nodes.json +4 -0
  3. package/dist/node-definitions/.nodes-hash +1 -1
  4. package/dist/node-definitions/index.ts +4 -0
  5. package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/index.ts +12 -0
  6. package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/index.schema.js +26 -0
  7. package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/index.ts +21 -0
  8. package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_audio/index.schema.js +18 -0
  9. package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_audio/index.ts +10 -0
  10. package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_audio/operation_text_to_speech.schema.js +32 -0
  11. package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_audio/operation_text_to_speech.ts +75 -0
  12. package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_image/index.schema.js +18 -0
  13. package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_image/index.ts +10 -0
  14. package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_image/operation_generate.schema.js +33 -0
  15. package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_image/operation_generate.ts +64 -0
  16. package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_text/index.schema.js +18 -0
  17. package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_text/index.ts +10 -0
  18. package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_text/operation_message.schema.js +31 -0
  19. package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_text/operation_message.ts +82 -0
  20. package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_video/index.schema.js +22 -0
  21. package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_video/index.ts +15 -0
  22. package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_video/operation_image_to_video.schema.js +36 -0
  23. package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_video/operation_image_to_video.ts +103 -0
  24. package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_video/operation_text_to_video.schema.js +33 -0
  25. package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_video/operation_text_to_video.ts +60 -0
  26. package/dist/nodes/vendors/MiniMax/MiniMax.node.d.ts +5 -0
  27. package/dist/nodes/vendors/MiniMax/MiniMax.node.js +15 -0
  28. package/dist/nodes/vendors/MiniMax/MiniMax.node.js.map +1 -0
  29. package/dist/nodes/vendors/MiniMax/actions/audio/index.d.ts +4 -0
  30. package/dist/nodes/vendors/MiniMax/actions/audio/index.js +62 -0
  31. package/dist/nodes/vendors/MiniMax/actions/audio/index.js.map +1 -0
  32. package/dist/nodes/vendors/MiniMax/actions/audio/tts.operation.d.ts +29 -0
  33. package/dist/nodes/vendors/MiniMax/actions/audio/tts.operation.js +252 -0
  34. package/dist/nodes/vendors/MiniMax/actions/audio/tts.operation.js.map +1 -0
  35. package/dist/nodes/vendors/MiniMax/actions/image/generate.operation.d.ts +29 -0
  36. package/dist/nodes/vendors/MiniMax/actions/image/generate.operation.js +159 -0
  37. package/dist/nodes/vendors/MiniMax/actions/image/generate.operation.js.map +1 -0
  38. package/dist/nodes/vendors/MiniMax/actions/image/index.d.ts +4 -0
  39. package/dist/nodes/vendors/MiniMax/actions/image/index.js +62 -0
  40. package/dist/nodes/vendors/MiniMax/actions/image/index.js.map +1 -0
  41. package/dist/nodes/vendors/MiniMax/actions/node.type.d.ts +9 -0
  42. package/dist/nodes/vendors/MiniMax/actions/node.type.js +3 -0
  43. package/dist/nodes/vendors/MiniMax/actions/node.type.js.map +1 -0
  44. package/dist/nodes/vendors/MiniMax/actions/router.d.ts +2 -0
  45. package/dist/nodes/vendors/MiniMax/actions/router.js +86 -0
  46. package/dist/nodes/vendors/MiniMax/actions/router.js.map +1 -0
  47. package/dist/nodes/vendors/MiniMax/actions/text/index.d.ts +4 -0
  48. package/dist/nodes/vendors/MiniMax/actions/text/index.js +62 -0
  49. package/dist/nodes/vendors/MiniMax/actions/text/index.js.map +1 -0
  50. package/dist/nodes/vendors/MiniMax/actions/text/message.operation.d.ts +29 -0
  51. package/dist/nodes/vendors/MiniMax/actions/text/message.operation.js +287 -0
  52. package/dist/nodes/vendors/MiniMax/actions/text/message.operation.js.map +1 -0
  53. package/dist/nodes/vendors/MiniMax/actions/versionDescription.d.ts +2 -0
  54. package/dist/nodes/vendors/MiniMax/actions/versionDescription.js +118 -0
  55. package/dist/nodes/vendors/MiniMax/actions/versionDescription.js.map +1 -0
  56. package/dist/nodes/vendors/MiniMax/actions/video/generate.i2v.operation.d.ts +29 -0
  57. package/dist/nodes/vendors/MiniMax/actions/video/generate.i2v.operation.js +324 -0
  58. package/dist/nodes/vendors/MiniMax/actions/video/generate.i2v.operation.js.map +1 -0
  59. package/dist/nodes/vendors/MiniMax/actions/video/generate.t2v.operation.d.ts +29 -0
  60. package/dist/nodes/vendors/MiniMax/actions/video/generate.t2v.operation.js +161 -0
  61. package/dist/nodes/vendors/MiniMax/actions/video/generate.t2v.operation.js.map +1 -0
  62. package/dist/nodes/vendors/MiniMax/actions/video/index.d.ts +5 -0
  63. package/dist/nodes/vendors/MiniMax/actions/video/index.js +71 -0
  64. package/dist/nodes/vendors/MiniMax/actions/video/index.js.map +1 -0
  65. package/dist/nodes/vendors/MiniMax/helpers/interfaces.d.ts +88 -0
  66. package/dist/nodes/vendors/MiniMax/helpers/interfaces.js +3 -0
  67. package/dist/nodes/vendors/MiniMax/helpers/interfaces.js.map +1 -0
  68. package/dist/nodes/vendors/MiniMax/minimax.svg +10 -0
  69. package/dist/nodes/vendors/MiniMax/transport/index.d.ts +14 -0
  70. package/dist/nodes/vendors/MiniMax/transport/index.js +60 -0
  71. package/dist/nodes/vendors/MiniMax/transport/index.js.map +1 -0
  72. package/dist/typecheck.tsbuildinfo +1 -1
  73. package/dist/types/credentials.json +1 -1
  74. package/dist/types/nodes.json +1 -0
  75. package/package.json +6 -5
@@ -0,0 +1,287 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.description = void 0;
7
+ exports.execute = execute;
8
+ const n8n_workflow_1 = require("n8n-workflow");
9
+ const zod_to_json_schema_1 = __importDefault(require("zod-to-json-schema"));
10
+ const helpers_1 = require("../../../../../utils/helpers");
11
+ const transport_1 = require("../../transport");
12
+ const properties = [
13
+ {
14
+ displayName: 'Model',
15
+ name: 'modelId',
16
+ type: 'options',
17
+ options: [
18
+ { name: 'MiniMax-M2', value: 'MiniMax-M2' },
19
+ { name: 'MiniMax-M2.1', value: 'MiniMax-M2.1' },
20
+ { name: 'MiniMax-M2.1-Highspeed', value: 'MiniMax-M2.1-highspeed' },
21
+ { name: 'MiniMax-M2.5', value: 'MiniMax-M2.5' },
22
+ { name: 'MiniMax-M2.5-Highspeed', value: 'MiniMax-M2.5-highspeed' },
23
+ { name: 'MiniMax-M2.7', value: 'MiniMax-M2.7' },
24
+ { name: 'MiniMax-M2.7-Highspeed', value: 'MiniMax-M2.7-highspeed' },
25
+ ],
26
+ default: 'MiniMax-M2.7',
27
+ description: 'The model to use for generating the response',
28
+ },
29
+ {
30
+ displayName: 'Messages',
31
+ name: 'messages',
32
+ type: 'fixedCollection',
33
+ typeOptions: {
34
+ sortable: true,
35
+ multipleValues: true,
36
+ },
37
+ placeholder: 'Add Message',
38
+ default: { values: [{ content: '', role: 'user' }] },
39
+ options: [
40
+ {
41
+ displayName: 'Values',
42
+ name: 'values',
43
+ values: [
44
+ {
45
+ displayName: 'Prompt',
46
+ name: 'content',
47
+ type: 'string',
48
+ description: 'The content of the message to be sent',
49
+ default: '',
50
+ placeholder: 'e.g. Hello, how can you help me?',
51
+ typeOptions: {
52
+ rows: 2,
53
+ },
54
+ },
55
+ {
56
+ displayName: 'Role',
57
+ name: 'role',
58
+ type: 'options',
59
+ description: "Role in shaping the model's response, it tells the model how it should behave and interact with the user",
60
+ options: [
61
+ {
62
+ name: 'User',
63
+ value: 'user',
64
+ description: 'Send a message as a user and get a response from the model',
65
+ },
66
+ {
67
+ name: 'Assistant',
68
+ value: 'assistant',
69
+ description: 'Tell the model to adopt a specific tone or personality',
70
+ },
71
+ ],
72
+ default: 'user',
73
+ },
74
+ ],
75
+ },
76
+ ],
77
+ },
78
+ {
79
+ displayName: 'Simplify Output',
80
+ name: 'simplify',
81
+ type: 'boolean',
82
+ default: true,
83
+ description: 'Whether to return a simplified version of the response instead of the raw data',
84
+ },
85
+ {
86
+ displayName: 'Options',
87
+ name: 'options',
88
+ placeholder: 'Add Option',
89
+ type: 'collection',
90
+ default: {},
91
+ options: [
92
+ {
93
+ displayName: 'Hide Thinking',
94
+ name: 'hideThinking',
95
+ type: 'boolean',
96
+ default: true,
97
+ description: 'Whether to strip chain-of-thought reasoning from the response, returning only the final answer',
98
+ },
99
+ {
100
+ displayName: 'Maximum Number of Tokens',
101
+ name: 'maxTokens',
102
+ default: 1024,
103
+ description: 'The maximum number of tokens to generate in the completion',
104
+ type: 'number',
105
+ typeOptions: {
106
+ minValue: 1,
107
+ numberPrecision: 0,
108
+ },
109
+ },
110
+ {
111
+ displayName: 'Max Tool Calls Iterations',
112
+ name: 'maxToolsIterations',
113
+ type: 'number',
114
+ default: 15,
115
+ description: 'The maximum number of tool iteration cycles the LLM will run before stopping. A single iteration can contain multiple tool calls. Set to 0 for no limit.',
116
+ typeOptions: {
117
+ minValue: 0,
118
+ numberPrecision: 0,
119
+ },
120
+ },
121
+ {
122
+ displayName: 'Output Randomness (Temperature)',
123
+ name: 'temperature',
124
+ default: 0.7,
125
+ description: 'Controls the randomness of the output. Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.',
126
+ type: 'number',
127
+ typeOptions: {
128
+ minValue: 0,
129
+ maxValue: 1,
130
+ numberPrecision: 1,
131
+ },
132
+ },
133
+ {
134
+ displayName: 'Output Randomness (Top P)',
135
+ name: 'topP',
136
+ default: 0.95,
137
+ description: 'The maximum cumulative probability of tokens to consider when sampling',
138
+ type: 'number',
139
+ typeOptions: {
140
+ minValue: 0,
141
+ maxValue: 1,
142
+ numberPrecision: 2,
143
+ },
144
+ },
145
+ {
146
+ displayName: 'System Message',
147
+ name: 'system',
148
+ type: 'string',
149
+ default: '',
150
+ placeholder: 'e.g. You are a helpful assistant',
151
+ },
152
+ ],
153
+ },
154
+ ];
155
+ const displayOptions = {
156
+ show: {
157
+ operation: ['message'],
158
+ resource: ['text'],
159
+ },
160
+ };
161
+ exports.description = (0, n8n_workflow_1.updateDisplayOptions)(displayOptions, properties);
162
+ async function execute(i) {
163
+ const model = this.getNodeParameter('modelId', i);
164
+ const rawMessages = this.getNodeParameter('messages.values', i, []);
165
+ const simplify = this.getNodeParameter('simplify', i, true);
166
+ const options = this.getNodeParameter('options', i, {});
167
+ const hideThinking = options.hideThinking ?? true;
168
+ const messages = [];
169
+ if (options.system) {
170
+ messages.push({ role: 'system', content: options.system });
171
+ }
172
+ for (const msg of rawMessages) {
173
+ messages.push({ role: msg.role, content: msg.content });
174
+ }
175
+ const { tools, connectedTools } = await getToolDefinitions.call(this);
176
+ const body = {
177
+ model,
178
+ messages,
179
+ max_tokens: options.maxTokens ?? 1024,
180
+ };
181
+ if (hideThinking) {
182
+ body.reasoning_split = true;
183
+ }
184
+ if (options.temperature !== undefined)
185
+ body.temperature = options.temperature;
186
+ if (options.topP !== undefined)
187
+ body.top_p = options.topP;
188
+ if (tools.length > 0) {
189
+ body.tools = tools;
190
+ }
191
+ let response = (await transport_1.apiRequest.call(this, 'POST', '/chat/completions', {
192
+ body,
193
+ }));
194
+ const captureUsage = () => {
195
+ const usage = response.usage;
196
+ if (usage) {
197
+ (0, n8n_workflow_1.accumulateTokenUsage)(this, usage.prompt_tokens, usage.completion_tokens);
198
+ }
199
+ };
200
+ captureUsage();
201
+ const maxToolsIterations = this.getNodeParameter('options.maxToolsIterations', i, 15);
202
+ const abortSignal = this.getExecutionCancelSignal();
203
+ let currentIteration = 0;
204
+ while (true) {
205
+ if (abortSignal?.aborted) {
206
+ break;
207
+ }
208
+ const choice = response.choices?.[0];
209
+ if (choice?.finish_reason !== 'tool_calls' || !choice.message.tool_calls?.length) {
210
+ break;
211
+ }
212
+ if (maxToolsIterations > 0 && currentIteration >= maxToolsIterations) {
213
+ break;
214
+ }
215
+ const assistantMsg = {
216
+ role: 'assistant',
217
+ content: choice.message.content ?? '',
218
+ tool_calls: choice.message.tool_calls,
219
+ };
220
+ if (choice.message.reasoning_content) {
221
+ assistantMsg.reasoning_content = choice.message.reasoning_content;
222
+ }
223
+ messages.push(assistantMsg);
224
+ await handleToolUse.call(this, choice.message.tool_calls, messages, connectedTools);
225
+ currentIteration++;
226
+ response = (await transport_1.apiRequest.call(this, 'POST', '/chat/completions', {
227
+ body,
228
+ }));
229
+ captureUsage();
230
+ }
231
+ const finalMessage = response.choices?.[0]?.message;
232
+ if (simplify) {
233
+ const result = {
234
+ content: finalMessage?.content ?? '',
235
+ };
236
+ if (!hideThinking && finalMessage?.reasoning_content) {
237
+ result.reasoning_content = finalMessage.reasoning_content;
238
+ }
239
+ return [
240
+ {
241
+ json: result,
242
+ pairedItem: { item: i },
243
+ },
244
+ ];
245
+ }
246
+ return [
247
+ {
248
+ json: { ...response },
249
+ pairedItem: { item: i },
250
+ },
251
+ ];
252
+ }
253
+ async function getToolDefinitions() {
254
+ let connectedTools = [];
255
+ const nodeInputs = this.getNodeInputs();
256
+ if (nodeInputs.some((input) => input.type === 'ai_tool')) {
257
+ connectedTools = await (0, helpers_1.getConnectedTools)(this, true);
258
+ }
259
+ const tools = connectedTools.map((t) => ({
260
+ type: 'function',
261
+ function: {
262
+ name: t.name,
263
+ description: t.description,
264
+ parameters: (0, zod_to_json_schema_1.default)(t.schema),
265
+ },
266
+ }));
267
+ return { tools, connectedTools };
268
+ }
269
+ async function handleToolUse(toolCalls, messages, connectedTools) {
270
+ for (const toolCall of toolCalls) {
271
+ let toolResponse;
272
+ for (const connectedTool of connectedTools) {
273
+ if (connectedTool.name === toolCall.function.name) {
274
+ const args = (0, n8n_workflow_1.jsonParse)(toolCall.function.arguments);
275
+ toolResponse = await connectedTool.invoke(args);
276
+ }
277
+ }
278
+ messages.push({
279
+ role: 'tool',
280
+ content: typeof toolResponse === 'object'
281
+ ? JSON.stringify(toolResponse)
282
+ : (toolResponse ?? ''),
283
+ tool_call_id: toolCall.id,
284
+ });
285
+ }
286
+ }
287
+ //# sourceMappingURL=message.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message.operation.js","sourceRoot":"","sources":["../../../../../../nodes/vendors/MiniMax/actions/text/message.operation.ts"],"names":[],"mappings":";;;;;;AAyLA,0BAoHC;AAtSD,+CAAqF;AACrF,4EAAiD;AAEjD,4CAAmD;AAQnD,+CAA6C;AAE7C,MAAM,UAAU,GAAsB;IACrC;QACC,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,SAAS;QACf,OAAO,EAAE;YACR,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;YAC3C,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE;YAC/C,EAAE,IAAI,EAAE,wBAAwB,EAAE,KAAK,EAAE,wBAAwB,EAAE;YACnE,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE;YAC/C,EAAE,IAAI,EAAE,wBAAwB,EAAE,KAAK,EAAE,wBAAwB,EAAE;YACnE,EAAE,IAAI,EAAE,cAAc,EAAE,KAA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,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;gBACnD,MAAM,IAAI,GAAG,IAAA,wBAAS,EAAc,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;gBACjE,YAAY,GAAG,MAAM,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACjD,CAAC;QACF,CAAC;QAED,QAAQ,CAAC,IAAI,CAAC;YACb,IAAI,EAAE,MAAM;YACZ,OAAO,EACN,OAAO,YAAY,KAAK,QAAQ;gBAC/B,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC;gBAC9B,CAAC,CAAC,CAAE,YAAuB,IAAI,EAAE,CAAC;YACpC,YAAY,EAAE,QAAQ,CAAC,EAAE;SACzB,CAAC,CAAC;IACJ,CAAC;AACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { type INodeTypeDescription } from 'n8n-workflow';
2
+ export declare const versionDescription: INodeTypeDescription;
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.versionDescription = void 0;
37
+ const n8n_workflow_1 = require("n8n-workflow");
38
+ const audio = __importStar(require("./audio"));
39
+ const image = __importStar(require("./image"));
40
+ const text = __importStar(require("./text"));
41
+ const video = __importStar(require("./video"));
42
+ exports.versionDescription = {
43
+ displayName: 'MiniMax',
44
+ name: 'minimax',
45
+ icon: 'file:minimax.svg',
46
+ group: ['transform'],
47
+ version: 1,
48
+ subtitle: '={{ $parameter["operation"] + ": " + $parameter["resource"] }}',
49
+ description: 'Interact with MiniMax AI models',
50
+ defaults: {
51
+ name: 'MiniMax',
52
+ },
53
+ usableAsTool: true,
54
+ codex: {
55
+ alias: ['minimax', 'hailuo', 'LangChain', 'video', 'image', 'tts', 'speech'],
56
+ categories: ['AI'],
57
+ subcategories: {
58
+ AI: ['Agents', 'Miscellaneous', 'Root Nodes'],
59
+ },
60
+ resources: {
61
+ primaryDocumentation: [
62
+ {
63
+ url: 'https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-langchain.minimax/',
64
+ },
65
+ ],
66
+ },
67
+ },
68
+ inputs: `={{
69
+ (() => {
70
+ const resource = $parameter.resource;
71
+ const operation = $parameter.operation;
72
+ if (resource === 'text' && operation === 'message') {
73
+ return [{ type: 'main' }, { type: 'ai_tool', displayName: 'Tools' }];
74
+ }
75
+
76
+ return ['main'];
77
+ })()
78
+ }}`,
79
+ outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
80
+ credentials: [
81
+ {
82
+ name: 'minimaxApi',
83
+ required: true,
84
+ },
85
+ ],
86
+ properties: [
87
+ {
88
+ displayName: 'Resource',
89
+ name: 'resource',
90
+ type: 'options',
91
+ noDataExpression: true,
92
+ options: [
93
+ {
94
+ name: 'Audio',
95
+ value: 'audio',
96
+ },
97
+ {
98
+ name: 'Image',
99
+ value: 'image',
100
+ },
101
+ {
102
+ name: 'Text',
103
+ value: 'text',
104
+ },
105
+ {
106
+ name: 'Video',
107
+ value: 'video',
108
+ },
109
+ ],
110
+ default: 'text',
111
+ },
112
+ ...audio.description,
113
+ ...image.description,
114
+ ...text.description,
115
+ ...video.description,
116
+ ],
117
+ };
118
+ //# sourceMappingURL=versionDescription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"versionDescription.js","sourceRoot":"","sources":["../../../../../nodes/vendors/MiniMax/actions/versionDescription.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,+CAA8E;AAE9E,+CAAiC;AACjC,+CAAiC;AACjC,6CAA+B;AAC/B,+CAAiC;AAEpB,QAAA,kBAAkB,GAAyB;IACvD,WAAW,EAAE,SAAS;IACtB,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE,CAAC,WAAW,CAAC;IACpB,OAAO,EAAE,CAAC;IACV,QAAQ,EAAE,gEAAgE;IAC1E,WAAW,EAAE,iCAAiC;IAC9C,QAAQ,EAAE;QACT,IAAI,EAAE,SAAS;KACf;IACD,YAAY,EAAE,IAAI;IAClB,KAAK,EAAE;QACN,KAAK,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC;QAC5E,UAAU,EAAE,CAAC,IAAI,CAAC;QAClB,aAAa,EAAE;YACd,EAAE,EAAE,CAAC,QAAQ,EAAE,eAAe,EAAE,YAAY,CAAC;SAC7C;QACD,SAAS,EAAE;YACV,oBAAoB,EAAE;gBACrB;oBACC,GAAG,EAAE,iFAAiF;iBACtF;aACD;SACD;KACD;IACD,MAAM,EAAE;;;;;;;;;;IAUL;IACH,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;IACnC,WAAW,EAAE;QACZ;YACC,IAAI,EAAE,YAAY;YAClB,QAAQ,EAAE,IAAI;SACd;KACD;IACD,UAAU,EAAE;QACX;YACC,WAAW,EAAE,UAAU;YACvB,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,SAAS;YACf,gBAAgB,EAAE,IAAI;YACtB,OAAO,EAAE;gBACR;oBACC,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,OAAO;iBACd;gBACD;oBACC,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,OAAO;iBACd;gBACD;oBACC,IAAI,EAAE,MAAM;oBACZ,KAAK,EAAE,MAAM;iBACb;gBACD;oBACC,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,OAAO;iBACd;aACD;YACD,OAAO,EAAE,MAAM;SACf;QACD,GAAG,KAAK,CAAC,WAAW;QACpB,GAAG,KAAK,CAAC,WAAW;QACpB,GAAG,IAAI,CAAC,WAAW;QACnB,GAAG,KAAK,CAAC,WAAW;KACpB;CACD,CAAC"}
@@ -0,0 +1,29 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
2
+ export declare const description: {
3
+ displayOptions: import("n8n-workflow").IDisplayOptions;
4
+ displayName: string;
5
+ name: string;
6
+ type: import("n8n-workflow").NodePropertyTypes;
7
+ typeOptions?: import("n8n-workflow").INodePropertyTypeOptions;
8
+ default: import("n8n-workflow").NodeParameterValueType;
9
+ description?: string;
10
+ hint?: string;
11
+ builderHint?: import("n8n-workflow").IParameterBuilderHint;
12
+ disabledOptions?: import("n8n-workflow").IDisplayOptions;
13
+ options?: Array<import("n8n-workflow").INodePropertyOptions | INodeProperties | import("n8n-workflow").INodePropertyCollection>;
14
+ placeholder?: string;
15
+ isNodeSetting?: boolean;
16
+ noDataExpression?: boolean;
17
+ required?: boolean;
18
+ routing?: import("n8n-workflow").INodePropertyRouting;
19
+ credentialTypes?: Array<"extends:oAuth2Api" | "extends:oAuth1Api" | "has:authenticate" | "has:genericAuth">;
20
+ extractValue?: import("n8n-workflow").INodePropertyValueExtractor;
21
+ modes?: import("n8n-workflow").INodePropertyMode[];
22
+ requiresDataPath?: "single" | "multiple";
23
+ doNotInherit?: boolean;
24
+ validateType?: import("n8n-workflow").FieldType;
25
+ ignoreValidationDuringExecution?: boolean;
26
+ allowArbitraryValues?: boolean;
27
+ resolvableField?: boolean;
28
+ }[];
29
+ export declare function execute(this: IExecuteFunctions, itemIndex: number): Promise<INodeExecutionData[]>;