@gls_spain/gps-common 35.19.3 → 35.19.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 +9 -0
- package/package.json +1 -1
- package/schemas/definitions/shops.js +14 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## [35.19.4](https://github.com/GLS-Spain/gps-common/compare/v35.19.3...v35.19.4) (2026-10-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* channeling agency code now is type number ([9d09898](https://github.com/GLS-Spain/gps-common/commit/9d09898d7abef0c1658f2edb04e532e1de825447))
|
|
7
|
+
* channelingagencycode to type integer instaed number ([41cdd9a](https://github.com/GLS-Spain/gps-common/commit/41cdd9af0bddf7187ce2a17b2f6e0db64785e9de))
|
|
8
|
+
* check channelingAgencyCode is not required, can be null, integer and can be not an empty string ([79d9bad](https://github.com/GLS-Spain/gps-common/commit/79d9bad7e8efccd259d44386bfde3f95fa3d478c))
|
|
9
|
+
|
|
1
10
|
## [35.19.3](https://github.com/GLS-Spain/gps-common/compare/v35.19.2...v35.19.3) (2026-10-14)
|
|
2
11
|
|
|
3
12
|
|
package/package.json
CHANGED
|
@@ -246,7 +246,7 @@ const shop = () => ({
|
|
|
246
246
|
squareCode: { type: ['integer', 'string'], minimum: 0, maximum: 32767, description: 'agency code' },
|
|
247
247
|
clientCode: { type: ['integer', 'string'], description: 'client code' },
|
|
248
248
|
// 2024-07-22 JJC campo de agencia de canalización
|
|
249
|
-
channelingAgencyCode: { type: ['integer', '
|
|
249
|
+
channelingAgencyCode: { type: ['integer', 'null'], minimum: 0, maximum: 32767, description: 'Channeling Agency Code' },
|
|
250
250
|
// Volume capacity 07/11/2024
|
|
251
251
|
capacity: { type: 'string' },
|
|
252
252
|
// NXT integration
|
|
@@ -429,6 +429,15 @@ const findShopsNetworkAdminRequest = () =>
|
|
|
429
429
|
|
|
430
430
|
const findShopsResponse = () => findResponse(shop());
|
|
431
431
|
|
|
432
|
+
// En update, los strings obligatorios no pueden llegar vacíos: trim convierte " " en "" y se sobrescribiría el valor en BD.
|
|
433
|
+
// Se usa pattern en vez de minLength porque Ajv valida minLength antes de que trim modifique el dato.
|
|
434
|
+
const nonEmpty = () => ({ pattern: '\\S' });
|
|
435
|
+
|
|
436
|
+
const updateShopAddress = () =>
|
|
437
|
+
mergeSchemas(addressWithRequiredLocation(), {
|
|
438
|
+
properties: { street: nonEmpty(), postalCode: nonEmpty(), locality: nonEmpty(), country: nonEmpty() },
|
|
439
|
+
});
|
|
440
|
+
|
|
432
441
|
const updateShopRequest = () =>
|
|
433
442
|
updateRequest(
|
|
434
443
|
findById(),
|
|
@@ -461,6 +470,10 @@ const updateShopRequest = () =>
|
|
|
461
470
|
],
|
|
462
471
|
['fiscal', 'activity', 'notes', 'derivationSettings', 'expirationSettings'],
|
|
463
472
|
),
|
|
473
|
+
name: mergeSchemas(shop().properties.name, nonEmpty()),
|
|
474
|
+
address: updateShopAddress(),
|
|
475
|
+
squareCode: mergeSchemas(shop().properties.squareCode, nonEmpty()),
|
|
476
|
+
clientCode: mergeSchemas(shop().properties.clientCode, nonEmpty()),
|
|
464
477
|
},
|
|
465
478
|
minProperties: 0,
|
|
466
479
|
additionalProperties: false,
|