n8n-nodes-supermachine 0.6.0 → 0.6.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.
@@ -734,6 +734,20 @@ class Supermachine {
734
734
  if (!batchId) {
735
735
  throw new Error('No batchId returned from generate API');
736
736
  }
737
+ const skipPolling = additionalFields.skipPolling;
738
+ if (skipPolling) {
739
+ returnData.push({
740
+ json: {
741
+ batchId,
742
+ status: 'submitted',
743
+ message: 'Image generation submitted. Use List Images with this batchId to check status.',
744
+ prompt,
745
+ model: body.model,
746
+ submittedAt: new Date().toISOString(),
747
+ }
748
+ });
749
+ continue;
750
+ }
737
751
  const pollingInterval = additionalFields.pollingInterval || 2;
738
752
  const maxPollingTime = additionalFields.maxPollingTime || 120;
739
753
  const startTime = Date.now();
@@ -54,9 +54,9 @@ exports.getImageOperations = [
54
54
  },
55
55
  ];
56
56
  exports.getImageFields = [
57
- // ═══════════════════════════════════════════════════════════
57
+ // ═══════════════════════════════════════════════════════════════
58
58
  // GENERATE V1
59
- // ═══════════════════════════════════════════════════════════
59
+ // ═══════════════════════════════════════════════════════════════
60
60
  {
61
61
  displayName: 'Model Name or ID',
62
62
  name: 'model',
@@ -206,6 +206,13 @@ exports.getImageFields = [
206
206
  default: '',
207
207
  description: 'Move image to folder. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
208
208
  },
209
+ {
210
+ displayName: 'Skip Polling',
211
+ name: 'skipPolling',
212
+ type: 'boolean',
213
+ default: false,
214
+ description: 'Whether to skip waiting for completion (return batchId immediately)',
215
+ },
209
216
  {
210
217
  displayName: 'Polling Interval (seconds)',
211
218
  name: 'pollingInterval',
@@ -326,9 +333,9 @@ exports.getImageFields = [
326
333
  },
327
334
  ],
328
335
  },
329
- // ═══════════════════════════════════════════════════════════
336
+ // ═══════════════════════════════════════════════════════════════
330
337
  // GENERATE V3 - NO AUTH TOKEN FIELD (uses credential)
331
- // ═══════════════════════════════════════════════════════════
338
+ // ═══════════════════════════════════════════════════════════════
332
339
  {
333
340
  displayName: 'Model Name',
334
341
  name: 'modelNameV3',
@@ -612,9 +619,9 @@ exports.getImageFields = [
612
619
  },
613
620
  ],
614
621
  },
615
- // ═══════════════════════════════════════════════════════════
622
+ // ═══════════════════════════════════════════════════════════════
616
623
  // LIST IMAGES
617
- // ═══════════════════════════════════════════════════════════
624
+ // ═══════════════════════════════════════════════════════════════
618
625
  {
619
626
  displayName: 'Return All',
620
627
  name: 'returnAll',
@@ -686,9 +693,9 @@ exports.getImageFields = [
686
693
  },
687
694
  ],
688
695
  },
689
- // ═══════════════════════════════════════════════════════════
696
+ // ═══════════════════════════════════════════════════════════════
690
697
  // GET IMAGE
691
- // ═══════════════════════════════════════════════════════════
698
+ // ═══════════════════════════════════════════════════════════════
692
699
  {
693
700
  displayName: 'Image ID',
694
701
  name: 'imageId',
@@ -704,9 +711,9 @@ exports.getImageFields = [
704
711
  placeholder: '8870379',
705
712
  description: 'ID của ảnh',
706
713
  },
707
- // ═══════════════════════════════════════════════════════════
714
+ // ═══════════════════════════════════════════════════════════════
708
715
  // MOVE IMAGE
709
- // ═══════════════════════════════════════════════════════════
716
+ // ═══════════════════════════════════════════════════════════════
710
717
  {
711
718
  displayName: 'Target Folder Name or ID',
712
719
  name: 'targetFolderId',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-supermachine",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "n8n community node for Supermachine AI Image API — Generate images, manage models, LoRAs, and characters",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",