@tillhub/schemas 6.90.0 → 6.91.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 +28 -0
- package/lib/v0/client_accounts/features/base.js +4 -0
- package/lib/v0/index.js +1 -0
- package/lib/v0/loyalty_abocard_cards/base.js +58 -0
- package/lib/v0/loyalty_abocard_cards/create.js +20 -0
- package/lib/v0/loyalty_abocard_cards/index.js +1 -0
- package/lib/v0/loyalty_abocard_systems/base.js +24 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
# [6.91.0](https://github.com/tillhub/schemas/compare/v6.90.3...v6.91.0) (2021-09-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **client-accounts:** add 'abocard_system' flag ([67e9e42](https://github.com/tillhub/schemas/commit/67e9e42))
|
|
7
|
+
|
|
8
|
+
## [6.90.3](https://github.com/tillhub/schemas/compare/v6.90.2...v6.90.3) (2021-09-23)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **loyalty_systems:** add abocard create schema #API-1020 ([#623](https://github.com/tillhub/schemas/issues/623)) ([a1fbc45](https://github.com/tillhub/schemas/commit/a1fbc45)), closes [#API-1020](https://github.com/tillhub/schemas/issues/API-1020) [#API-1020](https://github.com/tillhub/schemas/issues/API-1020)
|
|
14
|
+
|
|
15
|
+
## [6.90.2](https://github.com/tillhub/schemas/compare/v6.90.1...v6.90.2) (2021-09-23)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **loyalty_systems:** adjust min value for abocard system validity pe… ([#624](https://github.com/tillhub/schemas/issues/624)) ([be1b62e](https://github.com/tillhub/schemas/commit/be1b62e)), closes [#API-1017](https://github.com/tillhub/schemas/issues/API-1017)
|
|
21
|
+
|
|
22
|
+
## [6.90.1](https://github.com/tillhub/schemas/compare/v6.90.0...v6.90.1) (2021-09-23)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* **loyalty_systems:** add validity_period to abocard system #API-1017 ([e172dd2](https://github.com/tillhub/schemas/commit/e172dd2)), closes [#API-1017](https://github.com/tillhub/schemas/issues/API-1017)
|
|
28
|
+
|
|
1
29
|
# [6.90.0](https://github.com/tillhub/schemas/compare/v6.89.2...v6.90.0) (2021-09-22)
|
|
2
30
|
|
|
3
31
|
|
package/lib/v0/index.js
CHANGED
|
@@ -31,6 +31,7 @@ module.exports.warehouses = require('./warehouses')
|
|
|
31
31
|
module.exports.product_service_questions = require('./product_service_questions')
|
|
32
32
|
module.exports.product_service_question_groups = require('./product_service_question_groups')
|
|
33
33
|
module.exports.time_entries = require('./time_entries')
|
|
34
|
+
module.exports.loyalty_abocard_cards = require('./loyalty_abocard_cards')
|
|
34
35
|
module.exports.loyalty_abocard_systems = require('./loyalty_abocard_systems')
|
|
35
36
|
module.exports.loyalty_systems = require('./loyalty_systems')
|
|
36
37
|
module.exports.loyalty_accounts = require('./loyalty_accounts')
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
const { oneOf } = require('../../helpers/payload-or-null')
|
|
2
|
+
const baseObject = require('../../common/base')
|
|
3
|
+
const voucher = require('../vouchers/base')
|
|
4
|
+
|
|
5
|
+
const request = {
|
|
6
|
+
abocard_system: {
|
|
7
|
+
description: 'The abocard system UUID abocard belongs to',
|
|
8
|
+
example: '3610eb8a-2d21-4034-9aa6-0a097a2ce5f2',
|
|
9
|
+
type: 'string',
|
|
10
|
+
format: 'uuid'
|
|
11
|
+
},
|
|
12
|
+
customer: oneOf({
|
|
13
|
+
description: 'The customer UUID it was handed out for',
|
|
14
|
+
example: 'ad572a0d-301a-4270-8a49-5f720f2b277d',
|
|
15
|
+
type: 'string',
|
|
16
|
+
format: 'uuid'
|
|
17
|
+
})
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const response = {
|
|
21
|
+
...baseObject(),
|
|
22
|
+
...request,
|
|
23
|
+
active: {
|
|
24
|
+
description: 'The abocard is active',
|
|
25
|
+
example: true,
|
|
26
|
+
type: 'boolean'
|
|
27
|
+
},
|
|
28
|
+
deleted: {
|
|
29
|
+
description: 'The abocard is deleted',
|
|
30
|
+
example: true,
|
|
31
|
+
type: 'boolean'
|
|
32
|
+
},
|
|
33
|
+
valid_until: oneOf({
|
|
34
|
+
description: 'When the abocard expires',
|
|
35
|
+
example: '2021-09-23T08:19:02.059Z',
|
|
36
|
+
type: 'string',
|
|
37
|
+
format: 'date-time'
|
|
38
|
+
}),
|
|
39
|
+
configuration: oneOf({
|
|
40
|
+
description: 'A snapshot of the configuration the abocard has been created with',
|
|
41
|
+
type: 'object',
|
|
42
|
+
additionalProperties: true,
|
|
43
|
+
required: []
|
|
44
|
+
}),
|
|
45
|
+
vouchers: oneOf({
|
|
46
|
+
description: 'Vouchers for the abocard in case when abocard system has system_type == "voucher"',
|
|
47
|
+
type: 'array',
|
|
48
|
+
items: voucher
|
|
49
|
+
})
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
module.exports = {
|
|
53
|
+
request,
|
|
54
|
+
response,
|
|
55
|
+
required: [
|
|
56
|
+
'abocard_system'
|
|
57
|
+
]
|
|
58
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const { request, response, required } = require('./base')
|
|
2
|
+
const commonResponse = require('../../common/response')
|
|
3
|
+
|
|
4
|
+
module.exports.request = {
|
|
5
|
+
$id: 'https://schemas.tillhub.com/v0/loyalty_abocard_cards.create.request.schema.json',
|
|
6
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
7
|
+
additionalProperties: false,
|
|
8
|
+
type: 'object',
|
|
9
|
+
required,
|
|
10
|
+
properties: request
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
module.exports.response = {
|
|
14
|
+
$id: 'https://schemas.tillhub.com/v0/loyalty_abocard_cards.create.response.schema.json',
|
|
15
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
16
|
+
...commonResponse({ resultItems: {
|
|
17
|
+
type: 'object',
|
|
18
|
+
properties: response
|
|
19
|
+
} })
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports.create = require('./create')
|
|
@@ -68,6 +68,30 @@ const request = {
|
|
|
68
68
|
type: 'string',
|
|
69
69
|
maxLength: 255
|
|
70
70
|
}),
|
|
71
|
+
validity_period: {
|
|
72
|
+
description: 'Validity period of issued abocrads',
|
|
73
|
+
type: 'object',
|
|
74
|
+
additionalProperties: false,
|
|
75
|
+
required: ['unit', 'value'],
|
|
76
|
+
properties: {
|
|
77
|
+
unit: {
|
|
78
|
+
description: 'The type of period',
|
|
79
|
+
example: 'years',
|
|
80
|
+
type: 'string',
|
|
81
|
+
enum: [
|
|
82
|
+
'years'
|
|
83
|
+
],
|
|
84
|
+
default: 'years'
|
|
85
|
+
},
|
|
86
|
+
value: {
|
|
87
|
+
description: 'The period value in given units',
|
|
88
|
+
example: 3,
|
|
89
|
+
type: 'number',
|
|
90
|
+
minimum: 1,
|
|
91
|
+
default: 3
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
71
95
|
voucher_system: oneOf({
|
|
72
96
|
description: 'Referenced voucher system when system_type == "voucher". 1 to 1 relationship with voucher system instance.',
|
|
73
97
|
type: 'object',
|