@tillhub/schemas 6.262.0 → 6.264.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,17 @@
|
|
|
1
|
+
# [6.264.0](https://github.com/tillhub/schemas/compare/v6.263.0...v6.264.0) (2023-09-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **branches:** add schema for validating shift_plan objects that are part of branch table ([2230a83](https://github.com/tillhub/schemas/commit/2230a83))
|
|
7
|
+
|
|
8
|
+
# [6.263.0](https://github.com/tillhub/schemas/compare/v6.262.0...v6.263.0) (2023-09-21)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **staffs:** staff members have color that shows in reservation calendar around timeslot that they ([9149137](https://github.com/tillhub/schemas/commit/9149137))
|
|
14
|
+
|
|
1
15
|
# [6.262.0](https://github.com/tillhub/schemas/compare/v6.261.0...v6.262.0) (2023-09-20)
|
|
2
16
|
|
|
3
17
|
|
package/lib/v0/branches/index.js
CHANGED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
shift_plan_enabled: {
|
|
3
|
+
type: 'boolean'
|
|
4
|
+
},
|
|
5
|
+
plan: {
|
|
6
|
+
type: 'array',
|
|
7
|
+
items: {
|
|
8
|
+
type: 'object',
|
|
9
|
+
additionalProperties: false,
|
|
10
|
+
properties: {
|
|
11
|
+
user: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
format: 'uuid'
|
|
14
|
+
},
|
|
15
|
+
time_ranges: {
|
|
16
|
+
type: 'array',
|
|
17
|
+
items: {
|
|
18
|
+
type: 'object',
|
|
19
|
+
additionalProperties: false,
|
|
20
|
+
properties: {
|
|
21
|
+
date: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
format: 'date'
|
|
24
|
+
},
|
|
25
|
+
times: {
|
|
26
|
+
type: 'array',
|
|
27
|
+
items: {
|
|
28
|
+
type: 'object',
|
|
29
|
+
additionalProperties: false,
|
|
30
|
+
properties: {
|
|
31
|
+
start: {
|
|
32
|
+
type: 'string'
|
|
33
|
+
},
|
|
34
|
+
end: {
|
|
35
|
+
type: 'string'
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const commonResponse = require('../../../common/response')
|
|
2
|
+
const base = require('./base')
|
|
3
|
+
|
|
4
|
+
module.exports.response = {
|
|
5
|
+
response: {
|
|
6
|
+
$id: 'https://schemas.tillhub.com/v0/branches.shift_plan.read.response.schema.json',
|
|
7
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
8
|
+
additionalProperties: false,
|
|
9
|
+
...commonResponse({
|
|
10
|
+
resultItems: {
|
|
11
|
+
type: 'object',
|
|
12
|
+
additionalProperties: false,
|
|
13
|
+
properties: {
|
|
14
|
+
...base
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
})
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const commonResponse = require('../../../common/response')
|
|
2
|
+
const base = require('./base')
|
|
3
|
+
|
|
4
|
+
module.exports.request = {
|
|
5
|
+
$id: 'https://schemas.tillhub.com/v0/branches.shift_plan.update.request.schema.json',
|
|
6
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
7
|
+
additionalProperties: false,
|
|
8
|
+
type: 'object',
|
|
9
|
+
properties: {
|
|
10
|
+
...base
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
module.exports.response = {
|
|
15
|
+
response: {
|
|
16
|
+
$id: 'https://schemas.tillhub.com/v0/branches.shift_plan.update.response.schema.json',
|
|
17
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
18
|
+
additionalProperties: false,
|
|
19
|
+
...commonResponse({
|
|
20
|
+
resultItems: {
|
|
21
|
+
type: 'object',
|
|
22
|
+
additionalProperties: false,
|
|
23
|
+
properties: {
|
|
24
|
+
...base
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
})
|
|
28
|
+
}
|
|
29
|
+
}
|
package/lib/v0/staff/base.js
CHANGED
|
@@ -505,6 +505,19 @@ module.exports = {
|
|
|
505
505
|
}
|
|
506
506
|
]
|
|
507
507
|
},
|
|
508
|
+
calendar_color: {
|
|
509
|
+
description: 'A color to be used in the calendar for this staff member.',
|
|
510
|
+
oneOf: [
|
|
511
|
+
{
|
|
512
|
+
type: 'string',
|
|
513
|
+
maxLength: 7,
|
|
514
|
+
minLength: 7
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
type: 'null'
|
|
518
|
+
}
|
|
519
|
+
]
|
|
520
|
+
},
|
|
508
521
|
individual_reservation_times: {
|
|
509
522
|
description: 'Whether or not this staff member is having custom work hours.',
|
|
510
523
|
type: 'boolean'
|