@gls_spain/gps-common 35.10.8 → 35.11.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 CHANGED
@@ -1,17 +1,31 @@
1
- ## [35.10.8](https://github.com/GLS-Spain/gps-common/compare/v35.10.7...v35.10.8) (2025-06-04)
1
+ # [35.11.0](https://github.com/GLS-Spain/gps-common/compare/v35.10.9...v35.11.0) (2025-07-25)
2
2
 
3
3
 
4
- ### Bug Fixes
4
+ ### Features
5
5
 
6
- * change type password to string ([9108b8c](https://github.com/GLS-Spain/gps-common/commit/9108b8cf418dda1a0aeb24b051315c2435ccb6ef))
7
-
8
- ## [35.10.7](https://github.com/GLS-Spain/gps-common/compare/v35.10.6...v35.10.7) (2025-06-01)
9
-
10
-
11
- ### Bug Fixes
12
-
13
- * modify schema create and update shopUser type of password ([99d0ca3](https://github.com/GLS-Spain/gps-common/commit/99d0ca30b248f557a79834ed69b42883b43f9e76))
6
+ * add sales.discount ([5b6be5c](https://github.com/GLS-Spain/gps-common/commit/5b6be5cb5d72b8f368ecece875ad7b8213992513))
14
7
 
8
+ ## [35.10.9](https://github.com/GLS-Spain/gps-common/compare/v35.10.8...v35.10.9) (2025-07-09)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * add propertie auth0Id for save id auth0 ([0ada289](https://github.com/GLS-Spain/gps-common/commit/0ada289955d1c543d69c6f08c97162d77995d8fb))
14
+
15
+ ## [35.10.8](https://github.com/GLS-Spain/gps-common/compare/v35.10.7...v35.10.8) (2025-06-04)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * change type password to string ([9108b8c](https://github.com/GLS-Spain/gps-common/commit/9108b8cf418dda1a0aeb24b051315c2435ccb6ef))
21
+
22
+ ## [35.10.7](https://github.com/GLS-Spain/gps-common/compare/v35.10.6...v35.10.7) (2025-06-01)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * modify schema create and update shopUser type of password ([99d0ca3](https://github.com/GLS-Spain/gps-common/commit/99d0ca30b248f557a79834ed69b42883b43f9e76))
28
+
15
29
  ## [35.10.6](https://github.com/GLS-Spain/gps-common/compare/v35.10.5...v35.10.6) (2025-05-29)
16
30
 
17
31
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gls_spain/gps-common",
3
- "version": "35.10.8",
3
+ "version": "35.11.0",
4
4
  "description": "Errors, schemas and documentation for the Parcel Shops project",
5
5
  "keywords": [
6
6
  "gls"
@@ -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: {
@@ -215,6 +215,7 @@ const createShopUserRequest = () =>
215
215
  ...pickProperties(shopUser(), ['_id', 'createdAt', 'username', 'loginEnabled', 'name', 'emails', 'phones', 'nif', 'address']),
216
216
  password: { type: 'string', trim: true },
217
217
  passwordExpired: { type: 'string', trim: true },
218
+ auth0Id: {type:'string', trim: true},
218
219
  },
219
220
  required: ['username', 'loginEnabled', 'name', 'password'],
220
221
  additionalProperties: false,
@@ -262,6 +263,7 @@ const updateShopUserRequest = () =>
262
263
  ...pickProperties(shopUser(), ['loginEnabled', 'name', 'emails', 'phones'], ['nif', 'address']),
263
264
  password: { type: 'string',trim: true },
264
265
  passwordExpired: { type: 'string',trim: true },
266
+ auth0Id: {type:'string', trim: true},
265
267
  },
266
268
  minProperties: 1,
267
269
  additionalProperties: false,