falconhub-apilibrary 1.5.3-dev.134 → 1.6.0-dev.136
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +426 -1
- package/dist/index.mjs +483 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -96,6 +96,242 @@ var PRODUCT_TYPES_LAYOUT_HEADERS = [
|
|
|
96
96
|
"Descripci\xF3n"
|
|
97
97
|
];
|
|
98
98
|
|
|
99
|
+
// src/interfaces/Product/Consumable/ConsumableInterface.ts
|
|
100
|
+
var CONSUMABLES_BULK_COLUMN_MAP = {
|
|
101
|
+
"Consumible": "consumable",
|
|
102
|
+
"SKU": "sku",
|
|
103
|
+
"Dimensiones": "dimensions",
|
|
104
|
+
"Costo Unitario": "unitCost",
|
|
105
|
+
"Stock M\xEDnimo": "minimumStock",
|
|
106
|
+
"Tipo de Consumible": "consumableTypeId",
|
|
107
|
+
"Proveedor": "providerId",
|
|
108
|
+
"Material": "materialId"
|
|
109
|
+
};
|
|
110
|
+
var CONSUMABLES_BULK_HEADERS = [
|
|
111
|
+
"Consumible",
|
|
112
|
+
"SKU",
|
|
113
|
+
"Dimensiones",
|
|
114
|
+
"Costo Unitario",
|
|
115
|
+
"Stock M\xEDnimo",
|
|
116
|
+
"Tipo de Consumible",
|
|
117
|
+
"Proveedor",
|
|
118
|
+
"Material"
|
|
119
|
+
];
|
|
120
|
+
var CONSUMABLES_LAYOUT_COLUMN_MAP = {
|
|
121
|
+
"ID": "consumableId",
|
|
122
|
+
"Consumible": "consumable",
|
|
123
|
+
"SKU": "sku",
|
|
124
|
+
"Dimensiones": "dimensions",
|
|
125
|
+
"Costo Unitario": "unitCost",
|
|
126
|
+
"Stock M\xEDnimo": "minimumStock",
|
|
127
|
+
"Tipo de Consumible": "consumableTypeId",
|
|
128
|
+
"Proveedor": "providerId",
|
|
129
|
+
"Material": "materialId"
|
|
130
|
+
};
|
|
131
|
+
var CONSUMABLES_LAYOUT_HEADERS = [
|
|
132
|
+
"ID",
|
|
133
|
+
"Consumible",
|
|
134
|
+
"SKU",
|
|
135
|
+
"Dimensiones",
|
|
136
|
+
"Costo Unitario",
|
|
137
|
+
"Stock M\xEDnimo",
|
|
138
|
+
"Tipo de Consumible",
|
|
139
|
+
"Proveedor",
|
|
140
|
+
"Material"
|
|
141
|
+
];
|
|
142
|
+
|
|
143
|
+
// src/interfaces/Product/Collection/CollectionInterface.ts
|
|
144
|
+
var COLLECTIONS_BULK_COLUMN_MAP = {
|
|
145
|
+
"Colecci\xF3n": "collection",
|
|
146
|
+
"SKU": "sku",
|
|
147
|
+
"License": "license",
|
|
148
|
+
"Consumible": "consumable"
|
|
149
|
+
};
|
|
150
|
+
var COLLECTIONS_BULK_HEADERS = [
|
|
151
|
+
"Colecci\xF3n",
|
|
152
|
+
"SKU",
|
|
153
|
+
"License",
|
|
154
|
+
"Consumible"
|
|
155
|
+
];
|
|
156
|
+
var COLLECTIONS_LAYOUT_COLUMN_MAP = {
|
|
157
|
+
"ID": "collectionId",
|
|
158
|
+
"Colecci\xF3n": "collection",
|
|
159
|
+
"SKU": "sku",
|
|
160
|
+
"License": "license",
|
|
161
|
+
"Consumible": "consumable"
|
|
162
|
+
};
|
|
163
|
+
var COLLECTIONS_LAYOUT_HEADERS = [
|
|
164
|
+
"ID",
|
|
165
|
+
"Colecci\xF3n",
|
|
166
|
+
"SKU",
|
|
167
|
+
"License",
|
|
168
|
+
"Consumible"
|
|
169
|
+
];
|
|
170
|
+
|
|
171
|
+
// src/interfaces/Product/Product/ProductInterface.ts
|
|
172
|
+
var PRODUCTS_BULK_COLUMN_MAP = {
|
|
173
|
+
"Producto": "product",
|
|
174
|
+
"SKU": "sku",
|
|
175
|
+
"SKUs": "skUs",
|
|
176
|
+
"UPC": "upc",
|
|
177
|
+
"Costo": "cost",
|
|
178
|
+
"Impuesto %": "tax",
|
|
179
|
+
"Imagen": "image",
|
|
180
|
+
"Modelo": "model",
|
|
181
|
+
"Target": "target",
|
|
182
|
+
"Descripci\xF3n": "description",
|
|
183
|
+
"Largo (cm)": "length",
|
|
184
|
+
"Ancho (cm)": "width",
|
|
185
|
+
"Alto (cm)": "height",
|
|
186
|
+
"Peso (kg)": "weight",
|
|
187
|
+
"\xBFIncluir Bundles?": "includeBundles",
|
|
188
|
+
"\xBFIncluir POD Details?": "includePODDetails",
|
|
189
|
+
"Tipo de Producto": "productTypeId",
|
|
190
|
+
"Categor\xEDa": "productCategoryId",
|
|
191
|
+
"Licencia": "licenseId",
|
|
192
|
+
"Proveedor": "providerId",
|
|
193
|
+
"Empaque": "packingId",
|
|
194
|
+
"Estado": "productStatusId",
|
|
195
|
+
"Color": "colorId",
|
|
196
|
+
"Material": "materialId"
|
|
197
|
+
};
|
|
198
|
+
var PRODUCTS_BULK_HEADERS = [
|
|
199
|
+
"Producto",
|
|
200
|
+
"SKU",
|
|
201
|
+
"SKUs",
|
|
202
|
+
"UPC",
|
|
203
|
+
"Costo",
|
|
204
|
+
"Impuesto %",
|
|
205
|
+
"Imagen",
|
|
206
|
+
"Modelo",
|
|
207
|
+
"Target",
|
|
208
|
+
"Descripci\xF3n",
|
|
209
|
+
"Largo (cm)",
|
|
210
|
+
"Ancho (cm)",
|
|
211
|
+
"Alto (cm)",
|
|
212
|
+
"Peso (kg)",
|
|
213
|
+
"\xBFIncluir Bundles?",
|
|
214
|
+
"\xBFIncluir POD Details?",
|
|
215
|
+
"Tipo de Producto",
|
|
216
|
+
"Categor\xEDa",
|
|
217
|
+
"Licencia",
|
|
218
|
+
"Proveedor",
|
|
219
|
+
"Empaque",
|
|
220
|
+
"Estado",
|
|
221
|
+
"Color",
|
|
222
|
+
"Material"
|
|
223
|
+
];
|
|
224
|
+
var PRODUCTS_LAYOUT_COLUMN_MAP = {
|
|
225
|
+
"ID": "productId",
|
|
226
|
+
"Producto": "product",
|
|
227
|
+
"SKU": "sku",
|
|
228
|
+
"SKUs": "skUs",
|
|
229
|
+
"UPC": "upc",
|
|
230
|
+
"Costo": "cost",
|
|
231
|
+
"Impuesto %": "tax",
|
|
232
|
+
"Imagen": "image",
|
|
233
|
+
"Modelo": "model",
|
|
234
|
+
"Target": "target",
|
|
235
|
+
"Descripci\xF3n": "description",
|
|
236
|
+
"Largo (cm)": "length",
|
|
237
|
+
"Ancho (cm)": "width",
|
|
238
|
+
"Alto (cm)": "height",
|
|
239
|
+
"Peso (kg)": "weight",
|
|
240
|
+
"\xBFIncluir Bundles?": "includeBundles",
|
|
241
|
+
"\xBFIncluir POD Details?": "includePODDetails",
|
|
242
|
+
"Tipo de Producto": "productTypeId",
|
|
243
|
+
"Categor\xEDa": "productCategoryId",
|
|
244
|
+
"Licencia": "licenseId",
|
|
245
|
+
"Proveedor": "providerId",
|
|
246
|
+
"Empaque": "packingId",
|
|
247
|
+
"Estado": "productStatusId",
|
|
248
|
+
"Color": "colorId",
|
|
249
|
+
"Material": "materialId"
|
|
250
|
+
};
|
|
251
|
+
var PRODUCTS_LAYOUT_HEADERS = [
|
|
252
|
+
"ID",
|
|
253
|
+
"Producto",
|
|
254
|
+
"SKU",
|
|
255
|
+
"SKUs",
|
|
256
|
+
"UPC",
|
|
257
|
+
"Costo",
|
|
258
|
+
"Impuesto %",
|
|
259
|
+
"Imagen",
|
|
260
|
+
"Modelo",
|
|
261
|
+
"Target",
|
|
262
|
+
"Descripci\xF3n",
|
|
263
|
+
"Largo (cm)",
|
|
264
|
+
"Ancho (cm)",
|
|
265
|
+
"Alto (cm)",
|
|
266
|
+
"Peso (kg)",
|
|
267
|
+
"\xBFIncluir Bundles?",
|
|
268
|
+
"\xBFIncluir POD Details?",
|
|
269
|
+
"Tipo de Producto",
|
|
270
|
+
"Categor\xEDa",
|
|
271
|
+
"Licencia",
|
|
272
|
+
"Proveedor",
|
|
273
|
+
"Empaque",
|
|
274
|
+
"Estado",
|
|
275
|
+
"Color",
|
|
276
|
+
"Material"
|
|
277
|
+
];
|
|
278
|
+
|
|
279
|
+
// src/interfaces/Product/POD/PODInterface.ts
|
|
280
|
+
var POD_BULK_COLUMN_MAP = {
|
|
281
|
+
"Producto relacionado": "product",
|
|
282
|
+
"Arte relacionado": "artwork"
|
|
283
|
+
};
|
|
284
|
+
var POD_BULK_HEADERS = [
|
|
285
|
+
"Producto relacionado",
|
|
286
|
+
"Arte relacionado"
|
|
287
|
+
];
|
|
288
|
+
var POD_LAYOUT_COLUMN_MAP = {
|
|
289
|
+
"ID": "podId",
|
|
290
|
+
"Producto relacionado": "product",
|
|
291
|
+
"Arte relacionado": "artwork"
|
|
292
|
+
};
|
|
293
|
+
var POD_LAYOUT_HEADERS = [
|
|
294
|
+
"ID",
|
|
295
|
+
"Producto relacionado",
|
|
296
|
+
"Arte relacionado"
|
|
297
|
+
];
|
|
298
|
+
|
|
299
|
+
// src/interfaces/Product/Artwork/ArtworkInterface.ts
|
|
300
|
+
var ARTWORKS_BULK_COLUMN_MAP = {
|
|
301
|
+
"Nombre del arte": "artwork",
|
|
302
|
+
"SKU": "sku",
|
|
303
|
+
"Neck Label": "neckLabel",
|
|
304
|
+
"Colecci\xF3n": "collection",
|
|
305
|
+
"Blank": "blank",
|
|
306
|
+
"Ubicaci\xF3n de impresi\xF3n": "printLocation"
|
|
307
|
+
};
|
|
308
|
+
var ARTWORKS_BULK_HEADERS = [
|
|
309
|
+
"Nombre del arte",
|
|
310
|
+
"SKU",
|
|
311
|
+
"Neck Label",
|
|
312
|
+
"Colecci\xF3n",
|
|
313
|
+
"Blank",
|
|
314
|
+
"Ubicaci\xF3n de impresi\xF3n"
|
|
315
|
+
];
|
|
316
|
+
var ARTWORKS_LAYOUT_COLUMN_MAP = {
|
|
317
|
+
"ID": "artworkId",
|
|
318
|
+
"Nombre del arte": "artwork",
|
|
319
|
+
"SKU": "sku",
|
|
320
|
+
"Neck Label": "neckLabel",
|
|
321
|
+
"Colecci\xF3n": "collection",
|
|
322
|
+
"Blank": "blank",
|
|
323
|
+
"Ubicaci\xF3n de impresi\xF3n": "printLocation"
|
|
324
|
+
};
|
|
325
|
+
var ARTWORKS_LAYOUT_HEADERS = [
|
|
326
|
+
"ID",
|
|
327
|
+
"Nombre del arte",
|
|
328
|
+
"SKU",
|
|
329
|
+
"Neck Label",
|
|
330
|
+
"Colecci\xF3n",
|
|
331
|
+
"Blank",
|
|
332
|
+
"Ubicaci\xF3n de impresi\xF3n"
|
|
333
|
+
];
|
|
334
|
+
|
|
99
335
|
// src/interfaces/shared.ts
|
|
100
336
|
var LAYOUT_MARKER = "FH_LAYOUT";
|
|
101
337
|
|
|
@@ -138,7 +374,6 @@ var AuthService = class {
|
|
|
138
374
|
if (!response) {
|
|
139
375
|
throw new ErrorResponse("No response from server");
|
|
140
376
|
}
|
|
141
|
-
;
|
|
142
377
|
if (response.success && response.data) {
|
|
143
378
|
const data = response.data;
|
|
144
379
|
const expiresIn = parseInt(data.expiresIn.replace("s", ""));
|
|
@@ -162,13 +397,10 @@ var AuthService = class {
|
|
|
162
397
|
* 2. Sesión válida: retorna info de expiración sin renovar
|
|
163
398
|
*/
|
|
164
399
|
async validateSession() {
|
|
165
|
-
const response = await this.api.executePOST(
|
|
166
|
-
"oauth/validateSession"
|
|
167
|
-
);
|
|
400
|
+
const response = await this.api.executePOST("oauth/validateSession");
|
|
168
401
|
if (!response) {
|
|
169
402
|
throw new ErrorResponse("No response from server");
|
|
170
403
|
}
|
|
171
|
-
;
|
|
172
404
|
if (response.success && response.data) {
|
|
173
405
|
const respData = response.data;
|
|
174
406
|
if ("expiresIn" in respData && respData.expiresIn) {
|
|
@@ -188,7 +420,9 @@ var AuthService = class {
|
|
|
188
420
|
} else if ("expiresAt" in respData && respData.expiresAt) {
|
|
189
421
|
const sessionData = respData;
|
|
190
422
|
if (sessionData.remainingMinutes <= 5 && sessionData.remainingMinutes > 1) {
|
|
191
|
-
this.serviceProperties.onSessionExpiring?.(
|
|
423
|
+
this.serviceProperties.onSessionExpiring?.(
|
|
424
|
+
sessionData.remainingMinutes
|
|
425
|
+
);
|
|
192
426
|
} else if (sessionData.remainingMinutes <= 1) {
|
|
193
427
|
await this.logout();
|
|
194
428
|
if (this.serviceProperties.onSessionExpired) {
|
|
@@ -197,7 +431,6 @@ var AuthService = class {
|
|
|
197
431
|
}
|
|
198
432
|
}
|
|
199
433
|
}
|
|
200
|
-
;
|
|
201
434
|
return response;
|
|
202
435
|
}
|
|
203
436
|
/**
|
|
@@ -209,7 +442,6 @@ var AuthService = class {
|
|
|
209
442
|
if (!refreshToken) {
|
|
210
443
|
throw new ErrorResponse("No refresh token available");
|
|
211
444
|
}
|
|
212
|
-
;
|
|
213
445
|
const refreshRequestData = {
|
|
214
446
|
refreshToken,
|
|
215
447
|
rememberMe: refreshRequest.rememberMe ?? currentTokens?.rememberMe
|
|
@@ -222,7 +454,6 @@ var AuthService = class {
|
|
|
222
454
|
if (!response) {
|
|
223
455
|
throw new ErrorResponse("No response from server");
|
|
224
456
|
}
|
|
225
|
-
;
|
|
226
457
|
if (response.success && response.data) {
|
|
227
458
|
const sessionData = response.data;
|
|
228
459
|
const shouldRemember = refreshRequest.rememberMe ?? currentTokens?.rememberMe ?? false;
|
|
@@ -237,7 +468,6 @@ var AuthService = class {
|
|
|
237
468
|
this.tokenManager.setTokens(tokens);
|
|
238
469
|
this.serviceProperties.onTokensUpdated?.(tokens);
|
|
239
470
|
}
|
|
240
|
-
;
|
|
241
471
|
return response;
|
|
242
472
|
}
|
|
243
473
|
/**
|
|
@@ -303,6 +533,13 @@ var AuthService = class {
|
|
|
303
533
|
async changePassword(request) {
|
|
304
534
|
return this.api.executePublicRequest("oauth/password", "PUT", request);
|
|
305
535
|
}
|
|
536
|
+
async recoveryPassword(request) {
|
|
537
|
+
return this.api.executePublicRequest(
|
|
538
|
+
"oauth/recover-password",
|
|
539
|
+
"PATCH",
|
|
540
|
+
request
|
|
541
|
+
);
|
|
542
|
+
}
|
|
306
543
|
// #endregion
|
|
307
544
|
/**
|
|
308
545
|
* Verifica si el usuario está autenticado
|
|
@@ -1490,6 +1727,222 @@ var ProductService = class {
|
|
|
1490
1727
|
);
|
|
1491
1728
|
}
|
|
1492
1729
|
// #endregion
|
|
1730
|
+
// #region PRINT LOCATIONS
|
|
1731
|
+
async getPrintLocations(filter) {
|
|
1732
|
+
const endpoint = FilterBuilder.buildEndpoint(`${this.BASE_PATH}/catalogs/print-locations`, filter);
|
|
1733
|
+
return this.api.executeGET(endpoint, false);
|
|
1734
|
+
}
|
|
1735
|
+
async getPrintLocationsFilters() {
|
|
1736
|
+
return this.api.executeGET(`${this.BASE_PATH}/catalogs/print-locations/filters`, false);
|
|
1737
|
+
}
|
|
1738
|
+
async getPrintLocationById(id) {
|
|
1739
|
+
return this.api.executeGET(`${this.BASE_PATH}/catalogs/print-locations/${id}`, false);
|
|
1740
|
+
}
|
|
1741
|
+
async createPrintLocation(request) {
|
|
1742
|
+
return this.api.executePOST(`${this.BASE_PATH}/catalogs/print-locations`, request);
|
|
1743
|
+
}
|
|
1744
|
+
async updatePrintLocation(id, request) {
|
|
1745
|
+
return this.api.executePUT(`${this.BASE_PATH}/catalogs/print-locations/${id}`, request);
|
|
1746
|
+
}
|
|
1747
|
+
async deletePrintLocation(id) {
|
|
1748
|
+
return this.api.executeDELETE(`${this.BASE_PATH}/catalogs/print-locations/${id}`);
|
|
1749
|
+
}
|
|
1750
|
+
// #endregion
|
|
1751
|
+
// #region CONSUMABLE TYPES
|
|
1752
|
+
async getConsumableTypes(filter) {
|
|
1753
|
+
const endpoint = FilterBuilder.buildEndpoint(`${this.BASE_PATH}/catalogs/consumable-types`, filter);
|
|
1754
|
+
return this.api.executeGET(endpoint, false);
|
|
1755
|
+
}
|
|
1756
|
+
async getConsumableTypesFilters() {
|
|
1757
|
+
return this.api.executeGET(`${this.BASE_PATH}/catalogs/consumable-types/filters`, false);
|
|
1758
|
+
}
|
|
1759
|
+
async getConsumableTypeById(id) {
|
|
1760
|
+
return this.api.executeGET(`${this.BASE_PATH}/catalogs/consumable-types/${id}`, false);
|
|
1761
|
+
}
|
|
1762
|
+
async createConsumableType(request) {
|
|
1763
|
+
return this.api.executePOST(`${this.BASE_PATH}/catalogs/consumable-types`, request);
|
|
1764
|
+
}
|
|
1765
|
+
async updateConsumableType(id, request) {
|
|
1766
|
+
return this.api.executePUT(`${this.BASE_PATH}/catalogs/consumable-types/${id}`, request);
|
|
1767
|
+
}
|
|
1768
|
+
async deleteConsumableType(id) {
|
|
1769
|
+
return this.api.executeDELETE(`${this.BASE_PATH}/catalogs/consumable-types/${id}`);
|
|
1770
|
+
}
|
|
1771
|
+
// #endregion
|
|
1772
|
+
// #region CONSUMABLES
|
|
1773
|
+
async getConsumables(filter) {
|
|
1774
|
+
const endpoint = FilterBuilder.buildEndpoint(`${this.BASE_PATH}/pod/consumables`, filter);
|
|
1775
|
+
return this.api.executeGET(endpoint, false);
|
|
1776
|
+
}
|
|
1777
|
+
async getConsumablesFilters() {
|
|
1778
|
+
return this.api.executeGET(`${this.BASE_PATH}/pod/consumables/filters`, false);
|
|
1779
|
+
}
|
|
1780
|
+
async getConsumableById(id) {
|
|
1781
|
+
return this.api.executeGET(`${this.BASE_PATH}/pod/consumables/${id}`, false);
|
|
1782
|
+
}
|
|
1783
|
+
async createConsumable(request) {
|
|
1784
|
+
return this.api.executePOST(`${this.BASE_PATH}/pod/consumables`, request);
|
|
1785
|
+
}
|
|
1786
|
+
async updateConsumable(id, request) {
|
|
1787
|
+
return this.api.executePUT(`${this.BASE_PATH}/pod/consumables/${id}`, request);
|
|
1788
|
+
}
|
|
1789
|
+
async deleteConsumable(id) {
|
|
1790
|
+
return this.api.executeDELETE(`${this.BASE_PATH}/pod/consumables/${id}`);
|
|
1791
|
+
}
|
|
1792
|
+
async getConsumablesBulkTemplate() {
|
|
1793
|
+
return this.api.executeBlobGET(`${this.BASE_PATH}/pod/consumables/bulk/template`, false);
|
|
1794
|
+
}
|
|
1795
|
+
async getConsumablesBulkLayout(ids) {
|
|
1796
|
+
return this.api.executeBlobGET(`${this.BASE_PATH}/pod/consumables/bulk/layout?ids=${ids.join(",")}`, false);
|
|
1797
|
+
}
|
|
1798
|
+
async bulkUpsertConsumables(request) {
|
|
1799
|
+
return this.api.executePOST(`${this.BASE_PATH}/pod/consumables/bulk`, request);
|
|
1800
|
+
}
|
|
1801
|
+
// #endregion
|
|
1802
|
+
// #region COLLECTIONS
|
|
1803
|
+
async getCollections(filter) {
|
|
1804
|
+
const endpoint = FilterBuilder.buildEndpoint(`${this.BASE_PATH}/pod/collections`, filter);
|
|
1805
|
+
return this.api.executeGET(endpoint, false);
|
|
1806
|
+
}
|
|
1807
|
+
async getCollectionsFilters() {
|
|
1808
|
+
return this.api.executeGET(`${this.BASE_PATH}/pod/collections/filters`, false);
|
|
1809
|
+
}
|
|
1810
|
+
async getCollectionById(id) {
|
|
1811
|
+
return this.api.executeGET(`${this.BASE_PATH}/pod/collections/${id}`, false);
|
|
1812
|
+
}
|
|
1813
|
+
async createCollection(request) {
|
|
1814
|
+
return this.api.executePOST(`${this.BASE_PATH}/pod/collections`, request);
|
|
1815
|
+
}
|
|
1816
|
+
async updateCollection(id, request) {
|
|
1817
|
+
return this.api.executePUT(`${this.BASE_PATH}/pod/collections/${id}`, request);
|
|
1818
|
+
}
|
|
1819
|
+
async deleteCollection(id) {
|
|
1820
|
+
return this.api.executeDELETE(`${this.BASE_PATH}/pod/collections/${id}`);
|
|
1821
|
+
}
|
|
1822
|
+
async getCollectionsBulkTemplate() {
|
|
1823
|
+
return this.api.executeBlobGET(`${this.BASE_PATH}/pod/collections/bulk/template`, false);
|
|
1824
|
+
}
|
|
1825
|
+
async getCollectionsBulkLayout(ids) {
|
|
1826
|
+
return this.api.executeBlobGET(`${this.BASE_PATH}/pod/collections/bulk/layout?ids=${ids.join(",")}`, false);
|
|
1827
|
+
}
|
|
1828
|
+
async bulkUpsertCollections(request) {
|
|
1829
|
+
return this.api.executePOST(`${this.BASE_PATH}/pod/collections/bulk`, request);
|
|
1830
|
+
}
|
|
1831
|
+
// #endregion
|
|
1832
|
+
// #region PRODUCTS
|
|
1833
|
+
async getProducts(filter) {
|
|
1834
|
+
const endpoint = FilterBuilder.buildEndpoint(`${this.BASE_PATH}`, filter);
|
|
1835
|
+
return this.api.executeGET(endpoint, false);
|
|
1836
|
+
}
|
|
1837
|
+
async getProductsFilters() {
|
|
1838
|
+
return this.api.executeGET(`${this.BASE_PATH}/filters`, false);
|
|
1839
|
+
}
|
|
1840
|
+
async getProductDetails(id) {
|
|
1841
|
+
return this.api.executeGET(`${this.BASE_PATH}/details/${id}`, false);
|
|
1842
|
+
}
|
|
1843
|
+
async getProductById(id) {
|
|
1844
|
+
return this.api.executeGET(`${this.BASE_PATH}/${id}`, false);
|
|
1845
|
+
}
|
|
1846
|
+
async createProduct(request) {
|
|
1847
|
+
return this.api.executePOST(`${this.BASE_PATH}`, request);
|
|
1848
|
+
}
|
|
1849
|
+
async updateProduct(id, request) {
|
|
1850
|
+
return this.api.executePUT(`${this.BASE_PATH}/${id}`, request);
|
|
1851
|
+
}
|
|
1852
|
+
async deleteProduct(id) {
|
|
1853
|
+
return this.api.executeDELETE(`${this.BASE_PATH}/${id}`);
|
|
1854
|
+
}
|
|
1855
|
+
async getProductsBulkTemplate() {
|
|
1856
|
+
return this.api.executeBlobGET(`${this.BASE_PATH}/bulk/template`, false);
|
|
1857
|
+
}
|
|
1858
|
+
async getProductsBulkLayout(ids) {
|
|
1859
|
+
return this.api.executeBlobGET(`${this.BASE_PATH}/bulk/layout?ids=${ids.join(",")}`, false);
|
|
1860
|
+
}
|
|
1861
|
+
async bulkUpsertProducts(request) {
|
|
1862
|
+
return this.api.executePOST(`${this.BASE_PATH}/bulk`, request);
|
|
1863
|
+
}
|
|
1864
|
+
// #endregion
|
|
1865
|
+
// #region POD
|
|
1866
|
+
async getPODs(filter) {
|
|
1867
|
+
const endpoint = FilterBuilder.buildEndpoint(`${this.BASE_PATH}/pod`, filter);
|
|
1868
|
+
return this.api.executeGET(endpoint, false);
|
|
1869
|
+
}
|
|
1870
|
+
async getPODFilters() {
|
|
1871
|
+
return this.api.executeGET(`${this.BASE_PATH}/pod/filters`, false);
|
|
1872
|
+
}
|
|
1873
|
+
async getPODById(id) {
|
|
1874
|
+
return this.api.executeGET(`${this.BASE_PATH}/pod/${id}`, false);
|
|
1875
|
+
}
|
|
1876
|
+
async createPOD(request) {
|
|
1877
|
+
return this.api.executePOST(`${this.BASE_PATH}/pod`, request);
|
|
1878
|
+
}
|
|
1879
|
+
async updatePOD(id, request) {
|
|
1880
|
+
return this.api.executePUT(`${this.BASE_PATH}/pod/${id}`, request);
|
|
1881
|
+
}
|
|
1882
|
+
async deletePOD(id) {
|
|
1883
|
+
return this.api.executeDELETE(`${this.BASE_PATH}/pod/${id}`);
|
|
1884
|
+
}
|
|
1885
|
+
async getPODsBulkTemplate() {
|
|
1886
|
+
return this.api.executeBlobGET(`${this.BASE_PATH}/pod/bulk/template`, false);
|
|
1887
|
+
}
|
|
1888
|
+
async getPODsBulkLayout(ids) {
|
|
1889
|
+
return this.api.executeBlobGET(`${this.BASE_PATH}/pod/bulk/layout?ids=${ids.join(",")}`, false);
|
|
1890
|
+
}
|
|
1891
|
+
async bulkUpsertPODs(request) {
|
|
1892
|
+
return this.api.executePOST(`${this.BASE_PATH}/pod/bulk`, request);
|
|
1893
|
+
}
|
|
1894
|
+
// #endregion
|
|
1895
|
+
// #region ARTWORKS
|
|
1896
|
+
async getArtworks(filter) {
|
|
1897
|
+
const endpoint = FilterBuilder.buildEndpoint(`${this.BASE_PATH}/pod/artworks`, filter);
|
|
1898
|
+
return this.api.executeGET(endpoint, false);
|
|
1899
|
+
}
|
|
1900
|
+
async getArtworksFilters() {
|
|
1901
|
+
return this.api.executeGET(`${this.BASE_PATH}/pod/artworks/filters`, false);
|
|
1902
|
+
}
|
|
1903
|
+
async getArtworkById(id) {
|
|
1904
|
+
return this.api.executeGET(`${this.BASE_PATH}/pod/artworks/${id}`, false);
|
|
1905
|
+
}
|
|
1906
|
+
async createArtwork(request) {
|
|
1907
|
+
return this.api.executePOST(`${this.BASE_PATH}/pod/artworks`, request);
|
|
1908
|
+
}
|
|
1909
|
+
async updateArtwork(id, request) {
|
|
1910
|
+
return this.api.executePUT(`${this.BASE_PATH}/pod/artworks/${id}`, request);
|
|
1911
|
+
}
|
|
1912
|
+
async deleteArtwork(id) {
|
|
1913
|
+
return this.api.executeDELETE(`${this.BASE_PATH}/pod/artworks/${id}`);
|
|
1914
|
+
}
|
|
1915
|
+
async getArtworksBulkTemplate() {
|
|
1916
|
+
return this.api.executeBlobGET(`${this.BASE_PATH}/pod/artworks/bulk/template`, false);
|
|
1917
|
+
}
|
|
1918
|
+
async getArtworksBulkLayout(ids) {
|
|
1919
|
+
return this.api.executeBlobGET(`${this.BASE_PATH}/pod/artworks/bulk/layout?ids=${ids.join(",")}`, false);
|
|
1920
|
+
}
|
|
1921
|
+
async bulkUpsertArtworks(request) {
|
|
1922
|
+
return this.api.executePOST(`${this.BASE_PATH}/pod/artworks/bulk`, request);
|
|
1923
|
+
}
|
|
1924
|
+
// #endregion
|
|
1925
|
+
// #region ARTWORK CONSUMABLES
|
|
1926
|
+
async getArtworkConsumables(filter) {
|
|
1927
|
+
const endpoint = FilterBuilder.buildEndpoint(`${this.BASE_PATH}/pod/artworks-consumables`, filter);
|
|
1928
|
+
return this.api.executeGET(endpoint, false);
|
|
1929
|
+
}
|
|
1930
|
+
async getArtworkConsumablesFilters() {
|
|
1931
|
+
return this.api.executeGET(`${this.BASE_PATH}/pod/artworks-consumables/filters`, false);
|
|
1932
|
+
}
|
|
1933
|
+
async getArtworkConsumableById(id) {
|
|
1934
|
+
return this.api.executeGET(`${this.BASE_PATH}/pod/artworks-consumables/${id}`, false);
|
|
1935
|
+
}
|
|
1936
|
+
async createArtworkConsumable(request) {
|
|
1937
|
+
return this.api.executePOST(`${this.BASE_PATH}/pod/artworks-consumables`, request);
|
|
1938
|
+
}
|
|
1939
|
+
async updateArtworkConsumable(id, request) {
|
|
1940
|
+
return this.api.executePUT(`${this.BASE_PATH}/pod/artworks-consumables/${id}`, request);
|
|
1941
|
+
}
|
|
1942
|
+
async deleteArtworkConsumable(id) {
|
|
1943
|
+
return this.api.executeDELETE(`${this.BASE_PATH}/pod/artworks-consumables/${id}`);
|
|
1944
|
+
}
|
|
1945
|
+
// #endregion
|
|
1493
1946
|
};
|
|
1494
1947
|
|
|
1495
1948
|
// src/services/SystemService.ts
|
|
@@ -2512,14 +2965,26 @@ function decrypt(encryptedBase64, secret, timestamp) {
|
|
|
2512
2965
|
}
|
|
2513
2966
|
export {
|
|
2514
2967
|
API,
|
|
2968
|
+
ARTWORKS_BULK_COLUMN_MAP,
|
|
2969
|
+
ARTWORKS_BULK_HEADERS,
|
|
2970
|
+
ARTWORKS_LAYOUT_COLUMN_MAP,
|
|
2971
|
+
ARTWORKS_LAYOUT_HEADERS,
|
|
2515
2972
|
AuthInterceptor,
|
|
2516
2973
|
AuthService,
|
|
2517
2974
|
BLANKS_BULK_COLUMN_MAP,
|
|
2518
2975
|
BLANKS_BULK_SPANISH_HEADERS,
|
|
2976
|
+
COLLECTIONS_BULK_COLUMN_MAP,
|
|
2977
|
+
COLLECTIONS_BULK_HEADERS,
|
|
2978
|
+
COLLECTIONS_LAYOUT_COLUMN_MAP,
|
|
2979
|
+
COLLECTIONS_LAYOUT_HEADERS,
|
|
2519
2980
|
COLORS_BULK_COLUMN_MAP,
|
|
2520
2981
|
COLORS_BULK_HEADERS,
|
|
2521
2982
|
COLORS_LAYOUT_COLUMN_MAP,
|
|
2522
2983
|
COLORS_LAYOUT_HEADERS,
|
|
2984
|
+
CONSUMABLES_BULK_COLUMN_MAP,
|
|
2985
|
+
CONSUMABLES_BULK_HEADERS,
|
|
2986
|
+
CONSUMABLES_LAYOUT_COLUMN_MAP,
|
|
2987
|
+
CONSUMABLES_LAYOUT_HEADERS,
|
|
2523
2988
|
CatalogService,
|
|
2524
2989
|
CryptoService,
|
|
2525
2990
|
FalconHUBSDK,
|
|
@@ -2530,6 +2995,14 @@ export {
|
|
|
2530
2995
|
MATERIALS_BULK_HEADERS,
|
|
2531
2996
|
MATERIALS_LAYOUT_COLUMN_MAP,
|
|
2532
2997
|
MATERIALS_LAYOUT_HEADERS,
|
|
2998
|
+
POD_BULK_COLUMN_MAP,
|
|
2999
|
+
POD_BULK_HEADERS,
|
|
3000
|
+
POD_LAYOUT_COLUMN_MAP,
|
|
3001
|
+
POD_LAYOUT_HEADERS,
|
|
3002
|
+
PRODUCTS_BULK_COLUMN_MAP,
|
|
3003
|
+
PRODUCTS_BULK_HEADERS,
|
|
3004
|
+
PRODUCTS_LAYOUT_COLUMN_MAP,
|
|
3005
|
+
PRODUCTS_LAYOUT_HEADERS,
|
|
2533
3006
|
PRODUCT_TYPES_BULK_COLUMN_MAP,
|
|
2534
3007
|
PRODUCT_TYPES_BULK_HEADERS,
|
|
2535
3008
|
PRODUCT_TYPES_LAYOUT_COLUMN_MAP,
|