@tillhub/schemas 6.105.0 → 6.109.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 +34 -0
- package/lib/v0/expense_accounts/base.js +14 -0
- package/lib/v0/loyalty_abocard_systems/base.js +9 -1
- package/lib/v0/staff/base.js +5 -0
- package/lib/v0/trash/get.js +1 -0
- package/lib/v0/trash/update.js +1 -0
- package/lib/v1/carts/items/create.js +2 -1
- package/lib/v1/transactions/components/embedded/discount/base.js +5 -2
- package/lib/v1/transactions/components/embedded/voucher/base.js +7 -1
- package/lib/v1/transactions/legacy/items/base.js +4 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,37 @@
|
|
|
1
|
+
# [6.109.0](https://github.com/tillhub/schemas/compare/v6.108.0...v6.109.0) (2022-01-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **expense_accounts:** add branch_groups ([8c8cefc](https://github.com/tillhub/schemas/commit/8c8cefc))
|
|
7
|
+
|
|
8
|
+
# [6.108.0](https://github.com/tillhub/schemas/compare/v6.107.0...v6.108.0) (2021-12-22)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **pricebooks:** Add Price Books to untrash ([#654](https://github.com/tillhub/schemas/issues/654)) ([d7850b5](https://github.com/tillhub/schemas/commit/d7850b5))
|
|
14
|
+
|
|
15
|
+
# [6.107.0](https://github.com/tillhub/schemas/compare/v6.106.0...v6.107.0) (2021-12-21)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* **staffs:** Staff permissions from template instead of scopes ([#653](https://github.com/tillhub/schemas/issues/653)) ([821e7c5](https://github.com/tillhub/schemas/commit/821e7c5))
|
|
21
|
+
|
|
22
|
+
# [6.106.0](https://github.com/tillhub/schemas/compare/v6.105.0...v6.106.0) (2021-12-13)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* **transactions:** items ([876dc02](https://github.com/tillhub/schemas/commit/876dc02))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
|
|
32
|
+
* **transactions:** legacy ([eb5ae77](https://github.com/tillhub/schemas/commit/eb5ae77))
|
|
33
|
+
* **transactions:** legacy ([910471b](https://github.com/tillhub/schemas/commit/910471b))
|
|
34
|
+
|
|
1
35
|
# [6.105.0](https://github.com/tillhub/schemas/compare/v6.104.0...v6.105.0) (2021-12-13)
|
|
2
36
|
|
|
3
37
|
|
|
@@ -83,6 +83,20 @@ module.exports = {
|
|
|
83
83
|
}
|
|
84
84
|
]
|
|
85
85
|
},
|
|
86
|
+
branch_groups: {
|
|
87
|
+
oneOf: [
|
|
88
|
+
{
|
|
89
|
+
type: 'array',
|
|
90
|
+
items: {
|
|
91
|
+
type: 'string',
|
|
92
|
+
format: 'uuid'
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
type: 'null'
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
},
|
|
86
100
|
accepts_booking_from_safe: {
|
|
87
101
|
type: 'boolean',
|
|
88
102
|
default: false
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const { oneOf } = require('../../helpers/payload-or-null')
|
|
2
2
|
const baseObject = require('../../common/base')
|
|
3
|
+
const currencyAmount = require('../../common/currency_amount')
|
|
3
4
|
const voucherSystemPropertiesFull = require('../voucher_systems/base')
|
|
4
5
|
|
|
5
6
|
const {
|
|
@@ -260,7 +261,14 @@ const response = {
|
|
|
260
261
|
deleted: {
|
|
261
262
|
type: 'boolean'
|
|
262
263
|
},
|
|
263
|
-
...request
|
|
264
|
+
...request,
|
|
265
|
+
actual_amount: {
|
|
266
|
+
description: 'The calculated amount of abocard based on abocard system settings (discount_type, selling_price_method, etc.) and location',
|
|
267
|
+
...oneOf({
|
|
268
|
+
...currencyAmount
|
|
269
|
+
}),
|
|
270
|
+
default: null
|
|
271
|
+
}
|
|
264
272
|
}
|
|
265
273
|
|
|
266
274
|
module.exports = {
|
package/lib/v0/staff/base.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const { oneOf } = require('../../helpers/payload-or-null')
|
|
2
|
+
|
|
1
3
|
module.exports = {
|
|
2
4
|
firstname: {
|
|
3
5
|
anyOf: [
|
|
@@ -210,6 +212,9 @@ module.exports = {
|
|
|
210
212
|
}
|
|
211
213
|
]
|
|
212
214
|
},
|
|
215
|
+
user_permission_template_id: oneOf({
|
|
216
|
+
type: 'string'
|
|
217
|
+
}),
|
|
213
218
|
active: {
|
|
214
219
|
type: 'boolean'
|
|
215
220
|
},
|
package/lib/v0/trash/get.js
CHANGED
package/lib/v0/trash/update.js
CHANGED
|
@@ -88,7 +88,8 @@ module.exports = {
|
|
|
88
88
|
'sconto',
|
|
89
89
|
'item',
|
|
90
90
|
'promotion',
|
|
91
|
-
'voucher'
|
|
91
|
+
'voucher',
|
|
92
|
+
'product_voucher'
|
|
92
93
|
]
|
|
93
94
|
}),
|
|
94
95
|
name: {
|
|
@@ -132,7 +133,9 @@ module.exports = {
|
|
|
132
133
|
'item',
|
|
133
134
|
'customer',
|
|
134
135
|
'promotion',
|
|
135
|
-
'sconto'
|
|
136
|
+
'sconto',
|
|
137
|
+
'voucher',
|
|
138
|
+
'product_voucher'
|
|
136
139
|
]
|
|
137
140
|
},
|
|
138
141
|
{
|
|
@@ -123,6 +123,10 @@ module.exports = {
|
|
|
123
123
|
maxLength: 2048,
|
|
124
124
|
description: 'Messages from voucher processing.'
|
|
125
125
|
},
|
|
126
|
+
creation: oneOf({
|
|
127
|
+
type: 'object',
|
|
128
|
+
description: 'Client specified container to store created abocards and/or vouchers.'
|
|
129
|
+
}),
|
|
126
130
|
type: {
|
|
127
131
|
type: 'string',
|
|
128
132
|
description: 'Mainly legacy support for Fleurop flows.',
|
|
@@ -136,7 +140,9 @@ module.exports = {
|
|
|
136
140
|
'tillhub_create', // formerly 6
|
|
137
141
|
'tillhub_recharge', // formerly 7
|
|
138
142
|
'tillhub_reedeem', // formerly 8
|
|
139
|
-
'tillhub_percentage' // formerly 9
|
|
143
|
+
'tillhub_percentage', // formerly 9
|
|
144
|
+
'tillhub_product', // ...
|
|
145
|
+
'tillhub_abocard_sell' // ...
|
|
140
146
|
]
|
|
141
147
|
},
|
|
142
148
|
status: {
|
|
@@ -285,7 +285,6 @@ module.exports = {
|
|
|
285
285
|
})
|
|
286
286
|
},
|
|
287
287
|
discounts: {
|
|
288
|
-
deprecated: true,
|
|
289
288
|
...oneOf({
|
|
290
289
|
type: 'array',
|
|
291
290
|
items: {
|
|
@@ -306,7 +305,8 @@ module.exports = {
|
|
|
306
305
|
'sconto', // originated from rounding currencies that do not use a 0.01 physical unit, e.g. CHF
|
|
307
306
|
'item', // discounts that can only be used per item
|
|
308
307
|
'promotion', // originated from applying the outcome of a promotion
|
|
309
|
-
'voucher' // originated from applying a percentage voucher
|
|
308
|
+
'voucher', // originated from applying a percentage voucher
|
|
309
|
+
'product_voucher' // originated from applying a voucher bound to a product
|
|
310
310
|
],
|
|
311
311
|
description: 'The group type of discount (type was taken)'
|
|
312
312
|
},
|
|
@@ -410,6 +410,8 @@ module.exports = {
|
|
|
410
410
|
'voucher_is_locked', // If is_voucher, indicates the locked state within the API
|
|
411
411
|
'voucher_message', // If is_voucher, collected messages from voucher processing API calls
|
|
412
412
|
'voucher_title', // If is_voucher, a currently not used custom title
|
|
413
|
+
'voucher_linked_product', // If is_voucher and of type product, the id of the affected product
|
|
414
|
+
'voucher_creation', // If is_voucher and it involves creation of vocuhers or abocards - a stringified JSON of the relevant contents
|
|
413
415
|
/*
|
|
414
416
|
the voucher_type enum:
|
|
415
417
|
[
|