@tillhub/schemas 6.356.0 → 6.357.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 +15 -0
- package/lib/common/address.js +69 -85
- package/lib/v0/branches/base.js +9 -153
- package/lib/v0/clients/base.js +11 -122
- package/lib/v0/customers/base.js +9 -24
- package/lib/v0/deliveries/base.js +8 -17
- package/lib/v0/manufacturers/base.js +9 -122
- package/lib/v0/orders/create.request.js +7 -3
- package/lib/v0/pdfs/templates.deliveries.create.request.js +8 -17
- package/lib/v0/pdfs/templates.delivery_notes.create.request.js +10 -18
- package/lib/v0/pdfs/templates.full_receipts.create.request.js +8 -17
- package/lib/v0/pdfs/templates.invoices.create.request.js +8 -17
- package/lib/v0/pdfs/templates.transaction_receipts.create.request.js +8 -17
- package/lib/v0/users/profile/base.js +3 -55
- package/lib/v0/warehouses/base.js +11 -123
- package/lib/v1/configurations/items/tenant.js +2 -85
- package/lib/v1/products/common/price_condition.js +19 -8
- package/lib/v1/table_layout/index.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# [6.357.0](https://github.com/tillhub/schemas/compare/v6.356.1...v6.357.0) (2025-02-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **common:** addresses ([66e2c2d](https://github.com/tillhub/schemas/commit/66e2c2d))
|
|
7
|
+
* **products:** if sellable is false, we should't reuqire gross price ([#1032](https://github.com/tillhub/schemas/issues/1032)) ([6f7500c](https://github.com/tillhub/schemas/commit/6f7500c))
|
|
8
|
+
|
|
9
|
+
## [6.356.1](https://github.com/tillhub/schemas/compare/v6.356.0...v6.356.1) (2025-02-10)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **table_layout_v1:** adding the missing schema for duplicate ([#1030](https://github.com/tillhub/schemas/issues/1030)) ([b167480](https://github.com/tillhub/schemas/commit/b167480))
|
|
15
|
+
|
|
1
16
|
# [6.356.0](https://github.com/tillhub/schemas/compare/v6.355.0...v6.356.0) (2025-02-05)
|
|
2
17
|
|
|
3
18
|
|
package/lib/common/address.js
CHANGED
|
@@ -1,96 +1,80 @@
|
|
|
1
1
|
const { oneOf } = require('../helpers/payload-or-null')
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
module.exports = {
|
|
4
|
+
type: 'object',
|
|
5
|
+
additionalProperties: false,
|
|
6
|
+
description: 'Downstream delivery of a date.',
|
|
7
|
+
required: [
|
|
5
8
|
'lines',
|
|
6
9
|
'street',
|
|
7
10
|
'locality',
|
|
8
11
|
'region',
|
|
9
12
|
'postal_code',
|
|
10
|
-
'country'
|
|
11
|
-
'type'
|
|
13
|
+
'country'
|
|
12
14
|
],
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
properties: {
|
|
24
|
-
lines: {
|
|
25
|
-
description: 'Address details',
|
|
26
|
-
example: 'Penthouse',
|
|
27
|
-
...oneOf({
|
|
28
|
-
type: 'array',
|
|
29
|
-
minItems: 1,
|
|
30
|
-
maxItems: 4,
|
|
31
|
-
items: {
|
|
32
|
-
type: 'string',
|
|
33
|
-
minLength: 1
|
|
34
|
-
}
|
|
35
|
-
})
|
|
36
|
-
},
|
|
37
|
-
street: {
|
|
38
|
-
description: 'Street name',
|
|
39
|
-
example: 'Genthiner Str.',
|
|
40
|
-
...oneOf({
|
|
41
|
-
type: 'string'
|
|
42
|
-
})
|
|
43
|
-
},
|
|
44
|
-
street_number: {
|
|
45
|
-
description: 'Building number',
|
|
46
|
-
example: '34',
|
|
47
|
-
...oneOf({
|
|
48
|
-
type: 'string'
|
|
49
|
-
})
|
|
50
|
-
},
|
|
51
|
-
locality: {
|
|
52
|
-
description: 'Locality name (city, village, etc.)',
|
|
53
|
-
example: 'Berlin',
|
|
54
|
-
...oneOf({
|
|
55
|
-
type: 'string'
|
|
56
|
-
})
|
|
57
|
-
},
|
|
58
|
-
region: {
|
|
59
|
-
description: 'Region name',
|
|
60
|
-
example: 'Branderburg',
|
|
61
|
-
...oneOf({
|
|
62
|
-
type: 'string'
|
|
63
|
-
})
|
|
64
|
-
},
|
|
65
|
-
postal_code: {
|
|
66
|
-
description: 'Postal code',
|
|
67
|
-
example: '10785',
|
|
68
|
-
...oneOf({
|
|
69
|
-
type: 'string',
|
|
70
|
-
maxLength: 10
|
|
71
|
-
})
|
|
72
|
-
},
|
|
73
|
-
country: {
|
|
74
|
-
description: 'Country',
|
|
75
|
-
example: 'Germany',
|
|
76
|
-
...oneOf({
|
|
77
|
-
type: 'string',
|
|
78
|
-
minLength: 2,
|
|
79
|
-
maxLength: 2,
|
|
80
|
-
pattern: '^[A-Z]{2}$'
|
|
81
|
-
}),
|
|
82
|
-
'default': null
|
|
83
|
-
},
|
|
84
|
-
type: {
|
|
85
|
-
description: 'Address type',
|
|
86
|
-
example: 'delivery',
|
|
87
|
-
...oneOf({
|
|
88
|
-
type: 'string',
|
|
89
|
-
'enum': availableTypes
|
|
90
|
-
})
|
|
15
|
+
properties: {
|
|
16
|
+
lines: oneOf({
|
|
17
|
+
description: 'Address details',
|
|
18
|
+
example: 'Penthouse',
|
|
19
|
+
type: 'array',
|
|
20
|
+
minItems: 1,
|
|
21
|
+
maxItems: 4,
|
|
22
|
+
items: {
|
|
23
|
+
type: 'string',
|
|
24
|
+
minLength: 1
|
|
91
25
|
}
|
|
92
|
-
}
|
|
26
|
+
}),
|
|
27
|
+
street: oneOf({
|
|
28
|
+
description: 'Street name',
|
|
29
|
+
example: 'Genthiner Str.',
|
|
30
|
+
type: 'string'
|
|
31
|
+
}),
|
|
32
|
+
street_number: oneOf({
|
|
33
|
+
description: 'Building number',
|
|
34
|
+
example: '34',
|
|
35
|
+
type: 'string'
|
|
36
|
+
}),
|
|
37
|
+
locality: oneOf({
|
|
38
|
+
description: 'Locality name (city, village, etc.)',
|
|
39
|
+
example: 'Berlin',
|
|
40
|
+
type: 'string'
|
|
41
|
+
}),
|
|
42
|
+
region: oneOf({
|
|
43
|
+
description: 'Region name',
|
|
44
|
+
example: 'Branderburg',
|
|
45
|
+
type: 'string'
|
|
46
|
+
}),
|
|
47
|
+
postal_code: oneOf({
|
|
48
|
+
description: 'Postal code',
|
|
49
|
+
example: '10785',
|
|
50
|
+
type: 'string',
|
|
51
|
+
maxLength: 10
|
|
52
|
+
}),
|
|
53
|
+
country: oneOf({
|
|
54
|
+
description: 'A country as ISO Alpha-2 code.',
|
|
55
|
+
example: 'DE',
|
|
56
|
+
type: 'string',
|
|
57
|
+
minLength: 2,
|
|
58
|
+
maxLength: 2,
|
|
59
|
+
pattern: '^[A-Z]{2}$'
|
|
60
|
+
}),
|
|
61
|
+
type: oneOf({
|
|
62
|
+
description: 'Address type',
|
|
63
|
+
example: 'delivery',
|
|
64
|
+
type: 'string',
|
|
65
|
+
enum: [
|
|
66
|
+
'local',
|
|
67
|
+
'delivery',
|
|
68
|
+
'billing',
|
|
69
|
+
'home',
|
|
70
|
+
'work'
|
|
71
|
+
]
|
|
72
|
+
}),
|
|
73
|
+
reservations_google_maps_address: oneOf({
|
|
74
|
+
description: 'The location of the branch on Google Maps',
|
|
75
|
+
example: 'https://maps.app.goo.gl/tpF7EMsEC7Wy5hmd6',
|
|
76
|
+
pattern: '^https:\\/\\/maps\\.app\\.goo\\.gl\\/[A-Za-z0-9]*$',
|
|
77
|
+
type: 'string'
|
|
78
|
+
})
|
|
93
79
|
}
|
|
94
80
|
}
|
|
95
|
-
|
|
96
|
-
module.exports = { getAddress }
|
package/lib/v0/branches/base.js
CHANGED
|
@@ -2,6 +2,7 @@ const { stripIndents } = require('common-tags')
|
|
|
2
2
|
const customProperties = require('../../common/custom_properties')
|
|
3
3
|
const { oneOf } = require('../../helpers/payload-or-null')
|
|
4
4
|
const { getImages } = require('../../common/images')
|
|
5
|
+
const address = require('../../common/address')
|
|
5
6
|
|
|
6
7
|
module.exports = {
|
|
7
8
|
name: {
|
|
@@ -247,159 +248,14 @@ module.exports = {
|
|
|
247
248
|
}
|
|
248
249
|
]
|
|
249
250
|
},
|
|
250
|
-
addresses: {
|
|
251
|
-
description: 'A Tillhub address
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
additionalProperties: false,
|
|
259
|
-
properties: {
|
|
260
|
-
lines: {
|
|
261
|
-
description: 'The international non-street format for arbitrary addresses. This should be set to null as it is currently not supported by the client application.',
|
|
262
|
-
oneOf: [
|
|
263
|
-
{
|
|
264
|
-
type: 'array',
|
|
265
|
-
minItems: 1,
|
|
266
|
-
maxItems: 4,
|
|
267
|
-
items: {
|
|
268
|
-
type: 'string',
|
|
269
|
-
minLength: 1
|
|
270
|
-
}
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
type: 'null'
|
|
274
|
-
}
|
|
275
|
-
]
|
|
276
|
-
},
|
|
277
|
-
street: {
|
|
278
|
-
description: 'A street name',
|
|
279
|
-
example: 'Downing Street',
|
|
280
|
-
oneOf: [
|
|
281
|
-
{
|
|
282
|
-
type: 'string',
|
|
283
|
-
maxLength: 512
|
|
284
|
-
},
|
|
285
|
-
{
|
|
286
|
-
type: 'null'
|
|
287
|
-
}
|
|
288
|
-
]
|
|
289
|
-
},
|
|
290
|
-
street_number: {
|
|
291
|
-
description: 'A street number',
|
|
292
|
-
example: '10',
|
|
293
|
-
oneOf: [
|
|
294
|
-
{
|
|
295
|
-
type: 'string',
|
|
296
|
-
maxLength: 16
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
type: 'null'
|
|
300
|
-
}
|
|
301
|
-
]
|
|
302
|
-
},
|
|
303
|
-
locality: {
|
|
304
|
-
description: 'The international format for a city, village and any other localizable city like place.',
|
|
305
|
-
example: 'London',
|
|
306
|
-
oneOf: [
|
|
307
|
-
{
|
|
308
|
-
type: 'string'
|
|
309
|
-
},
|
|
310
|
-
{
|
|
311
|
-
type: 'null'
|
|
312
|
-
}
|
|
313
|
-
]
|
|
314
|
-
},
|
|
315
|
-
region: {
|
|
316
|
-
description: 'The international format for regional sub category of a country e.g. a state or province.',
|
|
317
|
-
example: 'Greater London',
|
|
318
|
-
oneOf: [
|
|
319
|
-
{
|
|
320
|
-
type: 'string'
|
|
321
|
-
},
|
|
322
|
-
{
|
|
323
|
-
type: 'null'
|
|
324
|
-
}
|
|
325
|
-
]
|
|
326
|
-
},
|
|
327
|
-
postal_code: {
|
|
328
|
-
description: 'A non-validated postal code.',
|
|
329
|
-
example: 'SW1A',
|
|
330
|
-
oneOf: [
|
|
331
|
-
{
|
|
332
|
-
type: 'string',
|
|
333
|
-
maxLength: 10
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
type: 'null'
|
|
337
|
-
}
|
|
338
|
-
]
|
|
339
|
-
},
|
|
340
|
-
country: {
|
|
341
|
-
description: 'A country as ISO Alpha-2 code.',
|
|
342
|
-
example: 'UK',
|
|
343
|
-
oneOf: [
|
|
344
|
-
{
|
|
345
|
-
type: 'string',
|
|
346
|
-
minLength: 2,
|
|
347
|
-
maxLength: 2,
|
|
348
|
-
pattern: '^[A-Z]{2}$'
|
|
349
|
-
},
|
|
350
|
-
{
|
|
351
|
-
type: 'null'
|
|
352
|
-
}
|
|
353
|
-
]
|
|
354
|
-
},
|
|
355
|
-
type: {
|
|
356
|
-
description: 'The types of addresses. Types are used to direct specific behaviours in financial or stock operation. If none of them is necessary is used implementers should take the local type.',
|
|
357
|
-
oneOf: [
|
|
358
|
-
{
|
|
359
|
-
type: 'string',
|
|
360
|
-
enum: [
|
|
361
|
-
'delivery',
|
|
362
|
-
'billing',
|
|
363
|
-
'local'
|
|
364
|
-
],
|
|
365
|
-
default: 'local'
|
|
366
|
-
},
|
|
367
|
-
{
|
|
368
|
-
type: 'null'
|
|
369
|
-
}
|
|
370
|
-
]
|
|
371
|
-
},
|
|
372
|
-
reservations_google_maps_address: {
|
|
373
|
-
description: 'The location of the branch on Google Maps',
|
|
374
|
-
example: 'https://maps.app.goo.gl/tpF7EMsEC7Wy5hmd6',
|
|
375
|
-
pattern: '^https:\\/\\/maps\\.app\\.goo\\.gl\\/[A-Za-z0-9]*$',
|
|
376
|
-
oneOf: [
|
|
377
|
-
{
|
|
378
|
-
type: 'string'
|
|
379
|
-
},
|
|
380
|
-
{
|
|
381
|
-
type: 'null'
|
|
382
|
-
}
|
|
383
|
-
]
|
|
384
|
-
}
|
|
385
|
-
},
|
|
386
|
-
required: [
|
|
387
|
-
'lines',
|
|
388
|
-
'street',
|
|
389
|
-
'street_number',
|
|
390
|
-
'locality',
|
|
391
|
-
'region',
|
|
392
|
-
'postal_code',
|
|
393
|
-
'country',
|
|
394
|
-
'type'
|
|
395
|
-
]
|
|
396
|
-
}
|
|
397
|
-
},
|
|
398
|
-
{
|
|
399
|
-
type: 'null'
|
|
400
|
-
}
|
|
401
|
-
]
|
|
402
|
-
},
|
|
251
|
+
addresses: oneOf({
|
|
252
|
+
description: 'A Tillhub address array, with different types of addresses. More description in the properties...',
|
|
253
|
+
type: 'array',
|
|
254
|
+
maxItems: 3,
|
|
255
|
+
items: {
|
|
256
|
+
...address
|
|
257
|
+
}
|
|
258
|
+
}),
|
|
403
259
|
signing_configuration: {
|
|
404
260
|
description: stripIndents`
|
|
405
261
|
Necessary core or allowed authentication data for financial signing systems. This is an opt-in feature.
|
package/lib/v0/clients/base.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
const { oneOf } = require('../../helpers/payload-or-null')
|
|
2
|
+
const address = require('../../common/address')
|
|
3
|
+
|
|
1
4
|
module.exports = {
|
|
2
5
|
name: {
|
|
3
6
|
anyOf: [
|
|
@@ -130,126 +133,12 @@ module.exports = {
|
|
|
130
133
|
}
|
|
131
134
|
]
|
|
132
135
|
},
|
|
133
|
-
addresses: {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
properties: {
|
|
142
|
-
lines: {
|
|
143
|
-
oneOf: [
|
|
144
|
-
{
|
|
145
|
-
type: 'array',
|
|
146
|
-
minItems: 1,
|
|
147
|
-
maxItems: 4,
|
|
148
|
-
items: {
|
|
149
|
-
type: 'string',
|
|
150
|
-
minLength: 1
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
type: 'null'
|
|
155
|
-
}
|
|
156
|
-
]
|
|
157
|
-
},
|
|
158
|
-
street: {
|
|
159
|
-
oneOf: [
|
|
160
|
-
{
|
|
161
|
-
type: 'string'
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
type: 'null'
|
|
165
|
-
}
|
|
166
|
-
]
|
|
167
|
-
},
|
|
168
|
-
street_number: {
|
|
169
|
-
oneOf: [
|
|
170
|
-
{
|
|
171
|
-
type: 'string'
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
type: 'null'
|
|
175
|
-
}
|
|
176
|
-
]
|
|
177
|
-
},
|
|
178
|
-
locality: {
|
|
179
|
-
oneOf: [
|
|
180
|
-
{
|
|
181
|
-
type: 'string'
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
type: 'null'
|
|
185
|
-
}
|
|
186
|
-
]
|
|
187
|
-
},
|
|
188
|
-
region: {
|
|
189
|
-
oneOf: [
|
|
190
|
-
{
|
|
191
|
-
type: 'string'
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
type: 'null'
|
|
195
|
-
}
|
|
196
|
-
]
|
|
197
|
-
},
|
|
198
|
-
postal_code: {
|
|
199
|
-
oneOf: [
|
|
200
|
-
{
|
|
201
|
-
type: 'string',
|
|
202
|
-
maxLength: 10
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
type: 'null'
|
|
206
|
-
}
|
|
207
|
-
]
|
|
208
|
-
},
|
|
209
|
-
country: {
|
|
210
|
-
oneOf: [
|
|
211
|
-
{
|
|
212
|
-
type: 'string',
|
|
213
|
-
minLength: 2,
|
|
214
|
-
maxLength: 2,
|
|
215
|
-
pattern: '^[A-Z]{2}$'
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
type: 'null'
|
|
219
|
-
}
|
|
220
|
-
]
|
|
221
|
-
},
|
|
222
|
-
type: {
|
|
223
|
-
oneOf: [
|
|
224
|
-
{
|
|
225
|
-
type: 'string',
|
|
226
|
-
'enum': [
|
|
227
|
-
'delivery',
|
|
228
|
-
'billing',
|
|
229
|
-
'local'
|
|
230
|
-
]
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
type: 'null'
|
|
234
|
-
}
|
|
235
|
-
]
|
|
236
|
-
}
|
|
237
|
-
},
|
|
238
|
-
required: [
|
|
239
|
-
'lines',
|
|
240
|
-
'street',
|
|
241
|
-
'street_number',
|
|
242
|
-
'locality',
|
|
243
|
-
'region',
|
|
244
|
-
'postal_code',
|
|
245
|
-
'country',
|
|
246
|
-
'type'
|
|
247
|
-
]
|
|
248
|
-
}
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
type: 'null'
|
|
252
|
-
}
|
|
253
|
-
]
|
|
254
|
-
}
|
|
136
|
+
addresses: oneOf({
|
|
137
|
+
description: 'A Tillhub address array, with different types of addresses. More description in the properties...',
|
|
138
|
+
type: 'array',
|
|
139
|
+
maxItems: 3,
|
|
140
|
+
items: {
|
|
141
|
+
...address
|
|
142
|
+
}
|
|
143
|
+
})
|
|
255
144
|
}
|
package/lib/v0/customers/base.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const { anyOf, oneOf } = require('../../helpers/payload-or-null')
|
|
2
|
-
const
|
|
2
|
+
const address = require('../../common/address')
|
|
3
3
|
const { getGender } = require('../../common/gender')
|
|
4
4
|
const { getImages } = require('../../common/images')
|
|
5
5
|
|
|
@@ -223,29 +223,14 @@ module.exports = {
|
|
|
223
223
|
description: 'Additional metadata',
|
|
224
224
|
type: 'object'
|
|
225
225
|
},
|
|
226
|
-
addresses: {
|
|
227
|
-
description: '
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
'billing'
|
|
235
|
-
],
|
|
236
|
-
required: [
|
|
237
|
-
'lines',
|
|
238
|
-
'street',
|
|
239
|
-
'street_number',
|
|
240
|
-
'locality',
|
|
241
|
-
'region',
|
|
242
|
-
'postal_code',
|
|
243
|
-
'country',
|
|
244
|
-
'type'
|
|
245
|
-
]
|
|
246
|
-
})
|
|
247
|
-
})
|
|
248
|
-
},
|
|
226
|
+
addresses: oneOf({
|
|
227
|
+
description: 'A Tillhub address array, with different types of addresses. More description in the properties...',
|
|
228
|
+
type: 'array',
|
|
229
|
+
maxItems: 3,
|
|
230
|
+
items: {
|
|
231
|
+
...address
|
|
232
|
+
}
|
|
233
|
+
}),
|
|
249
234
|
custom: {
|
|
250
235
|
description: 'Custom data',
|
|
251
236
|
...anyOf({
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
const {
|
|
2
|
+
const { oneOf } = require('../../helpers/payload-or-null')
|
|
3
|
+
const address = require('../../common/address')
|
|
3
4
|
|
|
4
5
|
module.exports = {
|
|
5
6
|
order: {
|
|
@@ -136,22 +137,12 @@ module.exports = {
|
|
|
136
137
|
}
|
|
137
138
|
]
|
|
138
139
|
},
|
|
139
|
-
recipient: {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
]
|
|
146
|
-
},
|
|
147
|
-
sender: {
|
|
148
|
-
oneOf: [
|
|
149
|
-
getAddress(),
|
|
150
|
-
{
|
|
151
|
-
type: 'null'
|
|
152
|
-
}
|
|
153
|
-
]
|
|
154
|
-
},
|
|
140
|
+
recipient: oneOf({
|
|
141
|
+
...address
|
|
142
|
+
}),
|
|
143
|
+
sender: oneOf({
|
|
144
|
+
...address
|
|
145
|
+
}),
|
|
155
146
|
metadata: {
|
|
156
147
|
type: 'object'
|
|
157
148
|
},
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const { oneOf } = require('../../helpers/payload-or-null')
|
|
2
|
+
const address = require('../../common/address')
|
|
2
3
|
|
|
3
4
|
module.exports = {
|
|
4
5
|
name: oneOf({
|
|
@@ -208,128 +209,14 @@ module.exports = {
|
|
|
208
209
|
}
|
|
209
210
|
]
|
|
210
211
|
},
|
|
211
|
-
addresses: {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
properties: {
|
|
220
|
-
lines: {
|
|
221
|
-
oneOf: [
|
|
222
|
-
{
|
|
223
|
-
type: 'array',
|
|
224
|
-
minItems: 1,
|
|
225
|
-
maxItems: 4,
|
|
226
|
-
items: {
|
|
227
|
-
type: 'string',
|
|
228
|
-
minLength: 1
|
|
229
|
-
}
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
type: 'null'
|
|
233
|
-
}
|
|
234
|
-
]
|
|
235
|
-
},
|
|
236
|
-
street: {
|
|
237
|
-
oneOf: [
|
|
238
|
-
{
|
|
239
|
-
type: 'string'
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
type: 'null'
|
|
243
|
-
}
|
|
244
|
-
]
|
|
245
|
-
},
|
|
246
|
-
street_number: {
|
|
247
|
-
oneOf: [
|
|
248
|
-
{
|
|
249
|
-
type: 'string'
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
type: 'null'
|
|
253
|
-
}
|
|
254
|
-
]
|
|
255
|
-
},
|
|
256
|
-
locality: {
|
|
257
|
-
oneOf: [
|
|
258
|
-
{
|
|
259
|
-
type: 'string'
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
type: 'null'
|
|
263
|
-
}
|
|
264
|
-
]
|
|
265
|
-
},
|
|
266
|
-
region: {
|
|
267
|
-
oneOf: [
|
|
268
|
-
{
|
|
269
|
-
type: 'string'
|
|
270
|
-
},
|
|
271
|
-
{
|
|
272
|
-
type: 'null'
|
|
273
|
-
}
|
|
274
|
-
]
|
|
275
|
-
},
|
|
276
|
-
postal_code: {
|
|
277
|
-
oneOf: [
|
|
278
|
-
{
|
|
279
|
-
type: 'string',
|
|
280
|
-
maxLength: 10
|
|
281
|
-
},
|
|
282
|
-
{
|
|
283
|
-
type: 'null'
|
|
284
|
-
}
|
|
285
|
-
]
|
|
286
|
-
},
|
|
287
|
-
country: {
|
|
288
|
-
oneOf: [
|
|
289
|
-
{
|
|
290
|
-
type: 'string',
|
|
291
|
-
minLength: 2,
|
|
292
|
-
maxLength: 2,
|
|
293
|
-
pattern: '^[A-Z]{2}$'
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
type: 'null'
|
|
297
|
-
}
|
|
298
|
-
]
|
|
299
|
-
},
|
|
300
|
-
type: {
|
|
301
|
-
oneOf: [
|
|
302
|
-
{
|
|
303
|
-
type: 'string',
|
|
304
|
-
'enum': [
|
|
305
|
-
'delivery',
|
|
306
|
-
'billing',
|
|
307
|
-
'local'
|
|
308
|
-
]
|
|
309
|
-
},
|
|
310
|
-
{
|
|
311
|
-
type: 'null'
|
|
312
|
-
}
|
|
313
|
-
]
|
|
314
|
-
}
|
|
315
|
-
},
|
|
316
|
-
required: [
|
|
317
|
-
'lines',
|
|
318
|
-
'street',
|
|
319
|
-
'street_number',
|
|
320
|
-
'locality',
|
|
321
|
-
'region',
|
|
322
|
-
'postal_code',
|
|
323
|
-
'country',
|
|
324
|
-
'type'
|
|
325
|
-
]
|
|
326
|
-
}
|
|
327
|
-
},
|
|
328
|
-
{
|
|
329
|
-
type: 'null'
|
|
330
|
-
}
|
|
331
|
-
]
|
|
332
|
-
},
|
|
212
|
+
addresses: oneOf({
|
|
213
|
+
description: 'A Tillhub address array, with different types of addresses. More description in the properties...',
|
|
214
|
+
type: 'array',
|
|
215
|
+
maxItems: 3,
|
|
216
|
+
items: {
|
|
217
|
+
...address
|
|
218
|
+
}
|
|
219
|
+
}),
|
|
333
220
|
client_id: {
|
|
334
221
|
description: 'A identifier used locally on POS for their own reference.',
|
|
335
222
|
anyOf: [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const address = require('../../common/address')
|
|
2
2
|
const orderItem = require('./items').create
|
|
3
3
|
|
|
4
4
|
module.exports = {
|
|
@@ -86,13 +86,17 @@ module.exports = {
|
|
|
86
86
|
type: 'object',
|
|
87
87
|
additionalProperties: false,
|
|
88
88
|
properties: {
|
|
89
|
-
address:
|
|
89
|
+
address: {
|
|
90
|
+
...address
|
|
91
|
+
}
|
|
90
92
|
}
|
|
91
93
|
},
|
|
92
94
|
sender: {
|
|
93
95
|
type: 'object',
|
|
94
96
|
properties: {
|
|
95
|
-
address:
|
|
97
|
+
address: {
|
|
98
|
+
...address
|
|
99
|
+
}
|
|
96
100
|
}
|
|
97
101
|
},
|
|
98
102
|
direction: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
const {
|
|
1
|
+
const { oneOf } = require('../../helpers/payload-or-null')
|
|
2
|
+
const address = require('../../common/address')
|
|
2
3
|
|
|
3
4
|
module.exports = {
|
|
4
5
|
$id: 'https://schemas.tillhub.com/v0/pdfs.templates.deliveries.create.schema.json',
|
|
@@ -76,14 +77,9 @@ module.exports = {
|
|
|
76
77
|
}
|
|
77
78
|
]
|
|
78
79
|
},
|
|
79
|
-
sender: {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
{
|
|
83
|
-
type: 'null'
|
|
84
|
-
}
|
|
85
|
-
]
|
|
86
|
-
},
|
|
80
|
+
sender: oneOf({
|
|
81
|
+
...address
|
|
82
|
+
}),
|
|
87
83
|
addressee: {
|
|
88
84
|
type: 'object',
|
|
89
85
|
additionalProperties: false,
|
|
@@ -112,14 +108,9 @@ module.exports = {
|
|
|
112
108
|
}
|
|
113
109
|
}
|
|
114
110
|
},
|
|
115
|
-
recipient: {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
{
|
|
119
|
-
type: 'null'
|
|
120
|
-
}
|
|
121
|
-
]
|
|
122
|
-
},
|
|
111
|
+
recipient: oneOf({
|
|
112
|
+
...address
|
|
113
|
+
}),
|
|
123
114
|
contact: {
|
|
124
115
|
oneOf: [
|
|
125
116
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const address = require('../../common/address')
|
|
2
2
|
const { oneOf } = require('../../helpers/payload-or-null')
|
|
3
3
|
|
|
4
4
|
module.exports = {
|
|
@@ -72,14 +72,9 @@ module.exports = {
|
|
|
72
72
|
}
|
|
73
73
|
]
|
|
74
74
|
},
|
|
75
|
-
address: {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
{
|
|
79
|
-
type: 'null'
|
|
80
|
-
}
|
|
81
|
-
]
|
|
82
|
-
}
|
|
75
|
+
address: oneOf({
|
|
76
|
+
...address
|
|
77
|
+
})
|
|
83
78
|
}
|
|
84
79
|
},
|
|
85
80
|
recipient: {
|
|
@@ -117,15 +112,12 @@ module.exports = {
|
|
|
117
112
|
}
|
|
118
113
|
]
|
|
119
114
|
},
|
|
120
|
-
address: {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
]
|
|
127
|
-
},
|
|
128
|
-
deliveryAddress: oneOf(getAddress())
|
|
115
|
+
address: oneOf({
|
|
116
|
+
...address
|
|
117
|
+
}),
|
|
118
|
+
deliveryAddress: oneOf({
|
|
119
|
+
...address
|
|
120
|
+
})
|
|
129
121
|
}
|
|
130
122
|
},
|
|
131
123
|
items: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
const {
|
|
1
|
+
const { oneOf } = require('../../helpers/payload-or-null')
|
|
2
|
+
const address = require('../../common/address')
|
|
2
3
|
|
|
3
4
|
module.exports = {
|
|
4
5
|
$id: 'https://schemas.tillhub.com/v0/pdfs.templates.full_receipts.create.schema.json',
|
|
@@ -89,14 +90,9 @@ module.exports = {
|
|
|
89
90
|
}
|
|
90
91
|
]
|
|
91
92
|
},
|
|
92
|
-
address: {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
{
|
|
96
|
-
type: 'null'
|
|
97
|
-
}
|
|
98
|
-
]
|
|
99
|
-
}
|
|
93
|
+
address: oneOf({
|
|
94
|
+
...address
|
|
95
|
+
})
|
|
100
96
|
}
|
|
101
97
|
},
|
|
102
98
|
recipient: {
|
|
@@ -134,14 +130,9 @@ module.exports = {
|
|
|
134
130
|
}
|
|
135
131
|
]
|
|
136
132
|
},
|
|
137
|
-
address: {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
{
|
|
141
|
-
type: 'null'
|
|
142
|
-
}
|
|
143
|
-
]
|
|
144
|
-
}
|
|
133
|
+
address: oneOf({
|
|
134
|
+
...address
|
|
135
|
+
})
|
|
145
136
|
}
|
|
146
137
|
},
|
|
147
138
|
items: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
const {
|
|
1
|
+
const { oneOf } = require('../../helpers/payload-or-null')
|
|
2
|
+
const address = require('../../common/address')
|
|
2
3
|
|
|
3
4
|
module.exports = {
|
|
4
5
|
$id: 'https://schemas.tillhub.com/v0/pdfs.templates.invoices.create.schema.json',
|
|
@@ -89,14 +90,9 @@ module.exports = {
|
|
|
89
90
|
}
|
|
90
91
|
]
|
|
91
92
|
},
|
|
92
|
-
address: {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
{
|
|
96
|
-
type: 'null'
|
|
97
|
-
}
|
|
98
|
-
]
|
|
99
|
-
}
|
|
93
|
+
address: oneOf({
|
|
94
|
+
...address
|
|
95
|
+
})
|
|
100
96
|
}
|
|
101
97
|
},
|
|
102
98
|
recipient: {
|
|
@@ -134,14 +130,9 @@ module.exports = {
|
|
|
134
130
|
}
|
|
135
131
|
]
|
|
136
132
|
},
|
|
137
|
-
address: {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
{
|
|
141
|
-
type: 'null'
|
|
142
|
-
}
|
|
143
|
-
]
|
|
144
|
-
}
|
|
133
|
+
address: oneOf({
|
|
134
|
+
...address
|
|
135
|
+
})
|
|
145
136
|
}
|
|
146
137
|
},
|
|
147
138
|
items: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
const {
|
|
1
|
+
const { oneOf } = require('../../helpers/payload-or-null')
|
|
2
|
+
const address = require('../../common/address')
|
|
2
3
|
|
|
3
4
|
module.exports = {
|
|
4
5
|
$id: 'https://schemas.tillhub.com/v0/pdfs.templates.transaction_receipts.create.schema.json',
|
|
@@ -140,14 +141,9 @@ module.exports = {
|
|
|
140
141
|
}
|
|
141
142
|
]
|
|
142
143
|
},
|
|
143
|
-
address: {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
{
|
|
147
|
-
type: 'null'
|
|
148
|
-
}
|
|
149
|
-
]
|
|
150
|
-
}
|
|
144
|
+
address: oneOf({
|
|
145
|
+
...address
|
|
146
|
+
})
|
|
151
147
|
}
|
|
152
148
|
},
|
|
153
149
|
recipient: {
|
|
@@ -185,14 +181,9 @@ module.exports = {
|
|
|
185
181
|
}
|
|
186
182
|
]
|
|
187
183
|
},
|
|
188
|
-
address: {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
{
|
|
192
|
-
type: 'null'
|
|
193
|
-
}
|
|
194
|
-
]
|
|
195
|
-
}
|
|
184
|
+
address: oneOf({
|
|
185
|
+
...address
|
|
186
|
+
})
|
|
196
187
|
}
|
|
197
188
|
},
|
|
198
189
|
items: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const { getGender } = require('../../../common/gender')
|
|
2
2
|
const { oneOf } = require('../../../helpers/payload-or-null')
|
|
3
|
+
const address = require('../../../common/address')
|
|
3
4
|
|
|
4
5
|
module.exports = {
|
|
5
6
|
firstname: oneOf({
|
|
@@ -61,64 +62,11 @@ module.exports = {
|
|
|
61
62
|
]
|
|
62
63
|
}),
|
|
63
64
|
addresses: oneOf({
|
|
65
|
+
description: 'A Tillhub address array, with different types of addresses. More description in the properties...',
|
|
64
66
|
type: 'array',
|
|
65
|
-
minItems: 1,
|
|
66
67
|
maxItems: 3,
|
|
67
68
|
items: {
|
|
68
|
-
|
|
69
|
-
additionalProperties: false,
|
|
70
|
-
properties: {
|
|
71
|
-
lines: oneOf({
|
|
72
|
-
type: 'array',
|
|
73
|
-
minItems: 1,
|
|
74
|
-
maxItems: 4,
|
|
75
|
-
items: {
|
|
76
|
-
type: 'string',
|
|
77
|
-
minLength: 1
|
|
78
|
-
}
|
|
79
|
-
}),
|
|
80
|
-
street: oneOf({
|
|
81
|
-
type: 'string'
|
|
82
|
-
}),
|
|
83
|
-
street_number: oneOf({
|
|
84
|
-
type: 'string'
|
|
85
|
-
}),
|
|
86
|
-
locality: oneOf({
|
|
87
|
-
type: 'string'
|
|
88
|
-
}),
|
|
89
|
-
region: oneOf({
|
|
90
|
-
type: 'string'
|
|
91
|
-
}),
|
|
92
|
-
postal_code: oneOf({
|
|
93
|
-
type: 'string',
|
|
94
|
-
maxLength: 10
|
|
95
|
-
}),
|
|
96
|
-
country: oneOf({
|
|
97
|
-
type: 'string',
|
|
98
|
-
minLength: 2,
|
|
99
|
-
maxLength: 2,
|
|
100
|
-
pattern: '^[A-Z]{2}$'
|
|
101
|
-
}),
|
|
102
|
-
type: oneOf({
|
|
103
|
-
type: 'string',
|
|
104
|
-
'enum': [
|
|
105
|
-
'home',
|
|
106
|
-
'work',
|
|
107
|
-
'delivery',
|
|
108
|
-
'billing'
|
|
109
|
-
]
|
|
110
|
-
})
|
|
111
|
-
},
|
|
112
|
-
required: [
|
|
113
|
-
'lines',
|
|
114
|
-
'street',
|
|
115
|
-
'street_number',
|
|
116
|
-
'locality',
|
|
117
|
-
'region',
|
|
118
|
-
'postal_code',
|
|
119
|
-
'country',
|
|
120
|
-
'type'
|
|
121
|
-
]
|
|
69
|
+
...address
|
|
122
70
|
}
|
|
123
71
|
}),
|
|
124
72
|
images: oneOf({
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
const { oneOf } = require('../../helpers/payload-or-null')
|
|
2
|
+
const address = require('../../common/address')
|
|
3
|
+
|
|
1
4
|
module.exports = {
|
|
2
5
|
name: {
|
|
3
6
|
anyOf: [
|
|
@@ -158,127 +161,12 @@ module.exports = {
|
|
|
158
161
|
}
|
|
159
162
|
]
|
|
160
163
|
},
|
|
161
|
-
addresses: {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
properties: {
|
|
170
|
-
lines: {
|
|
171
|
-
oneOf: [
|
|
172
|
-
{
|
|
173
|
-
type: 'array',
|
|
174
|
-
minItems: 1,
|
|
175
|
-
maxItems: 4,
|
|
176
|
-
items: {
|
|
177
|
-
type: 'string',
|
|
178
|
-
minLength: 1
|
|
179
|
-
}
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
type: 'null'
|
|
183
|
-
}
|
|
184
|
-
]
|
|
185
|
-
},
|
|
186
|
-
street: {
|
|
187
|
-
oneOf: [
|
|
188
|
-
{
|
|
189
|
-
type: 'string'
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
type: 'null'
|
|
193
|
-
}
|
|
194
|
-
]
|
|
195
|
-
},
|
|
196
|
-
street_number: {
|
|
197
|
-
oneOf: [
|
|
198
|
-
{
|
|
199
|
-
type: 'string'
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
type: 'null'
|
|
203
|
-
}
|
|
204
|
-
]
|
|
205
|
-
},
|
|
206
|
-
locality: {
|
|
207
|
-
oneOf: [
|
|
208
|
-
{
|
|
209
|
-
type: 'string'
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
type: 'null'
|
|
213
|
-
}
|
|
214
|
-
]
|
|
215
|
-
},
|
|
216
|
-
region: {
|
|
217
|
-
oneOf: [
|
|
218
|
-
{
|
|
219
|
-
type: 'string'
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
type: 'null'
|
|
223
|
-
}
|
|
224
|
-
]
|
|
225
|
-
},
|
|
226
|
-
postal_code: {
|
|
227
|
-
oneOf: [
|
|
228
|
-
{
|
|
229
|
-
type: 'string',
|
|
230
|
-
maxLength: 10
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
type: 'null'
|
|
234
|
-
}
|
|
235
|
-
]
|
|
236
|
-
},
|
|
237
|
-
country: {
|
|
238
|
-
oneOf: [
|
|
239
|
-
{
|
|
240
|
-
type: 'string',
|
|
241
|
-
minLength: 2,
|
|
242
|
-
maxLength: 2,
|
|
243
|
-
pattern: '^[A-Z]{2}$'
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
type: 'null'
|
|
247
|
-
}
|
|
248
|
-
],
|
|
249
|
-
'default': null
|
|
250
|
-
},
|
|
251
|
-
type: {
|
|
252
|
-
oneOf: [
|
|
253
|
-
{
|
|
254
|
-
type: 'string',
|
|
255
|
-
'enum': [
|
|
256
|
-
'local',
|
|
257
|
-
'delivery',
|
|
258
|
-
'billing'
|
|
259
|
-
]
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
type: 'null'
|
|
263
|
-
}
|
|
264
|
-
]
|
|
265
|
-
}
|
|
266
|
-
},
|
|
267
|
-
required: [
|
|
268
|
-
'lines',
|
|
269
|
-
'street',
|
|
270
|
-
'street_number',
|
|
271
|
-
'locality',
|
|
272
|
-
'region',
|
|
273
|
-
'postal_code',
|
|
274
|
-
'country',
|
|
275
|
-
'type'
|
|
276
|
-
]
|
|
277
|
-
}
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
type: 'null'
|
|
281
|
-
}
|
|
282
|
-
]
|
|
283
|
-
}
|
|
164
|
+
addresses: oneOf({
|
|
165
|
+
description: 'A Tillhub address array, with different types of addresses. More description in the properties...',
|
|
166
|
+
type: 'array',
|
|
167
|
+
maxItems: 3,
|
|
168
|
+
items: {
|
|
169
|
+
...address
|
|
170
|
+
}
|
|
171
|
+
})
|
|
284
172
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const address = require('../../../common/address')
|
|
1
2
|
|
|
2
3
|
module.exports = {
|
|
3
4
|
anyOf: [
|
|
@@ -21,91 +22,7 @@ module.exports = {
|
|
|
21
22
|
maxLength: 128
|
|
22
23
|
},
|
|
23
24
|
address: {
|
|
24
|
-
|
|
25
|
-
type: 'object',
|
|
26
|
-
additionalProperties: false,
|
|
27
|
-
properties: {
|
|
28
|
-
street: {
|
|
29
|
-
description: 'A street name',
|
|
30
|
-
oneOf: [
|
|
31
|
-
{
|
|
32
|
-
type: 'string',
|
|
33
|
-
maxLength: 512
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
type: 'null'
|
|
37
|
-
}
|
|
38
|
-
]
|
|
39
|
-
},
|
|
40
|
-
street_number: {
|
|
41
|
-
description: 'A street number',
|
|
42
|
-
oneOf: [
|
|
43
|
-
{
|
|
44
|
-
type: 'string',
|
|
45
|
-
maxLength: 16
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
type: 'null'
|
|
49
|
-
}
|
|
50
|
-
]
|
|
51
|
-
},
|
|
52
|
-
locality: {
|
|
53
|
-
description: 'The international format for a city, village and any other localizable city like place.',
|
|
54
|
-
oneOf: [
|
|
55
|
-
{
|
|
56
|
-
type: 'string'
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
type: 'null'
|
|
60
|
-
}
|
|
61
|
-
]
|
|
62
|
-
},
|
|
63
|
-
region: {
|
|
64
|
-
description: 'The international format for regional sub category of a country e.g. a state or province.',
|
|
65
|
-
oneOf: [
|
|
66
|
-
{
|
|
67
|
-
type: 'string'
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
type: 'null'
|
|
71
|
-
}
|
|
72
|
-
]
|
|
73
|
-
},
|
|
74
|
-
postal_code: {
|
|
75
|
-
description: 'A non-validated postal code.',
|
|
76
|
-
oneOf: [
|
|
77
|
-
{
|
|
78
|
-
type: 'string',
|
|
79
|
-
maxLength: 10
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
type: 'null'
|
|
83
|
-
}
|
|
84
|
-
]
|
|
85
|
-
},
|
|
86
|
-
country: {
|
|
87
|
-
description: 'A country as ISO Alpha-2 code.',
|
|
88
|
-
oneOf: [
|
|
89
|
-
{
|
|
90
|
-
type: 'string',
|
|
91
|
-
minLength: 2,
|
|
92
|
-
maxLength: 2,
|
|
93
|
-
pattern: '^[A-Z]{2}$'
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
type: 'null'
|
|
97
|
-
}
|
|
98
|
-
]
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
required: [
|
|
102
|
-
'street',
|
|
103
|
-
'street_number',
|
|
104
|
-
'locality',
|
|
105
|
-
'region',
|
|
106
|
-
'postal_code',
|
|
107
|
-
'country'
|
|
108
|
-
]
|
|
25
|
+
...address
|
|
109
26
|
},
|
|
110
27
|
tax_number: {
|
|
111
28
|
type: 'string'
|
|
@@ -1,22 +1,33 @@
|
|
|
1
1
|
const grossPriceCondition = {
|
|
2
2
|
if: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
type: 'object',
|
|
3
|
+
allOf: [
|
|
4
|
+
{
|
|
6
5
|
properties: {
|
|
7
|
-
|
|
6
|
+
configuration: {
|
|
8
7
|
type: 'object',
|
|
9
8
|
properties: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
pricing: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
request_input: {
|
|
13
|
+
not: {
|
|
14
|
+
const: true
|
|
15
|
+
}
|
|
16
|
+
}
|
|
13
17
|
}
|
|
14
18
|
}
|
|
15
19
|
}
|
|
16
20
|
}
|
|
17
21
|
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
properties: {
|
|
25
|
+
sellable: {
|
|
26
|
+
not: { const: false }
|
|
27
|
+
}
|
|
28
|
+
}
|
|
18
29
|
}
|
|
19
|
-
|
|
30
|
+
]
|
|
20
31
|
},
|
|
21
32
|
then: {
|
|
22
33
|
properties: {
|