@gls_spain/gps-common 35.15.8 → 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 +9 -2
- package/package.json +1 -1
- package/schemas/definitions/shops.js +88 -45
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
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
|
-
*
|
|
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
|
+
|
|
8
15
|
## [35.15.7](https://github.com/GLS-Spain/gps-common/compare/v35.15.6...v35.15.7) (2026-03-10)
|
|
9
16
|
|
|
10
17
|
|
package/package.json
CHANGED
|
@@ -755,17 +755,23 @@ const createLockerRequest = () =>
|
|
|
755
755
|
additionalProperties: false,
|
|
756
756
|
},
|
|
757
757
|
|
|
758
|
-
|
|
758
|
+
// ✅ maxLength alineado con Nombre varchar(100)
|
|
759
|
+
name: { type: 'string', trim: true, maxLength: 100 },
|
|
759
760
|
|
|
760
761
|
address: {
|
|
761
762
|
type: 'object',
|
|
762
763
|
properties: {
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
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 },
|
|
769
775
|
location: {
|
|
770
776
|
type: 'object',
|
|
771
777
|
properties: {
|
|
@@ -797,29 +803,35 @@ const createLockerRequest = () =>
|
|
|
797
803
|
timezone: shop().properties.timezone,
|
|
798
804
|
activity: shop().properties.activity,
|
|
799
805
|
eco: shop().properties.eco,
|
|
806
|
+
|
|
800
807
|
fiscal: {
|
|
801
808
|
type: 'object',
|
|
802
809
|
properties: {
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
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() },
|
|
807
817
|
address: {
|
|
808
818
|
type: 'object',
|
|
809
819
|
properties: {
|
|
810
|
-
street:
|
|
811
|
-
door:
|
|
812
|
-
postalCode: { type: 'string', trim: true },
|
|
813
|
-
locality:
|
|
814
|
-
country
|
|
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 },
|
|
815
826
|
},
|
|
816
827
|
required: ['street', 'postalCode', 'locality', 'country'],
|
|
817
828
|
additionalProperties: false,
|
|
818
829
|
},
|
|
819
|
-
paymentMethod: { type: 'string', trim: true },
|
|
820
|
-
dueDays:
|
|
821
|
-
|
|
822
|
-
|
|
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' },
|
|
823
835
|
},
|
|
824
836
|
required: ['iban', 'businessName', 'nif', 'contacts', 'address', 'dueDays', 'retention'],
|
|
825
837
|
additionalProperties: false,
|
|
@@ -828,21 +840,36 @@ const createLockerRequest = () =>
|
|
|
828
840
|
nxt: {
|
|
829
841
|
type: 'object',
|
|
830
842
|
properties: {
|
|
831
|
-
|
|
843
|
+
// ✅ ParcelShopId varchar(100)
|
|
844
|
+
parcelShopId: { type: 'string', maxLength: 100 },
|
|
832
845
|
},
|
|
833
846
|
required: ['parcelShopId'],
|
|
834
847
|
additionalProperties: false,
|
|
835
848
|
},
|
|
836
849
|
|
|
837
|
-
// Campos _locker
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
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 },
|
|
846
873
|
},
|
|
847
874
|
required: [
|
|
848
875
|
'network',
|
|
@@ -868,9 +895,10 @@ const createLockerRequest = () =>
|
|
|
868
895
|
provider: {
|
|
869
896
|
type: 'object',
|
|
870
897
|
properties: {
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
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 },
|
|
874
902
|
},
|
|
875
903
|
required: ['name'],
|
|
876
904
|
additionalProperties: false,
|
|
@@ -879,13 +907,18 @@ const createLockerRequest = () =>
|
|
|
879
907
|
location: {
|
|
880
908
|
type: 'object',
|
|
881
909
|
properties: {
|
|
882
|
-
streetNumber: { type: 'string', trim: true },
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
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 },
|
|
889
922
|
},
|
|
890
923
|
required: ['street', 'postalCode', 'countryCode', 'city'],
|
|
891
924
|
additionalProperties: false,
|
|
@@ -894,8 +927,8 @@ const createLockerRequest = () =>
|
|
|
894
927
|
features: {
|
|
895
928
|
type: 'object',
|
|
896
929
|
properties: {
|
|
897
|
-
hasScreen:
|
|
898
|
-
hasPinPad:
|
|
930
|
+
hasScreen: { type: 'boolean' },
|
|
931
|
+
hasPinPad: { type: 'boolean' },
|
|
899
932
|
hasPinBarcodeReader: { type: 'boolean' },
|
|
900
933
|
},
|
|
901
934
|
additionalProperties: false,
|
|
@@ -904,9 +937,11 @@ const createLockerRequest = () =>
|
|
|
904
937
|
carrier: {
|
|
905
938
|
type: 'object',
|
|
906
939
|
properties: {
|
|
907
|
-
|
|
940
|
+
// ✅ Nombre varchar(100)
|
|
941
|
+
lockerName: { type: 'string', trim: true, maxLength: 100 },
|
|
908
942
|
activationDate: { type: 'string', format: 'date-time' },
|
|
909
|
-
|
|
943
|
+
// ✅ UUID = 36 chars
|
|
944
|
+
lockerId: { type: 'string', maxLength: 36 },
|
|
910
945
|
},
|
|
911
946
|
required: ['lockerName', 'lockerId'],
|
|
912
947
|
additionalProperties: false,
|
|
@@ -918,11 +953,19 @@ const createLockerRequest = () =>
|
|
|
918
953
|
},
|
|
919
954
|
|
|
920
955
|
},
|
|
921
|
-
// FIX: era ['parcelshop', 'locker'] con 'lockerDevice' en properties → siempre fallaba
|
|
922
956
|
required: ['parcelshop', 'locker'],
|
|
923
957
|
additionalProperties: false,
|
|
924
958
|
});
|
|
925
959
|
|
|
960
|
+
|
|
961
|
+
|
|
962
|
+
|
|
963
|
+
|
|
964
|
+
|
|
965
|
+
|
|
966
|
+
|
|
967
|
+
|
|
968
|
+
|
|
926
969
|
const createLockerResponse = () => createResponse(locker());
|
|
927
970
|
|
|
928
971
|
|