n8n-nodes-h2i 1.0.2 → 1.0.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/dist/nodes/DavixH2I/DavixH2I.node.js +459 -497
- package/package.json +1 -1
|
@@ -35,6 +35,7 @@ class DavixH2I {
|
|
|
35
35
|
name: 'resource',
|
|
36
36
|
type: 'options',
|
|
37
37
|
default: 'h2i',
|
|
38
|
+
description: 'Choose which PixLab endpoint to call (H2I, Image, PDF, or Tools). Sends action-specific parameters to that resource.',
|
|
38
39
|
options: [
|
|
39
40
|
{ name: 'H2I (HTML → Image)', value: 'h2i' },
|
|
40
41
|
{ name: 'Image (Transform / Export PDF)', value: 'image' },
|
|
@@ -49,6 +50,7 @@ class DavixH2I {
|
|
|
49
50
|
type: 'options',
|
|
50
51
|
default: 'image',
|
|
51
52
|
displayOptions: { show: { resource: ['h2i'] } },
|
|
53
|
+
description: 'Select the PixLab H2I action. The node sends action=image or action=pdf accordingly.',
|
|
52
54
|
options: [
|
|
53
55
|
{ name: 'Render HTML to Image', value: 'image' },
|
|
54
56
|
{ name: 'Render HTML to PDF', value: 'pdf' },
|
|
@@ -61,6 +63,7 @@ class DavixH2I {
|
|
|
61
63
|
type: 'options',
|
|
62
64
|
default: 'format',
|
|
63
65
|
displayOptions: { show: { resource: ['image'] } },
|
|
66
|
+
description: 'Select the PixLab Image action to run (sent as action=<value>).',
|
|
64
67
|
options: [
|
|
65
68
|
{ name: 'Format', value: 'format' },
|
|
66
69
|
{ name: 'Resize', value: 'resize' },
|
|
@@ -84,6 +87,7 @@ class DavixH2I {
|
|
|
84
87
|
type: 'options',
|
|
85
88
|
default: 'merge',
|
|
86
89
|
displayOptions: { show: { resource: ['pdf'] } },
|
|
90
|
+
description: 'Select the PixLab PDF action to run (sent as action=<value>).',
|
|
87
91
|
options: [
|
|
88
92
|
{ name: 'To Images', value: 'to-images' },
|
|
89
93
|
{ name: 'Merge', value: 'merge' },
|
|
@@ -108,6 +112,7 @@ class DavixH2I {
|
|
|
108
112
|
type: 'options',
|
|
109
113
|
default: 'single',
|
|
110
114
|
displayOptions: { show: { resource: ['tools'] } },
|
|
115
|
+
description: 'Select whether to run one tool or multiple tools in a single PixLab Tools request.',
|
|
111
116
|
options: [
|
|
112
117
|
{ name: 'Single Tool', value: 'single' },
|
|
113
118
|
{ name: 'Multitask', value: 'multitask' },
|
|
@@ -123,6 +128,8 @@ class DavixH2I {
|
|
|
123
128
|
default: '',
|
|
124
129
|
required: true,
|
|
125
130
|
typeOptions: { rows: 6 },
|
|
131
|
+
placeholder: '<div>Hello</div>',
|
|
132
|
+
description: 'HTML markup to render via PixLab H2I.',
|
|
126
133
|
displayOptions: { show: { resource: ['h2i'], operation: ['image', 'pdf'] } },
|
|
127
134
|
},
|
|
128
135
|
{
|
|
@@ -131,6 +138,8 @@ class DavixH2I {
|
|
|
131
138
|
type: 'string',
|
|
132
139
|
default: '',
|
|
133
140
|
typeOptions: { rows: 4 },
|
|
141
|
+
placeholder: 'body { background: #fff; }',
|
|
142
|
+
description: 'Optional CSS styles applied to the HTML before rendering.',
|
|
134
143
|
displayOptions: { show: { resource: ['h2i'], operation: ['image', 'pdf'] } },
|
|
135
144
|
},
|
|
136
145
|
{
|
|
@@ -138,6 +147,7 @@ class DavixH2I {
|
|
|
138
147
|
name: 'width',
|
|
139
148
|
type: 'number',
|
|
140
149
|
default: 1000,
|
|
150
|
+
description: 'Output width in pixels.',
|
|
141
151
|
displayOptions: { show: { resource: ['h2i'], operation: ['image', 'pdf'] } },
|
|
142
152
|
},
|
|
143
153
|
{
|
|
@@ -145,6 +155,7 @@ class DavixH2I {
|
|
|
145
155
|
name: 'height',
|
|
146
156
|
type: 'number',
|
|
147
157
|
default: 1500,
|
|
158
|
+
description: 'Output height in pixels.',
|
|
148
159
|
displayOptions: { show: { resource: ['h2i'], operation: ['image', 'pdf'] } },
|
|
149
160
|
},
|
|
150
161
|
{
|
|
@@ -152,6 +163,7 @@ class DavixH2I {
|
|
|
152
163
|
name: 'format',
|
|
153
164
|
type: 'options',
|
|
154
165
|
default: 'png',
|
|
166
|
+
description: 'Image format when rendering HTML to an image.',
|
|
155
167
|
options: [
|
|
156
168
|
{ name: 'PNG', value: 'png' },
|
|
157
169
|
{ name: 'JPEG', value: 'jpeg' },
|
|
@@ -163,6 +175,7 @@ class DavixH2I {
|
|
|
163
175
|
name: 'h2iPdfPageSize',
|
|
164
176
|
type: 'options',
|
|
165
177
|
default: 'auto',
|
|
178
|
+
description: 'Page size when rendering HTML to PDF.',
|
|
166
179
|
options: [
|
|
167
180
|
{ name: 'Auto', value: 'auto' },
|
|
168
181
|
{ name: 'A4', value: 'a4' },
|
|
@@ -175,6 +188,7 @@ class DavixH2I {
|
|
|
175
188
|
name: 'h2iPdfOrientation',
|
|
176
189
|
type: 'options',
|
|
177
190
|
default: 'portrait',
|
|
191
|
+
description: 'PDF orientation for H2I PDF output.',
|
|
178
192
|
options: [
|
|
179
193
|
{ name: 'Portrait', value: 'portrait' },
|
|
180
194
|
{ name: 'Landscape', value: 'landscape' },
|
|
@@ -186,6 +200,7 @@ class DavixH2I {
|
|
|
186
200
|
name: 'h2iPdfMargin',
|
|
187
201
|
type: 'number',
|
|
188
202
|
default: 0,
|
|
203
|
+
description: 'Page margin in pixels for H2I PDF.',
|
|
189
204
|
displayOptions: { show: { resource: ['h2i'], operation: ['pdf'] } },
|
|
190
205
|
},
|
|
191
206
|
{
|
|
@@ -193,6 +208,7 @@ class DavixH2I {
|
|
|
193
208
|
name: 'h2iPdfEmbedFormat',
|
|
194
209
|
type: 'options',
|
|
195
210
|
default: 'png',
|
|
211
|
+
description: 'Image format embedded inside the generated PDF.',
|
|
196
212
|
options: [
|
|
197
213
|
{ name: 'PNG', value: 'png' },
|
|
198
214
|
{ name: 'JPEG', value: 'jpeg' },
|
|
@@ -204,6 +220,7 @@ class DavixH2I {
|
|
|
204
220
|
name: 'h2iPdfJpegQuality',
|
|
205
221
|
type: 'number',
|
|
206
222
|
default: 85,
|
|
223
|
+
description: 'JPEG quality used when embedding images into the PDF.',
|
|
207
224
|
displayOptions: { show: { resource: ['h2i'], operation: ['pdf'] } },
|
|
208
225
|
},
|
|
209
226
|
{
|
|
@@ -211,6 +228,7 @@ class DavixH2I {
|
|
|
211
228
|
name: 'downloadBinary',
|
|
212
229
|
type: 'boolean',
|
|
213
230
|
default: false,
|
|
231
|
+
description: 'If enabled, downloads the first result URL into a binary property.',
|
|
214
232
|
displayOptions: { show: { resource: ['h2i'], operation: ['image', 'pdf'] } },
|
|
215
233
|
},
|
|
216
234
|
{
|
|
@@ -218,6 +236,7 @@ class DavixH2I {
|
|
|
218
236
|
name: 'outputBinaryProperty',
|
|
219
237
|
type: 'string',
|
|
220
238
|
default: 'data',
|
|
239
|
+
description: 'Name of the binary property to store the downloaded file.',
|
|
221
240
|
displayOptions: { show: { resource: ['h2i'], operation: ['image', 'pdf'], downloadBinary: [true] } },
|
|
222
241
|
},
|
|
223
242
|
// -------------------------
|
|
@@ -229,7 +248,7 @@ class DavixH2I {
|
|
|
229
248
|
type: 'string',
|
|
230
249
|
default: 'data',
|
|
231
250
|
placeholder: 'data OR image1,image2',
|
|
232
|
-
description: 'Comma-separated binary
|
|
251
|
+
description: 'Comma-separated binary properties containing images to upload (e.g. data,image1). Each entry is sent as an images file.',
|
|
233
252
|
displayOptions: { show: { resource: ['image'] } },
|
|
234
253
|
},
|
|
235
254
|
{
|
|
@@ -237,6 +256,7 @@ class DavixH2I {
|
|
|
237
256
|
name: 'imageFormat',
|
|
238
257
|
type: 'options',
|
|
239
258
|
default: 'webp',
|
|
259
|
+
description: 'Output image format for non-multitask actions.',
|
|
240
260
|
options: [
|
|
241
261
|
{ name: 'JPEG', value: 'jpeg' },
|
|
242
262
|
{ name: 'PNG', value: 'png' },
|
|
@@ -246,45 +266,57 @@ class DavixH2I {
|
|
|
246
266
|
{ name: 'SVG', value: 'svg' },
|
|
247
267
|
{ name: 'PDF', value: 'pdf' },
|
|
248
268
|
],
|
|
249
|
-
displayOptions: { show: { resource: ['image'] } },
|
|
269
|
+
displayOptions: { show: { resource: ['image'] }, hide: { operation: ['multitask'] } },
|
|
270
|
+
},
|
|
271
|
+
{ displayName: 'Width', name: 'imageWidth', type: 'number', default: 0, description: 'Resize width in pixels (0 to auto).', displayOptions: { show: { resource: ['image'], operation: ['resize', 'format'] } } },
|
|
272
|
+
{ displayName: 'Height', name: 'imageHeight', type: 'number', default: 0, description: 'Resize height in pixels (0 to auto).', displayOptions: { show: { resource: ['image'], operation: ['resize', 'format'] } } },
|
|
273
|
+
{ displayName: 'Enlarge', name: 'enlarge', type: 'boolean', default: false, description: 'Allow upscaling when resizing.', displayOptions: { show: { resource: ['image'], operation: ['resize'] } } },
|
|
274
|
+
{ displayName: 'Normalize Orientation', name: 'normalizeOrientation', type: 'boolean', default: false, description: 'Auto-rotate based on EXIF orientation.', displayOptions: { show: { resource: ['image'], operation: ['resize', 'crop', 'enhance', 'metadata'] } } },
|
|
275
|
+
{ displayName: 'Crop X', name: 'cropX', type: 'number', default: 0, description: 'Left offset for crop (requires crop width/height).', displayOptions: { show: { resource: ['image'], operation: ['crop'] } } },
|
|
276
|
+
{ displayName: 'Crop Y', name: 'cropY', type: 'number', default: 0, description: 'Top offset for crop (requires crop width/height).', displayOptions: { show: { resource: ['image'], operation: ['crop'] } } },
|
|
277
|
+
{ displayName: 'Crop Width', name: 'cropWidth', type: 'number', default: 0, description: 'Crop width in pixels.', displayOptions: { show: { resource: ['image'], operation: ['crop'] } } },
|
|
278
|
+
{ displayName: 'Crop Height', name: 'cropHeight', type: 'number', default: 0, description: 'Crop height in pixels.', displayOptions: { show: { resource: ['image'], operation: ['crop'] } } },
|
|
279
|
+
{ displayName: 'Background Color', name: 'backgroundColor', type: 'string', default: '', description: 'Background color to use for some actions (e.g. crop fill, compress, background).', displayOptions: { show: { resource: ['image'], operation: ['crop', 'compress', 'background'] } } },
|
|
280
|
+
{ displayName: 'Rotate (degrees)', name: 'rotate', type: 'number', default: 0, description: 'Rotate image by degrees.', displayOptions: { show: { resource: ['image'], operation: ['transform'] } } },
|
|
281
|
+
{ displayName: 'Flip Horizontal', name: 'flipH', type: 'boolean', default: false, description: 'Flip image horizontally.', displayOptions: { show: { resource: ['image'], operation: ['transform'] } } },
|
|
282
|
+
{ displayName: 'Flip Vertical', name: 'flipV', type: 'boolean', default: false, description: 'Flip image vertically.', displayOptions: { show: { resource: ['image'], operation: ['transform'] } } },
|
|
283
|
+
{ displayName: 'Color Space', name: 'colorSpace', type: 'options', default: 'srgb', description: 'Color space to use for transforms/compress.', options: [{ name: 'sRGB', value: 'srgb' }, { name: 'Display P3', value: 'display-p3' }], displayOptions: { show: { resource: ['image'], operation: ['transform', 'compress'] } } },
|
|
284
|
+
{ displayName: 'Target Size (KB)', name: 'targetSizeKB', type: 'number', default: 0, description: 'Target output size in KB for compression (optional).', displayOptions: { show: { resource: ['image'], operation: ['compress'] } } },
|
|
285
|
+
{ displayName: 'Quality', name: 'quality', type: 'number', default: 82, description: 'Compression quality (1-100).', displayOptions: { show: { resource: ['image'], operation: ['compress'] } } },
|
|
286
|
+
{
|
|
287
|
+
displayName: 'Keep Metadata',
|
|
288
|
+
name: 'keepMetadata',
|
|
289
|
+
type: 'boolean',
|
|
290
|
+
default: false,
|
|
291
|
+
description: 'Preserve EXIF/metadata when possible.',
|
|
292
|
+
displayOptions: {
|
|
293
|
+
show: {
|
|
294
|
+
resource: ['image'],
|
|
295
|
+
operation: ['format', 'resize', 'crop', 'transform', 'compress', 'enhance', 'padding', 'frame', 'background', 'watermark', 'pdf', 'metadata'],
|
|
296
|
+
},
|
|
297
|
+
},
|
|
250
298
|
},
|
|
251
|
-
{ displayName: '
|
|
252
|
-
{ displayName: '
|
|
253
|
-
{ displayName: '
|
|
254
|
-
{ displayName: '
|
|
255
|
-
{ displayName: '
|
|
256
|
-
{ displayName: '
|
|
257
|
-
{ displayName: '
|
|
258
|
-
{ displayName: '
|
|
259
|
-
{ displayName: '
|
|
260
|
-
{ displayName: '
|
|
261
|
-
{ displayName: '
|
|
262
|
-
{ displayName: '
|
|
263
|
-
{ displayName: 'Color
|
|
264
|
-
{ displayName: '
|
|
265
|
-
{ displayName: '
|
|
266
|
-
{ displayName: '
|
|
267
|
-
{ displayName: 'Blur', name: '
|
|
268
|
-
{ displayName: '
|
|
269
|
-
{ displayName: '
|
|
270
|
-
{ displayName: '
|
|
271
|
-
{ displayName: '
|
|
272
|
-
{ displayName: 'Contrast', name: 'contrast', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
|
|
273
|
-
{ displayName: 'Saturation', name: 'saturation', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
|
|
274
|
-
{ displayName: 'Pad', name: 'pad', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['padding', 'frame'] } } },
|
|
275
|
-
{ displayName: 'Pad Top', name: 'padTop', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['padding'] } } },
|
|
276
|
-
{ displayName: 'Pad Right', name: 'padRight', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['padding'] } } },
|
|
277
|
-
{ displayName: 'Pad Bottom', name: 'padBottom', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['padding'] } } },
|
|
278
|
-
{ displayName: 'Pad Left', name: 'padLeft', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['padding'] } } },
|
|
279
|
-
{ displayName: 'Pad Color', name: 'padColor', type: 'string', default: '', displayOptions: { show: { resource: ['image'], operation: ['padding', 'frame', 'background'] } } },
|
|
280
|
-
{ displayName: 'Border', name: 'border', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['frame'] } } },
|
|
281
|
-
{ displayName: 'Border Color', name: 'borderColor', type: 'string', default: '', displayOptions: { show: { resource: ['image'], operation: ['frame'] } } },
|
|
282
|
-
{ displayName: 'Border Radius', name: 'borderRadius', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['padding', 'background'] } } },
|
|
283
|
-
{ displayName: 'Background Blur', name: 'backgroundBlur', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['background'] } } },
|
|
284
|
-
{ displayName: 'Watermark Text', name: 'watermarkText', type: 'string', default: '', displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
|
|
285
|
-
{ displayName: 'Watermark Font Size', name: 'watermarkFontSize', type: 'number', default: 24, displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
|
|
286
|
-
{ displayName: 'Watermark Color', name: 'watermarkColor', type: 'string', default: '#000000', displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
|
|
287
|
-
{ displayName: 'Watermark Opacity', name: 'watermarkOpacity', type: 'number', default: 0.35, displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
|
|
299
|
+
{ displayName: 'Blur', name: 'blur', type: 'number', default: 0, description: 'Apply blur radius (0 to skip).', displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
|
|
300
|
+
{ displayName: 'Sharpen', name: 'sharpen', type: 'number', default: 0, description: 'Sharpen amount (0 to skip).', displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
|
|
301
|
+
{ displayName: 'Grayscale', name: 'grayscale', type: 'boolean', default: false, description: 'Convert image to grayscale.', displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
|
|
302
|
+
{ displayName: 'Sepia', name: 'sepia', type: 'boolean', default: false, description: 'Apply sepia tone.', displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
|
|
303
|
+
{ displayName: 'Brightness', name: 'brightness', type: 'number', default: 0, description: 'Adjust brightness (-100 to 100).', displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
|
|
304
|
+
{ displayName: 'Contrast', name: 'contrast', type: 'number', default: 0, description: 'Adjust contrast (-100 to 100).', displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
|
|
305
|
+
{ displayName: 'Saturation', name: 'saturation', type: 'number', default: 0, description: 'Adjust saturation (-100 to 100).', displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
|
|
306
|
+
{ displayName: 'Pad', name: 'pad', type: 'number', default: 0, description: 'Uniform padding size.', displayOptions: { show: { resource: ['image'], operation: ['padding', 'frame'] } } },
|
|
307
|
+
{ displayName: 'Pad Top', name: 'padTop', type: 'number', default: 0, description: 'Top padding (overrides uniform pad).', displayOptions: { show: { resource: ['image'], operation: ['padding'] } } },
|
|
308
|
+
{ displayName: 'Pad Right', name: 'padRight', type: 'number', default: 0, description: 'Right padding (overrides uniform pad).', displayOptions: { show: { resource: ['image'], operation: ['padding'] } } },
|
|
309
|
+
{ displayName: 'Pad Bottom', name: 'padBottom', type: 'number', default: 0, description: 'Bottom padding (overrides uniform pad).', displayOptions: { show: { resource: ['image'], operation: ['padding'] } } },
|
|
310
|
+
{ displayName: 'Pad Left', name: 'padLeft', type: 'number', default: 0, description: 'Left padding (overrides uniform pad).', displayOptions: { show: { resource: ['image'], operation: ['padding'] } } },
|
|
311
|
+
{ displayName: 'Pad Color', name: 'padColor', type: 'string', default: '', description: 'Padding color (e.g. #ffffff).', displayOptions: { show: { resource: ['image'], operation: ['padding', 'frame', 'background'] } } },
|
|
312
|
+
{ displayName: 'Border', name: 'border', type: 'number', default: 0, description: 'Border thickness in pixels.', displayOptions: { show: { resource: ['image'], operation: ['frame'] } } },
|
|
313
|
+
{ displayName: 'Border Color', name: 'borderColor', type: 'string', default: '', description: 'Border color (e.g. #000000).', displayOptions: { show: { resource: ['image'], operation: ['frame'] } } },
|
|
314
|
+
{ displayName: 'Border Radius', name: 'borderRadius', type: 'number', default: 0, description: 'Rounded corner radius.', displayOptions: { show: { resource: ['image'], operation: ['padding', 'background'] } } },
|
|
315
|
+
{ displayName: 'Background Blur', name: 'backgroundBlur', type: 'number', default: 0, description: 'Blur background by this radius.', displayOptions: { show: { resource: ['image'], operation: ['background'] } } },
|
|
316
|
+
{ displayName: 'Watermark Text', name: 'watermarkText', type: 'string', default: '', description: 'Text watermark to overlay.', displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
|
|
317
|
+
{ displayName: 'Watermark Font Size', name: 'watermarkFontSize', type: 'number', default: 24, description: 'Font size for text watermark.', displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
|
|
318
|
+
{ displayName: 'Watermark Color', name: 'watermarkColor', type: 'string', default: '#000000', description: 'Text watermark color.', displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
|
|
319
|
+
{ displayName: 'Watermark Opacity', name: 'watermarkOpacity', type: 'number', default: 0.35, description: 'Watermark opacity between 0 and 1.', displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
|
|
288
320
|
{
|
|
289
321
|
displayName: 'Watermark Position',
|
|
290
322
|
name: 'watermarkPosition',
|
|
@@ -297,16 +329,18 @@ class DavixH2I {
|
|
|
297
329
|
{ name: 'Bottom Left', value: 'bottom-left' },
|
|
298
330
|
{ name: 'Bottom Right', value: 'bottom-right' },
|
|
299
331
|
],
|
|
332
|
+
description: 'Position for text/image watermark.',
|
|
300
333
|
displayOptions: { show: { resource: ['image'], operation: ['watermark'] } },
|
|
301
334
|
},
|
|
302
|
-
{ displayName: 'Watermark Margin', name: 'watermarkMargin', type: 'number', default: 8, displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
|
|
303
|
-
{ displayName: 'Watermark Scale', name: 'watermarkScale', type: 'number', default: 1, displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
|
|
335
|
+
{ displayName: 'Watermark Margin', name: 'watermarkMargin', type: 'number', default: 8, description: 'Margin/padding around watermark.', displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
|
|
336
|
+
{ displayName: 'Watermark Scale', name: 'watermarkScale', type: 'number', default: 1, description: 'Scale factor for watermark size.', displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
|
|
304
337
|
{
|
|
305
338
|
displayName: 'Watermark Image Binary Property',
|
|
306
339
|
name: 'watermarkImageBinaryProp',
|
|
307
340
|
type: 'string',
|
|
308
341
|
default: '',
|
|
309
342
|
placeholder: 'watermarkImage',
|
|
343
|
+
description: 'Binary property containing an image watermark (optional).',
|
|
310
344
|
displayOptions: { show: { resource: ['image'], operation: ['watermark'] } },
|
|
311
345
|
},
|
|
312
346
|
{
|
|
@@ -368,205 +402,166 @@ class DavixH2I {
|
|
|
368
402
|
default: 85,
|
|
369
403
|
displayOptions: { show: { resource: ['image'], operation: ['pdf'] } },
|
|
370
404
|
},
|
|
371
|
-
{ displayName: 'Include Raw EXIF', name: 'includeRawExif', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['metadata'] } } },
|
|
405
|
+
{ displayName: 'Include Raw EXIF', name: 'includeRawExif', type: 'boolean', default: false, description: 'Include raw EXIF data when available.', displayOptions: { show: { resource: ['image'], operation: ['metadata'] } } },
|
|
372
406
|
{
|
|
373
|
-
displayName: '
|
|
374
|
-
name: '
|
|
375
|
-
type: '
|
|
376
|
-
default:
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
{ name: 'Width', value: 'width' },
|
|
380
|
-
{ name: 'Height', value: 'height' },
|
|
381
|
-
{ name: 'Enlarge', value: 'enlarge' },
|
|
382
|
-
{ name: 'Normalize Orientation', value: 'normalizeOrientation' },
|
|
383
|
-
{ name: 'Crop', value: 'crop' },
|
|
384
|
-
{ name: 'Background Color', value: 'backgroundColor' },
|
|
385
|
-
{ name: 'Rotate', value: 'rotate' },
|
|
386
|
-
{ name: 'Flip Horizontal', value: 'flipH' },
|
|
387
|
-
{ name: 'Flip Vertical', value: 'flipV' },
|
|
388
|
-
{ name: 'Color Space', value: 'colorSpace' },
|
|
389
|
-
{ name: 'Target Size (KB)', value: 'targetSizeKB' },
|
|
390
|
-
{ name: 'Quality', value: 'quality' },
|
|
391
|
-
{ name: 'Keep Metadata', value: 'keepMetadata' },
|
|
392
|
-
{ name: 'Blur', value: 'blur' },
|
|
393
|
-
{ name: 'Sharpen', value: 'sharpen' },
|
|
394
|
-
{ name: 'Grayscale', value: 'grayscale' },
|
|
395
|
-
{ name: 'Sepia', value: 'sepia' },
|
|
396
|
-
{ name: 'Brightness', value: 'brightness' },
|
|
397
|
-
{ name: 'Contrast', value: 'contrast' },
|
|
398
|
-
{ name: 'Saturation', value: 'saturation' },
|
|
399
|
-
{ name: 'Pad', value: 'pad' },
|
|
400
|
-
{ name: 'Pad Sides', value: 'padSides' },
|
|
401
|
-
{ name: 'Pad Color', value: 'padColor' },
|
|
402
|
-
{ name: 'Border', value: 'border' },
|
|
403
|
-
{ name: 'Border Color', value: 'borderColor' },
|
|
404
|
-
{ name: 'Border Radius', value: 'borderRadius' },
|
|
405
|
-
{ name: 'Background Blur', value: 'backgroundBlur' },
|
|
406
|
-
{ name: 'Watermark', value: 'watermark' },
|
|
407
|
-
{ name: 'PDF Options', value: 'pdf' },
|
|
408
|
-
{ name: 'Include Raw EXIF', value: 'includeRawExif' },
|
|
409
|
-
],
|
|
407
|
+
displayName: 'Options',
|
|
408
|
+
name: 'options',
|
|
409
|
+
type: 'collection',
|
|
410
|
+
default: {},
|
|
411
|
+
placeholder: 'Add option',
|
|
412
|
+
description: 'Optional PixLab multitask parameters. Only selected options are sent.',
|
|
410
413
|
displayOptions: { show: { resource: ['image'], operation: ['multitask'] } },
|
|
411
|
-
},
|
|
412
|
-
// Conditional image fields for multitask
|
|
413
|
-
{ displayName: 'Width', name: 'multiWidth', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['width'] } } },
|
|
414
|
-
{ displayName: 'Height', name: 'multiHeight', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['height'] } } },
|
|
415
|
-
{ displayName: 'Enlarge', name: 'multiEnlarge', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['enlarge'] } } },
|
|
416
|
-
{
|
|
417
|
-
displayName: 'Normalize Orientation',
|
|
418
|
-
name: 'multiNormalizeOrientation',
|
|
419
|
-
type: 'boolean',
|
|
420
|
-
default: false,
|
|
421
|
-
displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['normalizeOrientation'] } },
|
|
422
|
-
},
|
|
423
|
-
{ displayName: 'Crop X', name: 'multiCropX', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['crop'] } } },
|
|
424
|
-
{ displayName: 'Crop Y', name: 'multiCropY', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['crop'] } } },
|
|
425
|
-
{ displayName: 'Crop Width', name: 'multiCropWidth', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['crop'] } } },
|
|
426
|
-
{ displayName: 'Crop Height', name: 'multiCropHeight', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['crop'] } } },
|
|
427
|
-
{ displayName: 'Background Color', name: 'multiBackgroundColor', type: 'string', default: '', displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['backgroundColor'] } } },
|
|
428
|
-
{ displayName: 'Rotate (degrees)', name: 'multiRotate', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['rotate'] } } },
|
|
429
|
-
{ displayName: 'Flip Horizontal', name: 'multiFlipH', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['flipH'] } } },
|
|
430
|
-
{ displayName: 'Flip Vertical', name: 'multiFlipV', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['flipV'] } } },
|
|
431
|
-
{
|
|
432
|
-
displayName: 'Color Space',
|
|
433
|
-
name: 'multiColorSpace',
|
|
434
|
-
type: 'options',
|
|
435
|
-
default: 'srgb',
|
|
436
|
-
options: [{ name: 'sRGB', value: 'srgb' }, { name: 'Display P3', value: 'display-p3' }],
|
|
437
|
-
displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['colorSpace'] } },
|
|
438
|
-
},
|
|
439
|
-
{ displayName: 'Target Size (KB)', name: 'multiTargetSizeKB', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['targetSizeKB'] } } },
|
|
440
|
-
{ displayName: 'Quality', name: 'multiQuality', type: 'number', default: 82, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['quality'] } } },
|
|
441
|
-
{
|
|
442
|
-
displayName: 'Keep Metadata',
|
|
443
|
-
name: 'multiKeepMetadata',
|
|
444
|
-
type: 'boolean',
|
|
445
|
-
default: false,
|
|
446
|
-
displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['keepMetadata'] } },
|
|
447
|
-
},
|
|
448
|
-
{ displayName: 'Blur', name: 'multiBlur', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['blur'] } } },
|
|
449
|
-
{ displayName: 'Sharpen', name: 'multiSharpen', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['sharpen'] } } },
|
|
450
|
-
{ displayName: 'Grayscale', name: 'multiGrayscale', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['grayscale'] } } },
|
|
451
|
-
{ displayName: 'Sepia', name: 'multiSepia', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['sepia'] } } },
|
|
452
|
-
{ displayName: 'Brightness', name: 'multiBrightness', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['brightness'] } } },
|
|
453
|
-
{ displayName: 'Contrast', name: 'multiContrast', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['contrast'] } } },
|
|
454
|
-
{ displayName: 'Saturation', name: 'multiSaturation', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['saturation'] } } },
|
|
455
|
-
{ displayName: 'Pad', name: 'multiPad', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['pad'] } } },
|
|
456
|
-
{
|
|
457
|
-
displayName: 'Pad Sides',
|
|
458
|
-
name: 'multiPadSides',
|
|
459
|
-
type: 'boolean',
|
|
460
|
-
default: false,
|
|
461
|
-
displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['padSides'] } },
|
|
462
|
-
},
|
|
463
|
-
{ displayName: 'Pad Top', name: 'multiPadTop', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['padSides'] } } },
|
|
464
|
-
{ displayName: 'Pad Right', name: 'multiPadRight', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['padSides'] } } },
|
|
465
|
-
{ displayName: 'Pad Bottom', name: 'multiPadBottom', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['padSides'] } } },
|
|
466
|
-
{ displayName: 'Pad Left', name: 'multiPadLeft', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['padSides'] } } },
|
|
467
|
-
{ displayName: 'Pad Color', name: 'multiPadColor', type: 'string', default: '', displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['padColor'] } } },
|
|
468
|
-
{ displayName: 'Border', name: 'multiBorder', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['border'] } } },
|
|
469
|
-
{ displayName: 'Border Color', name: 'multiBorderColor', type: 'string', default: '', displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['borderColor'] } } },
|
|
470
|
-
{ displayName: 'Border Radius', name: 'multiBorderRadius', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['borderRadius'] } } },
|
|
471
|
-
{ displayName: 'Background Blur', name: 'multiBackgroundBlur', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['backgroundBlur'] } } },
|
|
472
|
-
{ displayName: 'Watermark Text', name: 'multiWatermarkText', type: 'string', default: '', displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['watermark'] } } },
|
|
473
|
-
{ displayName: 'Watermark Font Size', name: 'multiWatermarkFontSize', type: 'number', default: 24, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['watermark'] } } },
|
|
474
|
-
{ displayName: 'Watermark Color', name: 'multiWatermarkColor', type: 'string', default: '#000000', displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['watermark'] } } },
|
|
475
|
-
{ displayName: 'Watermark Opacity', name: 'multiWatermarkOpacity', type: 'number', default: 0.35, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['watermark'] } } },
|
|
476
|
-
{
|
|
477
|
-
displayName: 'Watermark Position',
|
|
478
|
-
name: 'multiWatermarkPosition',
|
|
479
|
-
type: 'options',
|
|
480
|
-
default: 'center',
|
|
481
414
|
options: [
|
|
482
|
-
{
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
415
|
+
{
|
|
416
|
+
displayName: 'Format',
|
|
417
|
+
name: 'format',
|
|
418
|
+
type: 'options',
|
|
419
|
+
default: 'webp',
|
|
420
|
+
description: 'Output format for the multitask result.',
|
|
421
|
+
options: [
|
|
422
|
+
{ name: 'JPEG', value: 'jpeg' },
|
|
423
|
+
{ name: 'PNG', value: 'png' },
|
|
424
|
+
{ name: 'WebP', value: 'webp' },
|
|
425
|
+
{ name: 'AVIF', value: 'avif' },
|
|
426
|
+
{ name: 'GIF', value: 'gif' },
|
|
427
|
+
{ name: 'SVG', value: 'svg' },
|
|
428
|
+
{ name: 'PDF', value: 'pdf' },
|
|
429
|
+
],
|
|
430
|
+
},
|
|
431
|
+
{ displayName: 'Width', name: 'width', type: 'number', default: 0, description: 'Resize width in pixels.' },
|
|
432
|
+
{ displayName: 'Height', name: 'height', type: 'number', default: 0, description: 'Resize height in pixels.' },
|
|
433
|
+
{ displayName: 'Enlarge', name: 'enlarge', type: 'boolean', default: false, description: 'Allow upscaling when resizing.' },
|
|
434
|
+
{
|
|
435
|
+
displayName: 'Normalize Orientation',
|
|
436
|
+
name: 'normalizeOrientation',
|
|
437
|
+
type: 'boolean',
|
|
438
|
+
default: false,
|
|
439
|
+
description: 'Auto-rotate based on EXIF orientation.',
|
|
440
|
+
},
|
|
441
|
+
{ displayName: 'Crop X', name: 'cropX', type: 'number', default: 0, description: 'Left offset for crop.' },
|
|
442
|
+
{ displayName: 'Crop Y', name: 'cropY', type: 'number', default: 0, description: 'Top offset for crop.' },
|
|
443
|
+
{ displayName: 'Crop Width', name: 'cropWidth', type: 'number', default: 0, description: 'Crop width in pixels.' },
|
|
444
|
+
{ displayName: 'Crop Height', name: 'cropHeight', type: 'number', default: 0, description: 'Crop height in pixels.' },
|
|
445
|
+
{ displayName: 'Background Color', name: 'backgroundColor', type: 'string', default: '', description: 'Background color used for fills or padding.' },
|
|
446
|
+
{ displayName: 'Rotate (degrees)', name: 'rotate', type: 'number', default: 0, description: 'Rotate image by degrees.' },
|
|
447
|
+
{ displayName: 'Flip Horizontal', name: 'flipH', type: 'boolean', default: false, description: 'Flip image horizontally.' },
|
|
448
|
+
{ displayName: 'Flip Vertical', name: 'flipV', type: 'boolean', default: false, description: 'Flip image vertically.' },
|
|
449
|
+
{
|
|
450
|
+
displayName: 'Color Space',
|
|
451
|
+
name: 'colorSpace',
|
|
452
|
+
type: 'options',
|
|
453
|
+
default: 'srgb',
|
|
454
|
+
description: 'Color space for processing.',
|
|
455
|
+
options: [
|
|
456
|
+
{ name: 'sRGB', value: 'srgb' },
|
|
457
|
+
{ name: 'Display P3', value: 'display-p3' },
|
|
458
|
+
],
|
|
459
|
+
},
|
|
460
|
+
{ displayName: 'Target Size (KB)', name: 'targetSizeKB', type: 'number', default: 0, description: 'Target compressed size in KB.' },
|
|
461
|
+
{ displayName: 'Quality', name: 'quality', type: 'number', default: 82, description: 'Output quality (1-100).' },
|
|
462
|
+
{ displayName: 'Keep Metadata', name: 'keepMetadata', type: 'boolean', default: false, description: 'Keep EXIF/metadata when possible.' },
|
|
463
|
+
{ displayName: 'Blur', name: 'blur', type: 'number', default: 0, description: 'Blur radius.' },
|
|
464
|
+
{ displayName: 'Sharpen', name: 'sharpen', type: 'number', default: 0, description: 'Sharpen amount.' },
|
|
465
|
+
{ displayName: 'Grayscale', name: 'grayscale', type: 'boolean', default: false, description: 'Convert to grayscale.' },
|
|
466
|
+
{ displayName: 'Sepia', name: 'sepia', type: 'boolean', default: false, description: 'Apply sepia tone.' },
|
|
467
|
+
{ displayName: 'Brightness', name: 'brightness', type: 'number', default: 0, description: 'Brightness adjustment (-100 to 100).' },
|
|
468
|
+
{ displayName: 'Contrast', name: 'contrast', type: 'number', default: 0, description: 'Contrast adjustment (-100 to 100).' },
|
|
469
|
+
{ displayName: 'Saturation', name: 'saturation', type: 'number', default: 0, description: 'Saturation adjustment (-100 to 100).' },
|
|
470
|
+
{ displayName: 'Pad', name: 'pad', type: 'number', default: 0, description: 'Uniform padding size.' },
|
|
471
|
+
{ displayName: 'Pad Color', name: 'padColor', type: 'string', default: '', description: 'Padding color (e.g. #ffffff).' },
|
|
472
|
+
{ displayName: 'Pad Top', name: 'padTop', type: 'number', default: 0, description: 'Top padding override.' },
|
|
473
|
+
{ displayName: 'Pad Right', name: 'padRight', type: 'number', default: 0, description: 'Right padding override.' },
|
|
474
|
+
{ displayName: 'Pad Bottom', name: 'padBottom', type: 'number', default: 0, description: 'Bottom padding override.' },
|
|
475
|
+
{ displayName: 'Pad Left', name: 'padLeft', type: 'number', default: 0, description: 'Left padding override.' },
|
|
476
|
+
{ displayName: 'Border Radius', name: 'borderRadius', type: 'number', default: 0, description: 'Rounded corner radius.' },
|
|
477
|
+
{ displayName: 'Border', name: 'border', type: 'number', default: 0, description: 'Border thickness in pixels.' },
|
|
478
|
+
{ displayName: 'Border Color', name: 'borderColor', type: 'string', default: '', description: 'Border color (e.g. #000000).' },
|
|
479
|
+
{ displayName: 'Background Blur', name: 'backgroundBlur', type: 'number', default: 0, description: 'Background blur radius.' },
|
|
480
|
+
{ displayName: 'Watermark Text', name: 'watermarkText', type: 'string', default: '', description: 'Text watermark content.' },
|
|
481
|
+
{ displayName: 'Watermark Font Size', name: 'watermarkFontSize', type: 'number', default: 24, description: 'Font size for text watermark.' },
|
|
482
|
+
{ displayName: 'Watermark Color', name: 'watermarkColor', type: 'string', default: '#000000', description: 'Color for text watermark.' },
|
|
483
|
+
{ displayName: 'Watermark Opacity', name: 'watermarkOpacity', type: 'number', default: 0.35, description: 'Watermark opacity (0-1).' },
|
|
484
|
+
{
|
|
485
|
+
displayName: 'Watermark Position',
|
|
486
|
+
name: 'watermarkPosition',
|
|
487
|
+
type: 'options',
|
|
488
|
+
default: 'center',
|
|
489
|
+
description: 'Placement for watermark.',
|
|
490
|
+
options: [
|
|
491
|
+
{ name: 'Center', value: 'center' },
|
|
492
|
+
{ name: 'Top Left', value: 'top-left' },
|
|
493
|
+
{ name: 'Top Right', value: 'top-right' },
|
|
494
|
+
{ name: 'Bottom Left', value: 'bottom-left' },
|
|
495
|
+
{ name: 'Bottom Right', value: 'bottom-right' },
|
|
496
|
+
],
|
|
497
|
+
},
|
|
498
|
+
{ displayName: 'Watermark Margin', name: 'watermarkMargin', type: 'number', default: 8, description: 'Margin/padding around watermark.' },
|
|
499
|
+
{ displayName: 'Watermark Scale', name: 'watermarkScale', type: 'number', default: 1, description: 'Scale factor for watermark.' },
|
|
500
|
+
{
|
|
501
|
+
displayName: 'PDF Mode',
|
|
502
|
+
name: 'pdfMode',
|
|
503
|
+
type: 'options',
|
|
504
|
+
default: 'single',
|
|
505
|
+
description: 'Single or multi-page PDF export.',
|
|
506
|
+
options: [
|
|
507
|
+
{ name: 'Single', value: 'single' },
|
|
508
|
+
{ name: 'Multi', value: 'multi' },
|
|
509
|
+
],
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
displayName: 'PDF Page Size',
|
|
513
|
+
name: 'pdfPageSize',
|
|
514
|
+
type: 'options',
|
|
515
|
+
default: 'auto',
|
|
516
|
+
description: 'Page size for PDF output.',
|
|
517
|
+
options: [
|
|
518
|
+
{ name: 'Auto', value: 'auto' },
|
|
519
|
+
{ name: 'A4', value: 'a4' },
|
|
520
|
+
{ name: 'Letter', value: 'letter' },
|
|
521
|
+
],
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
displayName: 'PDF Orientation',
|
|
525
|
+
name: 'pdfOrientation',
|
|
526
|
+
type: 'options',
|
|
527
|
+
default: 'portrait',
|
|
528
|
+
description: 'Orientation for PDF pages.',
|
|
529
|
+
options: [
|
|
530
|
+
{ name: 'Portrait', value: 'portrait' },
|
|
531
|
+
{ name: 'Landscape', value: 'landscape' },
|
|
532
|
+
],
|
|
533
|
+
},
|
|
534
|
+
{ displayName: 'PDF Margin', name: 'pdfMargin', type: 'number', default: 0, description: 'Page margin for PDF output.' },
|
|
535
|
+
{
|
|
536
|
+
displayName: 'PDF Embed Format',
|
|
537
|
+
name: 'pdfEmbedFormat',
|
|
538
|
+
type: 'options',
|
|
539
|
+
default: 'png',
|
|
540
|
+
description: 'Image format embedded in the PDF.',
|
|
541
|
+
options: [
|
|
542
|
+
{ name: 'PNG', value: 'png' },
|
|
543
|
+
{ name: 'JPEG', value: 'jpeg' },
|
|
544
|
+
],
|
|
545
|
+
},
|
|
546
|
+
{ displayName: 'PDF JPEG Quality', name: 'pdfJpegQuality', type: 'number', default: 85, description: 'JPEG quality for PDF embedding.' },
|
|
547
|
+
{ displayName: 'Include Raw EXIF', name: 'includeRawExif', type: 'boolean', default: false, description: 'Include raw EXIF data when available.' },
|
|
487
548
|
],
|
|
488
|
-
displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['watermark'] } },
|
|
489
549
|
},
|
|
490
|
-
{ displayName: 'Watermark Margin', name: 'multiWatermarkMargin', type: 'number', default: 8, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['watermark'] } } },
|
|
491
|
-
{ displayName: 'Watermark Scale', name: 'multiWatermarkScale', type: 'number', default: 1, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['watermark'] } } },
|
|
492
550
|
{
|
|
493
551
|
displayName: 'Watermark Image Binary Property',
|
|
494
|
-
name: '
|
|
552
|
+
name: 'watermarkBinaryProperty',
|
|
495
553
|
type: 'string',
|
|
496
554
|
default: '',
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
displayName: 'PDF Mode',
|
|
501
|
-
name: 'multiPdfMode',
|
|
502
|
-
type: 'options',
|
|
503
|
-
default: 'single',
|
|
504
|
-
options: [
|
|
505
|
-
{ name: 'Single', value: 'single' },
|
|
506
|
-
{ name: 'Multi', value: 'multi' },
|
|
507
|
-
],
|
|
508
|
-
displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['pdf'] } },
|
|
509
|
-
},
|
|
510
|
-
{
|
|
511
|
-
displayName: 'PDF Page Size',
|
|
512
|
-
name: 'multiPdfPageSize',
|
|
513
|
-
type: 'options',
|
|
514
|
-
default: 'auto',
|
|
515
|
-
options: [
|
|
516
|
-
{ name: 'Auto', value: 'auto' },
|
|
517
|
-
{ name: 'A4', value: 'a4' },
|
|
518
|
-
{ name: 'Letter', value: 'letter' },
|
|
519
|
-
],
|
|
520
|
-
displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['pdf'] } },
|
|
521
|
-
},
|
|
522
|
-
{
|
|
523
|
-
displayName: 'PDF Orientation',
|
|
524
|
-
name: 'multiPdfOrientation',
|
|
525
|
-
type: 'options',
|
|
526
|
-
default: 'portrait',
|
|
527
|
-
options: [
|
|
528
|
-
{ name: 'Portrait', value: 'portrait' },
|
|
529
|
-
{ name: 'Landscape', value: 'landscape' },
|
|
530
|
-
],
|
|
531
|
-
displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['pdf'] } },
|
|
532
|
-
},
|
|
533
|
-
{
|
|
534
|
-
displayName: 'PDF Margin',
|
|
535
|
-
name: 'multiPdfMargin',
|
|
536
|
-
type: 'number',
|
|
537
|
-
default: 0,
|
|
538
|
-
displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['pdf'] } },
|
|
539
|
-
},
|
|
540
|
-
{
|
|
541
|
-
displayName: 'PDF Embed Format',
|
|
542
|
-
name: 'multiPdfEmbedFormat',
|
|
543
|
-
type: 'options',
|
|
544
|
-
default: 'png',
|
|
545
|
-
options: [
|
|
546
|
-
{ name: 'PNG', value: 'png' },
|
|
547
|
-
{ name: 'JPEG', value: 'jpeg' },
|
|
548
|
-
],
|
|
549
|
-
displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['pdf'] } },
|
|
550
|
-
},
|
|
551
|
-
{
|
|
552
|
-
displayName: 'PDF JPEG Quality',
|
|
553
|
-
name: 'multiPdfJpegQuality',
|
|
554
|
-
type: 'number',
|
|
555
|
-
default: 85,
|
|
556
|
-
displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['pdf'] } },
|
|
557
|
-
},
|
|
558
|
-
{
|
|
559
|
-
displayName: 'Include Raw EXIF',
|
|
560
|
-
name: 'multiIncludeRawExif',
|
|
561
|
-
type: 'boolean',
|
|
562
|
-
default: false,
|
|
563
|
-
displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['includeRawExif'] } },
|
|
555
|
+
placeholder: 'watermarkImage',
|
|
556
|
+
description: 'Binary property containing an image watermark (used if watermark options are set).',
|
|
557
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'] } },
|
|
564
558
|
},
|
|
565
559
|
{
|
|
566
560
|
displayName: 'Download Result(s) as Binary',
|
|
567
561
|
name: 'imageDownloadBinary',
|
|
568
562
|
type: 'boolean',
|
|
569
563
|
default: false,
|
|
564
|
+
description: 'Download the first returned URL into binary data (results remain in JSON).',
|
|
570
565
|
displayOptions: {
|
|
571
566
|
show: {
|
|
572
567
|
resource: ['image'],
|
|
@@ -579,6 +574,7 @@ class DavixH2I {
|
|
|
579
574
|
name: 'imageOutputBinaryProperty',
|
|
580
575
|
type: 'string',
|
|
581
576
|
default: 'data',
|
|
577
|
+
description: 'Binary property name to store the downloaded file.',
|
|
582
578
|
displayOptions: {
|
|
583
579
|
show: {
|
|
584
580
|
resource: ['image'],
|
|
@@ -604,6 +600,7 @@ class DavixH2I {
|
|
|
604
600
|
name: 'sortByName',
|
|
605
601
|
type: 'boolean',
|
|
606
602
|
default: false,
|
|
603
|
+
description: 'When merging, sort uploaded PDFs by filename before merging.',
|
|
607
604
|
displayOptions: { show: { resource: ['pdf'], operation: ['merge'] } },
|
|
608
605
|
},
|
|
609
606
|
{
|
|
@@ -612,6 +609,7 @@ class DavixH2I {
|
|
|
612
609
|
type: 'string',
|
|
613
610
|
default: '',
|
|
614
611
|
placeholder: '1-3,4-5',
|
|
612
|
+
description: 'Page ranges to keep when splitting (e.g. 1-3,5).',
|
|
615
613
|
displayOptions: { show: { resource: ['pdf'], operation: ['split'] } },
|
|
616
614
|
},
|
|
617
615
|
{
|
|
@@ -619,6 +617,7 @@ class DavixH2I {
|
|
|
619
617
|
name: 'prefix',
|
|
620
618
|
type: 'string',
|
|
621
619
|
default: 'split_',
|
|
620
|
+
description: 'Prefix for split output files.',
|
|
622
621
|
displayOptions: { show: { resource: ['pdf'], operation: ['split', 'extract'] } },
|
|
623
622
|
},
|
|
624
623
|
{
|
|
@@ -627,6 +626,7 @@ class DavixH2I {
|
|
|
627
626
|
type: 'string',
|
|
628
627
|
default: 'all',
|
|
629
628
|
placeholder: 'all OR 1-3,5,7',
|
|
629
|
+
description: 'Page selection, e.g. all or 1-3,5.',
|
|
630
630
|
displayOptions: {
|
|
631
631
|
show: { resource: ['pdf'], operation: ['to-images', 'extract-images', 'watermark', 'rotate', 'delete-pages', 'extract'] },
|
|
632
632
|
},
|
|
@@ -636,6 +636,7 @@ class DavixH2I {
|
|
|
636
636
|
name: 'toFormat',
|
|
637
637
|
type: 'options',
|
|
638
638
|
default: 'png',
|
|
639
|
+
description: 'Image format when converting PDF pages.',
|
|
639
640
|
options: [
|
|
640
641
|
{ name: 'PNG', value: 'png' },
|
|
641
642
|
{ name: 'JPEG', value: 'jpeg' },
|
|
@@ -643,14 +644,15 @@ class DavixH2I {
|
|
|
643
644
|
],
|
|
644
645
|
displayOptions: { show: { resource: ['pdf'], operation: ['to-images'] } },
|
|
645
646
|
},
|
|
646
|
-
{ displayName: 'Width', name: 'pdfWidth', type: 'number', default: 0, displayOptions: { show: { resource: ['pdf'], operation: ['to-images'] } } },
|
|
647
|
-
{ displayName: 'Height', name: 'pdfHeight', type: 'number', default: 0, displayOptions: { show: { resource: ['pdf'], operation: ['to-images'] } } },
|
|
648
|
-
{ displayName: 'DPI', name: 'dpi', type: 'number', default: 150, displayOptions: { show: { resource: ['pdf'], operation: ['to-images'] } } },
|
|
647
|
+
{ displayName: 'Width', name: 'pdfWidth', type: 'number', default: 0, description: 'Resize width for PDF to images (optional).', displayOptions: { show: { resource: ['pdf'], operation: ['to-images'] } } },
|
|
648
|
+
{ displayName: 'Height', name: 'pdfHeight', type: 'number', default: 0, description: 'Resize height for PDF to images (optional).', displayOptions: { show: { resource: ['pdf'], operation: ['to-images'] } } },
|
|
649
|
+
{ displayName: 'DPI', name: 'dpi', type: 'number', default: 150, description: 'Rendering DPI for PDF to images.', displayOptions: { show: { resource: ['pdf'], operation: ['to-images'] } } },
|
|
649
650
|
{
|
|
650
651
|
displayName: 'Extract Image Format',
|
|
651
652
|
name: 'extractImageFormat',
|
|
652
653
|
type: 'options',
|
|
653
654
|
default: 'png',
|
|
655
|
+
description: 'Image format for extracted images.',
|
|
654
656
|
options: [
|
|
655
657
|
{ name: 'PNG', value: 'png' },
|
|
656
658
|
{ name: 'JPEG', value: 'jpeg' },
|
|
@@ -658,8 +660,8 @@ class DavixH2I {
|
|
|
658
660
|
],
|
|
659
661
|
displayOptions: { show: { resource: ['pdf'], operation: ['extract-images'] } },
|
|
660
662
|
},
|
|
661
|
-
{ displayName: 'Watermark Text', name: 'watermarkText', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } } },
|
|
662
|
-
{ displayName: 'Watermark Opacity', name: 'watermarkOpacity', type: 'number', default: 0.35, displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } } },
|
|
663
|
+
{ displayName: 'Watermark Text', name: 'watermarkText', type: 'string', default: '', description: 'Optional text watermark to apply.', displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } } },
|
|
664
|
+
{ displayName: 'Watermark Opacity', name: 'watermarkOpacity', type: 'number', default: 0.35, description: 'Watermark opacity (0-1).', displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } } },
|
|
663
665
|
{
|
|
664
666
|
displayName: 'Watermark Position',
|
|
665
667
|
name: 'watermarkPosition',
|
|
@@ -677,33 +679,35 @@ class DavixH2I {
|
|
|
677
679
|
{ displayName: 'Watermark Margin', name: 'watermarkMargin', type: 'number', default: 8, displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } } },
|
|
678
680
|
{ displayName: 'Watermark Font Size', name: 'watermarkFontSize', type: 'number', default: 24, displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } } },
|
|
679
681
|
{ displayName: 'Watermark Color', name: 'watermarkColor', type: 'string', default: '#000000', displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } } },
|
|
680
|
-
{ displayName: 'Watermark Scale', name: 'watermarkScale', type: 'number', default: 1, displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } } },
|
|
682
|
+
{ displayName: 'Watermark Scale', name: 'watermarkScale', type: 'number', default: 1, description: 'Scale factor for watermark.', displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } } },
|
|
681
683
|
{
|
|
682
684
|
displayName: 'Watermark Image Binary Property',
|
|
683
685
|
name: 'watermarkImageBinaryProp',
|
|
684
686
|
type: 'string',
|
|
685
687
|
default: '',
|
|
688
|
+
description: 'Binary property containing an image watermark (optional).',
|
|
686
689
|
displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } },
|
|
687
690
|
},
|
|
688
|
-
{ displayName: 'Degrees', name: 'degrees', type: 'number', default: 0, displayOptions: { show: { resource: ['pdf'], operation: ['rotate'] } } },
|
|
689
|
-
{ displayName: 'Title', name: 'title', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
690
|
-
{ displayName: 'Author', name: 'author', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
691
|
-
{ displayName: 'Subject', name: 'subject', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
692
|
-
{ displayName: 'Keywords', name: 'keywords', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
693
|
-
{ displayName: 'Creator', name: 'creator', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
694
|
-
{ displayName: 'Producer', name: 'producer', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
695
|
-
{ displayName: 'Clean All Metadata', name: 'cleanAllMetadata', type: 'boolean', default: false, displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
696
|
-
{ displayName: 'Order (JSON array)', name: 'order', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['reorder'] } } },
|
|
697
|
-
{ displayName: 'Mode', name: 'mode', type: 'string', default: 'range', displayOptions: { show: { resource: ['pdf'], operation: ['extract'] } } },
|
|
698
|
-
{ displayName: 'Flatten Forms', name: 'flattenForms', type: 'boolean', default: false, displayOptions: { show: { resource: ['pdf'], operation: ['flatten'] } } },
|
|
699
|
-
{ displayName: 'User Password', name: 'userPassword', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['encrypt'] } } },
|
|
700
|
-
{ displayName: 'Owner Password', name: 'ownerPassword', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['encrypt'] } } },
|
|
701
|
-
{ displayName: 'Password', name: 'password', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['decrypt'] } } },
|
|
691
|
+
{ displayName: 'Degrees', name: 'degrees', type: 'number', default: 0, description: 'Rotation angle in degrees.', displayOptions: { show: { resource: ['pdf'], operation: ['rotate'] } } },
|
|
692
|
+
{ displayName: 'Title', name: 'title', type: 'string', default: '', description: 'Set PDF title metadata.', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
693
|
+
{ displayName: 'Author', name: 'author', type: 'string', default: '', description: 'Set PDF author metadata.', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
694
|
+
{ displayName: 'Subject', name: 'subject', type: 'string', default: '', description: 'Set PDF subject metadata.', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
695
|
+
{ displayName: 'Keywords', name: 'keywords', type: 'string', default: '', description: 'Set PDF keywords metadata.', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
696
|
+
{ displayName: 'Creator', name: 'creator', type: 'string', default: '', description: 'Set PDF creator metadata.', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
697
|
+
{ displayName: 'Producer', name: 'producer', type: 'string', default: '', description: 'Set PDF producer metadata.', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
698
|
+
{ displayName: 'Clean All Metadata', name: 'cleanAllMetadata', type: 'boolean', default: false, description: 'Remove existing metadata before applying new fields.', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
699
|
+
{ displayName: 'Order (JSON array)', name: 'order', type: 'string', default: '', description: 'JSON array describing new page order (e.g. [2,1,3]).', displayOptions: { show: { resource: ['pdf'], operation: ['reorder'] } } },
|
|
700
|
+
{ displayName: 'Mode', name: 'mode', type: 'string', default: 'range', description: 'Extraction mode (e.g. range).', displayOptions: { show: { resource: ['pdf'], operation: ['extract'] } } },
|
|
701
|
+
{ displayName: 'Flatten Forms', name: 'flattenForms', type: 'boolean', default: false, description: 'Flatten form fields into static content.', displayOptions: { show: { resource: ['pdf'], operation: ['flatten'] } } },
|
|
702
|
+
{ displayName: 'User Password', name: 'userPassword', type: 'string', default: '', description: 'User password for encryption.', displayOptions: { show: { resource: ['pdf'], operation: ['encrypt'] } } },
|
|
703
|
+
{ displayName: 'Owner Password', name: 'ownerPassword', type: 'string', default: '', description: 'Owner password for encryption.', displayOptions: { show: { resource: ['pdf'], operation: ['encrypt'] } } },
|
|
704
|
+
{ displayName: 'Password', name: 'password', type: 'string', default: '', description: 'Password to decrypt PDF.', displayOptions: { show: { resource: ['pdf'], operation: ['decrypt'] } } },
|
|
702
705
|
{
|
|
703
706
|
displayName: 'Download Result(s) as Binary',
|
|
704
707
|
name: 'pdfDownloadBinary',
|
|
705
708
|
type: 'boolean',
|
|
706
709
|
default: false,
|
|
710
|
+
description: 'If enabled, download the first URL result into a binary property.',
|
|
707
711
|
displayOptions: { show: { resource: ['pdf'] } },
|
|
708
712
|
},
|
|
709
713
|
{
|
|
@@ -711,6 +715,7 @@ class DavixH2I {
|
|
|
711
715
|
name: 'pdfOutputBinaryProperty',
|
|
712
716
|
type: 'string',
|
|
713
717
|
default: 'data',
|
|
718
|
+
description: 'Binary property name to store downloaded PDF/image results.',
|
|
714
719
|
displayOptions: { show: { resource: ['pdf'], pdfDownloadBinary: [true] } },
|
|
715
720
|
},
|
|
716
721
|
// -------------------------
|
|
@@ -722,7 +727,7 @@ class DavixH2I {
|
|
|
722
727
|
type: 'string',
|
|
723
728
|
default: 'data',
|
|
724
729
|
placeholder: 'data OR img1,img2',
|
|
725
|
-
description: 'Comma-separated binary
|
|
730
|
+
description: 'Comma-separated binary properties containing images to analyze (sent as images files).',
|
|
726
731
|
displayOptions: { show: { resource: ['tools'] } },
|
|
727
732
|
},
|
|
728
733
|
{
|
|
@@ -730,12 +735,19 @@ class DavixH2I {
|
|
|
730
735
|
name: 'tool',
|
|
731
736
|
type: 'options',
|
|
732
737
|
default: 'metadata',
|
|
738
|
+
description: 'Single PixLab tool to run in action=single.',
|
|
733
739
|
options: [
|
|
734
740
|
{ name: 'Metadata', value: 'metadata' },
|
|
735
741
|
{ name: 'Colors', value: 'colors' },
|
|
736
742
|
{ name: 'Detect Format', value: 'detect-format' },
|
|
737
743
|
{ name: 'Orientation', value: 'orientation' },
|
|
738
744
|
{ name: 'Hash', value: 'hash' },
|
|
745
|
+
{ name: 'Similarity', value: 'similarity' },
|
|
746
|
+
{ name: 'Dimensions', value: 'dimensions' },
|
|
747
|
+
{ name: 'Palette', value: 'palette' },
|
|
748
|
+
{ name: 'Transparency', value: 'transparency' },
|
|
749
|
+
{ name: 'Quality', value: 'quality' },
|
|
750
|
+
{ name: 'Efficiency', value: 'efficiency' },
|
|
739
751
|
],
|
|
740
752
|
displayOptions: { show: { resource: ['tools'], operation: ['single'] } },
|
|
741
753
|
},
|
|
@@ -744,168 +756,83 @@ class DavixH2I {
|
|
|
744
756
|
name: 'tools',
|
|
745
757
|
type: 'multiOptions',
|
|
746
758
|
default: ['metadata'],
|
|
759
|
+
description: 'Multiple PixLab tools to run together in action=multitask.',
|
|
747
760
|
options: [
|
|
748
761
|
{ name: 'Metadata', value: 'metadata' },
|
|
749
762
|
{ name: 'Colors', value: 'colors' },
|
|
750
763
|
{ name: 'Detect Format', value: 'detect-format' },
|
|
751
764
|
{ name: 'Orientation', value: 'orientation' },
|
|
752
765
|
{ name: 'Hash', value: 'hash' },
|
|
766
|
+
{ name: 'Similarity', value: 'similarity' },
|
|
767
|
+
{ name: 'Dimensions', value: 'dimensions' },
|
|
768
|
+
{ name: 'Palette', value: 'palette' },
|
|
769
|
+
{ name: 'Transparency', value: 'transparency' },
|
|
770
|
+
{ name: 'Quality', value: 'quality' },
|
|
771
|
+
{ name: 'Efficiency', value: 'efficiency' },
|
|
753
772
|
],
|
|
754
773
|
displayOptions: { show: { resource: ['tools'], operation: ['multitask'] } },
|
|
755
774
|
},
|
|
756
775
|
{
|
|
757
|
-
displayName: '
|
|
758
|
-
name: '
|
|
759
|
-
type: '
|
|
760
|
-
default:
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
{ name: 'Palette Size', value: 'paletteSize' },
|
|
764
|
-
{ name: 'Hash Type', value: 'hashType' },
|
|
765
|
-
{ name: 'Quality Sample', value: 'qualitySample' },
|
|
766
|
-
{ name: 'Transparency Sample', value: 'transparencySample' },
|
|
767
|
-
{ name: 'Similarity Mode', value: 'similarityMode' },
|
|
768
|
-
{ name: 'Similarity Threshold', value: 'similarityThreshold' },
|
|
769
|
-
{ name: 'Efficiency Format', value: 'efficiencyFormat' },
|
|
770
|
-
{ name: 'Efficiency Quality', value: 'efficiencyQuality' },
|
|
771
|
-
],
|
|
772
|
-
displayOptions: { show: { resource: ['tools'], operation: ['multitask'] } },
|
|
773
|
-
},
|
|
774
|
-
{
|
|
775
|
-
displayName: 'Include Raw EXIF',
|
|
776
|
-
name: 'includeRawExif',
|
|
777
|
-
type: 'boolean',
|
|
778
|
-
default: false,
|
|
779
|
-
displayOptions: { show: { resource: ['tools'], operation: ['single'] } },
|
|
780
|
-
},
|
|
781
|
-
{
|
|
782
|
-
displayName: 'Include Raw EXIF',
|
|
783
|
-
name: 'multiIncludeRawExif',
|
|
784
|
-
type: 'boolean',
|
|
785
|
-
default: false,
|
|
786
|
-
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], toolsMultitaskOptions: ['includeRawExif'] } },
|
|
787
|
-
},
|
|
788
|
-
{
|
|
789
|
-
displayName: 'Palette Size',
|
|
790
|
-
name: 'paletteSize',
|
|
791
|
-
type: 'number',
|
|
792
|
-
default: 5,
|
|
776
|
+
displayName: 'Options',
|
|
777
|
+
name: 'options',
|
|
778
|
+
type: 'collection',
|
|
779
|
+
default: {},
|
|
780
|
+
placeholder: 'Add option',
|
|
781
|
+
description: 'Optional tool parameters (only applied when the selected tool supports them).',
|
|
793
782
|
displayOptions: { show: { resource: ['tools'], operation: ['single'] } },
|
|
794
|
-
},
|
|
795
|
-
{
|
|
796
|
-
displayName: 'Palette Size',
|
|
797
|
-
name: 'multiPaletteSize',
|
|
798
|
-
type: 'number',
|
|
799
|
-
default: 5,
|
|
800
|
-
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], toolsMultitaskOptions: ['paletteSize'] } },
|
|
801
|
-
},
|
|
802
|
-
{
|
|
803
|
-
displayName: 'Hash Type',
|
|
804
|
-
name: 'hashType',
|
|
805
|
-
type: 'options',
|
|
806
|
-
default: 'phash',
|
|
807
783
|
options: [
|
|
808
|
-
{ name: '
|
|
809
|
-
{ name: '
|
|
810
|
-
{
|
|
784
|
+
{ displayName: 'Include Raw EXIF', name: 'includeRawExif', type: 'boolean', default: false, description: 'Include raw EXIF data (metadata tool only).' },
|
|
785
|
+
{ displayName: 'Palette Size', name: 'paletteSize', type: 'number', default: 5, description: 'Number of colors to extract (palette tool).' },
|
|
786
|
+
{
|
|
787
|
+
displayName: 'Hash Type',
|
|
788
|
+
name: 'hashType',
|
|
789
|
+
type: 'options',
|
|
790
|
+
default: 'phash',
|
|
791
|
+
description: 'Hash algorithm to compute (hash tool).',
|
|
792
|
+
options: [
|
|
793
|
+
{ name: 'pHash', value: 'phash' },
|
|
794
|
+
{ name: 'MD5', value: 'md5' },
|
|
795
|
+
{ name: 'SHA1', value: 'sha1' },
|
|
796
|
+
],
|
|
797
|
+
},
|
|
798
|
+
{ displayName: 'Similarity Mode', name: 'similarityMode', type: 'string', default: '', description: 'Similarity mode (similarity tool).' },
|
|
799
|
+
{ displayName: 'Similarity Threshold', name: 'similarityThreshold', type: 'number', default: 0, description: 'Similarity threshold (similarity tool).' },
|
|
800
|
+
{ displayName: 'Quality Sample', name: 'qualitySample', type: 'number', default: 0, description: 'Sample size for quality analysis (quality tool).' },
|
|
801
|
+
{ displayName: 'Transparency Sample', name: 'transparencySample', type: 'number', default: 0, description: 'Sample size for transparency analysis (transparency tool).' },
|
|
802
|
+
{ displayName: 'Efficiency Format', name: 'efficiencyFormat', type: 'string', default: '', description: 'Output format for efficiency tool.' },
|
|
803
|
+
{ displayName: 'Efficiency Quality', name: 'efficiencyQuality', type: 'number', default: 0, description: 'Quality setting for efficiency tool.' },
|
|
811
804
|
],
|
|
812
|
-
displayOptions: { show: { resource: ['tools'], operation: ['single'] } },
|
|
813
805
|
},
|
|
814
806
|
{
|
|
815
|
-
displayName: '
|
|
816
|
-
name: '
|
|
817
|
-
type: '
|
|
818
|
-
default:
|
|
807
|
+
displayName: 'Options',
|
|
808
|
+
name: 'options',
|
|
809
|
+
type: 'collection',
|
|
810
|
+
default: {},
|
|
811
|
+
placeholder: 'Add option',
|
|
812
|
+
description: 'Optional tool parameters (applied per selected tool).',
|
|
813
|
+
displayOptions: { show: { resource: ['tools'], operation: ['multitask'] } },
|
|
819
814
|
options: [
|
|
820
|
-
{ name: '
|
|
821
|
-
{ name: '
|
|
822
|
-
{
|
|
815
|
+
{ displayName: 'Include Raw EXIF', name: 'includeRawExif', type: 'boolean', default: false, description: 'Include raw EXIF data (metadata tool).' },
|
|
816
|
+
{ displayName: 'Palette Size', name: 'paletteSize', type: 'number', default: 5, description: 'Number of colors to extract (palette tool).' },
|
|
817
|
+
{
|
|
818
|
+
displayName: 'Hash Type',
|
|
819
|
+
name: 'hashType',
|
|
820
|
+
type: 'options',
|
|
821
|
+
default: 'phash',
|
|
822
|
+
description: 'Hash algorithm to compute (hash tool).',
|
|
823
|
+
options: [
|
|
824
|
+
{ name: 'pHash', value: 'phash' },
|
|
825
|
+
{ name: 'MD5', value: 'md5' },
|
|
826
|
+
{ name: 'SHA1', value: 'sha1' },
|
|
827
|
+
],
|
|
828
|
+
},
|
|
829
|
+
{ displayName: 'Similarity Mode', name: 'similarityMode', type: 'string', default: '', description: 'Similarity mode (similarity tool).' },
|
|
830
|
+
{ displayName: 'Similarity Threshold', name: 'similarityThreshold', type: 'number', default: 0, description: 'Similarity threshold (similarity tool).' },
|
|
831
|
+
{ displayName: 'Quality Sample', name: 'qualitySample', type: 'number', default: 0, description: 'Sample size for quality analysis (quality tool).' },
|
|
832
|
+
{ displayName: 'Transparency Sample', name: 'transparencySample', type: 'number', default: 0, description: 'Sample size for transparency analysis (transparency tool).' },
|
|
833
|
+
{ displayName: 'Efficiency Format', name: 'efficiencyFormat', type: 'string', default: '', description: 'Output format for efficiency tool.' },
|
|
834
|
+
{ displayName: 'Efficiency Quality', name: 'efficiencyQuality', type: 'number', default: 0, description: 'Quality setting for efficiency tool.' },
|
|
823
835
|
],
|
|
824
|
-
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], toolsMultitaskOptions: ['hashType'] } },
|
|
825
|
-
},
|
|
826
|
-
{
|
|
827
|
-
displayName: 'Quality Sample',
|
|
828
|
-
name: 'qualitySample',
|
|
829
|
-
type: 'number',
|
|
830
|
-
default: 0,
|
|
831
|
-
displayOptions: { show: { resource: ['tools'], operation: ['single'] } },
|
|
832
|
-
},
|
|
833
|
-
{
|
|
834
|
-
displayName: 'Quality Sample',
|
|
835
|
-
name: 'multiQualitySample',
|
|
836
|
-
type: 'number',
|
|
837
|
-
default: 0,
|
|
838
|
-
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], toolsMultitaskOptions: ['qualitySample'] } },
|
|
839
|
-
},
|
|
840
|
-
{
|
|
841
|
-
displayName: 'Transparency Sample',
|
|
842
|
-
name: 'transparencySample',
|
|
843
|
-
type: 'number',
|
|
844
|
-
default: 0,
|
|
845
|
-
displayOptions: { show: { resource: ['tools'], operation: ['single'] } },
|
|
846
|
-
},
|
|
847
|
-
{
|
|
848
|
-
displayName: 'Transparency Sample',
|
|
849
|
-
name: 'multiTransparencySample',
|
|
850
|
-
type: 'number',
|
|
851
|
-
default: 0,
|
|
852
|
-
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], toolsMultitaskOptions: ['transparencySample'] } },
|
|
853
|
-
},
|
|
854
|
-
{
|
|
855
|
-
displayName: 'Similarity Mode',
|
|
856
|
-
name: 'similarityMode',
|
|
857
|
-
type: 'string',
|
|
858
|
-
default: '',
|
|
859
|
-
displayOptions: { show: { resource: ['tools'], operation: ['single'] } },
|
|
860
|
-
},
|
|
861
|
-
{
|
|
862
|
-
displayName: 'Similarity Mode',
|
|
863
|
-
name: 'multiSimilarityMode',
|
|
864
|
-
type: 'string',
|
|
865
|
-
default: '',
|
|
866
|
-
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], toolsMultitaskOptions: ['similarityMode'] } },
|
|
867
|
-
},
|
|
868
|
-
{
|
|
869
|
-
displayName: 'Similarity Threshold',
|
|
870
|
-
name: 'similarityThreshold',
|
|
871
|
-
type: 'number',
|
|
872
|
-
default: 0,
|
|
873
|
-
displayOptions: { show: { resource: ['tools'], operation: ['single'] } },
|
|
874
|
-
},
|
|
875
|
-
{
|
|
876
|
-
displayName: 'Similarity Threshold',
|
|
877
|
-
name: 'multiSimilarityThreshold',
|
|
878
|
-
type: 'number',
|
|
879
|
-
default: 0,
|
|
880
|
-
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], toolsMultitaskOptions: ['similarityThreshold'] } },
|
|
881
|
-
},
|
|
882
|
-
{
|
|
883
|
-
displayName: 'Efficiency Format',
|
|
884
|
-
name: 'efficiencyFormat',
|
|
885
|
-
type: 'string',
|
|
886
|
-
default: '',
|
|
887
|
-
displayOptions: { show: { resource: ['tools'], operation: ['single'] } },
|
|
888
|
-
},
|
|
889
|
-
{
|
|
890
|
-
displayName: 'Efficiency Format',
|
|
891
|
-
name: 'multiEfficiencyFormat',
|
|
892
|
-
type: 'string',
|
|
893
|
-
default: '',
|
|
894
|
-
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], toolsMultitaskOptions: ['efficiencyFormat'] } },
|
|
895
|
-
},
|
|
896
|
-
{
|
|
897
|
-
displayName: 'Efficiency Quality',
|
|
898
|
-
name: 'efficiencyQuality',
|
|
899
|
-
type: 'number',
|
|
900
|
-
default: 0,
|
|
901
|
-
displayOptions: { show: { resource: ['tools'], operation: ['single'] } },
|
|
902
|
-
},
|
|
903
|
-
{
|
|
904
|
-
displayName: 'Efficiency Quality',
|
|
905
|
-
name: 'multiEfficiencyQuality',
|
|
906
|
-
type: 'number',
|
|
907
|
-
default: 0,
|
|
908
|
-
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], toolsMultitaskOptions: ['efficiencyQuality'] } },
|
|
909
836
|
},
|
|
910
837
|
],
|
|
911
838
|
};
|
|
@@ -1138,92 +1065,108 @@ class DavixH2I {
|
|
|
1138
1065
|
setBool('includeRawExif', this.getNodeParameter('includeRawExif', itemIndex));
|
|
1139
1066
|
break;
|
|
1140
1067
|
case 'multitask': {
|
|
1141
|
-
|
|
1142
|
-
const
|
|
1143
|
-
const
|
|
1144
|
-
if (
|
|
1145
|
-
|
|
1146
|
-
if (
|
|
1147
|
-
setNumber('
|
|
1148
|
-
if (
|
|
1149
|
-
|
|
1150
|
-
if (
|
|
1151
|
-
setBool('
|
|
1152
|
-
if (
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
setNumber('
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
if (
|
|
1159
|
-
|
|
1160
|
-
if (
|
|
1161
|
-
setNumber('
|
|
1162
|
-
if (
|
|
1163
|
-
|
|
1164
|
-
if (
|
|
1165
|
-
|
|
1166
|
-
if (
|
|
1167
|
-
|
|
1168
|
-
if (
|
|
1169
|
-
|
|
1170
|
-
if (
|
|
1171
|
-
|
|
1172
|
-
if (
|
|
1173
|
-
|
|
1174
|
-
if (
|
|
1175
|
-
setNumber('
|
|
1176
|
-
if (
|
|
1177
|
-
|
|
1178
|
-
if (
|
|
1179
|
-
|
|
1180
|
-
if (
|
|
1181
|
-
|
|
1182
|
-
if (
|
|
1183
|
-
|
|
1184
|
-
if (
|
|
1185
|
-
|
|
1186
|
-
if (
|
|
1187
|
-
setNumber('
|
|
1188
|
-
if (
|
|
1189
|
-
setNumber('
|
|
1190
|
-
if (
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
setNumber('
|
|
1194
|
-
|
|
1195
|
-
setNumber('
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
setNumber('
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
setNumber('
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1068
|
+
const options = this.getNodeParameter('options', itemIndex, {}) || {};
|
|
1069
|
+
const hasVal = (key) => Object.prototype.hasOwnProperty.call(options, key);
|
|
1070
|
+
const getOpt = (key) => options[key];
|
|
1071
|
+
if (hasVal('format'))
|
|
1072
|
+
setString('format', getOpt('format'));
|
|
1073
|
+
if (hasVal('width'))
|
|
1074
|
+
setNumber('width', Number(getOpt('width')));
|
|
1075
|
+
if (hasVal('height'))
|
|
1076
|
+
setNumber('height', Number(getOpt('height')));
|
|
1077
|
+
if (hasVal('enlarge'))
|
|
1078
|
+
setBool('enlarge', Boolean(getOpt('enlarge')));
|
|
1079
|
+
if (hasVal('normalizeOrientation'))
|
|
1080
|
+
setBool('normalizeOrientation', Boolean(getOpt('normalizeOrientation')));
|
|
1081
|
+
if (hasVal('cropX'))
|
|
1082
|
+
setNumber('cropX', Number(getOpt('cropX')));
|
|
1083
|
+
if (hasVal('cropY'))
|
|
1084
|
+
setNumber('cropY', Number(getOpt('cropY')));
|
|
1085
|
+
if (hasVal('cropWidth'))
|
|
1086
|
+
setNumber('cropWidth', Number(getOpt('cropWidth')));
|
|
1087
|
+
if (hasVal('cropHeight'))
|
|
1088
|
+
setNumber('cropHeight', Number(getOpt('cropHeight')));
|
|
1089
|
+
if (hasVal('backgroundColor'))
|
|
1090
|
+
setString('backgroundColor', String(getOpt('backgroundColor')));
|
|
1091
|
+
if (hasVal('rotate'))
|
|
1092
|
+
setNumber('rotate', Number(getOpt('rotate')));
|
|
1093
|
+
if (hasVal('flipH'))
|
|
1094
|
+
setBool('flipH', Boolean(getOpt('flipH')));
|
|
1095
|
+
if (hasVal('flipV'))
|
|
1096
|
+
setBool('flipV', Boolean(getOpt('flipV')));
|
|
1097
|
+
if (hasVal('colorSpace'))
|
|
1098
|
+
formData.colorSpace = String(getOpt('colorSpace'));
|
|
1099
|
+
if (hasVal('targetSizeKB'))
|
|
1100
|
+
setNumber('targetSizeKB', Number(getOpt('targetSizeKB')));
|
|
1101
|
+
if (hasVal('quality'))
|
|
1102
|
+
setNumber('quality', Number(getOpt('quality')));
|
|
1103
|
+
if (hasVal('keepMetadata'))
|
|
1104
|
+
setBool('keepMetadata', Boolean(getOpt('keepMetadata')));
|
|
1105
|
+
if (hasVal('blur'))
|
|
1106
|
+
setNumber('blur', Number(getOpt('blur')));
|
|
1107
|
+
if (hasVal('sharpen'))
|
|
1108
|
+
setNumber('sharpen', Number(getOpt('sharpen')));
|
|
1109
|
+
if (hasVal('grayscale'))
|
|
1110
|
+
setBool('grayscale', Boolean(getOpt('grayscale')));
|
|
1111
|
+
if (hasVal('sepia'))
|
|
1112
|
+
setBool('sepia', Boolean(getOpt('sepia')));
|
|
1113
|
+
if (hasVal('brightness'))
|
|
1114
|
+
setNumber('brightness', Number(getOpt('brightness')));
|
|
1115
|
+
if (hasVal('contrast'))
|
|
1116
|
+
setNumber('contrast', Number(getOpt('contrast')));
|
|
1117
|
+
if (hasVal('saturation'))
|
|
1118
|
+
setNumber('saturation', Number(getOpt('saturation')));
|
|
1119
|
+
if (hasVal('pad'))
|
|
1120
|
+
setNumber('pad', Number(getOpt('pad')));
|
|
1121
|
+
if (hasVal('padTop'))
|
|
1122
|
+
setNumber('padTop', Number(getOpt('padTop')));
|
|
1123
|
+
if (hasVal('padRight'))
|
|
1124
|
+
setNumber('padRight', Number(getOpt('padRight')));
|
|
1125
|
+
if (hasVal('padBottom'))
|
|
1126
|
+
setNumber('padBottom', Number(getOpt('padBottom')));
|
|
1127
|
+
if (hasVal('padLeft'))
|
|
1128
|
+
setNumber('padLeft', Number(getOpt('padLeft')));
|
|
1129
|
+
if (hasVal('padColor'))
|
|
1130
|
+
setString('padColor', String(getOpt('padColor')));
|
|
1131
|
+
if (hasVal('borderRadius'))
|
|
1132
|
+
setNumber('borderRadius', Number(getOpt('borderRadius')));
|
|
1133
|
+
if (hasVal('border'))
|
|
1134
|
+
setNumber('border', Number(getOpt('border')));
|
|
1135
|
+
if (hasVal('borderColor'))
|
|
1136
|
+
setString('borderColor', String(getOpt('borderColor')));
|
|
1137
|
+
if (hasVal('backgroundBlur'))
|
|
1138
|
+
setNumber('backgroundBlur', Number(getOpt('backgroundBlur')));
|
|
1139
|
+
if (hasVal('watermarkText'))
|
|
1140
|
+
setString('watermarkText', String(getOpt('watermarkText')));
|
|
1141
|
+
if (hasVal('watermarkFontSize'))
|
|
1142
|
+
setNumber('watermarkFontSize', Number(getOpt('watermarkFontSize')));
|
|
1143
|
+
if (hasVal('watermarkColor'))
|
|
1144
|
+
setString('watermarkColor', String(getOpt('watermarkColor')));
|
|
1145
|
+
if (hasVal('watermarkOpacity'))
|
|
1146
|
+
setNumber('watermarkOpacity', Number(getOpt('watermarkOpacity')));
|
|
1147
|
+
if (hasVal('watermarkPosition'))
|
|
1148
|
+
formData.watermarkPosition = String(getOpt('watermarkPosition'));
|
|
1149
|
+
if (hasVal('watermarkMargin'))
|
|
1150
|
+
setNumber('watermarkMargin', Number(getOpt('watermarkMargin')));
|
|
1151
|
+
if (hasVal('watermarkScale'))
|
|
1152
|
+
setNumber('watermarkScale', Number(getOpt('watermarkScale')));
|
|
1153
|
+
if (hasVal('pdfMode'))
|
|
1154
|
+
formData.pdfMode = String(getOpt('pdfMode'));
|
|
1155
|
+
if (hasVal('pdfPageSize'))
|
|
1156
|
+
formData.pdfPageSize = String(getOpt('pdfPageSize'));
|
|
1157
|
+
if (hasVal('pdfOrientation'))
|
|
1158
|
+
formData.pdfOrientation = String(getOpt('pdfOrientation'));
|
|
1159
|
+
if (hasVal('pdfMargin'))
|
|
1160
|
+
setNumber('pdfMargin', Number(getOpt('pdfMargin')));
|
|
1161
|
+
if (hasVal('pdfEmbedFormat'))
|
|
1162
|
+
formData.pdfEmbedFormat = String(getOpt('pdfEmbedFormat'));
|
|
1163
|
+
if (hasVal('pdfJpegQuality'))
|
|
1164
|
+
setNumber('pdfJpegQuality', Number(getOpt('pdfJpegQuality')));
|
|
1165
|
+
if (hasVal('includeRawExif'))
|
|
1166
|
+
setBool('includeRawExif', Boolean(getOpt('includeRawExif')));
|
|
1167
|
+
const watermarkProp = this.getNodeParameter('watermarkBinaryProperty', itemIndex, '');
|
|
1168
|
+
if (watermarkProp)
|
|
1169
|
+
await includeWatermarkFile(watermarkProp);
|
|
1227
1170
|
break;
|
|
1228
1171
|
}
|
|
1229
1172
|
}
|
|
@@ -1367,36 +1310,55 @@ class DavixH2I {
|
|
|
1367
1310
|
const setBool = (name, value) => {
|
|
1368
1311
|
formData[name] = toBoolString(value);
|
|
1369
1312
|
};
|
|
1313
|
+
let selectedTools = [];
|
|
1370
1314
|
if (action === 'single') {
|
|
1371
1315
|
const tool = this.getNodeParameter('tool', itemIndex);
|
|
1372
1316
|
if (!tool)
|
|
1373
1317
|
throw new Error('Select one tool for single action.');
|
|
1318
|
+
selectedTools = [tool];
|
|
1374
1319
|
formData.tools = tool;
|
|
1375
1320
|
}
|
|
1376
1321
|
else {
|
|
1377
1322
|
const tools = this.getNodeParameter('tools', itemIndex);
|
|
1323
|
+
selectedTools = tools;
|
|
1378
1324
|
formData.tools = tools.join(',');
|
|
1379
1325
|
}
|
|
1380
|
-
const
|
|
1381
|
-
const
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
if (
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
if (
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
if (
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
if (
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1326
|
+
const toolOptions = this.getNodeParameter('options', itemIndex, {}) || {};
|
|
1327
|
+
const hasOpt = (key) => Object.prototype.hasOwnProperty.call(toolOptions, key);
|
|
1328
|
+
const getOpt = (key) => toolOptions[key];
|
|
1329
|
+
const hasTool = (toolName) => selectedTools.includes(toolName);
|
|
1330
|
+
if (hasTool('metadata')) {
|
|
1331
|
+
if (hasOpt('includeRawExif'))
|
|
1332
|
+
setBool('includeRawExif', Boolean(getOpt('includeRawExif')));
|
|
1333
|
+
}
|
|
1334
|
+
if (hasTool('palette')) {
|
|
1335
|
+
if (hasOpt('paletteSize'))
|
|
1336
|
+
setNumber('paletteSize', Number(getOpt('paletteSize')));
|
|
1337
|
+
}
|
|
1338
|
+
if (hasTool('hash')) {
|
|
1339
|
+
if (hasOpt('hashType'))
|
|
1340
|
+
setString('hashType', String(getOpt('hashType')));
|
|
1341
|
+
}
|
|
1342
|
+
if (hasTool('quality')) {
|
|
1343
|
+
if (hasOpt('qualitySample'))
|
|
1344
|
+
setNumber('qualitySample', Number(getOpt('qualitySample')));
|
|
1345
|
+
}
|
|
1346
|
+
if (hasTool('transparency')) {
|
|
1347
|
+
if (hasOpt('transparencySample'))
|
|
1348
|
+
setNumber('transparencySample', Number(getOpt('transparencySample')));
|
|
1349
|
+
}
|
|
1350
|
+
if (hasTool('similarity')) {
|
|
1351
|
+
if (hasOpt('similarityMode'))
|
|
1352
|
+
setString('similarityMode', String(getOpt('similarityMode')));
|
|
1353
|
+
if (hasOpt('similarityThreshold'))
|
|
1354
|
+
setNumber('similarityThreshold', Number(getOpt('similarityThreshold')));
|
|
1355
|
+
}
|
|
1356
|
+
if (hasTool('efficiency')) {
|
|
1357
|
+
if (hasOpt('efficiencyFormat'))
|
|
1358
|
+
setString('efficiencyFormat', String(getOpt('efficiencyFormat')));
|
|
1359
|
+
if (hasOpt('efficiencyQuality'))
|
|
1360
|
+
setNumber('efficiencyQuality', Number(getOpt('efficiencyQuality')));
|
|
1361
|
+
}
|
|
1400
1362
|
const response = await GenericFunctions_1.davixRequest.call(this, {
|
|
1401
1363
|
method: 'POST',
|
|
1402
1364
|
url: '/v1/tools',
|