@gls_spain/gps-common 34.31.2 → 34.31.3

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [34.31.3](https://github.com/GLS-Spain/gps-common/compare/v34.31.2...v34.31.3) (2023-10-03)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add validations to supplier events ([04f6953](https://github.com/GLS-Spain/gps-common/commit/04f6953a4208f7d53d05545a5eeb2d7b60965d96))
7
+
1
8
  ## [34.31.2](https://github.com/GLS-Spain/gps-common/compare/v34.31.1...v34.31.2) (2023-09-11)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gls_spain/gps-common",
3
- "version": "34.31.2",
3
+ "version": "34.31.3",
4
4
  "description": "Errors, schemas and documentation for the Parcel Shops project",
5
5
  "keywords": [
6
6
  "gls"
@@ -70,6 +70,17 @@ const shopProvider = () =>({
70
70
  additionalProperties: false,
71
71
  })
72
72
 
73
+ const shopSupplier = () =>({
74
+ title: 'shopSupplier',
75
+ type: 'object',
76
+ properties:{
77
+ parcelShopId: { type: 'number' },
78
+ networkId:{ type: 'string', trim: true },
79
+ },
80
+ required: ['parcelShopId', 'networkId'],
81
+ additionalProperties: false,
82
+ })
83
+
73
84
  const customer = () => ({
74
85
  title: 'customer',
75
86
  type: 'object',
@@ -725,6 +736,28 @@ const processExpeditionsWithDriverRequest = () => ({
725
736
  additionalProperties: false,
726
737
  });
727
738
 
739
+ const processExpeditionsWithDriverRequestSupplier = () => ({
740
+ type: 'object',
741
+ properties: {
742
+ expeditions: omit(findByIds(), 'title'),
743
+ driver: driver(),
744
+ shop: shopSupplier(),
745
+ },
746
+ required: ['expeditions', 'driver'],
747
+ additionalProperties: false,
748
+ });
749
+
750
+ const processExpeditionsWithCustomerRequestSupplier = () => ({
751
+ type: 'object',
752
+ properties: {
753
+ expeditions: omit(findByIds(), 'title'),
754
+ driver: driver(),
755
+ shop: shopSupplier(),
756
+ },
757
+ required: ['expeditions', 'driver'],
758
+ additionalProperties: false,
759
+ });
760
+
728
761
  const processExpeditionsWithCustomerRequest = () => ({
729
762
  type: 'object',
730
763
  properties: {
@@ -922,6 +955,8 @@ module.exports = {
922
955
  scanExpeditionRequest,
923
956
  scanExpeditionResponse,
924
957
  processExpeditionsWithDriverRequest,
958
+ processExpeditionsWithCustomerRequestSupplier,
959
+ processExpeditionsWithDriverRequestSupplier,
925
960
  processExpeditionsDepositedFromRequest,
926
961
  processExpeditionsWithCustomerRequest,
927
962
  processExpeditionsResponse,
package/schemas/index.js CHANGED
@@ -73,6 +73,8 @@ const {
73
73
  scanExpeditionRequest,
74
74
  scanExpeditionResponse,
75
75
  processExpeditionsWithDriverRequest,
76
+ processExpeditionsWithCustomerRequestSupplier,
77
+ processExpeditionsWithDriverRequestSupplier,
76
78
  processExpeditionsWithCustomerRequest,
77
79
  processExpeditionsResponse,
78
80
  receiveAllExpeditionsFromDriverRequest,
@@ -220,6 +222,10 @@ const expeditionsScanRequest = request(scanExpeditionRequest(), 'expeditionsScan
220
222
  const expeditionsScanResponse = response(scanExpeditionResponse(), 'expeditionsScanResponse');
221
223
  const expeditionsProcessWithDriverRequest = request(processExpeditionsWithCustomerRequest(), 'expeditionsProcessWithCustomerRequest');
222
224
  const expeditionsProcessWithCustomerRequest = request(processExpeditionsWithDriverRequest(), 'expeditionsProcessWithDriverRequest');
225
+
226
+ const expeditionsProcessWithCustomerRequestSupplier = request(processExpeditionsWithCustomerRequestSupplier(), 'expeditionsProcessWithCustomerRequestSupplier');
227
+ const expeditionsProcessWithDriverRequestSupplier = request(processExpeditionsWithDriverRequestSupplier(), 'expeditionsProcessWithDriverRequestSupplier');
228
+
223
229
  const expeditionsProcessDepositedFromRequest = request(processExpeditionsDepositedFromRequest(), 'expeditionsProcessDepositedFromRequest');
224
230
  const expeditionsProcessResponse = response(processExpeditionsResponse(), 'expeditionsProcessResponse');
225
231
  const expeditionsReceiveAllFromDriverRequest = request(receiveAllExpeditionsFromDriverRequest(), 'expeditionsReceiveAllFromDriverRequest');
@@ -364,6 +370,8 @@ module.exports = {
364
370
  expeditionsScanResponse,
365
371
  expeditionsProcessWithDriverRequest,
366
372
  expeditionsProcessWithCustomerRequest,
373
+ expeditionsProcessWithCustomerRequestSupplier,
374
+ expeditionsProcessWithDriverRequestSupplier,
367
375
  expeditionsProcessDepositedFromRequest,
368
376
  expeditionsProcessResponse,
369
377
  expeditionsReceiveAllFromDriverRequest,