@tillhub/schemas 6.323.0 → 6.324.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.324.0](https://github.com/tillhub/schemas/compare/v6.323.2...v6.324.0) (2024-07-11)
2
+
3
+
4
+ ### Features
5
+
6
+ * **configurations:** features ([b039670](https://github.com/tillhub/schemas/commit/b039670))
7
+
8
+ ## [6.323.2](https://github.com/tillhub/schemas/compare/v6.323.1...v6.323.2) (2024-07-05)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **v1/promotions:** add validation for uuid ([#975](https://github.com/tillhub/schemas/issues/975)) ([60849a9](https://github.com/tillhub/schemas/commit/60849a9))
14
+
1
15
  # [6.323.0](https://github.com/tillhub/schemas/compare/v6.322.0...v6.323.0) (2024-06-24)
2
16
 
3
17
 
@@ -202,6 +202,11 @@ module.exports = oneOf({
202
202
  type: 'boolean',
203
203
  default: false
204
204
  },
205
+ suppress_errors: oneOf({
206
+ description: 'Specifies if error messages should be suppressed on the UI',
207
+ type: 'boolean',
208
+ default: false
209
+ }),
205
210
  url: {
206
211
  description: 'The URL of the web view',
207
212
  type: 'string',
@@ -35,8 +35,32 @@ module.exports = {
35
35
  type: 'string'
36
36
  },
37
37
  value: {
38
+ type: 'string',
39
+ minLength: 1
40
+ },
41
+ qty: {
42
+ type: 'number'
43
+ }
44
+ }
45
+ },
46
+ promotable_product_group: {
47
+ required: ['property', 'value', 'qty'],
48
+ properties: {
49
+ property: {
38
50
  type: 'string'
39
51
  },
52
+ value: {
53
+ type: 'array',
54
+ items: {
55
+ required: ['id'],
56
+ properties: {
57
+ id: {
58
+ type: 'string',
59
+ format: 'uuid'
60
+ }
61
+ }
62
+ }
63
+ },
40
64
  qty: {
41
65
  type: 'number'
42
66
  }
@@ -74,10 +98,28 @@ module.exports = {
74
98
  property: {
75
99
  type: 'string',
76
100
  enum: ['amount_total_gross', 'percentage_discount', 'amount_discount']
77
-
78
- },
79
- value: {
80
- type: 'number'
101
+ }
102
+ },
103
+ if: {
104
+ properties: {
105
+ property: { 'const': 'percentage_discount' }
106
+ }
107
+ },
108
+ then: {
109
+ properties: {
110
+ value: {
111
+ type: 'number',
112
+ minimum: 0,
113
+ maximum: 1
114
+ }
115
+ }
116
+ },
117
+ else: {
118
+ properties: {
119
+ value: {
120
+ type: 'number',
121
+ minimum: 0
122
+ }
81
123
  }
82
124
  }
83
125
  }
@@ -118,8 +160,32 @@ module.exports = {
118
160
  type: 'string'
119
161
  },
120
162
  value: {
163
+ type: 'string',
164
+ minLength: 1
165
+ },
166
+ qty: {
167
+ type: 'number'
168
+ }
169
+ }
170
+ },
171
+ promotable_product_group: {
172
+ required: ['property', 'value', 'qty'],
173
+ properties: {
174
+ property: {
121
175
  type: 'string'
122
176
  },
177
+ value: {
178
+ type: 'array',
179
+ items: {
180
+ required: ['id'],
181
+ properties: {
182
+ id: {
183
+ type: 'string',
184
+ format: 'uuid'
185
+ }
186
+ }
187
+ }
188
+ },
123
189
  qty: {
124
190
  type: 'number'
125
191
  }
@@ -157,10 +223,28 @@ module.exports = {
157
223
  property: {
158
224
  type: 'string',
159
225
  enum: ['amount_total_gross', 'percentage_discount', 'amount_discount']
160
-
161
- },
162
- value: {
163
- type: 'number'
226
+ }
227
+ },
228
+ if: {
229
+ properties: {
230
+ property: { 'const': 'percentage_discount' }
231
+ }
232
+ },
233
+ then: {
234
+ properties: {
235
+ value: {
236
+ type: 'number',
237
+ minimum: 0,
238
+ maximum: 1
239
+ }
240
+ }
241
+ },
242
+ else: {
243
+ properties: {
244
+ value: {
245
+ type: 'number',
246
+ minimum: 0
247
+ }
164
248
  }
165
249
  }
166
250
  }
@@ -223,10 +307,28 @@ module.exports = {
223
307
  property: {
224
308
  type: 'string',
225
309
  enum: ['amount_total_gross', 'percentage_discount', 'amount_discount']
226
-
227
- },
228
- value: {
229
- type: 'number'
310
+ }
311
+ },
312
+ if: {
313
+ properties: {
314
+ property: { 'const': 'percentage_discount' }
315
+ }
316
+ },
317
+ then: {
318
+ properties: {
319
+ value: {
320
+ type: 'number',
321
+ minimum: 0,
322
+ maximum: 1
323
+ }
324
+ }
325
+ },
326
+ else: {
327
+ properties: {
328
+ value: {
329
+ type: 'number',
330
+ minimum: 0
331
+ }
230
332
  }
231
333
  }
232
334
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tillhub/schemas",
3
- "version": "6.323.0",
3
+ "version": "6.324.0",
4
4
  "private": false,
5
5
  "description": "All Tillhub API OpenAPI 3 compatible JSON Schemas.",
6
6
  "main": "./lib/index.js",