n8n-nodes-h2i 1.0.3 → 1.0.5

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.
@@ -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 property names from previous nodes (each will be sent as an `images` file).',
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' },
@@ -248,26 +268,27 @@ class DavixH2I {
248
268
  ],
249
269
  displayOptions: { show: { resource: ['image'] }, hide: { operation: ['multitask'] } },
250
270
  },
251
- { displayName: 'Width', name: 'imageWidth', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['resize', 'format'] } } },
252
- { displayName: 'Height', name: 'imageHeight', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['resize', 'format'] } } },
253
- { displayName: 'Enlarge', name: 'enlarge', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['resize'] } } },
254
- { displayName: 'Normalize Orientation', name: 'normalizeOrientation', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['resize', 'crop', 'enhance', 'metadata'] } } },
255
- { displayName: 'Crop X', name: 'cropX', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['crop'] } } },
256
- { displayName: 'Crop Y', name: 'cropY', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['crop'] } } },
257
- { displayName: 'Crop Width', name: 'cropWidth', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['crop'] } } },
258
- { displayName: 'Crop Height', name: 'cropHeight', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['crop'] } } },
259
- { displayName: 'Background Color', name: 'backgroundColor', type: 'string', default: '', displayOptions: { show: { resource: ['image'], operation: ['crop', 'compress', 'background'] } } },
260
- { displayName: 'Rotate (degrees)', name: 'rotate', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['transform'] } } },
261
- { displayName: 'Flip Horizontal', name: 'flipH', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['transform'] } } },
262
- { displayName: 'Flip Vertical', name: 'flipV', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['transform'] } } },
263
- { displayName: 'Color Space', name: 'colorSpace', type: 'options', default: 'srgb', options: [{ name: 'sRGB', value: 'srgb' }, { name: 'Display P3', value: 'display-p3' }], displayOptions: { show: { resource: ['image'], operation: ['transform', 'compress'] } } },
264
- { displayName: 'Target Size (KB)', name: 'targetSizeKB', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['compress'] } } },
265
- { displayName: 'Quality', name: 'quality', type: 'number', default: 82, displayOptions: { show: { resource: ['image'], operation: ['compress'] } } },
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'] } } },
266
286
  {
267
287
  displayName: 'Keep Metadata',
268
288
  name: 'keepMetadata',
269
289
  type: 'boolean',
270
290
  default: false,
291
+ description: 'Preserve EXIF/metadata when possible.',
271
292
  displayOptions: {
272
293
  show: {
273
294
  resource: ['image'],
@@ -275,27 +296,27 @@ class DavixH2I {
275
296
  },
276
297
  },
277
298
  },
278
- { displayName: 'Blur', name: 'blur', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
279
- { displayName: 'Sharpen', name: 'sharpen', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
280
- { displayName: 'Grayscale', name: 'grayscale', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
281
- { displayName: 'Sepia', name: 'sepia', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
282
- { displayName: 'Brightness', name: 'brightness', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
283
- { displayName: 'Contrast', name: 'contrast', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
284
- { displayName: 'Saturation', name: 'saturation', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
285
- { displayName: 'Pad', name: 'pad', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['padding', 'frame'] } } },
286
- { displayName: 'Pad Top', name: 'padTop', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['padding'] } } },
287
- { displayName: 'Pad Right', name: 'padRight', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['padding'] } } },
288
- { displayName: 'Pad Bottom', name: 'padBottom', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['padding'] } } },
289
- { displayName: 'Pad Left', name: 'padLeft', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['padding'] } } },
290
- { displayName: 'Pad Color', name: 'padColor', type: 'string', default: '', displayOptions: { show: { resource: ['image'], operation: ['padding', 'frame', 'background'] } } },
291
- { displayName: 'Border', name: 'border', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['frame'] } } },
292
- { displayName: 'Border Color', name: 'borderColor', type: 'string', default: '', displayOptions: { show: { resource: ['image'], operation: ['frame'] } } },
293
- { displayName: 'Border Radius', name: 'borderRadius', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['padding', 'background'] } } },
294
- { displayName: 'Background Blur', name: 'backgroundBlur', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['background'] } } },
295
- { displayName: 'Watermark Text', name: 'watermarkText', type: 'string', default: '', displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
296
- { displayName: 'Watermark Font Size', name: 'watermarkFontSize', type: 'number', default: 24, displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
297
- { displayName: 'Watermark Color', name: 'watermarkColor', type: 'string', default: '#000000', displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
298
- { 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'] } } },
299
320
  {
300
321
  displayName: 'Watermark Position',
301
322
  name: 'watermarkPosition',
@@ -308,16 +329,18 @@ class DavixH2I {
308
329
  { name: 'Bottom Left', value: 'bottom-left' },
309
330
  { name: 'Bottom Right', value: 'bottom-right' },
310
331
  ],
332
+ description: 'Position for text/image watermark.',
311
333
  displayOptions: { show: { resource: ['image'], operation: ['watermark'] } },
312
334
  },
313
- { displayName: 'Watermark Margin', name: 'watermarkMargin', type: 'number', default: 8, displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
314
- { 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'] } } },
315
337
  {
316
338
  displayName: 'Watermark Image Binary Property',
317
339
  name: 'watermarkImageBinaryProp',
318
340
  type: 'string',
319
341
  default: '',
320
342
  placeholder: 'watermarkImage',
343
+ description: 'Binary property containing an image watermark (optional).',
321
344
  displayOptions: { show: { resource: ['image'], operation: ['watermark'] } },
322
345
  },
323
346
  {
@@ -336,6 +359,7 @@ class DavixH2I {
336
359
  name: 'pdfPageSize',
337
360
  type: 'options',
338
361
  default: 'auto',
362
+ description: 'Page size to use when exporting to PDF.',
339
363
  options: [
340
364
  { name: 'Auto', value: 'auto' },
341
365
  { name: 'A4', value: 'a4' },
@@ -348,6 +372,7 @@ class DavixH2I {
348
372
  name: 'pdfOrientation',
349
373
  type: 'options',
350
374
  default: 'portrait',
375
+ description: 'Orientation for pages in the exported PDF.',
351
376
  options: [
352
377
  { name: 'Portrait', value: 'portrait' },
353
378
  { name: 'Landscape', value: 'landscape' },
@@ -359,6 +384,7 @@ class DavixH2I {
359
384
  name: 'pdfMargin',
360
385
  type: 'number',
361
386
  default: 0,
387
+ description: 'Margin (in pixels) applied to the exported PDF pages.',
362
388
  displayOptions: { show: { resource: ['image'], operation: ['pdf'] } },
363
389
  },
364
390
  {
@@ -366,6 +392,7 @@ class DavixH2I {
366
392
  name: 'pdfEmbedFormat',
367
393
  type: 'options',
368
394
  default: 'png',
395
+ description: 'Image format embedded inside the generated PDF.',
369
396
  options: [
370
397
  { name: 'PNG', value: 'png' },
371
398
  { name: 'JPEG', value: 'jpeg' },
@@ -377,55 +404,35 @@ class DavixH2I {
377
404
  name: 'pdfJpegQuality',
378
405
  type: 'number',
379
406
  default: 85,
407
+ description: 'JPEG quality used when embedding images into the PDF.',
380
408
  displayOptions: { show: { resource: ['image'], operation: ['pdf'] } },
381
409
  },
382
- { displayName: 'Include Raw EXIF', name: 'includeRawExif', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['metadata'] } } },
410
+ { displayName: 'Include Raw EXIF', name: 'includeRawExif', type: 'boolean', default: false, description: 'Include raw EXIF data when available.', displayOptions: { show: { resource: ['image'], operation: ['metadata'] } } },
383
411
  {
384
- displayName: 'Multitask Options',
385
- name: 'imageMultitaskOptions',
412
+ displayName: 'Actions',
413
+ name: 'actions',
386
414
  type: 'multiOptions',
387
415
  default: [],
416
+ description: 'Select one or more actions to apply. Selecting an action reveals its parameters below.',
417
+ displayOptions: { show: { resource: ['image'], operation: ['multitask'] } },
388
418
  options: [
389
419
  { name: 'Format', value: 'format' },
390
- { name: 'Width', value: 'width' },
391
- { name: 'Height', value: 'height' },
392
- { name: 'Enlarge', value: 'enlarge' },
393
- { name: 'Normalize Orientation', value: 'normalizeOrientation' },
420
+ { name: 'Resize', value: 'resize' },
394
421
  { name: 'Crop', value: 'crop' },
395
- { name: 'Background Color', value: 'backgroundColor' },
396
- { name: 'Rotate', value: 'rotate' },
397
- { name: 'Flip Horizontal', value: 'flipH' },
398
- { name: 'Flip Vertical', value: 'flipV' },
399
- { name: 'Color Space', value: 'colorSpace' },
400
- { name: 'Target Size (KB)', value: 'targetSizeKB' },
401
- { name: 'Quality', value: 'quality' },
402
- { name: 'Keep Metadata', value: 'keepMetadata' },
403
- { name: 'Blur', value: 'blur' },
404
- { name: 'Sharpen', value: 'sharpen' },
405
- { name: 'Grayscale', value: 'grayscale' },
406
- { name: 'Sepia', value: 'sepia' },
407
- { name: 'Brightness', value: 'brightness' },
408
- { name: 'Contrast', value: 'contrast' },
409
- { name: 'Saturation', value: 'saturation' },
410
- { name: 'Pad', value: 'pad' },
411
- { name: 'Pad Sides', value: 'padSides' },
412
- { name: 'Pad Color', value: 'padColor' },
413
- { name: 'Border', value: 'border' },
414
- { name: 'Border Color', value: 'borderColor' },
415
- { name: 'Border Radius', value: 'borderRadius' },
416
- { name: 'Background Blur', value: 'backgroundBlur' },
422
+ { name: 'Transform', value: 'transform' },
423
+ { name: 'Compress', value: 'compress' },
424
+ { name: 'Enhance', value: 'enhance' },
425
+ { name: 'Frame', value: 'frame' },
426
+ { name: 'Background', value: 'background' },
417
427
  { name: 'Watermark', value: 'watermark' },
418
- { name: 'PDF Options', value: 'pdf' },
419
- { name: 'Include Raw EXIF', value: 'includeRawExif' },
420
428
  ],
421
- displayOptions: { show: { resource: ['image'], operation: ['multitask'] } },
422
429
  },
423
- // Conditional image fields for multitask
424
430
  {
425
431
  displayName: 'Format',
426
- name: 'multiFormat',
432
+ name: 'multitaskFormat',
427
433
  type: 'options',
428
434
  default: 'webp',
435
+ description: 'Output format for the multitask result.',
429
436
  options: [
430
437
  { name: 'JPEG', value: 'jpeg' },
431
438
  { name: 'PNG', value: 'png' },
@@ -435,165 +442,204 @@ class DavixH2I {
435
442
  { name: 'SVG', value: 'svg' },
436
443
  { name: 'PDF', value: 'pdf' },
437
444
  ],
438
- displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['format'] } },
445
+ displayOptions: { show: { resource: ['image'], operation: ['multitask'] } },
439
446
  },
440
- { displayName: 'Width', name: 'multiWidth', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['width'] } } },
441
- { displayName: 'Height', name: 'multiHeight', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['height'] } } },
442
- { displayName: 'Enlarge', name: 'multiEnlarge', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['enlarge'] } } },
443
447
  {
444
- displayName: 'Normalize Orientation',
445
- name: 'multiNormalizeOrientation',
448
+ displayName: 'Keep Metadata',
449
+ name: 'multitaskKeepMetadata',
446
450
  type: 'boolean',
447
451
  default: false,
448
- displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['normalizeOrientation'] } },
452
+ description: 'Preserve EXIF/metadata for the multitask request when possible.',
453
+ displayOptions: { show: { resource: ['image'], operation: ['multitask'] } },
449
454
  },
450
- { displayName: 'Crop X', name: 'multiCropX', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['crop'] } } },
451
- { displayName: 'Crop Y', name: 'multiCropY', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['crop'] } } },
452
- { displayName: 'Crop Width', name: 'multiCropWidth', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['crop'] } } },
453
- { displayName: 'Crop Height', name: 'multiCropHeight', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['crop'] } } },
454
- { displayName: 'Background Color', name: 'multiBackgroundColor', type: 'string', default: '', displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['backgroundColor'] } } },
455
- { displayName: 'Rotate (degrees)', name: 'multiRotate', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['rotate'] } } },
456
- { displayName: 'Flip Horizontal', name: 'multiFlipH', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['flipH'] } } },
457
- { displayName: 'Flip Vertical', name: 'multiFlipV', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['flipV'] } } },
458
455
  {
459
- displayName: 'Color Space',
460
- name: 'multiColorSpace',
461
- type: 'options',
462
- default: 'srgb',
463
- options: [{ name: 'sRGB', value: 'srgb' }, { name: 'Display P3', value: 'display-p3' }],
464
- displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['colorSpace'] } },
456
+ displayName: 'Format Action',
457
+ name: 'formatNotice',
458
+ type: 'notice',
459
+ default: '────────── Format action ──────────',
460
+ description: 'Parameters below apply to the Format action.',
461
+ displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['format'] } },
465
462
  },
