@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
@@ -147,6 +147,7 @@
147
147
  "className": "MinimaxApi",
148
148
  "sourcePath": "dist/credentials/MinimaxApi.credentials.js",
149
149
  "supportedNodes": [
150
+ "minimax",
150
151
  "lmChatMinimax"
151
152
  ]
152
153
  },
@@ -11,6 +11,10 @@
11
11
  "className": "GoogleGemini",
12
12
  "sourcePath": "dist/nodes/vendors/GoogleGemini/GoogleGemini.node.js"
13
13
  },
14
+ "minimax": {
15
+ "className": "MiniMax",
16
+ "sourcePath": "dist/nodes/vendors/MiniMax/MiniMax.node.js"
17
+ },
14
18
  "moonshot": {
15
19
  "className": "Moonshot",
16
20
  "sourcePath": "dist/nodes/vendors/Moonshot/Moonshot.node.js"
@@ -1 +1 @@
1
- 62b284a39cf522cd755b1ed76cf9c673dd47fa59db3d33426313a278737f6c47
1
+ aac645d87a848edfe7b9c37ae9e5d9e77751b3cd0d563d7a3dd139a256adae0a
@@ -65,6 +65,7 @@ import type { LcMemoryPostgresChatNode } from './nodes/n8n-nodes-langchain/memor
65
65
  import type { LcMemoryRedisChatNode } from './nodes/n8n-nodes-langchain/memoryRedisChat';
66
66
  import type { LcMemoryXataNode } from './nodes/n8n-nodes-langchain/memoryXata';
67
67
  import type { LcMicrosoftAgent365TriggerNode } from './nodes/n8n-nodes-langchain/microsoftAgent365Trigger';
68
+ import type { LcMinimaxNode } from './nodes/n8n-nodes-langchain/minimax';
68
69
  import type { LcModelSelectorNode } from './nodes/n8n-nodes-langchain/modelSelector';
69
70
  import type { LcMoonshotNode } from './nodes/n8n-nodes-langchain/moonshot';
70
71
  import type { LcOllamaNode } from './nodes/n8n-nodes-langchain/ollama';
@@ -161,6 +162,7 @@ export * from './nodes/n8n-nodes-langchain/memoryPostgresChat';
161
162
  export * from './nodes/n8n-nodes-langchain/memoryRedisChat';
162
163
  export * from './nodes/n8n-nodes-langchain/memoryXata';
163
164
  export * from './nodes/n8n-nodes-langchain/microsoftAgent365Trigger';
165
+ export * from './nodes/n8n-nodes-langchain/minimax';
164
166
  export * from './nodes/n8n-nodes-langchain/modelSelector';
165
167
  export * from './nodes/n8n-nodes-langchain/moonshot';
166
168
  export * from './nodes/n8n-nodes-langchain/ollama';
@@ -205,6 +207,7 @@ export type KnownNodeType =
205
207
  | '@n8n/n8n-nodes-langchain.alibabaCloud'
206
208
  | '@n8n/n8n-nodes-langchain.anthropic'
207
209
  | '@n8n/n8n-nodes-langchain.googleGemini'
210
+ | '@n8n/n8n-nodes-langchain.minimax'
208
211
  | '@n8n/n8n-nodes-langchain.moonshot'
209
212
  | '@n8n/n8n-nodes-langchain.ollama'
210
213
  | '@n8n/n8n-nodes-langchain.openAi'
@@ -356,6 +359,7 @@ export type AllNodeTypes =
356
359
  | LcMemoryRedisChatNode
357
360
  | LcMemoryXataNode
358
361
  | LcMicrosoftAgent365TriggerNode
362
+ | LcMinimaxNode
359
363
  | LcModelSelectorNode
360
364
  | LcMoonshotNode
361
365
  | LcOllamaNode
@@ -0,0 +1,12 @@
1
+ /**
2
+ * MiniMax Node Types
3
+ *
4
+ * Re-exports all version-specific types and provides combined union type.
5
+ */
6
+
7
+ import type { LcMinimaxV1Node } from './v1';
8
+
9
+ export * from './v1';
10
+
11
+ // Combined union type for all versions
12
+ export type LcMinimaxNode = LcMinimaxV1Node;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * MiniMax Node - Version 1 - Zod Schema Factory
3
+ * Exports a factory that unions all discriminator schemas.
4
+ *
5
+ * Schema helpers (z, expressionSchema, etc.) are passed as parameters
6
+ * by the schema-validator, not imported from external files.
7
+ *
8
+ * @generated - CommonJS JavaScript for runtime loading
9
+ */
10
+
11
+ const getAudioSchema = require('./resource_audio/index.schema');
12
+ const getImageSchema = require('./resource_image/index.schema');
13
+ const getTextSchema = require('./resource_text/index.schema');
14
+ const getVideoSchema = require('./resource_video/index.schema');
15
+
16
+ module.exports = function getSchema(helpers) {
17
+ const { parameters, z } = helpers;
18
+ // Apply discriminator default if not set
19
+ const effectiveParams = parameters.resource === undefined ? { ...parameters, resource: 'text' } : parameters;
20
+ return z.union([
21
+ getAudioSchema({ ...helpers, parameters: effectiveParams }),
22
+ getImageSchema({ ...helpers, parameters: effectiveParams }),
23
+ getTextSchema({ ...helpers, parameters: effectiveParams }),
24
+ getVideoSchema({ ...helpers, parameters: effectiveParams }),
25
+ ]);
26
+ };
@@ -0,0 +1,21 @@
1
+ /**
2
+ * MiniMax Node - Version 1
3
+ * Re-exports all discriminator combinations.
4
+ */
5
+
6
+ import type { LcMinimaxV1AudioNode } from './resource_audio';
7
+ import type { LcMinimaxV1ImageNode } from './resource_image';
8
+ import type { LcMinimaxV1TextNode } from './resource_text';
9
+ import type { LcMinimaxV1VideoNode } from './resource_video';
10
+
11
+ export * from './resource_audio';
12
+ export * from './resource_image';
13
+ export * from './resource_text';
14
+ export * from './resource_video';
15
+
16
+ export type LcMinimaxV1Node =
17
+ | LcMinimaxV1AudioNode
18
+ | LcMinimaxV1ImageNode
19
+ | LcMinimaxV1TextNode
20
+ | LcMinimaxV1VideoNode
21
+ ;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * MiniMax - Audio Resource - Zod Schema Factory
3
+ * Exports a factory that unions all operation schemas for this resource.
4
+ *
5
+ * Schema helpers (z, expressionSchema, etc.) are passed as parameters
6
+ * by the schema-validator, not imported from external files.
7
+ *
8
+ * @generated - CommonJS JavaScript for runtime loading
9
+ */
10
+
11
+ const getTextToSpeechSchema = require('./operation_text_to_speech.schema');
12
+
13
+ module.exports = function getSchema(helpers) {
14
+ const { parameters, z } = helpers;
15
+ // Apply operation default if not set
16
+ const effectiveParams = parameters.operation === undefined ? { ...parameters, operation: 'textToSpeech' } : parameters;
17
+ return getTextToSpeechSchema({ ...helpers, parameters: effectiveParams });
18
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * MiniMax - Audio Resource
3
+ * Re-exports all operation types for this resource.
4
+ */
5
+
6
+ import type { LcMinimaxV1AudioTextToSpeechNode } from './operation_text_to_speech';
7
+
8
+ export * from './operation_text_to_speech';
9
+
10
+ export type LcMinimaxV1AudioNode = LcMinimaxV1AudioTextToSpeechNode;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * MiniMax Node - Version 1 - Zod Schema
3
+ * Discriminator: resource=audio, operation=textToSpeech
4
+ *
5
+ * Use .parse() for strict validation or .safeParse() for error handling.
6
+ *
7
+ * Schema helpers (z, expressionSchema, etc.) are passed as parameters
8
+ * by the schema-validator, not imported from external files.
9
+ *
10
+ * @generated - CommonJS JavaScript for runtime loading
11
+ */
12
+
13
+ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrExpression, numberOrExpression, booleanOrExpression, resourceLocatorValueSchema, resourceMapperValueSchema, filterValueSchema, assignmentCollectionValueSchema, iDataObjectSchema, toolInstanceSchema }) {
14
+
15
+ // Static subnode schema
16
+ const subnodesSchema = z.object({
17
+ tools: z.array(toolInstanceSchema).optional(),
18
+ }).strict();
19
+
20
+ return z.object({
21
+ parameters: z.object({
22
+ resource: z.literal('audio'),
23
+ operation: z.literal('textToSpeech').default('textToSpeech'),
24
+ modelId: z.union([z.literal('speech-02-hd'), z.literal('speech-02-turbo'), z.literal('speech-2.6-hd'), z.literal('speech-2.6-turbo'), z.literal('speech-2.8-hd'), z.literal('speech-2.8-turbo'), expressionSchema]).optional(),
25
+ text: stringOrExpression.optional(),
26
+ voiceId: stringOrExpression.optional(),
27
+ downloadAudio: booleanOrExpression.optional(),
28
+ options: z.object({ audioFormat: z.union([z.literal('mp3'), z.literal('pcm'), z.literal('flac'), z.literal('wav'), expressionSchema]).optional(), emotion: z.union([z.literal('angry'), z.literal('calm'), z.literal('disgusted'), z.literal('fearful'), z.literal('happy'), z.literal('sad'), z.literal('surprised'), expressionSchema]).optional(), languageBoost: z.union([z.literal('Arabic'), z.literal('auto'), z.literal('Chinese'), z.literal('English'), z.literal('French'), z.literal('German'), z.literal('Indonesian'), z.literal('Italian'), z.literal('Japanese'), z.literal('Korean'), z.literal('Portuguese'), z.literal('Russian'), z.literal('Spanish'), z.literal('Thai'), z.literal('Turkish'), z.literal('Vietnamese'), expressionSchema]).optional(), pitch: numberOrExpression.optional(), speed: numberOrExpression.optional(), volume: numberOrExpression.optional() }).optional(),
29
+ }).optional(),
30
+ subnodes: subnodesSchema.optional(),
31
+ });
32
+ };
@@ -0,0 +1,75 @@
1
+ /**
2
+ * MiniMax Node - Version 1
3
+ * Discriminator: resource=audio, operation=textToSpeech
4
+ */
5
+
6
+
7
+ interface Credentials {
8
+ minimaxApi: CredentialReference;
9
+ }
10
+
11
+ /** Generate speech audio from text input */
12
+ export type LcMinimaxV1AudioTextToSpeechParams = {
13
+ resource: 'audio';
14
+ operation: 'textToSpeech';
15
+ /**
16
+ * The speech synthesis model to use
17
+ * @default speech-2.8-hd
18
+ */
19
+ modelId?: 'speech-02-hd' | 'speech-02-turbo' | 'speech-2.6-hd' | 'speech-2.6-turbo' | 'speech-2.8-hd' | 'speech-2.8-turbo' | Expression<string>;
20
+ /**
21
+ * The text to convert to speech (max 10,000 characters)
22
+ */
23
+ text?: string | Expression<string> | PlaceholderValue;
24
+ /**
25
+ * Voice ID to use for speech synthesis. Browse available voices in the &lt;a href="https://platform.minimax.io/docs/faq/system-voice-id"&gt;MiniMax documentation&lt;/a&gt;.
26
+ * @default English_Graceful_Lady
27
+ */
28
+ voiceId?: string | Expression<string> | PlaceholderValue;
29
+ /**
30
+ * Whether to download the generated audio as binary data. When disabled, only the audio URL is returned.
31
+ * @default true
32
+ */
33
+ downloadAudio?: boolean | Expression<boolean>;
34
+ /**
35
+ * Options
36
+ * @default {}
37
+ */
38
+ options?: {
39
+ /** Output audio format. WAV is only supported in non-streaming mode.
40
+ * @default mp3
41
+ */
42
+ audioFormat?: 'mp3' | 'pcm' | 'flac' | 'wav' | Expression<string>;
43
+ /** Emotion for synthesized speech. By default the model auto-selects the most natural emotion.
44
+ * @default calm
45
+ */
46
+ emotion?: 'angry' | 'calm' | 'disgusted' | 'fearful' | 'happy' | 'sad' | 'surprised' | Expression<string>;
47
+ /** Enhance recognition for a specific language
48
+ * @default auto
49
+ */
50
+ languageBoost?: 'Arabic' | 'auto' | 'Chinese' | 'English' | 'French' | 'German' | 'Indonesian' | 'Italian' | 'Japanese' | 'Korean' | 'Portuguese' | 'Russian' | 'Spanish' | 'Thai' | 'Turkish' | 'Vietnamese' | Expression<string>;
51
+ /** Speech pitch adjustment (-12 to 12, 0 = original pitch)
52
+ * @default 0
53
+ */
54
+ pitch?: number | Expression<number>;
55
+ /** Speech speed (0.5-2, higher = faster)
56
+ * @default 1
57
+ */
58
+ speed?: number | Expression<number>;
59
+ /** Speech volume (0.1-10, higher = louder)
60
+ * @default 1
61
+ */
62
+ volume?: number | Expression<number>;
63
+ };
64
+ };
65
+
66
+ export interface LcMinimaxV1AudioTextToSpeechSubnodeConfig {
67
+ tools?: ToolInstance[];
68
+ }
69
+
70
+ export type LcMinimaxV1AudioTextToSpeechNode = {
71
+ type: '@n8n/n8n-nodes-langchain.minimax';
72
+ version: 1;
73
+ credentials?: Credentials;
74
+ config: NodeConfig<LcMinimaxV1AudioTextToSpeechParams> & { subnodes?: LcMinimaxV1AudioTextToSpeechSubnodeConfig };
75
+ };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * MiniMax - Image Resource - Zod Schema Factory
3
+ * Exports a factory that unions all operation schemas for this resource.
4
+ *
5
+ * Schema helpers (z, expressionSchema, etc.) are passed as parameters
6
+ * by the schema-validator, not imported from external files.
7
+ *
8
+ * @generated - CommonJS JavaScript for runtime loading
9
+ */
10
+
11
+ const getGenerateSchema = require('./operation_generate.schema');
12
+
13
+ module.exports = function getSchema(helpers) {
14
+ const { parameters, z } = helpers;
15
+ // Apply operation default if not set
16
+ const effectiveParams = parameters.operation === undefined ? { ...parameters, operation: 'textToSpeech' } : parameters;
17
+ return getGenerateSchema({ ...helpers, parameters: effectiveParams });
18
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * MiniMax - Image Resource
3
+ * Re-exports all operation types for this resource.
4
+ */
5
+
6
+ import type { LcMinimaxV1ImageGenerateNode } from './operation_generate';
7
+
8
+ export * from './operation_generate';
9
+
10
+ export type LcMinimaxV1ImageNode = LcMinimaxV1ImageGenerateNode;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * MiniMax Node - Version 1 - Zod Schema
3
+ * Discriminator: resource=image, operation=generate
4
+ *
5
+ * Use .parse() for strict validation or .safeParse() for error handling.
6
+ *
7
+ * Schema helpers (z, expressionSchema, etc.) are passed as parameters
8
+ * by the schema-validator, not imported from external files.
9
+ *
10
+ * @generated - CommonJS JavaScript for runtime loading
11
+ */
12
+
13
+ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrExpression, numberOrExpression, booleanOrExpression, resourceLocatorValueSchema, resourceMapperValueSchema, filterValueSchema, assignmentCollectionValueSchema, iDataObjectSchema, toolInstanceSchema }) {
14
+
15
+ // Static subnode schema
16
+ const subnodesSchema = z.object({
17
+ tools: z.array(toolInstanceSchema).optional(),
18
+ }).strict();
19
+
20
+ return z.object({
21
+ parameters: z.object({
22
+ resource: z.literal('image'),
23
+ operation: z.literal('generate'),
24
+ modelId: z.union([z.literal('image-01'), expressionSchema]).optional(),
25
+ prompt: stringOrExpression.optional(),
26
+ aspectRatio: z.union([z.literal('1:1'), z.literal('16:9'), z.literal('2:3'), z.literal('21:9'), z.literal('3:2'), z.literal('3:4'), z.literal('4:3'), z.literal('9:16'), expressionSchema]).optional(),
27
+ numberOfImages: numberOrExpression.optional(),
28
+ downloadImage: booleanOrExpression.optional(),
29
+ options: z.object({ promptOptimizer: booleanOrExpression.optional(), seed: numberOrExpression.optional() }).optional(),
30
+ }).optional(),
31
+ subnodes: subnodesSchema.optional(),
32
+ });
33
+ };
@@ -0,0 +1,64 @@
1
+ /**
2
+ * MiniMax Node - Version 1
3
+ * Discriminator: resource=image, operation=generate
4
+ */
5
+
6
+
7
+ interface Credentials {
8
+ minimaxApi: CredentialReference;
9
+ }
10
+
11
+ /** Create an image from a text prompt */
12
+ export type LcMinimaxV1ImageGenerateParams = {
13
+ resource: 'image';
14
+ operation: 'generate';
15
+ /**
16
+ * The model to use for image generation
17
+ * @default image-01
18
+ */
19
+ modelId?: 'image-01' | Expression<string>;
20
+ /**
21
+ * Text description of the image to generate (max 1500 characters)
22
+ */
23
+ prompt?: string | Expression<string> | PlaceholderValue;
24
+ /**
25
+ * Aspect ratio of the generated image
26
+ * @default 1:1
27
+ */
28
+ aspectRatio?: '1:1' | '16:9' | '2:3' | '21:9' | '3:2' | '3:4' | '4:3' | '9:16' | Expression<string>;
29
+ /**
30
+ * Number of images to generate per request (1-9)
31
+ * @default 1
32
+ */
33
+ numberOfImages?: number | Expression<number>;
34
+ /**
35
+ * Whether to download the generated image as binary data. When disabled, only the image URL is returned.
36
+ * @default true
37
+ */
38
+ downloadImage?: boolean | Expression<boolean>;
39
+ /**
40
+ * Options
41
+ * @default {}
42
+ */
43
+ options?: {
44
+ /** Whether to automatically optimize the prompt for better results
45
+ * @default false
46
+ */
47
+ promptOptimizer?: boolean | Expression<boolean>;
48
+ /** Random seed for reproducible outputs. Using the same seed and parameters produces the same image.
49
+ * @default 0
50
+ */
51
+ seed?: number | Expression<number>;
52
+ };
53
+ };
54
+
55
+ export interface LcMinimaxV1ImageGenerateSubnodeConfig {
56
+ tools?: ToolInstance[];
57
+ }
58
+
59
+ export type LcMinimaxV1ImageGenerateNode = {
60
+ type: '@n8n/n8n-nodes-langchain.minimax';
61
+ version: 1;
62
+ credentials?: Credentials;
63
+ config: NodeConfig<LcMinimaxV1ImageGenerateParams> & { subnodes?: LcMinimaxV1ImageGenerateSubnodeConfig };
64
+ };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * MiniMax - Text Resource - Zod Schema Factory
3
+ * Exports a factory that unions all operation schemas for this resource.
4
+ *
5
+ * Schema helpers (z, expressionSchema, etc.) are passed as parameters
6
+ * by the schema-validator, not imported from external files.
7
+ *
8
+ * @generated - CommonJS JavaScript for runtime loading
9
+ */
10
+
11
+ const getMessageSchema = require('./operation_message.schema');
12
+
13
+ module.exports = function getSchema(helpers) {
14
+ const { parameters, z } = helpers;
15
+ // Apply operation default if not set
16
+ const effectiveParams = parameters.operation === undefined ? { ...parameters, operation: 'textToSpeech' } : parameters;
17
+ return getMessageSchema({ ...helpers, parameters: effectiveParams });
18
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * MiniMax - Text Resource
3
+ * Re-exports all operation types for this resource.
4
+ */
5
+
6
+ import type { LcMinimaxV1TextMessageNode } from './operation_message';
7
+
8
+ export * from './operation_message';
9
+
10
+ export type LcMinimaxV1TextNode = LcMinimaxV1TextMessageNode;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * MiniMax Node - Version 1 - Zod Schema
3
+ * Discriminator: resource=text, operation=message
4
+ *
5
+ * Use .parse() for strict validation or .safeParse() for error handling.
6
+ *
7
+ * Schema helpers (z, expressionSchema, etc.) are passed as parameters
8
+ * by the schema-validator, not imported from external files.
9
+ *
10
+ * @generated - CommonJS JavaScript for runtime loading
11
+ */
12
+
13
+ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrExpression, numberOrExpression, booleanOrExpression, resourceLocatorValueSchema, resourceMapperValueSchema, filterValueSchema, assignmentCollectionValueSchema, iDataObjectSchema, toolInstanceSchema }) {
14
+
15
+ // Static subnode schema
16
+ const subnodesSchema = z.object({
17
+ tools: z.array(toolInstanceSchema).optional(),
18
+ }).strict();
19
+
20
+ return z.object({
21
+ parameters: z.object({
22
+ resource: z.literal('text').default('text'),
23
+ operation: z.literal('message'),
24
+ modelId: z.union([z.literal('MiniMax-M2'), z.literal('MiniMax-M2.1'), z.literal('MiniMax-M2.1-highspeed'), z.literal('MiniMax-M2.5'), z.literal('MiniMax-M2.5-highspeed'), z.literal('MiniMax-M2.7'), z.literal('MiniMax-M2.7-highspeed'), expressionSchema]).optional(),
25
+ messages: z.object({ values: z.array(z.object({ content: stringOrExpression.optional(), role: z.union([z.literal('user'), z.literal('assistant'), expressionSchema]).optional() })).optional() }).optional(),
26
+ simplify: booleanOrExpression.optional(),
27
+ options: z.object({ hideThinking: booleanOrExpression.optional(), maxTokens: numberOrExpression.optional(), maxToolsIterations: numberOrExpression.optional(), temperature: numberOrExpression.optional(), topP: numberOrExpression.optional(), system: stringOrExpression.optional() }).optional(),
28
+ }).optional(),
29
+ subnodes: subnodesSchema.optional(),
30
+ });
31
+ };
@@ -0,0 +1,82 @@
1
+ /**
2
+ * MiniMax Node - Version 1
3
+ * Discriminator: resource=text, operation=message
4
+ */
5
+
6
+
7
+ interface Credentials {
8
+ minimaxApi: CredentialReference;
9
+ }
10
+
11
+ /** Send a message and get a response from a MiniMax model */
12
+ export type LcMinimaxV1TextMessageParams = {
13
+ resource: 'text';
14
+ operation: 'message';
15
+ /**
16
+ * The model to use for generating the response
17
+ * @default MiniMax-M2.7
18
+ */
19
+ modelId?: 'MiniMax-M2' | 'MiniMax-M2.1' | 'MiniMax-M2.1-highspeed' | 'MiniMax-M2.5' | 'MiniMax-M2.5-highspeed' | 'MiniMax-M2.7' | 'MiniMax-M2.7-highspeed' | Expression<string>;
20
+ /**
21
+ * Messages
22
+ * @default {"values":[{"content":"","role":"user"}]}
23
+ */
24
+ messages?: {
25
+ /** Values
26
+ */
27
+ values?: Array<{
28
+ /** The content of the message to be sent
29
+ */
30
+ content?: string | Expression<string> | PlaceholderValue;
31
+ /** Role in shaping the model's response, it tells the model how it should behave and interact with the user
32
+ * @default user
33
+ */
34
+ role?: 'user' | 'assistant' | Expression<string>;
35
+ }>;
36
+ };
37
+ /**
38
+ * Whether to return a simplified version of the response instead of the raw data
39
+ * @default true
40
+ */
41
+ simplify?: boolean | Expression<boolean>;
42
+ /**
43
+ * Options
44
+ * @default {}
45
+ */
46
+ options?: {
47
+ /** Whether to strip chain-of-thought reasoning from the response, returning only the final answer
48
+ * @default true
49
+ */
50
+ hideThinking?: boolean | Expression<boolean>;
51
+ /** The maximum number of tokens to generate in the completion
52
+ * @default 1024
53
+ */
54
+ maxTokens?: number | Expression<number>;
55
+ /** 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.
56
+ * @default 15
57
+ */
58
+ maxToolsIterations?: number | Expression<number>;
59
+ /** Controls the randomness of the output. Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.
60
+ * @default 0.7
61
+ */
62
+ temperature?: number | Expression<number>;
63
+ /** The maximum cumulative probability of tokens to consider when sampling
64
+ * @default 0.95
65
+ */
66
+ topP?: number | Expression<number>;
67
+ /** System Message
68
+ */
69
+ system?: string | Expression<string> | PlaceholderValue;
70
+ };
71
+ };
72
+
73
+ export interface LcMinimaxV1TextMessageSubnodeConfig {
74
+ tools?: ToolInstance[];
75
+ }
76
+
77
+ export type LcMinimaxV1TextMessageNode = {
78
+ type: '@n8n/n8n-nodes-langchain.minimax';
79
+ version: 1;
80
+ credentials?: Credentials;
81
+ config: NodeConfig<LcMinimaxV1TextMessageParams> & { subnodes?: LcMinimaxV1TextMessageSubnodeConfig };
82
+ };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * MiniMax - Video Resource - Zod Schema Factory
3
+ * Exports a factory that unions all operation schemas for this resource.
4
+ *
5
+ * Schema helpers (z, expressionSchema, etc.) are passed as parameters
6
+ * by the schema-validator, not imported from external files.
7
+ *
8
+ * @generated - CommonJS JavaScript for runtime loading
9
+ */
10
+
11
+ const getImageToVideoSchema = require('./operation_image_to_video.schema');
12
+ const getTextToVideoSchema = require('./operation_text_to_video.schema');
13
+
14
+ module.exports = function getSchema(helpers) {
15
+ const { parameters, z } = helpers;
16
+ // Apply operation default if not set
17
+ const effectiveParams = parameters.operation === undefined ? { ...parameters, operation: 'textToSpeech' } : parameters;
18
+ return z.union([
19
+ getImageToVideoSchema({ ...helpers, parameters: effectiveParams }),
20
+ getTextToVideoSchema({ ...helpers, parameters: effectiveParams }),
21
+ ]);
22
+ };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * MiniMax - Video Resource
3
+ * Re-exports all operation types for this resource.
4
+ */
5
+
6
+ import type { LcMinimaxV1VideoImageToVideoNode } from './operation_image_to_video';
7
+ import type { LcMinimaxV1VideoTextToVideoNode } from './operation_text_to_video';
8
+
9
+ export * from './operation_image_to_video';
10
+ export * from './operation_text_to_video';
11
+
12
+ export type LcMinimaxV1VideoNode =
13
+ | LcMinimaxV1VideoImageToVideoNode
14
+ | LcMinimaxV1VideoTextToVideoNode
15
+ ;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * MiniMax Node - Version 1 - Zod Schema
3
+ * Discriminator: resource=video, operation=imageToVideo
4
+ *
5
+ * Use .parse() for strict validation or .safeParse() for error handling.
6
+ *
7
+ * Schema helpers (z, expressionSchema, etc.) are passed as parameters
8
+ * by the schema-validator, not imported from external files.
9
+ *
10
+ * @generated - CommonJS JavaScript for runtime loading
11
+ */
12
+
13
+ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrExpression, numberOrExpression, booleanOrExpression, resourceLocatorValueSchema, resourceMapperValueSchema, filterValueSchema, assignmentCollectionValueSchema, iDataObjectSchema, resolveSchema, toolInstanceSchema }) {
14
+
15
+ // Static subnode schema
16
+ const subnodesSchema = z.object({
17
+ tools: z.array(toolInstanceSchema).optional(),
18
+ }).strict();
19
+
20
+ return z.object({
21
+ parameters: z.object({
22
+ resource: z.literal('video'),
23
+ operation: z.literal('imageToVideo'),
24
+ modelId: z.union([z.literal('I2V-01'), z.literal('I2V-01-Director'), z.literal('I2V-01-live'), z.literal('MiniMax-Hailuo-02'), z.literal('MiniMax-Hailuo-2.3'), z.literal('MiniMax-Hailuo-2.3-Fast'), expressionSchema]).optional(),
25
+ imageInputType: z.union([z.literal('url'), z.literal('binary'), expressionSchema]).optional(),
26
+ imageUrl: resolveSchema({ parameters, schema: stringOrExpression, required: false, displayOptions: {"show":{"imageInputType":["url"]}}, defaults: {"imageInputType":"url"} }),
27
+ binaryPropertyName: resolveSchema({ parameters, schema: stringOrExpression, required: false, displayOptions: {"show":{"imageInputType":["binary"]}}, defaults: {"imageInputType":"url"} }),
28
+ prompt: stringOrExpression.optional(),
29
+ duration: z.union([z.literal(6), z.literal(10), expressionSchema]).optional(),
30
+ resolution: z.union([z.literal('512P'), z.literal('720P'), z.literal('768P'), z.literal('1080P'), expressionSchema]).optional(),
31
+ downloadVideo: booleanOrExpression.optional(),
32
+ options: z.object({ promptOptimizer: booleanOrExpression.optional(), lastFrameInputType: z.union([z.literal('none'), z.literal('url'), z.literal('binary'), expressionSchema]).optional(), lastFrameImageUrl: stringOrExpression.optional(), lastFrameBinaryPropertyName: stringOrExpression.optional(), subjectReferenceInputType: z.union([z.literal('none'), z.literal('url'), z.literal('binary'), expressionSchema]).optional(), subjectReferenceImageUrl: stringOrExpression.optional(), subjectReferenceBinaryPropertyName: stringOrExpression.optional() }).optional(),
33
+ }).optional(),
34
+ subnodes: subnodesSchema.optional(),
35
+ });
36
+ };