data-validation-proximity 1.4.2 → 1.4.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.
Files changed (2) hide show
  1. package/index.js +23 -7
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -77,7 +77,24 @@ const policySchema = joi
77
77
  delivery: joi
78
78
  .object({
79
79
  enabled: joi.boolean().allow(null),
80
- delivery: joi.boolean().required().allow(null),
80
+ delivery: joi.boolean().allow(null),
81
+ zone: joi
82
+ .object({
83
+ centerPoint: joi
84
+ .object({
85
+ latitude: joi.number().allow(null),
86
+ longitude: joi.number().allow(null),
87
+ })
88
+ .allow(null),
89
+ radius: joi.number().allow(null),
90
+ })
91
+ .allow(null),
92
+ pricing: joi
93
+ .object({
94
+ fixe: joi.number().allow(null),
95
+ km: joi.number().allow(null),
96
+ })
97
+ .allow(null),
81
98
  })
82
99
  .allow(null),
83
100
  reservation: joi
@@ -114,6 +131,7 @@ const policySchema = joi
114
131
  returnMethod: joi.string().allow('').allow(null).required(),
115
132
  refund: joi
116
133
  .object({
134
+ enabled: joi.boolean().allow(null),
117
135
  order: joi
118
136
  .object({
119
137
  fixe: joi.number().allow(null).required(),
@@ -132,12 +150,8 @@ const policySchema = joi
132
150
  .allow(null),
133
151
  order: joi
134
152
  .object({
135
- validation: joi
136
- .object({
137
- auto: joi.boolean().allow(null).required(),
138
- manual: joi.boolean().allow(null).required(),
139
- })
140
- .allow(null),
153
+ enabled: joi.boolean().allow(null),
154
+ autoValidateOrder: joi.boolean().allow(null),
141
155
  notification: joi
142
156
  .object({
143
157
  realtime: joi.boolean().allow(null).required(),
@@ -642,6 +656,8 @@ const schemaStore = joi.object({
642
656
  date: joi.string().allow('').allow(null),
643
657
  location: joi.string().allow('').allow(null),
644
658
  marketName: joi.string().allow('').allow(null),
659
+ latitude: joi.number().allow(null),
660
+ longitude: joi.number().allow(null),
645
661
  })
646
662
  )
647
663
  .allow(null),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "data-validation-proximity",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "description": "A library of Joi-based validation middlewares for Express.js",
5
5
  "main": "index.js",
6
6
  "license": "MIT",