466
- { displayName: 'Target Size (KB)', name: 'multiTargetSizeKB', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['targetSizeKB'] } } },
467
- { displayName: 'Quality', name: 'multiQuality', type: 'number', default: 82, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['quality'] } } },
463
+ { displayName: 'Width', name: 'formatWidth', type: 'number', default: 0, description: 'Resize width in pixels for format.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['format'] } } },
464
+ { displayName: 'Height', name: 'formatHeight', type: 'number', default: 0, description: 'Resize height in pixels for format.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['format'] } } },
468
465
  {
469
- displayName: 'Keep Metadata',
470
- name: 'multiKeepMetadata',
466
+ displayName: 'Resize Action',
467
+ name: 'resizeNotice',
468
+ type: 'notice',
469
+ default: '────────── Resize action ──────────',
470
+ description: 'Parameters below apply to the Resize action.',
471
+ displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['resize'] } },
472
+ },
473
+ { displayName: 'Width', name: 'resizeWidth', type: 'number', default: 0, description: 'Resize width in pixels.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['resize'] } } },
474
+ { displayName: 'Height', name: 'resizeHeight', type: 'number', default: 0, description: 'Resize height in pixels.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['resize'] } } },
475
+ { displayName: 'Enlarge', name: 'resizeEnlarge', type: 'boolean', default: false, description: 'Allow upscaling when resizing.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['resize'] } } },
476
+ {
477
+ displayName: 'Normalize Orientation',
478
+ name: 'resizeNormalizeOrientation',
471
479
  type: 'boolean',
472
480
  default: false,
473
- displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['keepMetadata'] } },
474
- },
475
- { displayName: 'Blur', name: 'multiBlur', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['blur'] } } },
476
- { displayName: 'Sharpen', name: 'multiSharpen', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['sharpen'] } } },
477
- { displayName: 'Grayscale', name: 'multiGrayscale', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['grayscale'] } } },
478
- { displayName: 'Sepia', name: 'multiSepia', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['sepia'] } } },
479
- { displayName: 'Brightness', name: 'multiBrightness', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['brightness'] } } },
480
- { displayName: 'Contrast', name: 'multiContrast', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['contrast'] } } },
481
- { displayName: 'Saturation', name: 'multiSaturation', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['saturation'] } } },
482
- { displayName: 'Pad', name: 'multiPad', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['pad'] } } },
483
- {
484
- displayName: 'Pad Sides',
485
- name: 'multiPadSides',
481
+ description: 'Auto-rotate based on EXIF orientation.',
482
+ displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['resize'] } },
483
+ },
484
+ {
485
+ displayName: 'Crop Action',
486
+ name: 'cropNotice',
487
+ type: 'notice',
488
+ default: '────────── Crop action ──────────',
489
+ description: 'Parameters below apply to the Crop action.',
490
+ displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['crop'] } },
491
+ },
492
+ { displayName: 'Crop X', name: 'cropXMulti', type: 'number', default: 0, description: 'Left offset for crop.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['crop'] } } },
493
+ { displayName: 'Crop Y', name: 'cropYMulti', type: 'number', default: 0, description: 'Top offset for crop.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['crop'] } } },
494
+ { displayName: 'Crop Width', name: 'cropWidthMulti', type: 'number', default: 0, description: 'Crop width in pixels.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['crop'] } } },
495
+ { displayName: 'Crop Height', name: 'cropHeightMulti', type: 'number', default: 0, description: 'Crop height in pixels.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['crop'] } } },
496
+ {
497
+ displayName: 'Normalize Orientation',
498
+ name: 'cropNormalizeOrientation',
486
499
  type: 'boolean',
487
500
  default: false,
488
- displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['padSides'] } },
489
- },
490
- { displayName: 'Pad Top', name: 'multiPadTop', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['padSides'] } } },
491
- { displayName: 'Pad Right', name: 'multiPadRight', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['padSides'] } } },
492
- { displayName: 'Pad Bottom', name: 'multiPadBottom', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['padSides'] } } },
493
- { displayName: 'Pad Left', name: 'multiPadLeft', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['padSides'] } } },
494
- { displayName: 'Pad Color', name: 'multiPadColor', type: 'string', default: '', displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['padColor'] } } },
495
- { displayName: 'Border', name: 'multiBorder', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['border'] } } },
496
- { displayName: 'Border Color', name: 'multiBorderColor', type: 'string', default: '', displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['borderColor'] } } },
497
- { displayName: 'Border Radius', name: 'multiBorderRadius', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['borderRadius'] } } },
498
- { displayName: 'Background Blur', name: 'multiBackgroundBlur', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['backgroundBlur'] } } },
499
- { displayName: 'Watermark Text', name: 'multiWatermarkText', type: 'string', default: '', displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['watermark'] } } },
500
- { displayName: 'Watermark Font Size', name: 'multiWatermarkFontSize', type: 'number', default: 24, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['watermark'] } } },
501
- { displayName: 'Watermark Color', name: 'multiWatermarkColor', type: 'string', default: '#000000', displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['watermark'] } } },
502
- { displayName: 'Watermark Opacity', name: 'multiWatermarkOpacity', type: 'number', default: 0.35, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['watermark'] } } },
503
- {
504
- displayName: 'Watermark Position',
505
- name: 'multiWatermarkPosition',
506
- type: 'options',
507
- default: 'center',
508
- options: [
509
- { name: 'Center', value: 'center' },
510
- { name: 'Top Left', value: 'top-left' },
511
- { name: 'Top Right', value: 'top-right' },
512
- { name: 'Bottom Left', value: 'bottom-left' },
513
- { name: 'Bottom Right', value: 'bottom-right' },
514
- ],
515
- displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['watermark'] } },
501
+ description: 'Auto-rotate before cropping based on EXIF orientation.',
502
+ displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['crop'] } },
516
503
  },
