@tillhub/schemas 6.162.0 → 6.164.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.164.0](https://github.com/tillhub/schemas/compare/v6.163.0...v6.164.0) (2022-10-20)
2
+
3
+
4
+ ### Features
5
+
6
+ * **configurations:** base ([06aaf8a](https://github.com/tillhub/schemas/commit/06aaf8a))
7
+ * **configurations:** tips ([0947fcb](https://github.com/tillhub/schemas/commit/0947fcb))
8
+
9
+ # [6.163.0](https://github.com/tillhub/schemas/compare/v6.162.0...v6.163.0) (2022-09-29)
10
+
11
+
12
+ ### Features
13
+
14
+ * **client_account:** better documentation ([ab4ae8f](https://github.com/tillhub/schemas/commit/ab4ae8f))
15
+
1
16
  # [6.162.0](https://github.com/tillhub/schemas/compare/v6.161.0...v6.162.0) (2022-09-29)
2
17
 
3
18
 
@@ -25,13 +25,14 @@ module.exports = {
25
25
  type: 'boolean'
26
26
  },
27
27
  preferred_initialization: {
28
- description: 'remote means Staging, local means Production enviroment',
28
+ description: 'When local data ís missing - counting numbers can be initialized from the corresponding API table or - if available - from a secondary local storage (e.g. keychain on iOS)',
29
29
  type: 'string',
30
- 'enum': [
31
- 'remote',
32
- 'local'
30
+ enum: [
31
+ // ONLY on a fresh POS installation
32
+ 'remote', // API data will be considered as primary source of truth and keychain data is ignored even when available
33
+ 'local' // local data will be considered as primary source of truth, API will be considered in absence of local data
33
34
  ],
34
- 'default': 'remote'
35
+ default: 'remote'
35
36
  },
36
37
  template: {
37
38
  type: 'string',
@@ -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
  }),
@@ -702,8 +702,8 @@ module.exports = {
702
702
  type: 'string',
703
703
  enum: [
704
704
  // ONLY on a fresh POS installation
705
- 'remote', // API data will be considered as primaray source of truth and keychain data is ignored even when available
706
- 'local' // local data will be considered as primaray source of truth, API will be considered in absence of local data
705
+ 'remote', // API data will be considered as primary source of truth and keychain data is ignored even when available
706
+ 'local' // local data will be considered as primary source of truth, API will be considered in absence of local data
707
707
  ],
708
708
  default: 'remote'
709
709
  })
@@ -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.162.0",
3
+ "version": "6.164.0",
4
4
  "private": false,
5
5
  "description": "All Tillhub API OpenAPI 3 compatible JSON Schemas.",
6
6
  "main": "./lib/index.js",