@tillhub/schemas 6.86.0 → 6.89.1
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/branches/base.js +2 -3
- package/lib/v0/index.js +1 -0
- package/lib/v0/loyalty_abocard_systems/base.js +216 -0
- package/lib/v0/loyalty_abocard_systems/create.js +20 -0
- package/lib/v0/loyalty_abocard_systems/get.js +9 -0
- package/lib/v0/loyalty_abocard_systems/index.js +3 -0
- package/lib/v0/loyalty_abocard_systems/update.js +20 -0
- package/lib/v0/voucher_systems/base.js +8 -1
- package/lib/v1/configurations/items/interfaces.js +6 -1
- package/lib/v1/registers/base.js +19 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,37 @@
|
|
|
1
|
+
## [6.89.1](https://github.com/tillhub/schemas/compare/v6.89.0...v6.89.1) (2021-09-21)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* hijacked configuration param properly described ([c21090c](https://github.com/tillhub/schemas/commit/c21090c))
|
|
7
|
+
|
|
8
|
+
# [6.89.0](https://github.com/tillhub/schemas/compare/v6.88.0...v6.89.0) (2021-09-21)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **fiscal signing:** add base_url ([90d2f67](https://github.com/tillhub/schemas/commit/90d2f67))
|
|
14
|
+
* **fiscal_signing:** add api version ([b1dc80f](https://github.com/tillhub/schemas/commit/b1dc80f))
|
|
15
|
+
|
|
16
|
+
# [6.88.0](https://github.com/tillhub/schemas/compare/v6.87.1...v6.88.0) (2021-09-21)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* **configurations:** interfaces ([5c55f6f](https://github.com/tillhub/schemas/commit/5c55f6f))
|
|
22
|
+
* **configurations:** interfaces ([b94687c](https://github.com/tillhub/schemas/commit/b94687c))
|
|
23
|
+
|
|
24
|
+
# [6.87.0](https://github.com/tillhub/schemas/compare/v6.86.0...v6.87.0) (2021-09-17)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
* **loyalties-abocard-systems:** add abocard systems schema #API-1017 ([af58999](https://github.com/tillhub/schemas/commit/af58999)), closes [#API-1017](https://github.com/tillhub/schemas/issues/API-1017)
|
|
30
|
+
* **loyalties-abocard-systems:** add description #API-1017 ([e74bc61](https://github.com/tillhub/schemas/commit/e74bc61)), closes [#API-1017](https://github.com/tillhub/schemas/issues/API-1017)
|
|
31
|
+
* **loyalties-abocard-systems:** add more details and examples #API-1017 ([301578e](https://github.com/tillhub/schemas/commit/301578e)), closes [#API-1017](https://github.com/tillhub/schemas/issues/API-1017)
|
|
32
|
+
* **loyalties-abocard-systems:** differ request and response properties set #API-1017 ([9ba50fe](https://github.com/tillhub/schemas/commit/9ba50fe)), closes [#API-1017](https://github.com/tillhub/schemas/issues/API-1017)
|
|
33
|
+
* **loyalty_systems:** abocards ([7715d14](https://github.com/tillhub/schemas/commit/7715d14))
|
|
34
|
+
|
|
1
35
|
# [6.86.0](https://github.com/tillhub/schemas/compare/v6.85.0...v6.86.0) (2021-09-16)
|
|
2
36
|
|
|
3
37
|
|
package/lib/v0/branches/base.js
CHANGED
|
@@ -365,11 +365,10 @@ module.exports = {
|
|
|
365
365
|
]
|
|
366
366
|
},
|
|
367
367
|
configuration: {
|
|
368
|
-
description: '
|
|
368
|
+
description: 'Deprecated: Overwriting a fa_account_number on cash payments for DATEV export.',
|
|
369
369
|
anyOf: [
|
|
370
370
|
{
|
|
371
|
-
type: 'string'
|
|
372
|
-
format: 'uuid'
|
|
371
|
+
type: 'string'
|
|
373
372
|
},
|
|
374
373
|
{
|
|
375
374
|
type: 'null'
|
package/lib/v0/index.js
CHANGED
|
@@ -31,6 +31,7 @@ module.exports.warehouses = require('./warehouses')
|
|
|
31
31
|
module.exports.product_service_questions = require('./product_service_questions')
|
|
32
32
|
module.exports.product_service_question_groups = require('./product_service_question_groups')
|
|
33
33
|
module.exports.time_entries = require('./time_entries')
|
|
34
|
+
module.exports.loyalty_abocard_systems = require('./loyalty_abocard_systems')
|
|
34
35
|
module.exports.loyalty_systems = require('./loyalty_systems')
|
|
35
36
|
module.exports.loyalty_accounts = require('./loyalty_accounts')
|
|
36
37
|
module.exports.loyalty_cards = require('./loyalty_cards')
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
const { oneOf } = require('../../helpers/payload-or-null')
|
|
2
|
+
const baseObject = require('../../common/base')
|
|
3
|
+
const voucherSystemPropertiesFull = require('../voucher_systems/base')
|
|
4
|
+
|
|
5
|
+
const {
|
|
6
|
+
name: omitName,
|
|
7
|
+
product: omitProduct,
|
|
8
|
+
actions: omitActions,
|
|
9
|
+
locations: omitLocations,
|
|
10
|
+
location_groups: omitLocationGroups,
|
|
11
|
+
...voucherSystemProperties
|
|
12
|
+
} = voucherSystemPropertiesFull
|
|
13
|
+
|
|
14
|
+
const abocardAction = {
|
|
15
|
+
description: 'The abocard action',
|
|
16
|
+
type: 'object',
|
|
17
|
+
additionalProperties: false,
|
|
18
|
+
required: [
|
|
19
|
+
'id',
|
|
20
|
+
'type'
|
|
21
|
+
],
|
|
22
|
+
properties: {
|
|
23
|
+
id: {
|
|
24
|
+
description: 'The abocard action reference ID',
|
|
25
|
+
type: 'string',
|
|
26
|
+
format: 'uuid',
|
|
27
|
+
example: '43847a66-97dc-4ac2-8e8a-c44920e1f22f'
|
|
28
|
+
},
|
|
29
|
+
type: {
|
|
30
|
+
description: 'The abocard action type',
|
|
31
|
+
type: 'string',
|
|
32
|
+
enum: [
|
|
33
|
+
'sell'
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
product: {
|
|
37
|
+
description: 'The product associated with this action. Product gets created automatically when creating a abocard system and based on "linked_product" vat and "system_revenue_account" field values.',
|
|
38
|
+
...oneOf({
|
|
39
|
+
type: 'string',
|
|
40
|
+
format: 'uuid',
|
|
41
|
+
example: '43847a66-97dc-4ac2-8e8a-c44920e1f22f'
|
|
42
|
+
})
|
|
43
|
+
},
|
|
44
|
+
context: {
|
|
45
|
+
description: 'Specifies from where this action can be triggered',
|
|
46
|
+
...oneOf({
|
|
47
|
+
type: 'string',
|
|
48
|
+
enum: [
|
|
49
|
+
'library'
|
|
50
|
+
]
|
|
51
|
+
})
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const request = {
|
|
57
|
+
system_type: {
|
|
58
|
+
description: 'The type of abocard system',
|
|
59
|
+
type: 'string',
|
|
60
|
+
enum: [
|
|
61
|
+
'voucher'
|
|
62
|
+
],
|
|
63
|
+
example: 'voucher'
|
|
64
|
+
},
|
|
65
|
+
name: oneOf({
|
|
66
|
+
description: 'The abocard system name',
|
|
67
|
+
example: 'Buy 4 haircuts and pay 10 Bucks less.',
|
|
68
|
+
type: 'string',
|
|
69
|
+
maxLength: 255
|
|
70
|
+
}),
|
|
71
|
+
voucher_system: oneOf({
|
|
72
|
+
description: 'Referenced voucher system when system_type == "voucher". 1 to 1 relationship with voucher system instance.',
|
|
73
|
+
type: 'object',
|
|
74
|
+
additionalProperties: false,
|
|
75
|
+
required: [],
|
|
76
|
+
properties: {
|
|
77
|
+
id: {
|
|
78
|
+
description: 'Voucher system primary key (should be omitted for creation but required for update)',
|
|
79
|
+
example: 'ad572a0d-301a-4270-8a49-5f720f2b277d',
|
|
80
|
+
type: 'string',
|
|
81
|
+
format: 'uuid'
|
|
82
|
+
},
|
|
83
|
+
...voucherSystemProperties
|
|
84
|
+
}
|
|
85
|
+
}),
|
|
86
|
+
actions: {
|
|
87
|
+
description: 'Defines actions for various abocard system life cycle events',
|
|
88
|
+
...oneOf({
|
|
89
|
+
type: 'array',
|
|
90
|
+
items: {
|
|
91
|
+
description: 'Available actions for this system',
|
|
92
|
+
...abocardAction
|
|
93
|
+
}
|
|
94
|
+
})
|
|
95
|
+
},
|
|
96
|
+
linked_product: oneOf({
|
|
97
|
+
description: 'The Product that is linked to the abocard, if the abocard system requires a bound product. On creation of the system, a new products (abocard XYZ) is being created for "actions[...].product" and "voucher_system.product" based on this product. The VAT ID reference is propogating system_tax_account, as systems with product binding are creating single purpose vouchers that are tax relevant.',
|
|
98
|
+
example: '3610eb8a-2d21-4034-9aa6-0a097a2ce5f2',
|
|
99
|
+
type: 'string',
|
|
100
|
+
format: 'uuid'
|
|
101
|
+
}),
|
|
102
|
+
system_revenue_account: oneOf({
|
|
103
|
+
description: 'Referenced revenue account. New products being created for "actions[...].product" and "voucher_system.product" will use this revenue account.',
|
|
104
|
+
example: '075a2f42-c29f-44d2-9ed3-2d636888e9b5',
|
|
105
|
+
type: 'string',
|
|
106
|
+
format: 'uuid'
|
|
107
|
+
}),
|
|
108
|
+
system_tax_account: oneOf({
|
|
109
|
+
description: 'Referenced tax account. New products being created for "actions[...].product" and "voucher_system.product" will use this tax account.',
|
|
110
|
+
example: '075a2f42-c29f-44d2-9ed3-2d636888e9b5',
|
|
111
|
+
type: 'string',
|
|
112
|
+
format: 'uuid'
|
|
113
|
+
}),
|
|
114
|
+
system_tax_rate: oneOf({
|
|
115
|
+
description: 'New products being created for "actions[...].product" and "voucher_system.product" will use this tax rate.',
|
|
116
|
+
example: '075a2f42-c29f-44d2-9ed3-2d636888e9b5',
|
|
117
|
+
type: 'string',
|
|
118
|
+
format: 'uuid'
|
|
119
|
+
}),
|
|
120
|
+
used_product_price: oneOf({
|
|
121
|
+
description: 'For type=voucher abocard systems: The price of the product used to calculate the value of discounts and vouchers.',
|
|
122
|
+
example: 12.99,
|
|
123
|
+
type: 'number',
|
|
124
|
+
minimum: 0,
|
|
125
|
+
multipleOf: 0.01
|
|
126
|
+
}),
|
|
127
|
+
price_source: oneOf({
|
|
128
|
+
description: 'The source of where the product price was taken from.',
|
|
129
|
+
type: 'string',
|
|
130
|
+
enum: [
|
|
131
|
+
'product',
|
|
132
|
+
'pricebook_entry'
|
|
133
|
+
]
|
|
134
|
+
}),
|
|
135
|
+
price_id: oneOf({
|
|
136
|
+
description: 'The price reference of the price source. In case of price book entries, a uuid, in case of default price, the path of the JSONB fields.',
|
|
137
|
+
example: 'default_prices[0]',
|
|
138
|
+
type: 'string',
|
|
139
|
+
maxLength: 255
|
|
140
|
+
}),
|
|
141
|
+
selling_price: oneOf({
|
|
142
|
+
description: 'The selling price of the abocard for the POS.',
|
|
143
|
+
example: 11.99,
|
|
144
|
+
type: 'number',
|
|
145
|
+
minimum: 0,
|
|
146
|
+
multipleOf: 0.01
|
|
147
|
+
}),
|
|
148
|
+
discount_value: oneOf({
|
|
149
|
+
description: 'For type=voucher abocard systems: The total discount value assigned to the abocard',
|
|
150
|
+
example: 2.00,
|
|
151
|
+
type: 'number',
|
|
152
|
+
minimum: 0,
|
|
153
|
+
multipleOf: 0.01
|
|
154
|
+
}),
|
|
155
|
+
total_value: oneOf({
|
|
156
|
+
description: 'For type=voucher abocard systems: The total value of the abocard (selling price plus discount)',
|
|
157
|
+
example: 9.99,
|
|
158
|
+
type: 'number',
|
|
159
|
+
minimum: 0,
|
|
160
|
+
multipleOf: 0.01
|
|
161
|
+
}),
|
|
162
|
+
units: oneOf({
|
|
163
|
+
description: 'For type=voucher abocard systems: The amount of vouchers that we issue on creation of the abocard',
|
|
164
|
+
type: 'number',
|
|
165
|
+
minimum: 0
|
|
166
|
+
}),
|
|
167
|
+
voucher_value_per_unit: oneOf({
|
|
168
|
+
description: 'For type=voucher abocard systems: The voucher value per unit (when system_type == "voucher")',
|
|
169
|
+
example: 3,
|
|
170
|
+
type: 'number',
|
|
171
|
+
minimum: 0,
|
|
172
|
+
multipleOf: 0.01
|
|
173
|
+
}),
|
|
174
|
+
discount_value_per_unit: oneOf({
|
|
175
|
+
description: 'For type=voucher abocard systems: The discount value per unit',
|
|
176
|
+
example: 1.33,
|
|
177
|
+
type: 'number',
|
|
178
|
+
minimum: 0,
|
|
179
|
+
multipleOf: 0.01
|
|
180
|
+
}),
|
|
181
|
+
locations: oneOf({
|
|
182
|
+
description: 'Locations where abocard system is applicable',
|
|
183
|
+
example: ['6d541143-2ada-4ece-9cc1-1260e7e5f718'],
|
|
184
|
+
type: 'array',
|
|
185
|
+
items: {
|
|
186
|
+
type: 'string',
|
|
187
|
+
format: 'uuid'
|
|
188
|
+
}
|
|
189
|
+
}),
|
|
190
|
+
location_groups: oneOf({
|
|
191
|
+
description: 'Location groups where abocard system is applicable',
|
|
192
|
+
example: ['25812497-4559-458c-ab0e-faa93e513d3e'],
|
|
193
|
+
type: 'array',
|
|
194
|
+
items: {
|
|
195
|
+
type: 'string',
|
|
196
|
+
format: 'uuid'
|
|
197
|
+
}
|
|
198
|
+
})
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const response = {
|
|
202
|
+
...baseObject,
|
|
203
|
+
deleted: {
|
|
204
|
+
type: 'boolean'
|
|
205
|
+
},
|
|
206
|
+
...request
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
module.exports = {
|
|
210
|
+
request,
|
|
211
|
+
response,
|
|
212
|
+
required: [
|
|
213
|
+
'system_type',
|
|
214
|
+
'name'
|
|
215
|
+
]
|
|
216
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const { request, response, required } = require('./base')
|
|
2
|
+
const commonResponse = require('../../common/response')
|
|
3
|
+
|
|
4
|
+
module.exports.request = {
|
|
5
|
+
$id: 'https://schemas.tillhub.com/v0/loyalty_abocard_systems.create.request.schema.json',
|
|
6
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
7
|
+
additionalProperties: false,
|
|
8
|
+
type: 'object',
|
|
9
|
+
required,
|
|
10
|
+
properties: request
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
module.exports.response = {
|
|
14
|
+
$id: 'https://schemas.tillhub.com/v0/loyalty_abocard_systems.create.response.schema.json',
|
|
15
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
16
|
+
...commonResponse({ resultItems: {
|
|
17
|
+
type: 'object',
|
|
18
|
+
properties: response
|
|
19
|
+
} })
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const { request, response, required } = require('./base')
|
|
2
|
+
const commonResponse = require('../../common/response')
|
|
3
|
+
|
|
4
|
+
module.exports.request = {
|
|
5
|
+
$id: 'https://schemas.tillhub.com/v0/loyalty_abocard_systems.update.request.schema.json',
|
|
6
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
7
|
+
additionalProperties: false,
|
|
8
|
+
type: 'object',
|
|
9
|
+
required,
|
|
10
|
+
properties: request
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
module.exports.response = {
|
|
14
|
+
$id: 'https://schemas.tillhub.com/v0/loyalty_abocard_systems.update.response.schema.json',
|
|
15
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
16
|
+
...commonResponse({ resultItems: {
|
|
17
|
+
type: 'object',
|
|
18
|
+
properties: response
|
|
19
|
+
} })
|
|
20
|
+
}
|
|
@@ -235,7 +235,14 @@ module.exports = {
|
|
|
235
235
|
locations: oneOf({
|
|
236
236
|
type: 'array',
|
|
237
237
|
description: 'If defined then only these locations will be using this system. If not defined, there will be no restrictions on which locations can use this system.',
|
|
238
|
-
|
|
238
|
+
items: {
|
|
239
|
+
type: 'string',
|
|
240
|
+
format: 'uuid'
|
|
241
|
+
}
|
|
242
|
+
}),
|
|
243
|
+
branch_groups: oneOf({
|
|
244
|
+
type: 'array',
|
|
245
|
+
description: 'If defined then only these branch groups (plus specified locations if any) will be using this system.',
|
|
239
246
|
items: {
|
|
240
247
|
type: 'string',
|
|
241
248
|
format: 'uuid'
|
|
@@ -110,7 +110,12 @@ module.exports = {
|
|
|
110
110
|
enabled: {
|
|
111
111
|
type: 'boolean',
|
|
112
112
|
default: true
|
|
113
|
-
}
|
|
113
|
+
},
|
|
114
|
+
swiss: oneOf({
|
|
115
|
+
description: 'Defines if swiss-specific handling of the OPI protocol will be used',
|
|
116
|
+
type: 'boolean',
|
|
117
|
+
default: false
|
|
118
|
+
})
|
|
114
119
|
}
|
|
115
120
|
},
|
|
116
121
|
sumup: {
|
package/lib/v1/registers/base.js
CHANGED
|
@@ -220,6 +220,25 @@ module.exports = {
|
|
|
220
220
|
description: 'Per fiskaly account: secret for their API',
|
|
221
221
|
example: 'QmSgQtMNfm0uZjVedM1BvqGRIQ3D9wjclLYDZcXPZve'
|
|
222
222
|
},
|
|
223
|
+
api_version: {
|
|
224
|
+
...oneOf({
|
|
225
|
+
description: 'Fiskaly account API version',
|
|
226
|
+
type: 'string',
|
|
227
|
+
enum: [
|
|
228
|
+
'v1',
|
|
229
|
+
'v2'
|
|
230
|
+
],
|
|
231
|
+
default: 'v1'
|
|
232
|
+
})
|
|
233
|
+
},
|
|
234
|
+
base_url: {
|
|
235
|
+
...oneOf({
|
|
236
|
+
type: 'string',
|
|
237
|
+
description: 'A custom Fiskaly API endpoint. If not set, the POS will use the version specific default endpoint.',
|
|
238
|
+
example: 'https://kassensichv-middleware.fiskaly.com/api/v2/',
|
|
239
|
+
default: null
|
|
240
|
+
})
|
|
241
|
+
},
|
|
223
242
|
client_timeout_ms: oneOf({
|
|
224
243
|
type: 'integer',
|
|
225
244
|
description: 'The timeout in milliseconds for the Fiskaly client component.',
|