n8n-nodes-piapi 0.1.2 → 0.1.4
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 +8 -1
 - package/dist/nodes/PiAPI/DiffRhythm/DiffRhythmAudioGeneration.node.d.ts +5 -0
 - package/dist/nodes/PiAPI/DiffRhythm/DiffRhythmAudioGeneration.node.js +259 -0
 - package/dist/nodes/PiAPI/DiffRhythm/DiffRhythmAudioGeneration.node.js.map +1 -0
 - package/dist/nodes/PiAPI/{Skyreels/SkytreelsImageToVideo.node.d.ts → Faceswap/FaceswapImageToImage.node.d.ts} +1 -1
 - package/dist/nodes/PiAPI/Faceswap/FaceswapImageToImage.node.js +278 -0
 - package/dist/nodes/PiAPI/Faceswap/FaceswapImageToImage.node.js.map +1 -0
 - package/dist/nodes/PiAPI/Faceswap/FaceswapVideoToVideo.node.d.ts +5 -0
 - package/dist/nodes/PiAPI/Faceswap/FaceswapVideoToVideo.node.js +297 -0
 - package/dist/nodes/PiAPI/Faceswap/FaceswapVideoToVideo.node.js.map +1 -0
 - package/dist/nodes/PiAPI/FileUpload/FileUpload.node.d.ts +5 -0
 - package/dist/nodes/PiAPI/FileUpload/FileUpload.node.js +215 -0
 - package/dist/nodes/PiAPI/FileUpload/FileUpload.node.js.map +1 -0
 - package/dist/nodes/PiAPI/Flux/FluxTextToImage.node.js +20 -8
 - package/dist/nodes/PiAPI/Flux/FluxTextToImage.node.js.map +1 -1
 - package/dist/nodes/PiAPI/ImageUpscale/ImageUpscale.node.d.ts +5 -0
 - package/dist/nodes/PiAPI/ImageUpscale/ImageUpscale.node.js +209 -0
 - package/dist/nodes/PiAPI/ImageUpscale/ImageUpscale.node.js.map +1 -0
 - package/dist/nodes/PiAPI/MMAudio/MMAudioVideoToAudio.node.d.ts +5 -0
 - package/dist/nodes/PiAPI/MMAudio/MMAudioVideoToAudio.node.js +241 -0
 - package/dist/nodes/PiAPI/MMAudio/MMAudioVideoToAudio.node.js.map +1 -0
 - package/dist/nodes/PiAPI/Midjourney/PiAPIMidjourney.node.d.ts +5 -0
 - package/dist/nodes/PiAPI/Midjourney/PiAPIMidjourney.node.js +426 -0
 - package/dist/nodes/PiAPI/Midjourney/PiAPIMidjourney.node.js.map +1 -0
 - package/dist/nodes/PiAPI/Qubico/QubicoSegment.node.d.ts +5 -0
 - package/dist/nodes/PiAPI/Qubico/QubicoSegment.node.js +243 -0
 - package/dist/nodes/PiAPI/Qubico/QubicoSegment.node.js.map +1 -0
 - package/dist/nodes/PiAPI/RemoveBackground/RemoveBackground.node.d.ts +5 -0
 - package/dist/nodes/PiAPI/RemoveBackground/RemoveBackground.node.js +188 -0
 - package/dist/nodes/PiAPI/RemoveBackground/RemoveBackground.node.js.map +1 -0
 - package/dist/nodes/PiAPI/Skyreels/PiAPISkyreels.node.d.ts +5 -0
 - package/dist/nodes/PiAPI/Skyreels/PiAPISkyreels.node.js +335 -0
 - package/dist/nodes/PiAPI/Skyreels/PiAPISkyreels.node.js.map +1 -0
 - package/dist/nodes/PiAPI/Skyreels/SkyreelsImageToVideo.node.d.ts +5 -0
 - package/dist/nodes/PiAPI/Skyreels/{SkytreelsImageToVideo.node.js → SkyreelsImageToVideo.node.js} +4 -4
 - package/dist/nodes/PiAPI/Skyreels/SkyreelsImageToVideo.node.js.map +1 -0
 - package/dist/nodes/PiAPI/Skyreels/index.d.ts +2 -2
 - package/dist/nodes/PiAPI/Skyreels/index.js +3 -3
 - package/dist/nodes/PiAPI/Skyreels/index.js.map +1 -1
 - package/dist/nodes/PiAPI/TTS/TextToSpeech.node.d.ts +5 -0
 - package/dist/nodes/PiAPI/TTS/TextToSpeech.node.js +214 -0
 - package/dist/nodes/PiAPI/TTS/TextToSpeech.node.js.map +1 -0
 - package/dist/nodes/PiAPI/VideoUpscale/VideoUpscale.node.d.ts +5 -0
 - package/dist/nodes/PiAPI/VideoUpscale/VideoUpscale.node.js +194 -0
 - package/dist/nodes/PiAPI/VideoUpscale/VideoUpscale.node.js.map +1 -0
 - package/dist/nodes/PiAPI/shared/Interfaces.d.ts +179 -5
 - package/dist/package.json +14 -3
 - package/dist/tsconfig.tsbuildinfo +1 -1
 - package/package.json +14 -3
 - package/dist/nodes/PiAPI/Skyreels/SkytreelsImageToVideo.node.js.map +0 -1
 
| 
         @@ -0,0 +1,426 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            "use strict";
         
     | 
| 
      
 2 
     | 
    
         
            +
            Object.defineProperty(exports, "__esModule", { value: true });
         
     | 
