@tillhub/schemas 6.340.1 → 6.341.1

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.341.1](https://github.com/tillhub/schemas/compare/v6.341.0...v6.341.1) (2024-09-22)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **stock update:** added mandatory location to the schema ([8408202](https://github.com/tillhub/schemas/commit/8408202))
7
+
8
+ # [6.341.0](https://github.com/tillhub/schemas/compare/v6.340.1...v6.341.0) (2024-09-17)
9
+
10
+
11
+ ### Features
12
+
13
+ * **products:** add products selection by custom ids schema ([d51f9cf](https://github.com/tillhub/schemas/commit/d51f9cf))
14
+
1
15
  ## [6.340.1](https://github.com/tillhub/schemas/compare/v6.340.0...v6.340.1) (2024-09-16)
2
16
 
3
17
 
@@ -9,7 +9,8 @@ module.exports.request = {
9
9
  additionalProperties: false,
10
10
  type: 'object',
11
11
  required: [
12
- 'qty'
12
+ 'qty',
13
+ 'location'
13
14
  ],
14
15
  properties: {
15
16
  qty: {
@@ -51,7 +52,12 @@ module.exports.request = {
51
52
  type: 'string',
52
53
  minLength: 1,
53
54
  maxLength: 2048
54
- })
55
+ }),
56
+ location: {
57
+ description: 'Alphanumeric uuid of the location, e.g. branch uuid or warehouse uuid',
58
+ type: 'string',
59
+ format: 'uuid'
60
+ }
55
61
  }
56
62
  }
57
63
 
@@ -3,7 +3,8 @@ module.exports = {
3
3
  $schema: 'http://json-schema.org/draft-07/schema#',
4
4
  additionalProperties: false,
5
5
  type: 'object',
6
- required: ['product_ids'],
6
+ required: [],
7
+ anyOf: [{ required: ['product_ids'] }, { required: ['custom_ids'] }],
7
8
  properties: {
8
9
  product_ids: {
9
10
  type: 'array',
@@ -15,6 +16,16 @@ module.exports = {
15
16
  format: 'uuid',
16
17
  example: '05297f58-3408-44d0-8bf4-125d4e86c08a'
17
18
  }
19
+ },
20
+ custom_ids: {
21
+ type: 'array',
22
+ minItems: 1,
23
+ maxItems: 100,
24
+ items: {
25
+ description: 'Custom string ID',
26
+ type: 'string',
27
+ example: 'custom_id_12345'
28
+ }
18
29
  }
19
30
  }
20
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tillhub/schemas",
3
- "version": "6.340.1",
3
+ "version": "6.341.1",
4
4
  "private": false,
5
5
  "description": "All Tillhub API OpenAPI 3 compatible JSON Schemas.",
6
6
  "main": "./lib/index.js",