@tillhub/schemas 6.349.1 → 6.350.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 +12 -0
- package/lib/common/currency_amount.js +1 -2
- package/lib/common/device_info.js +12 -0
- package/lib/v0/cashier_counting_protocols/base.js +1 -5
- package/lib/v1/products/base.js +5 -0
- package/package.json +1 -1
- package/lib/v0/cashier_counting_protocols/discrepancy_total/base.js +0 -26
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# [6.350.0](https://github.com/tillhub/schemas/compare/v6.349.1...v6.350.0) (2025-01-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **common:** device_info ([94540cc](https://github.com/tillhub/schemas/commit/94540cc))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **validation:** avoid 422s ([#1015](https://github.com/tillhub/schemas/issues/1015)) ([cfd6e42](https://github.com/tillhub/schemas/commit/cfd6e42))
|
|
12
|
+
|
|
1
13
|
## [6.349.1](https://github.com/tillhub/schemas/compare/v6.349.0...v6.349.1) (2025-01-07)
|
|
2
14
|
|
|
3
15
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
type: 'object',
|
|
3
3
|
additionalProperties: false,
|
|
4
|
-
description: 'Describes a
|
|
4
|
+
description: 'Describes a monetary value in a specific currency.',
|
|
5
5
|
required: ['amount', 'currency'],
|
|
6
6
|
properties: {
|
|
7
7
|
currency: {
|
|
@@ -15,7 +15,6 @@ module.exports = {
|
|
|
15
15
|
type: 'number',
|
|
16
16
|
description: 'The value as .2-Decimal.',
|
|
17
17
|
example: '47.02',
|
|
18
|
-
minimum: 0,
|
|
19
18
|
multipleOf: 0.01
|
|
20
19
|
}
|
|
21
20
|
}
|
|
@@ -27,6 +27,18 @@ module.exports = {
|
|
|
27
27
|
type: 'string',
|
|
28
28
|
description: 'Device hardware',
|
|
29
29
|
example: 'Simulator iPad (10th generation)'
|
|
30
|
+
}),
|
|
31
|
+
user: oneOf({
|
|
32
|
+
type: 'string',
|
|
33
|
+
description: 'Login email of the user',
|
|
34
|
+
format: 'email',
|
|
35
|
+
example: 'm@n.de'
|
|
36
|
+
}),
|
|
37
|
+
sub_user: oneOf({
|
|
38
|
+
type: 'string',
|
|
39
|
+
description: 'Login email of the sub-user',
|
|
40
|
+
format: 'email',
|
|
41
|
+
example: 'm@n.de'
|
|
30
42
|
})
|
|
31
43
|
}
|
|
32
44
|
}
|
|
@@ -2,7 +2,6 @@ const { oneOf } = require('../../helpers/payload-or-null')
|
|
|
2
2
|
const { timezone } = require('../../common/timezones')
|
|
3
3
|
const currencyAmounts = require('../../common/currency_amounts')
|
|
4
4
|
const cashUnits = require('./cash_units/base')
|
|
5
|
-
const discrepancyTotal = require('./discrepancy_total/base')
|
|
6
5
|
|
|
7
6
|
module.exports = {
|
|
8
7
|
custom_id: {
|
|
@@ -220,10 +219,7 @@ module.exports = {
|
|
|
220
219
|
description: 'Total amounts per currency from calculation (values from previously closed balance, setpoint value)'
|
|
221
220
|
},
|
|
222
221
|
discrepancy_total: oneOf({
|
|
223
|
-
|
|
224
|
-
items: {
|
|
225
|
-
...discrepancyTotal
|
|
226
|
-
},
|
|
222
|
+
...currencyAmounts,
|
|
227
223
|
description: 'Discrepencies per currency (discrepencies[currency] = total_counted[currency] - total_calculated[currency])'
|
|
228
224
|
}),
|
|
229
225
|
has_discrepancy: {
|
package/lib/v1/products/base.js
CHANGED
|
@@ -521,6 +521,11 @@ const request = {
|
|
|
521
521
|
}, { default: '' })
|
|
522
522
|
}
|
|
523
523
|
}),
|
|
524
|
+
supplier_code: oneOf({
|
|
525
|
+
description: 'The supplier code for the product',
|
|
526
|
+
type: 'string',
|
|
527
|
+
example: 'ATV4300123'
|
|
528
|
+
}),
|
|
524
529
|
locations: oneOf({
|
|
525
530
|
type: 'array',
|
|
526
531
|
items: {
|
package/package.json
CHANGED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
description: 'The discrepancy amount by currency',
|
|
3
|
-
additionalProperties: false,
|
|
4
|
-
type: 'object',
|
|
5
|
-
required: [
|
|
6
|
-
'currency',
|
|
7
|
-
'amount'
|
|
8
|
-
],
|
|
9
|
-
properties: {
|
|
10
|
-
currency: {
|
|
11
|
-
type: 'string',
|
|
12
|
-
description: 'The three letter [ISO currency](https://en.wikipedia.org/wiki/ISO_4217) of this item.',
|
|
13
|
-
example: 'EUR',
|
|
14
|
-
minLength: 3,
|
|
15
|
-
maxLength: 3
|
|
16
|
-
},
|
|
17
|
-
amount: {
|
|
18
|
-
type: 'number',
|
|
19
|
-
description: 'The quantity of this unit.',
|
|
20
|
-
examples: [27633.02],
|
|
21
|
-
minimum: -1000000,
|
|
22
|
-
maximum: 1000000,
|
|
23
|
-
multipleOf: 0.01
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|