@tillhub/schemas 6.353.0 → 6.355.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,17 @@
1
+ # [6.355.0](https://github.com/tillhub/schemas/compare/v6.354.0...v6.355.0) (2025-02-04)
2
+
3
+
4
+ ### Features
5
+
6
+ * **carts:** support carts without items ([#1025](https://github.com/tillhub/schemas/issues/1025)) ([97965a9](https://github.com/tillhub/schemas/commit/97965a9))
7
+
8
+ # [6.354.0](https://github.com/tillhub/schemas/compare/v6.353.0...v6.354.0) (2025-01-30)
9
+
10
+
11
+ ### Features
12
+
13
+ * **table_layout:** table_layout_v1 added ([#1024](https://github.com/tillhub/schemas/issues/1024)) ([a18a6cf](https://github.com/tillhub/schemas/commit/a18a6cf))
14
+
1
15
  # [6.353.0](https://github.com/tillhub/schemas/compare/v6.352.0...v6.353.0) (2025-01-22)
2
16
 
3
17
 
@@ -172,7 +172,7 @@ module.exports = {
172
172
  maxLength: 4096
173
173
  })
174
174
  },
175
- items,
175
+ items: oneOf(items),
176
176
  metadata: oneOf({
177
177
  type: 'object',
178
178
  description: 'Additional meta data',
@@ -8,9 +8,7 @@ module.exports = {
8
8
  $schema: 'http://json-schema.org/draft-07/schema#',
9
9
  type: 'object',
10
10
  additionalProperties: false,
11
- required: [
12
- 'items'
13
- ],
11
+ required: [],
14
12
  properties: base
15
13
  },
16
14
  response: {
@@ -1,5 +1,6 @@
1
1
  const baseObject = require('../../common/base')
2
2
  const commonResponse = require('../../common/response')
3
+ const { oneOf } = require('../../helpers/payload-or-null')
3
4
  const base = require('./base')
4
5
  const patch = require('./items').patch
5
6
 
@@ -11,7 +12,7 @@ module.exports = {
11
12
  additionalProperties: false,
12
13
  required: [
13
14
  ],
14
- properties: { ...base, items: patch }
15
+ properties: { ...base, items: oneOf(patch) }
15
16
  },
16
17
  response: {
17
18
  $id: 'https://schemas.tillhub.com/v1/carts.patch.response.schema.json',
package/lib/v1/index.js CHANGED
@@ -12,5 +12,6 @@ module.exports.templates = require('./templates')
12
12
  module.exports.transactions = require('./transactions')
13
13
  module.exports.statuses = require('./statuses')
14
14
  module.exports.promotions = require('./promotions')
15
+ module.exports.table_layout = require('./table_layout')
15
16
 
16
17
  // 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,27 @@
1
+ module.exports = {
2
+ id: {
3
+ type: 'string',
4
+ format: 'uuid'
5
+ },
6
+ name: {
7
+ type: 'string',
8
+ minLength: 1
9
+ },
10
+ location: {
11
+ type: 'string',
12
+ format: 'uuid'
13
+ },
14
+ tables_count: {
15
+ type: 'integer',
16
+ minimum: 0
17
+ },
18
+ active: {
19
+ type: 'boolean',
20
+ default: true
21
+ },
22
+ layout: {
23
+ type: 'object',
24
+ additionalProperties: true,
25
+ default: {}
26
+ }
27
+ }
@@ -0,0 +1,16 @@
1
+ const base = require('./base')
2
+
3
+ module.exports.request = {
4
+ $id: 'https://schemas.tillhub.com/v1/table_layout.create.request.schema.json',
5
+ $schema: 'http://json-schema.org/draft-07/schema#',
6
+ additionalProperties: false,
7
+ required: [
8
+ 'type',
9
+ 'name',
10
+ 'location',
11
+ 'tables_count',
12
+ 'active'
13
+ ],
14
+ properties: base,
15
+ type: 'object'
16
+ }
@@ -0,0 +1,17 @@
1
+ module.exports.request = {
2
+ $id: 'https://schemas.tillhub.com/v0/table_layout.duplicate.request.schema.json',
3
+ $schema: 'http://json-schema.org/draft-07/schema#',
4
+ additionalProperties: false,
5
+ type: 'object',
6
+ required: [],
7
+ properties: {
8
+ name: {
9
+ type: 'string',
10
+ minLength: 1
11
+ },
12
+ location: {
13
+ type: 'string',
14
+ format: 'uuid'
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,2 @@
1
+ module.exports.create = require('./create')
2
+ module.exports.update = require('./update')
@@ -0,0 +1,10 @@
1
+ const base = require('./base')
2
+
3
+ module.exports.request = {
4
+ $id: 'https://schemas.tillhub.com/v0/table_layout.update.request.schema.json',
5
+ $schema: 'http://json-schema.org/draft-07/schema#',
6
+ additionalProperties: false,
7
+ type: 'object',
8
+ required: [],
9
+ properties: base
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tillhub/schemas",
3
- "version": "6.353.0",
3
+ "version": "6.355.0",
4
4
  "private": false,
5
5
  "description": "All Tillhub API OpenAPI 3 compatible JSON Schemas.",
6
6
  "main": "./lib/index.js",