@gls_spain/gps-common 34.31.2 → 34.31.4

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,17 +1,31 @@
1
- ## [34.31.2](https://github.com/GLS-Spain/gps-common/compare/v34.31.1...v34.31.2) (2023-09-11)
1
+ ## [34.31.4](https://github.com/GLS-Spain/gps-common/compare/v34.31.3...v34.31.4) (2023-10-03)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * undo add required fields to schema ([7270d18](https://github.com/GLS-Spain/gps-common/commit/7270d18d1859b080071329b43a4b0752caaa52a9))
7
-
8
- ## [34.31.1](https://github.com/GLS-Spain/gps-common/compare/v34.31.0...v34.31.1) (2023-09-11)
9
-
10
-
11
- ### Bug Fixes
12
-
13
- * add shopproviders to process scan ([8a9c45d](https://github.com/GLS-Spain/gps-common/commit/8a9c45d017a9ccc513832bf6109050d1ebd07b4a))
6
+ * fix validation ([89acbf3](https://github.com/GLS-Spain/gps-common/commit/89acbf3899efdbd9b4f8daa1bbd49acfd9d87dac))
14
7
 
8
+ ## [34.31.3](https://github.com/GLS-Spain/gps-common/compare/v34.31.2...v34.31.3) (2023-10-03)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * add validations to supplier events ([04f6953](https://github.com/GLS-Spain/gps-common/commit/04f6953a4208f7d53d05545a5eeb2d7b60965d96))
14
+
15
+ ## [34.31.2](https://github.com/GLS-Spain/gps-common/compare/v34.31.1...v34.31.2) (2023-09-11)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * undo add required fields to schema ([7270d18](https://github.com/GLS-Spain/gps-common/commit/7270d18d1859b080071329b43a4b0752caaa52a9))
21
+
22
+ ## [34.31.1](https://github.com/GLS-Spain/gps-common/compare/v34.31.0...v34.31.1) (2023-09-11)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * add shopproviders to process scan ([8a9c45d](https://github.com/GLS-Spain/gps-common/commit/8a9c45d017a9ccc513832bf6109050d1ebd07b4a))
28
+
15
29
  # [34.31.0](https://github.com/GLS-Spain/gps-common/compare/v34.30.5...v34.31.0) (2023-07-31)
16
30
 
17
31
 
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.4",
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',
@@ -722,6 +733,28 @@ const processExpeditionsWithDriverRequest = () => ({
722
733
  shop: shopProvider(),
723
734
  },
724
735
  required: ['expeditions', 'driver'],
736
+ additionalProperties: true,
737
+ });
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'],
725
758
  additionalProperties: false,
726
759
  });
727
760
 
@@ -733,7 +766,7 @@ const processExpeditionsWithCustomerRequest = () => ({
733
766
  shop: shopProvider(),
734
767
  },
735
768
  required: ['expeditions', 'customer'],
736
- additionalProperties: false,
769
+ additionalProperties: true,
737
770
  });
738
771
 
739
772
  const processExpeditionsDepositedFromRequest = () => ({
@@ -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,