@tillhub/schemas 6.347.1 → 6.348.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,10 @@
1
+ # [6.348.0](https://github.com/tillhub/schemas/compare/v6.347.1...v6.348.0) (2024-12-12)
2
+
3
+
4
+ ### Features
5
+
6
+ * **products:** support new bulk create ([#1013](https://github.com/tillhub/schemas/issues/1013)) ([7ce792e](https://github.com/tillhub/schemas/commit/7ce792e))
7
+
1
8
  ## [6.347.1](https://github.com/tillhub/schemas/compare/v6.347.0...v6.347.1) (2024-12-02)
2
9
 
3
10
 
@@ -0,0 +1,62 @@
1
+ const base = require('./base').request
2
+ const locationType = require('../../common/location_type')
3
+ const { anyOf, oneOf } = require('../../helpers/payload-or-null')
4
+
5
+ module.exports = {
6
+ $id: 'https://schemas.tillhub.com/v1/products.bulk_create_v2.request.schema.json',
7
+ $schema: 'http://json-schema.org/draft-07/schema#',
8
+ additionalProperties: false,
9
+ type: 'object',
10
+ properties: {
11
+ preferUpdate: {
12
+ type: 'boolean'
13
+ },
14
+ products: {
15
+ type: 'array',
16
+ minItems: 1,
17
+ items: {
18
+ type: 'object',
19
+ required: [
20
+ 'name',
21
+ 'account',
22
+ 'tax',
23
+ 'type'
24
+ ],
25
+ properties: {
26
+ ...base,
27
+ business_partners: oneOf({
28
+ type: 'array',
29
+ items: {
30
+ type: 'string',
31
+ format: 'uuid'
32
+ }
33
+ }),
34
+ tags: oneOf({
35
+ type: 'array',
36
+ items: {
37
+ type: 'string'
38
+ }
39
+ }),
40
+ stock_configuration_location: oneOf({
41
+ type: 'object',
42
+ required: [
43
+ 'location',
44
+ 'qty',
45
+ 'location_type'
46
+ ],
47
+ properties: {
48
+ location: {
49
+ type: 'string',
50
+ format: 'uuid'
51
+ },
52
+ qty: {
53
+ type: 'number'
54
+ },
55
+ location_type: anyOf(locationType)
56
+ }
57
+ })
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }
@@ -245,4 +245,8 @@ module.exports.bulk = {
245
245
  }
246
246
  }
247
247
 
248
+ module.exports.bulk_create_v2 = {
249
+ request: require('./bulk_create_v2')
250
+ }
251
+
248
252
  module.exports.pricelist = require('./pricelist/index')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tillhub/schemas",
3
- "version": "6.347.1",
3
+ "version": "6.348.0",
4
4
  "private": false,
5
5
  "description": "All Tillhub API OpenAPI 3 compatible JSON Schemas.",
6
6
  "main": "./lib/index.js",