@tillhub/schemas 6.268.0 → 6.269.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,10 @@
1
+ # [6.269.0](https://github.com/tillhub/schemas/compare/v6.268.0...v6.269.0) (2023-10-24)
2
+
3
+
4
+ ### Features
5
+
6
+ * **fiscalization:** Update schema with new configuration ([3a06905](https://github.com/tillhub/schemas/commit/3a06905))
7
+
1
8
  # [6.268.0](https://github.com/tillhub/schemas/compare/v6.267.0...v6.268.0) (2023-10-20)
2
9
 
3
10
 
@@ -133,7 +133,7 @@ module.exports = {
133
133
  ...oneOf({
134
134
  type: 'integer',
135
135
  example: 50000,
136
- description: 'The amount of cash when the register was opened (e.g. 50.00€)'
136
+ description: 'The amount of cash when the register was opened (e.g. 50.00€) - before any adjustments -> thus must be equal to the previoius closing amount.'
137
137
  })
138
138
  },
139
139
  cash_revenue: {
@@ -169,14 +169,14 @@ module.exports = {
169
169
  ...oneOf({
170
170
  type: 'integer',
171
171
  example: 281000,
172
- description: 'The calulated (should be) cash amount when closing the register, POS: cash_begin + cash_revenue + expenses_cash_total + tips_cash'
172
+ description: 'The calulated (expected) cash amount when closing the register, POS: cash_begin + cash_revenue + expenses_cash_total + tips_cash'
173
173
  })
174
174
  },
175
175
  cash_total_counted: {
176
176
  ...oneOf({
177
177
  type: 'integer',
178
178
  example: 280000,
179
- description: 'The (is) cash amount - counted by a cashier - when closing the register, POS: user input'
179
+ description: 'The (actual) cash amount - counted by a cashier - when closing the register, POS: user input'
180
180
  })
181
181
  },
182
182
  cash_discrepancy: {
@@ -43,6 +43,7 @@ module.exports = {
43
43
  enum: [
44
44
  'fiskaltrust',
45
45
  'tse_fiskaly',
46
+ 'at_fiskaly',
46
47
  'tse_epson',
47
48
  'fr_NF525',
48
49
  'it_epson'
@@ -217,6 +217,7 @@ module.exports = {
217
217
  enum: [
218
218
  'fiskaltrust',
219
219
  'tse_fiskaly',
220
+ 'at_fiskaly',
220
221
  'tse_epson',
221
222
  'fr_NF525',
222
223
  'it_epson'
@@ -36,6 +36,7 @@ module.exports = {
36
36
  enum: [
37
37
  'fiskaltrust',
38
38
  'tse_fiskaly',
39
+ 'at_fiskaly',
39
40
  'tse_epson',
40
41
  'fr_NF525'
41
42
  ],
@@ -21,7 +21,7 @@ module.exports = {
21
21
  ...oneOf({
22
22
  type: 'integer',
23
23
  example: 2000,
24
- description: 'The given amount via this payment, 20.00 EUR or 2000 HUF respectively (represented as integer)'
24
+ description: 'The given amount via this payment, 20.00 EUR or 2000 HUF respectively (represented as integer) - tips are included, change money is not subtracted'
25
25
  })
26
26
  },
27
27
  currency_iso_code: {
@@ -103,7 +103,7 @@ module.exports = {
103
103
  ...oneOf({
104
104
  type: 'integer',
105
105
  example: 110,
106
- description: 'The given tip via this payment, 1.10 EUR or 110 HUF respectively (represented as integer)'
106
+ description: 'The given tip via this payment, 1.10 EUR or 110 HUF respectively (represented as integer) - this is included in \'amount\''
107
107
  })
108
108
  },
109
109
  terminal_journal: {
@@ -260,10 +260,11 @@ module.exports = {
260
260
  }),
261
261
  _amount_total: oneOf({
262
262
  description: stripIndents`
263
- The payed amount total. Excluding any change.
263
+ Manifesting Legacy: The given amount via this payment, 20.00 EUR or 20.00 HUF respectively (represented as Decimal) - tips are included, change money is not subtracted'
264
264
 
265
- NOTE: usually cash payments will be grouped. Also, a cash payment will always carry any possible change money. Even though
266
- a card payment might have caused it.
265
+ NOTE: The intention to use this without tip and change can not be realized as of 2023.
266
+
267
+ 2023: Equal to \'_amount_given\' and \'_amount_requested\'.
267
268
 
268
269
  `,
269
270
  type: 'number',
@@ -284,6 +285,9 @@ module.exports = {
284
285
  be payed e.g. 49.98, but the customer has given 50,00. This
285
286
  is usually of interest in cash payments, or when when customers
286
287
  gave fewer amount than they ought to pay.
288
+
289
+ 2023: Equal to \'_amount_total\' and \'_amount_requested\'.
290
+
287
291
  `,
288
292
  example: '50.00',
289
293
  type: 'number',
@@ -293,12 +297,12 @@ module.exports = {
293
297
  }),
294
298
  _amount_requested: oneOf({
295
299
  description: stripIndents`
296
- The amount that was requested
297
- by the POS e.g. 49.98, regardless
298
- of what was given e.g. 50.00. Hence the rest is change or tip.
299
- This is usually of interest in cash payments.
300
+ The amount that was requested to e.g. a card payment terminal - thus it includes the proposed tip amount.
301
+ See NOTE!
302
+
303
+ NOTE: The intention to use this without tip and change can not be realized as of 2023.
300
304
 
301
- NOTE: this can be used in analytics to rebuild payment flows
305
+ 2023: Equal to \'_amount_total\' and \'_amount_given\'.
302
306
  `,
303
307
  example: '49.98',
304
308
  type: 'number',
@@ -307,11 +311,11 @@ module.exports = {
307
311
  multipleOf: 0.01
308
312
  }),
309
313
  _amount_change: oneOf({
310
- description: stripIndents`The cash amount that was handed back from the
311
- cashier as change.
314
+ description: stripIndents` .
312
315
 
313
- NOTE: that card payments can never have change, but need to cause a cash payment.
316
+ NOTE: usually NULL - as change is tx top level an should currently not be attributed to a single payment (of potentially many).
314
317
 
318
+ 2023: Change can be set on a payment ONLY if top level change is agreed to be 0 .
315
319
  `,
316
320
  example: '49.98',
317
321
  type: 'number',
@@ -41,6 +41,16 @@ module.exports = {
41
41
  type: 'number'
42
42
  })
43
43
  },
44
+ change: oneOf({
45
+ type: 'integer',
46
+ example: 800,
47
+ description: 'The change amount calculated by the API based on tx-top-level change value and attribution to one of the payments'
48
+ }),
49
+ amount_final: oneOf({
50
+ type: 'integer',
51
+ example: 1200,
52
+ description: 'The effectively payed amount calculated by the API, \'amount_final\' = \'amount\' - \'change\''
53
+ }),
44
54
  ...base
45
55
  }
46
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tillhub/schemas",
3
- "version": "6.268.0",
3
+ "version": "6.269.0",
4
4
  "private": false,
5
5
  "description": "All Tillhub API OpenAPI 3 compatible JSON Schemas.",
6
6
  "main": "./lib/index.js",