@tillhub/schemas 6.318.0 → 6.320.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.320.0](https://github.com/tillhub/schemas/compare/v6.319.0...v6.320.0) (2024-06-20)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **promotion:** add new promotion type ([#968](https://github.com/tillhub/schemas/issues/968)) ([8ed6a0a](https://github.com/tillhub/schemas/commit/8ed6a0a))
|
|
7
|
+
|
|
8
|
+
# [6.319.0](https://github.com/tillhub/schemas/compare/v6.318.0...v6.319.0) (2024-06-17)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **promotion:** add new promotion type ([#964](https://github.com/tillhub/schemas/issues/964)) ([bea0b4b](https://github.com/tillhub/schemas/commit/bea0b4b))
|
|
14
|
+
|
|
1
15
|
# [6.318.0](https://github.com/tillhub/schemas/compare/v6.317.0...v6.318.0) (2024-06-17)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -2,7 +2,7 @@ const base = require('./base')
|
|
|
2
2
|
const defaultResponse = require('./default-response')
|
|
3
3
|
|
|
4
4
|
module.exports.request = {
|
|
5
|
-
$id: 'https://schemas.tillhub.com/
|
|
5
|
+
$id: 'https://schemas.tillhub.com/v1/promotions.create.request.schema.json',
|
|
6
6
|
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
7
7
|
additionalProperties: false,
|
|
8
8
|
type: 'object',
|
|
@@ -15,7 +15,7 @@ module.exports.request = {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
module.exports.response = {
|
|
18
|
-
$id: 'https://schemas.tillhub.com/
|
|
18
|
+
$id: 'https://schemas.tillhub.com/v1/promotions.create.response.schema.json',
|
|
19
19
|
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
20
20
|
additionalProperties: true,
|
|
21
21
|
type: 'object',
|
|
@@ -17,14 +17,71 @@ module.exports = {
|
|
|
17
17
|
]
|
|
18
18
|
},
|
|
19
19
|
inputs: {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
type: 'object',
|
|
21
|
+
required: [
|
|
22
|
+
'repeatable_promotable',
|
|
23
|
+
'promotable_product',
|
|
24
|
+
'bundle_junctions',
|
|
25
|
+
'output'
|
|
26
|
+
],
|
|
27
|
+
properties: {
|
|
28
|
+
repeatable_promotable: {
|
|
29
|
+
type: 'boolean'
|
|
23
30
|
},
|
|
24
|
-
{
|
|
25
|
-
|
|
31
|
+
promotable_product: {
|
|
32
|
+
required: ['property', 'value', 'qty'],
|
|
33
|
+
properties: {
|
|
34
|
+
property: {
|
|
35
|
+
type: 'string'
|
|
36
|
+
},
|
|
37
|
+
value: {
|
|
38
|
+
type: 'string'
|
|
39
|
+
},
|
|
40
|
+
qty: {
|
|
41
|
+
type: 'number'
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
bundle_junctions: {
|
|
46
|
+
type: 'array',
|
|
47
|
+
uniqueItems: true,
|
|
48
|
+
additionalItems: false,
|
|
49
|
+
minItems: 2,
|
|
50
|
+
maxItems: 2,
|
|
51
|
+
items: {
|
|
52
|
+
required: ['type', 'property', 'value'],
|
|
53
|
+
properties: {
|
|
54
|
+
property: { // its only assumed that the property is id
|
|
55
|
+
type: 'string'
|
|
56
|
+
},
|
|
57
|
+
value: {
|
|
58
|
+
type: 'array'
|
|
59
|
+
},
|
|
60
|
+
qty: { // only needs for type = product
|
|
61
|
+
type: 'number'
|
|
62
|
+
},
|
|
63
|
+
type: {
|
|
64
|
+
type: 'string',
|
|
65
|
+
enum: ['product', 'product_group']
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
output: {
|
|
71
|
+
type: 'object',
|
|
72
|
+
required: ['property', 'value'],
|
|
73
|
+
properties: {
|
|
74
|
+
property: {
|
|
75
|
+
type: 'string',
|
|
76
|
+
enum: ['amount_total_gross', 'percentage_discount', 'amount_discount']
|
|
77
|
+
|
|
78
|
+
},
|
|
79
|
+
value: {
|
|
80
|
+
type: 'number'
|
|
81
|
+
}
|
|
82
|
+
}
|
|
26
83
|
}
|
|
27
|
-
|
|
84
|
+
}
|
|
28
85
|
}
|
|
29
86
|
}
|
|
30
87
|
},
|
|
@@ -43,14 +100,137 @@ module.exports = {
|
|
|
43
100
|
]
|
|
44
101
|
},
|
|
45
102
|
inputs: {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
103
|
+
type: 'object',
|
|
104
|
+
required: [
|
|
105
|
+
'repeatable_promotable',
|
|
106
|
+
'promotable_product',
|
|
107
|
+
'bundle_junctions',
|
|
108
|
+
'output'
|
|
109
|
+
],
|
|
110
|
+
properties: {
|
|
111
|
+
repeatable_promotable: {
|
|
112
|
+
type: 'boolean'
|
|
113
|
+
},
|
|
114
|
+
promotable_product: {
|
|
115
|
+
required: ['property', 'value', 'qty'],
|
|
116
|
+
properties: {
|
|
117
|
+
property: {
|
|
118
|
+
type: 'string'
|
|
119
|
+
},
|
|
120
|
+
value: {
|
|
121
|
+
type: 'string'
|
|
122
|
+
},
|
|
123
|
+
qty: {
|
|
124
|
+
type: 'number'
|
|
125
|
+
}
|
|
126
|
+
}
|
|
49
127
|
},
|
|
50
|
-
{
|
|
51
|
-
type: '
|
|
128
|
+
bundle_junctions: {
|
|
129
|
+
type: 'array',
|
|
130
|
+
maxItems: 1,
|
|
131
|
+
minItems: 1,
|
|
132
|
+
uniqueItems: true,
|
|
133
|
+
additionalItems: false,
|
|
134
|
+
items: {
|
|
135
|
+
required: ['type', 'property', 'value', 'qty'],
|
|
136
|
+
properties: {
|
|
137
|
+
property: {
|
|
138
|
+
type: 'string'
|
|
139
|
+
},
|
|
140
|
+
value: {
|
|
141
|
+
type: 'string'
|
|
142
|
+
},
|
|
143
|
+
qty: {
|
|
144
|
+
type: 'number'
|
|
145
|
+
},
|
|
146
|
+
type: {
|
|
147
|
+
type: 'string',
|
|
148
|
+
enum: ['product']
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
output: {
|
|
154
|
+
type: 'object',
|
|
155
|
+
required: ['property', 'value'],
|
|
156
|
+
properties: {
|
|
157
|
+
property: {
|
|
158
|
+
type: 'string',
|
|
159
|
+
enum: ['amount_total_gross', 'percentage_discount', 'amount_discount']
|
|
160
|
+
|
|
161
|
+
},
|
|
162
|
+
value: {
|
|
163
|
+
type: 'number'
|
|
164
|
+
}
|
|
165
|
+
}
|
|
52
166
|
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
additionalProperties: false,
|
|
173
|
+
type: 'object',
|
|
174
|
+
required: [
|
|
175
|
+
'inputs',
|
|
176
|
+
'type'
|
|
177
|
+
],
|
|
178
|
+
properties: {
|
|
179
|
+
type: {
|
|
180
|
+
type: 'string',
|
|
181
|
+
enum: [
|
|
182
|
+
'product_property:entire_basket:output_properties'
|
|
53
183
|
]
|
|
184
|
+
},
|
|
185
|
+
inputs: {
|
|
186
|
+
type: 'object',
|
|
187
|
+
required: [
|
|
188
|
+
'promotable_product',
|
|
189
|
+
'required_amount',
|
|
190
|
+
'promotable_product_group',
|
|
191
|
+
'output'
|
|
192
|
+
],
|
|
193
|
+
properties: {
|
|
194
|
+
promotable_product: {
|
|
195
|
+
required: ['property', 'value'],
|
|
196
|
+
properties: {
|
|
197
|
+
property: {
|
|
198
|
+
type: 'string'
|
|
199
|
+
},
|
|
200
|
+
value: {
|
|
201
|
+
type: 'array'
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
promotable_product_group: {
|
|
206
|
+
required: ['property', 'value'],
|
|
207
|
+
properties: {
|
|
208
|
+
property: {
|
|
209
|
+
type: 'string'
|
|
210
|
+
},
|
|
211
|
+
value: {
|
|
212
|
+
type: 'array'
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
required_amount: {
|
|
217
|
+
type: 'number'
|
|
218
|
+
},
|
|
219
|
+
output: {
|
|
220
|
+
type: 'object',
|
|
221
|
+
required: ['property', 'value'],
|
|
222
|
+
properties: {
|
|
223
|
+
property: {
|
|
224
|
+
type: 'string',
|
|
225
|
+
enum: ['amount_total_gross', 'percentage_discount', 'amount_discount']
|
|
226
|
+
|
|
227
|
+
},
|
|
228
|
+
value: {
|
|
229
|
+
type: 'number'
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
54
234
|
}
|
|
55
235
|
}
|
|
56
236
|
}
|
|
@@ -2,7 +2,7 @@ const base = require('./base')
|
|
|
2
2
|
const defaultResponse = require('./default-response')
|
|
3
3
|
|
|
4
4
|
module.exports.request = {
|
|
5
|
-
$id: 'https://schemas.tillhub.com/
|
|
5
|
+
$id: 'https://schemas.tillhub.com/v1/promotions.update.request.schema.json',
|
|
6
6
|
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
7
7
|
additionalProperties: false,
|
|
8
8
|
type: 'object',
|
|
@@ -11,7 +11,7 @@ module.exports.request = {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
module.exports.response = {
|
|
14
|
-
$id: 'https://schemas.tillhub.com/
|
|
14
|
+
$id: 'https://schemas.tillhub.com/v1/promotions.update.response.schema.json',
|
|
15
15
|
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
16
16
|
additionalProperties: true,
|
|
17
17
|
type: 'object',
|