517
- { displayName: 'Watermark Margin', name: 'multiWatermarkMargin', type: 'number', default: 8, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['watermark'] } } },
518
- { displayName: 'Watermark Scale', name: 'multiWatermarkScale', type: 'number', default: 1, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['watermark'] } } },
504
+ { displayName: 'Background Color', name: 'cropBackgroundColor', type: 'string', default: '', description: 'Background color used when the crop exceeds bounds.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['crop'] } } },
519
505
  {
520
- displayName: 'Watermark Image Binary Property',
521
- name: 'multiWatermarkImageBinaryProp',
522
- type: 'string',
523
- default: '',
524
- displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['watermark'] } },
506
+ displayName: 'Transform Action',
507
+ name: 'transformNotice',
508
+ type: 'notice',
509
+ default: '────────── Transform action ──────────',
510
+ description: 'Parameters below apply to the Transform action.',
511
+ displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['transform'] } },
525
512
  },
513
+ { displayName: 'Rotate (degrees)', name: 'transformRotate', type: 'number', default: 0, description: 'Rotate image by degrees.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['transform'] } } },
514
+ { displayName: 'Flip Horizontal', name: 'transformFlipH', type: 'boolean', default: false, description: 'Flip image horizontally.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['transform'] } } },
515
+ { displayName: 'Flip Vertical', name: 'transformFlipV', type: 'boolean', default: false, description: 'Flip image vertically.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['transform'] } } },
526
516
  {
527
- displayName: 'PDF Mode',
528
- name: 'multiPdfMode',
517
+ displayName: 'Color Space',
518
+ name: 'transformColorSpace',
529
519
  type: 'options',
530
- default: 'single',
520
+ default: 'srgb',
521
+ description: 'Color space to use for transforms.',
531
522
  options: [
532
- { name: 'Single', value: 'single' },
533
- { name: 'Multi', value: 'multi' },
523
+ { name: 'sRGB', value: 'srgb' },
524
+ { name: 'Display P3', value: 'display-p3' },
534
525
  ],
535
- displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['pdf'] } },
526
+ displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['transform'] } },
536
527
  },
537
528
  {
538
- displayName: 'PDF Page Size',
539
- name: 'multiPdfPageSize',
540
- type: 'options',
541
- default: 'auto',
542
- options: [
543
- { name: 'Auto', value: 'auto' },
544
- { name: 'A4', value: 'a4' },
545
- { name: 'Letter', value: 'letter' },
546
- ],
547
- displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['pdf'] } },
529
+ displayName: 'Compress Action',
530
+ name: 'compressNotice',
531
+ type: 'notice',
532
+ default: '────────── Compress action ──────────',
533
+ description: 'Parameters below apply to the Compress action.',
534
+ displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['compress'] } },
548
535
  },
536
+ { displayName: 'Quality', name: 'compressQuality', type: 'number', default: 82, description: 'Output quality (1-100).', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['compress'] } } },
537
+ { displayName: 'Target Size (KB)', name: 'compressTargetSizeKB', type: 'number', default: 0, description: 'Target compressed size in KB.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['compress'] } } },
538
+ { displayName: 'Background Color', name: 'compressBackgroundColor', type: 'string', default: '', description: 'Background color used for compression fills.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['compress'] } } },
549
539
  {
550
- displayName: 'PDF Orientation',
551
- name: 'multiPdfOrientation',
540
+ displayName: 'Color Space',
541
+ name: 'compressColorSpace',
552
542
  type: 'options',
553
- default: 'portrait',
543
+ default: 'srgb',
544
+ description: 'Color space to use for compression.',
554
545
  options: [
555
- { name: 'Portrait', value: 'portrait' },
556
- { name: 'Landscape', value: 'landscape' },
546
+ { name: 'sRGB', value: 'srgb' },
547
+ { name: 'Display P3', value: 'display-p3' },
557
548
  ],
558
- displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['pdf'] } },
549
+ displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['compress'] } },
559
550
  },
560
551
  {
561
- displayName: 'PDF Margin',
562
- name: 'multiPdfMargin',
563
- type: 'number',
564
- default: 0,
565
- displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['pdf'] } },
552
+ displayName: 'Enhance Action',
553
+ name: 'enhanceNotice',
554
+ type: 'notice',
555
+ default: '────────── Enhance action ──────────',
556
+ description: 'Parameters below apply to the Enhance action.',
557
+ displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['enhance'] } },
566
558
  },
559
+ { displayName: 'Blur', name: 'enhanceBlur', type: 'number', default: 0, description: 'Blur radius.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['enhance'] } } },
560
+ { displayName: 'Sharpen', name: 'enhanceSharpen', type: 'number', default: 0, description: 'Sharpen amount.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['enhance'] } } },
561
+ { displayName: 'Grayscale', name: 'enhanceGrayscale', type: 'boolean', default: false, description: 'Convert to grayscale.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['enhance'] } } },
562
+ { displayName: 'Sepia', name: 'enhanceSepia', type: 'boolean', default: false, description: 'Apply sepia tone.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['enhance'] } } },
563
+ { displayName: 'Brightness', name: 'enhanceBrightness', type: 'number', default: 0, description: 'Brightness adjustment (-100 to 100).', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['enhance'] } } },
564
+ { displayName: 'Contrast', name: 'enhanceContrast', type: 'number', default: 0, description: 'Contrast adjustment (-100 to 100).', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['enhance'] } } },
565
+ { displayName: 'Saturation', name: 'enhanceSaturation', type: 'number', default: 0, description: 'Saturation adjustment (-100 to 100).', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['enhance'] } } },
567
566
  {
568
- displayName: 'PDF Embed Format',
569
- name: 'multiPdfEmbedFormat',
567
+ displayName: 'Normalize Orientation',
568
+ name: 'enhanceNormalizeOrientation',
569
+ type: 'boolean',
570
+ default: false,
571
+ description: 'Auto-rotate based on EXIF orientation before enhancing.',
572
+ displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['enhance'] } },
573
+ },
574
+ {
575
+ displayName: 'Frame Action',
576
+ name: 'frameNotice',
577
+ type: 'notice',
578
+ default: '────────── Frame action ──────────',
579
+ description: 'Parameters below apply to the Frame action.',
580
+ displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['frame'] } },
581
+ },
582
+ { displayName: 'Pad', name: 'framePad', type: 'number', default: 0, description: 'Uniform padding size.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['frame'] } } },
583
+ { displayName: 'Pad Color', name: 'framePadColor', type: 'string', default: '', description: 'Padding color (e.g. #ffffff).', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['frame'] } } },
584
+ { displayName: 'Border', name: 'frameBorder', type: 'number', default: 0, description: 'Border thickness in pixels.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['frame'] } } },
585
+ { displayName: 'Border Color', name: 'frameBorderColor', type: 'string', default: '', description: 'Border color (e.g. #000000).', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['frame'] } } },
586
+ { displayName: 'Border Radius', name: 'frameBorderRadius', type: 'number', default: 0, description: 'Rounded corner radius.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['frame'] } } },
587
+ {
588
+ displayName: 'Background Action',
589
+ name: 'backgroundNotice',
590
+ type: 'notice',
591
+ default: '────────── Background action ──────────',
592
+ description: 'Parameters below apply to the Background action.',
593
+ displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['background'] } },
594
+ },
595
+ { displayName: 'Background Color', name: 'backgroundColorMulti', type: 'string', default: '', description: 'Background color to apply.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['background'] } } },
596
+ { displayName: 'Background Blur', name: 'backgroundBlurMulti', type: 'number', default: 0, description: 'Blur background by this radius.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['background'] } } },
597
+ { displayName: 'Border Radius', name: 'backgroundBorderRadius', type: 'number', default: 0, description: 'Rounded corner radius.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['background'] } } },
598
+ { displayName: 'Pad Color', name: 'backgroundPadColor', type: 'string', default: '', description: 'Padding color for background.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['background'] } } },
599
+ {
600
+ displayName: 'Watermark Action',
601
+ name: 'watermarkNotice',
602
+ type: 'notice',
603
+ default: '────────── Watermark action ──────────',
604
+ description: 'Parameters below apply to the Watermark action.',
605
+ displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } },
606
+ },
607
+ { displayName: 'Watermark Text', name: 'watermarkTextMulti', type: 'string', default: '', description: 'Text watermark content.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } } },
608
+ { displayName: 'Watermark Opacity', name: 'watermarkOpacityMulti', type: 'number', default: 0.35, description: 'Watermark opacity (0-1).', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } } },
609
+ {
610
+ displayName: 'Watermark Position',
611
+ name: 'watermarkPositionMulti',
570
612
  type: 'options',
571
- default: 'png',
613
+ default: 'center',
614
+ description: 'Placement for watermark.',
572
615
  options: [
573
- { name: 'PNG', value: 'png' },
574
- { name: 'JPEG', value: 'jpeg' },
616
+ { name: 'Center', value: 'center' },
617
+ { name: 'Top Left', value: 'top-left' },
618
+ { name: 'Top Right', value: 'top-right' },
619
+ { name: 'Bottom Left', value: 'bottom-left' },
620
+ { name: 'Bottom Right', value: 'bottom-right' },
575
621
  ],
576
- displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['pdf'] } },
577
- },
578
- {
579
- displayName: 'PDF JPEG Quality',
580
- name: 'multiPdfJpegQuality',
581
- type: 'number',
582
- default: 85,
583
- displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['pdf'] } },
622
+ displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } },
584
623
  },
