@tillhub/schemas 6.348.0 → 6.349.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 +14 -0
- package/lib/v1/products/bulk_create_v2.js +32 -30
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [6.349.1](https://github.com/tillhub/schemas/compare/v6.349.0...v6.349.1) (2025-01-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **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))
|
|
7
|
+
|
|
8
|
+
# [6.349.0](https://github.com/tillhub/schemas/compare/v6.348.0...v6.349.0) (2024-12-16)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **products:** fixes for new bulk create ([#1014](https://github.com/tillhub/schemas/issues/1014)) ([b0fb2b3](https://github.com/tillhub/schemas/commit/b0fb2b3))
|
|
14
|
+
|
|
1
15
|
# [6.348.0](https://github.com/tillhub/schemas/compare/v6.347.1...v6.348.0) (2024-12-12)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -1,12 +1,32 @@
|
|
|
1
1
|
const base = require('./base').request
|
|
2
|
-
const
|
|
3
|
-
|
|
2
|
+
const { oneOf } = require('../../helpers/payload-or-null')
|
|
3
|
+
|
|
4
|
+
const productProperties = {
|
|
5
|
+
...base,
|
|
6
|
+
business_partners: oneOf({
|
|
7
|
+
type: 'array',
|
|
8
|
+
items: {
|
|
9
|
+
type: 'string',
|
|
10
|
+
format: 'uuid'
|
|
11
|
+
}
|
|
12
|
+
}),
|
|
13
|
+
tags: oneOf({
|
|
14
|
+
type: 'array',
|
|
15
|
+
items: {
|
|
16
|
+
type: 'string'
|
|
17
|
+
}
|
|
18
|
+
})
|
|
19
|
+
}
|
|
4
20
|
|
|
5
21
|
module.exports = {
|
|
6
22
|
$id: 'https://schemas.tillhub.com/v1/products.bulk_create_v2.request.schema.json',
|
|
7
23
|
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
8
24
|
additionalProperties: false,
|
|
9
25
|
type: 'object',
|
|
26
|
+
required: [
|
|
27
|
+
'preferUpdate',
|
|
28
|
+
'products'
|
|
29
|
+
],
|
|
10
30
|
properties: {
|
|
11
31
|
preferUpdate: {
|
|
12
32
|
type: 'boolean'
|
|
@@ -23,36 +43,18 @@ module.exports = {
|
|
|
23
43
|
'type'
|
|
24
44
|
],
|
|
25
45
|
properties: {
|
|
26
|
-
...
|
|
27
|
-
|
|
46
|
+
...productProperties,
|
|
47
|
+
children: oneOf({
|
|
28
48
|
type: 'array',
|
|
29
49
|
items: {
|
|
30
|
-
type: '
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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)
|
|
50
|
+
type: 'object',
|
|
51
|
+
required: [
|
|
52
|
+
'name',
|
|
53
|
+
'account',
|
|
54
|
+
'tax',
|
|
55
|
+
'type'
|
|
56
|
+
],
|
|
57
|
+
properties: productProperties
|
|
56
58
|
}
|
|
57
59
|
})
|
|
58
60
|
}
|