n8n-nodes-synca 1.0.0

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/dist/credentials/SyncaApi.credentials.d.ts +9 -0
  2. package/dist/credentials/SyncaApi.credentials.js +51 -0
  3. package/dist/credentials/SyncaApi.credentials.js.map +1 -0
  4. package/dist/nodes/Cashcow/SyncaCashcow.node.d.ts +10 -0
  5. package/dist/nodes/Cashcow/SyncaCashcow.node.js +185 -0
  6. package/dist/nodes/Cashcow/SyncaCashcow.node.js.map +1 -0
  7. package/dist/nodes/Cashcow/constants/cashcow-check-order-tracking.constant.d.ts +30 -0
  8. package/dist/nodes/Cashcow/constants/cashcow-check-order-tracking.constant.js +37 -0
  9. package/dist/nodes/Cashcow/constants/cashcow-check-order-tracking.constant.js.map +1 -0
  10. package/dist/nodes/Cashcow/constants/cashcow-create-or-update-product.constant.d.ts +117 -0
  11. package/dist/nodes/Cashcow/constants/cashcow-create-or-update-product.constant.js +290 -0
  12. package/dist/nodes/Cashcow/constants/cashcow-create-or-update-product.constant.js.map +1 -0
  13. package/dist/nodes/Cashcow/constants/cashcow-create-order.constant.d.ts +189 -0
  14. package/dist/nodes/Cashcow/constants/cashcow-create-order.constant.js +420 -0
  15. package/dist/nodes/Cashcow/constants/cashcow-create-order.constant.js.map +1 -0
  16. package/dist/nodes/Cashcow/constants/cashcow-get-store-mailbox.constant.d.ts +46 -0
  17. package/dist/nodes/Cashcow/constants/cashcow-get-store-mailbox.constant.js +166 -0
  18. package/dist/nodes/Cashcow/constants/cashcow-get-store-mailbox.constant.js.map +1 -0
  19. package/dist/nodes/Cashcow/icon copy 2.svg +53 -0
  20. package/dist/nodes/Cashcow/icon copy.svg +65 -0
  21. package/dist/nodes/Cashcow/icon.svg +1 -0
  22. package/dist/nodes/Cashcow/last-icon.svg +38 -0
  23. package/dist/nodes/Mirakl/SyncaMirakl.node.d.ts +0 -0
  24. package/dist/nodes/Mirakl/SyncaMirakl.node.js +2 -0
  25. package/dist/nodes/Mirakl/SyncaMirakl.node.js.map +1 -0
  26. package/dist/nodes/OLD_SyncaPriority.node.d.ts +10 -0
  27. package/dist/nodes/OLD_SyncaPriority.node.js +389 -0
  28. package/dist/nodes/OLD_SyncaPriority.node.js.map +1 -0
  29. package/dist/nodes/Priority/SyncaPriority.node.d.ts +18 -0
  30. package/dist/nodes/Priority/SyncaPriority.node.js +313 -0
  31. package/dist/nodes/Priority/SyncaPriority.node.js.map +1 -0
  32. package/dist/nodes/Priority/constants/methods.d.ts +15 -0
  33. package/dist/nodes/Priority/constants/methods.js +299 -0
  34. package/dist/nodes/Priority/constants/methods.js.map +1 -0
  35. package/dist/nodes/Priority/constants/priority-agents.constant.d.ts +39 -0
  36. package/dist/nodes/Priority/constants/priority-agents.constant.js +114 -0
  37. package/dist/nodes/Priority/constants/priority-agents.constant.js.map +1 -0
  38. package/dist/nodes/Priority/constants/priority-generic.constant.d.ts +158 -0
  39. package/dist/nodes/Priority/constants/priority-generic.constant.js +219 -0
  40. package/dist/nodes/Priority/constants/priority-generic.constant.js.map +1 -0
  41. package/dist/nodes/Priority/constants/priority-procedure.constant.d.ts +129 -0
  42. package/dist/nodes/Priority/constants/priority-procedure.constant.js +178 -0
  43. package/dist/nodes/Priority/constants/priority-procedure.constant.js.map +1 -0
  44. package/dist/nodes/Priority/constants/priority-products.constant.d.ts +158 -0
  45. package/dist/nodes/Priority/constants/priority-products.constant.js +209 -0
  46. package/dist/nodes/Priority/constants/priority-products.constant.js.map +1 -0
  47. package/dist/nodes/Priority/constants/priority-purchase-orders.constant.d.ts +158 -0
  48. package/dist/nodes/Priority/constants/priority-purchase-orders.constant.js +218 -0
  49. package/dist/nodes/Priority/constants/priority-purchase-orders.constant.js.map +1 -0
  50. package/dist/nodes/Priority/constants/priority-sales.constant.d.ts +158 -0
  51. package/dist/nodes/Priority/constants/priority-sales.constant.js +383 -0
  52. package/dist/nodes/Priority/constants/priority-sales.constant.js.map +1 -0
  53. package/dist/nodes/Priority/icon.png +0 -0
  54. package/dist/nodes/Priority/icon.svg +1 -0
  55. package/dist/nodes/Superpharm/SyncaSuperpharm.node.d.ts +10 -0
  56. package/dist/nodes/Superpharm/SyncaSuperpharm.node.js +1072 -0
  57. package/dist/nodes/Superpharm/SyncaSuperpharm.node.js.map +1 -0
  58. package/dist/nodes/Superpharm/icon.svg +1 -0
  59. package/dist/nodes/Superpharm/old-icon.svg +22 -0
  60. package/dist/package.json +55 -0
  61. package/dist/tsconfig.tsbuildinfo +1 -0
  62. package/package.json +55 -0
