@tillhub/schemas 6.287.0 → 6.289.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,17 @@
1
+ # [6.289.0](https://github.com/tillhub/schemas/compare/v6.288.0...v6.289.0) (2024-02-13)
2
+
3
+
4
+ ### Features
5
+
6
+ * **configurations:** settings ([6517c36](https://github.com/tillhub/schemas/commit/6517c36))
7
+
8
+ # [6.288.0](https://github.com/tillhub/schemas/compare/v6.287.0...v6.288.0) (2024-02-09)
9
+
10
+
11
+ ### Features
12
+
13
+ * **configurations:** settings ([6f95563](https://github.com/tillhub/schemas/commit/6f95563))
14
+
1
15
  # [6.287.0](https://github.com/tillhub/schemas/compare/v6.286.0...v6.287.0) (2024-02-08)
2
16
 
3
17
 
@@ -63,18 +63,30 @@ module.exports = {
63
63
  type: 'boolean',
64
64
  default: false
65
65
  },
66
- customer_number_capture_enabled: {
67
- type: 'boolean',
68
- default: false
69
- },
70
- customer_number_capture_pattern: oneOf({
71
- description: 'Defines how a customer number can be extracted from a scanned barcode',
72
- type: 'string',
73
- format: 'regex', // should have 1 capturing group only
74
- examples: [
75
- '^.{2}(.{8}).{4,6}$' // extracts characters 2-10 from a string of length 14 to 16
66
+ barcode_capture: oneOf({
67
+ type: 'object',
68
+ description: 'Defines optional customer number extraction from a scanned barcode',
69
+ additionalProperties: false,
70
+ properties: {
71
+ enabled: {
72
+ description: 'Defines if customer number capturing should be tried',
73
+ type: 'boolean'
74
+ },
75
+ pattern: {
76
+ description: 'Defines how a customer number can be extracted from a scanned barcode',
77
+ type: 'string',
78
+ format: 'regex', // should not have more than 1 capturing group
79
+ examples: [
80
+ '^.{2}.{8}.({4,6})$', // extracts last 4 to 6 characters from a string of length 14 to 16
81
+ '^[0-9]{14}$' // matches exactly 14 digits
82
+ ]
83
+ }
84
+ },
85
+ required: [
86
+ 'enabled',
87
+ 'pattern'
76
88
  ],
77
- default: 'null'
89
+ default: null
78
90
  }),
79
91
  customer_add_policy: {
80
92
  'description': 'The customer selection screen will be presented automatically before or after a sale (or not in case of none).',
@@ -1,3 +1,4 @@
1
+ const { stripIndents } = require('common-tags')
1
2
  const { oneOf } = require('../../../helpers/payload-or-null')
2
3
 
3
4
  module.exports = {
@@ -80,7 +81,8 @@ module.exports = {
80
81
  enum: [
81
82
  'cash',
82
83
  'always'
83
- ]
84
+ ],
85
+ default: 'always'
84
86
  },
85
87
  transaction_signing: {
86
88
  type: 'string',
@@ -107,7 +109,7 @@ module.exports = {
107
109
  minutes: {
108
110
  type: 'integer',
109
111
  description: 'If more minutes have passed since the last update - a new update will be tried',
110
- default: 1440,
112
+ default: 4800,
111
113
  minimum: 60,
112
114
  maximum: 14400
113
115
  },
@@ -217,7 +219,12 @@ module.exports = {
217
219
  }
218
220
  }),
219
221
  third_party: {
220
- description: 'Third party app links',
222
+ deprecated: true,
223
+ description: stripIndents`
224
+ Third party app links - Only for locally installed/installable applications - not for any random webpage!
225
+
226
+ Since the 3rd party scheme also must be registered within the POS app we should rather limit this to prepared apps with just being enabled or not
227
+ `,
221
228
  type: 'array',
222
229
  items: {
223
230
  type: 'object',
@@ -279,7 +286,7 @@ module.exports = {
279
286
  oneOf: [
280
287
  {
281
288
  type: 'integer',
282
- default: 1440,
289
+ default: 60,
283
290
  minimum: 1,
284
291
  maximum: 10000
285
292
  },
@@ -401,7 +408,7 @@ module.exports = {
401
408
  properties: {
402
409
  upstream: {
403
410
  description: 'Defines if branch parameter is used in updatream.',
404
- default: true,
411
+ default: false,
405
412
  type: 'boolean'
406
413
  },
407
414
  downstream: {
@@ -451,12 +458,39 @@ module.exports = {
451
458
  {
452
459
  type: 'integer',
453
460
  minimum: 1,
454
- maximum: 1000
461
+ maximum: 1000,
462
+ default: 150
463
+ },
464
+ {
465
+ type: 'null'
466
+ }
467
+ ]
468
+ }
469
+ }
470
+ },
471
+ discounts: {
472
+ type: 'object',
473
+ additionalProperties: false,
474
+ properties: {
475
+ limit: {
476
+ description: 'Initial page size for syncing with GET all calls. In-app default is 500. Set this if you run into timeouts.',
477
+ oneOf: [
478
+ {
479
+ type: 'integer',
480
+ minimum: 1,
481
+ maximum: 1000,
482
+ default: 200
455
483
  },
456
484
  {
457
485
  type: 'null'
458
486
  }
459
487
  ]
488
+ },
489
+ active: {
490
+ // not yet supported on POS, always on
491
+ description: 'If true, discounts will be downloaded to the POS',
492
+ default: true,
493
+ type: 'boolean'
460
494
  }
461
495
  }
462
496
  },
@@ -697,6 +731,7 @@ module.exports = {
697
731
  }),
698
732
  buttons: {
699
733
  description: 'Action (checkout) buttons configuration.',
734
+ deprecated: true,
700
735
  type: 'array',
701
736
  items: {
702
737
  type: 'object',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tillhub/schemas",
3
- "version": "6.287.0",
3
+ "version": "6.289.0",
4
4
  "private": false,
5
5
  "description": "All Tillhub API OpenAPI 3 compatible JSON Schemas.",
6
6
  "main": "./lib/index.js",