cardus 0.0.111 → 0.0.113
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 +2 -5
- package/index.ts +2 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -66,7 +66,6 @@ class IntegrationManager {
|
|
|
66
66
|
: addressId
|
|
67
67
|
? yield addressesService.getAddress(addressId, idUsuario)
|
|
68
68
|
: null;
|
|
69
|
-
let sellerAddressForContents = defaultSellerAddress;
|
|
70
69
|
const userIntegrationConfiguration = yield integrationsService.getDefaultIntegrationsData({
|
|
71
70
|
id_usuario: idUsuario,
|
|
72
71
|
id_integracion: this.integrationType
|
|
@@ -204,9 +203,6 @@ class IntegrationManager {
|
|
|
204
203
|
regularExecutionTime: 8000, // ms
|
|
205
204
|
initialBatchQuantity: sequentialInsertion ? 1 : 5 // si la insercion no es secuencial, de cinco en cinco
|
|
206
205
|
}).upload();
|
|
207
|
-
if (!sellerAddressForContents) {
|
|
208
|
-
throw new Error('Seller address could not be resolved');
|
|
209
|
-
}
|
|
210
206
|
const arrayPackages = [...this.dataToInsert.lines.values()].flat().flat();
|
|
211
207
|
yield Promise.allSettled([
|
|
212
208
|
integrationsService.insertTempShipmentMultipleLines(arrayPackages),
|
|
@@ -218,7 +214,8 @@ class IntegrationManager {
|
|
|
218
214
|
const successfullShipments = insertOrdersResult
|
|
219
215
|
.filter(Boolean)
|
|
220
216
|
.filter((each) => each.status === 'fulfilled')
|
|
221
|
-
.map((each) => each.value)
|
|
217
|
+
.map((each) => each.value)
|
|
218
|
+
.filter(Boolean);
|
|
222
219
|
return {
|
|
223
220
|
filteredOrders,
|
|
224
221
|
insertedTempShipments: successfullShipments,
|
package/index.ts
CHANGED
|
@@ -117,7 +117,6 @@ export class IntegrationManager {
|
|
|
117
117
|
: addressId
|
|
118
118
|
? await addressesService.getAddress(addressId, idUsuario)
|
|
119
119
|
: null;
|
|
120
|
-
let sellerAddressForContents = defaultSellerAddress;
|
|
121
120
|
|
|
122
121
|
const userIntegrationConfiguration =
|
|
123
122
|
await integrationsService.getDefaultIntegrationsData({
|
|
@@ -324,10 +323,6 @@ export class IntegrationManager {
|
|
|
324
323
|
initialBatchQuantity: sequentialInsertion ? 1 : 5 // si la insercion no es secuencial, de cinco en cinco
|
|
325
324
|
}).upload();
|
|
326
325
|
|
|
327
|
-
if (!sellerAddressForContents) {
|
|
328
|
-
throw new Error('Seller address could not be resolved');
|
|
329
|
-
}
|
|
330
|
-
|
|
331
326
|
const arrayPackages = [...this.dataToInsert.lines.values()].flat().flat();
|
|
332
327
|
|
|
333
328
|
await Promise.allSettled([
|
|
@@ -349,7 +344,8 @@ export class IntegrationManager {
|
|
|
349
344
|
const successfullShipments = insertOrdersResult
|
|
350
345
|
.filter(Boolean)
|
|
351
346
|
.filter((each) => each.status === 'fulfilled')
|
|
352
|
-
.map((each) => each.value)
|
|
347
|
+
.map((each) => each.value)
|
|
348
|
+
.filter(Boolean) as (ModifiedOrder & {
|
|
353
349
|
idEnvioTemporal: number;
|
|
354
350
|
agencyId: number;
|
|
355
351
|
})[];
|