cardus 0.0.113 → 0.0.115
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/__tests__/insertTempShipments.test.ts +12 -24
- package/dist/__tests__/insertTempShipments.test.js +12 -24
- package/dist/index.js +13 -23
- package/index.ts +18 -23
- package/package.json +1 -1
- package/types/index.ts +6 -3
|
@@ -185,8 +185,7 @@ const arrangeDefaultStubs = ({ manager, shipmentId = 12345 }) => {
|
|
|
185
185
|
{
|
|
186
186
|
idEnvioTemporal: parsedOrder.idEnvioTemporal,
|
|
187
187
|
bulto: detail.bulto,
|
|
188
|
-
cantidad: 2
|
|
189
|
-
forzarAgrupamientoDeLinea: false
|
|
188
|
+
cantidad: 2
|
|
190
189
|
}
|
|
191
190
|
]
|
|
192
191
|
};
|
|
@@ -522,8 +521,7 @@ describe('IntegrationManager.insertTempShipments', () => {
|
|
|
522
521
|
sku_producto: lineItems.line.sku_producto,
|
|
523
522
|
nombre_producto: lineItems.line.nombre_producto
|
|
524
523
|
},
|
|
525
|
-
cantidad: 2
|
|
526
|
-
forzarAgrupamientoDeLinea: false
|
|
524
|
+
cantidad: 2
|
|
527
525
|
}));
|
|
528
526
|
|
|
529
527
|
await manager.insertTempShipments({
|
|
@@ -592,8 +590,7 @@ describe('IntegrationManager.insertTempShipments', () => {
|
|
|
592
590
|
sku_producto: lineItems.line.sku_producto,
|
|
593
591
|
nombre_producto: lineItems.line.nombre_producto
|
|
594
592
|
},
|
|
595
|
-
cantidad: 1
|
|
596
|
-
forzarAgrupamientoDeLinea: false
|
|
593
|
+
cantidad: 1
|
|
597
594
|
}));
|
|
598
595
|
|
|
599
596
|
await manager.insertTempShipments({
|
|
@@ -659,8 +656,7 @@ describe('IntegrationManager.insertTempShipments', () => {
|
|
|
659
656
|
sku_producto: lineItems.line.sku_producto,
|
|
660
657
|
nombre_producto: lineItems.line.nombre_producto
|
|
661
658
|
},
|
|
662
|
-
cantidad: 1
|
|
663
|
-
forzarAgrupamientoDeLinea: false
|
|
659
|
+
cantidad: 1
|
|
664
660
|
}));
|
|
665
661
|
|
|
666
662
|
await manager.insertTempShipments({
|
|
@@ -730,8 +726,7 @@ describe('IntegrationManager.insertTempShipments', () => {
|
|
|
730
726
|
sku_producto: lineItems.line.sku_producto,
|
|
731
727
|
nombre_producto: lineItems.line.nombre_producto
|
|
732
728
|
},
|
|
733
|
-
cantidad: 2
|
|
734
|
-
forzarAgrupamientoDeLinea: false
|
|
729
|
+
cantidad: 2
|
|
735
730
|
}));
|
|
736
731
|
|
|
737
732
|
await manager.insertTempShipments({
|
|
@@ -796,8 +791,7 @@ describe('IntegrationManager.insertTempShipments', () => {
|
|
|
796
791
|
sku_producto: lineItems.line.sku_producto,
|
|
797
792
|
nombre_producto: lineItems.line.nombre_producto
|
|
798
793
|
},
|
|
799
|
-
cantidad: 1
|
|
800
|
-
forzarAgrupamientoDeLinea: false
|
|
794
|
+
cantidad: 1
|
|
801
795
|
}));
|
|
802
796
|
|
|
803
797
|
await manager.insertTempShipments({
|
|
@@ -880,8 +874,7 @@ describe('IntegrationManager.insertTempShipments', () => {
|
|
|
880
874
|
sku_producto: lineItems.line.sku_producto,
|
|
881
875
|
nombre_producto: lineItems.line.nombre_producto
|
|
882
876
|
},
|
|
883
|
-
cantidad: 2
|
|
884
|
-
forzarAgrupamientoDeLinea: false
|
|
877
|
+
cantidad: 2
|
|
885
878
|
}));
|
|
886
879
|
|
|
887
880
|
await manager.insertTempShipments({
|
|
@@ -961,8 +954,7 @@ describe('IntegrationManager.insertTempShipments', () => {
|
|
|
961
954
|
sku_producto: lineItems.line.sku_producto,
|
|
962
955
|
nombre_producto: lineItems.line.nombre_producto
|
|
963
956
|
},
|
|
964
|
-
cantidad: 1
|
|
965
|
-
forzarAgrupamientoDeLinea: false
|
|
957
|
+
cantidad: 1
|
|
966
958
|
}));
|
|
967
959
|
|
|
968
960
|
await manager.insertTempShipments({
|
|
@@ -1036,8 +1028,7 @@ describe('IntegrationManager.insertTempShipments', () => {
|
|
|
1036
1028
|
sku_producto: lineItems.line.sku_producto,
|
|
1037
1029
|
nombre_producto: lineItems.line.nombre_producto
|
|
1038
1030
|
},
|
|
1039
|
-
cantidad: 1
|
|
1040
|
-
forzarAgrupamientoDeLinea: false
|
|
1031
|
+
cantidad: 1
|
|
1041
1032
|
}));
|
|
1042
1033
|
|
|
1043
1034
|
await manager.insertTempShipments({
|
|
@@ -1133,8 +1124,7 @@ describe('IntegrationManager.insertTempShipments', () => {
|
|
|
1133
1124
|
sku_producto: lineItems.line.sku_producto,
|
|
1134
1125
|
nombre_producto: lineItems.line.nombre_producto
|
|
1135
1126
|
},
|
|
1136
|
-
cantidad: 2
|
|
1137
|
-
forzarAgrupamientoDeLinea: false
|
|
1127
|
+
cantidad: 2
|
|
1138
1128
|
}));
|
|
1139
1129
|
|
|
1140
1130
|
await manager.insertTempShipments({
|
|
@@ -1234,8 +1224,7 @@ describe('IntegrationManager.insertTempShipments', () => {
|
|
|
1234
1224
|
sku_producto: lineItems.line.sku_producto,
|
|
1235
1225
|
nombre_producto: lineItems.line.nombre_producto
|
|
1236
1226
|
},
|
|
1237
|
-
cantidad: 1
|
|
1238
|
-
forzarAgrupamientoDeLinea: false
|
|
1227
|
+
cantidad: 1
|
|
1239
1228
|
};
|
|
1240
1229
|
});
|
|
1241
1230
|
|
|
@@ -1339,8 +1328,7 @@ describe('IntegrationManager.insertTempShipments', () => {
|
|
|
1339
1328
|
sku_producto: lineItems.line.sku_producto,
|
|
1340
1329
|
nombre_producto: lineItems.line.nombre_producto
|
|
1341
1330
|
},
|
|
1342
|
-
cantidad: 2
|
|
1343
|
-
forzarAgrupamientoDeLinea: false
|
|
1331
|
+
cantidad: 2
|
|
1344
1332
|
}));
|
|
1345
1333
|
|
|
1346
1334
|
await manager.insertTempShipments({
|
|
@@ -164,8 +164,7 @@ const arrangeDefaultStubs = ({ manager, shipmentId = 12345 }) => {
|
|
|
164
164
|
{
|
|
165
165
|
idEnvioTemporal: parsedOrder.idEnvioTemporal,
|
|
166
166
|
bulto: detail.bulto,
|
|
167
|
-
cantidad: 2
|
|
168
|
-
forzarAgrupamientoDeLinea: false
|
|
167
|
+
cantidad: 2
|
|
169
168
|
}
|
|
170
169
|
]
|
|
171
170
|
};
|
|
@@ -439,8 +438,7 @@ describe('IntegrationManager.insertTempShipments', () => {
|
|
|
439
438
|
sku_producto: lineItems.line.sku_producto,
|
|
440
439
|
nombre_producto: lineItems.line.nombre_producto
|
|
441
440
|
},
|
|
442
|
-
cantidad: 2
|
|
443
|
-
forzarAgrupamientoDeLinea: false
|
|
441
|
+
cantidad: 2
|
|
444
442
|
});
|
|
445
443
|
}));
|
|
446
444
|
yield manager.insertTempShipments({
|
|
@@ -499,8 +497,7 @@ describe('IntegrationManager.insertTempShipments', () => {
|
|
|
499
497
|
sku_producto: lineItems.line.sku_producto,
|
|
500
498
|
nombre_producto: lineItems.line.nombre_producto
|
|
501
499
|
},
|
|
502
|
-
cantidad: 1
|
|
503
|
-
forzarAgrupamientoDeLinea: false
|
|
500
|
+
cantidad: 1
|
|
504
501
|
});
|
|
505
502
|
}));
|
|
506
503
|
yield manager.insertTempShipments({
|
|
@@ -556,8 +553,7 @@ describe('IntegrationManager.insertTempShipments', () => {
|
|
|
556
553
|
sku_producto: lineItems.line.sku_producto,
|
|
557
554
|
nombre_producto: lineItems.line.nombre_producto
|
|
558
555
|
},
|
|
559
|
-
cantidad: 1
|
|
560
|
-
forzarAgrupamientoDeLinea: false
|
|
556
|
+
cantidad: 1
|
|
561
557
|
});
|
|
562
558
|
}));
|
|
563
559
|
yield manager.insertTempShipments({
|
|
@@ -616,8 +612,7 @@ describe('IntegrationManager.insertTempShipments', () => {
|
|
|
616
612
|
sku_producto: lineItems.line.sku_producto,
|
|
617
613
|
nombre_producto: lineItems.line.nombre_producto
|
|
618
614
|
},
|
|
619
|
-
cantidad: 2
|
|
620
|
-
forzarAgrupamientoDeLinea: false
|
|
615
|
+
cantidad: 2
|
|
621
616
|
});
|
|
622
617
|
}));
|
|
623
618
|
yield manager.insertTempShipments({
|
|
@@ -672,8 +667,7 @@ describe('IntegrationManager.insertTempShipments', () => {
|
|
|
672
667
|
sku_producto: lineItems.line.sku_producto,
|
|
673
668
|
nombre_producto: lineItems.line.nombre_producto
|
|
674
669
|
},
|
|
675
|
-
cantidad: 1
|
|
676
|
-
forzarAgrupamientoDeLinea: false
|
|
670
|
+
cantidad: 1
|
|
677
671
|
});
|
|
678
672
|
}));
|
|
679
673
|
yield manager.insertTempShipments({
|
|
@@ -746,8 +740,7 @@ describe('IntegrationManager.insertTempShipments', () => {
|
|
|
746
740
|
sku_producto: lineItems.line.sku_producto,
|
|
747
741
|
nombre_producto: lineItems.line.nombre_producto
|
|
748
742
|
},
|
|
749
|
-
cantidad: 2
|
|
750
|
-
forzarAgrupamientoDeLinea: false
|
|
743
|
+
cantidad: 2
|
|
751
744
|
});
|
|
752
745
|
}));
|
|
753
746
|
yield manager.insertTempShipments({
|
|
@@ -813,8 +806,7 @@ describe('IntegrationManager.insertTempShipments', () => {
|
|
|
813
806
|
sku_producto: lineItems.line.sku_producto,
|
|
814
807
|
nombre_producto: lineItems.line.nombre_producto
|
|
815
808
|
},
|
|
816
|
-
cantidad: 1
|
|
817
|
-
forzarAgrupamientoDeLinea: false
|
|
809
|
+
cantidad: 1
|
|
818
810
|
});
|
|
819
811
|
}));
|
|
820
812
|
yield manager.insertTempShipments({
|
|
@@ -878,8 +870,7 @@ describe('IntegrationManager.insertTempShipments', () => {
|
|
|
878
870
|
sku_producto: lineItems.line.sku_producto,
|
|
879
871
|
nombre_producto: lineItems.line.nombre_producto
|
|
880
872
|
},
|
|
881
|
-
cantidad: 1
|
|
882
|
-
forzarAgrupamientoDeLinea: false
|
|
873
|
+
cantidad: 1
|
|
883
874
|
});
|
|
884
875
|
}));
|
|
885
876
|
yield manager.insertTempShipments({
|
|
@@ -964,8 +955,7 @@ describe('IntegrationManager.insertTempShipments', () => {
|
|
|
964
955
|
sku_producto: lineItems.line.sku_producto,
|
|
965
956
|
nombre_producto: lineItems.line.nombre_producto
|
|
966
957
|
},
|
|
967
|
-
cantidad: 2
|
|
968
|
-
forzarAgrupamientoDeLinea: false
|
|
958
|
+
cantidad: 2
|
|
969
959
|
});
|
|
970
960
|
}));
|
|
971
961
|
yield manager.insertTempShipments({
|
|
@@ -1050,8 +1040,7 @@ describe('IntegrationManager.insertTempShipments', () => {
|
|
|
1050
1040
|
sku_producto: lineItems.line.sku_producto,
|
|
1051
1041
|
nombre_producto: lineItems.line.nombre_producto
|
|
1052
1042
|
},
|
|
1053
|
-
cantidad: 1
|
|
1054
|
-
forzarAgrupamientoDeLinea: false
|
|
1043
|
+
cantidad: 1
|
|
1055
1044
|
};
|
|
1056
1045
|
}));
|
|
1057
1046
|
yield manager.insertTempShipments({
|
|
@@ -1138,8 +1127,7 @@ describe('IntegrationManager.insertTempShipments', () => {
|
|
|
1138
1127
|
sku_producto: lineItems.line.sku_producto,
|
|
1139
1128
|
nombre_producto: lineItems.line.nombre_producto
|
|
1140
1129
|
},
|
|
1141
|
-
cantidad: 2
|
|
1142
|
-
forzarAgrupamientoDeLinea: false
|
|
1130
|
+
cantidad: 2
|
|
1143
1131
|
});
|
|
1144
1132
|
}));
|
|
1145
1133
|
yield manager.insertTempShipments({
|
package/dist/index.js
CHANGED
|
@@ -226,7 +226,7 @@ class IntegrationManager {
|
|
|
226
226
|
insertUserDefaultConfigurationContent(_a) {
|
|
227
227
|
return __awaiter(this, arguments, void 0, function* ({ user, countryName, shipmentDetails }) {
|
|
228
228
|
const idUsuario = user.id_usuario;
|
|
229
|
-
const { configurationService, llmAPIService } = this.services;
|
|
229
|
+
const { configurationService, llmAPIService, countriesService } = this.services;
|
|
230
230
|
const insert = (data) => {
|
|
231
231
|
data.forEach((tempContent) => {
|
|
232
232
|
if (tempContent.contenido) {
|
|
@@ -256,6 +256,7 @@ class IntegrationManager {
|
|
|
256
256
|
if (e instanceof Error)
|
|
257
257
|
console.error(e.stack);
|
|
258
258
|
}
|
|
259
|
+
const { nombre_pais_en } = yield countriesService.getCountryFromCountryCode(detail.bulto.origen);
|
|
259
260
|
return {
|
|
260
261
|
id_envio: detail.id_envio,
|
|
261
262
|
id_usuario: idUsuario,
|
|
@@ -269,7 +270,7 @@ class IntegrationManager {
|
|
|
269
270
|
eori_exportacion: user.eori_export,
|
|
270
271
|
peso_bruto: detail.bulto.peso,
|
|
271
272
|
peso_neto: detail.bulto.peso,
|
|
272
|
-
origen: countryName,
|
|
273
|
+
origen: nombre_pais_en || countryName,
|
|
273
274
|
cantidad: detail.cantidad,
|
|
274
275
|
reason_export: '1'
|
|
275
276
|
};
|
|
@@ -348,13 +349,12 @@ class IntegrationManager {
|
|
|
348
349
|
lineItems: { idEnvioTemporal, line },
|
|
349
350
|
idUsuario
|
|
350
351
|
});
|
|
351
|
-
const { bulto, cantidad
|
|
352
|
+
const { bulto, cantidad } = result;
|
|
352
353
|
if (cantidad && bulto) {
|
|
353
354
|
return {
|
|
354
355
|
bulto,
|
|
355
356
|
cantidad,
|
|
356
|
-
idEnvioTemporal
|
|
357
|
-
forzarAgrupamientoDeLinea: !!forzarAgrupamientoDeLinea
|
|
357
|
+
idEnvioTemporal
|
|
358
358
|
};
|
|
359
359
|
}
|
|
360
360
|
return null;
|
|
@@ -374,7 +374,7 @@ class IntegrationManager {
|
|
|
374
374
|
var _d;
|
|
375
375
|
if (!bultoYCantidad)
|
|
376
376
|
return;
|
|
377
|
-
const { bulto, cantidad, idEnvioTemporal
|
|
377
|
+
const { bulto, cantidad, idEnvioTemporal } = bultoYCantidad;
|
|
378
378
|
// metemos los detalles siempre
|
|
379
379
|
shipmentDetails.push({
|
|
380
380
|
id_envio: idEnvioTemporal,
|
|
@@ -407,24 +407,14 @@ class IntegrationManager {
|
|
|
407
407
|
// si no agrupamos, cogemos el peso y dimensiones del peso mismo
|
|
408
408
|
}
|
|
409
409
|
else {
|
|
410
|
-
// lo de "forzarAgrupamientoDeLinea" se hizo solo para un usuario (Pegaso) que ya ni siquiera esta. Lo que hace es que siempre mete una linea, sin tener en cuenta la cantidad, pero con las dimensiones que les hemos preparado para ese bulto (que es una suma de todos los bultos reales... un chanchullo)
|
|
411
410
|
const tempShipmentLines = [];
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
else {
|
|
420
|
-
// creamos una linea por cada una de las unidades de "cantidad" (si cantidad es 5, pues 5 lineas -todas iguales, con el peso y medidas del bulto-)
|
|
421
|
-
const arrayFake = Array.from({ length: Number(cantidad) });
|
|
422
|
-
const linesToAdd = arrayFake.map(() => ({
|
|
423
|
-
id_envio: idEnvioTemporal,
|
|
424
|
-
bulto
|
|
425
|
-
}));
|
|
426
|
-
tempShipmentLines.push(...linesToAdd);
|
|
427
|
-
}
|
|
411
|
+
// creamos una linea por cada una de las unidades de "cantidad" (si cantidad es 5, pues 5 lineas -todas iguales, con el peso y medidas del bulto-)
|
|
412
|
+
const arrayFake = Array.from({ length: Number(cantidad) });
|
|
413
|
+
const linesToAdd = arrayFake.map(() => ({
|
|
414
|
+
id_envio: idEnvioTemporal,
|
|
415
|
+
bulto
|
|
416
|
+
}));
|
|
417
|
+
tempShipmentLines.push(...linesToAdd);
|
|
428
418
|
if (this.dataToInsert.lines.has(idEnvioTemporal)) {
|
|
429
419
|
this.dataToInsert.lines.set(idEnvioTemporal, [
|
|
430
420
|
...((_d = this.dataToInsert.lines.get(idEnvioTemporal)) !== null && _d !== void 0 ? _d : []),
|
package/index.ts
CHANGED
|
@@ -367,7 +367,8 @@ export class IntegrationManager {
|
|
|
367
367
|
shipmentDetails: InsertContentShipmentDetail[];
|
|
368
368
|
}) {
|
|
369
369
|
const idUsuario = user.id_usuario as number;
|
|
370
|
-
const { configurationService, llmAPIService } =
|
|
370
|
+
const { configurationService, llmAPIService, countriesService } =
|
|
371
|
+
this.services;
|
|
371
372
|
|
|
372
373
|
const insert = (data: UserDefaultConfigurationContent[]) => {
|
|
373
374
|
data.forEach((tempContent) => {
|
|
@@ -413,6 +414,11 @@ export class IntegrationManager {
|
|
|
413
414
|
if (e instanceof Error) console.error(e.stack);
|
|
414
415
|
}
|
|
415
416
|
|
|
417
|
+
const { nombre_pais_en } =
|
|
418
|
+
await countriesService.getCountryFromCountryCode(
|
|
419
|
+
detail.bulto.origen
|
|
420
|
+
);
|
|
421
|
+
|
|
416
422
|
return {
|
|
417
423
|
id_envio: detail.id_envio,
|
|
418
424
|
id_usuario: idUsuario,
|
|
@@ -426,7 +432,7 @@ export class IntegrationManager {
|
|
|
426
432
|
eori_exportacion: user.eori_export,
|
|
427
433
|
peso_bruto: detail.bulto.peso,
|
|
428
434
|
peso_neto: detail.bulto.peso,
|
|
429
|
-
origen: countryName,
|
|
435
|
+
origen: nombre_pais_en || countryName,
|
|
430
436
|
cantidad: detail.cantidad,
|
|
431
437
|
reason_export: '1'
|
|
432
438
|
} as UserDefaultConfigurationContent;
|
|
@@ -580,14 +586,13 @@ export class IntegrationManager {
|
|
|
580
586
|
lineItems: { idEnvioTemporal, line },
|
|
581
587
|
idUsuario
|
|
582
588
|
});
|
|
583
|
-
const { bulto, cantidad
|
|
589
|
+
const { bulto, cantidad } = result;
|
|
584
590
|
|
|
585
591
|
if (cantidad && bulto) {
|
|
586
592
|
return {
|
|
587
593
|
bulto,
|
|
588
594
|
cantidad,
|
|
589
|
-
idEnvioTemporal
|
|
590
|
-
forzarAgrupamientoDeLinea: !!forzarAgrupamientoDeLinea
|
|
595
|
+
idEnvioTemporal
|
|
591
596
|
};
|
|
592
597
|
}
|
|
593
598
|
return null;
|
|
@@ -615,8 +620,7 @@ export class IntegrationManager {
|
|
|
615
620
|
bultosYCantidades.map(async (bultoYCantidad) => {
|
|
616
621
|
if (!bultoYCantidad) return;
|
|
617
622
|
|
|
618
|
-
const { bulto, cantidad, idEnvioTemporal
|
|
619
|
-
bultoYCantidad;
|
|
623
|
+
const { bulto, cantidad, idEnvioTemporal } = bultoYCantidad;
|
|
620
624
|
|
|
621
625
|
// metemos los detalles siempre
|
|
622
626
|
shipmentDetails.push({
|
|
@@ -652,26 +656,17 @@ export class IntegrationManager {
|
|
|
652
656
|
]);
|
|
653
657
|
// si no agrupamos, cogemos el peso y dimensiones del peso mismo
|
|
654
658
|
} else {
|
|
655
|
-
// lo de "forzarAgrupamientoDeLinea" se hizo solo para un usuario (Pegaso) que ya ni siquiera esta. Lo que hace es que siempre mete una linea, sin tener en cuenta la cantidad, pero con las dimensiones que les hemos preparado para ese bulto (que es una suma de todos los bultos reales... un chanchullo)
|
|
656
659
|
const tempShipmentLines = [];
|
|
657
660
|
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
} else {
|
|
665
|
-
// creamos una linea por cada una de las unidades de "cantidad" (si cantidad es 5, pues 5 lineas -todas iguales, con el peso y medidas del bulto-)
|
|
661
|
+
// creamos una linea por cada una de las unidades de "cantidad" (si cantidad es 5, pues 5 lineas -todas iguales, con el peso y medidas del bulto-)
|
|
662
|
+
const arrayFake = Array.from({ length: Number(cantidad) });
|
|
663
|
+
const linesToAdd = arrayFake.map(() => ({
|
|
664
|
+
id_envio: idEnvioTemporal,
|
|
665
|
+
bulto
|
|
666
|
+
}));
|
|
666
667
|
|
|
667
|
-
|
|
668
|
-
const linesToAdd = arrayFake.map(() => ({
|
|
669
|
-
id_envio: idEnvioTemporal,
|
|
670
|
-
bulto
|
|
671
|
-
}));
|
|
668
|
+
tempShipmentLines.push(...linesToAdd);
|
|
672
669
|
|
|
673
|
-
tempShipmentLines.push(...linesToAdd);
|
|
674
|
-
}
|
|
675
670
|
if (this.dataToInsert.lines.has(idEnvioTemporal)) {
|
|
676
671
|
this.dataToInsert.lines.set(idEnvioTemporal, [
|
|
677
672
|
...(this.dataToInsert.lines.get(idEnvioTemporal) ?? []),
|
package/package.json
CHANGED
package/types/index.ts
CHANGED
|
@@ -99,16 +99,15 @@ export type Bulto = {
|
|
|
99
99
|
valor?: number;
|
|
100
100
|
precio_producto: string | null;
|
|
101
101
|
hs_code: string | null;
|
|
102
|
+
origen: string;
|
|
102
103
|
};
|
|
103
104
|
cantidad: number;
|
|
104
|
-
forzarAgrupamientoDeLinea: boolean;
|
|
105
105
|
};
|
|
106
106
|
|
|
107
107
|
export type BultoYCantidad = {
|
|
108
108
|
bulto: Bulto['bulto'];
|
|
109
109
|
cantidad: Bulto['cantidad'];
|
|
110
110
|
idEnvioTemporal: number;
|
|
111
|
-
forzarAgrupamientoDeLinea: boolean;
|
|
112
111
|
} | null;
|
|
113
112
|
|
|
114
113
|
export type ModifiedOrder = {
|
|
@@ -327,7 +326,11 @@ export type CountriesService = {
|
|
|
327
326
|
|
|
328
327
|
getCountryFromCountryCode: (
|
|
329
328
|
countryCode: string
|
|
330
|
-
) => Promise<{
|
|
329
|
+
) => Promise<{
|
|
330
|
+
nombre_pais: string;
|
|
331
|
+
id_pais?: number;
|
|
332
|
+
nombre_pais_en: string;
|
|
333
|
+
}>;
|
|
331
334
|
|
|
332
335
|
getProvinceByCountryIdAndPostalCode: (
|
|
333
336
|
id_pais: Country['id_pais'],
|