@gls_spain/gps-common 35.6.1 → 35.6.2
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 +7 -0
- package/package.json +1 -1
- package/schemas/definitions/expeditions.js +55 -0
- package/schemas/index.js +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [35.6.2](https://github.com/GLS-Spain/gps-common/compare/v35.6.1...v35.6.2) (2024-09-27)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add validation for NXT EP ([b544274](https://github.com/GLS-Spain/gps-common/commit/b544274117d75fcd75a97a253938cce4092414e4))
|
|
7
|
+
|
|
1
8
|
## [35.6.1](https://github.com/GLS-Spain/gps-common/compare/v35.6.0...v35.6.1) (2024-09-26)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -775,6 +775,60 @@ const processExpeditionsWithCustomerRequest = () => ({
|
|
|
775
775
|
additionalProperties: true,
|
|
776
776
|
});
|
|
777
777
|
|
|
778
|
+
const processExpeditionsNXT = () => ({
|
|
779
|
+
type: 'object',
|
|
780
|
+
properties: {
|
|
781
|
+
shipmentUid: { type: 'string', format: 'uuid' },
|
|
782
|
+
lockerUid: { type: 'string', format: 'uuid' },
|
|
783
|
+
carrierParcelId: { type: 'string', trim: true },
|
|
784
|
+
carrierLockerId: { type: 'string', trim: true },
|
|
785
|
+
shipmentType: { type: 'string' },
|
|
786
|
+
shipmentStatus: { type: 'string' },
|
|
787
|
+
accessCodes: {
|
|
788
|
+
type: 'object',
|
|
789
|
+
properties: {
|
|
790
|
+
consigneeCollection: { type: 'string', trim: true }
|
|
791
|
+
},
|
|
792
|
+
required: ['consigneeCollection'],
|
|
793
|
+
additionalProperties: false
|
|
794
|
+
},
|
|
795
|
+
consignee: {
|
|
796
|
+
type: 'object',
|
|
797
|
+
properties: {
|
|
798
|
+
name: { type: 'string', trim: true },
|
|
799
|
+
email: { type: 'string', format: 'email' }
|
|
800
|
+
},
|
|
801
|
+
required: ['name', 'email'],
|
|
802
|
+
additionalProperties: false
|
|
803
|
+
},
|
|
804
|
+
events: {
|
|
805
|
+
type: 'array',
|
|
806
|
+
items: {
|
|
807
|
+
type: 'object',
|
|
808
|
+
properties: {
|
|
809
|
+
timestamp: { type: 'string', format: 'date-time' },
|
|
810
|
+
eventType: { type: 'string' } // Añade otros eventos si es necesario
|
|
811
|
+
},
|
|
812
|
+
required: ['timestamp', 'eventType'],
|
|
813
|
+
additionalProperties: false
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
},
|
|
817
|
+
required: [
|
|
818
|
+
'shipmentUid',
|
|
819
|
+
'lockerUid',
|
|
820
|
+
'carrierParcelId',
|
|
821
|
+
'carrierLockerId',
|
|
822
|
+
'shipmentType',
|
|
823
|
+
'shipmentStatus',
|
|
824
|
+
'accessCodes',
|
|
825
|
+
'consignee',
|
|
826
|
+
'events'
|
|
827
|
+
],
|
|
828
|
+
additionalProperties: false
|
|
829
|
+
});
|
|
830
|
+
|
|
831
|
+
|
|
778
832
|
const processExpeditionsDepositedFromRequest = () => ({
|
|
779
833
|
type: 'object',
|
|
780
834
|
properties: {
|
|
@@ -976,6 +1030,7 @@ module.exports = {
|
|
|
976
1030
|
processExpeditionsDepositedFromRequest,
|
|
977
1031
|
processExpeditionsDepositedToRequest,
|
|
978
1032
|
processExpeditionsWithCustomerRequest,
|
|
1033
|
+
processExpeditionsNXT,
|
|
979
1034
|
processExpeditionsResponse,
|
|
980
1035
|
receiveAllExpeditionsFromDriverRequest,
|
|
981
1036
|
receiveAllExpeditionsFromDriverResponse,
|
package/schemas/index.js
CHANGED
|
@@ -79,6 +79,7 @@ const {
|
|
|
79
79
|
scanExpeditionResponse,
|
|
80
80
|
processExpeditionsWithDriverRequest,
|
|
81
81
|
processExpeditionsWithCustomerRequest,
|
|
82
|
+
processExpeditionsNXT,
|
|
82
83
|
processExpeditionsResponse,
|
|
83
84
|
receiveAllExpeditionsFromDriverRequest,
|
|
84
85
|
receiveAllExpeditionsFromDriverResponse,
|
|
@@ -228,6 +229,8 @@ const expeditionsRedirectResponse = response(redirectExpeditionResponse(), 'expe
|
|
|
228
229
|
const expeditionsScanRequest = request(scanExpeditionRequest(), 'expeditionsScanRequest');
|
|
229
230
|
const expeditionsScanResponse = response(scanExpeditionResponse(), 'expeditionsScanResponse');
|
|
230
231
|
const expeditionsProcessWithDriverRequest = request(processExpeditionsWithCustomerRequest(), 'expeditionsProcessWithCustomerRequest');
|
|
232
|
+
const expeditionsProcessNXT = request(processExpeditionsNXT(), 'expeditionsProcessNXT');
|
|
233
|
+
|
|
231
234
|
const expeditionsProcessWithCustomerRequest = request(processExpeditionsWithDriverRequest(), 'expeditionsProcessWithDriverRequest');
|
|
232
235
|
const expeditionsProcessDepositedFromRequest = request(processExpeditionsDepositedFromRequest(), 'expeditionsProcessDepositedFromRequest');
|
|
233
236
|
const expeditionsProcessDepositedToRequest = request(processExpeditionsDepositedToRequest(), 'expeditionsProcessDepositedToRequest');
|
|
@@ -386,6 +389,7 @@ module.exports = {
|
|
|
386
389
|
expeditionsScanRequest,
|
|
387
390
|
expeditionsScanResponse,
|
|
388
391
|
expeditionsProcessWithDriverRequest,
|
|
392
|
+
expeditionsProcessNXT,
|
|
389
393
|
expeditionsProcessWithCustomerRequest,
|
|
390
394
|
expeditionsProcessDepositedFromRequest,
|
|
391
395
|
expeditionsProcessDepositedToRequest,
|