@tillhub/schemas 6.460.0 → 6.462.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.
|
@@ -122,5 +122,10 @@ module.exports = {
|
|
|
122
122
|
description: 'enables sms reminders for gastro table reservations',
|
|
123
123
|
type: 'boolean',
|
|
124
124
|
default: false
|
|
125
|
+
},
|
|
126
|
+
agent_chat: {
|
|
127
|
+
description: 'entitles the client account to the Merchant Data Copilot chat (/api/v0/{tenantId}/agent-chat)',
|
|
128
|
+
type: 'boolean',
|
|
129
|
+
default: false
|
|
125
130
|
}
|
|
126
131
|
}
|
|
@@ -394,15 +394,6 @@ module.exports = oneOf({
|
|
|
394
394
|
],
|
|
395
395
|
default: 'catalog_first'
|
|
396
396
|
},
|
|
397
|
-
price_source_on_catalog_hit: {
|
|
398
|
-
description: 'Which price is booked when a decodable press code also matches a catalog article. \'barcode\' charges the encoded amount and uses the article\'s own price only as the value it is compared against, \'catalog\' charges the article\'s own price and falls back to the encoded amount when it has none. A disagreement between the two is logged under either setting. The field is inert wherever no catalog hit occurs, which includes every scan under \'barcode_first\' - that combination is contradictory but not an error and must not be rejected. An unrecognised value falls back to the default.',
|
|
399
|
-
type: 'string',
|
|
400
|
-
enum: [
|
|
401
|
-
'barcode',
|
|
402
|
-
'catalog'
|
|
403
|
-
],
|
|
404
|
-
default: 'barcode'
|
|
405
|
-
},
|
|
406
397
|
products: {
|
|
407
398
|
description: 'Maps a press prefix to the uuid of the fallback article that supplies VAT and accounting information for that prefix. The supported prefixes are the keys, not a fixed set, so adding one needs no client release. Enabled with an empty map is equivalent to disabled.',
|
|
408
399
|
type: 'object',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tillhub/schemas",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.462.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "All Tillhub API OpenAPI 3 compatible JSON Schemas.",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -126,6 +126,8 @@
|
|
|
126
126
|
"report-dir": "./coverage"
|
|
127
127
|
},
|
|
128
128
|
"release": {
|
|
129
|
+
"successCommentCondition": false,
|
|
130
|
+
"failCommentCondition": false,
|
|
129
131
|
"verifyConditions": [
|
|
130
132
|
"@semantic-release/changelog",
|
|
131
133
|
"@semantic-release/npm",
|
|
@@ -250,6 +250,20 @@ test('Configurations: payloads without opening_hours_exceptions remain valid', f
|
|
|
250
250
|
t.end()
|
|
251
251
|
})
|
|
252
252
|
|
|
253
|
+
test('Configurations: reservations customization accepts privacy_notice_url as string or null', function (t) {
|
|
254
|
+
t.plan(3)
|
|
255
|
+
;['https://example.com/privacy', null].forEach(function (privacyNoticeUrl) {
|
|
256
|
+
const valid = validateUpdatePayload({
|
|
257
|
+
reservations: { customization: { privacy_notice_url: privacyNoticeUrl } }
|
|
258
|
+
})
|
|
259
|
+
t.ok(valid, ajv.errorsText(validateUpdatePayload.errors))
|
|
260
|
+
})
|
|
261
|
+
t.notOk(validateUpdatePayload({
|
|
262
|
+
reservations: { customization: { privacy_notice_url: 123 } }
|
|
263
|
+
}), 'privacy_notice_url must be a string or null')
|
|
264
|
+
t.end()
|
|
265
|
+
})
|
|
266
|
+
|
|
253
267
|
test('Configurations: interfaces seeds scanner_apis.zebra.enabled when scanner_apis is absent', function (t) {
|
|
254
268
|
t.plan(2)
|
|
255
269
|
const ajvWithDefaults = new Ajv({ useDefaults: true })
|
|
@@ -322,7 +336,6 @@ test('Configurations: press_item_barcode accepts the documented contract', funct
|
|
|
322
336
|
press_item_barcode: {
|
|
323
337
|
enabled: false,
|
|
324
338
|
lookup_priority: 'catalog_first',
|
|
325
|
-
price_source_on_catalog_hit: 'barcode',
|
|
326
339
|
products: {
|
|
327
340
|
414: pressUuid,
|
|
328
341
|
419: pressUuid,
|
|
@@ -347,17 +360,12 @@ test('Configurations: press_item_barcode accepts a prefix the client does not kn
|
|
|
347
360
|
t.end()
|
|
348
361
|
})
|
|
349
362
|
|
|
350
|
-
test('Configurations: press_item_barcode
|
|
363
|
+
test('Configurations: press_item_barcode rejects price_source_on_catalog_hit', function (t) {
|
|
351
364
|
t.plan(1)
|
|
352
365
|
const valid = validateUpdatePayload({
|
|
353
|
-
features: {
|
|
354
|
-
press_item_barcode: {
|
|
355
|
-
lookup_priority: 'barcode_first',
|
|
356
|
-
price_source_on_catalog_hit: 'catalog'
|
|
357
|
-
}
|
|
358
|
-
}
|
|
366
|
+
features: { press_item_barcode: { price_source_on_catalog_hit: 'barcode' } }
|
|
359
367
|
})
|
|
360
|
-
t.
|
|
368
|
+
t.notOk(valid, 'removed: no client implements it, and press master data is not kept in the catalog')
|
|
361
369
|
t.end()
|
|
362
370
|
})
|
|
363
371
|
|
|
@@ -393,12 +401,9 @@ test('Configurations: press_item_barcode rejects a product value that is not a u
|
|
|
393
401
|
})
|
|
394
402
|
|
|
395
403
|
test('Configurations: press_item_barcode rejects unknown enum values', function (t) {
|
|
396
|
-
t.plan(
|
|
404
|
+
t.plan(1)
|
|
397
405
|
t.notOk(validateUpdatePayload({
|
|
398
406
|
features: { press_item_barcode: { lookup_priority: 'catalogue_first' } }
|
|
399
407
|
}), 'lookup_priority')
|
|
400
|
-
t.notOk(validateUpdatePayload({
|
|
401
|
-
features: { press_item_barcode: { price_source_on_catalog_hit: 'ean' } }
|
|
402
|
-
}), 'price_source_on_catalog_hit')
|
|
403
408
|
t.end()
|
|
404
409
|
})
|