@tillhub/schemas 6.373.0 → 6.374.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.374.1](https://github.com/tillhub/schemas/compare/v6.374.0...v6.374.1) (2025-04-25)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **imports:** support ids for products ([#1053](https://github.com/tillhub/schemas/issues/1053)) ([e969f62](https://github.com/tillhub/schemas/commit/e969f62))
7
+
8
+ # [6.374.0](https://github.com/tillhub/schemas/compare/v6.373.0...v6.374.0) (2025-04-25)
9
+
10
+
11
+ ### Features
12
+
13
+ * **imports:** support import chunks ([#1052](https://github.com/tillhub/schemas/issues/1052)) ([6438a95](https://github.com/tillhub/schemas/commit/6438a95))
14
+
1
15
  # [6.373.0](https://github.com/tillhub/schemas/compare/v6.372.0...v6.373.0) (2025-04-10)
2
16
 
3
17
 
@@ -0,0 +1,60 @@
1
+ const { productImportChunkItem } = require('../products/import_chunk_item')
2
+
3
+ module.exports.chunks = {
4
+ create: {
5
+ request: {
6
+ $id: 'https://schemas.tillhub.com/v1/imports.chunks.create.request.schema.json',
7
+ $schema: 'http://json-schema.org/draft-07/schema#',
8
+ additionalProperties: false,
9
+ type: 'object',
10
+ required: [
11
+ 'correlationId',
12
+ 'index',
13
+ 'isDone',
14
+ 'type',
15
+ 'chunk',
16
+ 'preferUpdate'
17
+ ],
18
+ properties: {
19
+ correlationId: {
20
+ type: 'string',
21
+ format: 'uuid'
22
+ },
23
+ index: {
24
+ type: 'integer'
25
+ },
26
+ isDone: {
27
+ type: 'boolean'
28
+ },
29
+ type: {
30
+ type: 'string',
31
+ enum: [
32
+ 'product'
33
+ ]
34
+ },
35
+ chunk: {
36
+ type: 'array',
37
+ items: {
38
+ type: 'object'
39
+ }
40
+ },
41
+ preferUpdate: {
42
+ type: 'boolean'
43
+ }
44
+ },
45
+ allOf: [
46
+ {
47
+ if: { properties: { type: { const: 'product' } }, required: ['type'] },
48
+ then: {
49
+ properties: {
50
+ chunk: {
51
+ type: 'array',
52
+ items: productImportChunkItem
53
+ }
54
+ }
55
+ }
56
+ }
57
+ ]
58
+ }
59
+ }
60
+ }
package/lib/v1/index.js CHANGED
@@ -13,5 +13,6 @@ module.exports.transactions = require('./transactions')
13
13
  module.exports.statuses = require('./statuses')
14
14
  module.exports.promotions = require('./promotions')
15
15
  module.exports.table_layout = require('./table_layout')
16
+ module.exports.imports = require('./imports')
16
17
 
17
18
  // hygen:injection - Please, don't delete this line: when running the cli for schema resources the new routes will be automatically added here.
@@ -0,0 +1,38 @@
1
+ const { oneOf } = require('../../helpers/payload-or-null')
2
+ const { grossPriceCondition } = require('./common/price_condition')
3
+
4
+ const base = require('./base').request
5
+
6
+ const productImportChunkItem = {
7
+ type: 'object',
8
+ additionalProperties: false,
9
+ required: [
10
+ 'name',
11
+ 'account',
12
+ 'tax',
13
+ 'type'
14
+ ],
15
+ properties: {
16
+ id: {
17
+ type: 'string',
18
+ format: 'uuid'
19
+ },
20
+ ...base,
21
+ business_partners: oneOf({
22
+ type: 'array',
23
+ items: {
24
+ type: 'string',
25
+ format: 'uuid'
26
+ }
27
+ }),
28
+ tags: oneOf({
29
+ type: 'array',
30
+ items: {
31
+ type: 'string'
32
+ }
33
+ })
34
+ },
35
+ allOf: [grossPriceCondition]
36
+ }
37
+
38
+ module.exports = { productImportChunkItem }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tillhub/schemas",
3
- "version": "6.373.0",
3
+ "version": "6.374.1",
4
4
  "private": false,
5
5
  "description": "All Tillhub API OpenAPI 3 compatible JSON Schemas.",
6
6
  "main": "./lib/index.js",