@tillhub/schemas 6.231.0 → 6.232.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,10 @@
|
|
|
1
|
+
# [6.232.0](https://github.com/tillhub/schemas/compare/v6.231.0...v6.232.0) (2023-07-20)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **products:** configurations ([fdba281](https://github.com/tillhub/schemas/commit/fdba281))
|
|
7
|
+
|
|
1
8
|
# [6.231.0](https://github.com/tillhub/schemas/compare/v6.230.0...v6.231.0) (2023-07-20)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
const { oneOf } = require('../../../helpers/payload-or-null')
|
|
1
2
|
const { stripIndents } = require('common-tags')
|
|
3
|
+
|
|
2
4
|
module.exports = {
|
|
3
5
|
description: 'Defines various product behaviours.',
|
|
4
6
|
default: {
|
|
@@ -12,6 +14,59 @@ module.exports = {
|
|
|
12
14
|
type: 'object',
|
|
13
15
|
additionalProperties: true,
|
|
14
16
|
properties: {
|
|
17
|
+
external_rewards: oneOf({
|
|
18
|
+
type: 'object',
|
|
19
|
+
description: stripIndents`
|
|
20
|
+
Can grant external rewards when added to a cart.
|
|
21
|
+
|
|
22
|
+
NOTE: Should be used sparsely for special campign products that require barcode scanning as sort of campaign activator.
|
|
23
|
+
Should be used for products that are bound to specific branch groups.
|
|
24
|
+
These products will be currently visible to anyone as there is no dedicated type planned (Summer 2023).
|
|
25
|
+
`,
|
|
26
|
+
additionalProperties: true,
|
|
27
|
+
properties: {
|
|
28
|
+
coop: oneOf({
|
|
29
|
+
type: 'object',
|
|
30
|
+
description: 'Can grant Coop rewards when added to a cart.',
|
|
31
|
+
properties: {
|
|
32
|
+
campaign: oneOf({
|
|
33
|
+
type: 'object',
|
|
34
|
+
description: 'Can grant Coop campaign rewards when part of an active cart.',
|
|
35
|
+
properties: {
|
|
36
|
+
name: {
|
|
37
|
+
description: 'Name of the campaign',
|
|
38
|
+
type: 'string',
|
|
39
|
+
example: 'Super Summer',
|
|
40
|
+
minLength: 2,
|
|
41
|
+
maxLength: 24
|
|
42
|
+
},
|
|
43
|
+
multiplier: {
|
|
44
|
+
type: 'integer',
|
|
45
|
+
description: 'Superpoint multiplier on cart total',
|
|
46
|
+
minimum: 1,
|
|
47
|
+
maximum: 100,
|
|
48
|
+
default: 1
|
|
49
|
+
},
|
|
50
|
+
date_start: oneOf({
|
|
51
|
+
type: 'string',
|
|
52
|
+
format: 'date-time',
|
|
53
|
+
example: '2023-08-04 12:00:21.165+00',
|
|
54
|
+
description: 'Start date of the campaign',
|
|
55
|
+
default: null // fallback: distant past
|
|
56
|
+
}),
|
|
57
|
+
date_end: oneOf({
|
|
58
|
+
type: 'string',
|
|
59
|
+
format: 'date-time',
|
|
60
|
+
example: '2023-10-23 16:51:29.143+00',
|
|
61
|
+
description: 'End date of the campaign',
|
|
62
|
+
default: null // fallback: distant future
|
|
63
|
+
})
|
|
64
|
+
}
|
|
65
|
+
})
|
|
66
|
+
}
|
|
67
|
+
})
|
|
68
|
+
}
|
|
69
|
+
}),
|
|
15
70
|
allow_zero_prices: {
|
|
16
71
|
deprecated: true,
|
|
17
72
|
description: 'Allow adding this product to a cart if it has no price.',
|