624
+ { displayName: 'Watermark Margin', name: 'watermarkMarginMulti', type: 'number', default: 8, description: 'Margin/padding around watermark.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } } },
625
+ { displayName: 'Watermark Scale', name: 'watermarkScaleMulti', type: 'number', default: 1, description: 'Scale factor for watermark.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } } },
626
+ { displayName: 'Watermark Color', name: 'watermarkColorMulti', type: 'string', default: '#000000', description: 'Color for text watermark.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } } },
627
+ { displayName: 'Watermark Font Size', name: 'watermarkFontSizeMulti', type: 'number', default: 24, description: 'Font size for text watermark.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } } },
585
628
  {
586
- displayName: 'Include Raw EXIF',
587
- name: 'multiIncludeRawExif',
588
- type: 'boolean',
589
- default: false,
590
- displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['includeRawExif'] } },
629
+ displayName: 'Watermark Image Binary Property',
630
+ name: 'watermarkBinaryPropertyMulti',
631
+ type: 'string',
632
+ default: '',
633
+ placeholder: 'watermarkImage',
634
+ description: 'Binary property containing an image watermark (optional).',
635
+ displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } },
591
636
  },
592
637
  {
593
638
  displayName: 'Download Result(s) as Binary',
594
639
  name: 'imageDownloadBinary',
595
640
  type: 'boolean',
596
641
  default: false,
642
+ description: 'Download the first returned URL into binary data (results remain in JSON).',
597
643
  displayOptions: {
598
644
  show: {
599
645
  resource: ['image'],
@@ -606,6 +652,7 @@ class DavixH2I {
606
652
  name: 'imageOutputBinaryProperty',
607
653
  type: 'string',
608
654
  default: 'data',
655
+ description: 'Binary property name to store the downloaded file.',
609
656
  displayOptions: {
610
657
  show: {
611
658
  resource: ['image'],
@@ -631,6 +678,7 @@ class DavixH2I {
631
678
  name: 'sortByName',
632
679
  type: 'boolean',
633
680
  default: false,
681
+ description: 'When merging, sort uploaded PDFs by filename before merging.',
634
682
  displayOptions: { show: { resource: ['pdf'], operation: ['merge'] } },
635
683
  },
636
684
  {
@@ -639,6 +687,7 @@ class DavixH2I {
639
687
  type: 'string',
640
688
  default: '',
641
689
  placeholder: '1-3,4-5',
690
+ description: 'Page ranges to keep when splitting (e.g. 1-3,5).',
642
691
  displayOptions: { show: { resource: ['pdf'], operation: ['split'] } },
643
692
  },
644
693
  {
@@ -646,6 +695,7 @@ class DavixH2I {
646
695
  name: 'prefix',
647
696
  type: 'string',
648
697
  default: 'split_',
698
+ description: 'Prefix for split output files.',
649
699
  displayOptions: { show: { resource: ['pdf'], operation: ['split', 'extract'] } },
650
700
  },
651
701
  {
@@ -654,6 +704,7 @@ class DavixH2I {
654
704
  type: 'string',
655
705
  default: 'all',
656
706
  placeholder: 'all OR 1-3,5,7',
707
+ description: 'Page selection, e.g. all or 1-3,5.',
657
708
  displayOptions: {
658
709
  show: { resource: ['pdf'], operation: ['to-images', 'extract-images', 'watermark', 'rotate', 'delete-pages', 'extract'] },
659
710
  },
@@ -663,6 +714,7 @@ class DavixH2I {
663
714
  name: 'toFormat',
664
715
  type: 'options',
665
716
  default: 'png',
717
+ description: 'Image format when converting PDF pages.',
666
718
  options: [
667
719
  { name: 'PNG', value: 'png' },
668
720
  { name: 'JPEG', value: 'jpeg' },
@@ -670,14 +722,15 @@ class DavixH2I {
670
722
  ],
671
723
  displayOptions: { show: { resource: ['pdf'], operation: ['to-images'] } },
672
724
  },
673
- { displayName: 'Width', name: 'pdfWidth', type: 'number', default: 0, displayOptions: { show: { resource: ['pdf'], operation: ['to-images'] } } },
674
- { displayName: 'Height', name: 'pdfHeight', type: 'number', default: 0, displayOptions: { show: { resource: ['pdf'], operation: ['to-images'] } } },
675
- { displayName: 'DPI', name: 'dpi', type: 'number', default: 150, displayOptions: { show: { resource: ['pdf'], operation: ['to-images'] } } },
725
+ { displayName: 'Width', name: 'pdfWidth', type: 'number', default: 0, description: 'Resize width for PDF to images (optional).', displayOptions: { show: { resource: ['pdf'], operation: ['to-images'] } } },
726
+ { displayName: 'Height', name: 'pdfHeight', type: 'number', default: 0, description: 'Resize height for PDF to images (optional).', displayOptions: { show: { resource: ['pdf'], operation: ['to-images'] } } },
727
+ { displayName: 'DPI', name: 'dpi', type: 'number', default: 150, description: 'Rendering DPI for PDF to images.', displayOptions: { show: { resource: ['pdf'], operation: ['to-images'] } } },
676
728
  {
677
729
  displayName: 'Extract Image Format',
678
730
  name: 'extractImageFormat',
679
731
  type: 'options',
680
732
  default: 'png',
733
+ description: 'Image format for extracted images.',
681
734
  options: [
682
735
  { name: 'PNG', value: 'png' },
683
736
  { name: 'JPEG', value: 'jpeg' },
@@ -685,8 +738,8 @@ class DavixH2I {
685
738
  ],
686
739
  displayOptions: { show: { resource: ['pdf'], operation: ['extract-images'] } },
687
740
  },
688
- { displayName: 'Watermark Text', name: 'watermarkText', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } } },
689
- { displayName: 'Watermark Opacity', name: 'watermarkOpacity', type: 'number', default: 0.35, displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } } },
741
+ { displayName: 'Watermark Text', name: 'watermarkText', type: 'string', default: '', description: 'Optional text watermark to apply.', displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } } },
742
+ { displayName: 'Watermark Opacity', name: 'watermarkOpacity', type: 'number', default: 0.35, description: 'Watermark opacity (0-1).', displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } } },
690
743
  {
691
744
  displayName: 'Watermark Position',
692
745
  name: 'watermarkPosition',
@@ -704,33 +757,35 @@ class DavixH2I {
704
757
  { displayName: 'Watermark Margin', name: 'watermarkMargin', type: 'number', default: 8, displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } } },
705
758
  { displayName: 'Watermark Font Size', name: 'watermarkFontSize', type: 'number', default: 24, displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } } },
706
759
  { displayName: 'Watermark Color', name: 'watermarkColor', type: 'string', default: '#000000', displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } } },
707
- { displayName: 'Watermark Scale', name: 'watermarkScale', type: 'number', default: 1, displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } } },
760
+ { displayName: 'Watermark Scale', name: 'watermarkScale', type: 'number', default: 1, description: 'Scale factor for watermark.', displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } } },
708
761
  {
709
762
  displayName: 'Watermark Image Binary Property',
710
763
  name: 'watermarkImageBinaryProp',
711
764
  type: 'string',
712
765
  default: '',
766
+ description: 'Binary property containing an image watermark (optional).',
713
767
  displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } },
714
768
  },
