@tillhub/schemas 6.459.0 → 6.461.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/lib/v0/analytics/reports/payment_options/get.js +58 -0
- package/lib/v0/analytics/reports/payment_options/index.js +2 -1
- package/lib/v0/client_accounts/features/base.js +5 -0
- package/lib/v1/configurations/items/features.js +0 -9
- package/package.json +3 -1
- package/test/configurations/configurations.v1.spec.js +4 -13
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
module.exports.request = {
|
|
2
|
+
$id: 'https://schemas.tillhub.com/v0/analytics.reports.payment_options.get.all.query.schema.json',
|
|
3
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
4
|
+
type: 'object',
|
|
5
|
+
additionalProperties: true,
|
|
6
|
+
required: [],
|
|
7
|
+
properties: {
|
|
8
|
+
cursor_field: {
|
|
9
|
+
type: 'string',
|
|
10
|
+
description: 'which column to cursor on. To indicate the sorting order, add a `+` or `-` for asc/desc order'
|
|
11
|
+
},
|
|
12
|
+
legacy: {
|
|
13
|
+
type: 'boolean',
|
|
14
|
+
desciption: 'flags to us legacy table fr_transaction_payment'
|
|
15
|
+
},
|
|
16
|
+
format: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
description: 'to get data in any other format then JSON straight away, you can set `format=csv`'
|
|
19
|
+
},
|
|
20
|
+
context_locations: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
description: 'context locations id as a filter for transactions'
|
|
23
|
+
},
|
|
24
|
+
branch_number: {
|
|
25
|
+
oneOf: [
|
|
26
|
+
{
|
|
27
|
+
type: 'integer',
|
|
28
|
+
description: 'Filter by branch number if legacy parameter set or filter by branch UUID otherwise'
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
type: 'string',
|
|
32
|
+
format: 'uuid',
|
|
33
|
+
example: '9d110eb2-2245-4e14-9574-49b502f3a9b3'
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
branch_group: {
|
|
38
|
+
oneOf: [
|
|
39
|
+
{
|
|
40
|
+
type: 'string',
|
|
41
|
+
description: 'filter by branches within branch group. Not applied if branch_number parameter received'
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
type: 'array',
|
|
45
|
+
items: {
|
|
46
|
+
type: 'string'
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
staff_id: {
|
|
52
|
+
type: 'string',
|
|
53
|
+
format: 'uuid',
|
|
54
|
+
description: 'filter by staff id',
|
|
55
|
+
example: '9d110eb2-2245-4e14-9574-49b502f3a9b3'
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -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.461.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",
|
|
@@ -322,7 +322,6 @@ test('Configurations: press_item_barcode accepts the documented contract', funct
|
|
|
322
322
|
press_item_barcode: {
|
|
323
323
|
enabled: false,
|
|
324
324
|
lookup_priority: 'catalog_first',
|
|
325
|
-
price_source_on_catalog_hit: 'barcode',
|
|
326
325
|
products: {
|
|
327
326
|
414: pressUuid,
|
|
328
327
|
419: pressUuid,
|
|
@@ -347,17 +346,12 @@ test('Configurations: press_item_barcode accepts a prefix the client does not kn
|
|
|
347
346
|
t.end()
|
|
348
347
|
})
|
|
349
348
|
|
|
350
|
-
test('Configurations: press_item_barcode
|
|
349
|
+
test('Configurations: press_item_barcode rejects price_source_on_catalog_hit', function (t) {
|
|
351
350
|
t.plan(1)
|
|
352
351
|
const valid = validateUpdatePayload({
|
|
353
|
-
features: {
|
|
354
|
-
press_item_barcode: {
|
|
355
|
-
lookup_priority: 'barcode_first',
|
|
356
|
-
price_source_on_catalog_hit: 'catalog'
|
|
357
|
-
}
|
|
358
|
-
}
|
|
352
|
+
features: { press_item_barcode: { price_source_on_catalog_hit: 'barcode' } }
|
|
359
353
|
})
|
|
360
|
-
t.
|
|
354
|
+
t.notOk(valid, 'removed: no client implements it, and press master data is not kept in the catalog')
|
|
361
355
|
t.end()
|
|
362
356
|
})
|
|
363
357
|
|
|
@@ -393,12 +387,9 @@ test('Configurations: press_item_barcode rejects a product value that is not a u
|
|
|
393
387
|
})
|
|
394
388
|
|
|
395
389
|
test('Configurations: press_item_barcode rejects unknown enum values', function (t) {
|
|
396
|
-
t.plan(
|
|
390
|
+
t.plan(1)
|
|
397
391
|
t.notOk(validateUpdatePayload({
|
|
398
392
|
features: { press_item_barcode: { lookup_priority: 'catalogue_first' } }
|
|
399
393
|
}), 'lookup_priority')
|
|
400
|
-
t.notOk(validateUpdatePayload({
|
|
401
|
-
features: { press_item_barcode: { price_source_on_catalog_hit: 'ean' } }
|
|
402
|
-
}), 'price_source_on_catalog_hit')
|
|
403
394
|
t.end()
|
|
404
395
|
})
|