@tillhub/schemas 6.237.0 → 6.239.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 +14 -0
- package/lib/v0/branches/base.js +21 -27
- package/lib/v0/service_categories/index.js +5 -0
- package/lib/v0/service_categories/update.request.js +8 -0
- package/lib/v0/service_categories/update.response.js +8 -0
- package/lib/v1/transactions/legacy/base.js +1 -1
- package/package.json +1 -1
- package/test/service_categories/v0/service_categories.v0.spec.js +18 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [6.239.0](https://github.com/tillhub/schemas/compare/v6.238.0...v6.239.0) (2023-07-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **branches:** external_rewards ([c18a2b8](https://github.com/tillhub/schemas/commit/c18a2b8))
|
|
7
|
+
|
|
8
|
+
# [6.238.0](https://github.com/tillhub/schemas/compare/v6.237.0...v6.238.0) (2023-07-27)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **service_categories:** add schema for PUT service_categories ([#833](https://github.com/tillhub/schemas/issues/833)) ([3e6db9a](https://github.com/tillhub/schemas/commit/3e6db9a))
|
|
14
|
+
|
|
1
15
|
# [6.237.0](https://github.com/tillhub/schemas/compare/v6.236.1...v6.237.0) (2023-07-27)
|
|
2
16
|
|
|
3
17
|
|
package/lib/v0/branches/base.js
CHANGED
|
@@ -412,38 +412,32 @@ module.exports = {
|
|
|
412
412
|
type: 'null'
|
|
413
413
|
}]
|
|
414
414
|
},
|
|
415
|
-
|
|
416
|
-
description: '
|
|
415
|
+
external_rewards: oneOf({
|
|
416
|
+
description: 'Branch specific settinmgs for external reward systems',
|
|
417
417
|
type: 'object',
|
|
418
418
|
additionalProperties: false,
|
|
419
419
|
properties: {
|
|
420
|
-
|
|
420
|
+
coop: oneOf({
|
|
421
421
|
type: 'object',
|
|
422
|
-
|
|
422
|
+
description: 'Branch configuration object for Swiss Coop - data is used on transactions',
|
|
423
423
|
properties: {
|
|
424
|
-
|
|
425
|
-
type: '
|
|
426
|
-
description: '
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
type: 'string',
|
|
442
|
-
pattern: '^[0-9]{4}$',
|
|
443
|
-
description: 'Tillhub branch SAP number if available.',
|
|
444
|
-
example: '000001'
|
|
445
|
-
})
|
|
446
|
-
}
|
|
424
|
+
store_eain: {
|
|
425
|
+
type: 'string',
|
|
426
|
+
description: 'Coop identity of this Tillhub branch.',
|
|
427
|
+
example: '7640147960015'
|
|
428
|
+
},
|
|
429
|
+
store_name: oneOf({
|
|
430
|
+
type: 'string',
|
|
431
|
+
maxLength: 128,
|
|
432
|
+
description: 'Name of this branch within the Coop context.',
|
|
433
|
+
example: 'Coop Supermarkt Riehen Schmiedgasse',
|
|
434
|
+
default: '{name}'
|
|
435
|
+
}),
|
|
436
|
+
store_sap_number: oneOf({
|
|
437
|
+
type: 'string',
|
|
438
|
+
pattern: '^[0-9]{4}$',
|
|
439
|
+
description: 'Tillhub branch SAP number if available.',
|
|
440
|
+
example: '000001'
|
|
447
441
|
})
|
|
448
442
|
}
|
|
449
443
|
})
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const { response } = require('./base')
|
|
2
|
+
const commonResponse = require('../../common/response')
|
|
3
|
+
|
|
4
|
+
module.exports = {
|
|
5
|
+
$id: 'https://schemas.tillhub.com/v0/service_categories.update.response.schema.json',
|
|
6
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
7
|
+
...commonResponse({ resultItems: response })
|
|
8
|
+
}
|
|
@@ -739,7 +739,7 @@ module.exports = {
|
|
|
739
739
|
point_base_amount: {
|
|
740
740
|
type: 'integer',
|
|
741
741
|
description: stripIndents`
|
|
742
|
-
'Total value of the sale that qualifies for superpoints (campaign items and vouchers excluded)
|
|
742
|
+
'Total value of the sale that qualifies for superpoints (campaign items, tips and vouchers excluded)
|
|
743
743
|
|
|
744
744
|
as long as net items are not supported this is identical to \'total_amount\'.
|
|
745
745
|
`,
|
package/package.json
CHANGED
|
@@ -18,3 +18,21 @@ test('Service Categories V0: create response schema validation', t => {
|
|
|
18
18
|
t.error(error, 'should not get any error')
|
|
19
19
|
t.end()
|
|
20
20
|
})
|
|
21
|
+
|
|
22
|
+
test('Service Categories V0: update request schema validation', t => {
|
|
23
|
+
t.plan(2)
|
|
24
|
+
const updateRequest = require('../../../lib/v0/service_categories').update.request
|
|
25
|
+
const { valid, error } = validate(updateRequest)
|
|
26
|
+
t.ok(valid, 'update request schema is valid')
|
|
27
|
+
t.error(error, 'should not get any error')
|
|
28
|
+
t.end()
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
test('Service Categories V0: update response schema validation', t => {
|
|
32
|
+
t.plan(2)
|
|
33
|
+
const updateResponse = require('../../../lib/v0/service_categories').update.response
|
|
34
|
+
const { valid, error } = validate(updateResponse)
|
|
35
|
+
t.ok(valid, 'update response schema is valid')
|
|
36
|
+
t.error(error, 'should not get any error')
|
|
37
|
+
t.end()
|
|
38
|
+
})
|