@tillhub/schemas 6.258.0 → 6.260.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.260.0](https://github.com/tillhub/schemas/compare/v6.259.0...v6.260.0) (2023-09-13)
2
+
3
+
4
+ ### Features
5
+
6
+ * **configurations:** restrictions ([85b347b](https://github.com/tillhub/schemas/commit/85b347b))
7
+
8
+ # [6.259.0](https://github.com/tillhub/schemas/compare/v6.258.0...v6.259.0) (2023-09-12)
9
+
10
+
11
+ ### Features
12
+
13
+ * **staff:** add staff.services ([#866](https://github.com/tillhub/schemas/issues/866)) ([a3966f6](https://github.com/tillhub/schemas/commit/a3966f6))
14
+
1
15
  # [6.258.0](https://github.com/tillhub/schemas/compare/v6.257.0...v6.258.0) (2023-09-11)
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
  }
@@ -12,16 +12,7 @@ module.exports = {
12
12
  }
13
13
  ]
14
14
  },
15
- vouchers: {
16
- oneOf: [
17
- {
18
- type: 'object'
19
- },
20
- {
21
- type: 'null'
22
- }
23
- ]
24
- },
15
+ vouchers: require('./items/vouchers'),
25
16
  scan_prefixes: require('./items/scan_prefixes'),
26
17
  voucher_actions: require('./items/voucher_actions'),
27
18
  expenses_deposits: oneOf({
@@ -17,6 +17,47 @@ module.exports = oneOf({
17
17
  'full' // always try to merge
18
18
  ],
19
19
  default: 'full'
20
+ }),
21
+ sale: oneOf({
22
+ type: 'object',
23
+ description: 'Specifies conditions on a regular sale.',
24
+ additionalProperties: false,
25
+ properties: {
26
+ items: oneOf({
27
+ type: 'object',
28
+ additionalProperties: false,
29
+ properties: {
30
+ allow_negative_quantity: oneOf({
31
+ description: 'Specifies if items can have negative quantities when doing a regular sale.',
32
+ type: 'boolean',
33
+ default: true
34
+ })
35
+ }
36
+ })
37
+ }
38
+ }),
39
+ refund: oneOf({
40
+ type: 'object',
41
+ additionalProperties: false,
42
+ description: 'Specifies conditions on a refund.',
43
+ properties: {
44
+ immutable: oneOf({
45
+ description: 'In case of refund - specifies if modicications are forbidden',
46
+ type: 'boolean',
47
+ default: false
48
+ }),
49
+ items: oneOf({
50
+ type: 'object',
51
+ additionalProperties: false,
52
+ properties: {
53
+ allow_editing: oneOf({
54
+ description: 'In case of refund items - specifies if quantity and price can be edited',
55
+ type: 'boolean',
56
+ default: false
57
+ })
58
+ }
59
+ })
60
+ }
20
61
  })
21
62
  }
22
63
  })
@@ -13,19 +13,19 @@ module.exports = oneOf({
13
13
  type: 'object',
14
14
  description: 'A dictionary <string, string> describing all validation values',
15
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
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
29
  },
30
30
  additionalProperties: validationType
31
31
  })
@@ -0,0 +1,17 @@
1
+ const { oneOf } = require('../../../helpers/payload-or-null')
2
+
3
+ module.exports = oneOf({
4
+ type: 'object',
5
+ properties: {
6
+ enabled: oneOf({
7
+ description: 'global on-off-switch for the vouchers-feature',
8
+ type: 'boolean',
9
+ default: false
10
+ }),
11
+ allow_cart_redemption: oneOf({
12
+ description: 'Specifies if vouchers can be redeemed as cart items with negative quantity.',
13
+ type: 'boolean',
14
+ default: true
15
+ })
16
+ }
17
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tillhub/schemas",
3
- "version": "6.258.0",
3
+ "version": "6.260.0",
4
4
  "private": false,
5
5
  "description": "All Tillhub API OpenAPI 3 compatible JSON Schemas.",
6
6
  "main": "./lib/index.js",