@gls_spain/gps-common 35.10.9 → 35.12.0
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 +31 -17
- package/package.json +1 -1
- package/schemas/definitions/expeditions.js +74 -73
- package/schemas/definitions/sales.js +24 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,24 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
# [35.12.0](https://github.com/GLS-Spain/gps-common/compare/v35.11.0...v35.12.0) (2025-08-07)
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
###
|
|
4
|
+
### Features
|
|
5
5
|
|
|
6
|
-
* add
|
|
7
|
-
|
|
8
|
-
## [35.10.8](https://github.com/GLS-Spain/gps-common/compare/v35.10.7...v35.10.8) (2025-06-04)
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
### Bug Fixes
|
|
12
|
-
|
|
13
|
-
* change type password to string ([9108b8c](https://github.com/GLS-Spain/gps-common/commit/9108b8cf418dda1a0aeb24b051315c2435ccb6ef))
|
|
14
|
-
|
|
15
|
-
## [35.10.7](https://github.com/GLS-Spain/gps-common/compare/v35.10.6...v35.10.7) (2025-06-01)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
### Bug Fixes
|
|
19
|
-
|
|
20
|
-
* modify schema create and update shopUser type of password ([99d0ca3](https://github.com/GLS-Spain/gps-common/commit/99d0ca30b248f557a79834ed69b42883b43f9e76))
|
|
6
|
+
* add new property zipTieCode in expeditions ([d00549b](https://github.com/GLS-Spain/gps-common/commit/d00549b2780a54638f4256e66a99d6e632f9e310))
|
|
21
7
|
|
|
8
|
+
# [35.11.0](https://github.com/GLS-Spain/gps-common/compare/v35.10.9...v35.11.0) (2025-07-25)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* add sales.discount ([5b6be5c](https://github.com/GLS-Spain/gps-common/commit/5b6be5cb5d72b8f368ecece875ad7b8213992513))
|
|
14
|
+
|
|
15
|
+
## [35.10.9](https://github.com/GLS-Spain/gps-common/compare/v35.10.8...v35.10.9) (2025-07-09)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* add propertie auth0Id for save id auth0 ([0ada289](https://github.com/GLS-Spain/gps-common/commit/0ada289955d1c543d69c6f08c97162d77995d8fb))
|
|
21
|
+
|
|
22
|
+
## [35.10.8](https://github.com/GLS-Spain/gps-common/compare/v35.10.7...v35.10.8) (2025-06-04)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* change type password to string ([9108b8c](https://github.com/GLS-Spain/gps-common/commit/9108b8cf418dda1a0aeb24b051315c2435ccb6ef))
|
|
28
|
+
|
|
29
|
+
## [35.10.7](https://github.com/GLS-Spain/gps-common/compare/v35.10.6...v35.10.7) (2025-06-01)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
* modify schema create and update shopUser type of password ([99d0ca3](https://github.com/GLS-Spain/gps-common/commit/99d0ca30b248f557a79834ed69b42883b43f9e76))
|
|
35
|
+
|
|
22
36
|
## [35.10.6](https://github.com/GLS-Spain/gps-common/compare/v35.10.5...v35.10.6) (2025-05-29)
|
|
23
37
|
|
|
24
38
|
|
package/package.json
CHANGED
|
@@ -71,13 +71,13 @@ const driver = () => ({
|
|
|
71
71
|
// additionalProperties: false,
|
|
72
72
|
// })
|
|
73
73
|
|
|
74
|
-
const shopSupplier = () =>({
|
|
74
|
+
const shopSupplier = () => ({
|
|
75
75
|
title: 'shopSupplier',
|
|
76
76
|
type: 'object',
|
|
77
|
-
properties:{
|
|
77
|
+
properties: {
|
|
78
78
|
parcelShopId: { type: 'string', trim: true },
|
|
79
|
-
networkId:{ type: 'string', trim: true },
|
|
80
|
-
supplier:{type: 'string', trim: true}
|
|
79
|
+
networkId: { type: 'string', trim: true },
|
|
80
|
+
supplier: { type: 'string', trim: true }
|
|
81
81
|
},
|
|
82
82
|
required: ['parcelShopId'],
|
|
83
83
|
additionalProperties: true,
|
|
@@ -104,7 +104,7 @@ const customerWithPod = () => ({
|
|
|
104
104
|
barcode: { type: 'string', trim: true },
|
|
105
105
|
pod: { type: 'string', contentMediaType: 'image/jpg', contentEncoding: 'base64' },
|
|
106
106
|
},
|
|
107
|
-
required: ['name', 'nif', 'pod'
|
|
107
|
+
required: ['name', 'nif', 'pod'],
|
|
108
108
|
additionalProperties: false,
|
|
109
109
|
});
|
|
110
110
|
|
|
@@ -293,24 +293,24 @@ const expedition = () => ({
|
|
|
293
293
|
},
|
|
294
294
|
notes: { type: 'string', trim: true },
|
|
295
295
|
zone: {
|
|
296
|
-
title:'zone for include or excude scan QR',
|
|
296
|
+
title: 'zone for include or excude scan QR',
|
|
297
297
|
type: 'object',
|
|
298
|
-
properties:{
|
|
299
|
-
country:{type:'string', trim: true},
|
|
298
|
+
properties: {
|
|
299
|
+
country: { type: 'string', trim: true },
|
|
300
300
|
postalCodes: {
|
|
301
|
-
title:'excludes or includes CP',
|
|
302
|
-
type:'object',
|
|
303
|
-
properties:{
|
|
304
|
-
exclude: {
|
|
305
|
-
type: 'array',
|
|
306
|
-
items: { type: 'array', items:{type: 'string',trim:true}, minItems:2, maxItems:2}
|
|
307
|
-
|
|
308
|
-
include: {
|
|
309
|
-
type: 'array',
|
|
310
|
-
items: { type: 'array', items:{type: 'string',trim:true}, minItems:2, maxItems:2}
|
|
311
|
-
|
|
301
|
+
title: 'excludes or includes CP',
|
|
302
|
+
type: 'object',
|
|
303
|
+
properties: {
|
|
304
|
+
exclude: {
|
|
305
|
+
type: 'array',
|
|
306
|
+
items: { type: 'array', items: { type: 'string', trim: true }, minItems: 2, maxItems: 2 },
|
|
307
|
+
},
|
|
308
|
+
include: {
|
|
309
|
+
type: 'array',
|
|
310
|
+
items: { type: 'array', items: { type: 'string', trim: true }, minItems: 2, maxItems: 2 },
|
|
311
|
+
},
|
|
312
312
|
},
|
|
313
|
-
additionalProperties:false
|
|
313
|
+
additionalProperties: false
|
|
314
314
|
}
|
|
315
315
|
},
|
|
316
316
|
required: ['country', 'postalCodes'],
|
|
@@ -676,9 +676,9 @@ const scanExpeditionRequest = () => ({
|
|
|
676
676
|
{
|
|
677
677
|
title: 'barcode',
|
|
678
678
|
type: 'object',
|
|
679
|
-
properties: {
|
|
679
|
+
properties: {
|
|
680
680
|
barcode: { type: 'string', trim: true },
|
|
681
|
-
type: { type: 'string', enum: ['delivery', 'pickup']}
|
|
681
|
+
type: { type: 'string', enum: ['delivery', 'pickup'] }
|
|
682
682
|
},
|
|
683
683
|
required: ['barcode'],
|
|
684
684
|
additionalProperties: false,
|
|
@@ -686,9 +686,9 @@ const scanExpeditionRequest = () => ({
|
|
|
686
686
|
{
|
|
687
687
|
title: 'QR code',
|
|
688
688
|
type: 'object',
|
|
689
|
-
properties: {
|
|
689
|
+
properties: {
|
|
690
690
|
qrCode: { type: 'string', trim: true },
|
|
691
|
-
type: { type: 'string', enum: ['delivery', 'pickup']}
|
|
691
|
+
type: { type: 'string', enum: ['delivery', 'pickup'] }
|
|
692
692
|
},
|
|
693
693
|
required: ['qrCode'],
|
|
694
694
|
additionalProperties: false,
|
|
@@ -782,59 +782,59 @@ const processExpeditionsWithCustomerRequest = () => ({
|
|
|
782
782
|
additionalProperties: true,
|
|
783
783
|
});
|
|
784
784
|
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
785
|
+
const processExpeditionsNXT = () => ({
|
|
786
|
+
type: 'object',
|
|
787
|
+
properties: {
|
|
788
|
+
shipmentUid: { type: 'string', format: 'uuid' },
|
|
789
|
+
lockerUid: { type: 'string', format: 'uuid' },
|
|
790
|
+
carrierParcelId: { type: 'string', trim: true },
|
|
791
|
+
carrierLockerId: { type: 'string', trim: true },
|
|
792
|
+
shipmentType: { type: 'string' },
|
|
793
|
+
shipmentStatus: { type: 'string' },
|
|
794
|
+
accessCodes: {
|
|
795
|
+
type: 'object',
|
|
796
|
+
properties: {
|
|
797
|
+
consigneeCollection: { type: 'string', trim: true }
|
|
798
|
+
},
|
|
799
|
+
required: ['consigneeCollection'],
|
|
800
|
+
additionalProperties: false
|
|
801
|
+
},
|
|
802
|
+
consignee: {
|
|
803
|
+
type: 'object',
|
|
804
|
+
properties: {
|
|
805
|
+
name: { type: 'string', trim: true },
|
|
806
|
+
email: { type: 'string', format: 'email' }
|
|
801
807
|
},
|
|
802
|
-
|
|
808
|
+
required: ['name', 'email'],
|
|
809
|
+
additionalProperties: false
|
|
810
|
+
},
|
|
811
|
+
events: {
|
|
812
|
+
type: 'array',
|
|
813
|
+
items: {
|
|
803
814
|
type: 'object',
|
|
804
815
|
properties: {
|
|
805
|
-
|
|
806
|
-
|
|
816
|
+
timestamp: { type: 'string', format: 'date-time' },
|
|
817
|
+
eventType: { type: 'string' } // Añade otros eventos si es necesario
|
|
807
818
|
},
|
|
808
|
-
required: ['
|
|
819
|
+
required: ['timestamp', 'eventType'],
|
|
809
820
|
additionalProperties: false
|
|
810
|
-
},
|
|
811
|
-
events: {
|
|
812
|
-
type: 'array',
|
|
813
|
-
items: {
|
|
814
|
-
type: 'object',
|
|
815
|
-
properties: {
|
|
816
|
-
timestamp: { type: 'string', format: 'date-time' },
|
|
817
|
-
eventType: { type: 'string' } // Añade otros eventos si es necesario
|
|
818
|
-
},
|
|
819
|
-
required: ['timestamp', 'eventType'],
|
|
820
|
-
additionalProperties: false
|
|
821
|
-
}
|
|
822
821
|
}
|
|
823
|
-
}
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
822
|
+
}
|
|
823
|
+
},
|
|
824
|
+
required: [
|
|
825
|
+
'shipmentUid',
|
|
826
|
+
'lockerUid',
|
|
827
|
+
'carrierParcelId',
|
|
828
|
+
'carrierLockerId',
|
|
829
|
+
'shipmentType',
|
|
830
|
+
'shipmentStatus',
|
|
831
|
+
'accessCodes',
|
|
832
|
+
'consignee',
|
|
833
|
+
'events'
|
|
834
|
+
],
|
|
835
|
+
additionalProperties: false
|
|
836
|
+
});
|
|
837
|
+
|
|
838
838
|
|
|
839
839
|
const processExpeditionsDepositedFromRequest = () => ({
|
|
840
840
|
type: 'object',
|
|
@@ -842,6 +842,7 @@ const processExpeditionsDepositedFromRequest = () => ({
|
|
|
842
842
|
expeditions: omit(findByIds(), 'title'),
|
|
843
843
|
driver: driver(),
|
|
844
844
|
QRconfirmed: { type: 'boolean' },
|
|
845
|
+
zipTieCode: { type: 'string' },
|
|
845
846
|
},
|
|
846
847
|
required: ['expeditions', 'driver', 'QRconfirmed'],
|
|
847
848
|
additionalProperties: false,
|
|
@@ -1002,7 +1003,7 @@ const updateExpeditionDerivationRequest = () => ({
|
|
|
1002
1003
|
const reminderResponse = () => ({
|
|
1003
1004
|
title: 'expeditions',
|
|
1004
1005
|
type: 'object',
|
|
1005
|
-
properties:{
|
|
1006
|
+
properties: {
|
|
1006
1007
|
expeditions: {
|
|
1007
1008
|
type: 'array',
|
|
1008
1009
|
items: {
|
|
@@ -1022,7 +1023,7 @@ const reminderResponse = () => ({
|
|
|
1022
1023
|
const notNotificationResponse = () => ({
|
|
1023
1024
|
title: 'expeditions',
|
|
1024
1025
|
type: 'object',
|
|
1025
|
-
properties:{
|
|
1026
|
+
properties: {
|
|
1026
1027
|
expeditions: {
|
|
1027
1028
|
type: 'array',
|
|
1028
1029
|
items: {
|
|
@@ -20,6 +20,18 @@ const { saleSize, salesSettings } = require('./defaults');
|
|
|
20
20
|
const { network, objectWithNetworkId } = require('./networks');
|
|
21
21
|
const { shop, objectWithShopId } = require('./shops');
|
|
22
22
|
|
|
23
|
+
const parcelShopData = () => ({
|
|
24
|
+
type: 'object',
|
|
25
|
+
properties: {
|
|
26
|
+
_id: uuid(),
|
|
27
|
+
email: { type: 'string' },
|
|
28
|
+
name: { type: 'string' },
|
|
29
|
+
phone: { type: 'string' },
|
|
30
|
+
postalCode: { type: 'string' },
|
|
31
|
+
},
|
|
32
|
+
required: ['_id', 'email', 'name', 'phone', 'postalCode'],
|
|
33
|
+
});
|
|
34
|
+
|
|
23
35
|
const sale = () => ({
|
|
24
36
|
title: 'sale',
|
|
25
37
|
type: 'object',
|
|
@@ -138,6 +150,17 @@ const sale = () => ({
|
|
|
138
150
|
},
|
|
139
151
|
typeSale: { type: 'string', enum: ['customer', 'parcelShop', 'parcelShopPremium'] },
|
|
140
152
|
typeService: { type: 'string', enum: ['parcel', 'traveller'] },
|
|
153
|
+
// 2025-07-25 JL descuentos (campañas/carrefour)
|
|
154
|
+
discount: {
|
|
155
|
+
type: 'object',
|
|
156
|
+
properties: {
|
|
157
|
+
type: { type: 'string' },
|
|
158
|
+
code: { type: 'string' },
|
|
159
|
+
price: { type: 'integer', minimum: 0 },
|
|
160
|
+
},
|
|
161
|
+
required: ['type', 'code', 'price'],
|
|
162
|
+
additionalProperties: false,
|
|
163
|
+
},
|
|
141
164
|
},
|
|
142
165
|
required: [
|
|
143
166
|
'_id',
|
|
@@ -173,6 +196,7 @@ const createSaleRequest = () =>
|
|
|
173
196
|
'sender',
|
|
174
197
|
'price',
|
|
175
198
|
'isS2S',
|
|
199
|
+
'discount',
|
|
176
200
|
]),
|
|
177
201
|
},
|
|
178
202
|
required: ['size', 'destination', 'sender'],
|
|
@@ -266,19 +290,6 @@ const downloadSaleLabelResponse = () => ({
|
|
|
266
290
|
additionalProperties: false,
|
|
267
291
|
});
|
|
268
292
|
|
|
269
|
-
const parcelShopData = () => ({
|
|
270
|
-
type: 'object',
|
|
271
|
-
properties: {
|
|
272
|
-
_id: uuid(),
|
|
273
|
-
email: { type: 'string' },
|
|
274
|
-
name:{ type: 'string' },
|
|
275
|
-
phone:{ type: 'string' },
|
|
276
|
-
postalCode:{ type: 'string' },
|
|
277
|
-
|
|
278
|
-
},
|
|
279
|
-
required: ['_id', 'email','name', 'phone','postalCode'],
|
|
280
|
-
});
|
|
281
|
-
|
|
282
293
|
const paymentRequest = () => ({
|
|
283
294
|
type: 'object',
|
|
284
295
|
properties: {
|