cardus 0.0.49 → 0.0.51
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 +3 -2
- package/dist/insertTempShipment/index.js +2 -2
- package/index.ts +3 -2
- package/insertTempShipment/index.ts +1 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -41,7 +41,6 @@ class IntegrationManager {
|
|
|
41
41
|
this.insertTempShipment = (_b) => __awaiter(this, [_b], void 0, function* ({ order, agencyId, warehouseId, sellerAddress, idUsuario, isPriority }) {
|
|
42
42
|
const tempShipmentData = yield (0, insertTempShipment_1.cookTempShipment)({
|
|
43
43
|
order,
|
|
44
|
-
integrationType: this.integrationType,
|
|
45
44
|
shipmentType: this.shipmentType,
|
|
46
45
|
agencyId,
|
|
47
46
|
warehouseId,
|
|
@@ -198,7 +197,9 @@ class IntegrationManager {
|
|
|
198
197
|
}
|
|
199
198
|
if (userConfiguration && userConfiguration !== null) {
|
|
200
199
|
tempShimpmentIds.forEach((tempShimpmentId) => {
|
|
201
|
-
|
|
200
|
+
if (userConfiguration) {
|
|
201
|
+
insert(userConfiguration, tempShimpmentId);
|
|
202
|
+
}
|
|
202
203
|
});
|
|
203
204
|
}
|
|
204
205
|
});
|
|
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.cookTempShipment = void 0;
|
|
16
16
|
const moment_1 = __importDefault(require("moment"));
|
|
17
|
-
const cookTempShipment = (_a) => __awaiter(void 0, [_a], void 0, function* ({ order,
|
|
17
|
+
const cookTempShipment = (_a) => __awaiter(void 0, [_a], void 0, function* ({ order, shipmentType, agencyId, warehouseId, sellerAddress, idUsuario, findNextPickupDate, countriesService, isPriority }) {
|
|
18
18
|
let zonaLLegada = {};
|
|
19
19
|
if (order.codigoPaisLLegada)
|
|
20
20
|
zonaLLegada = yield countriesService.getCountryFromCountryCode(order.codigoPaisLLegada);
|
|
@@ -101,7 +101,7 @@ const cookTempShipment = (_a) => __awaiter(void 0, [_a], void 0, function* ({ or
|
|
|
101
101
|
});
|
|
102
102
|
const setBultos = (order) => ({
|
|
103
103
|
num_bultos: warehouseId ? 0 : order.lineas.length,
|
|
104
|
-
tipo_envio:
|
|
104
|
+
tipo_envio: shipmentType,
|
|
105
105
|
codigo_envio_externo: order.codigoEnvioExterno,
|
|
106
106
|
id_almacen: warehouseId,
|
|
107
107
|
agencia_envio_integracion: order.agenciaEnvioIntegracion
|
package/index.ts
CHANGED
|
@@ -231,7 +231,9 @@ export class IntegrationManager {
|
|
|
231
231
|
}
|
|
232
232
|
if (userConfiguration && userConfiguration !== null) {
|
|
233
233
|
tempShimpmentIds.forEach((tempShimpmentId) => {
|
|
234
|
-
|
|
234
|
+
if (userConfiguration) {
|
|
235
|
+
insert(userConfiguration, tempShimpmentId);
|
|
236
|
+
}
|
|
235
237
|
});
|
|
236
238
|
}
|
|
237
239
|
}
|
|
@@ -293,7 +295,6 @@ export class IntegrationManager {
|
|
|
293
295
|
}) => {
|
|
294
296
|
const tempShipmentData = await cookTempShipment({
|
|
295
297
|
order,
|
|
296
|
-
integrationType: this.integrationType,
|
|
297
298
|
shipmentType: this.shipmentType,
|
|
298
299
|
agencyId,
|
|
299
300
|
warehouseId,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import moment from 'moment';
|
|
2
2
|
import {
|
|
3
|
-
IntegrationType,
|
|
4
3
|
ShipmentType,
|
|
5
4
|
Shipment,
|
|
6
5
|
ModifiedOrder,
|
|
@@ -14,7 +13,6 @@ type ZonaLLegada = { nombre_pais: string; id_pais: number };
|
|
|
14
13
|
|
|
15
14
|
export const cookTempShipment = async ({
|
|
16
15
|
order,
|
|
17
|
-
integrationType,
|
|
18
16
|
shipmentType,
|
|
19
17
|
agencyId,
|
|
20
18
|
warehouseId,
|
|
@@ -25,7 +23,6 @@ export const cookTempShipment = async ({
|
|
|
25
23
|
isPriority
|
|
26
24
|
}: {
|
|
27
25
|
order: ModifiedOrder;
|
|
28
|
-
integrationType: IntegrationType;
|
|
29
26
|
shipmentType: ShipmentType;
|
|
30
27
|
agencyId: number;
|
|
31
28
|
warehouseId: number;
|
|
@@ -151,7 +148,7 @@ export const cookTempShipment = async ({
|
|
|
151
148
|
|
|
152
149
|
const setBultos = (order: ModifiedOrder) => ({
|
|
153
150
|
num_bultos: warehouseId ? 0 : order.lineas.length,
|
|
154
|
-
tipo_envio:
|
|
151
|
+
tipo_envio: shipmentType,
|
|
155
152
|
codigo_envio_externo: order.codigoEnvioExterno,
|
|
156
153
|
id_almacen: warehouseId,
|
|
157
154
|
agencia_envio_integracion: order.agenciaEnvioIntegracion
|