@tillhub/schemas 6.349.0 → 6.350.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,22 @@
1
+ # [6.350.0](https://github.com/tillhub/schemas/compare/v6.349.1...v6.350.0) (2025-01-14)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **common:** device_info ([94540cc](https://github.com/tillhub/schemas/commit/94540cc))
7
+
8
+
9
+ ### Features
10
+
11
+ * **validation:** avoid 422s ([#1015](https://github.com/tillhub/schemas/issues/1015)) ([cfd6e42](https://github.com/tillhub/schemas/commit/cfd6e42))
12
+
13
+ ## [6.349.1](https://github.com/tillhub/schemas/compare/v6.349.0...v6.349.1) (2025-01-07)
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * **bulk import:** keep initial stock configuration location as is ([#1018](https://github.com/tillhub/schemas/issues/1018)) ([d45cee3](https://github.com/tillhub/schemas/commit/d45cee3))
19
+
1
20
  # [6.349.0](https://github.com/tillhub/schemas/compare/v6.348.0...v6.349.0) (2024-12-16)
2
21
 
3
22
 
@@ -1,7 +1,7 @@
1
1
  module.exports = {
2
2
  type: 'object',
3
3
  additionalProperties: false,
4
- description: 'Describes a non-negative monetary value in a specific currency.',
4
+ description: 'Describes a monetary value in a specific currency.',
5
5
  required: ['amount', 'currency'],
6
6
  properties: {
7
7
  currency: {
@@ -15,7 +15,6 @@ module.exports = {
15
15
  type: 'number',
16
16
  description: 'The value as .2-Decimal.',
17
17
  example: '47.02',
18
- minimum: 0,
19
18
  multipleOf: 0.01
20
19
  }
21
20
  }
@@ -27,6 +27,18 @@ module.exports = {
27
27
  type: 'string',
28
28
  description: 'Device hardware',
29
29
  example: 'Simulator iPad (10th generation)'
30
+ }),
31
+ user: oneOf({
32
+ type: 'string',
33
+ description: 'Login email of the user',
34
+ format: 'email',
35
+ example: 'm@n.de'
36
+ }),
37
+ sub_user: oneOf({
38
+ type: 'string',
39
+ description: 'Login email of the sub-user',
40
+ format: 'email',
41
+ example: 'm@n.de'
30
42
  })
31
43
  }
32
44
  }
@@ -2,7 +2,6 @@ const { oneOf } = require('../../helpers/payload-or-null')
2
2
  const { timezone } = require('../../common/timezones')
3
3
  const currencyAmounts = require('../../common/currency_amounts')
4
4
  const cashUnits = require('./cash_units/base')
5
- const discrepancyTotal = require('./discrepancy_total/base')
6
5
 
7
6
  module.exports = {
8
7
  custom_id: {
@@ -220,10 +219,7 @@ module.exports = {
220
219
  description: 'Total amounts per currency from calculation (values from previously closed balance, setpoint value)'
221
220
  },
222
221
  discrepancy_total: oneOf({
223
- type: 'array',
224
- items: {
225
- ...discrepancyTotal
226
- },
222
+ ...currencyAmounts,
227
223
  description: 'Discrepencies per currency (discrepencies[currency] = total_counted[currency] - total_calculated[currency])'
228
224
  }),
229
225
  has_discrepancy: {
@@ -521,6 +521,11 @@ const request = {
521
521
  }, { default: '' })
522
522
  }
523
523
  }),
524
+ supplier_code: oneOf({
525
+ description: 'The supplier code for the product',
526
+ type: 'string',
527
+ example: 'ATV4300123'
528
+ }),
524
529
  locations: oneOf({
525
530
  type: 'array',
526
531
  items: {
@@ -1,6 +1,5 @@
1
1
  const base = require('./base').request
2
- const locationType = require('../../common/location_type')
3
- const { anyOf, oneOf } = require('../../helpers/payload-or-null')
2
+ const { oneOf } = require('../../helpers/payload-or-null')
4
3
 
5
4
  const productProperties = {
6
5
  ...base,
@@ -16,24 +15,6 @@ const productProperties = {
16
15
  items: {
17
16
  type: 'string'
18
17
  }
19
- }),
20
- stock_configuration_location: oneOf({
21
- type: 'object',
22
- required: [
23
- 'location',
24
- 'qty',
25
- 'location_type'
26
- ],
27
- properties: {
28
- location: {
29
- type: 'string',
30
- format: 'uuid'
31
- },
32
- qty: {
33
- type: 'number'
34
- },
35
- location_type: anyOf(locationType)
36
- }
37
18
  })
38
19
  }
39
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tillhub/schemas",
3
- "version": "6.349.0",
3
+ "version": "6.350.0",
4
4
  "private": false,
5
5
  "description": "All Tillhub API OpenAPI 3 compatible JSON Schemas.",
6
6
  "main": "./lib/index.js",
@@ -1,26 +0,0 @@
1
- module.exports = {
2
- description: 'The discrepancy amount by currency',
3
- additionalProperties: false,
4
- type: 'object',
5
- required: [
6
- 'currency',
7
- 'amount'
8
- ],
9
- properties: {
10
- currency: {
11
- type: 'string',
12
- description: 'The three letter [ISO currency](https://en.wikipedia.org/wiki/ISO_4217) of this item.',
13
- example: 'EUR',
14
- minLength: 3,
15
- maxLength: 3
16
- },
17
- amount: {
18
- type: 'number',
19
- description: 'The quantity of this unit.',
20
- examples: [27633.02],
21
- minimum: -1000000,
22
- maximum: 1000000,
23
- multipleOf: 0.01
24
- }
25
- }
26
- }