@gls_spain/gps-common 35.15.7 → 35.15.9
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 +16 -2
- package/package.json +1 -1
- package/schemas/definitions/shops.js +123 -42
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
|
-
## [35.15.
|
|
1
|
+
## [35.15.9](https://github.com/GLS-Spain/gps-common/compare/v35.15.8...v35.15.9) (2026-03-11)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
* add
|
|
6
|
+
* add varchar validation SQL apolo in lockers schema ([3ff50e2](https://github.com/GLS-Spain/gps-common/commit/3ff50e28f5347333cfbc801dfdf363cb6f2d2921))
|
|
7
7
|
|
|
8
|
+
## [35.15.8](https://github.com/GLS-Spain/gps-common/compare/v35.15.7...v35.15.8) (2026-03-10)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* fix door property ([8980881](https://github.com/GLS-Spain/gps-common/commit/8980881dc14fdedad49a7179af810ab0bac36b55))
|
|
14
|
+
|
|
15
|
+
## [35.15.7](https://github.com/GLS-Spain/gps-common/compare/v35.15.6...v35.15.7) (2026-03-10)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* add fiscal and activity new properties ([709fb68](https://github.com/GLS-Spain/gps-common/commit/709fb689abcd20cf64f42195b42f29062c9f3818))
|
|
21
|
+
|
|
8
22
|
## [35.15.6](https://github.com/GLS-Spain/gps-common/compare/v35.15.5...v35.15.6) (2026-03-10)
|
|
9
23
|
|
|
10
24
|
|
package/package.json
CHANGED
|
@@ -639,7 +639,34 @@ const locker = () => ({
|
|
|
639
639
|
type: 'array',
|
|
640
640
|
items: contact(),
|
|
641
641
|
},
|
|
642
|
-
fiscal:
|
|
642
|
+
fiscal: {
|
|
643
|
+
type: 'object',
|
|
644
|
+
properties: {
|
|
645
|
+
iban: { type: 'string', trim: true },
|
|
646
|
+
businessName: { type: 'string', trim: true },
|
|
647
|
+
nif: { type: 'string', trim: true },
|
|
648
|
+
contacts: { type: 'array', items: contact() },
|
|
649
|
+
// ✅ address inline — address() tiene additionalProperties:false sin 'door'
|
|
650
|
+
address: {
|
|
651
|
+
type: 'object',
|
|
652
|
+
properties: {
|
|
653
|
+
street: { type: 'string', trim: true },
|
|
654
|
+
door: { type: 'string', trim: true },
|
|
655
|
+
postalCode: { type: 'string', trim: true },
|
|
656
|
+
locality: { type: 'string', trim: true },
|
|
657
|
+
country: { type: 'string', trim: true },
|
|
658
|
+
},
|
|
659
|
+
required: ['street', 'postalCode', 'locality', 'country'],
|
|
660
|
+
additionalProperties: false,
|
|
661
|
+
},
|
|
662
|
+
paymentMethod: { type: 'string', trim: true },
|
|
663
|
+
dueDays: { type: 'integer', minimum: 0 },
|
|
664
|
+
activity: { type: 'string', trim: true, maxLength: 50 },
|
|
665
|
+
retention: { type: 'integer' },
|
|
666
|
+
},
|
|
667
|
+
required: ['iban', 'businessName', 'nif', 'contacts', 'address', 'dueDays', 'retention'],
|
|
668
|
+
additionalProperties: false,
|
|
669
|
+
},
|
|
643
670
|
activity: shopActivity(),
|
|
644
671
|
notes: { type: 'string', trim: true },
|
|
645
672
|
derivationSettings: derivationSettings(),
|
|
@@ -728,17 +755,23 @@ const createLockerRequest = () =>
|
|
|
728
755
|
additionalProperties: false,
|
|
729
756
|
},
|
|
730
757
|
|
|
731
|
-
|
|
758
|
+
// ✅ maxLength alineado con Nombre varchar(100)
|
|
759
|
+
name: { type: 'string', trim: true, maxLength: 100 },
|
|
732
760
|
|
|
733
761
|
address: {
|
|
734
762
|
type: 'object',
|
|
735
763
|
properties: {
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
764
|
+
// ✅ Calle varchar(255)
|
|
765
|
+
street: { type: 'string', trim: true, maxLength: 255 },
|
|
766
|
+
// ✅ sin límite estricto en BD pero razonable
|
|
767
|
+
door: { type: 'string', trim: true, maxLength: 20 },
|
|
768
|
+
// ✅ cp varchar(15)
|
|
769
|
+
postalCode: { type: 'string', trim: true, maxLength: 15 },
|
|
770
|
+
// ✅ Poblacion varchar(100)
|
|
771
|
+
locality: { type: 'string', trim: true, maxLength: 100 },
|
|
772
|
+
// ✅ código país ISO 3166-1 alpha-2/3
|
|
773
|
+
country: { type: 'string', trim: true, maxLength: 3 },
|
|
774
|
+
access_descript_locker: { type: 'string', trim: true, maxLength: 500 },
|
|
742
775
|
location: {
|
|
743
776
|
type: 'object',
|
|
744
777
|
properties: {
|
|
@@ -770,18 +803,35 @@ const createLockerRequest = () =>
|
|
|
770
803
|
timezone: shop().properties.timezone,
|
|
771
804
|
activity: shop().properties.activity,
|
|
772
805
|
eco: shop().properties.eco,
|
|
806
|
+
|
|
773
807
|
fiscal: {
|
|
774
808
|
type: 'object',
|
|
775
809
|
properties: {
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
810
|
+
// ✅ IBAN estándar máximo 34 caracteres
|
|
811
|
+
iban: { type: 'string', trim: true, maxLength: 34 },
|
|
812
|
+
// ✅ nombreComercial nvarchar(100)
|
|
813
|
+
businessName: { type: 'string', trim: true, maxLength: 100 },
|
|
814
|
+
// ✅ NIF/CIF español máximo 9 chars, margen para internacionales
|
|
815
|
+
nif: { type: 'string', trim: true, maxLength: 20 },
|
|
816
|
+
contacts: { type: 'array', items: contact() },
|
|
817
|
+
address: {
|
|
818
|
+
type: 'object',
|
|
819
|
+
properties: {
|
|
820
|
+
street: { type: 'string', trim: true, maxLength: 255 },
|
|
821
|
+
door: { type: 'string', trim: true, maxLength: 20 },
|
|
822
|
+
postalCode: { type: 'string', trim: true, maxLength: 15 },
|
|
823
|
+
locality: { type: 'string', trim: true, maxLength: 100 },
|
|
824
|
+
// ✅ añadido country que faltaba y causaba el 400
|
|
825
|
+
country: { type: 'string', trim: true, maxLength: 3 },
|
|
826
|
+
},
|
|
827
|
+
required: ['street', 'postalCode', 'locality', 'country'],
|
|
828
|
+
additionalProperties: false,
|
|
829
|
+
},
|
|
830
|
+
paymentMethod: { type: 'string', trim: true, maxLength: 50 },
|
|
831
|
+
dueDays: { type: 'integer', minimum: 0 },
|
|
832
|
+
// ✅ activity varchar(250) en BD relacional
|
|
833
|
+
activity: { type: 'string', trim: true, maxLength: 50 },
|
|
834
|
+
retention: { type: 'integer' },
|
|
785
835
|
},
|
|
786
836
|
required: ['iban', 'businessName', 'nif', 'contacts', 'address', 'dueDays', 'retention'],
|
|
787
837
|
additionalProperties: false,
|
|
@@ -790,21 +840,36 @@ const createLockerRequest = () =>
|
|
|
790
840
|
nxt: {
|
|
791
841
|
type: 'object',
|
|
792
842
|
properties: {
|
|
793
|
-
|
|
843
|
+
// ✅ ParcelShopId varchar(100)
|
|
844
|
+
parcelShopId: { type: 'string', maxLength: 100 },
|
|
794
845
|
},
|
|
795
846
|
required: ['parcelShopId'],
|
|
796
847
|
additionalProperties: false,
|
|
797
848
|
},
|
|
798
849
|
|
|
799
|
-
// Campos _locker
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
850
|
+
// ✅ Campos _locker con límites alineados a BD
|
|
851
|
+
// Calle varchar(255)
|
|
852
|
+
direccion_locker: { type: 'string', trim: true, maxLength: 255 },
|
|
853
|
+
// cp varchar(15)
|
|
854
|
+
codpostal_locker: { type: 'string', trim: true, maxLength: 15 },
|
|
855
|
+
// Poblacion varchar(100)
|
|
856
|
+
ciudad_locker: { type: 'string', trim: true, maxLength: 100 },
|
|
857
|
+
// ✅ lat/lng float en BD — rango geográfico válido
|
|
858
|
+
longitud_locker: {
|
|
859
|
+
type: 'number',
|
|
860
|
+
minimum: -180,
|
|
861
|
+
maximum: 180,
|
|
862
|
+
description: 'Fuente de verdad para longitude — sobreescribe address.location.geometry.coordinates[0]',
|
|
863
|
+
},
|
|
864
|
+
latitud_locker: {
|
|
865
|
+
type: 'number',
|
|
866
|
+
minimum: -90,
|
|
867
|
+
maximum: 90,
|
|
868
|
+
description: 'Fuente de verdad para latitude — sobreescribe address.location.geometry.coordinates[1]',
|
|
869
|
+
},
|
|
870
|
+
// ✅ capacidad razonable como string numérico
|
|
871
|
+
capacity_locker: { type: 'string', maxLength: 20 },
|
|
872
|
+
access_descript_locker: { type: 'string', trim: true, maxLength: 500 },
|
|
808
873
|
},
|
|
809
874
|
required: [
|
|
810
875
|
'network',
|
|
@@ -830,9 +895,10 @@ const createLockerRequest = () =>
|
|
|
830
895
|
provider: {
|
|
831
896
|
type: 'object',
|
|
832
897
|
properties: {
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
898
|
+
// ✅ PartnerKey varchar(100)
|
|
899
|
+
name: { type: 'string', trim: true, maxLength: 100 },
|
|
900
|
+
lockerVersion: { type: 'string', trim: true, maxLength: 20 },
|
|
901
|
+
lockerModel: { type: 'string', trim: true, maxLength: 100 },
|
|
836
902
|
},
|
|
837
903
|
required: ['name'],
|
|
838
904
|
additionalProperties: false,
|
|
@@ -841,13 +907,18 @@ const createLockerRequest = () =>
|
|
|
841
907
|
location: {
|
|
842
908
|
type: 'object',
|
|
843
909
|
properties: {
|
|
844
|
-
streetNumber: { type: 'string', trim: true },
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
910
|
+
streetNumber: { type: 'string', trim: true, maxLength: 20 },
|
|
911
|
+
// ✅ Calle varchar(255)
|
|
912
|
+
street: { type: 'string', trim: true, maxLength: 255 },
|
|
913
|
+
// ✅ cp varchar(15)
|
|
914
|
+
postalCode: { type: 'string', trim: true, maxLength: 15 },
|
|
915
|
+
// ✅ float en BD
|
|
916
|
+
lon: { type: 'number', minimum: -180, maximum: 180 },
|
|
917
|
+
lat: { type: 'number', minimum: -90, maximum: 90 },
|
|
918
|
+
// ✅ ya tenía minLength:2 maxLength:2 — correcto para ISO 3166-1 alpha-2
|
|
919
|
+
countryCode: { type: 'string', trim: true, minLength: 2, maxLength: 2 },
|
|
920
|
+
// ✅ Poblacion varchar(100)
|
|
921
|
+
city: { type: 'string', trim: true, maxLength: 100 },
|
|
851
922
|
},
|
|
852
923
|
required: ['street', 'postalCode', 'countryCode', 'city'],
|
|
853
924
|
additionalProperties: false,
|
|
@@ -856,8 +927,8 @@ const createLockerRequest = () =>
|
|
|
856
927
|
features: {
|
|
857
928
|
type: 'object',
|
|
858
929
|
properties: {
|
|
859
|
-
hasScreen:
|
|
860
|
-
hasPinPad:
|
|
930
|
+
hasScreen: { type: 'boolean' },
|
|
931
|
+
hasPinPad: { type: 'boolean' },
|
|
861
932
|
hasPinBarcodeReader: { type: 'boolean' },
|
|
862
933
|
},
|
|
863
934
|
additionalProperties: false,
|
|
@@ -866,9 +937,11 @@ const createLockerRequest = () =>
|
|
|
866
937
|
carrier: {
|
|
867
938
|
type: 'object',
|
|
868
939
|
properties: {
|
|
869
|
-
|
|
940
|
+
// ✅ Nombre varchar(100)
|
|
941
|
+
lockerName: { type: 'string', trim: true, maxLength: 100 },
|
|
870
942
|
activationDate: { type: 'string', format: 'date-time' },
|
|
871
|
-
|
|
943
|
+
// ✅ UUID = 36 chars
|
|
944
|
+
lockerId: { type: 'string', maxLength: 36 },
|
|
872
945
|
},
|
|
873
946
|
required: ['lockerName', 'lockerId'],
|
|
874
947
|
additionalProperties: false,
|
|
@@ -880,11 +953,19 @@ const createLockerRequest = () =>
|
|
|
880
953
|
},
|
|
881
954
|
|
|
882
955
|
},
|
|
883
|
-
// FIX: era ['parcelshop', 'locker'] con 'lockerDevice' en properties → siempre fallaba
|
|
884
956
|
required: ['parcelshop', 'locker'],
|
|
885
957
|
additionalProperties: false,
|
|
886
958
|
});
|
|
887
959
|
|
|
960
|
+
|
|
961
|
+
|
|
962
|
+
|
|
963
|
+
|
|
964
|
+
|
|
965
|
+
|
|
966
|
+
|
|
967
|
+
|
|
968
|
+
|
|
888
969
|
const createLockerResponse = () => createResponse(locker());
|
|
889
970
|
|
|
890
971
|
|