@tillhub/schemas 6.256.1 → 6.258.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,24 @@
1
+ # [6.258.0](https://github.com/tillhub/schemas/compare/v6.257.0...v6.258.0) (2023-09-11)
2
+
3
+
4
+ ### Features
5
+
6
+ * **configurations:** add details for validations ([bc5560b](https://github.com/tillhub/schemas/commit/bc5560b))
7
+
8
+ # [6.257.0](https://github.com/tillhub/schemas/compare/v6.256.1...v6.257.0) (2023-09-08)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **staff:** base object did not pass validation in tests. ([7d29d4e](https://github.com/tillhub/schemas/commit/7d29d4e))
14
+
15
+
16
+ ### Features
17
+
18
+ * **staff:** finalize schema for reservation planing of staff member ([03b69d6](https://github.com/tillhub/schemas/commit/03b69d6))
19
+ * **staff:** needed when staff member gets updated, this enables dashboard to change staff infividua ([4ca8393](https://github.com/tillhub/schemas/commit/4ca8393))
20
+ * **staff:** Split one field in two, where one just controls if other has effect ([bd8c378](https://github.com/tillhub/schemas/commit/bd8c378))
21
+
1
22
  ## [6.256.1](https://github.com/tillhub/schemas/compare/v6.256.0...v6.256.1) (2023-08-31)
2
23
 
3
24
 
@@ -504,5 +504,41 @@ module.exports = {
504
504
  type: 'null'
505
505
  }
506
506
  ]
507
+ },
508
+ individual_reservation_times: {
509
+ description: 'Whether or not this staff member is having custom work hours.',
510
+ type: 'boolean'
511
+ },
512
+ individual_work_plan: {
513
+ description: 'Custom schedule for this staff member.',
514
+ type: 'array',
515
+ items: {
516
+ type: 'object',
517
+ properties: {
518
+ day_index: {
519
+ description: 'The day of the week. Indexed as 0 = Monday, 6 = Sunday.',
520
+ type: 'integer',
521
+ minimum: 0,
522
+ maximum: 6
523
+ },
524
+ time_ranges: {
525
+ description: 'A list of time ranges for this day.',
526
+ type: 'array',
527
+ items: {
528
+ type: 'object',
529
+ properties: {
530
+ start: {
531
+ description: 'The start time of this range.',
532
+ type: 'string'
533
+ },
534
+ end: {
535
+ description: 'The end time of this range.',
536
+ type: 'string'
537
+ }
538
+ }
539
+ }
540
+ }
541
+ }
542
+ }
507
543
  }
508
544
  }
@@ -289,16 +289,7 @@ module.exports = {
289
289
  deliveries: {
290
290
  type: 'object'
291
291
  },
292
- validations: {
293
- oneOf: [
294
- {
295
- type: 'null'
296
- },
297
- {
298
- type: 'object'
299
- }
300
- ]
301
- },
292
+ validations: require('./items/validations'),
302
293
  payments: {
303
294
  oneOf: [
304
295
  {
@@ -0,0 +1,31 @@
1
+ const { oneOf } = require('../../../helpers/payload-or-null')
2
+
3
+ const validationType = oneOf({
4
+ type: 'string',
5
+ enum: [
6
+ 'hard',
7
+ 'soft',
8
+ 'off'
9
+ ]
10
+ })
11
+
12
+ module.exports = oneOf({
13
+ type: 'object',
14
+ description: 'A dictionary <string, string> describing all validation values',
15
+ properties: {
16
+ all: validationType,
17
+ accounts: validationType,
18
+ carts: validationType,
19
+ transactions: validationType,
20
+ balances: validationType,
21
+ items: validationType,
22
+ products: validationType,
23
+ productGroups: validationType,
24
+ taxes: validationType,
25
+ vouchers: validationType,
26
+ payments: validationType,
27
+ discounts: validationType,
28
+ customers: validationType
29
+ },
30
+ additionalProperties: validationType
31
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tillhub/schemas",
3
- "version": "6.256.1",
3
+ "version": "6.258.0",
4
4
  "private": false,
5
5
  "description": "All Tillhub API OpenAPI 3 compatible JSON Schemas.",
6
6
  "main": "./lib/index.js",