@tillhub/schemas 6.119.0 → 6.122.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 +26 -0
- package/lib/common/address.js +67 -82
- package/lib/common/base.js +3 -0
- package/lib/common/images.js +63 -0
- package/lib/common/query.js +64 -0
- package/lib/common/response.js +10 -9
- package/lib/v0/branches/base.js +55 -63
- package/lib/v0/branches/create.js +18 -0
- package/lib/v0/branches/index.js +1 -0
- package/lib/v0/branches/read.js +119 -0
- package/lib/v0/branches/update.js +18 -0
- package/lib/v0/customers/base.js +352 -576
- package/lib/v0/customers/baseExt.js +35 -0
- package/lib/v0/customers/create.js +41 -0
- package/lib/v0/customers/ext.js +113 -7
- package/lib/v0/customers/index.js +18 -50
- package/lib/v0/customers/properties/anaylytics.js +7 -7
- package/lib/v0/customers/read.js +42 -0
- package/lib/v0/customers/update.js +30 -0
- package/lib/v0/deliveries/base.js +3 -3
- package/lib/v0/orders/create.request.js +3 -3
- package/lib/v0/pdfs/templates.deliveries.create.request.js +3 -7
- package/lib/v0/pdfs/templates.delivery_notes.create.request.js +3 -7
- package/lib/v0/pdfs/templates.full_receipts.create.request.js +3 -7
- package/lib/v0/pdfs/templates.invoices.create.request.js +3 -7
- package/lib/v0/pdfs/templates.transaction_receipts.create.request.js +3 -7
- package/lib/v1/branches/index.js +1 -0
- package/lib/v1/branches/read.js +16 -0
- package/lib/v1/carts/base.js +182 -0
- package/lib/v1/carts/create.js +30 -0
- package/lib/v1/carts/index.js +3 -8
- package/lib/v1/carts/items/create.js +150 -227
- package/lib/v1/carts/patch.js +29 -0
- package/lib/v1/carts/read.js +54 -0
- package/lib/v1/index.js +6 -5
- package/package.json +1 -1
- package/test/branches/branches.v0.spec.js +50 -11
- package/test/branches/branches.v1.spec.js +19 -0
- package/test/carts/carts.v1.spec.js +46 -6
- package/test/customers/customers.v0.spec.js +93 -5
- package/lib/v0/customers/create.request.js +0 -24
- package/lib/v0/customers/update.request.js +0 -14
- package/lib/v1/carts/create.request.js +0 -268
- package/lib/v1/carts/patch.request.js +0 -259
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const baseObject = require('../../common/base')
|
|
2
|
+
const commonResponse = require('../../common/response')
|
|
1
3
|
const base = require('./base')
|
|
2
4
|
|
|
3
5
|
module.exports.request = {
|
|
@@ -10,3 +12,19 @@ module.exports.request = {
|
|
|
10
12
|
properties: base,
|
|
11
13
|
type: 'object'
|
|
12
14
|
}
|
|
15
|
+
|
|
16
|
+
module.exports.response = {
|
|
17
|
+
$id: 'https://schemas.tillhub.com/v0/branches.create.response.schema.json',
|
|
18
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
19
|
+
additionalProperties: false,
|
|
20
|
+
...commonResponse({
|
|
21
|
+
resultItems: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
additionalProperties: false,
|
|
24
|
+
properties: {
|
|
25
|
+
...baseObject(),
|
|
26
|
+
...base
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
}
|
package/lib/v0/branches/index.js
CHANGED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
const baseObject = require('../../common/base')
|
|
2
|
+
const commonResponse = require('../../common/response')
|
|
3
|
+
const commonQuery = require('../../common/query')
|
|
4
|
+
const { oneOf } = require('../../helpers/payload-or-null')
|
|
5
|
+
|
|
6
|
+
const base = require('./base')
|
|
7
|
+
|
|
8
|
+
const extended = {
|
|
9
|
+
insert_id: {
|
|
10
|
+
description: 'Sequential branch index',
|
|
11
|
+
type: 'integer'
|
|
12
|
+
},
|
|
13
|
+
fa_account_number: {
|
|
14
|
+
description: 'Account number',
|
|
15
|
+
...oneOf({
|
|
16
|
+
type: 'string'
|
|
17
|
+
})
|
|
18
|
+
},
|
|
19
|
+
configurations: {
|
|
20
|
+
description: 'Configurations set',
|
|
21
|
+
...oneOf({
|
|
22
|
+
type: 'object'
|
|
23
|
+
})
|
|
24
|
+
},
|
|
25
|
+
merged_configurations: {
|
|
26
|
+
description: 'Merged configuration of branch and account',
|
|
27
|
+
...oneOf({
|
|
28
|
+
type: 'object'
|
|
29
|
+
})
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
module.exports.all = {
|
|
34
|
+
query: {
|
|
35
|
+
$id: 'https://schemas.tillhub.com/v0/branches.read.all.query.schema.json',
|
|
36
|
+
...commonQuery({
|
|
37
|
+
standard: ['start', 'end', 'active', 'deleted'],
|
|
38
|
+
additional: {
|
|
39
|
+
name: {
|
|
40
|
+
description: 'Filter branches by name substring',
|
|
41
|
+
example: 'Head office',
|
|
42
|
+
type: 'string'
|
|
43
|
+
},
|
|
44
|
+
branch_group: {
|
|
45
|
+
description: 'Filter branches by branch group ID',
|
|
46
|
+
example: 'Head office',
|
|
47
|
+
type: 'string',
|
|
48
|
+
format: 'uuid'
|
|
49
|
+
},
|
|
50
|
+
branch_number: {
|
|
51
|
+
description: 'Filter branches by number',
|
|
52
|
+
example: 239,
|
|
53
|
+
type: 'integer'
|
|
54
|
+
},
|
|
55
|
+
postal_code: {
|
|
56
|
+
description: 'Filter branches by postal code',
|
|
57
|
+
example: '10785',
|
|
58
|
+
type: 'string'
|
|
59
|
+
},
|
|
60
|
+
street: {
|
|
61
|
+
description: 'Filter branches by street name',
|
|
62
|
+
example: 'Genthiner Str. 34',
|
|
63
|
+
type: 'string'
|
|
64
|
+
},
|
|
65
|
+
city: {
|
|
66
|
+
description: 'Filter branches by city name',
|
|
67
|
+
example: 'Berlin',
|
|
68
|
+
type: 'string'
|
|
69
|
+
},
|
|
70
|
+
q: {
|
|
71
|
+
description: 'Search branches by several fields which match given string',
|
|
72
|
+
example: 'head',
|
|
73
|
+
type: 'string'
|
|
74
|
+
},
|
|
75
|
+
total: {
|
|
76
|
+
description: 'Return the total count of branches (in meta data call)',
|
|
77
|
+
example: 'true',
|
|
78
|
+
type: 'string',
|
|
79
|
+
enum: ['true', 'false']
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
})
|
|
83
|
+
},
|
|
84
|
+
response: {
|
|
85
|
+
$id: 'https://schemas.tillhub.com/v0/branches.read.all.response.schema.json',
|
|
86
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
87
|
+
additionalProperties: false,
|
|
88
|
+
...commonResponse({
|
|
89
|
+
resultItems: {
|
|
90
|
+
type: 'object',
|
|
91
|
+
additionalProperties: false,
|
|
92
|
+
properties: {
|
|
93
|
+
...baseObject(),
|
|
94
|
+
...base,
|
|
95
|
+
...extended
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
})
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
module.exports.one = {
|
|
103
|
+
response: {
|
|
104
|
+
$id: 'https://schemas.tillhub.com/v0/branches.read.one.response.schema.json',
|
|
105
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
106
|
+
additionalProperties: false,
|
|
107
|
+
...commonResponse({
|
|
108
|
+
resultItems: {
|
|
109
|
+
type: 'object',
|
|
110
|
+
additionalProperties: false,
|
|
111
|
+
properties: {
|
|
112
|
+
...baseObject(),
|
|
113
|
+
...base,
|
|
114
|
+
...extended
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
})
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const baseObject = require('../../common/base')
|
|
2
|
+
const commonResponse = require('../../common/response')
|
|
1
3
|
const base = require('./base')
|
|
2
4
|
|
|
3
5
|
module.exports.request = {
|
|
@@ -8,3 +10,19 @@ module.exports.request = {
|
|
|
8
10
|
required: [],
|
|
9
11
|
properties: base
|
|
10
12
|
}
|
|
13
|
+
|
|
14
|
+
module.exports.response = {
|
|
15
|
+
$id: 'https://schemas.tillhub.com/v0/branches.update.response.schema.json',
|
|
16
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
17
|
+
additionalProperties: false,
|
|
18
|
+
...commonResponse({
|
|
19
|
+
resultItems: {
|
|
20
|
+
type: 'object',
|
|
21
|
+
additionalProperties: false,
|
|
22
|
+
properties: {
|
|
23
|
+
...baseObject(),
|
|
24
|
+
...base
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
})
|
|
28
|
+
}
|