@tillhub/schemas 6.257.0 → 6.258.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,3 +1,10 @@
|
|
|
1
|
+
# [6.258.0](https://github.com/tillhub/schemas/compare/v6.257.0...v6.258.0) (2023-09-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **configurations:** add details for validations ([bc5560b](https://github.com/tillhub/schemas/commit/bc5560b))
|
|
7
|
+
|
|
1
8
|
# [6.257.0](https://github.com/tillhub/schemas/compare/v6.256.1...v6.257.0) (2023-09-08)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -289,16 +289,7 @@ module.exports = {
|
|
|
289
289
|
deliveries: {
|
|
290
290
|
type: 'object'
|
|
291
291
|
},
|
|
292
|
-
validations:
|
|
293
|
-
oneOf: [
|
|
294
|
-
{
|
|
295
|
-
type: 'null'
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
type: 'object'
|
|
299
|
-
}
|
|
300
|
-
]
|
|
301
|
-
},
|
|
292
|
+
validations: require('./items/validations'),
|
|
302
293
|
payments: {
|
|
303
294
|
oneOf: [
|
|
304
295
|
{
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const { oneOf } = require('../../../helpers/payload-or-null')
|
|
2
|
+
|
|
3
|
+
const validationType = oneOf({
|
|
4
|
+
type: 'string',
|
|
5
|
+
enum: [
|
|
6
|
+
'hard',
|
|
7
|
+
'soft',
|
|
8
|
+
'off'
|
|
9
|
+
]
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
module.exports = oneOf({
|
|
13
|
+
type: 'object',
|
|
14
|
+
description: 'A dictionary <string, string> describing all validation values',
|
|
15
|
+
properties: {
|
|
16
|
+
all: validationType,
|
|
17
|
+
accounts: validationType,
|
|
18
|
+
carts: validationType,
|
|
19
|
+
transactions: validationType,
|
|
20
|
+
balances: validationType,
|
|
21
|
+
items: validationType,
|
|
22
|
+
products: validationType,
|
|
23
|
+
productGroups: validationType,
|
|
24
|
+
taxes: validationType,
|
|
25
|
+
vouchers: validationType,
|
|
26
|
+
payments: validationType,
|
|
27
|
+
discounts: validationType,
|
|
28
|
+
customers: validationType
|
|
29
|
+
},
|
|
30
|
+
additionalProperties: validationType
|
|
31
|
+
})
|