@tillhub/schemas 6.257.0 → 6.259.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.259.0](https://github.com/tillhub/schemas/compare/v6.258.0...v6.259.0) (2023-09-12)
2
+
3
+
4
+ ### Features
5
+
6
+ * **staff:** add staff.services ([#866](https://github.com/tillhub/schemas/issues/866)) ([a3966f6](https://github.com/tillhub/schemas/commit/a3966f6))
7
+
8
+ # [6.258.0](https://github.com/tillhub/schemas/compare/v6.257.0...v6.258.0) (2023-09-11)
9
+
10
+
11
+ ### Features
12
+
13
+ * **configurations:** add details for validations ([bc5560b](https://github.com/tillhub/schemas/commit/bc5560b))
14
+
1
15
  # [6.257.0](https://github.com/tillhub/schemas/compare/v6.256.1...v6.257.0) (2023-09-08)
2
16
 
3
17
 
@@ -540,5 +540,20 @@ module.exports = {
540
540
  }
541
541
  }
542
542
  }
543
+ },
544
+ services: {
545
+ description: 'List of ids for the services this staff member is capable of performing',
546
+ oneOf: [
547
+ {
548
+ type: 'array',
549
+ items: {
550
+ type: 'string',
551
+ format: 'uuid'
552
+ }
553
+ },
554
+ {
555
+ type: 'null'
556
+ }
557
+ ]
543
558
  }
544
559
  }
@@ -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, // default for all objects that are not covered below yet
17
+ accounts: validationType, // financial accounts
18
+ carts: validationType, // saved carts and active cart
19
+ transactions: validationType, // sales, expenses etc.
20
+ balances: validationType, // balances
21
+ items: validationType, // items within all containers
22
+ products: validationType, // products and product images
23
+ product_groups: validationType, // product groups
24
+ taxes: validationType, // taxes master data
25
+ vouchers: validationType, // vouchers in transactions, items or payments
26
+ payments: validationType, // payments in transactions
27
+ discounts: validationType, // master data discounts and discounts in transactions
28
+ customers: validationType // master data customers
29
+ },
30
+ additionalProperties: validationType
31
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tillhub/schemas",
3
- "version": "6.257.0",
3
+ "version": "6.259.0",
4
4
  "private": false,
5
5
  "description": "All Tillhub API OpenAPI 3 compatible JSON Schemas.",
6
6
  "main": "./lib/index.js",