@tillhub/schemas 6.335.0 → 6.337.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.337.0](https://github.com/tillhub/schemas/compare/v6.336.0...v6.337.0) (2024-08-19)
2
+
3
+
4
+ ### Features
5
+
6
+ * **transaction:** transaction meta data ([0597e26](https://github.com/tillhub/schemas/commit/0597e26))
7
+
8
+ # [6.336.0](https://github.com/tillhub/schemas/compare/v6.335.0...v6.336.0) (2024-08-08)
9
+
10
+
11
+ ### Features
12
+
13
+ * **common:** custom_properties ([c08080b](https://github.com/tillhub/schemas/commit/c08080b))
14
+
1
15
  # [6.335.0](https://github.com/tillhub/schemas/compare/v6.334.0...v6.335.0) (2024-08-08)
2
16
 
3
17
 
@@ -27,7 +27,8 @@ module.exports.definition = {
27
27
  enum: [
28
28
  'string',
29
29
  'number',
30
- 'boolean'
30
+ 'boolean',
31
+ 'array'
31
32
  ]
32
33
  },
33
34
  label: {
@@ -71,10 +72,18 @@ module.exports.implementation = {
71
72
  [`^.{${PROP_MIN_LENGTH},${PROP_MAX_LENGTH}}$`]: {
72
73
  anyOf: [
73
74
  { type: 'null' },
74
- { type: 'array' },
75
75
  { type: 'string' },
76
76
  { type: 'number' },
77
- { type: 'boolean' }
77
+ { type: 'boolean' },
78
+ { type: 'array',
79
+ items: {
80
+ anyOf: [
81
+ { type: 'string' },
82
+ { type: 'number' },
83
+ { type: 'boolean' }
84
+ ]
85
+ }
86
+ }
78
87
  ]
79
88
  }
80
89
  }
@@ -231,11 +231,26 @@ module.exports = {
231
231
  format: 'uuid',
232
232
  description: 'The common identifier of this order process (to be found on all deltas as well -> "order")'
233
233
  },
234
+ ros_id: {
235
+ type: 'string',
236
+ format: 'uuid',
237
+ description: 'The ROS identifier'
238
+ },
234
239
  number: oneOf({
235
240
  type: 'integer',
236
241
  example: 34,
237
242
  description: 'The counting number of the underlying order'
238
243
  }),
244
+ table_number: oneOf({
245
+ type: 'integer',
246
+ example: 34,
247
+ description: 'The counting number of the order on the table'
248
+ }),
249
+ delta_number: oneOf({
250
+ type: 'integer',
251
+ example: 34,
252
+ description: 'The counting number of the order on the receipt'
253
+ }),
239
254
  started_at: {
240
255
  type: 'string',
241
256
  format: 'date-time',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tillhub/schemas",
3
- "version": "6.335.0",
3
+ "version": "6.337.0",
4
4
  "private": false,
5
5
  "description": "All Tillhub API OpenAPI 3 compatible JSON Schemas.",
6
6
  "main": "./lib/index.js",
@@ -0,0 +1,17 @@
1
+ const test = require('tape')
2
+ const validate = require('../helpers/validate-schema')
3
+ const customProperties = require('../../lib/common/custom_properties')
4
+
5
+ test('Cutom Properties: implementation schema validation', function (t) {
6
+ const { valid, error } = validate(customProperties.implementation)
7
+ t.ok(valid, 'implementation schema is valid')
8
+ t.error(error, 'should not get any error')
9
+ t.end()
10
+ })
11
+
12
+ test('Cutom Properties: definition schema validation', function (t) {
13
+ const { valid, error } = validate(customProperties.definition)
14
+ t.ok(valid, 'definition schema is valid')
15
+ t.error(error, 'should not get any error')
16
+ t.end()
17
+ })