cardus 0.0.25 → 0.0.26

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 CHANGED
@@ -91,7 +91,7 @@ class IntegrationManager {
91
91
  this.type = params.type;
92
92
  this.executionManager = params.executionManager;
93
93
  this.findNextPickupDate = params.findNextPickupDate;
94
- this.getAgencyIdFromTempShipment = params.getAgencyIdFromTempShipment;
94
+ this.getAgencyIdForTempShipment = params.getAgencyIdForTempShipment;
95
95
  }
96
96
  insertTempShipments(_a) {
97
97
  return __awaiter(this, arguments, void 0, function* ({ payload: { idUsuario, agencyId, addressId, warehouseId, group }, fetchAllOrders, crearBulto, modificarOrdenOriginal }) {
@@ -118,8 +118,9 @@ class IntegrationManager {
118
118
  throw new Error('Envio Duplicado');
119
119
  return this.insertOrder({
120
120
  order: parsedOrder,
121
- agencyId: yield this.getAgencyIdFromTempShipment({
121
+ agencyId: yield this.getAgencyIdForTempShipment({
122
122
  defaultAgencyId: agencyId,
123
+ userId: idUsuario,
123
124
  integrationId: this.shipmentType,
124
125
  tempShipmentData: parsedOrder
125
126
  }),
package/index.ts CHANGED
@@ -37,7 +37,7 @@ export class IntegrationManager {
37
37
  executionManager: ExecutionManager;
38
38
  findNextPickupDate: FindNextPickupDate;
39
39
  shipmentType: ShipmentType;
40
- getAgencyIdFromTempShipment: GetAgencyIdForTempShipment;
40
+ getAgencyIdForTempShipment: GetAgencyIdForTempShipment;
41
41
 
42
42
  constructor(params: {
43
43
  integrationsService: IntegrationsService;
@@ -49,7 +49,7 @@ export class IntegrationManager {
49
49
  shipmentType: ShipmentType;
50
50
  executionManager: ExecutionManager;
51
51
  findNextPickupDate: FindNextPickupDate;
52
- getAgencyIdFromTempShipment: GetAgencyIdForTempShipment;
52
+ getAgencyIdForTempShipment: GetAgencyIdForTempShipment;
53
53
  }) {
54
54
  this.services = {
55
55
  integrationsService: params.integrationsService,
@@ -63,7 +63,7 @@ export class IntegrationManager {
63
63
  this.type = params.type;
64
64
  this.executionManager = params.executionManager;
65
65
  this.findNextPickupDate = params.findNextPickupDate;
66
- this.getAgencyIdFromTempShipment = params.getAgencyIdFromTempShipment;
66
+ this.getAgencyIdForTempShipment = params.getAgencyIdForTempShipment;
67
67
  }
68
68
 
69
69
  async insertTempShipments({
@@ -104,8 +104,9 @@ export class IntegrationManager {
104
104
 
105
105
  return this.insertOrder({
106
106
  order: parsedOrder,
107
- agencyId: await this.getAgencyIdFromTempShipment({
107
+ agencyId: await this.getAgencyIdForTempShipment({
108
108
  defaultAgencyId: agencyId,
109
+ userId: idUsuario,
109
110
  integrationId: this.shipmentType,
110
111
  tempShipmentData: parsedOrder
111
112
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cardus",
3
- "version": "0.0.25",
3
+ "version": "0.0.26",
4
4
  "description": "an integration manager",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
package/types/index.ts CHANGED
@@ -283,6 +283,7 @@ type ExecutionManagerUploadReturn = {
283
283
 
284
284
  export type GetAgencyIdForTempShipment = (params: {
285
285
  defaultAgencyId: number;
286
+ userId: number;
286
287
  integrationId: number;
287
288
  tempShipmentData: ModifiedOrder;
288
289
  }) => Promise<number>;