cardus 0.0.77 → 0.0.78
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.js +10 -3
- package/index.ts +10 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -212,9 +212,16 @@ class IntegrationManager {
|
|
|
212
212
|
[];
|
|
213
213
|
if (integrationShipmentDetails) {
|
|
214
214
|
const shipmentContentFromDetails = yield Promise.all(integrationShipmentDetails.map((detail) => __awaiter(this, void 0, void 0, function* () {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
215
|
+
let taric = null;
|
|
216
|
+
try {
|
|
217
|
+
if (detail.bulto.nombre_producto) {
|
|
218
|
+
taric = yield llmAPIService.getTaricCode('chatgpt', detail.bulto.nombre_producto);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
catch (e) {
|
|
222
|
+
if (e instanceof Error)
|
|
223
|
+
console.error(e.stack);
|
|
224
|
+
}
|
|
218
225
|
return {
|
|
219
226
|
id_envio: detail.id_envio,
|
|
220
227
|
id_usuario: idUsuario,
|
package/index.ts
CHANGED
|
@@ -298,12 +298,18 @@ export class IntegrationManager {
|
|
|
298
298
|
if (integrationShipmentDetails) {
|
|
299
299
|
const shipmentContentFromDetails = await Promise.all(
|
|
300
300
|
integrationShipmentDetails.map(async (detail) => {
|
|
301
|
-
|
|
302
|
-
|
|
301
|
+
let taric = null;
|
|
302
|
+
|
|
303
|
+
try {
|
|
304
|
+
if (detail.bulto.nombre_producto) {
|
|
305
|
+
taric = await llmAPIService.getTaricCode(
|
|
303
306
|
'chatgpt',
|
|
304
307
|
detail.bulto.nombre_producto
|
|
305
|
-
)
|
|
306
|
-
|
|
308
|
+
);
|
|
309
|
+
}
|
|
310
|
+
} catch (e) {
|
|
311
|
+
if (e instanceof Error) console.error(e.stack);
|
|
312
|
+
}
|
|
307
313
|
|
|
308
314
|
return {
|
|
309
315
|
id_envio: detail.id_envio,
|