n8n-nodes-labelzoom 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +158 -0
  3. package/dist/credentials/LabelZoomApi.credentials.d.ts +10 -0
  4. package/dist/credentials/LabelZoomApi.credentials.js +54 -0
  5. package/dist/credentials/LabelZoomApi.credentials.js.map +1 -0
  6. package/dist/icons/labelzoom.dark.svg +1 -0
  7. package/dist/icons/labelzoom.svg +1 -0
  8. package/dist/nodes/LabelZoom/LabelZoom.node.d.ts +13 -0
  9. package/dist/nodes/LabelZoom/LabelZoom.node.js +118 -0
  10. package/dist/nodes/LabelZoom/LabelZoom.node.js.map +1 -0
  11. package/dist/nodes/LabelZoom/LabelZoom.node.json +12 -0
  12. package/dist/nodes/LabelZoom/listSearch/getPrinters.d.ts +2 -0
  13. package/dist/nodes/LabelZoom/listSearch/getPrinters.js +24 -0
  14. package/dist/nodes/LabelZoom/listSearch/getPrinters.js.map +1 -0
  15. package/dist/nodes/LabelZoom/listSearch/getTemplates.d.ts +2 -0
  16. package/dist/nodes/LabelZoom/listSearch/getTemplates.js +25 -0
  17. package/dist/nodes/LabelZoom/listSearch/getTemplates.js.map +1 -0
  18. package/dist/nodes/LabelZoom/resources/label/convert.d.ts +3 -0
  19. package/dist/nodes/LabelZoom/resources/label/convert.js +79 -0
  20. package/dist/nodes/LabelZoom/resources/label/convert.js.map +1 -0
  21. package/dist/nodes/LabelZoom/resources/label/convertTemplate.d.ts +3 -0
  22. package/dist/nodes/LabelZoom/resources/label/convertTemplate.js +95 -0
  23. package/dist/nodes/LabelZoom/resources/label/convertTemplate.js.map +1 -0
  24. package/dist/nodes/LabelZoom/resources/label/index.d.ts +4 -0
  25. package/dist/nodes/LabelZoom/resources/label/index.js +36 -0
  26. package/dist/nodes/LabelZoom/resources/label/index.js.map +1 -0
  27. package/dist/nodes/LabelZoom/resources/printer/index.d.ts +5 -0
  28. package/dist/nodes/LabelZoom/resources/printer/index.js +60 -0
  29. package/dist/nodes/LabelZoom/resources/printer/index.js.map +1 -0
  30. package/dist/nodes/LabelZoom/resources/printer/print.d.ts +3 -0
  31. package/dist/nodes/LabelZoom/resources/printer/print.js +117 -0
  32. package/dist/nodes/LabelZoom/resources/printer/print.js.map +1 -0
  33. package/dist/nodes/LabelZoom/resources/printer/printTemplate.d.ts +3 -0
  34. package/dist/nodes/LabelZoom/resources/printer/printTemplate.js +65 -0
  35. package/dist/nodes/LabelZoom/resources/printer/printTemplate.js.map +1 -0
  36. package/dist/nodes/LabelZoom/resources/printer/reads.d.ts +5 -0
  37. package/dist/nodes/LabelZoom/resources/printer/reads.js +39 -0
  38. package/dist/nodes/LabelZoom/resources/printer/reads.js.map +1 -0
  39. package/dist/nodes/LabelZoom/resources/printer/shared.d.ts +10 -0
  40. package/dist/nodes/LabelZoom/resources/printer/shared.js +68 -0
  41. package/dist/nodes/LabelZoom/resources/printer/shared.js.map +1 -0
  42. package/dist/nodes/LabelZoom/shared/descriptions.d.ts +9 -0
  43. package/dist/nodes/LabelZoom/shared/descriptions.js +214 -0
  44. package/dist/nodes/LabelZoom/shared/descriptions.js.map +1 -0
  45. package/dist/nodes/LabelZoom/shared/formats.d.ts +13 -0
  46. package/dist/nodes/LabelZoom/shared/formats.js +114 -0
  47. package/dist/nodes/LabelZoom/shared/formats.js.map +1 -0
  48. package/dist/nodes/LabelZoom/shared/options.d.ts +22 -0
  49. package/dist/nodes/LabelZoom/shared/options.js +98 -0
  50. package/dist/nodes/LabelZoom/shared/options.js.map +1 -0
  51. package/dist/nodes/LabelZoom/shared/transport.d.ts +33 -0
  52. package/dist/nodes/LabelZoom/shared/transport.js +216 -0
  53. package/dist/nodes/LabelZoom/shared/transport.js.map +1 -0
  54. package/dist/nodes/LabelZoom/shared/utils.d.ts +3 -0
  55. package/dist/nodes/LabelZoom/shared/utils.js +35 -0
  56. package/dist/nodes/LabelZoom/shared/utils.js.map +1 -0
  57. package/dist/nodes/LabelZoom/shared/validation.d.ts +9 -0
  58. package/dist/nodes/LabelZoom/shared/validation.js +12 -0
  59. package/dist/nodes/LabelZoom/shared/validation.js.map +1 -0
  60. package/dist/package.json +70 -0
  61. package/dist/tsconfig.tsbuildinfo +1 -0
  62. package/package.json +70 -0
