cardus 0.0.78 → 0.0.80

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
@@ -117,11 +117,15 @@ class IntegrationManager {
117
117
  const parsedOrder = yield modificarOrdenOriginal({
118
118
  originalOrder: order
119
119
  });
120
+ let direccionSalida = null;
121
+ if (parsedOrder.direccionSalidaId) {
122
+ direccionSalida = yield addressesService.getAddress(addressId, idUsuario);
123
+ }
120
124
  const idEnvioTemporal = yield this.insertTempShipment({
121
125
  order: parsedOrder,
122
126
  agencyId,
123
127
  warehouseId,
124
- sellerAddress,
128
+ sellerAddress: direccionSalida !== null && direccionSalida !== void 0 ? direccionSalida : sellerAddress,
125
129
  idUsuario,
126
130
  isPriority: isPriorityByDefault
127
131
  });
package/index.ts CHANGED
@@ -152,12 +152,19 @@ export class IntegrationManager {
152
152
  const parsedOrder = await modificarOrdenOriginal({
153
153
  originalOrder: order
154
154
  });
155
+ let direccionSalida = null;
156
+ if (parsedOrder.direccionSalidaId) {
157
+ direccionSalida = await addressesService.getAddress(
158
+ addressId,
159
+ idUsuario
160
+ );
161
+ }
155
162
 
156
163
  const idEnvioTemporal = await this.insertTempShipment({
157
164
  order: parsedOrder,
158
165
  agencyId,
159
166
  warehouseId,
160
- sellerAddress,
167
+ sellerAddress: direccionSalida ?? sellerAddress,
161
168
  idUsuario,
162
169
  isPriority: isPriorityByDefault
163
170
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cardus",
3
- "version": "0.0.78",
3
+ "version": "0.0.80",
4
4
  "description": "an integration manager",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
package/types/index.ts CHANGED
@@ -126,6 +126,7 @@ export type ModifiedOrder = {
126
126
  numeroIdentificacionLLegada?: string | null;
127
127
  observacionesLLegada?: string;
128
128
  observaciones?: string;
129
+ direccionSalidaId?: number | null;
129
130
  };
130
131
 
131
132
  export interface ModifiedOrderExtended extends ModifiedOrder {