@gls_spain/gps-common 35.3.1 → 35.4.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,10 +1,29 @@
1
- ## [35.3.1](https://github.com/GLS-Spain/gps-common/compare/v35.3.0...v35.3.1) (2024-07-23)
1
+ # [35.4.0](https://github.com/GLS-Spain/gps-common/compare/v35.3.2...v35.4.0) (2024-08-05)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * shop schema bugfix ([56fdf1a](https://github.com/GLS-Spain/gps-common/commit/56fdf1ab2eb24d3c581ed6f46b120d3e5f9e989a))
6
+ * onWorking on model international partner key ([95f53a9](https://github.com/GLS-Spain/gps-common/commit/95f53a97429f5f5d66bf025b45a08407f52f7775))
7
7
 
8
+
9
+ ### Features
10
+
11
+ * add international partner key to search by international id ([d612923](https://github.com/GLS-Spain/gps-common/commit/d612923be592da7900250beb528ddd06341bee39))
12
+
13
+ ## [35.3.2](https://github.com/GLS-Spain/gps-common/compare/v35.3.1...v35.3.2) (2024-07-24)
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * test ([85b7070](https://github.com/GLS-Spain/gps-common/commit/85b7070c7bb3561f2660c2646c9cfaab8b1b19c3))
19
+
20
+ ## [35.3.1](https://github.com/GLS-Spain/gps-common/compare/v35.3.0...v35.3.1) (2024-07-23)
21
+
22
+
23
+ ### Bug Fixes
24
+
25
+ * shop schema bugfix ([56fdf1a](https://github.com/GLS-Spain/gps-common/commit/56fdf1ab2eb24d3c581ed6f46b120d3e5f9e989a))
26
+
8
27
  # [35.3.0](https://github.com/GLS-Spain/gps-common/compare/v35.2.1...v35.3.0) (2024-07-22)
9
28
 
10
29
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gls_spain/gps-common",
3
- "version": "35.3.1",
3
+ "version": "35.4.0",
4
4
  "description": "Errors, schemas and documentation for the Parcel Shops project",
5
5
  "keywords": [
6
6
  "gls"
@@ -12,7 +12,7 @@ const {
12
12
  specificHttpError,
13
13
  } = require('@gls_spain/common-json-schemas');
14
14
  const { timezones } = require('@gls_spain/ajv-options');
15
-
15
+
16
16
  const specificErrorResponse = error => ({
17
17
  type: 'object',
18
18
  properties: {
@@ -437,6 +437,27 @@ const findByFiscal = () => ({
437
437
  additionalProperties: false,
438
438
  });
439
439
 
440
+ const international = () => ({
441
+ title: 'international data',
442
+ type: 'object',
443
+ properties: {
444
+ partnerKey: { type: 'string' },
445
+ parcelShopId: { type: 'string' },
446
+ },
447
+ required: ['partnerKey', 'parcelShopId'],
448
+ });
449
+
450
+
451
+
452
+
453
+ const findByInternationalPartnerKey = () => ({
454
+ title: 'find by International PartnerKey',
455
+ type: 'object',
456
+ properties: { partnerKey: { type: 'string', minLength: 3, description: 'search by International id' } },
457
+ required: ['partnerKey'],
458
+ additionalProperties: false,
459
+ });
460
+
440
461
  const networkType = () => ({
441
462
  type: 'string',
442
463
  enum: [
@@ -471,5 +492,7 @@ module.exports = {
471
492
  contact,
472
493
  fiscal,
473
494
  findByFiscal,
495
+ international,
496
+ findByInternationalPartnerKey,
474
497
  networkType
475
498
  };
@@ -27,6 +27,7 @@ const {
27
27
  contact,
28
28
  fiscal,
29
29
  findByFiscal,
30
+ findByInternationalPartnerKey
30
31
  } = require('./common');
31
32
  const { network, objectWithNetworkId } = require('./networks');
32
33
  const { defaults, derivationSettings, expirationSettings } = require('./defaults');
@@ -268,7 +269,7 @@ const shop = () => ({
268
269
  squareCode: { type: ['integer', 'string'], minimum: 0, maximum: 32767, description: 'agency code' },
269
270
  clientCode: { type: ['integer', 'string'], minimum: 0, description: 'client code' },
270
271
  // 2024-07-22 JJC campo de agencia de canalización
271
- channelingAgencyCode: { type: 'integer', minimum: 0 },
272
+ channelingAgencyCode: { type: 'integer' },
272
273
  },
273
274
  required: [
274
275
  '_id',
@@ -391,6 +392,8 @@ const findByNetworkAndStatusAndPolygonalArea = () =>
391
392
 
392
393
  const findByNetworkAndFiscal = () => mergeSchemas(findByNetwork(), findByFiscal(), { title: 'find by network and fiscal data' });
393
394
 
395
+ const findByNetworkAndInternationalPartnerKey = () => mergeSchemas(findByNetwork(), findByInternationalPartnerKey(), { title: 'find by network and international Partner key data' });
396
+
394
397
  const findShopsSuperAdminRequest = () =>
395
398
  findRequest({
396
399
  oneOf: [
@@ -403,6 +406,7 @@ const findShopsSuperAdminRequest = () =>
403
406
  findByStatusAndCircularArea(),
404
407
  findByStatusAndPolygonalArea(),
405
408
  findByFiscal(),
409
+ findByInternationalPartnerKey(),
406
410
  findByNetwork(),
407
411
  findByNetworkAndStatus(),
408
412
  findByNetworkAndName(),
@@ -411,6 +415,7 @@ const findShopsSuperAdminRequest = () =>
411
415
  findByNetworkAndStatusAndCircularArea(),
412
416
  findByNetworkAndStatusAndPolygonalArea(),
413
417
  findByNetworkAndFiscal(),
418
+ findByNetworkAndInternationalPartnerKey()
414
419
  ],
415
420
  });
416
421
 
@@ -426,6 +431,7 @@ const findShopsNetworkAdminRequest = () =>
426
431
  findByStatusAndCircularArea(),
427
432
  findByStatusAndPolygonalArea(),
428
433
  findByFiscal(),
434
+ findByInternationalPartnerKey(),
429
435
  ],
430
436
  });
431
437