715
- { displayName: 'Degrees', name: 'degrees', type: 'number', default: 0, displayOptions: { show: { resource: ['pdf'], operation: ['rotate'] } } },
716
- { displayName: 'Title', name: 'title', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
717
- { displayName: 'Author', name: 'author', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
718
- { displayName: 'Subject', name: 'subject', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
719
- { displayName: 'Keywords', name: 'keywords', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
720
- { displayName: 'Creator', name: 'creator', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
721
- { displayName: 'Producer', name: 'producer', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
722
- { displayName: 'Clean All Metadata', name: 'cleanAllMetadata', type: 'boolean', default: false, displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
723
- { displayName: 'Order (JSON array)', name: 'order', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['reorder'] } } },
724
- { displayName: 'Mode', name: 'mode', type: 'string', default: 'range', displayOptions: { show: { resource: ['pdf'], operation: ['extract'] } } },
725
- { displayName: 'Flatten Forms', name: 'flattenForms', type: 'boolean', default: false, displayOptions: { show: { resource: ['pdf'], operation: ['flatten'] } } },
726
- { displayName: 'User Password', name: 'userPassword', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['encrypt'] } } },
727
- { displayName: 'Owner Password', name: 'ownerPassword', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['encrypt'] } } },
728
- { displayName: 'Password', name: 'password', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['decrypt'] } } },
769
+ { displayName: 'Degrees', name: 'degrees', type: 'number', default: 0, description: 'Rotation angle in degrees.', displayOptions: { show: { resource: ['pdf'], operation: ['rotate'] } } },
770
+ { displayName: 'Title', name: 'title', type: 'string', default: '', description: 'Set PDF title metadata.', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
771
+ { displayName: 'Author', name: 'author', type: 'string', default: '', description: 'Set PDF author metadata.', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
772
+ { displayName: 'Subject', name: 'subject', type: 'string', default: '', description: 'Set PDF subject metadata.', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
773
+ { displayName: 'Keywords', name: 'keywords', type: 'string', default: '', description: 'Set PDF keywords metadata.', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
774
+ { displayName: 'Creator', name: 'creator', type: 'string', default: '', description: 'Set PDF creator metadata.', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
775
+ { displayName: 'Producer', name: 'producer', type: 'string', default: '', description: 'Set PDF producer metadata.', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
776
+ { displayName: 'Clean All Metadata', name: 'cleanAllMetadata', type: 'boolean', default: false, description: 'Remove existing metadata before applying new fields.', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
777
+ { 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'] } } },
778
+ { displayName: 'Mode', name: 'mode', type: 'string', default: 'range', description: 'Extraction mode (e.g. range).', displayOptions: { show: { resource: ['pdf'], operation: ['extract'] } } },
779
+ { displayName: 'Flatten Forms', name: 'flattenForms', type: 'boolean', default: false, description: 'Flatten form fields into static content.', displayOptions: { show: { resource: ['pdf'], operation: ['flatten'] } } },
780
+ { displayName: 'User Password', name: 'userPassword', type: 'string', default: '', description: 'User password for encryption.', displayOptions: { show: { resource: ['pdf'], operation: ['encrypt'] } } },
781
+ { displayName: 'Owner Password', name: 'ownerPassword', type: 'string', default: '', description: 'Owner password for encryption.', displayOptions: { show: { resource: ['pdf'], operation: ['encrypt'] } } },
782
+ { displayName: 'Password', name: 'password', type: 'string', default: '', description: 'Password to decrypt PDF.', displayOptions: { show: { resource: ['pdf'], operation: ['decrypt'] } } },
729
783
  {
730
784
  displayName: 'Download Result(s) as Binary',
731
785
  name: 'pdfDownloadBinary',
732
786
  type: 'boolean',
733
787
  default: false,
788
+ description: 'If enabled, download the first URL result into a binary property.',
734
789
  displayOptions: { show: { resource: ['pdf'] } },
735
790
  },
736
791
  {
@@ -738,6 +793,7 @@ class DavixH2I {
738
793
  name: 'pdfOutputBinaryProperty',
739
794
  type: 'string',
740
795
  default: 'data',
796
+ description: 'Binary property name to store downloaded PDF/image results.',
741
797
  displayOptions: { show: { resource: ['pdf'], pdfDownloadBinary: [true] } },
742
798
  },
743
799
  // -------------------------
@@ -749,7 +805,7 @@ class DavixH2I {
749
805
  type: 'string',
750
806
  default: 'data',
751
807
  placeholder: 'data OR img1,img2',
752
- description: 'Comma-separated binary property names (each will be sent as an `images` file).',
808
+ description: 'Comma-separated binary properties containing images to analyze (sent as images files).',
753
809
  displayOptions: { show: { resource: ['tools'] } },
754
810
  },
755
811
  {
@@ -757,6 +813,7 @@ class DavixH2I {
757
813
  name: 'tool',
758
814
  type: 'options',
759
815
  default: 'metadata',
816
+ description: 'Single PixLab tool to run in action=single.',
760
817
  options: [
761
818
  { name: 'Metadata', value: 'metadata' },
762
819
  { name: 'Colors', value: 'colors' },
@@ -777,6 +834,7 @@ class DavixH2I {
777
834
  name: 'tools',
778
835
  type: 'multiOptions',
779
836
  default: ['metadata'],
837
+ description: 'Multiple PixLab tools to run together in action=multitask.',
780
838
  options: [
781
839
  { name: 'Metadata', value: 'metadata' },
782
840
  { name: 'Colors', value: 'colors' },
@@ -793,38 +851,44 @@ class DavixH2I {
793
851
  displayOptions: { show: { resource: ['tools'], operation: ['multitask'] } },
794
852
  },
795
853
  {
796
- displayName: 'Include Raw EXIF',
797
- name: 'includeRawExif',
798
- type: 'boolean',
799
- default: false,
854
+ displayName: 'Metadata Tool',
855
+ name: 'metadataToolNoticeSingle',
856
+ type: 'notice',
857
+ default: '────────── Metadata tool ──────────',
858
+ description: 'Parameters for the Metadata tool.',
800
859
  displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['metadata'] } },
801
860
  },
802
861
  {
803
862
  displayName: 'Include Raw EXIF',
804
- name: 'multiIncludeRawExif',
863
+ name: 'includeRawExifSingle',
805
864
  type: 'boolean',
806
865
  default: false,
807
- displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['metadata'] } },
866
+ description: 'Include raw EXIF data when available (metadata tool).',
867
+ displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['metadata'] } },
808
868
  },
809
869
  {
810
- displayName: 'Palette Size',
811
- name: 'paletteSize',
812
- type: 'number',
813
- default: 5,
870
+ displayName: 'Palette Tool',
871
+ name: 'paletteToolNoticeSingle',
872
+ type: 'notice',
873
+ default: '────────── Palette tool ──────────',
874
+ description: 'Parameters for the Palette tool.',
814
875
  displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['palette'] } },
815
876
  },
877
+ { displayName: 'Palette Size', name: 'paletteSizeSingle', type: 'number', default: 5, description: 'Number of colors to extract (palette tool).', displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['palette'] } } },
816
878
  {
817
- displayName: 'Palette Size',
818
- name: 'multiPaletteSize',
819
- type: 'number',
820
- default: 5,
821
- displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['palette'] } },
879
+ displayName: 'Hash Tool',
880
+ name: 'hashToolNoticeSingle',
881
+ type: 'notice',
882
+ default: '────────── Hash tool ──────────',
883
+ description: 'Parameters for the Hash tool.',
884
+ displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['hash'] } },
822
885
  },
823
886
  {
824
887
  displayName: 'Hash Type',
825
- name: 'hashType',
888
+ name: 'hashTypeSingle',
826
889
  type: 'options',
827
890
  default: 'phash',
891
+ description: 'Hash algorithm to compute (hash tool).',
828
892
  options: [
829
893
  { name: 'pHash', value: 'phash' },
830
894
  { name: 'MD5', value: 'md5' },
@@ -833,101 +897,127 @@ class DavixH2I {
833
897
  displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['hash'] } },
834
898
  },
835
899
  {
836
- displayName: 'Hash Type',
837
- name: 'multiHashType',
838
- type: 'options',
839
- default: 'phash',
840
- options: [
841
- { name: 'pHash', value: 'phash' },
842
- { name: 'MD5', value: 'md5' },
843
- { name: 'SHA1', value: 'sha1' },
844
- ],
845
- displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['hash'] } },
900
+ displayName: 'Similarity Tool',
901
+ name: 'similarityToolNoticeSingle',
902
+ type: 'notice',
903
+ default: '────────── Similarity tool ──────────',
904
+ description: 'Parameters for the Similarity tool.',
905
+ displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['similarity'] } },
846
906
  },
