@tillhub/schemas 6.90.3 → 6.94.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 +33 -0
- package/lib/v0/client_accounts/features/base.js +4 -0
- package/lib/v1/configurations/base.js +1 -1
- package/lib/v1/configurations/items/financials.js +9 -0
- package/lib/v1/configurations/items/searches.js +26 -2
- package/lib/v1/configurations/items/settings.js +5 -0
- package/lib/v1/configurations/items/stock.js +28 -1
- package/lib/v1/products/base.js +11 -3
- package/lib/v1/registers/base.js +15 -0
- package/lib/v1/transactions/legacy/base.js +5 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
+
# [6.94.0](https://github.com/tillhub/schemas/compare/v6.93.0...v6.94.0) (2021-09-27)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **transactions:** legacy ([b2b9697](https://github.com/tillhub/schemas/commit/b2b9697))
|
|
7
|
+
|
|
8
|
+
# [6.93.0](https://github.com/tillhub/schemas/compare/v6.92.0...v6.93.0) (2021-09-27)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **configurations:** financials ([6c45475](https://github.com/tillhub/schemas/commit/6c45475))
|
|
14
|
+
* **configurations:** searches ([274daa0](https://github.com/tillhub/schemas/commit/274daa0))
|
|
15
|
+
* **configurations:** settings ([13890a3](https://github.com/tillhub/schemas/commit/13890a3))
|
|
16
|
+
* **stock:** add configuration for negative stock behavior ([62d5df0](https://github.com/tillhub/schemas/commit/62d5df0))
|
|
17
|
+
|
|
18
|
+
# [6.92.0](https://github.com/tillhub/schemas/compare/v6.91.0...v6.92.0) (2021-09-27)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
* API-1048 ([9970357](https://github.com/tillhub/schemas/commit/9970357))
|
|
24
|
+
* **product:** external id also as uuid ([1fc9c81](https://github.com/tillhub/schemas/commit/1fc9c81))
|
|
25
|
+
* **products:** change storefront uuid to external id ([32a2925](https://github.com/tillhub/schemas/commit/32a2925))
|
|
26
|
+
|
|
27
|
+
# [6.91.0](https://github.com/tillhub/schemas/compare/v6.90.3...v6.91.0) (2021-09-24)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
|
|
32
|
+
* **client-accounts:** add 'abocard_system' flag ([67e9e42](https://github.com/tillhub/schemas/commit/67e9e42))
|
|
33
|
+
|
|
1
34
|
## [6.90.3](https://github.com/tillhub/schemas/compare/v6.90.2...v6.90.3) (2021-09-23)
|
|
2
35
|
|
|
3
36
|
|
|
@@ -110,7 +110,7 @@ module.exports = {
|
|
|
110
110
|
},
|
|
111
111
|
features: require('./items/features'),
|
|
112
112
|
gastro: require('./items/gastro'),
|
|
113
|
-
stock: require('./items/
|
|
113
|
+
stock: require('./items/stock'),
|
|
114
114
|
transactions: oneOf(require('./items/transactions')),
|
|
115
115
|
products: oneOf(require('./items/products')),
|
|
116
116
|
customers: require('./items/customers'),
|
|
@@ -68,6 +68,15 @@ module.exports = {
|
|
|
68
68
|
...currencyAmounts
|
|
69
69
|
})
|
|
70
70
|
},
|
|
71
|
+
vat_base: oneOf({
|
|
72
|
+
description: 'Specifies on which level the precise VAT calculation is performed (before rounding)',
|
|
73
|
+
type: 'string',
|
|
74
|
+
'enum': [
|
|
75
|
+
'items',
|
|
76
|
+
'cart'
|
|
77
|
+
],
|
|
78
|
+
default: 'items'
|
|
79
|
+
}),
|
|
71
80
|
roundings: {
|
|
72
81
|
...oneOf({
|
|
73
82
|
description: 'Defines the fractional rounding behavior of currencies (e.g. to 0.05 CHF)',
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const { oneOf } = require('../../../helpers/payload-or-null')
|
|
2
|
+
|
|
1
3
|
const searchEntity = {
|
|
2
4
|
type: 'object',
|
|
3
5
|
properties: {
|
|
@@ -84,7 +86,29 @@ module.exports = {
|
|
|
84
86
|
description: 'Tile view, no limitations, probably account requirements dependent',
|
|
85
87
|
type: 'object',
|
|
86
88
|
...searchBehavior
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
+
},
|
|
90
|
+
history: oneOf({
|
|
91
|
+
description: 'Transaction history view',
|
|
92
|
+
type: 'object',
|
|
93
|
+
properties: {
|
|
94
|
+
search_field: oneOf({
|
|
95
|
+
description: 'Search text field for the full list',
|
|
96
|
+
type: 'object',
|
|
97
|
+
properties: {
|
|
98
|
+
transaction_number: oneOf({
|
|
99
|
+
description: 'If true and the search text qualifies as an integer number - search for transactions with that transaction number',
|
|
100
|
+
type: 'boolean',
|
|
101
|
+
default: true
|
|
102
|
+
}),
|
|
103
|
+
transaction_total: oneOf({
|
|
104
|
+
description: 'If true and the search text qualifies as a decimal number - search for transactions with that total amount',
|
|
105
|
+
type: 'boolean',
|
|
106
|
+
default: false
|
|
107
|
+
})
|
|
108
|
+
}
|
|
109
|
+
})
|
|
110
|
+
}
|
|
111
|
+
})
|
|
112
|
+
// history, voucher scan view etc. already come with limited scope - searchBehavior should not be configurable there
|
|
89
113
|
}
|
|
90
114
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const { oneOf } = require('../../../helpers/payload-or-null')
|
|
2
|
+
|
|
1
3
|
module.exports = {
|
|
2
4
|
oneOf: [
|
|
3
5
|
{
|
|
@@ -25,7 +27,32 @@ module.exports = {
|
|
|
25
27
|
type: 'boolean'
|
|
26
28
|
}
|
|
27
29
|
]
|
|
28
|
-
}
|
|
30
|
+
},
|
|
31
|
+
pos: oneOf({
|
|
32
|
+
type: 'object',
|
|
33
|
+
description: 'Stock configurations for POS clients',
|
|
34
|
+
properties: {
|
|
35
|
+
sale: {
|
|
36
|
+
...oneOf({
|
|
37
|
+
type: 'object',
|
|
38
|
+
description: 'Sale stock restrictions',
|
|
39
|
+
additionalProperties: true,
|
|
40
|
+
properties: {
|
|
41
|
+
negative_stock_behavior: oneOf({
|
|
42
|
+
type: 'string',
|
|
43
|
+
description: 'Defines behavior if products with negative stock can be sold.',
|
|
44
|
+
enum: [
|
|
45
|
+
'ignore', // Don't block
|
|
46
|
+
'warning', // Warning (and let the user decide if he still wants to go through)
|
|
47
|
+
'block'
|
|
48
|
+
],
|
|
49
|
+
default: 'ignore'
|
|
50
|
+
})
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
})
|
|
29
56
|
}
|
|
30
57
|
}
|
|
31
58
|
]
|
package/lib/v1/products/base.js
CHANGED
|
@@ -920,9 +920,17 @@ const request = {
|
|
|
920
920
|
type: 'object',
|
|
921
921
|
properties: {
|
|
922
922
|
store_front: {
|
|
923
|
-
description: '
|
|
924
|
-
|
|
925
|
-
|
|
923
|
+
description: 'external storeFront id',
|
|
924
|
+
oneOf: [
|
|
925
|
+
{
|
|
926
|
+
type: 'string'
|
|
927
|
+
},
|
|
928
|
+
{
|
|
929
|
+
description: 'uuid format for legacy reasons, knowing that the previous type contains it eitherway.',
|
|
930
|
+
type: 'string',
|
|
931
|
+
format: 'uuid'
|
|
932
|
+
}
|
|
933
|
+
]
|
|
926
934
|
},
|
|
927
935
|
product_id: {
|
|
928
936
|
description: 'the product ID given by external system, e.g. Ecwid',
|
package/lib/v1/registers/base.js
CHANGED
|
@@ -199,6 +199,21 @@ module.exports = {
|
|
|
199
199
|
example: 'cfb5afbb-dcce-4376-9152-6bb7ee01a0dd',
|
|
200
200
|
format: 'uuid'
|
|
201
201
|
},
|
|
202
|
+
tss_admin_puk: {
|
|
203
|
+
type: 'string',
|
|
204
|
+
description: 'PUK for setting PIN.',
|
|
205
|
+
example: '9076066923'
|
|
206
|
+
},
|
|
207
|
+
tss_admin_pin: {
|
|
208
|
+
type: 'string',
|
|
209
|
+
description: 'PIN for authentication of admin requests.',
|
|
210
|
+
example: '1234567890'
|
|
211
|
+
},
|
|
212
|
+
time_creation_s: {
|
|
213
|
+
type: 'integer',
|
|
214
|
+
description: 'The Unix epoch timestamp in seconds',
|
|
215
|
+
example: 1632384153
|
|
216
|
+
},
|
|
202
217
|
client_id: {
|
|
203
218
|
type: 'string',
|
|
204
219
|
description: 'UUID4 of the register according to the signing unit. Must be uniquely generated on the dashboard.',
|
|
@@ -204,6 +204,11 @@ module.exports = {
|
|
|
204
204
|
format: 'uuid',
|
|
205
205
|
description: 'The common identifier of this order process (to be found on all deltas as well -> "order")'
|
|
206
206
|
},
|
|
207
|
+
number: oneOf({
|
|
208
|
+
type: 'integer',
|
|
209
|
+
example: 34,
|
|
210
|
+
description: 'The counting number of the underlying order'
|
|
211
|
+
}),
|
|
207
212
|
started_at: {
|
|
208
213
|
type: 'string',
|
|
209
214
|
format: 'date-time',
|