data-validation-proximity 1.2.4 → 1.2.5

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.
Files changed (2) hide show
  1. package/index.js +10 -13
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -549,7 +549,7 @@ const storeAddressSchema = joi.object({
549
549
 
550
550
  const schemaStore = joi.object({
551
551
  name: joi.string().min(2).required(),
552
- description: joi.string().min(3).max(800).required(),
552
+ description: joi.string().min(3).max(1000).required(),
553
553
  sellerId: joi.string().required(),
554
554
  location: joi
555
555
  .object({
@@ -583,25 +583,22 @@ exports.schemaStoreValidation = (req, res, next) => {
583
583
  };
584
584
 
585
585
  const schemaUpdateStore = joi.object({
586
- name: joi.string().min(3),
587
- description: joi.string().min(3).max(200),
586
+ name: joi.string().min(2),
587
+ description: joi.string().min(3).max(1000),
588
588
  isActive: joi.bool(),
589
- address: joi.object({
590
- city: joi.string().min(3),
591
- streetName: joi.string().min(3).max(120),
592
- postalCode: joi.string().min(3),
593
- country: joi.string().min(3),
594
- countryCode: joi.string().min(2),
595
- fullAdress: joi.string().min(3).max(120),
596
- region: joi.string().min(3),
597
- }),
598
- policy: policySchema,
599
589
  location: joi.object({
600
590
  type: joi.string().valid('Point'),
601
591
  coordinates: joi.array().items().length(2),
602
592
  }),
593
+ address: storeAddressSchema,
603
594
  workingTime: workingTimeSchema,
595
+ policy: policySchema,
604
596
  image: joi.string().min(3),
597
+ storeCategories: joi.string(),
598
+ productCategories: joi.string(),
599
+ storeRayons: joi.string(),
600
+ template: joi.string(),
601
+ registrationNumber: joi.string(),
605
602
  });
606
603
 
607
604
  exports.schemaUpdateStoreValidation = (req, res, next) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "data-validation-proximity",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "A library of Joi-based validation middlewares for Express.js",
5
5
  "main": "index.js",
6
6
  "license": "MIT",