907
+ { displayName: 'Similarity Mode', name: 'similarityModeSingle', type: 'string', default: '', description: 'Similarity mode (similarity tool).', displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['similarity'] } } },
908
+ { displayName: 'Similarity Threshold', name: 'similarityThresholdSingle', type: 'number', default: 0, description: 'Similarity threshold (similarity tool).', displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['similarity'] } } },
847
909
  {
848
- displayName: 'Quality Sample',
849
- name: 'qualitySample',
850
- type: 'number',
851
- default: 0,
910
+ displayName: 'Quality Tool',
911
+ name: 'qualityToolNoticeSingle',
912
+ type: 'notice',
913
+ default: '────────── Quality tool ──────────',
914
+ description: 'Parameters for the Quality tool.',
852
915
  displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['quality'] } },
853
916
  },
917
+ { displayName: 'Quality Sample', name: 'qualitySampleSingle', type: 'number', default: 0, description: 'Sample size for quality analysis.', displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['quality'] } } },
854
918
  {
855
- displayName: 'Quality Sample',
856
- name: 'multiQualitySample',
857
- type: 'number',
858
- default: 0,
859
- displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['quality'] } },
919
+ displayName: 'Transparency Tool',
920
+ name: 'transparencyToolNoticeSingle',
921
+ type: 'notice',
922
+ default: '────────── Transparency tool ──────────',
923
+ description: 'Parameters for the Transparency tool.',
924
+ displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['transparency'] } },
860
925
  },
926
+ { displayName: 'Transparency Sample', name: 'transparencySampleSingle', type: 'number', default: 0, description: 'Sample size for transparency analysis.', displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['transparency'] } } },
861
927
  {
862
- displayName: 'Transparency Sample',
863
- name: 'transparencySample',
864
- type: 'number',
865
- default: 0,
866
- displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['transparency'] } },
928
+ displayName: 'Efficiency Tool',
929
+ name: 'efficiencyToolNoticeSingle',
930
+ type: 'notice',
931
+ default: '────────── Efficiency tool ──────────',
932
+ description: 'Parameters for the Efficiency tool.',
933
+ displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['efficiency'] } },
867
934
  },
935
+ { displayName: 'Efficiency Format', name: 'efficiencyFormatSingle', type: 'string', default: '', description: 'Output format for efficiency tool.', displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['efficiency'] } } },
936
+ { displayName: 'Efficiency Quality', name: 'efficiencyQualitySingle', type: 'number', default: 0, description: 'Quality setting for efficiency tool.', displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['efficiency'] } } },
868
937
  {
869
- displayName: 'Transparency Sample',
870
- name: 'multiTransparencySample',
871
- type: 'number',
872
- default: 0,
873
- displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['transparency'] } },
938
+ displayName: 'Metadata Tool',
939
+ name: 'metadataToolNoticeMulti',
940
+ type: 'notice',
941
+ default: '────────── Metadata tool ──────────',
942
+ description: 'Parameters for the Metadata tool.',
943
+ displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['metadata'] } },
874
944
  },
875
945
  {
876
- displayName: 'Similarity Mode',
877
- name: 'similarityMode',
878
- type: 'string',
879
- default: '',
880
- displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['similarity'] } },
946
+ displayName: 'Include Raw EXIF',
947
+ name: 'includeRawExifMulti',
948
+ type: 'boolean',
949
+ default: false,
950
+ description: 'Include raw EXIF data when available (metadata tool).',
951
+ displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['metadata'] } },
881
952
  },
882
953
  {
883
- displayName: 'Similarity Mode',
884
- name: 'multiSimilarityMode',
885
- type: 'string',
886
- default: '',
887
- displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['similarity'] } },
954
+ displayName: 'Palette Tool',
955
+ name: 'paletteToolNoticeMulti',
956
+ type: 'notice',
957
+ default: '────────── Palette tool ──────────',
958
+ description: 'Parameters for the Palette tool.',
959
+ displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['palette'] } },
888
960
  },
961
+ { displayName: 'Palette Size', name: 'paletteSizeMulti', type: 'number', default: 5, description: 'Number of colors to extract (palette tool).', displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['palette'] } } },
889
962
  {
890
- displayName: 'Similarity Threshold',
891
- name: 'similarityThreshold',
892
- type: 'number',
893
- default: 0,
894
- displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['similarity'] } },
963
+ displayName: 'Hash Tool',
964
+ name: 'hashToolNoticeMulti',
965
+ type: 'notice',
966
+ default: '────────── Hash tool ──────────',
967
+ description: 'Parameters for the Hash tool.',
968
+ displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['hash'] } },
895
969
  },
896
970
  {
897
- displayName: 'Similarity Threshold',
898
- name: 'multiSimilarityThreshold',
899
- type: 'number',
900
- default: 0,
901
- displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['similarity'] } },
971
+ displayName: 'Hash Type',
972
+ name: 'hashTypeMulti',
973
+ type: 'options',
974
+ default: 'phash',
975
+ description: 'Hash algorithm to compute (hash tool).',
976
+ options: [
977
+ { name: 'pHash', value: 'phash' },
978
+ { name: 'MD5', value: 'md5' },
979
+ { name: 'SHA1', value: 'sha1' },
980
+ ],
981
+ displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['hash'] } },
902
982
  },
903
983
  {
904
- displayName: 'Efficiency Format',
905
- name: 'efficiencyFormat',
906
- type: 'string',
907
- default: '',
908
- displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['efficiency'] } },
984
+ displayName: 'Similarity Tool',
985
+ name: 'similarityToolNoticeMulti',
986
+ type: 'notice',
987
+ default: '────────── Similarity tool ──────────',
988
+ description: 'Parameters for the Similarity tool.',
989
+ displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['similarity'] } },
909
990
  },
991
+ { displayName: 'Similarity Mode', name: 'similarityModeMulti', type: 'string', default: '', description: 'Similarity mode (similarity tool).', displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['similarity'] } } },
992
+ { displayName: 'Similarity Threshold', name: 'similarityThresholdMulti', type: 'number', default: 0, description: 'Similarity threshold (similarity tool).', displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['similarity'] } } },
910
993
  {
911
- displayName: 'Efficiency Format',
912
- name: 'multiEfficiencyFormat',
913
- type: 'string',
914
- default: '',
915
- displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['efficiency'] } },
994
+ displayName: 'Quality Tool',
995
+ name: 'qualityToolNoticeMulti',
996
+ type: 'notice',
997
+ default: '────────── Quality tool ──────────',
998
+ description: 'Parameters for the Quality tool.',
999
+ displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['quality'] } },
916
1000
  },
1001
+ { displayName: 'Quality Sample', name: 'qualitySampleMulti', type: 'number', default: 0, description: 'Sample size for quality analysis.', displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['quality'] } } },
917
1002
  {
918
- displayName: 'Efficiency Quality',
919
- name: 'efficiencyQuality',
920
- type: 'number',
921
- default: 0,
922
- displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['efficiency'] } },
1003
+ displayName: 'Transparency Tool',
1004
+ name: 'transparencyToolNoticeMulti',
1005
+ type: 'notice',
1006
+ default: '────────── Transparency tool ──────────',
1007
+ description: 'Parameters for the Transparency tool.',
1008
+ displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['transparency'] } },
923
1009
  },
1010
+ { displayName: 'Transparency Sample', name: 'transparencySampleMulti', type: 'number', default: 0, description: 'Sample size for transparency analysis.', displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['transparency'] } } },
924
1011
  {
925
- displayName: 'Efficiency Quality',
926
- name: 'multiEfficiencyQuality',
927
- type: 'number',
928
- default: 0,
1012
+ displayName: 'Efficiency Tool',
1013
+ name: 'efficiencyToolNoticeMulti',
1014
+ type: 'notice',
1015
+ default: '────────── Efficiency tool ──────────',
1016
+ description: 'Parameters for the Efficiency tool.',
929
1017
  displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['efficiency'] } },
930
1018
  },
1019
+ { displayName: 'Efficiency Format', name: 'efficiencyFormatMulti', type: 'string', default: '', description: 'Output format for efficiency tool.', displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['efficiency'] } } },
1020
+ { displayName: 'Efficiency Quality', name: 'efficiencyQualityMulti', type: 'number', default: 0, description: 'Quality setting for efficiency tool.', displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['efficiency'] } } },
931
1021
  ],
932
1022
  };
