@tillhub/schemas 6.90.2 → 6.90.3
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,10 @@
|
|
|
1
|
+
## [6.90.3](https://github.com/tillhub/schemas/compare/v6.90.2...v6.90.3) (2021-09-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **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)
|
|
7
|
+
|
|
1
8
|
## [6.90.2](https://github.com/tillhub/schemas/compare/v6.90.1...v6.90.2) (2021-09-23)
|
|
2
9
|
|
|
3
10
|
|
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')
|