@tillhub/schemas 6.226.0 → 6.228.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,17 @@
|
|
|
1
|
+
# [6.228.0](https://github.com/tillhub/schemas/compare/v6.227.0...v6.228.0) (2023-07-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **webhooks:** added product update event to schema ([edde281](https://github.com/tillhub/schemas/commit/edde281))
|
|
7
|
+
|
|
8
|
+
# [6.227.0](https://github.com/tillhub/schemas/compare/v6.226.0...v6.227.0) (2023-07-10)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **configurations:** tips ([a6a0ca4](https://github.com/tillhub/schemas/commit/a6a0ca4))
|
|
14
|
+
|
|
1
15
|
# [6.226.0](https://github.com/tillhub/schemas/compare/v6.225.0...v6.226.0) (2023-06-23)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const { oneOf } = require('../../../helpers/payload-or-null')
|
|
2
|
+
const currencyAmountObject = require('../../../common/currency_amount')
|
|
2
3
|
|
|
3
4
|
const tipsCartItemTemplate = {
|
|
4
5
|
description: 'Defines mandatory cart item properties to enable encoding tips as cart items (similar to Fiskaltrust)',
|
|
@@ -85,6 +86,14 @@ module.exports = oneOf({
|
|
|
85
86
|
maximum: 2.0,
|
|
86
87
|
default: null // -> 1.3 in POS
|
|
87
88
|
}),
|
|
89
|
+
max_value: oneOf({
|
|
90
|
+
type: 'array',
|
|
91
|
+
description: 'Secondary! The maximum total value (by currency) that tips can not exceed when max_factor can not be used, e.g. on zero-carts',
|
|
92
|
+
items: {
|
|
93
|
+
...currencyAmountObject
|
|
94
|
+
},
|
|
95
|
+
default: [ { 'amounnt': 200.0, 'currency': 'EUR' } ]
|
|
96
|
+
}),
|
|
88
97
|
auto_propose: oneOf({
|
|
89
98
|
description: 'if true, automatically selects the highest tip possible according to the given amount or the max_factor, no tips otherwise',
|
|
90
99
|
type: 'boolean',
|
package/lib/v1/products/index.js
CHANGED
|
@@ -12,12 +12,13 @@ module.exports.search = {
|
|
|
12
12
|
module.exports.create = {
|
|
13
13
|
request: require('./create.request'),
|
|
14
14
|
response: require('./create.response'),
|
|
15
|
-
event: require('./event')
|
|
15
|
+
event: require('./create.event')
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
module.exports.update = {
|
|
19
19
|
request: require('./update.request'),
|
|
20
|
-
response: require('./update.response')
|
|
20
|
+
response: require('./update.response'),
|
|
21
|
+
event: require('./update.event')
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
module.exports.branch = {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const baseObject = require('../../common/base')
|
|
2
|
+
const { getEvent } = require('../../common/webhooks')
|
|
3
|
+
const base = require('./base')
|
|
4
|
+
|
|
5
|
+
module.exports = {
|
|
6
|
+
$id: 'https://schemas.tillhub.com/v1/products.update.event.schema.json',
|
|
7
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
8
|
+
...getEvent({
|
|
9
|
+
type: 'object',
|
|
10
|
+
additionalProperties: false,
|
|
11
|
+
properties: {
|
|
12
|
+
...baseObject(),
|
|
13
|
+
...base
|
|
14
|
+
}
|
|
15
|
+
}, { eventEntityExample: 'product' })
|
|
16
|
+
}
|
package/package.json
CHANGED
|
File without changes
|