@@ -0,0 +1,214 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.documentInputFields = documentInputFields;
4
+ exports.conversionOptionsField = conversionOptionsField;
5
+ function documentInputFields(showFor) {
6
+ return [
7
+ {
8
+ displayName: 'Input Type',
9
+ name: 'inputType',
10
+ type: 'options',
11
+ noDataExpression: true,
12
+ options: [
13
+ {
14
+ name: 'Binary File',
15
+ value: 'binary',
16
+ description: 'Use a file attached to the incoming item (a PDF, PNG, or label file)',
17
+ },
18
+ {
19
+ name: 'Text',
20
+ value: 'text',
21
+ description: 'Type or map label code directly (ZPL, EPL, TSPL, DPL, XML, JSON)',
22
+ },
23
+ {
24
+ name: 'Base64 Text',
25
+ value: 'base64',
26
+ description: 'A base64-encoded PDF or image, sent as text. Useful when an upstream node hands you base64 rather than a file.',
27
+ },
28
+ ],
29
+ default: 'binary',
30
+ displayOptions: { show: showFor },
31
+ },
32
+ {
33
+ displayName: 'Input Binary Field',
34
+ name: 'binaryPropertyName',
35
+ type: 'string',
36
+ default: 'data',
37
+ required: true,
38
+ hint: 'The name of the input field containing the file to process',
39
+ displayOptions: { show: { ...showFor, inputType: ['binary'] } },
40
+ },
41
+ {
42
+ displayName: 'Label Content',
43
+ name: 'labelContent',
44
+ type: 'string',
45
+ typeOptions: { rows: 4 },
46
+ default: '',
47
+ required: true,
48
+ placeholder: '^XA^FO50,50^ADN,36,20^FDLabelZoom^FS^XZ',
49
+ description: 'The label code to send. For the URL source format, put the URL here instead.',
50
+ displayOptions: { show: { ...showFor, inputType: ['text', 'base64'] } },
51
+ },
52
+ ];
53
+ }
54
+ function conversionOptionsField(showFor, displayName = 'Options') {
55
+ return {
56
+ displayName,
57
+ name: 'options',
58
+ type: 'collection',
59
+ placeholder: 'Add option',
60
+ default: {},
61
+ displayOptions: { show: showFor },
62
+ options: [
63
+ {
64
+ displayName: 'Color Mode',
65
+ name: 'colorMode',
66
+ type: 'options',
67
+ options: [
68
+ { name: 'Black and White', value: 'BW' },
69
+ { name: 'Color', value: 'COLOR' },
70
+ { name: 'Grayscale', value: 'GRAYSCALE' },
71
+ ],
72
+ default: 'GRAYSCALE',
73
+ description: 'How color is handled in image or ZPL output',
74
+ },
75
+ {
76
+ displayName: 'Custom Parameters (JSON)',
77
+ name: 'customParameters',
78
+ type: 'json',
79
+ default: '',
80
+ description: 'Any parameter not listed here, merged into the request. Unknown keys are ignored by the server, so this is safe to use for newly released options.',
81
+ },
82
+ {
83
+ displayName: 'Darkness',
84
+ name: 'darkness',
85
+ type: 'number',
86
+ typeOptions: { minValue: 0, maxValue: 100 },
87
+ default: 70,
88
+ description: 'Luminance threshold (0-100) used when flattening color or grayscale to fewer colors. Raise it to darken thin lines and small text.',
89
+ },
90
+ {
91
+ displayName: 'Dialect',
92
+ name: 'dialect',
93
+ type: 'string',
94
+ default: '',
95
+ placeholder: 'moca',
96
+ description: 'Output dialect. Requires a paid plan.',
97
+ },
98
+ {
99
+ displayName: 'DPI',
100
+ name: 'dpi',
101
+ type: 'number',
102
+ default: 203,
103
+ description: 'Print density in dots per inch. Thermal printers are commonly 203; match the printer you will send to.',
104
+ },
105
+ {
106
+ displayName: 'Label Height (Inches)',
107
+ name: 'labelHeight',
108
+ type: 'number',
109
+ default: 6,
110
+ description: 'Override the output label height. Leave unset to detect it from the source.',
111
+ },
112
+ {
113
+ displayName: 'Label Width (Inches)',
114
+ name: 'labelWidth',
115
+ type: 'number',
116
+ default: 4,
117
+ description: 'Override the output label width. Leave unset to detect it from the source.',
118
+ },
119
+ {
120
+ displayName: 'PDF Conversion Mode',
121
+ name: 'pdfConversionMode',
122
+ type: 'options',
123
+ options: [
124
+ {
125
+ name: 'Image',
126
+ value: 'IMAGE',
127
+ description: 'Rasterize each page, preserving the exact appearance',
128
+ },
129
+ {
130
+ name: 'Native',
131
+ value: 'NATIVE',
132
+ description: 'Extract the underlying vector and text content',
133
+ },
134
+ ],
135
+ default: 'IMAGE',
136
+ description: 'How a PDF source is converted',
137
+ },
138
+ {
139
+ displayName: 'PDF Page Number',
140
+ name: 'pdfPageNumber',
141
+ type: 'number',
142
+ default: 0,
143
+ description: 'Convert a single PDF page (0-based). Leave unset to convert every page.',
144
+ },
145
+ {
146
+ displayName: 'Position X',
147
+ name: 'positionX',
148
+ type: 'number',
149
+ default: 0,
150
+ description: 'Horizontal offset in pixels of the top-left extraction corner',
151
+ },
152
+ {
153
+ displayName: 'Position Y',
154
+ name: 'positionY',
155
+ type: 'number',
156
+ default: 0,
157
+ description: 'Vertical offset in pixels of the top-left extraction corner',
158
+ },
159
+ {
160
+ displayName: 'Rotation',
161
+ name: 'rotation',
162
+ type: 'number',
163
+ default: 0,
164
+ description: 'Rotate the output in degrees. Must be a multiple of 90.',
165
+ },
166
+ {
167
+ displayName: 'Scaling (%)',
168
+ name: 'scaling',
169
+ type: 'number',
170
+ default: 100,
171
+ description: 'Scale the output. 50 halves it, 200 doubles it.',
172
+ },
173
+ {
174
+ displayName: 'Variable Data (JSON)',
175
+ name: 'data',
176
+ type: 'json',
177
+ default: '',
178
+ placeholder: '[{"sku": "A-100"}, {"sku": "A-101"}]',
179
+ description: 'Values used to fill variable fields on the label. Each array entry produces one label in the output.',
180
+ },
181
+ {
182
+ displayName: 'Watermark',
183
+ name: 'watermark',
184
+ type: 'boolean',
185
+ default: false,
186
+ description: 'Whether to force a watermark on the output',
187
+ },
188
+ {
189
+ displayName: 'ZPL Commands to Ignore',
190
+ name: 'zplCommandsToIgnore',
191
+ type: 'string',
192
+ default: '',
193
+ placeholder: '^PQ, ^MC',
194
+ description: 'Comma-separated ZPL commands the parser should skip',
195
+ },
196
+ {
197
+ displayName: 'ZPL Image Compression',
198
+ name: 'zplImageCompression',
199
+ type: 'options',
200
+ options: [
201
+ { name: 'Z64', value: 'Z64', description: 'Compact zlib-compressed, base64-encoded' },
202
+ {
203
+ name: 'Compressed Hex',
204
+ value: 'COMPRESSED_HEX',
205
+ description: 'More widely compatible with older firmware',
206
+ },
207
+ ],
208
+ default: 'Z64',
209
+ description: 'Image compression when writing ZPL output',
210
+ },
211
+ ],
212
+ };
213
+ }
214
+ //# sourceMappingURL=descriptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"descriptions.js","sourceRoot":"","sources":["../../../../nodes/LabelZoom/shared/descriptions.ts"],"names":[],"mappings":";;AAUA,kDAoDC;AAGD,wDAsKC;AA7ND,SAAgB,mBAAmB,CAAC,OAGnC;IACA,OAAO;QACN;YACC,WAAW,EAAE,YAAY;YACzB,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,SAAS;YACf,gBAAgB,EAAE,IAAI;YACtB,OAAO,EAAE;gBACR;oBACC,IAAI,EAAE,aAAa;oBACnB,KAAK,EAAE,QAAQ;oBACf,WAAW,EAAE,sEAAsE;iBACnF;gBACD;oBACC,IAAI,EAAE,MAAM;oBACZ,KAAK,EAAE,MAAM;oBACb,WAAW,EAAE,kEAAkE;iBAC/E;gBACD;oBACC,IAAI,EAAE,aAAa;oBACnB,KAAK,EAAE,QAAQ;oBACf,WAAW,EACV,gHAAgH;iBACjH;aACD;YACD,OAAO,EAAE,QAAQ;YACjB,cAAc,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;SACjC;QACD;YACC,WAAW,EAAE,oBAAoB;YACjC,IAAI,EAAE,oBAAoB;YAC1B,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,MAAM;YACf,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,4DAA4D;YAClE,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE;SAC/D;QACD;YACC,WAAW,EAAE,eAAe;Y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d,WAAW,EAAE,2CAA2C;aACxD;SACD;KACD,CAAC;AACH,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare const SOURCE_FORMATS: readonly ["zpl", "epl", "tspl", "dpl", "xml", "json", "pdf", "png", "bmp", "gif", "jpeg", "jpg", "url"];
2
+ export declare const TARGET_FORMATS: readonly ["zpl", "epl", "tspl", "dpl", "xml", "json", "pdf", "png", "bmp", "gif", "jpeg"];
3
+ export type SourceFormat = (typeof SOURCE_FORMATS)[number];
4
+ export type TargetFormat = (typeof TARGET_FORMATS)[number];
5
+ export declare function sourceMediaType(format: string): string;
6
+ export declare function targetMediaType(format: string): string;
7
+ export declare function targetExtension(format: string): string;
8
+ export declare function isTextualTarget(format: string): boolean;
9
+ export declare function sourceWireToken(format: string): string;
10
+ export declare function formatOptions(formats: readonly string[]): {
11
+ name: string;
12
+ value: string;
13
+ }[];
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TARGET_FORMATS = exports.SOURCE_FORMATS = void 0;
4
+ exports.sourceMediaType = sourceMediaType;
5
+ exports.targetMediaType = targetMediaType;
6
+ exports.targetExtension = targetExtension;
7
+ exports.isTextualTarget = isTextualTarget;
8
+ exports.sourceWireToken = sourceWireToken;
9
+ exports.formatOptions = formatOptions;
10
+ exports.SOURCE_FORMATS = [
11
+ 'zpl',
12
+ 'epl',
13
+ 'tspl',
14
+ 'dpl',
15
+ 'xml',
16
+ 'json',
17
+ 'pdf',
18
+ 'png',
19
+ 'bmp',
20
+ 'gif',
21
+ 'jpeg',
22
+ 'jpg',
23
+ 'url',
24
+ ];
25
+ exports.TARGET_FORMATS = [
26
+ 'zpl',
27
+ 'epl',
28
+ 'tspl',
29
+ 'dpl',
30
+ 'xml',
31
+ 'json',
32
+ 'pdf',
33
+ 'png',
34
+ 'bmp',
35
+ 'gif',
36
+ 'jpeg',
37
+ ];
38
+ const SOURCE_MEDIA_TYPES = {
39
+ zpl: 'text/plain',
40
+ epl: 'text/plain',
41
+ tspl: 'text/plain',
42
+ dpl: 'text/plain',
43
+ xml: 'application/xml',
44
+ json: 'application/json',
45
+ pdf: 'application/pdf',
46
+ png: 'image/png',
47
+ bmp: 'image/bmp',
48
+ gif: 'image/gif',
49
+ jpeg: 'image/jpeg',
50
+ jpg: 'image/jpeg',
51
+ url: 'text/plain',
52
+ };
53
+ const TARGET_MEDIA_TYPES = {
54
+ zpl: 'text/plain',
55
+ epl: 'text/plain',
56
+ tspl: 'text/plain',
57
+ dpl: 'text/plain',
58
+ xml: 'application/xml',
59
+ json: 'application/json',
60
+ pdf: 'application/pdf',
61
+ png: 'image/png',
62
+ bmp: 'image/bmp',
63
+ gif: 'image/gif',
64
+ jpeg: 'image/jpeg',
65
+ };
66
+ const TARGET_EXTENSIONS = {
67
+ zpl: 'zpl',
68
+ epl: 'epl',
69
+ tspl: 'txt',
70
+ dpl: 'dpl',
71
+ xml: 'xml',
72
+ json: 'json',
73
+ pdf: 'pdf',
74
+ png: 'png',
75
+ bmp: 'bmp',
76
+ gif: 'gif',
77
+ jpeg: 'jpg',
78
+ };
79
+ const TEXTUAL_TARGETS = new Set(['zpl', 'xml', 'json']);
80
+ function sourceMediaType(format) {
81
+ return SOURCE_MEDIA_TYPES[format] ?? 'application/octet-stream';
82
+ }
83
+ function targetMediaType(format) {
84
+ return TARGET_MEDIA_TYPES[format] ?? 'application/octet-stream';
85
+ }
86
+ function targetExtension(format) {
87
+ return TARGET_EXTENSIONS[format] ?? 'bin';
88
+ }
89
+ function isTextualTarget(format) {
90
+ return TEXTUAL_TARGETS.has(format);
91
+ }
92
+ function sourceWireToken(format) {
93
+ const lower = format.toLowerCase();
94
+ return lower === 'jpg' ? 'jpeg' : lower;
95
+ }
96
+ const FORMAT_LABELS = {
97
+ zpl: 'ZPL (Zebra)',
98
+ epl: 'EPL (Eltron)',
99
+ tspl: 'TSPL (TSC)',
100
+ dpl: 'DPL (Datamax)',
101
+ xml: 'XML (LBXML)',
102
+ json: 'JSON (LabelZoom)',
103
+ pdf: 'PDF',
104
+ png: 'PNG',
105
+ bmp: 'BMP',
106
+ gif: 'GIF',
107
+ jpeg: 'JPEG',
108
+ jpg: 'JPG (Alias for JPEG)',
109
+ url: 'URL (Fetched by the Server)',
110
+ };
111
+ function formatOptions(formats) {
112
+ return formats.map((value) => ({ name: FORMAT_LABELS[value] ?? value.toUpperCase(), value }));
113
+ }
114
+ //# sourceMappingURL=formats.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formats.js","sourceRoot":"","sources":["../../../../nodes/LabelZoom/shared/formats.ts"],"names":[],"mappings":";;;AAmGA,0CAEC;AAED,0CAEC;AAED,0CAEC;AAED,0CAEC;AAGD,0CAGC;AAkBD,sCAEC;AAlIY,QAAA,cAAc,GAAG;IAC7B,KAAK;IACL,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;CACI,CAAC;AAEE,QAAA,cAAc,GAAG;IAC7B,KAAK;IACL,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;CACG,CAAC;AAMX,MAAM,kBAAkB,GAAiC;IACxD,GAAG,EAAE,YAAY;IACjB,GAAG,EAAE,YAAY;IACjB,IAAI,EAAE,YAAY;IAClB,GAAG,EAAE,YAAY;IACjB,GAAG,EAAE,iBAAiB;IACtB,IAAI,EAAE,kBAAkB;IACxB,GAAG,EAAE,iBAAiB;IACtB,GAAG,EAAE,WAAW;IAChB,GAAG,EAAE,WAAW;IAChB,GAAG,EAAE,WAAW;IAChB,IAAI,EAAE,YAAY;IAClB,GAAG,EAAE,YAAY;IACjB,GAAG,EAAE,YAAY;CACjB,CAAC;AAGF,MAAM,kBAAkB,GAAiC;IACxD,GAAG,EAAE,YAAY;IACjB,GAAG,EAAE,YAAY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Aa,GAA2B;IAC7C,GAAG,EAAE,aAAa;IAClB,GAAG,EAAE,cAAc;IACnB,IAAI,EAAE,YAAY;IAClB,GAAG,EAAE,eAAe;IACpB,GAAG,EAAE,aAAa;IAClB,IAAI,EAAE,kBAAkB;IACxB,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,sBAAsB;IAC3B,GAAG,EAAE,6BAA6B;CAClC,CAAC;AAEF,SAAgB,aAAa,CAAC,OAA0B;IACvD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,aAAa,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;AAC/F,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { IDataObject, INode } from 'n8n-workflow';
2
+ export interface ConversionOptions extends IDataObject {
3
+ dpi?: number;
4
+ rotation?: number;
5
+ scaling?: number;
6
+ colorMode?: string;
7
+ darkness?: number;
8
+ positionX?: number;
9
+ positionY?: number;
10
+ watermark?: boolean;
11
+ dialect?: string;
12
+ labelWidth?: number;
13
+ labelHeight?: number;
14
+ pdfConversionMode?: string;
15
+ pdfPageNumber?: number;
16
+ zplImageCompression?: string;
17
+ zplCommandsToIgnore?: string;
18
+ data?: string;
19
+ customParameters?: string;
20
+ }
21
+ export declare function buildConversionParams(node: INode, options: ConversionOptions): IDataObject | undefined;
22
+ export declare function serializeConversionParams(node: INode, options: ConversionOptions): string | undefined;
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildConversionParams = buildConversionParams;
4
+ exports.serializeConversionParams = serializeConversionParams;
5
+ const n8n_workflow_1 = require("n8n-workflow");
6
+ const validation_1 = require("./validation");
7
+ function setNested(target, path, value) {
8
+ let cursor = target;
9
+ for (const segment of path.slice(0, -1)) {
10
+ if (typeof cursor[segment] !== 'object' || cursor[segment] === null)
11
+ cursor[segment] = {};
12
+ cursor = cursor[segment];
13
+ }
14
+ cursor[path[path.length - 1]] = value;
15
+ }
16
+ function parseJsonParameter(node, label, raw) {
17
+ try {
18
+ return JSON.parse(raw);
19
+ }
20
+ catch (error) {
21
+ throw new n8n_workflow_1.NodeOperationError(node, `${label} is not valid JSON: ${error.message}`, {
22
+ description: `Received: ${raw.slice(0, 200)}`,
23
+ });
24
+ }
25
+ }
26
+ function buildConversionParams(node, options) {
27
+ const params = {};
28
+ if (options.dpi !== undefined)
29
+ params.dpi = options.dpi;
30
+ if (options.rotation !== undefined) {
31
+ if (options.rotation % 90 !== 0) {
32
+ throw new validation_1.LabelZoomValidationError(node, 'rotation', `Rotation must be a multiple of 90, got ${options.rotation}`);
33
+ }
34
+ params.rotation = options.rotation;
35
+ }
36
+ if (options.scaling !== undefined)
37
+ params.scaling = options.scaling;
38
+ if (options.colorMode !== undefined)
39
+ params.colorMode = options.colorMode;
40
+ if (options.darkness !== undefined) {
41
+ if (options.darkness < 0 || options.darkness > 100) {
42
+ throw new validation_1.LabelZoomValidationError(node, 'darkness', `Darkness must be between 0 and 100, got ${options.darkness}`);
43
+ }
44
+ params.darkness = options.darkness;
45
+ }
46
+ if (options.positionX !== undefined)
47
+ setNested(params, ['position', 'x'], options.positionX);
48
+ if (options.positionY !== undefined)
49
+ setNested(params, ['position', 'y'], options.positionY);
50
+ if (options.watermark !== undefined)
51
+ params.watermark = options.watermark;
52
+ if (options.dialect !== undefined && options.dialect !== '')
53
+ params.dialect = options.dialect;
54
+ if (options.labelWidth !== undefined)
55
+ setNested(params, ['label', 'width'], options.labelWidth);
56
+ if (options.labelHeight !== undefined)
57
+ setNested(params, ['label', 'height'], options.labelHeight);
58
+ if (options.pdfConversionMode !== undefined) {
59
+ setNested(params, ['pdf', 'conversionMode'], options.pdfConversionMode);
60
+ }
61
+ if (options.pdfPageNumber !== undefined) {
62
+ setNested(params, ['pdf', 'pageNumber'], options.pdfPageNumber);
63
+ }
64
+ if (options.zplImageCompression !== undefined) {
65
+ setNested(params, ['zpl', 'imageCompression'], options.zplImageCompression);
66
+ }
67
+ if (options.zplCommandsToIgnore !== undefined && options.zplCommandsToIgnore !== '') {
68
+ const commands = options.zplCommandsToIgnore
69
+ .split(',')
70
+ .map((command) => command.trim())
71
+ .filter((command) => command !== '');
72
+ if (commands.length > 0)
73
+ setNested(params, ['zpl', 'commandsToIgnore'], commands);
74
+ }
75
+ if (options.data !== undefined && options.data !== '') {
76
+ const parsed = parseJsonParameter(node, 'Variable Data', options.data);
77
+ const records = Array.isArray(parsed) ? parsed : [parsed];
78
+ for (const record of records) {
79
+ if (typeof record !== 'object' || record === null || Array.isArray(record)) {
80
+ throw new validation_1.LabelZoomValidationError(node, 'data', `Every entry in Variable Data must be a JSON object, got ${JSON.stringify(record)}`);
81
+ }
82
+ }
83
+ params.data = records;
84
+ }
85
+ if (options.customParameters !== undefined && options.customParameters !== '') {
86
+ const parsed = parseJsonParameter(node, 'Custom Parameters', options.customParameters);
87
+ if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed)) {
88
+ throw new n8n_workflow_1.NodeOperationError(node, 'Custom Parameters must be a JSON object');
89
+ }
90
+ Object.assign(params, parsed);
91
+ }
92
+ return Object.keys(params).length === 0 ? undefined : params;
93
+ }
94
+ function serializeConversionParams(node, options) {
95
+ const params = buildConversionParams(node, options);
96
+ return params === undefined ? undefined : JSON.stringify(params);
97
+ }
98
+ //# sourceMappingURL=options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../nodes/LabelZoom/shared/options.ts"],"names":[],"mappings":";;AAyDA,sDA6FC;AAGD,8DAGC;AA3JD,+CAAkD;AAElD,6CAAwD;AAkCxD,SAAS,SAAS,CAAC,MAAmB,EAAE,IAAc,EAAE,KAAc;IACrE,IAAI,MAAM,GAAG,M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IAAI,EAAE,OAAO,CAAC,CAAC;IACpD,OAAO,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AAClE,CAAC"}
@@ -0,0 +1,33 @@
1
+ import type { IDataObject, IExecuteFunctions, IHttpRequestMethods, ILoadOptionsFunctions, INode, JsonObject } from 'n8n-workflow';
2
+ import { NodeApiError } from 'n8n-workflow';
3
+ export declare const DEFAULT_BASE_URL = "https://api.labelzoom.com";
4
+ export declare const CREDENTIAL_NAME = "labelZoomApi";
5
+ type RequestContext = IExecuteFunctions | ILoadOptionsFunctions;
6
+ export interface LabelZoomResponse {
7
+ statusCode: number;
8
+ headers: Record<string, unknown>;
9
+ body: Buffer;
10
+ }
11
+ export interface LabelZoomRequest {
12
+ method: IHttpRequestMethods;
13
+ path: string;
14
+ params?: string;
15
+ query?: Record<string, string>;
16
+ body?: Buffer | string;
17
+ contentType?: string;
18
+ headers?: Record<string, string>;
19
+ }
20
+ export declare function getCredentialsIfAny(ctx: RequestContext): Promise<{
21
+ apiKey?: string;
22
+ baseUrl?: string;
23
+ maxRetries?: number;
24
+ } | undefined>;
25
+ export declare function normalizeBaseUrl(baseUrl?: string): string;
26
+ export declare function requestIdOf(response: LabelZoomResponse): string | undefined;
27
+ export declare function contentTypeOf(response: LabelZoomResponse): string | undefined;
28
+ export declare function retryAfterSecondsOf(response: LabelZoomResponse): number | undefined;
29
+ export declare function decodeText(response: LabelZoomResponse): string;
30
+ export declare function toNodeApiError(node: INode, response: LabelZoomResponse): NodeApiError;
31
+ export declare function labelZoomRequest(this: RequestContext, request: LabelZoomRequest): Promise<LabelZoomResponse>;
32
+ export declare function labelZoomJsonRequest(this: RequestContext, method: IHttpRequestMethods, path: string, body?: IDataObject | IDataObject[], query?: Record<string, string>, headers?: Record<string, string>): Promise<JsonObject>;
33
+ export {};