@tillhub/schemas 6.184.0 → 6.186.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.186.0](https://github.com/tillhub/schemas/compare/v6.185.0...v6.186.0) (2022-12-16)
2
+
3
+
4
+ ### Features
5
+
6
+ * **webhooks:** use snake schema #UNTIL-5887 ([0dc2fb1](https://github.com/tillhub/schemas/commit/0dc2fb1)), closes [#UNTIL-5887](https://github.com/tillhub/schemas/issues/UNTIL-5887)
7
+
8
+ # [6.185.0](https://github.com/tillhub/schemas/compare/v6.184.0...v6.185.0) (2022-12-15)
9
+
10
+
11
+ ### Features
12
+
13
+ * **stocks-book:** improve multiline formatting #UNTIL-5820 ([a93bc25](https://github.com/tillhub/schemas/commit/a93bc25)), closes [#UNTIL-5820](https://github.com/tillhub/schemas/issues/UNTIL-5820)
14
+
1
15
  # [6.184.0](https://github.com/tillhub/schemas/compare/v6.183.0...v6.184.0) (2022-12-15)
2
16
 
3
17
 
@@ -8,34 +8,34 @@ module.exports.getEvent = function getEvent (payload, {
8
8
  type: 'object',
9
9
  additionalProperties: false,
10
10
  properties: {
11
- webhookId: {
11
+ webhook_id: {
12
12
  description: 'The webhook UUID',
13
13
  example: 'ff30cfdf-5167-4f72-b4fc-c1d72db3c07e',
14
14
  type: 'string',
15
15
  format: 'uuid'
16
16
  },
17
- eventId: {
17
+ event_id: {
18
18
  description: 'The event UUID',
19
19
  example: 'c6fe918a-7bdc-4ccd-af36-95c03853233d',
20
20
  type: 'string',
21
21
  format: 'uuid'
22
22
  },
23
- eventEntity: {
23
+ event_entity: {
24
24
  description: 'The entity name the event refers to',
25
25
  example: eventEntityExample,
26
26
  type: 'string'
27
27
  },
28
- eventType: {
28
+ event_type: {
29
29
  description: 'The event type (e.g. create, update, delete)',
30
30
  example: eventTypeExample,
31
31
  type: 'string'
32
32
  },
33
- eventVersion: {
33
+ event_version: {
34
34
  description: 'The event payload version',
35
35
  example: eventVersionExample,
36
36
  type: 'number'
37
37
  },
38
- entityInstanceId: {
38
+ entity_instance_id: {
39
39
  description: 'The entity instance UUID',
40
40
  example: '10b06f38-031d-4e0c-8706-0474c8c5b61c',
41
41
  type: 'string',
@@ -1,3 +1,4 @@
1
+ const { stripIndents } = require('common-tags')
1
2
  const pick = require('just-pick')
2
3
  const { oneOf } = require('../../helpers/payload-or-null')
3
4
  const baseObject = require('../../common/base')
@@ -15,11 +16,16 @@ const baseStockBook = require('./base').simple
15
16
  const eventTypeEnum = ['transfer', 'sale', 'delivery_note']
16
17
 
17
18
  const eventBaseData = pick({
18
- ...baseObject({ entityName: 'stock book' }),
19
+ ...baseObject({ entityName: 'stock booking' }),
19
20
  ...baseStockBook,
20
21
  type: {
21
22
  ...baseStockBook.type,
22
- description: `The type of stock booking: \n'transfer' - indicates a stock change made by the operator for the logistic purpose, positive value for goods-in and negative value for goods-out \n'sale' - indicates a stock change triggered by a sale, positive value for a successful transaction and negative value for a refund or cancellation \n'delivery_note' - indicates a stock change triggered by a delivery note, positive value for a successful delivery note and negative value for a refund or cancellation`,
23
+ description: stripIndents`
24
+ The type of stock booking:
25
+ 'transfer' - indicates a stock change made by the operator for the logistic purpose, positive value for goods-in and negative value for goods-out;
26
+ 'sale' - indicates a stock change triggered by a sale, positive value for a successful transaction and negative value for a refund or cancellation;
27
+ 'delivery_note' - indicates a stock change triggered by a delivery note, positive value for a successful delivery note and negative value for a refund or cancellation
28
+ `,
23
29
  enum: eventTypeEnum
24
30
  }
25
31
  }, ['id', 'created_at', 'qty_change', 'type'])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tillhub/schemas",
3
- "version": "6.184.0",
3
+ "version": "6.186.0",
4
4
  "private": false,
5
5
  "description": "All Tillhub API OpenAPI 3 compatible JSON Schemas.",
6
6
  "main": "./lib/index.js",