@tillhub/schemas 6.236.0 → 6.237.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.237.0](https://github.com/tillhub/schemas/compare/v6.236.1...v6.237.0) (2023-07-27)
2
+
3
+
4
+ ### Features
5
+
6
+ * **reports:** get top products endpoint's filters schema ([f99ca34](https://github.com/tillhub/schemas/commit/f99ca34))
7
+
8
+ ## [6.236.1](https://github.com/tillhub/schemas/compare/v6.236.0...v6.236.1) (2023-07-25)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **service_categories:** allow null description ([#832](https://github.com/tillhub/schemas/issues/832)) ([00704da](https://github.com/tillhub/schemas/commit/00704da))
14
+
1
15
  # [6.236.0](https://github.com/tillhub/schemas/compare/v6.235.0...v6.236.0) (2023-07-25)
2
16
 
3
17
 
@@ -1,5 +1,6 @@
1
1
  module.exports = {
2
2
  discounts: require('./discounts'),
3
3
  staff: require('./staff'),
4
- snapshots: require('./snapshots')
4
+ snapshots: require('./snapshots'),
5
+ reports: require('./reports')
5
6
  }
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ products: require('./products')
3
+ }
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ top: require('./top')
3
+ }
@@ -0,0 +1,27 @@
1
+ module.exports.request = {
2
+ $id: 'https://schemas.tillhub.com/v0/analytics.reports.products.top.request.schema.json',
3
+ $schema: 'http://json-schema.org/draft-07/schema#',
4
+ type: 'object',
5
+ additionalProperties: false,
6
+ required: [],
7
+ properties: {
8
+ start: {
9
+ type: 'string',
10
+ format: 'date-time',
11
+ example: '2018-01-29T14:55:05.000Z',
12
+ description: 'Start date for top products report'
13
+ },
14
+ end: {
15
+ type: 'string',
16
+ format: 'date-time',
17
+ example: '2018-01-29T14:55:05.000Z',
18
+ description: 'End date for top products report'
19
+ },
20
+ branch_number: {
21
+ type: 'string',
22
+ pattern: '^[0-9]+$',
23
+ example: '239',
24
+ description: 'Branch number'
25
+ }
26
+ }
27
+ }
@@ -1,14 +1,15 @@
1
1
  const base = require('../product_groups/base')
2
+ const { oneOf } = require('../../helpers/payload-or-null')
2
3
 
3
4
  const request = {
4
5
  ...base.request,
5
6
  properties: {
6
7
  ...base.request.properties,
7
- description: {
8
+ description: oneOf({
8
9
  description: 'A description of the service category',
9
10
  type: 'string',
10
11
  example: 'Haircuts for men'
11
- },
12
+ }),
12
13
  active: {
13
14
  description: 'Soft disable or enable this service category.',
14
15
  type: 'boolean',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tillhub/schemas",
3
- "version": "6.236.0",
3
+ "version": "6.237.0",
4
4
  "private": false,
5
5
  "description": "All Tillhub API OpenAPI 3 compatible JSON Schemas.",
6
6
  "main": "./lib/index.js",