@@ -0,0 +1,178 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PriorityProcedures = void 0;
4
+ exports.PriorityProcedures = {
5
+ declare: [
6
+ {
7
+ displayName: 'Operation',
8
+ name: 'operation',
9
+ type: 'options',
10
+ noDataExpression: true,
11
+ displayOptions: {
12
+ show: {
13
+ resource: ['procedures'],
14
+ },
15
+ },
16
+ options: [
17
+ {
18
+ name: 'Run Procedures',
19
+ value: 'run_procedures',
20
+ description: 'Execute a procedure',
21
+ action: 'Run procedures',
22
+ },
23
+ ],
24
+ default: 'run_procedures',
25
+ },
26
+ {
27
+ displayName: 'Procedure Name',
28
+ name: 'procedureName',
29
+ type: 'options',
30
+ typeOptions: {
31
+ loadOptionsDependsOn: ['credentials', 'operation'],
32
+ refreshOn: ['credentials', 'operation'],
33
+ loadOptionsMethod: 'getProcedures',
34
+ },
35
+ required: true,
36
+ displayOptions: {
37
+ show: {
38
+ resource: ['procedures'],
39
+ operation: ['run_procedures'],
40
+ },
41
+ },
42
+ default: '',
43
+ description: 'The name of the procedure to execute',
44
+ },
45
+ {
46
+ displayName: 'Fields',
47
+ name: 'fields',
48
+ type: 'resourceMapper',
49
+ default: { mappingMode: 'defineBelow', value: null },
50
+ required: true,
51
+ displayOptions: {
52
+ show: {
53
+ resource: ['procedures'],
54
+ operation: ['run_procedures'],
55
+ procedureName: [{ _cnd: { not: '' } }]
56
+ },
57
+ hide: {
58
+ procedureName: ['']
59
+ }
60
+ },
61
+ typeOptions: {
62
+ loadOptionsDependsOn: ['procedureName'],
63
+ refreshOn: ['procedureName'],
64
+ resourceMapper: {
65
+ resourceMapperMethod: 'getMappingColumns',
66
+ mode: 'add',
67
+ addAllFields: true,
68
+ fieldWords: { singular: 'field', plural: 'fields' },
69
+ },
70
+ },
71
+ },
72
+ {
73
+ displayName: 'Procedure Parameters',
74
+ name: 'procedureParameters',
75
+ type: 'fixedCollection',
76
+ typeOptions: {
77
+ multipleValues: true,
78
+ },
79
+ displayOptions: {
80
+ show: {
81
+ resource: ['procedures'],
82
+ operation: ['run_procedures'],
83
+ },
84
+ },
85
+ default: {},
86
+ description: 'Parameters to pass to the procedure',
87
+ options: [
88
+ {
89
+ name: 'parameter',
90
+ displayName: 'Parameter',
91
+ values: [
92
+ {
93
+ displayName: 'Name',
94
+ name: 'name',
95
+ type: 'string',
96
+ default: '',
97
+ description: 'Parameter name',
98
+ },
99
+ {
100
+ displayName: 'Value',
101
+ name: 'value',
102
+ type: 'string',
103
+ default: '',
104
+ description: 'Parameter value',
105
+ },
106
+ ],
107
+ },
108
+ ],
109
+ },
110
+ ],
111
+ process: (params, i, getNodeParameter) => {
112
+ const page = getNodeParameter('page', i, 1);
113
+ const pageSize = getNodeParameter('page_size', i, 20);
114
+ if (page < 1)
115
+ throw new Error('Page number must be 1 or greater');
116
+ if (pageSize < 1 || pageSize > 100)
117
+ throw new Error('Page size must be between 1 and 100');
118
+ params.page = page;
119
+ params.page_size = pageSize;
120
+ try {
121
+ const messageType = getNodeParameter('message_type', i, 'all');
122
+ if (messageType && messageType !== 'all') {
123
+ params.message_type = messageType;
124
+ }
125
+ }
126
+ catch { }
127
+ try {
128
+ const readStatus = getNodeParameter('read_status', i, 'all');
129
+ if (readStatus && readStatus !== 'all') {
130
+ params.read_status = readStatus;
131
+ }
132
+ }
133
+ catch { }
134
+ try {
135
+ const customerId = getNodeParameter('customer_id', i, '');
136
+ if (customerId && customerId.trim() !== '') {
137
+ params.customer_id = customerId.trim();
138
+ }
139
+ }
140
+ catch { }
141
+ try {
142
+ const searchQuery = getNodeParameter('search_query', i, '');
143
+ if (searchQuery && searchQuery.trim() !== '') {
144
+ params.search_query = searchQuery.trim();
145
+ }
146
+ }
147
+ catch { }
148
+ try {
149
+ const orderBy = getNodeParameter('order_by', i, 'date_desc');
150
+ if (orderBy) {
151
+ params.order_by = orderBy;
152
+ }
153
+ }
154
+ catch { }
155
+ try {
156
+ const dateFrom = getNodeParameter('date_from', i, '');
157
+ if (dateFrom && dateFrom.trim() !== '') {
158
+ const fromDate = new Date(dateFrom);
159
+ if (!isNaN(fromDate.getTime())) {
160
+ params.date_from = fromDate.toISOString();
161
+ }
162
+ }
163
+ }
164
+ catch { }
165
+ try {
166
+ const dateTo = getNodeParameter('date_to', i, '');
167
+ if (dateTo && dateTo.trim() !== '') {
168
+ const toDate = new Date(dateTo);
169
+ if (!isNaN(toDate.getTime())) {
170
+ params.date_to = toDate.toISOString();
171
+ }
172
+ }
173
+ }
174
+ catch { }
175
+ return params;
176
+ }
177
+ };
178
+ //# sourceMappingURL=priority-procedure.constant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"priority-procedure.constant.js","sourceRoot":"","sources":["../../../../nodes/Priority/constants/priority-procedure.constant.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG;IAC9B,OAAO,EAAE;QAEL;YACI,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,SAAS;YACf,gBAAgB,EAAE,IAAI;YACtB,cAAc,EAAE;gBACZ,IAAI,EAAE;oBACF,QAAQ,EAAE,CAAC,YAAY,CAAC;iBAC3B;aACJ;YACD,OAAO,EAAE;gBACL;oBACI,IAAI,EAAE,gBAAgB;oBACtB,KAAK,EAAE,gBAAgB;oBACvB,WAAW,EAAE,qBAAqB;oBAClC,MAAM,EAAE,gBAAgB;iBAC3B;aACJ;YAC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,EAAE;gBAEpC,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACpC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,EAAE;oBAC5B,MAAM,CAAC,SAAS,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;iBAC7C;aACJ;SACJ;QAAC,MAAM,GAAG;QAEX,IAAI;YACA,MAAM,MAAM,GAAG,gBAAgB,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE,CAAW,CAAC;YAC5D,IAAI,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;gBAEhC,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC;gBAChC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE;oBAC1B,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;iBACzC;aACJ;SACJ;QAAC,MAAM,GAAG;QAEX,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAC"}
@@ -0,0 +1,158 @@
1
+ export declare const PriorityProducts: {
2
+ declare: ({
3
+ displayName: string;
4
+ name: string;
5
+ type: string;
6
+ noDataExpression: boolean;
7
+ displayOptions: {
8
+ show: {
9
+ resource: string[];
10
+ operation?: undefined;
11
+ };
12
+ };
13
+ options: {
14
+ name: string;
15
+ value: string;
16
+ description: string;
17
+ action: string;
18
+ }[];
19
+ default: string;
20
+ required?: undefined;
21
+ typeOptions?: undefined;
22
+ description?: undefined;
23
+ placeholder?: undefined;
24
+ } | {
25
+ displayName: string;
26
+ name: string;
27
+ type: string;
28
+ default: {
29
+ mappingMode: string;
30
+ value: null;
31
+ };
32
+ required: boolean;
33
+ displayOptions: {
34
+ show: {
35
+ resource: string[];
36
+ operation: string[];
37
+ };
38
+ };
39
+ typeOptions: {
40
+ loadOptionsDependsOn: string[];
41
+ refreshOn: string[];
42
+ resourceMapper: {
43
+ resourceMapperMethod: string;
44
+ mode: string;
45
+ addAllFields: boolean;
46
+ fieldWords: {
47
+ singular: string;
48
+ plural: string;
49
+ };
50
+ };
51
+ multipleValues?: undefined;
52
+ loadOptionsMethod?: undefined;
53
+ };
54
+ noDataExpression?: undefined;
55
+ options?: undefined;
56
+ description?: undefined;
57
+ placeholder?: undefined;
58
+ } | {
59
+ displayName: string;
60
+ name: string;
61
+ type: string;
62
+ required: boolean;
63
+ displayOptions: {
64
+ show: {
65
+ resource: string[];
66
+ operation: string[];
67
+ };
68
+ };
69
+ default: string;
70
+ description: string;
71
+ noDataExpression?: undefined;
72
+ options?: undefined;
73
+ typeOptions?: undefined;
74
+ placeholder?: undefined;
75
+ } | {
76
+ displayName: string;
77
+ name: string;
78
+ type: string;
79
+ placeholder: string;
80
+ typeOptions: {
81
+ multipleValues: boolean;
82
+ loadOptionsDependsOn: string[];
83
+ refreshOn: string[];
84
+ resourceMapper?: undefined;
85
+ loadOptionsMethod?: undefined;
86
+ };
87
+ default: {
88
+ mappingMode?: undefined;
89
+ value?: undefined;
90
+ };
91
+ displayOptions: {
92
+ show: {
93
+ resource: string[];
94
+ operation: string[];
95
+ };
96
+ };
97
+ options: {
98
+ name: string;
99
+ displayName: string;
100
+ values: ({
101
+ displayName: string;
102
+ name: string;
103
+ type: string;
104
+ typeOptions: {
105
+ loadOptionsMethod: string;
106
+ loadOptionsDependsOn: string[];
107
+ refreshOn: string[];
108
+ };
109
+ default: string;
110
+ options?: undefined;
111
+ } | {
112
+ displayName: string;
113
+ name: string;
114
+ type: string;
115
+ options: {
116
+ name: string;
117
+ value: string;
118
+ }[];
119
+ default: string;
120
+ typeOptions?: undefined;
121
+ } | {
122
+ displayName: string;
123
+ name: string;
124
+ type: string;
125
+ default: string;
126
+ typeOptions?: undefined;
127
+ options?: undefined;
128
+ })[];
129
+ }[];
130
+ noDataExpression?: undefined;
131
+ required?: undefined;
132
+ description?: undefined;
133
+ } | {
134
+ displayName: string;
135
+ name: string;
136
+ type: string;
137
+ default: never[];
138
+ description: string;
139
+ typeOptions: {
140
+ loadOptionsMethod: string;
141
+ loadOptionsDependsOn: string[];
142
+ refreshOn: string[];
143
+ resourceMapper?: undefined;
144
+ multipleValues?: undefined;
145
+ };
146
+ displayOptions: {
147
+ show: {
148
+ resource: string[];
149
+ operation: string[];
150
+ };
151
+ };
152
+ noDataExpression?: undefined;
153
+ options?: undefined;
154
+ required?: undefined;
155
+ placeholder?: undefined;
156
+ })[];
157
+ process: (params: any, i: number, getNodeParameter: (parameterName: string, itemIndex: number, fallbackValue?: any) => string | number | boolean | object) => any;
158
+ };
@@ -0,0 +1,209 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PriorityProducts = void 0;
4
+ exports.PriorityProducts = {
5
+ declare: [
6
+ {
7
+ displayName: 'Operation',
8
+ name: 'operation',
9
+ type: 'options',
10
+ noDataExpression: true,
11
+ displayOptions: {
12
+ show: {
13
+ resource: ['products'],
14
+ },
15
+ },
16
+ options: [
17
+ {
18
+ name: 'Create Product',
19
+ value: 'create_product',
20
+ description: 'Create a new product',
21
+ action: 'Create a product',
22
+ },
23
+ {
24
+ name: 'Update Product',
25
+ value: 'update_product',
26
+ description: 'Update a product',
27
+ action: 'Update a product',
28
+ },
29
+ {
30
+ name: 'Search Products',
31
+ value: 'list_products',
32
+ description: 'Search all products',
33
+ action: 'Search products',
34
+ },
35
+ {
36
+ name: 'Get Product',
37
+ value: 'get_product',
38
+ description: 'Get a specific product',
39
+ action: 'Get a product',
40
+ }
41
+ ],
42
+ default: 'list_products',
43
+ },
44
+ {
45
+ displayName: 'Row Data',
46
+ name: 'rowData',
47
+ type: 'resourceMapper',
48
+ default: { mappingMode: 'defineBelow', value: null },
49
+ required: true,
50
+ displayOptions: {
51
+ show: { resource: ['products'], operation: ['create_product', 'update_product'] },
52
+ },
53
+ typeOptions: {
54
+ loadOptionsDependsOn: ['operation', 'credentials'],
55
+ refreshOn: ['operation', 'credentials'],
56
+ resourceMapper: {
57
+ resourceMapperMethod: 'getFormFields',
58
+ mode: 'add',
59
+ addAllFields: false,
60
+ fieldWords: { singular: 'field', plural: 'fields' },
61
+ },
62
+ },
63
+ },
64
+ {
65
+ displayName: 'Product ID',
66
+ name: 'productId',
67
+ type: 'string',
68
+ required: true,
69
+ displayOptions: {
70
+ show: {
71
+ resource: ['products'],
72
+ operation: ['get_product', 'get_product_with_prices'],
73
+ },
74
+ },
75
+ default: '',
76
+ description: 'The product ID to retrieve',
77
+ },
78
+ {
79
+ displayName: 'Filters',
80
+ name: 'filters',
81
+ type: 'fixedCollection',
82
+ placeholder: 'Add Filter',
83
+ typeOptions: {
84
+ multipleValues: true,
85
+ loadOptionsDependsOn: ['credentials', 'operation'],
86
+ refreshOn: ['credentials', 'operation'],
87
+ },
88
+ default: {},
89
+ displayOptions: {
90
+ show: { resource: ['products'], operation: ['list_products'] },
91
+ },
92
+ options: [
93
+ {
94
+ name: 'filter',
95
+ displayName: 'Filter',
96
+ values: [
97
+ {
98
+ displayName: 'Field',
99
+ name: 'field',
100
+ type: 'options',
101
+ typeOptions: {
102
+ loadOptionsMethod: 'getFormFields',
103
+ loadOptionsDependsOn: ['credentials', 'operation'],
104
+ refreshOn: ['credentials', 'operation']
105
+ },
106
+ default: '',
107
+ },
108
+ {
109
+ displayName: 'Operator',
110
+ name: 'op',
111
+ type: 'options',
112
+ options: [
113
+ { name: 'Equals', value: 'eq' },
114
+ { name: 'Not Equals', value: 'neq' },
115
+ { name: 'Starts With', value: 'startWith' },
116
+ { name: 'Ends With', value: 'endWith' },
117
+ { name: 'Contain', value: 'in' },
118
+ { name: 'Greater Than', value: 'gt' },
119
+ { name: 'Greater or Equal', value: 'gte' },
120
+ { name: 'Less Than', value: 'lt' },
121
+ { name: 'Less or Equal', value: 'lte' },
122
+ ],
123
+ default: 'eq',
124
+ },
125
+ {
126
+ displayName: 'Value',
127
+ name: 'fromval',
128
+ type: 'string',
129
+ default: '',
130
+ },
131
+ ],
132
+ },
133
+ ],
134
+ },
135
+ {
136
+ displayName: 'Return Fields',
137
+ name: 'fields',
138
+ type: 'multiOptions',
139
+ default: [],
140
+ description: 'Leave empty to return all columns, or pick the ones you need.',
141
+ typeOptions: {
142
+ loadOptionsMethod: 'getFormFields',
143
+ loadOptionsDependsOn: ['credentials', 'operation'],
144
+ refreshOn: ['credentials', 'operation'],
145
+ },
146
+ displayOptions: {
147
+ show: { resource: ['products'], operation: ['list_products'] },
148
+ },
149
+ },
150
+ ],
151
+ process: (params, i, getNodeParameter) => {
152
+ const sku = getNodeParameter('sku', i);
153
+ const isOverrideExisting = getNodeParameter('is_override_existing_product', i);
154
+ const isRestoreDeleted = getNodeParameter('is_restore_deleted_items', i);
155
+ params.sku = sku;
156
+ params.is_override_existing_product = isOverrideExisting;
157
+ params.is_restore_deleted_items = isRestoreDeleted;
158
+ const optionalFields = [
159
+ 'is_visible',
160
+ 'title',
161
+ 'main_category_name',
162
+ 'main_category_id',
163
+ 'short_description',
164
+ 'long_description',
165
+ 'qty',
166
+ 'qty_type',
167
+ 'qty_jumping_number',
168
+ 'weight',
169
+ 'is_no_vat',
170
+ 'is_force_delete_existing_attributes',
171
+ 'is_hide_buy_buttons'
172
+ ];
173
+ optionalFields.forEach(field => {
174
+ try {
175
+ const value = getNodeParameter(field, i, undefined);
176
+ if (value !== '' && value !== null && value !== undefined) {
177
+ params[field] = value;
178
+ }
179
+ }
180
+ catch {
181
+ }
182
+ });
183
+ const jsonFields = ['images', 'prices', 'attributes', 'attributes_matrix'];
184
+ jsonFields.forEach(field => {
185
+ try {
186
+ const jsonValue = getNodeParameter(field, i, undefined);
187
+ if (jsonValue && jsonValue.trim() !== '' && jsonValue !== '{}' && jsonValue !== '[]') {
188
+ try {
189
+ params[field] = JSON.parse(jsonValue);
190
+ }
191
+ catch (parseError) {
192
+ throw new Error(`Invalid JSON in ${field}: ${parseError.message}`);
193
+ }
194
+ }
195
+ }
196
+ catch {
197
+ }
198
+ });
199
+ try {
200
+ const storeId = getNodeParameter('store_id', i, undefined);
201
+ if (storeId !== undefined)
202
+ params.store_id = storeId;
203
+ }
204
+ catch {
205
+ }
206
+ return params;
207
+ }
208
+ };
209
+ //# sourceMappingURL=priority-products.constant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"priority-products.constant.js","sourceRoot":"","sources":["../../../../nodes/Priority/constants/priority-products.constant.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG;IAC5B,OAAO,EAAE;QACL;YACI,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,SAAS;YACf,gBAAgB,EAAE,IAAI;YACtB,cAAc,EAAE;gBACZ,IAAI,EAAE;oBACF,QAAQ,EAAE,CAAC,UAAU,CAAC;iBACzB;aACJ;YACD,OAAO,EAAE;gBACL;oBACI,IAAI,EAAE,gBAAgB;oBACtB,KAAK,EAAE,gBAAgB;oBACvB,WAAW,EAAE,sBAAsB;oBACnC,MAAM,EAAE,kBAAkB;iBAC7B;gBACD;oBACI,IAAI,EAAE,gBAAgB;oBACtB,KAAK,EAAE,gBAAgB;oBACvB,WAAW,EAAE,kBAAkB;oBAC/B,MAAM,EAAE,kBAAkB;iBAC7B;gBACD;oBACI,IAAI,EAAE,iBAAiB;oBACvB,KAAK,EAAE,eAAe;oBACtB,WAAW,EAAE,qBAAqB;oBAClC,MAAM,EAAE,iBAAiB;iBAC5B;gBACD;oBACI,IAAI,EAAE,aAAa;oBACnB,KAAK,EAAE,aAAa;oBACpB,WAAW,EAAE,wBAAwB;oBACrC,MAAM,EAAE,eAAe;iBAC1B;aACJ;YACD,OAAO,EAAE,eAAe;SAC3B;QAGD;YACI,WAAW,EAAE,UAAU;YACvB,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE,KAAK,EAAE,IAAI,EAAE;YACpD,QAAQ,EAAE,IAAI;YAEd,cAAc,EAAE;gBAC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