933
1023
  async execute() {
@@ -1159,93 +1249,91 @@ class DavixH2I {
1159
1249
  setBool('includeRawExif', this.getNodeParameter('includeRawExif', itemIndex));
1160
1250
  break;
1161
1251
  case 'multitask': {
1162
- const options = this.getNodeParameter('imageMultitaskOptions', itemIndex);
1163
- const has = (key) => options.includes(key);
1164
- if (has('format'))
1165
- setString('format', this.getNodeParameter('multiFormat', itemIndex));
1166
- if (has('width'))
1167
- setNumber('width', this.getNodeParameter('multiWidth', itemIndex));
1168
- if (has('height'))
1169
- setNumber('height', this.getNodeParameter('multiHeight', itemIndex));
1170
- if (has('enlarge'))
1171
- setBool('enlarge', this.getNodeParameter('multiEnlarge', itemIndex));
1172
- if (has('normalizeOrientation'))
1173
- setBool('normalizeOrientation', this.getNodeParameter('multiNormalizeOrientation', itemIndex));
1174
- if (has('crop')) {
1175
- setNumber('cropX', this.getNodeParameter('multiCropX', itemIndex));
1176
- setNumber('cropY', this.getNodeParameter('multiCropY', itemIndex));
1177
- setNumber('cropWidth', this.getNodeParameter('multiCropWidth', itemIndex));
1178
- setNumber('cropHeight', this.getNodeParameter('multiCropHeight', itemIndex));
1179
- }
1180
- if (has('backgroundColor'))
1181
- setString('backgroundColor', this.getNodeParameter('multiBackgroundColor', itemIndex));
1182
- if (has('rotate'))
1183
- setNumber('rotate', this.getNodeParameter('multiRotate', itemIndex));
1184
- if (has('flipH'))
1185
- setBool('flipH', this.getNodeParameter('multiFlipH', itemIndex));
1186
- if (has('flipV'))
1187
- setBool('flipV', this.getNodeParameter('multiFlipV', itemIndex));
1188
- if (has('colorSpace'))
1189
- formData.colorSpace = this.getNodeParameter('multiColorSpace', itemIndex);
1190
- if (has('targetSizeKB'))
1191
- setNumber('targetSizeKB', this.getNodeParameter('multiTargetSizeKB', itemIndex));
1192
- if (has('quality'))
1193
- setNumber('quality', this.getNodeParameter('multiQuality', itemIndex));
1194
- if (has('keepMetadata'))
1195
- setBool('keepMetadata', this.getNodeParameter('multiKeepMetadata', itemIndex));
1196
- if (has('blur'))
1197
- setNumber('blur', this.getNodeParameter('multiBlur', itemIndex));
1198
- if (has('sharpen'))
1199
- setNumber('sharpen', this.getNodeParameter('multiSharpen', itemIndex));
1200
- if (has('grayscale'))
1201
- setBool('grayscale', this.getNodeParameter('multiGrayscale', itemIndex));
1202
- if (has('sepia'))
1203
- setBool('sepia', this.getNodeParameter('multiSepia', itemIndex));
1204
- if (has('brightness'))
1205
- setNumber('brightness', this.getNodeParameter('multiBrightness', itemIndex));
1206
- if (has('contrast'))
1207
- setNumber('contrast', this.getNodeParameter('multiContrast', itemIndex));
1208
- if (has('saturation'))
1209
- setNumber('saturation', this.getNodeParameter('multiSaturation', itemIndex));
1210
- if (has('pad'))
1211
- setNumber('pad', this.getNodeParameter('multiPad', itemIndex));
1212
- if (has('padSides')) {
1213
- setBool('padSides', this.getNodeParameter('multiPadSides', itemIndex));
1214
- setNumber('padTop', this.getNodeParameter('multiPadTop', itemIndex));
1215
- setNumber('padRight', this.getNodeParameter('multiPadRight', itemIndex));
1216
- setNumber('padBottom', this.getNodeParameter('multiPadBottom', itemIndex));
1217
- setNumber('padLeft', this.getNodeParameter('multiPadLeft', itemIndex));
1218
- }
1219
- if (has('padColor'))
1220
- setString('padColor', this.getNodeParameter('multiPadColor', itemIndex));
1221
- if (has('border'))
1222
- setNumber('border', this.getNodeParameter('multiBorder', itemIndex));
1223
- if (has('borderColor'))
1224
- setString('borderColor', this.getNodeParameter('multiBorderColor', itemIndex));
1225
- if (has('borderRadius'))
1226
- setNumber('borderRadius', this.getNodeParameter('multiBorderRadius', itemIndex));
1227
- if (has('backgroundBlur'))
1228
- setNumber('backgroundBlur', this.getNodeParameter('multiBackgroundBlur', itemIndex));
1229
- if (has('watermark')) {
1230
- setString('watermarkText', this.getNodeParameter('multiWatermarkText', itemIndex));
1231
- setNumber('watermarkFontSize', this.getNodeParameter('multiWatermarkFontSize', itemIndex));
1232
- setString('watermarkColor', this.getNodeParameter('multiWatermarkColor', itemIndex));
1233
- setNumber('watermarkOpacity', this.getNodeParameter('multiWatermarkOpacity', itemIndex));
1234
- formData.watermarkPosition = this.getNodeParameter('multiWatermarkPosition', itemIndex);
1235
- setNumber('watermarkMargin', this.getNodeParameter('multiWatermarkMargin', itemIndex));
1236
- setNumber('watermarkScale', this.getNodeParameter('multiWatermarkScale', itemIndex));
1237
- await includeWatermarkFile(this.getNodeParameter('multiWatermarkImageBinaryProp', itemIndex));
1238
- }
1239
- if (has('pdf')) {
1240
- formData.pdfMode = this.getNodeParameter('multiPdfMode', itemIndex);
1241
- formData.pdfPageSize = this.getNodeParameter('multiPdfPageSize', itemIndex);
1242
- formData.pdfOrientation = this.getNodeParameter('multiPdfOrientation', itemIndex);
1243
- setNumber('pdfMargin', this.getNodeParameter('multiPdfMargin', itemIndex));
1244
- formData.pdfEmbedFormat = this.getNodeParameter('multiPdfEmbedFormat', itemIndex);
1245
- setNumber('pdfJpegQuality', this.getNodeParameter('multiPdfJpegQuality', itemIndex));
1252
+ const selectedActions = this.getNodeParameter('actions', itemIndex, []) || [];
1253
+ if (selectedActions.length === 0)
1254
+ throw new Error('Select at least one action for multitask.');
1255
+ const setNumberOnce = (name, value) => {
1256
+ if (value !== undefined && value !== null && value !== 0 && formData[name] === undefined)
1257
+ formData[name] = String(value);
1258
+ };
1259
+ const setStringOnce = (name, value) => {
1260
+ if (value && formData[name] === undefined)
1261
+ formData[name] = value;
1262
+ };
1263
+ const setBoolOnce = (name, value) => {
1264
+ if (value && formData[name] === undefined)
1265
+ formData[name] = toBoolString(value);
1266
+ };
1267
+ setStringOnce('format', this.getNodeParameter('multitaskFormat', itemIndex));
1268
+ setBoolOnce('keepMetadata', this.getNodeParameter('multitaskKeepMetadata', itemIndex));
1269
+ for (const a of selectedActions) {
1270
+ switch (a) {
1271
+ case 'format':
1272
+ setNumberOnce('width', this.getNodeParameter('formatWidth', itemIndex));
1273
+ setNumberOnce('height', this.getNodeParameter('formatHeight', itemIndex));
1274
+ break;
1275
+ case 'resize':
1276
+ setNumberOnce('width', this.getNodeParameter('resizeWidth', itemIndex));
1277
+ setNumberOnce('height', this.getNodeParameter('resizeHeight', itemIndex));
1278
+ setBoolOnce('enlarge', this.getNodeParameter('resizeEnlarge', itemIndex));
1279
+ setBoolOnce('normalizeOrientation', this.getNodeParameter('resizeNormalizeOrientation', itemIndex));
1280
+ break;
1281
+ case 'crop':
1282
+ setNumberOnce('cropX', this.getNodeParameter('cropXMulti', itemIndex));
1283
+ setNumberOnce('cropY', this.getNodeParameter('cropYMulti', itemIndex));
1284
+ setNumberOnce('cropWidth', this.getNodeParameter('cropWidthMulti', itemIndex));
1285
+ setNumberOnce('cropHeight', this.getNodeParameter('cropHeightMulti', itemIndex));
1286
+ setBoolOnce('normalizeOrientation', this.getNodeParameter('cropNormalizeOrientation', itemIndex));
1287
+ setStringOnce('backgroundColor', this.getNodeParameter('cropBackgroundColor', itemIndex));
1288
+ break;
1289
+ case 'transform':
1290
+ setNumberOnce('rotate', this.getNodeParameter('transformRotate', itemIndex));
1291
+ setBoolOnce('flipH', this.getNodeParameter('transformFlipH', itemIndex));
1292
+ setBoolOnce('flipV', this.getNodeParameter('transformFlipV', itemIndex));
1293
+ setStringOnce('colorSpace', this.getNodeParameter('transformColorSpace', itemIndex));
1294
+ break;
1295
+ case 'compress':
1296
+ setNumberOnce('quality', this.getNodeParameter('compressQuality', itemIndex));
1297
+ setNumberOnce('targetSizeKB', this.getNodeParameter('compressTargetSizeKB', itemIndex));
1298
+ setStringOnce('backgroundColor', this.getNodeParameter('compressBackgroundColor', itemIndex));
1299
+ setStringOnce('colorSpace', this.getNodeParameter('compressColorSpace', itemIndex));
1300
+ break;
1301
+ case 'enhance':
1302
+ setNumberOnce('blur', this.getNodeParameter('enhanceBlur', itemIndex));
1303
+ setNumberOnce('sharpen', this.getNodeParameter('enhanceSharpen', itemIndex));
1304
+ setBoolOnce('grayscale', this.getNodeParameter('enhanceGrayscale', itemIndex));
1305
+ setBoolOnce('sepia', this.getNodeParameter('enhanceSepia', itemIndex));
1306
+ setNumberOnce('brightness', this.getNodeParameter('enhanceBrightness', itemIndex));
1307
+ setNumberOnce('contrast', this.getNodeParameter('enhanceContrast', itemIndex));
1308
+ setNumberOnce('saturation', this.getNodeParameter('enhanceSaturation', itemIndex));
1309
+ setBoolOnce('normalizeOrientation', this.getNodeParameter('enhanceNormalizeOrientation', itemIndex));
1310
+ break;
1311
+ case 'frame':
1312
+ setNumberOnce('pad', this.getNodeParameter('framePad', itemIndex));
1313
+ setStringOnce('padColor', this.getNodeParameter('framePadColor', itemIndex));
1314
+ setNumberOnce('border', this.getNodeParameter('frameBorder', itemIndex));
1315
+ setStringOnce('borderColor', this.getNodeParameter('frameBorderColor', itemIndex));
1316
+ setNumberOnce('borderRadius', this.getNodeParameter('frameBorderRadius', itemIndex));
1317
+ break;
1318
+ case 'background':
1319
+ setStringOnce('backgroundColor', this.getNodeParameter('backgroundColorMulti', itemIndex));
1320
+ setNumberOnce('backgroundBlur', this.getNodeParameter('backgroundBlurMulti', itemIndex));
1321
+ setNumberOnce('borderRadius', this.getNodeParameter('backgroundBorderRadius', itemIndex));
1322
+ setStringOnce('padColor', this.getNodeParameter('backgroundPadColor', itemIndex));
1323
+ break;
1324
+ case 'watermark':
1325
+ setStringOnce('watermarkText', this.getNodeParameter('watermarkTextMulti', itemIndex));
1326
+ setNumberOnce('watermarkOpacity', this.getNodeParameter('watermarkOpacityMulti', itemIndex));
1327
+ formData.watermarkPosition =
1328
+ formData.watermarkPosition ?? this.getNodeParameter('watermarkPositionMulti', itemIndex);
1329
+ setNumberOnce('watermarkMargin', this.getNodeParameter('watermarkMarginMulti', itemIndex));
1330
+ setNumberOnce('watermarkScale', this.getNodeParameter('watermarkScaleMulti', itemIndex));
1331
+ setStringOnce('watermarkColor', this.getNodeParameter('watermarkColorMulti', itemIndex));
1332
+ setNumberOnce('watermarkFontSize', this.getNodeParameter('watermarkFontSizeMulti', itemIndex));
1333
+ await includeWatermarkFile(this.getNodeParameter('watermarkBinaryPropertyMulti', itemIndex));
1334
+ break;
1335
+ }
1246
1336
  }
1247
- if (has('includeRawExif'))
1248
- setBool('includeRawExif', this.getNodeParameter('multiIncludeRawExif', itemIndex));
1249
1337
  break;
1250
1338
  }
1251
1339
  }
@@ -1404,54 +1492,63 @@ class DavixH2I {
1404
1492
  }
1405
1493
  const hasTool = (toolName) => selectedTools.includes(toolName);
1406
1494
  if (hasTool('metadata')) {
1407
- const val = action === 'single'
1408
- ? this.getNodeParameter('includeRawExif', itemIndex)
1409
- : this.getNodeParameter('multiIncludeRawExif', itemIndex);
1410
- setBool('includeRawExif', val);
1495
+ const includeRawExif = action === 'single'
1496
+ ? this.getNodeParameter('includeRawExifSingle', itemIndex, false)
1497
+ : this.getNodeParameter('includeRawExifMulti', itemIndex, false);
1498
+ if (includeRawExif)
1499
+ setBool('includeRawExif', includeRawExif);
1411
1500
  }
1412
1501
  if (hasTool('palette')) {
1413
- const val = action === 'single'
1414
- ? this.getNodeParameter('paletteSize', itemIndex)
1415
- : this.getNodeParameter('multiPaletteSize', itemIndex);
1416
- setNumber('paletteSize', val);
1502
+ const paletteSize = action === 'single'
1503
+ ? this.getNodeParameter('paletteSizeSingle', itemIndex, 0)
1504
+ : this.getNodeParameter('paletteSizeMulti', itemIndex, 0);
1505
+ if (paletteSize)
1506
+ setNumber('paletteSize', paletteSize);
1417
1507
  }
1418
1508
  if (hasTool('hash')) {
1419
- const val = action === 'single'
1420
- ? this.getNodeParameter('hashType', itemIndex)
1421
- : this.getNodeParameter('multiHashType', itemIndex);
1422
- setString('hashType', val);
1509
+ const hashType = action === 'single'
1510
+ ? this.getNodeParameter('hashTypeSingle', itemIndex)
1511
+ : this.getNodeParameter('hashTypeMulti', itemIndex);
1512
+ if (hashType)
1513
+ setString('hashType', hashType);
1423
1514
  }
1424
1515
  if (hasTool('quality')) {
1425
- const val = action === 'single'
1426
- ? this.getNodeParameter('qualitySample', itemIndex)
1427
- : this.getNodeParameter('multiQualitySample', itemIndex);
1428
- setNumber('qualitySample', val);
1516
+ const qualitySample = action === 'single'
1517
+ ? this.getNodeParameter('qualitySampleSingle', itemIndex, 0)
1518
+ : this.getNodeParameter('qualitySampleMulti', itemIndex, 0);
1519
+ if (qualitySample)
1520
+ setNumber('qualitySample', qualitySample);
1429
1521
  }
1430
1522
  if (hasTool('transparency')) {
1431
- const val = action === 'single'
1432
- ? this.getNodeParameter('transparencySample', itemIndex)
1433
- : this.getNodeParameter('multiTransparencySample', itemIndex);
1434
- setNumber('transparencySample', val);
1523
+ const transparencySample = action === 'single'
1524
+ ? this.getNodeParameter('transparencySampleSingle', itemIndex, 0)
1525
+ : this.getNodeParameter('transparencySampleMulti', itemIndex, 0);
1526
+ if (transparencySample)
1527
+ setNumber('transparencySample', transparencySample);
1435
1528
  }
1436
1529
  if (hasTool('similarity')) {
1437
- const mode = action === 'single'
1438
- ? this.getNodeParameter('similarityMode', itemIndex)
1439
- : this.getNodeParameter('multiSimilarityMode', itemIndex);
1440
- const threshold = action === 'single'
1441
- ? this.getNodeParameter('similarityThreshold', itemIndex)
1442
- : this.getNodeParameter('multiSimilarityThreshold', itemIndex);
1443
- setString('similarityMode', mode);
1444
- setNumber('similarityThreshold', threshold);
1530
+ const similarityMode = action === 'single'
1531
+ ? this.getNodeParameter('similarityModeSingle', itemIndex, '')
1532
+ : this.getNodeParameter('similarityModeMulti', itemIndex, '');
1533
+ const similarityThreshold = action === 'single'
1534
+ ? this.getNodeParameter('similarityThresholdSingle', itemIndex, 0)
1535
+ : this.getNodeParameter('similarityThresholdMulti', itemIndex, 0);
1536
+ if (similarityMode)
1537
+ setString('similarityMode', similarityMode);
1538
+ if (similarityThreshold)
1539
+ setNumber('similarityThreshold', similarityThreshold);
1445
1540
  }
1446
1541
  if (hasTool('efficiency')) {
1447
- const format = action === 'single'
1448
- ? this.getNodeParameter('efficiencyFormat', itemIndex)
1449
- : this.getNodeParameter('multiEfficiencyFormat', itemIndex);
1450
- const quality = action === 'single'
1451
- ? this.getNodeParameter('efficiencyQuality', itemIndex)
1452
- : this.getNodeParameter('multiEfficiencyQuality', itemIndex);
1453
- setString('efficiencyFormat', format);
1454
- setNumber('efficiencyQuality', quality);
1542
+ const efficiencyFormat = action === 'single'
1543
+ ? this.getNodeParameter('efficiencyFormatSingle', itemIndex, '')
1544
+ : this.getNodeParameter('efficiencyFormatMulti', itemIndex, '');
1545
+ const efficiencyQuality = action === 'single'
1546
+ ? this.getNodeParameter('efficiencyQualitySingle', itemIndex, 0)
1547
+ : this.getNodeParameter('efficiencyQualityMulti', itemIndex, 0);
1548
+ if (efficiencyFormat)
1549
+ setString('efficiencyFormat', efficiencyFormat);
1550
+ if (efficiencyQuality)
1551
+ setNumber('efficiencyQuality', efficiencyQuality);
1455
1552
  }
1456
1553
  const response = await GenericFunctions_1.davixRequest.call(this, {
1457
1554
  method: 'POST',