@tillhub/schemas 6.130.0 → 6.133.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,25 @@
1
+ # [6.133.0](https://github.com/tillhub/schemas/compare/v6.132.0...v6.133.0) (2022-04-01)
2
+
3
+
4
+ ### Features
5
+
6
+ * **carts:** add more information about data integrity validation #API-1461 ([19e065b](https://github.com/tillhub/schemas/commit/19e065b)), closes [#API-1461](https://github.com/tillhub/schemas/issues/API-1461)
7
+
8
+ # [6.132.0](https://github.com/tillhub/schemas/compare/v6.131.0...v6.132.0) (2022-03-30)
9
+
10
+
11
+ ### Features
12
+
13
+ * **configurations:** payments ([a96eb88](https://github.com/tillhub/schemas/commit/a96eb88))
14
+
15
+ # [6.131.0](https://github.com/tillhub/schemas/compare/v6.130.0...v6.131.0) (2022-03-29)
16
+
17
+
18
+ ### Features
19
+
20
+ * **customers:** Make bare minimum mandatory in customer creation schema ([#684](https://github.com/tillhub/schemas/issues/684)) ([ebc4273](https://github.com/tillhub/schemas/commit/ebc4273))
21
+ * **customers:** Make bare minimum mandatory in customer creation schema ([#685](https://github.com/tillhub/schemas/issues/685)) ([5d95430](https://github.com/tillhub/schemas/commit/5d95430))
22
+
1
23
  # [6.130.0](https://github.com/tillhub/schemas/compare/v6.129.0...v6.130.0) (2022-03-24)
2
24
 
3
25
 
@@ -24,10 +24,8 @@ module.exports = {
24
24
  lastname: {
25
25
  example: 'Fett',
26
26
  description: 'Last name',
27
- ...anyOf({
28
- type: 'string',
29
- maxLength: 128
30
- })
27
+ type: 'string',
28
+ maxLength: 128
31
29
  },
32
30
  middlename: {
33
31
  description: 'Middle name',
@@ -1,4 +1,3 @@
1
- const { anyOf } = require('../../helpers/payload-or-null')
2
1
  const baseObject = require('../../common/base')
3
2
  const commonResponse = require('../../common/response')
4
3
 
@@ -11,17 +10,9 @@ module.exports = {
11
10
  additionalProperties: false,
12
11
  type: 'object',
13
12
  properties: base,
14
- ...anyOf([{
15
- required: [
16
- 'firstname'
17
- ]
18
- }, {
19
- required: [
20
- 'lastname'
21
- ]
22
- }
23
- ]),
24
- required: []
13
+ required: [
14
+ 'lastname'
15
+ ]
25
16
  },
26
17
  response: {
27
18
  $id: 'https://schemas.tillhub.com/v0/customers.create.response.schema.json',
@@ -13,7 +13,7 @@ const masterData = {
13
13
  })
14
14
  },
15
15
  tax: {
16
- description: 'Tax rate ID',
16
+ description: 'Tax rate ID. If not present, the "vat_rate" must be present. The active tax with such ID must be defined in the system',
17
17
  type: 'string',
18
18
  format: 'uuid'
19
19
  },
@@ -23,7 +23,7 @@ const masterData = {
23
23
  format: 'uuid'
24
24
  },
25
25
  account_number: {
26
- description: 'Account number',
26
+ description: 'Account number. The only one active account with the same number must be defined in the system (does not apply when "account" value is present)',
27
27
  ...oneOf({
28
28
  type: 'string'
29
29
  })
@@ -498,7 +498,7 @@ const externalCart = {
498
498
  ...amount
499
499
  },
500
500
  vat_rate: {
501
- description: 'VAT rate',
501
+ description: 'VAT rate in the range 0-1. Required when "tax" value is not present. The only one active VAT with the same rate must be defined in the system (does not apply when "tax" value is present)',
502
502
  example: 0.12,
503
503
  type: 'number',
504
504
  minimum: 0,
@@ -618,7 +618,7 @@ const internalCart = {
618
618
  })
619
619
  },
620
620
  vat_rate: {
621
- description: 'VAT rate',
621
+ description: 'VAT rate in the range 0-1. Required when "tax" value is not present. The only one active VAT with the same rate must be defined in the system (does not apply when "tax" value is present)',
622
622
  example: 0.12,
623
623
  type: 'number',
624
624
  minimum: 0,
@@ -21,6 +21,11 @@ module.exports = {
21
21
  description: 'If true, allows multiple payments on negative cart totals, e.g. undefined + cash (e.g. health insurance case).',
22
22
  default: false,
23
23
  type: 'boolean'
24
+ }),
25
+ allow_change_on_cards: oneOf({
26
+ description: 'If true, allows entering values for split payments that are higher than the remaining price - thus potentially handing back cash (legacy behavior).',
27
+ default: false,
28
+ type: 'boolean'
24
29
  })
25
30
  }
26
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tillhub/schemas",
3
- "version": "6.130.0",
3
+ "version": "6.133.0",
4
4
  "private": false,
5
5
  "description": "All Tillhub API OpenAPI 3 compatible JSON Schemas.",
6
6
  "main": "./lib/index.js",