n8n-nodes-sudomock 0.7.0 → 0.8.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.
|
@@ -16,8 +16,9 @@ function format2DPrintAreas(printAreas) {
|
|
|
16
16
|
}
|
|
17
17
|
function parseJsonArray(value, name) {
|
|
18
18
|
const parsed = typeof value === 'string' ? JSON.parse(value) : value;
|
|
19
|
-
if (!Array.isArray(parsed))
|
|
20
|
-
throw new
|
|
19
|
+
if (!Array.isArray(parsed)) {
|
|
20
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `${name} must be a JSON array`);
|
|
21
|
+
}
|
|
21
22
|
return parsed;
|
|
22
23
|
}
|
|
23
24
|
/**
|
|
@@ -81,6 +82,12 @@ class SudoMock {
|
|
|
81
82
|
description: 'Create a 2D mockup now or queue it for background processing',
|
|
82
83
|
action: 'Create a 2D mockup',
|
|
83
84
|
},
|
|
85
|
+
{
|
|
86
|
+
name: '2D: Delete Mockup',
|
|
87
|
+
value: 'delete2DMockup',
|
|
88
|
+
description: 'Delete a 2D mockup',
|
|
89
|
+
action: 'Delete a 2D mockup',
|
|
90
|
+
},
|
|
84
91
|
{
|
|
85
92
|
name: '2D: Get Mockup',
|
|
86
93
|
value: 'get2DMockup',
|
|
@@ -93,12 +100,6 @@ class SudoMock {
|
|
|
93
100
|
description: 'List your 2D mockups',
|
|
94
101
|
action: 'List 2D mockups',
|
|
95
102
|
},
|
|
96
|
-
{
|
|
97
|
-
name: '2D: Set Print Areas',
|
|
98
|
-
value: 'set2DPrintAreas',
|
|
99
|
-
description: 'Replace or clear the saved print area quads for a 2D mockup',
|
|
100
|
-
action: 'Set 2D print areas',
|
|
101
|
-
},
|
|
102
103
|
{
|
|
103
104
|
name: '2D: Render Mockup',
|
|
104
105
|
value: 'render2DMockup',
|
|
@@ -106,10 +107,10 @@ class SudoMock {
|
|
|
106
107
|
action: 'Render a 2D mockup',
|
|
107
108
|
},
|
|
108
109
|
{
|
|
109
|
-
name: '2D:
|
|
110
|
-
value: '
|
|
111
|
-
description: '
|
|
112
|
-
action: '
|
|
110
|
+
name: '2D: Set Print Areas',
|
|
111
|
+
value: 'set2DPrintAreas',
|
|
112
|
+
description: 'Replace or clear the saved print area quads for a 2D mockup',
|
|
113
|
+
action: 'Set 2D print areas',
|
|
113
114
|
},
|
|
114
115
|
{
|
|
115
116
|
name: 'Artwork: Delete Stored Files',
|
|
@@ -153,30 +154,30 @@ class SudoMock {
|
|
|
153
154
|
description: 'Get account details, subscription, and usage statistics',
|
|
154
155
|
action: 'Get account information',
|
|
155
156
|
},
|
|
156
|
-
{
|
|
157
|
-
name: 'Get Mockup',
|
|
158
|
-
value: 'getMockup',
|
|
159
|
-
description: 'Get details of a specific mockup template',
|
|
160
|
-
action: 'Get mockup details',
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
name: 'List Mockups',
|
|
164
|
-
value: 'listMockups',
|
|
165
|
-
description: 'List all your uploaded mockup templates',
|
|
166
|
-
action: 'List mockups',
|
|
167
|
-
},
|
|
168
157
|
{
|
|
169
158
|
name: 'Get Job',
|
|
170
159
|
value: 'getJob',
|
|
171
160
|
description: 'Poll an async job by its job_id (GET /jobs/{job_id}) to get its status and result',
|
|
172
161
|
action: 'Get a job',
|
|
173
162
|
},
|
|
163
|
+
{
|
|
164
|
+
name: 'Get Mockup',
|
|
165
|
+
value: 'getMockup',
|
|
166
|
+
description: 'Get details of a specific mockup template',
|
|
167
|
+
action: 'Get mockup details',
|
|
168
|
+
},
|
|
174
169
|
{
|
|
175
170
|
name: 'List Jobs',
|
|
176
171
|
value: 'listJobs',
|
|
177
172
|
description: 'List your async render, upload, and video jobs',
|
|
178
173
|
action: 'List jobs',
|
|
179
174
|
},
|
|
175
|
+
{
|
|
176
|
+
name: 'List Mockups',
|
|
177
|
+
value: 'listMockups',
|
|
178
|
+
description: 'List all your uploaded mockup templates',
|
|
179
|
+
action: 'List mockups',
|
|
180
|
+
},
|
|
180
181
|
{
|
|
181
182
|
name: 'Remove Background',
|
|
182
183
|
value: 'removeBackground',
|
|
@@ -359,7 +360,7 @@ class SudoMock {
|
|
|
359
360
|
type: 'number',
|
|
360
361
|
typeOptions: { minValue: 1, maxValue: 100 },
|
|
361
362
|
displayOptions: { show: { operation: ['list2DMockups'] } },
|
|
362
|
-
default:
|
|
363
|
+
default: 50,
|
|
363
364
|
description: 'Number of 2D mockups to return from 1 to 100',
|
|
364
365
|
},
|
|
365
366
|
{
|
|
@@ -503,49 +504,73 @@ class SudoMock {
|
|
|
503
504
|
displayName: 'Render Target',
|
|
504
505
|
values: [
|
|
505
506
|
{
|
|
506
|
-
displayName: '
|
|
507
|
-
name: '
|
|
508
|
-
type: '
|
|
507
|
+
displayName: 'Adjustments',
|
|
508
|
+
name: 'adjustments',
|
|
509
|
+
type: 'collection',
|
|
510
|
+
placeholder: 'Add Adjustment',
|
|
511
|
+
default: {},
|
|
512
|
+
description: 'Artwork appearance settings for this print area',
|
|
509
513
|
options: [
|
|
510
514
|
{
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
515
|
+
displayName: 'Blend Mode',
|
|
516
|
+
name: 'blend_mode',
|
|
517
|
+
type: 'options',
|
|
518
|
+
options: [
|
|
519
|
+
{ name: 'Multiply', value: 'multiply' },
|
|
520
|
+
{ name: 'Normal', value: 'normal' },
|
|
521
|
+
],
|
|
522
|
+
default: 'multiply',
|
|
523
|
+
description: 'Artwork blend mode for the product surface',
|
|
514
524
|
},
|
|
515
525
|
{
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
526
|
+
displayName: 'Blur',
|
|
527
|
+
name: 'blur',
|
|
528
|
+
type: 'number',
|
|
529
|
+
typeOptions: { minValue: 0, maxValue: 100 },
|
|
530
|
+
default: 0,
|
|
531
|
+
description: 'Gaussian blur amount from 0 to 100',
|
|
519
532
|
},
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
type: 'string',
|
|
528
|
-
required: true,
|
|
529
|
-
displayOptions: {
|
|
530
|
-
show: {
|
|
531
|
-
targetType: ['savedPrintArea'],
|
|
533
|
+
{
|
|
534
|
+
displayName: 'Brightness',
|
|
535
|
+
name: 'brightness',
|
|
536
|
+
type: 'number',
|
|
537
|
+
typeOptions: { minValue: -150, maxValue: 150 },
|
|
538
|
+
default: 0,
|
|
539
|
+
description: 'Brightness adjustment from -150 to 150',
|
|
532
540
|
},
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
type: 'string',
|
|
541
|
-
required: true,
|
|
542
|
-
displayOptions: {
|
|
543
|
-
show: {
|
|
544
|
-
targetType: ['fullSurface'],
|
|
541
|
+
{
|
|
542
|
+
displayName: 'Contrast',
|
|
543
|
+
name: 'contrast',
|
|
544
|
+
type: 'number',
|
|
545
|
+
typeOptions: { minValue: -100, maxValue: 100 },
|
|
546
|
+
default: 0,
|
|
547
|
+
description: 'Contrast adjustment from -100 to 100',
|
|
545
548
|
},
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
+
{
|
|
550
|
+
displayName: 'Opacity',
|
|
551
|
+
name: 'opacity',
|
|
552
|
+
type: 'number',
|
|
553
|
+
typeOptions: { minValue: 0, maxValue: 100 },
|
|
554
|
+
default: 100,
|
|
555
|
+
description: 'Artwork opacity from 0 to 100',
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
displayName: 'Saturation',
|
|
559
|
+
name: 'saturation',
|
|
560
|
+
type: 'number',
|
|
561
|
+
typeOptions: { minValue: -100, maxValue: 100 },
|
|
562
|
+
default: 0,
|
|
563
|
+
description: 'Saturation adjustment from -100 to 100',
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
displayName: 'Vibrance',
|
|
567
|
+
name: 'vibrance',
|
|
568
|
+
type: 'number',
|
|
569
|
+
typeOptions: { minValue: -100, maxValue: 100 },
|
|
570
|
+
default: 0,
|
|
571
|
+
description: 'Vibrance adjustment from -100 to 100',
|
|
572
|
+
},
|
|
573
|
+
],
|
|
549
574
|
},
|
|
550
575
|
{
|
|
551
576
|
displayName: 'Artwork Type',
|
|
@@ -593,89 +618,26 @@ class SudoMock {
|
|
|
593
618
|
default: '',
|
|
594
619
|
description: 'Base64 artwork data for this print area',
|
|
595
620
|
},
|
|
596
|
-
{
|
|
597
|
-
displayName: 'Remove Background',
|
|
598
|
-
name: 'removeBackground',
|
|
599
|
-
type: 'boolean',
|
|
600
|
-
default: false,
|
|
601
|
-
description: 'Whether to remove the artwork background before placing it. Adds 25 credits per artwork.',
|
|
602
|
-
},
|
|
603
621
|
{
|
|
604
622
|
displayName: 'Color',
|
|
605
623
|
name: 'color',
|
|
606
|
-
type: '
|
|
624
|
+
type: 'color',
|
|
607
625
|
default: '',
|
|
608
626
|
placeholder: '#FF0000',
|
|
609
627
|
description: 'Optional hex color fill or overlay',
|
|
610
628
|
},
|
|
611
629
|
{
|
|
612
|
-
displayName: '
|
|
613
|
-
name: '
|
|
614
|
-
type: '
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
{
|
|
620
|
-
displayName: 'Brightness',
|
|
621
|
-
name: 'brightness',
|
|
622
|
-
type: 'number',
|
|
623
|
-
typeOptions: { minValue: -150, maxValue: 150 },
|
|
624
|
-
default: 0,
|
|
625
|
-
description: 'Brightness adjustment from -150 to 150',
|
|
626
|
-
},
|
|
627
|
-
{
|
|
628
|
-
displayName: 'Contrast',
|
|
629
|
-
name: 'contrast',
|
|
630
|
-
type: 'number',
|
|
631
|
-
typeOptions: { minValue: -100, maxValue: 100 },
|
|
632
|
-
default: 0,
|
|
633
|
-
description: 'Contrast adjustment from -100 to 100',
|
|
634
|
-
},
|
|
635
|
-
{
|
|
636
|
-
displayName: 'Opacity',
|
|
637
|
-
name: 'opacity',
|
|
638
|
-
type: 'number',
|
|
639
|
-
typeOptions: { minValue: 0, maxValue: 100 },
|
|
640
|
-
default: 100,
|
|
641
|
-
description: 'Artwork opacity from 0 to 100',
|
|
642
|
-
},
|
|
643
|
-
{
|
|
644
|
-
displayName: 'Saturation',
|
|
645
|
-
name: 'saturation',
|
|
646
|
-
type: 'number',
|
|
647
|
-
typeOptions: { minValue: -100, maxValue: 100 },
|
|
648
|
-
default: 0,
|
|
649
|
-
description: 'Saturation adjustment from -100 to 100',
|
|
650
|
-
},
|
|
651
|
-
{
|
|
652
|
-
displayName: 'Vibrance',
|
|
653
|
-
name: 'vibrance',
|
|
654
|
-
type: 'number',
|
|
655
|
-
typeOptions: { minValue: -100, maxValue: 100 },
|
|
656
|
-
default: 0,
|
|
657
|
-
description: 'Vibrance adjustment from -100 to 100',
|
|
658
|
-
},
|
|
659
|
-
{
|
|
660
|
-
displayName: 'Blur',
|
|
661
|
-
name: 'blur',
|
|
662
|
-
type: 'number',
|
|
663
|
-
typeOptions: { minValue: 0, maxValue: 100 },
|
|
664
|
-
default: 0,
|
|
665
|
-
description: 'Gaussian blur amount from 0 to 100',
|
|
666
|
-
},
|
|
667
|
-
{
|
|
668
|
-
displayName: 'Blend Mode',
|
|
669
|
-
name: 'blend_mode',
|
|
670
|
-
type: 'options',
|
|
671
|
-
options: [
|
|
672
|
-
{ name: 'Multiply', value: 'multiply' },
|
|
673
|
-
{ name: 'Normal', value: 'normal' },
|
|
674
|
-
],
|
|
675
|
-
default: 'multiply',
|
|
676
|
-
description: 'Artwork blend mode for the product surface',
|
|
630
|
+
displayName: 'Full-Surface UUID',
|
|
631
|
+
name: 'surfaceUuid',
|
|
632
|
+
type: 'string',
|
|
633
|
+
required: true,
|
|
634
|
+
displayOptions: {
|
|
635
|
+
show: {
|
|
636
|
+
targetType: ['fullSurface'],
|
|
677
637
|
},
|
|
678
|
-
|
|
638
|
+
},
|
|
639
|
+
default: '',
|
|
640
|
+
description: 'The surface_uuid returned in data.surfaces by 2D: Get Mockup',
|
|
679
641
|
},
|
|
680
642
|
{
|
|
681
643
|
displayName: 'Placement',
|
|
@@ -685,24 +647,6 @@ class SudoMock {
|
|
|
685
647
|
default: {},
|
|
686
648
|
description: 'Artwork position and size settings for this print area',
|
|
687
649
|
options: [
|
|
688
|
-
{
|
|
689
|
-
displayName: 'Position',
|
|
690
|
-
name: 'position',
|
|
691
|
-
type: 'options',
|
|
692
|
-
options: [
|
|
693
|
-
{ name: 'Top Left', value: 'top_left' },
|
|
694
|
-
{ name: 'Top Center', value: 'top_center' },
|
|
695
|
-
{ name: 'Top Right', value: 'top_right' },
|
|
696
|
-
{ name: 'Center Left', value: 'center_left' },
|
|
697
|
-
{ name: 'Center', value: 'center' },
|
|
698
|
-
{ name: 'Center Right', value: 'center_right' },
|
|
699
|
-
{ name: 'Bottom Left', value: 'bottom_left' },
|
|
700
|
-
{ name: 'Bottom Center', value: 'bottom_center' },
|
|
701
|
-
{ name: 'Bottom Right', value: 'bottom_right' },
|
|
702
|
-
],
|
|
703
|
-
default: 'center',
|
|
704
|
-
description: 'Predefined artwork position in the print area',
|
|
705
|
-
},
|
|
706
650
|
{
|
|
707
651
|
displayName: 'Coverage',
|
|
708
652
|
name: 'coverage',
|
|
@@ -724,11 +668,44 @@ class SudoMock {
|
|
|
724
668
|
description: 'How the artwork fits within the print area',
|
|
725
669
|
},
|
|
726
670
|
{
|
|
727
|
-
displayName: '
|
|
728
|
-
name: '
|
|
671
|
+
displayName: 'Height',
|
|
672
|
+
name: 'height',
|
|
729
673
|
type: 'number',
|
|
730
|
-
|
|
731
|
-
|
|
674
|
+
typeOptions: { minValue: 1, maxValue: 30000 },
|
|
675
|
+
default: 1000,
|
|
676
|
+
description: 'Artwork height in print-area pixels. Add Width alongside it. Adding only one of the two is rejected rather than silently completed, so the aspect ratio is never guessed for you.',
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
displayName: 'Offset X',
|
|
680
|
+
name: 'offset_x',
|
|
681
|
+
type: 'number',
|
|
682
|
+
default: 0,
|
|
683
|
+
description: 'Horizontal artwork offset in pixels',
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
displayName: 'Offset Y',
|
|
687
|
+
name: 'offset_y',
|
|
688
|
+
type: 'number',
|
|
689
|
+
default: 0,
|
|
690
|
+
description: 'Vertical artwork offset in pixels',
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
displayName: 'Position',
|
|
694
|
+
name: 'position',
|
|
695
|
+
type: 'options',
|
|
696
|
+
options: [
|
|
697
|
+
{ name: 'Bottom Center', value: 'bottom_center' },
|
|
698
|
+
{ name: 'Bottom Left', value: 'bottom_left' },
|
|
699
|
+
{ name: 'Bottom Right', value: 'bottom_right' },
|
|
700
|
+
{ name: 'Center', value: 'center' },
|
|
701
|
+
{ name: 'Center Left', value: 'center_left' },
|
|
702
|
+
{ name: 'Center Right', value: 'center_right' },
|
|
703
|
+
{ name: 'Top Center', value: 'top_center' },
|
|
704
|
+
{ name: 'Top Left', value: 'top_left' },
|
|
705
|
+
{ name: 'Top Right', value: 'top_right' },
|
|
706
|
+
],
|
|
707
|
+
default: 'center',
|
|
708
|
+
description: 'Predefined artwork position in the print area',
|
|
732
709
|
},
|
|
733
710
|
{
|
|
734
711
|
displayName: 'Rotation',
|
|
@@ -738,20 +715,53 @@ class SudoMock {
|
|
|
738
715
|
description: 'Artwork rotation in degrees',
|
|
739
716
|
},
|
|
740
717
|
{
|
|
741
|
-
displayName: '
|
|
742
|
-
name: '
|
|
718
|
+
displayName: 'Width',
|
|
719
|
+
name: 'width',
|
|
743
720
|
type: 'number',
|
|
744
|
-
|
|
745
|
-
|
|
721
|
+
typeOptions: { minValue: 1, maxValue: 30000 },
|
|
722
|
+
default: 1000,
|
|
723
|
+
description: 'Artwork width in print-area pixels. Add Height alongside it; the pair overrides Coverage and Fit. Width and Height are independent, so any aspect ratio is allowed.',
|
|
724
|
+
},
|
|
725
|
+
],
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
displayName: 'Remove Background',
|
|
729
|
+
name: 'removeBackground',
|
|
730
|
+
type: 'boolean',
|
|
731
|
+
default: false,
|
|
732
|
+
description: 'Whether to remove the artwork background before placing it. Adds 25 credits per artwork.',
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
displayName: 'Saved Print Area UUID',
|
|
736
|
+
name: 'uuid',
|
|
737
|
+
type: 'string',
|
|
738
|
+
required: true,
|
|
739
|
+
displayOptions: {
|
|
740
|
+
show: {
|
|
741
|
+
targetType: ['savedPrintArea'],
|
|
742
|
+
},
|
|
743
|
+
},
|
|
744
|
+
default: '',
|
|
745
|
+
description: 'The print_area_id returned in data.quads by 2D: Get Mockup',
|
|
746
|
+
},
|
|
747
|
+
{
|
|
748
|
+
displayName: 'Target Type',
|
|
749
|
+
name: 'targetType',
|
|
750
|
+
type: 'options',
|
|
751
|
+
options: [
|
|
752
|
+
{
|
|
753
|
+
name: 'Saved Print Area',
|
|
754
|
+
value: 'savedPrintArea',
|
|
755
|
+
description: 'Target a saved print area returned in data.quads',
|
|
746
756
|
},
|
|
747
757
|
{
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
default: 0,
|
|
752
|
-
description: 'Vertical artwork offset in pixels',
|
|
758
|
+
name: 'Full Surface',
|
|
759
|
+
value: 'fullSurface',
|
|
760
|
+
description: 'Target a full surface returned in data.surfaces',
|
|
753
761
|
},
|
|
754
762
|
],
|
|
763
|
+
default: 'savedPrintArea',
|
|
764
|
+
description: 'Whether this artwork targets a saved area or a full surface',
|
|
755
765
|
},
|
|
756
766
|
],
|
|
757
767
|
},
|
|
@@ -947,22 +957,60 @@ class SudoMock {
|
|
|
947
957
|
default: {},
|
|
948
958
|
options: [
|
|
949
959
|
{
|
|
950
|
-
displayName: '
|
|
951
|
-
name: '
|
|
960
|
+
displayName: 'Base64 Image',
|
|
961
|
+
name: 'base64',
|
|
962
|
+
type: 'string',
|
|
963
|
+
default: '',
|
|
964
|
+
description: 'Raw base64-encoded image bytes (no data: prefix). Alternative to Design URL; eliminates server-side download latency. If set, takes priority over the URL.',
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
displayName: 'Blur',
|
|
968
|
+
name: 'blur',
|
|
952
969
|
type: 'number',
|
|
953
970
|
typeOptions: {
|
|
954
|
-
minValue:
|
|
955
|
-
maxValue:
|
|
971
|
+
minValue: 0,
|
|
972
|
+
maxValue: 100,
|
|
956
973
|
},
|
|
957
974
|
default: 0,
|
|
958
|
-
description: '
|
|
975
|
+
description: 'Gaussian blur amount (0=sharp, 100=max blur)',
|
|
959
976
|
},
|
|
960
977
|
{
|
|
961
|
-
displayName: '
|
|
962
|
-
name: '
|
|
963
|
-
type: '
|
|
978
|
+
displayName: 'Brightness',
|
|
979
|
+
name: 'brightness',
|
|
980
|
+
type: 'number',
|
|
981
|
+
typeOptions: {
|
|
982
|
+
minValue: -150,
|
|
983
|
+
maxValue: 150,
|
|
984
|
+
},
|
|
985
|
+
default: 0,
|
|
986
|
+
description: 'Brightness adjustment (-150 to 150)',
|
|
987
|
+
},
|
|
988
|
+
{
|
|
989
|
+
displayName: 'Color Blend Mode',
|
|
990
|
+
name: 'colorBlendMode',
|
|
991
|
+
type: 'options',
|
|
992
|
+
options: [
|
|
993
|
+
{ name: 'Color Burn', value: 'color-burn' },
|
|
994
|
+
{ name: 'Color Dodge', value: 'color-dodge' },
|
|
995
|
+
{ name: 'Darken', value: 'darken' },
|
|
996
|
+
{ name: 'Hard Light', value: 'hard-light' },
|
|
997
|
+
{ name: 'Lighten', value: 'lighten' },
|
|
998
|
+
{ name: 'Multiply', value: 'multiply' },
|
|
999
|
+
{ name: 'Normal', value: 'normal' },
|
|
1000
|
+
{ name: 'Overlay', value: 'overlay' },
|
|
1001
|
+
{ name: 'Screen', value: 'screen' },
|
|
1002
|
+
{ name: 'Soft Light', value: 'soft-light' },
|
|
1003
|
+
],
|
|
1004
|
+
default: 'normal',
|
|
1005
|
+
description: 'Blend mode for color overlay',
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
displayName: 'Color Overlay (Hex)',
|
|
1009
|
+
name: 'colorHex',
|
|
1010
|
+
type: 'color',
|
|
964
1011
|
default: '',
|
|
965
|
-
|
|
1012
|
+
placeholder: '#FF5733',
|
|
1013
|
+
description: 'Apply color overlay to the design',
|
|
966
1014
|
},
|
|
967
1015
|
{
|
|
968
1016
|
displayName: 'Content Type',
|
|
@@ -978,14 +1026,15 @@ class SudoMock {
|
|
|
978
1026
|
description: 'MIME type of the Base64 Image. Defaults to image/png if omitted.',
|
|
979
1027
|
},
|
|
980
1028
|
{
|
|
981
|
-
displayName: '
|
|
982
|
-
name: '
|
|
1029
|
+
displayName: 'Contrast',
|
|
1030
|
+
name: 'contrast',
|
|
983
1031
|
type: 'number',
|
|
984
1032
|
typeOptions: {
|
|
985
|
-
minValue:
|
|
1033
|
+
minValue: -100,
|
|
1034
|
+
maxValue: 100,
|
|
986
1035
|
},
|
|
987
1036
|
default: 0,
|
|
988
|
-
description: '
|
|
1037
|
+
description: 'Contrast adjustment (-100 to 100)',
|
|
989
1038
|
},
|
|
990
1039
|
{
|
|
991
1040
|
displayName: 'Custom Height',
|
|
@@ -998,11 +1047,25 @@ class SudoMock {
|
|
|
998
1047
|
description: 'Custom asset height override in pixels. 0 = use smart object bounds.',
|
|
999
1048
|
},
|
|
1000
1049
|
{
|
|
1001
|
-
displayName: '
|
|
1002
|
-
name: '
|
|
1050
|
+
displayName: 'Custom Width',
|
|
1051
|
+
name: 'sizeWidth',
|
|
1003
1052
|
type: 'number',
|
|
1053
|
+
typeOptions: {
|
|
1054
|
+
minValue: 1,
|
|
1055
|
+
},
|
|
1004
1056
|
default: 0,
|
|
1005
|
-
description: 'Custom
|
|
1057
|
+
description: 'Custom asset width override in pixels. 0 = use smart object bounds.',
|
|
1058
|
+
},
|
|
1059
|
+
{
|
|
1060
|
+
displayName: 'Opacity',
|
|
1061
|
+
name: 'opacity',
|
|
1062
|
+
type: 'number',
|
|
1063
|
+
typeOptions: {
|
|
1064
|
+
minValue: 0,
|
|
1065
|
+
maxValue: 100,
|
|
1066
|
+
},
|
|
1067
|
+
default: 100,
|
|
1068
|
+
description: 'Layer opacity (0-100)',
|
|
1006
1069
|
},
|
|
1007
1070
|
{
|
|
1008
1071
|
displayName: 'Position Left',
|
|
@@ -1011,6 +1074,13 @@ class SudoMock {
|
|
|
1011
1074
|
default: 0,
|
|
1012
1075
|
description: 'Custom position left offset in pixels',
|
|
1013
1076
|
},
|
|
1077
|
+
{
|
|
1078
|
+
displayName: 'Position Top',
|
|
1079
|
+
name: 'positionTop',
|
|
1080
|
+
type: 'number',
|
|
1081
|
+
default: 0,
|
|
1082
|
+
description: 'Custom position top offset in pixels',
|
|
1083
|
+
},
|
|
1014
1084
|
{
|
|
1015
1085
|
displayName: 'Remove Background',
|
|
1016
1086
|
name: 'removeBackground',
|
|
@@ -1019,64 +1089,15 @@ class SudoMock {
|
|
|
1019
1089
|
description: 'Whether to remove the artwork background before placing it. Adds 25 credits per artwork.',
|
|
1020
1090
|
},
|
|
1021
1091
|
{
|
|
1022
|
-
displayName: '
|
|
1023
|
-
name: '
|
|
1024
|
-
type: 'string',
|
|
1025
|
-
default: '',
|
|
1026
|
-
placeholder: '#FF5733',
|
|
1027
|
-
description: 'Apply color overlay to the design',
|
|
1028
|
-
},
|
|
1029
|
-
{
|
|
1030
|
-
displayName: 'Color Blend Mode',
|
|
1031
|
-
name: 'colorBlendMode',
|
|
1032
|
-
type: 'options',
|
|
1033
|
-
options: [
|
|
1034
|
-
{ name: 'Normal', value: 'normal' },
|
|
1035
|
-
{ name: 'Multiply', value: 'multiply' },
|
|
1036
|
-
{ name: 'Screen', value: 'screen' },
|
|
1037
|
-
{ name: 'Overlay', value: 'overlay' },
|
|
1038
|
-
{ name: 'Darken', value: 'darken' },
|
|
1039
|
-
{ name: 'Lighten', value: 'lighten' },
|
|
1040
|
-
{ name: 'Color Dodge', value: 'color-dodge' },
|
|
1041
|
-
{ name: 'Color Burn', value: 'color-burn' },
|
|
1042
|
-
{ name: 'Hard Light', value: 'hard-light' },
|
|
1043
|
-
{ name: 'Soft Light', value: 'soft-light' },
|
|
1044
|
-
],
|
|
1045
|
-
default: 'normal',
|
|
1046
|
-
description: 'Blend mode for color overlay',
|
|
1047
|
-
},
|
|
1048
|
-
{
|
|
1049
|
-
displayName: 'Brightness',
|
|
1050
|
-
name: 'brightness',
|
|
1051
|
-
type: 'number',
|
|
1052
|
-
typeOptions: {
|
|
1053
|
-
minValue: -150,
|
|
1054
|
-
maxValue: 150,
|
|
1055
|
-
},
|
|
1056
|
-
default: 0,
|
|
1057
|
-
description: 'Brightness adjustment (-150 to 150)',
|
|
1058
|
-
},
|
|
1059
|
-
{
|
|
1060
|
-
displayName: 'Contrast',
|
|
1061
|
-
name: 'contrast',
|
|
1092
|
+
displayName: 'Rotation',
|
|
1093
|
+
name: 'rotate',
|
|
1062
1094
|
type: 'number',
|
|
1063
1095
|
typeOptions: {
|
|
1064
|
-
minValue: -
|
|
1065
|
-
maxValue:
|
|
1096
|
+
minValue: -360,
|
|
1097
|
+
maxValue: 360,
|
|
1066
1098
|
},
|
|
1067
1099
|
default: 0,
|
|
1068
|
-
description: '
|
|
1069
|
-
},
|
|
1070
|
-
{
|
|
1071
|
-
displayName: 'Opacity',
|
|
1072
|
-
name: 'opacity',
|
|
1073
|
-
type: 'number',
|
|
1074
|
-
typeOptions: {
|
|
1075
|
-
minValue: 0,
|
|
1076
|
-
maxValue: 100,
|
|
1077
|
-
},
|
|
1078
|
-
default: 100,
|
|
1079
|
-
description: 'Layer opacity (0-100)',
|
|
1100
|
+
description: 'Rotation angle in degrees',
|
|
1080
1101
|
},
|
|
1081
1102
|
{
|
|
1082
1103
|
displayName: 'Saturation',
|
|
@@ -1100,17 +1121,6 @@ class SudoMock {
|
|
|
1100
1121
|
default: 0,
|
|
1101
1122
|
description: 'Vibrance adjustment (-100 to 100). Similar to saturation but preserves skin tones.',
|
|
1102
1123
|
},
|
|
1103
|
-
{
|
|
1104
|
-
displayName: 'Blur',
|
|
1105
|
-
name: 'blur',
|
|
1106
|
-
type: 'number',
|
|
1107
|
-
typeOptions: {
|
|
1108
|
-
minValue: 0,
|
|
1109
|
-
maxValue: 100,
|
|
1110
|
-
},
|
|
1111
|
-
default: 0,
|
|
1112
|
-
description: 'Gaussian blur amount (0=sharp, 100=max blur)',
|
|
1113
|
-
},
|
|
1114
1124
|
],
|
|
1115
1125
|
},
|
|
1116
1126
|
],
|
|
@@ -1137,6 +1147,24 @@ class SudoMock {
|
|
|
1137
1147
|
},
|
|
1138
1148
|
default: {},
|
|
1139
1149
|
options: [
|
|
1150
|
+
{
|
|
1151
|
+
displayName: 'DPI',
|
|
1152
|
+
name: 'dpi',
|
|
1153
|
+
type: 'number',
|
|
1154
|
+
typeOptions: {
|
|
1155
|
+
minValue: 72,
|
|
1156
|
+
maxValue: 2400,
|
|
1157
|
+
},
|
|
1158
|
+
default: 300,
|
|
1159
|
+
description: 'Print resolution 72-2400. Embeds a resolution tag in output metadata (JPEG/PNG/WebP). Does not change pixel count, image_size controls that (for a true print file: image_size = print inches x dpi). jpg/png recommended for max compatibility. Leave unset for web mockups.',
|
|
1160
|
+
},
|
|
1161
|
+
{
|
|
1162
|
+
displayName: 'Export Label',
|
|
1163
|
+
name: 'exportLabel',
|
|
1164
|
+
type: 'string',
|
|
1165
|
+
default: '',
|
|
1166
|
+
description: 'Optional label for the output file naming',
|
|
1167
|
+
},
|
|
1140
1168
|
{
|
|
1141
1169
|
displayName: 'Image Format',
|
|
1142
1170
|
name: 'imageFormat',
|
|
@@ -1182,24 +1210,6 @@ class SudoMock {
|
|
|
1182
1210
|
default: 90,
|
|
1183
1211
|
description: 'Quality for JPG/WebP output (1-100). Ignored for PNG (always lossless).',
|
|
1184
1212
|
},
|
|
1185
|
-
{
|
|
1186
|
-
displayName: 'DPI',
|
|
1187
|
-
name: 'dpi',
|
|
1188
|
-
type: 'number',
|
|
1189
|
-
typeOptions: {
|
|
1190
|
-
minValue: 72,
|
|
1191
|
-
maxValue: 2400,
|
|
1192
|
-
},
|
|
1193
|
-
default: 300,
|
|
1194
|
-
description: 'Print resolution 72-2400. Embeds a resolution tag in output metadata (JPEG/PNG/WebP). Does not change pixel count, image_size controls that (for a true print file: image_size = print inches x dpi). jpg/png recommended for max compatibility. Leave unset for web mockups.',
|
|
1195
|
-
},
|
|
1196
|
-
{
|
|
1197
|
-
displayName: 'Export Label',
|
|
1198
|
-
name: 'exportLabel',
|
|
1199
|
-
type: 'string',
|
|
1200
|
-
default: '',
|
|
1201
|
-
description: 'Optional label for the output file naming',
|
|
1202
|
-
},
|
|
1203
1213
|
],
|
|
1204
1214
|
},
|
|
1205
1215
|
{
|
|
@@ -1405,7 +1415,7 @@ class SudoMock {
|
|
|
1405
1415
|
type: 'string',
|
|
1406
1416
|
default: '',
|
|
1407
1417
|
placeholder: 'kling-v3-pro',
|
|
1408
|
-
description: 'Optional override to pin a specific model from the roster (veo-3.1-fast, kling-v3-pro, kling-2.6-pro, seedance-2.0, wan-2.5). Leave empty to let SudoMock auto-pick by plan tier. An unknown
|
|
1418
|
+
description: 'Optional override to pin a specific model from the roster (veo-3.1-fast, kling-v3-pro, kling-2.6-pro, seedance-2.0, wan-2.5). Leave empty to let SudoMock auto-pick by plan tier. An unknown ID returns a 400 error.',
|
|
1409
1419
|
},
|
|
1410
1420
|
],
|
|
1411
1421
|
},
|
|
@@ -1502,11 +1512,11 @@ class SudoMock {
|
|
|
1502
1512
|
name: 'kind',
|
|
1503
1513
|
type: 'options',
|
|
1504
1514
|
options: [
|
|
1515
|
+
{ name: '2D Create', value: '2d_create' },
|
|
1516
|
+
{ name: '2D Render', value: '2d_render' },
|
|
1505
1517
|
{ name: 'Render', value: 'render' },
|
|
1506
1518
|
{ name: 'Upload', value: 'upload' },
|
|
1507
1519
|
{ name: 'Video', value: 'video' },
|
|
1508
|
-
{ name: '2D Create', value: '2d_create' },
|
|
1509
|
-
{ name: '2D Render', value: '2d_render' },
|
|
1510
1520
|
],
|
|
1511
1521
|
default: 'render',
|
|
1512
1522
|
description: 'Only return jobs of this kind',
|
|
@@ -1526,7 +1536,7 @@ class SudoMock {
|
|
|
1526
1536
|
minValue: 1,
|
|
1527
1537
|
maxValue: 50,
|
|
1528
1538
|
},
|
|
1529
|
-
default:
|
|
1539
|
+
default: 50,
|
|
1530
1540
|
description: 'Max number of results to return',
|
|
1531
1541
|
},
|
|
1532
1542
|
{
|
|
@@ -1576,6 +1586,12 @@ class SudoMock {
|
|
|
1576
1586
|
displayOptions: { show: { operation: ['listFonts'] } },
|
|
1577
1587
|
default: {},
|
|
1578
1588
|
options: [
|
|
1589
|
+
{
|
|
1590
|
+
displayName: 'Category',
|
|
1591
|
+
name: 'category',
|
|
1592
|
+
type: 'string',
|
|
1593
|
+
default: '',
|
|
1594
|
+
},
|
|
1579
1595
|
{
|
|
1580
1596
|
displayName: 'Page',
|
|
1581
1597
|
name: 'page',
|
|
@@ -1590,19 +1606,6 @@ class SudoMock {
|
|
|
1590
1606
|
typeOptions: { minValue: 1, maxValue: 100 },
|
|
1591
1607
|
default: 50,
|
|
1592
1608
|
},
|
|
1593
|
-
{
|
|
1594
|
-
displayName: 'Category',
|
|
1595
|
-
name: 'category',
|
|
1596
|
-
type: 'string',
|
|
1597
|
-
default: '',
|
|
1598
|
-
},
|
|
1599
|
-
{
|
|
1600
|
-
displayName: 'Search',
|
|
1601
|
-
name: 'search',
|
|
1602
|
-
type: 'string',
|
|
1603
|
-
default: '',
|
|
1604
|
-
description: 'Filter by font family name',
|
|
1605
|
-
},
|
|
1606
1609
|
{
|
|
1607
1610
|
displayName: 'Scope',
|
|
1608
1611
|
name: 'scope',
|
|
@@ -1614,6 +1617,13 @@ class SudoMock {
|
|
|
1614
1617
|
],
|
|
1615
1618
|
default: 'all',
|
|
1616
1619
|
},
|
|
1620
|
+
{
|
|
1621
|
+
displayName: 'Search',
|
|
1622
|
+
name: 'search',
|
|
1623
|
+
type: 'string',
|
|
1624
|
+
default: '',
|
|
1625
|
+
description: 'Filter by font family name',
|
|
1626
|
+
},
|
|
1617
1627
|
],
|
|
1618
1628
|
},
|
|
1619
1629
|
// ============================================
|
|
@@ -1823,7 +1833,7 @@ class SudoMock {
|
|
|
1823
1833
|
maxValue: 200,
|
|
1824
1834
|
},
|
|
1825
1835
|
default: 50,
|
|
1826
|
-
description: 'Max number of results to return
|
|
1836
|
+
description: 'Max number of results to return',
|
|
1827
1837
|
},
|
|
1828
1838
|
],
|
|
1829
1839
|
},
|
|
@@ -1868,8 +1878,8 @@ class SudoMock {
|
|
|
1868
1878
|
minValue: 1,
|
|
1869
1879
|
maxValue: 200,
|
|
1870
1880
|
},
|
|
1871
|
-
default:
|
|
1872
|
-
description: 'Max number of results to return
|
|
1881
|
+
default: 50,
|
|
1882
|
+
description: 'Max number of results to return',
|
|
1873
1883
|
},
|
|
1874
1884
|
],
|
|
1875
1885
|
},
|
|
@@ -1902,8 +1912,8 @@ class SudoMock {
|
|
|
1902
1912
|
minValue: 1,
|
|
1903
1913
|
maxValue: 100,
|
|
1904
1914
|
},
|
|
1905
|
-
default:
|
|
1906
|
-
description: 'Max number of results to return
|
|
1915
|
+
default: 50,
|
|
1916
|
+
description: 'Max number of results to return',
|
|
1907
1917
|
},
|
|
1908
1918
|
{
|
|
1909
1919
|
displayName: 'Additional Options',
|
|
@@ -1917,13 +1927,6 @@ class SudoMock {
|
|
|
1917
1927
|
},
|
|
1918
1928
|
default: {},
|
|
1919
1929
|
options: [
|
|
1920
|
-
{
|
|
1921
|
-
displayName: 'Filter by Name',
|
|
1922
|
-
name: 'name',
|
|
1923
|
-
type: 'string',
|
|
1924
|
-
default: '',
|
|
1925
|
-
description: 'Filter mockups by name (case-insensitive, partial match)',
|
|
1926
|
-
},
|
|
1927
1930
|
{
|
|
1928
1931
|
displayName: 'Created After',
|
|
1929
1932
|
name: 'created_after',
|
|
@@ -1938,6 +1941,13 @@ class SudoMock {
|
|
|
1938
1941
|
default: '',
|
|
1939
1942
|
description: 'Filter mockups created before this date',
|
|
1940
1943
|
},
|
|
1944
|
+
{
|
|
1945
|
+
displayName: 'Filter by Name',
|
|
1946
|
+
name: 'name',
|
|
1947
|
+
type: 'string',
|
|
1948
|
+
default: '',
|
|
1949
|
+
description: 'Filter mockups by name (case-insensitive, partial match)',
|
|
1950
|
+
},
|
|
1941
1951
|
{
|
|
1942
1952
|
displayName: 'Sort By',
|
|
1943
1953
|
name: 'sort',
|
|
@@ -2335,7 +2345,7 @@ class SudoMock {
|
|
|
2335
2345
|
body.mockup_uuid = this.getNodeParameter('artworkDeleteMockupUuid', i);
|
|
2336
2346
|
}
|
|
2337
2347
|
else {
|
|
2338
|
-
const urls = parseJsonArray(this.getNodeParameter('artworkDeleteUrls', i, []), 'URLs');
|
|
2348
|
+
const urls = parseJsonArray.call(this, this.getNodeParameter('artworkDeleteUrls', i, []), 'URLs');
|
|
2339
2349
|
if (urls.length === 0 || !urls.every((url) => typeof url === 'string')) {
|
|
2340
2350
|
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'URLs must contain at least one URL');
|
|
2341
2351
|
}
|
|
@@ -2358,7 +2368,7 @@ class SudoMock {
|
|
|
2358
2368
|
else if (operation === 'render') {
|
|
2359
2369
|
const mockupUuid = this.getNodeParameter('mockupUuid', i);
|
|
2360
2370
|
const smartObjectsData = this.getNodeParameter('smartObjects.items', i, []);
|
|
2361
|
-
const textLayers = parseJsonArray(this.getNodeParameter('textLayers', i, []), 'Text Layers');
|
|
2371
|
+
const textLayers = parseJsonArray.call(this, this.getNodeParameter('textLayers', i, []), 'Text Layers');
|
|
2362
2372
|
const exportOptions = this.getNodeParameter('exportOptions', i, {});
|
|
2363
2373
|
// Convert smart objects array to API format
|
|
2364
2374
|
const smartObjects = smartObjectsData.map((so) => {
|
|
@@ -14,6 +14,7 @@ class SudoMockTrigger {
|
|
|
14
14
|
icon: 'file:sudomock.svg',
|
|
15
15
|
group: ['trigger'],
|
|
16
16
|
version: 1,
|
|
17
|
+
subtitle: '={{$parameter["events"].length > 0 ? $parameter["events"].join(", ") : "All events"}}',
|
|
17
18
|
description: 'Start a workflow when a SudoMock job or test event finishes',
|
|
18
19
|
defaults: { name: 'SudoMock Trigger' },
|
|
19
20
|
inputs: [],
|
|
@@ -53,8 +54,9 @@ class SudoMockTrigger {
|
|
|
53
54
|
return true;
|
|
54
55
|
}
|
|
55
56
|
catch (error) {
|
|
56
|
-
if (Number(error.statusCode) !== 404)
|
|
57
|
-
throw error;
|
|
57
|
+
if (Number(error.statusCode) !== 404) {
|
|
58
|
+
throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
|
|
59
|
+
}
|
|
58
60
|
delete data.webhookId;
|
|
59
61
|
delete data.webhookSecret;
|
|
60
62
|
return false;
|
|
@@ -91,8 +93,8 @@ class SudoMockTrigger {
|
|
|
91
93
|
url: `${API_URL}/${data.webhookId}`,
|
|
92
94
|
});
|
|
93
95
|
}
|
|
94
|
-
catch {
|
|
95
|
-
|
|
96
|
+
catch (error) {
|
|
97
|
+
throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
|
|
96
98
|
}
|
|
97
99
|
delete data.webhookId;
|
|
98
100
|
delete data.webhookSecret;
|