n8n-nodes-userapi 0.1.8 → 0.1.10

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.
package/README.md CHANGED
@@ -14,14 +14,14 @@ Official resources:
14
14
  ## Features
15
15
 
16
16
  - Supports all currently available UserApi.Ai methods in this node package.
17
- - ✨ [Imagine](https://userapi.ai/doc#imagine)
18
- - ⬆️ [Upscale](https://userapi.ai/doc#upscale)
19
- - 🔄 [Variation](https://userapi.ai/doc#variation)
20
- - 🔀 [Blend](https://userapi.ai/doc#blend)
21
- - 📝 [Describe](https://userapi.ai/doc#describe)
22
- - 🎬 [Animate](https://userapi.ai/doc#animate)
23
- - 🖌️ [Inpaint](https://userapi.ai/doc#inpaint)
24
- - And more: [See full docs](https://userapi.ai/doc)
17
+ - ✨ [Imagine](https://userapi.ai/docs#imagine)
18
+ - ⬆️ [Upscale](https://userapi.ai/docs#upscale)
19
+ - 🔄 [Variation](https://userapi.ai/docs#variation)
20
+ - 🔀 [Blend](https://userapi.ai/docs#blend)
21
+ - 📝 [Describe](https://userapi.ai/docs#describe)
22
+ - 🎬 [Animate](https://userapi.ai/docs#animate)
23
+ - 🖌️ [Inpaint](https://userapi.ai/docs#inpaint)
24
+ - And more: [See full docs](https://userapi.ai/docs)
25
25
 
26
26
  ## Installation
27
27
 
@@ -2,6 +2,7 @@ import type { ICredentialType, INodeProperties, IAuthenticateGeneric, ICredentia
2
2
  export declare class UserApi implements ICredentialType {
3
3
  name: string;
4
4
  displayName: string;
5
+ icon: "file:userapi.svg";
5
6
  documentationUrl: string;
6
7
  authenticate: IAuthenticateGeneric;
7
8
  properties: INodeProperties[];
@@ -5,6 +5,7 @@ class UserApi {
5
5
  constructor() {
6
6
  this.name = 'userApi';
7
7
  this.displayName = 'UserAPI';
8
+ this.icon = 'file:userapi.svg';
8
9
  this.documentationUrl = 'https://userapi.ai/first-steps';
9
10
  this.authenticate = {
10
11
  type: 'generic',
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <svg version="1.0" width="248.000000pt" height="248.000000pt" viewBox="0 0 248.000000 248.000000" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg">
3
+ <g transform="translate(0.000000,248.000000) scale(0.100000,-0.100000)" fill="#000000" stroke="none">
4
+ <path d="M1967 1973 c-15 -2 -43 -20 -62 -39 -91 -90 -30 -236 99 -236 90 0 141 49 141 137 0 97 -74 155 -178 138z" style="paint-order: fill; fill: rgb(236, 72, 153);"/>
5
+ <path d="M 1065 1585 C 989 1568 946 1550 893 1511 C 848 1478 785 1393 775 1350 C 769 1326 773 1323 857 1296 C 905 1280 950 1265 956 1263 C 962 1261 970 1272 973 1289 C 982 1334 1047 1396 1100 1410 C 1193 1435 1308 1404 1342 1345 C 1352 1327 1361 1288 1362 1255 L 1365 1195 L 1180 1189 C 986 1184 920 1172 859 1134 C 771 1079 731 1006 731 895 C 730 714 865 600 1081 600 C 1210 600 1293 638 1345 721 C 1374 767 1388 764 1415 707 C 1446 643 1482 627 1603 626 L 1705 625 L 1708 713 L 1711 800 L 1661 800 C 1580 800 1580 800 1580 1038 C 1580 1152 1575 1274 1569 1310 C 1558 1380 1522 1454 1481 1494 C 1436 1537 1341.502 1588.421 1258.502 1599.421 C 1162.502 1612.421 1141 1602 1065 1585 Z M 1363 990 C 1357 914 1349 893 1304 848 C 1200 742 1008 748 954 858 C 922 925 964 1000 1045 1019 C 1067 1024 1148 1028 1225 1027 L 1365 1025 L 1363 990 Z" style="paint-order: fill; fill: rgb(236, 72, 153);"/>
6
+ <path d="M1902 1098 l3 -473 105 0 105 0 0 470 0 470 -108 3 -107 3 2 -473z" style="paint-order: fill; fill: rgb(236, 72, 153);"/>
7
+ <path d="M 292 913 C 241 888 205.626 845 201.626 773 C 197.626 719 211 704 231 674 C 276 607 381 579 450 615 C 549 666 568 816 484 889 C 465 906 445 918 440 915 C 435 912 429 914 425 920 C 415 936 329 931 292 913 Z" style="paint-order: fill; fill: rgb(236, 72, 153);"/>
8
+ </g>
9
+ </svg>
@@ -8,26 +8,26 @@ const webhookTypeOptions = [
8
8
  ];
9
9
  const API_BASE_URL = 'https://api.userapi.ai';
10
10
  const operationOptions = [
11
- { name: 'Imagine', value: 'imagine', description: 'POST /midjourney/v2/imagine' },
12
- { name: 'Imagine Instant', value: 'imagineInstant', description: 'POST /midjourney/v2/imagine-instant' },
13
- { name: 'Describe', value: 'describe', description: 'POST /midjourney/v2/describe' },
14
- { name: 'Info', value: 'info', description: 'POST /midjourney/v2/info' },
15
- { name: 'Upscale', value: 'upscale', description: 'POST /midjourney/v2/upscale' },
16
- { name: 'Pan', value: 'pan', description: 'POST /midjourney/v2/pan' },
17
- { name: 'Variation', value: 'variation', description: 'POST /midjourney/v2/variation' },
18
- { name: 'Vary Subtle', value: 'varySubtle', description: 'POST /midjourney/v2/vary-subtle' },
19
- { name: 'Vary Strong', value: 'varyStrong', description: 'POST /midjourney/v2/vary-strong' },
20
- { name: 'Reroll', value: 'reroll', description: 'POST /midjourney/v2/reroll' },
21
- { name: 'Upsample', value: 'upsample', description: 'POST /midjourney/v2/upsample' },
22
- { name: 'Animate', value: 'animate', description: 'POST /midjourney/v2/animate' },
23
- { name: 'Inpaint', value: 'inpaint', description: 'POST /midjourney/v2/inpaint' },
24
- { name: 'Zoom', value: 'zoom', description: 'POST /midjourney/v2/zoom' },
25
- { name: 'Blend', value: 'blend', description: 'POST /midjourney/v2/blend' },
26
- { name: 'Toggle Remix Mode', value: 'prefer', description: 'POST /midjourney/v2/prefer' },
27
- { name: 'Speed', value: 'speed', description: 'POST /midjourney/v2/speed' },
28
- { name: 'Upload', value: 'upload', description: 'POST /midjourney/v2/upload' },
29
- { name: 'Seed', value: 'seed', description: 'POST /midjourney/v2/seed' },
30
- { name: 'Status', value: 'status', description: 'GET /midjourney/v2/status?hash=...' },
11
+ { name: 'Imagine', value: 'imagine', description: 'Generate four images from a text prompt' },
12
+ { name: 'Imagine Instant', value: 'imagineInstant', description: 'Generate images from a prompt and pick the result in one call' },
13
+ { name: 'Describe', value: 'describe', description: 'Get prompt suggestions that describe an image' },
14
+ { name: 'Info', value: 'info', description: 'Get the subscription and usage details of a Midjourney account' },
15
+ { name: 'Upscale', value: 'upscale', description: 'Upscale one image from a grid' },
16
+ { name: 'Pan', value: 'pan', description: 'Extend an image in one direction' },
17
+ { name: 'Variation', value: 'variation', description: 'Create variations of one image from a grid' },
18
+ { name: 'Vary Subtle', value: 'varySubtle', description: 'Create subtle variations of an upscaled image' },
19
+ { name: 'Vary Strong', value: 'varyStrong', description: 'Create strong variations of an upscaled image' },
20
+ { name: 'Reroll', value: 'reroll', description: 'Run the same prompt again' },
21
+ { name: 'Upsample', value: 'upsample', description: 'Upscale an image with a chosen upscaler' },
22
+ { name: 'Animate', value: 'animate', description: 'Turn an image into a short video' },
23
+ { name: 'Inpaint', value: 'inpaint', description: 'Redraw a masked region of an image' },
24
+ { name: 'Zoom', value: 'zoom', description: 'Zoom out of an image' },
25
+ { name: 'Blend', value: 'blend', description: 'Blend 2 to 5 images into one' },
26
+ { name: 'Toggle Remix Mode', value: 'prefer', description: 'Turn Remix mode on or off for an account' },
27
+ { name: 'Speed', value: 'speed', description: 'Switch an account between Relax, Fast and Turbo modes' },
28
+ { name: 'Upload', value: 'upload', description: 'Upload an image to get a Midjourney link for it' },
29
+ { name: 'Seed', value: 'seed', description: 'Get the seed of a generation' },
30
+ { name: 'Status', value: 'status', description: 'Get the status and result of a task' },
31
31
  ];
32
32
  function withDisplay(operation, properties) {
33
33
  return properties.map((p) => {
@@ -75,8 +75,8 @@ class UserApi {
75
75
  subtitle: '={{$parameter["operation"]}}',
76
76
  description: 'UserApi.Ai - API layer to Midjourney (unofficial)',
77
77
  defaults: { name: 'UserAPI' },
78
- inputs: ['main'],
79
- outputs: ['main'],
78
+ inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
79
+ outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
80
80
  credentials: [{ name: 'userApi', required: true }],
81
81
  properties: [
82
82
  { displayName: 'Operation', name: 'operation', type: 'options', noDataExpression: true, default: 'imagine', options: operationOptions },
@@ -91,7 +91,7 @@ class UserApi {
91
91
  default: '',
92
92
  description: optionalAccountHashDescription,
93
93
  },
94
- { displayName: 'Disable Prefilter', name: 'is_disable_prefilter', type: 'boolean', default: false },
94
+ { displayName: 'Disable Prefilter', name: 'is_disable_prefilter', type: 'boolean', default: false, description: 'Whether to skip the prompt check that runs before the prompt is sent to Midjourney' },
95
95
  ]),
96
96
  ...withDisplay('imagineInstant', [
97
97
  { displayName: 'Prompt', name: 'prompt', type: 'string', required: true, default: '', description: 'Required prompt text' },
@@ -183,7 +183,7 @@ class UserApi {
183
183
  { displayName: 'Account Hash', name: 'account_hash', type: 'string', required: true, default: '', description: requiredAccountHashDescription },
184
184
  { displayName: 'Webhook URL', name: 'webhook_url', type: 'string', default: '' },
185
185
  { displayName: 'Callback ID', name: 'callback_id', type: 'string', default: '', description: 'Optional callback identifier (max 72 chars)' },
186
- { displayName: 'Is Async', name: 'is_async', type: 'boolean', default: false, description: 'On: return hash immediately. Off: wait for final result.' },
186
+ { displayName: 'Is Async', name: 'is_async', type: 'boolean', default: false, description: 'Whether to return the task hash at once instead of waiting for the final result' },
187
187
  ]),
188
188
  ...withDisplay('speed', [
189
189
  { displayName: 'Account Hash', name: 'account_hash', type: 'string', required: true, default: '', description: requiredAccountHashDescription },
@@ -194,15 +194,15 @@ class UserApi {
194
194
  required: true,
195
195
  default: 'relax',
196
196
  options: [
197
- { name: 'relax', value: 'relax' },
198
- { name: 'fast', value: 'fast' },
199
- { name: 'turbo', value: 'turbo' },
197
+ { name: 'Relax', value: 'relax' },
198
+ { name: 'Fast', value: 'fast' },
199
+ { name: 'Turbo', value: 'turbo' },
200
200
  ],
201
201
  description: 'Speed mode',
202
202
  },
203
203
  { displayName: 'Webhook URL', name: 'webhook_url', type: 'string', default: '' },
204
204
  { displayName: 'Callback ID', name: 'callback_id', type: 'string', default: '', description: 'Optional callback identifier (max 72 chars)' },
205
- { displayName: 'Is Async', name: 'is_async', type: 'boolean', default: false, description: 'On: return hash immediately. Off: wait for final result.' },
205
+ { displayName: 'Is Async', name: 'is_async', type: 'boolean', default: false, description: 'Whether to return the task hash at once instead of waiting for the final result' },
206
206
  ]),
207
207
  ...withDisplay('upload', [
208
208
  {
@@ -216,7 +216,7 @@ class UserApi {
216
216
  ]),
217
217
  ...withDisplay('seed', [
218
218
  uuidHashField,
219
- { displayName: 'Is Async', name: 'is_async', type: 'boolean', default: false, description: 'On: return hash immediately. Off: wait for final result.' },
219
+ { displayName: 'Is Async', name: 'is_async', type: 'boolean', default: false, description: 'Whether to return the task hash at once instead of waiting for the final result' },
220
220
  { displayName: 'Webhook URL', name: 'webhook_url', type: 'string', default: '' },
221
221
  { displayName: 'Callback ID', name: 'callback_id', type: 'string', default: '', description: 'Optional callback identifier (max 72 chars)' },
222
222
  ]),
@@ -0,0 +1,18 @@
1
+ {
2
+ "node": "n8n-nodes-userapi.userApi",
3
+ "nodeVersion": "1.0",
4
+ "codexVersion": "1.0",
5
+ "categories": ["AI", "Marketing"],
6
+ "subcategories": {
7
+ "AI": ["Image Generation"]
8
+ },
9
+ "resources": {
10
+ "credentialDocumentation": [
11
+ { "url": "https://userapi.ai/first-steps" }
12
+ ],
13
+ "primaryDocumentation": [
14
+ { "url": "https://userapi.ai/docs" }
15
+ ]
16
+ },
17
+ "alias": ["Midjourney", "Image", "Text to Image", "Video"]
18
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-userapi",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "description": "n8n community nodes for UserApi.Ai endpoints",
5
5
  "license": "MIT",
6
6
  "homepage": "https://userapi.ai",
@@ -29,10 +29,11 @@
29
29
  "lint": "echo \"Add ESLint config if needed\""
30
30
  },
31
31
  "peerDependencies": {
32
- "n8n-workflow": "^1.0.0"
32
+ "n8n-workflow": "*"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/node": "^22.13.4",
36
+ "n8n-workflow": "^1.120.9",
36
37
  "typescript": "^5.7.3"
37
38
  },
38
39
  "n8n": {