@tillhub/schemas 6.163.0 → 6.165.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,18 @@
1
+ # [6.165.0](https://github.com/tillhub/schemas/compare/v6.164.0...v6.165.0) (2022-10-20)
2
+
3
+
4
+ ### Features
5
+
6
+ * **configurations:** interfaces ([1206a31](https://github.com/tillhub/schemas/commit/1206a31))
7
+
8
+ # [6.164.0](https://github.com/tillhub/schemas/compare/v6.163.0...v6.164.0) (2022-10-20)
9
+
10
+
11
+ ### Features
12
+
13
+ * **configurations:** base ([06aaf8a](https://github.com/tillhub/schemas/commit/06aaf8a))
14
+ * **configurations:** tips ([0947fcb](https://github.com/tillhub/schemas/commit/0947fcb))
15
+
1
16
  # [6.163.0](https://github.com/tillhub/schemas/compare/v6.162.0...v6.163.0) (2022-09-29)
2
17
 
3
18
 
@@ -267,16 +267,7 @@ module.exports = {
267
267
  }
268
268
  ]
269
269
  },
270
- tips: {
271
- anyOf: [
272
- {
273
- type: 'null'
274
- },
275
- {
276
- type: 'object'
277
- }
278
- ]
279
- },
270
+ tips: require('./items/tips'),
280
271
  emails: {
281
272
  anyOf: [
282
273
  {
@@ -53,6 +53,7 @@ module.exports = {
53
53
  }
54
54
  }),
55
55
  tips_expense_note_required: oneOf({
56
+ description: 'Defines if a note required when an expense is made for tips',
56
57
  type: 'boolean',
57
58
  default: false
58
59
  }),
@@ -141,6 +141,11 @@ module.exports = {
141
141
  type: 'boolean',
142
142
  default: false
143
143
  }),
144
+ omit_amount_on_reversals: oneOf({
145
+ description: 'Defines if amount can be omitted in reversals',
146
+ type: 'boolean',
147
+ default: false
148
+ }),
144
149
  inter_call_delay_seconds: oneOf({
145
150
  type: 'number',
146
151
  description: 'Artificial delay between a previous terminal response and the next terminal request when performed automatically (some devices require additional cooldowns to avoid \'busy\' states)',
@@ -62,28 +62,30 @@ const tipsCartItemTemplate = {
62
62
  }
63
63
  }
64
64
 
65
- module.exports = {
65
+ module.exports = oneOf({
66
66
  type: 'object',
67
+ required: [
68
+ 'owner_item',
69
+ 'employee_item'
70
+ ],
67
71
  properties: {
68
- enabled: {
72
+ enabled: oneOf({
69
73
  description: 'global on-off-switch for the tips-feature',
70
74
  type: 'boolean',
71
75
  default: false
72
- },
73
- max_factor: {
74
- ...oneOf({
75
- description: 'The maximum multiplier to determine tips suggestions from a given cart price.',
76
- type: 'number',
77
- minimum: 1.0,
78
- maximum: 2.0
79
- }),
76
+ }),
77
+ max_factor: oneOf({
78
+ description: 'The maximum multiplier to determine tips suggestions from a given cart price.',
79
+ type: 'number',
80
+ minimum: 1.0,
81
+ maximum: 2.0,
80
82
  default: null // -> 1.3 in POS
81
- },
82
- auto_propose: {
83
+ }),
84
+ auto_propose: oneOf({
83
85
  description: 'if true, automatically selects the highest tip possible according to the given amount or the max_factor, no tips otherwise',
84
86
  type: 'boolean',
85
87
  default: false
86
- },
88
+ }),
87
89
  owner_item: {
88
90
  description: 'Tip item template if the shop owner IS the recipient of the tip (e.g. non-zero tax account).',
89
91
  ...tipsCartItemTemplate
@@ -92,28 +94,25 @@ module.exports = {
92
94
  description: 'Tip item template if the shop owner is NOT the recipient of the tip (e.g. zero tax account).',
93
95
  ...tipsCartItemTemplate
94
96
  },
95
- payment_types: {
96
- ...oneOf({
97
- description: 'Defines which payment types can be used with the tips-feature',
98
- type: 'array',
99
- items: {
100
- type: 'string',
101
- 'enum': [
102
- 'cash',
103
- 'card',
104
- 'invoice',
105
- 'card_opi', // deprecated, use 'card' instead
106
- 'card_concardis', // deprecated, use 'card' instead
107
- 'card_tim', // deprecated, use 'card' instead
108
- 'card_adyen', // deprecated, use 'card' instead
109
- 'gift_card',
110
- 'default',
111
- 'undefined',
112
- 'voucher'
113
- ]
114
- }
115
- }),
116
- default: null // -> tips feature disabled in POS
117
- }
97
+ payment_types: oneOf({
98
+ description: 'Defines which payment types can be used with the tips-feature',
99
+ type: 'array',
100
+ items: {
101
+ type: 'string',
102
+ 'enum': [
103
+ 'cash',
104
+ 'card',
105
+ 'invoice',
106
+ 'card_opi', // deprecated, use 'card' instead
107
+ 'card_concardis', // deprecated, use 'card' instead
108
+ 'card_tim', // deprecated, use 'card' instead
109
+ 'card_adyen', // deprecated, use 'card' instead
110
+ 'gift_card',
111
+ 'default',
112
+ 'undefined',
113
+ 'voucher'
114
+ ]
115
+ }
116
+ })
118
117
  }
119
- }
118
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tillhub/schemas",
3
- "version": "6.163.0",
3
+ "version": "6.165.0",
4
4
  "private": false,
5
5
  "description": "All Tillhub API OpenAPI 3 compatible JSON Schemas.",
6
6
  "main": "./lib/index.js",