@tillhub/schemas 6.124.0 → 6.125.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
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [6.125.0](https://github.com/tillhub/schemas/compare/v6.124.0...v6.125.0) (2022-03-10)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **staff:** unify 'gender' field #API-1412 ([b927123](https://github.com/tillhub/schemas/commit/b927123)), closes [#API-1412](https://github.com/tillhub/schemas/issues/API-1412)
|
|
7
|
+
|
|
1
8
|
# [6.124.0](https://github.com/tillhub/schemas/compare/v6.123.0...v6.124.0) (2022-03-09)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const { oneOf } = require('../helpers/payload-or-null')
|
|
2
|
+
|
|
3
|
+
function getGender () {
|
|
4
|
+
return {
|
|
5
|
+
description: 'Gender',
|
|
6
|
+
example: 'male',
|
|
7
|
+
...oneOf({
|
|
8
|
+
type: 'string',
|
|
9
|
+
enum: [
|
|
10
|
+
'male',
|
|
11
|
+
'female',
|
|
12
|
+
'unspecified'
|
|
13
|
+
]
|
|
14
|
+
})
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
module.exports = { getGender }
|
package/lib/v0/customers/base.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const { anyOf, oneOf } = require('../../helpers/payload-or-null')
|
|
2
2
|
const { getAddress } = require('../../common/address')
|
|
3
|
+
const { getGender } = require('../../common/gender')
|
|
3
4
|
const { getImages } = require('../../common/images')
|
|
4
5
|
|
|
5
6
|
module.exports = {
|
|
@@ -401,18 +402,7 @@ module.exports = {
|
|
|
401
402
|
}
|
|
402
403
|
})
|
|
403
404
|
},
|
|
404
|
-
gender:
|
|
405
|
-
description: 'Gender',
|
|
406
|
-
example: 'male',
|
|
407
|
-
...oneOf({
|
|
408
|
-
type: 'string',
|
|
409
|
-
enum: [
|
|
410
|
-
'male',
|
|
411
|
-
'female',
|
|
412
|
-
'unspecified'
|
|
413
|
-
]
|
|
414
|
-
})
|
|
415
|
-
},
|
|
405
|
+
gender: getGender(),
|
|
416
406
|
vat_id: {
|
|
417
407
|
description: 'Customer VAT ID',
|
|
418
408
|
...oneOf({
|
package/lib/v0/staff/base.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const { getGender } = require('../../common/gender')
|
|
1
2
|
const { oneOf } = require('../../helpers/payload-or-null')
|
|
2
3
|
|
|
3
4
|
module.exports = {
|
|
@@ -136,20 +137,7 @@ module.exports = {
|
|
|
136
137
|
}
|
|
137
138
|
]
|
|
138
139
|
},
|
|
139
|
-
gender:
|
|
140
|
-
oneOf: [
|
|
141
|
-
{
|
|
142
|
-
type: 'string',
|
|
143
|
-
enum: [
|
|
144
|
-
'male',
|
|
145
|
-
'female'
|
|
146
|
-
]
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
type: 'null'
|
|
150
|
-
}
|
|
151
|
-
]
|
|
152
|
-
},
|
|
140
|
+
gender: getGender(),
|
|
153
141
|
images: {
|
|
154
142
|
description: 'A Tillhub image object with URLs to display images this for staff.',
|
|
155
143
|
anyOf: [
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const { getGender } = require('../../../common/gender')
|
|
1
2
|
const { oneOf } = require('../../../helpers/payload-or-null')
|
|
2
3
|
|
|
3
4
|
module.exports = {
|
|
@@ -181,13 +182,7 @@ module.exports = {
|
|
|
181
182
|
type: 'string',
|
|
182
183
|
format: 'date-time'
|
|
183
184
|
}),
|
|
184
|
-
gender:
|
|
185
|
-
type: 'string',
|
|
186
|
-
enum: [
|
|
187
|
-
'male',
|
|
188
|
-
'female'
|
|
189
|
-
]
|
|
190
|
-
}),
|
|
185
|
+
gender: getGender(),
|
|
191
186
|
active: {
|
|
192
187
|
description: 'Soft disable or enable this user_profiles.',
|
|
193
188
|
type: 'boolean',
|