@tillhub/schemas 6.201.0 → 6.203.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,18 @@
1
+ # [6.203.0](https://github.com/tillhub/schemas/compare/v6.202.0...v6.203.0) (2023-03-22)
2
+
3
+
4
+ ### Features
5
+
6
+ * **products:** adding new types: tip_owner and tip_employee ([991d132](https://github.com/tillhub/schemas/commit/991d132))
7
+
8
+ # [6.202.0](https://github.com/tillhub/schemas/compare/v6.201.0...v6.202.0) (2023-03-22)
9
+
10
+
11
+ ### Features
12
+
13
+ * **product:** add event inside the request ([e1f81ec](https://github.com/tillhub/schemas/commit/e1f81ec))
14
+ * **products:** add event to product create UNTIL-5810 ([b1b2ccf](https://github.com/tillhub/schemas/commit/b1b2ccf))
15
+
1
16
  # [6.201.0](https://github.com/tillhub/schemas/compare/v6.200.0...v6.201.0) (2023-03-13)
2
17
 
3
18
 
@@ -461,7 +461,7 @@ const request = {
461
461
  },
462
462
  type: {
463
463
  type: 'string',
464
- description: 'variant of a product (product|voucher) or a parent (variant_product|linked_product|composed_product) or a child (variant|linked) where child has "parent" property containing the ID of a parent product',
464
+ description: 'variant of a product (product|voucher) or a parent (variant_product|linked_product|composed_product) or a child (variant|linked) where child has "parent" property containing the ID of a parent product or a special product for tipping (tip_owner|tip_employee)',
465
465
  'enum': [
466
466
  'product', // standard product
467
467
  'composed_product', // composed product
@@ -469,7 +469,9 @@ const request = {
469
469
  'linked', // deprecated
470
470
  'linked_product', // parent
471
471
  'variant', // child
472
- 'variant_product' // parent
472
+ 'variant_product', // parent
473
+ 'tip_owner', // special product for tipping owner
474
+ 'tip_employee' // special product for tipping employee
473
475
  ]
474
476
  },
475
477
  manufacturer: oneOf({
@@ -0,0 +1,16 @@
1
+ const baseObject = require('../../common/base')
2
+ const { getEvent } = require('../../common/webhooks')
3
+ const base = require('./base')
4
+
5
+ module.exports = {
6
+ $id: 'https://schemas.tillhub.com/v1/products.create.event.schema.json',
7
+ $schema: 'http://json-schema.org/draft-07/schema#',
8
+ ...getEvent({
9
+ type: 'object',
10
+ additionalProperties: false,
11
+ properties: {
12
+ ...baseObject(),
13
+ ...base
14
+ }
15
+ }, { eventEntityExample: 'product' })
16
+ }
@@ -11,7 +11,8 @@ module.exports.search = {
11
11
 
12
12
  module.exports.create = {
13
13
  request: require('./create.request'),
14
- response: require('./create.response')
14
+ response: require('./create.response'),
15
+ event: require('./event')
15
16
  }
16
17
 
17
18
  module.exports.update = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tillhub/schemas",
3
- "version": "6.201.0",
3
+ "version": "6.203.0",
4
4
  "private": false,
5
5
  "description": "All Tillhub API OpenAPI 3 compatible JSON Schemas.",
6
6
  "main": "./lib/index.js",