| 
      
 3 
     | 
    
         
            +
            exports.PiAPIMidjourney = void 0;
         
     | 
| 
      
 4 
     | 
    
         
            +
            const n8n_workflow_1 = require("n8n-workflow");
         
     | 
| 
      
 5 
     | 
    
         
            +
            const GenericFunctions_1 = require("../shared/GenericFunctions");
         
     | 
| 
      
 6 
     | 
    
         
            +
            class PiAPIMidjourney {
         
     | 
| 
      
 7 
     | 
    
         
            +
                constructor() {
         
     | 
| 
      
 8 
     | 
    
         
            +
                    this.description = {
         
     | 
| 
      
 9 
     | 
    
         
            +
                        displayName: 'PiAPI Midjourney',
         
     | 
| 
      
 10 
     | 
    
         
            +
                        name: 'piAPIMidjourney',
         
     | 
| 
      
 11 
     | 
    
         
            +
                        icon: 'file:../piapi.svg',
         
     | 
| 
      
 12 
     | 
    
         
            +
                        group: ['transform'],
         
     | 
| 
      
 13 
     | 
    
         
            +
                        version: 1,
         
     | 
| 
      
 14 
     | 
    
         
            +
                        description: 'Generate and manipulate images using PiAPI Midjourney',
         
     | 
| 
      
 15 
     | 
    
         
            +
                        defaults: {
         
     | 
| 
      
 16 
     | 
    
         
            +
                            name: 'Midjourney',
         
     | 
| 
      
 17 
     | 
    
         
            +
                        },
         
     | 
| 
      
 18 
     | 
    
         
            +
                        inputs: ["main"],
         
     | 
| 
      
 19 
     | 
    
         
            +
                        outputs: ["main"],
         
     | 
| 
      
 20 
     | 
    
         
            +
                        credentials: [
         
     | 
| 
      
 21 
     | 
    
         
            +
                            {
         
     | 
| 
      
 22 
     | 
    
         
            +
                                name: 'piAPIApi',
         
     | 
| 
      
 23 
     | 
    
         
            +
                                required: true,
         
     | 
| 
      
 24 
     | 
    
         
            +
                            },
         
     | 
| 
      
 25 
     | 
    
         
            +
                        ],
         
     | 
| 
      
 26 
     | 
    
         
            +
                        properties: [
         
     | 
| 
      
 27 
     | 
    
         
            +
                            {
         
     | 
| 
      
 28 
     | 
    
         
            +
                                displayName: 'Operation',
         
     | 
| 
      
 29 
     | 
    
         
            +
                                name: 'operation',
         
     | 
| 
      
 30 
     | 
    
         
            +
                                type: 'options',
         
     | 
| 
      
 31 
     | 
    
         
            +
                                options: [
         
     | 
| 
      
 32 
     | 
    
         
            +
                                    {
         
     | 
| 
      
 33 
     | 
    
         
            +
                                        name: 'Imagine',
         
     | 
| 
      
 34 
     | 
    
         
            +
                                        value: 'imagine',
         
     | 
| 
      
 35 
     | 
    
         
            +
                                        description: 'Generate 4 images from a text prompt',
         
     | 
| 
      
 36 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 37 
     | 
    
         
            +
                                    {
         
     | 
| 
      
 38 
     | 
    
         
            +
                                        name: 'Upscale',
         
     | 
| 
      
 39 
     | 
    
         
            +
                                        value: 'upscale',
         
     | 
| 
      
 40 
     | 
    
         
            +
                                        description: 'Upscale a selected image from a previous Imagine result',
         
     | 
| 
      
 41 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 42 
     | 
    
         
            +
                                    {
         
     | 
| 
      
 43 
     | 
    
         
            +
                                        name: 'Describe',
         
     | 
| 
      
 44 
     | 
    
         
            +
                                        value: 'describe',
         
     | 
| 
      
 45 
     | 
    
         
            +
                                        description: 'Generate prompt suggestions based on an image',
         
     | 
| 
      
 46 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 47 
     | 
    
         
            +
                                ],
         
     | 
| 
      
 48 
     | 
    
         
            +
                                default: 'imagine',
         
     | 
| 
      
 49 
     | 
    
         
            +
                                description: 'Operation to perform',
         
     | 
| 
      
 50 
     | 
    
         
            +
                            },
         
     | 
| 
      
 51 
     | 
    
         
            +
                            {
         
     | 
| 
      
 52 
     | 
    
         
            +
                                displayName: 'Prompt',
         
     | 
| 
      
 53 
     | 
    
         
            +
                                name: 'prompt',
         
     | 
| 
      
 54 
     | 
    
         
            +
                                type: 'string',
         
     | 
| 
      
 55 
     | 
    
         
            +
                                typeOptions: {
         
     | 
| 
      
 56 
     | 
    
         
            +
                                    rows: 4,
         
     | 
| 
      
 57 
     | 
    
         
            +
                                },
         
     | 
| 
      
 58 
     | 
    
         
            +
                                default: '',
         
     | 
| 
      
 59 
     | 
    
         
            +
                                required: true,
         
     | 
| 
      
 60 
     | 
    
         
            +
                                displayOptions: {
         
     | 
| 
      
 61 
     | 
    
         
            +
                                    show: {
         
     | 
| 
      
 62 
     | 
    
         
            +
                                        operation: ['imagine'],
         
     | 
| 
      
 63 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 64 
     | 
    
         
            +
                                },
         
     | 
| 
      
 65 
     | 
    
         
            +
                                description: 'Text prompt to generate images',
         
     | 
| 
      
 66 
     | 
    
         
            +
                            },
         
     | 
| 
      
 67 
     | 
    
         
            +
                            {
         
     | 
| 
      
 68 
     | 
    
         
            +
                                displayName: 'Aspect Ratio',
         
     | 
| 
      
 69 
     | 
    
         
            +
                                name: 'aspectRatio',
         
     | 
| 
      
 70 
     | 
    
         
            +
                                type: 'options',
         
     | 
| 
      
 71 
     | 
    
         
            +
                                options: [
         
     | 
| 
      
 72 
     | 
    
         
            +
                                    {
         
     | 
| 
      
 73 
     | 
    
         
            +
                                        name: 'Square (1:1)',
         
     | 
| 
      
 74 
     | 
    
         
            +
                                        value: '1:1',
         
     | 
| 
      
 75 
     | 
    
         
            +
                                        description: 'Square images',
         
     | 
| 
      
 76 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 77 
     | 
    
         
            +
                                    {
         
     | 
| 
      
 78 
     | 
    
         
            +
                                        name: 'Portrait (9:16)',
         
     | 
| 
      
 79 
     | 
    
         
            +
                                        value: '9:16',
         
     | 
| 
      
 80 
     | 
    
         
            +
                                        description: 'Vertical images',
         
     | 
| 
      
 81 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 82 
     | 
    
         
            +
                                    {
         
     | 
| 
      
 83 
     | 
    
         
            +
                                        name: 'Landscape (16:9)',
         
     | 
| 
      
 84 
     | 
    
         
            +
                                        value: '16:9',
         
     | 
| 
      
 85 
     | 
    
         
            +
                                        description: 'Horizontal widescreen images',
         
     | 
| 
      
 86 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 87 
     | 
    
         
            +
                                    {
         
     | 
| 
      
 88 
     | 
    
         
            +
                                        name: 'Ultra Landscape (21:9)',
         
     | 
| 
      
 89 
     | 
    
         
            +
                                        value: '21:9',
         
     | 
| 
      
 90 
     | 
    
         
            +
                                        description: 'Ultra-wide horizontal images',
         
     | 
| 
      
 91 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 92 
     | 
    
         
            +
                                ],
         
     | 
| 
      
 93 
     | 
    
         
            +
                                default: '1:1',
         
     | 
| 
      
 94 
     | 
    
         
            +
                                displayOptions: {
         
     | 
| 
      
 95 
     | 
    
         
            +
                                    show: {
         
     | 
| 
      
 96 
     | 
    
         
            +
                                        operation: ['imagine'],
         
     | 
| 
      
 97 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 98 
     | 
    
         
            +
                                },
         
     | 
| 
      
 99 
     | 
    
         
            +
                                description: 'Aspect ratio of the generated images',
         
     | 
| 
      
 100 
     | 
    
         
            +
                            },
         
     | 
| 
      
 101 
     | 
    
         
            +
                            {
         
     | 
| 
      
 102 
     | 
    
         
            +
                                displayName: 'Process Mode',
         
     | 
| 
      
 103 
     | 
    
         
            +
                                name: 'processMode',
         
     | 
| 
      
 104 
     | 
    
         
            +
                                type: 'options',
         
     | 
| 
      
 105 
     | 
    
         
            +
                                options: [
         
     | 
| 
      
 106 
     | 
    
         
            +
                                    {
         
     | 
| 
      
 107 
     | 
    
         
            +
                                        name: 'Relax',
         
     | 
| 
      
 108 
     | 
    
         
            +
                                        value: 'relax',
         
     | 
| 
      
 109 
     | 
    
         
            +
                                        description: 'Lower priority but cheaper',
         
     | 
| 
      
 110 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 111 
     | 
    
         
            +
                                    {
         
     | 
| 
      
 112 
     | 
    
         
            +
                                        name: 'Fast',
         
     | 
| 
      
 113 
     | 
    
         
            +
                                        value: 'fast',
         
     | 
| 
      
 114 
     | 
    
         
            +
                                        description: 'Standard processing speed',
         
     | 
| 
      
 115 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 116 
     | 
    
         
            +
                                    {
         
     | 
| 
      
 117 
     | 
    
         
            +
                                        name: 'Turbo',
         
     | 
| 
      
 118 
     | 
    
         
            +
                                        value: 'turbo',
         
     | 
| 
      
 119 
     | 
    
         
            +
                                        description: 'Higher priority but more expensive',
         
     | 
| 
      
 120 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 121 
     | 
    
         
            +
                                ],
         
     | 
| 
      
 122 
     | 
    
         
            +
                                default: 'fast',
         
     | 
| 
      
 123 
     | 
    
         
            +
                                displayOptions: {
         
     | 
| 
      
 124 
     | 
    
         
            +
                                    show: {
         
     | 
| 
      
 125 
     | 
    
         
            +
                                        operation: ['imagine', 'describe'],
         
     | 
| 
      
 126 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 127 
     | 
    
         
            +
                                },
         
     | 
| 
      
 128 
     | 
    
         
            +
                                description: 'Processing speed priority',
         
     | 
| 
      
 129 
     | 
    
         
            +
                            },
         
     | 
| 
      
 130 
     | 
    
         
            +
                            {
         
     | 
| 
      
 131 
     | 
    
         
            +
                                displayName: 'Skip Prompt Check',
         
     | 
| 
      
 132 
     | 
    
         
            +
                                name: 'skipPromptCheck',
         
     | 
| 
      
 133 
     | 
    
         
            +
                                type: 'boolean',
         
     | 
| 
      
 134 
     | 
    
         
            +
                                default: false,
         
     | 
| 
      
 135 
     | 
    
         
            +
                                displayOptions: {
         
     | 
| 
      
 136 
     | 
    
         
            +
                                    show: {
         
     | 
| 
      
 137 
     | 
    
         
            +
                                        operation: ['imagine'],
         
     | 
| 
      
 138 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 139 
     | 
    
         
            +
                                },
         
     | 
| 
      
 140 
     | 
    
         
            +
                                description: 'Whether to skip content filtering on prompts',
         
     | 
| 
      
 141 
     | 
    
         
            +
                            },
         
     | 
| 
      
 142 
     | 
    
         
            +
                            {
         
     | 
| 
      
 143 
     | 
    
         
            +
                                displayName: 'Origin Task ID',
         
     | 
| 
      
 144 
     | 
    
         
            +
                                name: 'originTaskId',
         
     | 
| 
      
 145 
     | 
    
         
            +
                                type: 'string',
         
     | 
| 
      
 146 
     | 
    
         
            +
                                default: '',
         
     | 
| 
      
 147 
     | 
    
         
            +
                                required: true,
         
     | 
| 
      
 148 
     | 
    
         
            +
                                displayOptions: {
         
     | 
| 
      
 149 
     | 
    
         
            +
                                    show: {
         
     | 
| 
      
 150 
     | 
    
         
            +
                                        operation: ['upscale'],
         
     | 
| 
      
 151 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 152 
     | 
    
         
            +
                                },
         
     | 
| 
      
 153 
     | 
    
         
            +
                                description: 'Task ID of the original Imagine operation',
         
     | 
| 
      
 154 
     | 
    
         
            +
                            },
         
     | 
| 
      
 155 
     | 
    
         
            +
                            {
         
     | 
| 
      
 156 
     | 
    
         
            +
                                displayName: 'Image Index',
         
     | 
| 
      
 157 
     | 
    
         
            +
                                name: 'imageIndex',
         
     | 
| 
      
 158 
     | 
    
         
            +
                                type: 'options',
         
     | 
| 
      
 159 
     | 
    
         
            +
                                options: [
         
     | 
| 
      
 160 
     | 
    
         
            +
                                    {
         
     | 
| 
      
 161 
     | 
    
         
            +
                                        name: 'Image 1',
         
     | 
| 
      
 162 
     | 
    
         
            +
                                        value: '1',
         
     | 
| 
      
 163 
     | 
    
         
            +
                                        description: 'First image in the grid',
         
     | 
| 
      
 164 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 165 
     | 
    
         
            +
                                    {
         
     | 
| 
      
 166 
     | 
    
         
            +
                                        name: 'Image 2',
         
     | 
| 
      
 167 
     | 
    
         
            +
                                        value: '2',
         
     | 
| 
      
 168 
     | 
    
         
            +
                                        description: 'Second image in the grid',
         
     | 
| 
      
 169 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 170 
     | 
    
         
            +
                                    {
         
     | 
| 
      
 171 
     | 
    
         
            +
                                        name: 'Image 3',
         
     | 
| 
      
 172 
     | 
    
         
            +
                                        value: '3',
         
     | 
| 
      
 173 
     | 
    
         
            +
                                        description: 'Third image in the grid',
         
     | 
| 
      
 174 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 175 
     | 
    
         
            +
                                    {
         
     | 
| 
      
 176 
     | 
    
         
            +
                                        name: 'Image 4',
         
     | 
| 
      
 177 
     | 
    
         
            +
                                        value: '4',
         
     | 
| 
      
 178 
     | 
    
         
            +
                                        description: 'Fourth image in the grid',
         
     | 
| 
      
 179 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 180 
     | 
    
         
            +
                                ],
         
     | 
| 
      
 181 
     | 
    
         
            +
                                default: '1',
         
     | 
| 
      
 182 
     | 
    
         
            +
                                required: true,
         
     | 
| 
      
 183 
     | 
    
         
            +
                                displayOptions: {
         
     | 
| 
      
 184 
     | 
    
         
            +
                                    show: {
         
     | 
| 
      
 185 
     | 
    
         
            +
                                        operation: ['upscale'],
         
     | 
| 
      
 186 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 187 
     | 
    
         
            +
                                },
         
     | 
| 
      
 188 
     | 
    
         
            +
                                description: 'Which image to upscale from the original grid',
         
     | 
| 
      
 189 
     | 
    
         
            +
                            },
         
     | 
| 
      
 190 
     | 
    
         
            +
                            {
         
     | 
| 
      
 191 
     | 
    
         
            +
                                displayName: 'Image Input Method',
         
     | 
| 
      
 192 
     | 
    
         
            +
                                name: 'imageInputMethod',
         
     | 
| 
      
 193 
     | 
    
         
            +
                                type: 'options',
         
     | 
| 
      
 194 
     | 
    
         
            +
                                options: [
         
     | 
| 
      
 195 
     | 
    
         
            +
                                    {
         
     | 
| 
      
 196 
     | 
    
         
            +
                                        name: 'URL',
         
     | 
| 
      
 197 
     | 
    
         
            +
                                        value: 'url',
         
     | 
| 
      
 198 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 199 
     | 
    
         
            +
                                    {
         
     | 
| 
      
 200 
     | 
    
         
            +
                                        name: 'Binary Data',
         
     | 
| 
      
 201 
     | 
    
         
            +
                                        value: 'binaryData',
         
     | 
| 
      
 202 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 203 
     | 
    
         
            +
                                ],
         
     | 
| 
      
 204 
     | 
    
         
            +
                                default: 'url',
         
     | 
| 
      
 205 
     | 
    
         
            +
                                displayOptions: {
         
     | 
| 
      
 206 
     | 
    
         
            +
                                    show: {
         
     | 
| 
      
 207 
     | 
    
         
            +
                                        operation: ['describe'],
         
     | 
| 
      
 208 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 209 
     | 
    
         
            +
                                },
         
     | 
| 
      
 210 
     | 
    
         
            +
                                description: 'Method to input the image data',
         
     | 
| 
      
 211 
     | 
    
         
            +
                            },
         
     | 
| 
      
 212 
     | 
    
         
            +
                            {
         
     | 
| 
      
 213 
     | 
    
         
            +
                                displayName: 'Binary Property',
         
     | 
| 
      
 214 
     | 
    
         
            +
                                name: 'binaryPropertyName',
         
     | 
| 
      
 215 
     | 
    
         
            +
                                type: 'string',
         
     | 
| 
      
 216 
     | 
    
         
            +
                                default: 'data',
         
     | 
| 
      
 217 
     | 
    
         
            +
                                required: true,
         
     | 
| 
      
 218 
     | 
    
         
            +
                                displayOptions: {
         
     | 
| 
      
 219 
     | 
    
         
            +
                                    show: {
         
     | 
| 
      
 220 
     | 
    
         
            +
                                        operation: ['describe'],
         
     | 
| 
      
 221 
     | 
    
         
            +
                                        imageInputMethod: ['binaryData'],
         
     | 
| 
      
 222 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 223 
     | 
    
         
            +
                                },
         
     | 
| 
      
 224 
     | 
    
         
            +
                                description: 'Name of the binary property containing the image data',
         
     | 
| 
      
 225 
     | 
    
         
            +
                            },
         
     | 
| 
      
 226 
     | 
    
         
            +
                            {
         
     | 
| 
      
 227 
     | 
    
         
            +
                                displayName: 'Image URL',
         
     | 
| 
      
 228 
     | 
    
         
            +
                                name: 'imageUrl',
         
     | 
| 
      
 229 
     | 
    
         
            +
                                type: 'string',
         
     | 
| 
      
 230 
     | 
    
         
            +
                                default: '',
         
     | 
| 
      
 231 
     | 
    
         
            +
                                required: true,
         
     | 
| 
      
 232 
     | 
    
         
            +
                                displayOptions: {
         
     | 
| 
      
 233 
     | 
    
         
            +
                                    show: {
         
     | 
| 
      
 234 
     | 
    
         
            +
                                        operation: ['describe'],
         
     | 
| 
      
 235 
     | 
    
         
            +
                                        imageInputMethod: ['url'],
         
     | 
| 
      
 236 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 237 
     | 
    
         
            +
                                },
         
     | 
| 
      
 238 
     | 
    
         
            +
                                description: 'URL of the image to describe',
         
     | 
| 
      
 239 
     | 
    
         
            +
                            },
         
     | 
| 
      
 240 
     | 
    
         
            +
                            {
         
     | 
| 
      
 241 
     | 
    
         
            +
                                displayName: 'Advanced Options',
         
     | 
| 
      
 242 
     | 
    
         
            +
                                name: 'advancedOptions',
         
     | 
| 
      
 243 
     | 
    
         
            +
                                type: 'collection',
         
     | 
| 
      
 244 
     | 
    
         
            +
                                placeholder: 'Add Option',
         
     | 
| 
      
 245 
     | 
    
         
            +
                                default: {},
         
     | 
| 
      
 246 
     | 
    
         
            +
                                options: [
         
     | 
| 
      
 247 
     | 
    
         
            +
                                    {
         
     | 
| 
      
 248 
     | 
    
         
            +
                                        displayName: 'Service Mode',
         
     | 
| 
      
 249 
     | 
    
         
            +
                                        name: 'serviceMode',
         
     | 
| 
      
 250 
     | 
    
         
            +
                                        type: 'options',
         
     | 
| 
      
 251 
     | 
    
         
            +
                                        options: [
         
     | 
| 
      
 252 
     | 
    
         
            +
                                            {
         
     | 
| 
      
 253 
     | 
    
         
            +
                                                name: 'Public (PAYG)',
         
     | 
| 
      
 254 
     | 
    
         
            +
                                                value: 'public',
         
     | 
| 
      
 255 
     | 
    
         
            +
                                                description: 'Process under Pay-As-You-Go mode',
         
     | 
| 
      
 256 
     | 
    
         
            +
                                            },
         
     | 
| 
      
 257 
     | 
    
         
            +
                                            {
         
     | 
| 
      
 258 
     | 
    
         
            +
                                                name: 'Private (HYA)',
         
     | 
| 
      
 259 
     | 
    
         
            +
                                                value: 'private',
         
     | 
| 
      
 260 
     | 
    
         
            +
                                                description: 'Process under Host-Your-Account mode',
         
     | 
| 
      
 261 
     | 
    
         
            +
                                            },
         
     | 
| 
      
 262 
     | 
    
         
            +
                                        ],
         
     | 
| 
      
 263 
     | 
    
         
            +
                                        default: '',
         
     | 
| 
      
 264 
     | 
    
         
            +
                                        description: 'Choose how this task will be processed',
         
     | 
| 
      
 265 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 266 
     | 
    
         
            +
                                    {
         
     | 
| 
      
 267 
     | 
    
         
            +
                                        displayName: 'Bot ID',
         
     | 
| 
      
 268 
     | 
    
         
            +
                                        name: 'botId',
         
     | 
| 
      
 269 
     | 
    
         
            +
                                        type: 'number',
         
     | 
| 
      
 270 
     | 
    
         
            +
                                        default: 0,
         
     | 
| 
      
 271 
     | 
    
         
            +
                                        displayOptions: {
         
     | 
| 
      
 272 
     | 
    
         
            +
                                            show: {
         
     | 
| 
      
 273 
     | 
    
         
            +
                                                '/operation': ['describe'],
         
     | 
| 
      
 274 
     | 
    
         
            +
                                            },
         
     | 
| 
      
 275 
     | 
    
         
            +
                                        },
         
     | 
| 
      
 276 
     | 
    
         
            +
                                        description: 'Specify which Midjourney account will process this task (HYA Pro Plan only)',
         
     | 
| 
      
 277 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 278 
     | 
    
         
            +
                                ],
         
     | 
| 
      
 279 
     | 
    
         
            +
                            },
         
     | 
| 
      
 280 
     | 
    
         
            +
                            {
         
     | 
| 
      
 281 
     | 
    
         
            +
                                displayName: 'Wait For Completion',
         
     | 
| 
      
 282 
     | 
    
         
            +
                                name: 'waitForCompletion',
         
     | 
| 
      
 283 
     | 
    
         
            +
                                type: 'boolean',
         
     | 
| 
      
 284 
     | 
    
         
            +
                                default: false,
         
     | 
| 
      
 285 
     | 
    
         
            +
                                description: 'Whether to wait for the operation to complete before continuing',
         
     | 
| 
      
 286 
     | 
    
         
            +
                            },
         
     | 
| 
      
 287 
     | 
    
         
            +
                            {
         
     | 
| 
      
 288 
     | 
    
         
            +
                                displayName: 'Max Retries',
         
     | 
| 
      
 289 
     | 
    
         
            +
                                name: 'maxRetries',
         
     | 
| 
      
 290 
     | 
    
         
            +
                                type: 'number',
         
     | 
| 
      
 291 
     | 
    
         
            +
                                default: 60,
         
     | 
| 
      
 292 
     | 
    
         
            +
                                description: 'Maximum number of retries to check task status',
         
     | 
| 
      
 293 
     | 
    
         
            +
                                displayOptions: {
         
     | 
| 
      
 294 
     | 
    
         
            +
                                    show: {
         
     | 
| 
      
 295 
     | 
    
         
            +
                                        waitForCompletion: [true],
         
     | 
| 
      
 296 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 297 
     | 
    
         
            +
                                },
         
     | 
| 
      
 298 
     | 
    
         
            +
                            },
         
     | 
| 
      
 299 
     | 
    
         
            +
                            {
         
     | 
| 
      
 300 
     | 
    
         
            +
                                displayName: 'Retry Interval',
         
     | 
| 
      
 301 
     | 
    
         
            +
                                name: 'retryInterval',
         
     | 
| 
      
 302 
     | 
    
         
            +
                                type: 'number',
         
     | 
| 
      
 303 
     | 
    
         
            +
                                default: 5000,
         
     | 
| 
      
 304 
     | 
    
         
            +
                                description: 'Interval between retries in milliseconds',
         
     | 
| 
      
 305 
     | 
    
         
            +
                                displayOptions: {
         
     | 
| 
      
 306 
     | 
    
         
            +
                                    show: {
         
     | 
| 
      
 307 
     | 
    
         
            +
                                        waitForCompletion: [true],
         
     | 
| 
      
 308 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 309 
     | 
    
         
            +
                                },
         
     | 
| 
      
 310 
     | 
    
         
            +
                            },
         
     | 
| 
      
 311 
     | 
    
         
            +
                        ],
         
     | 
| 
      
 312 
     | 
    
         
            +
                    };
         
     | 
| 
      
 313 
     | 
    
         
            +
                }
         
     | 
| 
      
 314 
     | 
    
         
            +
                async execute() {
         
     | 
| 
      
 315 
     | 
    
         
            +
                    var _a, _b;
         
     | 
| 
      
 316 
     | 
    
         
            +
                    const items = this.getInputData();
         
     | 
| 
      
 317 
     | 
    
         
            +
                    const returnData = [];
         
     | 
| 
      
 318 
     | 
    
         
            +
                    for (let i = 0; i < items.length; i++) {
         
     | 
| 
      
 319 
     | 
    
         
            +
                        try {
         
     | 
| 
      
 320 
     | 
    
         
            +
                            const operation = this.getNodeParameter('operation', i);
         
     | 
| 
      
 321 
     | 
    
         
            +
                            const waitForCompletion = this.getNodeParameter('waitForCompletion', i, false);
         
     | 
| 
      
 322 
     | 
    
         
            +
                            const advancedOptions = this.getNodeParameter('advancedOptions', i, {});
         
     | 
| 
      
 323 
     | 
    
         
            +
                            let response;
         
     | 
| 
      
 324 
     | 
    
         
            +
                            const config = {};
         
     | 
| 
      
 325 
     | 
    
         
            +
                            if (advancedOptions.serviceMode) {
         
     | 
| 
      
 326 
     | 
    
         
            +
                                config.service_mode = advancedOptions.serviceMode;
         
     | 
| 
      
 327 
     | 
    
         
            +
                            }
         
     | 
| 
      
 328 
     | 
    
         
            +
                            if (operation === 'imagine') {
         
     | 
| 
      
 329 
     | 
    
         
            +
                                const prompt = this.getNodeParameter('prompt', i);
         
     | 
| 
      
 330 
     | 
    
         
            +
                                const aspectRatio = this.getNodeParameter('aspectRatio', i, '1:1');
         
     | 
| 
      
 331 
     | 
    
         
            +
                                const processMode = this.getNodeParameter('processMode', i, 'fast');
         
     | 
| 
      
 332 
     | 
    
         
            +
                                const skipPromptCheck = this.getNodeParameter('skipPromptCheck', i, false);
         
     | 
| 
      
 333 
     | 
    
         
            +
                                const requestBody = {
         
     | 
| 
      
 334 
     | 
    
         
            +
                                    model: 'midjourney',
         
     | 
| 
      
 335 
     | 
    
         
            +
                                    task_type: 'imagine',
         
     | 
| 
      
 336 
     | 
    
         
            +
                                    input: {
         
     | 
| 
      
 337 
     | 
    
         
            +
                                        prompt,
         
     | 
| 
      
 338 
     | 
    
         
            +
                                        aspect_ratio: aspectRatio,
         
     | 
| 
      
 339 
     | 
    
         
            +
                                        process_mode: processMode,
         
     | 
| 
      
 340 
     | 
    
         
            +
                                        skip_prompt_check: skipPromptCheck,
         
     | 
| 
      
 341 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 342 
     | 
    
         
            +
                                    config,
         
     | 
| 
      
 343 
     | 
    
         
            +
                                };
         
     | 
| 
      
 344 
     | 
    
         
            +
                                response = await GenericFunctions_1.piApiRequest.call(this, 'POST', '/api/v1/task', requestBody);
         
     | 
| 
      
 345 
     | 
    
         
            +
                            }
         
     | 
| 
      
 346 
     | 
    
         
            +
                            else if (operation === 'upscale') {
         
     | 
| 
      
 347 
     | 
    
         
            +
                                const originTaskId = this.getNodeParameter('originTaskId', i);
         
     | 
| 
      
 348 
     | 
    
         
            +
                                const imageIndex = this.getNodeParameter('imageIndex', i);
         
     | 
| 
      
 349 
     | 
    
         
            +
                                const requestBody = {
         
     | 
| 
      
 350 
     | 
    
         
            +
                                    model: 'midjourney',
         
     | 
| 
      
 351 
     | 
    
         
            +
                                    task_type: 'upscale',
         
     | 
| 
      
 352 
     | 
    
         
            +
                                    input: {
         
     | 
| 
      
 353 
     | 
    
         
            +
                                        origin_task_id: originTaskId,
         
     | 
| 
      
 354 
     | 
    
         
            +
                                        index: imageIndex,
         
     | 
| 
      
 355 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 356 
     | 
    
         
            +
                                    config,
         
     | 
| 
      
 357 
     | 
    
         
            +
                                };
         
     | 
| 
      
 358 
     | 
    
         
            +
                                response = await GenericFunctions_1.piApiRequest.call(this, 'POST', '/api/v1/task', requestBody);
         
     | 
| 
      
 359 
     | 
    
         
            +
                            }
         
     | 
| 
      
 360 
     | 
    
         
            +
                            else if (operation === 'describe') {
         
     | 
| 
      
 361 
     | 
    
         
            +
                                const imageInputMethod = this.getNodeParameter('imageInputMethod', i);
         
     | 
| 
      
 362 
     | 
    
         
            +
                                const processMode = this.getNodeParameter('processMode', i, 'fast');
         
     | 
| 
      
 363 
     | 
    
         
            +
                                let imageUrl;
         
     | 
| 
      
 364 
     | 
    
         
            +
                                if (imageInputMethod === 'url') {
         
     | 
| 
      
 365 
     | 
    
         
            +
                                    imageUrl = this.getNodeParameter('imageUrl', i);
         
     | 
| 
      
 366 
     | 
    
         
            +
                                }
         
     | 
| 
      
 367 
     | 
    
         
            +
                                else {
         
     | 
| 
      
 368 
     | 
    
         
            +
                                    const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
         
     | 
| 
      
 369 
     | 
    
         
            +
                                    const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
         
     | 
| 
      
 370 
     | 
    
         
            +
                                    if (binaryData.mimeType && !binaryData.mimeType.includes('image')) {
         
     | 
| 
      
 371 
     | 
    
         
            +
                                        throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'The provided binary data is not an image', { itemIndex: i });
         
     | 
| 
      
 372 
     | 
    
         
            +
                                    }
         
     | 
| 
      
 373 
     | 
    
         
            +
                                    const base64String = Buffer.from(await this.helpers.getBinaryDataBuffer(i, binaryPropertyName)).toString('base64');
         
     | 
| 
      
 374 
     | 
    
         
            +
                                    imageUrl = `data:${binaryData.mimeType};base64,${base64String}`;
         
     | 
| 
      
 375 
     | 
    
         
            +
                                }
         
     | 
| 
      
 376 
     | 
    
         
            +
                                const requestBody = {
         
     | 
| 
      
 377 
     | 
    
         
            +
                                    model: 'midjourney',
         
     | 
| 
      
 378 
     | 
    
         
            +
                                    task_type: 'describe',
         
     | 
| 
      
 379 
     | 
    
         
            +
                                    input: {
         
     | 
| 
      
 380 
     | 
    
         
            +
                                        image_url: imageUrl,
         
     | 
| 
      
 381 
     | 
    
         
            +
                                        process_mode: processMode,
         
     | 
| 
      
 382 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 383 
     | 
    
         
            +
                                    config,
         
     | 
| 
      
 384 
     | 
    
         
            +
                                };
         
     | 
| 
      
 385 
     | 
    
         
            +
                                if (advancedOptions.botId) {
         
     | 
| 
      
 386 
     | 
    
         
            +
                                    requestBody.input.bot_id = advancedOptions.botId;
         
     | 
| 
      
 387 
     | 
    
         
            +
                                }
         
     | 
| 
      
 388 
     | 
    
         
            +
                                response = await GenericFunctions_1.piApiRequest.call(this, 'POST', '/api/v1/task', requestBody);
         
     | 
| 
      
 389 
     | 
    
         
            +
                            }
         
     | 
| 
      
 390 
     | 
    
         
            +
                            const taskId = (_a = response.data) === null || _a === void 0 ? void 0 : _a.task_id;
         
     | 
| 
      
 391 
     | 
    
         
            +
                            if (!taskId) {
         
     | 
| 
      
 392 
     | 
    
         
            +
                                throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Failed to get a valid task ID from the API');
         
     | 
| 
      
 393 
     | 
    
         
            +
                            }
         
     | 
| 
      
 394 
     | 
    
         
            +
                            let executionData;
         
     | 
| 
      
 395 
     | 
    
         
            +
                            if (waitForCompletion) {
         
     | 
| 
      
 396 
     | 
    
         
            +
                                const maxRetries = this.getNodeParameter('maxRetries', i, 60);
         
     | 
| 
      
 397 
     | 
    
         
            +
                                const retryInterval = this.getNodeParameter('retryInterval', i, 5000);
         
     | 
| 
      
 398 
     | 
    
         
            +
                                executionData = await GenericFunctions_1.waitForTaskCompletion.call(this, taskId, maxRetries, retryInterval);
         
     | 
| 
      
 399 
     | 
    
         
            +
                            }
         
     | 
| 
      
 400 
     | 
    
         
            +
                            else {
         
     | 
| 
      
 401 
     | 
    
         
            +
                                executionData = {
         
     | 
| 
      
 402 
     | 
    
         
            +
                                    task_id: taskId,
         
     | 
| 
      
 403 
     | 
    
         
            +
                                    status: ((_b = response.data) === null || _b === void 0 ? void 0 : _b.status) || 'pending',
         
     | 
| 
      
 404 
     | 
    
         
            +
                                };
         
     | 
| 
      
 405 
     | 
    
         
            +
                            }
         
     | 
| 
      
 406 
     | 
    
         
            +
                            returnData.push({
         
     | 
| 
      
 407 
     | 
    
         
            +
                                json: executionData,
         
     | 
| 
      
 408 
     | 
    
         
            +
                            });
         
     | 
| 
      
 409 
     | 
    
         
            +
                        }
         
     | 
| 
      
 410 
     | 
    
         
            +
                        catch (error) {
         
     | 
| 
      
 411 
     | 
    
         
            +
                            if (this.continueOnFail()) {
         
     | 
| 
      
 412 
     | 
    
         
            +
                                returnData.push({
         
     | 
| 
      
 413 
     | 
    
         
            +
                                    json: {
         
     | 
| 
      
 414 
     | 
    
         
            +
                                        error: error.message,
         
     | 
| 
      
 415 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 416 
     | 
    
         
            +
                                });
         
     | 
| 
      
 417 
     | 
    
         
            +
                                continue;
         
     | 
| 
      
 418 
     | 
    
         
            +
                            }
         
     | 
| 
      
 419 
     | 
    
         
            +
                            throw error;
         
     | 
| 
      
 420 
     | 
    
         
            +
                        }
         
     | 
| 
      
 421 
     | 
    
         
            +
                    }
         
     | 
| 
      
 422 
     | 
    
         
            +
                    return [returnData];
         
     | 
| 
      
 423 
     | 
    
         
            +
                }
         
     | 
| 
      
 424 
     | 
    
         
            +
            }
         
     | 
| 
      
 425 
     | 
    
         
            +
            exports.PiAPIMidjourney = PiAPIMidjourney;
         
     | 
| 
      
 426 
     | 
    
         
            +
            //# sourceMappingURL=PiAPIMidjourney.node.js.map
         
     | 
| 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            {"version":3,"file":"PiAPIMidjourney.node.js","sourceRoot":"","sources":["../../../../nodes/PiAPI/Midjourney/PiAPIMidjourney.node.ts"],"names":[],"mappings":";;;AAAA,+CAQsB;AAEtB,iEAAiF;AAGjF,MAAa,eAAe;IAA5B;QACI,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,EAAE,CAAA,MAAA,QAAQ,CAAC,IAAI,0CAAE,MAAM,KAAI,SAAS;qBAC7C,CAAC;gBACN,CAAC;gBAED,UAAU,CAAC,IAAI,CAAC;oBACZ,IAAI,EAAE,aAAa;iBACtB,CAAC,CAAC;YACP,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;oBACxB,UAAU,CAAC,IAAI,CAAC;wBACZ,IAAI,EAAE;4BACF,KAAK,EAAE,KAAK,CAAC,OAAO;yBACvB;qBACJ,CAAC,CAAC;oBACH,SAAS;gBACb,CAAC;gBACD,MAAM,KAAK,CAAC;YAChB,CAAC;QACL,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACxB,CAAC;CACJ;AA3eD,0CA2eC"}
         
     | 
| 
         @@ -0,0 +1,5 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
         
     | 
| 
      
 2 
     | 
    
         
            +
            export declare class QubicoSegment implements INodeType {
         
     | 
| 
      
 3 
     | 
    
         
            +
                description: INodeTypeDescription;
         
     | 
| 
      
 4 
     | 
    
         
            +
                execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
         
     | 
| 
      
 5 
     | 
    
         
            +
            }
         
     |