@tillhub/schemas 6.209.0 → 6.210.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 +8 -0
- package/lib/v0/branches/base-mms.js +160 -0
- package/lib/v0/branches/base.js +26 -0
- package/lib/v0/branches/create.js +12 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
# [6.210.0](https://github.com/tillhub/schemas/compare/v6.209.0...v6.210.0) (2023-04-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **branchMms:** update branch & add branchMms ([e9d5821](https://github.com/tillhub/schemas/commit/e9d5821))
|
|
7
|
+
* **mmsbranch:** fix typo ([d35d641](https://github.com/tillhub/schemas/commit/d35d641))
|
|
8
|
+
|
|
1
9
|
# [6.209.0](https://github.com/tillhub/schemas/compare/v6.208.0...v6.209.0) (2023-04-18)
|
|
2
10
|
|
|
3
11
|
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
const { oneOf } = require('../../helpers/payload-or-null')
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
branch_id: {
|
|
5
|
+
description: 'The id of the parent branch.',
|
|
6
|
+
type: 'string',
|
|
7
|
+
format: 'uuid'
|
|
8
|
+
},
|
|
9
|
+
mms_id: oneOf({
|
|
10
|
+
description: 'The id of the branch that identifies it in Mms.',
|
|
11
|
+
type: 'string',
|
|
12
|
+
format: 'uuid'
|
|
13
|
+
}),
|
|
14
|
+
created_by: oneOf({
|
|
15
|
+
description: 'When was created the branch in Mms.',
|
|
16
|
+
type: 'string',
|
|
17
|
+
maxLength: 255,
|
|
18
|
+
minLength: 1
|
|
19
|
+
}),
|
|
20
|
+
updated_by: oneOf({
|
|
21
|
+
description: 'Last time it was updated in Mms.',
|
|
22
|
+
type: 'string',
|
|
23
|
+
maxLength: 255,
|
|
24
|
+
minLength: 1
|
|
25
|
+
}),
|
|
26
|
+
scope: oneOf({
|
|
27
|
+
description: 'The scope from Mms.',
|
|
28
|
+
type: 'string',
|
|
29
|
+
format: 'uuid'
|
|
30
|
+
}),
|
|
31
|
+
attributes: oneOf({
|
|
32
|
+
description: 'The attributes of the branch.',
|
|
33
|
+
type: 'object'
|
|
34
|
+
}),
|
|
35
|
+
vat_id: oneOf({
|
|
36
|
+
description: 'The vat id.',
|
|
37
|
+
type: 'string',
|
|
38
|
+
maxLength: 255,
|
|
39
|
+
minLength: 1
|
|
40
|
+
}),
|
|
41
|
+
commercial_register_number: oneOf({
|
|
42
|
+
description: 'The commercial register number.',
|
|
43
|
+
type: 'string',
|
|
44
|
+
maxLength: 255,
|
|
45
|
+
minLength: 1
|
|
46
|
+
}),
|
|
47
|
+
creditor_id: oneOf({
|
|
48
|
+
description: 'The creditor id.',
|
|
49
|
+
type: 'string',
|
|
50
|
+
maxLength: 255,
|
|
51
|
+
minLength: 1
|
|
52
|
+
}),
|
|
53
|
+
court_of_jurisdiction: oneOf({
|
|
54
|
+
description: 'The court of jurisdiction.',
|
|
55
|
+
type: 'string',
|
|
56
|
+
maxLength: 255,
|
|
57
|
+
minLength: 1
|
|
58
|
+
}),
|
|
59
|
+
company_name_short: oneOf({
|
|
60
|
+
description: 'The short company name.',
|
|
61
|
+
type: 'string',
|
|
62
|
+
maxLength: 1024,
|
|
63
|
+
minLength: 1
|
|
64
|
+
}),
|
|
65
|
+
company_description: oneOf({
|
|
66
|
+
description: 'The company description.',
|
|
67
|
+
type: 'string',
|
|
68
|
+
maxLength: 16384,
|
|
69
|
+
minLength: 1
|
|
70
|
+
}),
|
|
71
|
+
registration_authority: oneOf({
|
|
72
|
+
description: 'The registration authority.',
|
|
73
|
+
type: 'string',
|
|
74
|
+
maxLength: 255,
|
|
75
|
+
minLength: 1
|
|
76
|
+
}),
|
|
77
|
+
legal_entity_type: oneOf({
|
|
78
|
+
description: 'The legal entity type.',
|
|
79
|
+
type: 'string',
|
|
80
|
+
maxLength: 255,
|
|
81
|
+
minLength: 1
|
|
82
|
+
}),
|
|
83
|
+
country_of_registration: oneOf({
|
|
84
|
+
description: 'The country of registration.',
|
|
85
|
+
type: 'string',
|
|
86
|
+
maxLength: 255,
|
|
87
|
+
minLength: 1
|
|
88
|
+
}),
|
|
89
|
+
countries_of_operations: oneOf({
|
|
90
|
+
description: 'The countries of operations.',
|
|
91
|
+
type: 'array',
|
|
92
|
+
items: {
|
|
93
|
+
type: 'string'
|
|
94
|
+
}
|
|
95
|
+
}),
|
|
96
|
+
date_of_foundation: oneOf({
|
|
97
|
+
description: 'The date of foundation.',
|
|
98
|
+
type: 'string',
|
|
99
|
+
maxLength: 255,
|
|
100
|
+
minLength: 1
|
|
101
|
+
}),
|
|
102
|
+
website: oneOf({
|
|
103
|
+
description: 'The website.',
|
|
104
|
+
type: 'string',
|
|
105
|
+
maxLength: 255,
|
|
106
|
+
minLength: 1
|
|
107
|
+
}),
|
|
108
|
+
sector: oneOf({
|
|
109
|
+
description: 'The sector.',
|
|
110
|
+
type: 'string',
|
|
111
|
+
maxLength: 255,
|
|
112
|
+
minLength: 1
|
|
113
|
+
}),
|
|
114
|
+
contacts: oneOf({
|
|
115
|
+
description: 'The contacts.',
|
|
116
|
+
type: 'object'
|
|
117
|
+
}),
|
|
118
|
+
unzer_identifier_records: oneOf({
|
|
119
|
+
description: 'The unzer identifier records.',
|
|
120
|
+
type: 'object'
|
|
121
|
+
}),
|
|
122
|
+
state: oneOf({
|
|
123
|
+
description: 'The state.',
|
|
124
|
+
type: 'string',
|
|
125
|
+
maxLength: 255,
|
|
126
|
+
minLength: 1
|
|
127
|
+
}),
|
|
128
|
+
contracts: oneOf({
|
|
129
|
+
description: 'The contracts.',
|
|
130
|
+
type: 'object'
|
|
131
|
+
}),
|
|
132
|
+
units: oneOf({
|
|
133
|
+
description: 'The uuids of units.',
|
|
134
|
+
type: 'array',
|
|
135
|
+
items: {
|
|
136
|
+
type: 'string',
|
|
137
|
+
format: 'uuid'
|
|
138
|
+
}
|
|
139
|
+
}),
|
|
140
|
+
sales_streams: oneOf({
|
|
141
|
+
description: 'The uuids of sales streams.',
|
|
142
|
+
type: 'array',
|
|
143
|
+
items: {
|
|
144
|
+
type: 'string',
|
|
145
|
+
format: 'uuid'
|
|
146
|
+
}
|
|
147
|
+
}),
|
|
148
|
+
type: oneOf({
|
|
149
|
+
description: 'The type.',
|
|
150
|
+
type: 'string',
|
|
151
|
+
maxLength: 255,
|
|
152
|
+
minLength: 1
|
|
153
|
+
}),
|
|
154
|
+
unit_unzer_id: oneOf({
|
|
155
|
+
description: 'The unit unzer id.',
|
|
156
|
+
type: 'string',
|
|
157
|
+
maxLength: 255,
|
|
158
|
+
minLength: 1
|
|
159
|
+
})
|
|
160
|
+
}
|
package/lib/v0/branches/base.js
CHANGED
|
@@ -18,6 +18,32 @@ module.exports = {
|
|
|
18
18
|
}
|
|
19
19
|
]
|
|
20
20
|
},
|
|
21
|
+
created_at: {
|
|
22
|
+
description: 'When the branch was created. It was added for creating branches coming from MMS',
|
|
23
|
+
oneOf: [
|
|
24
|
+
{
|
|
25
|
+
type: 'string',
|
|
26
|
+
format: 'date-time',
|
|
27
|
+
example: '2019-03-17T21:12:04.849Z'
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
type: 'null'
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
updated_at: {
|
|
35
|
+
description: 'When the branch was last updated. It was added for creating branches coming from MMS',
|
|
36
|
+
oneOf: [
|
|
37
|
+
{
|
|
38
|
+
type: 'string',
|
|
39
|
+
format: 'date-time',
|
|
40
|
+
example: '2019-03-17T21:12:04.849Z'
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
type: 'null'
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
21
47
|
phonenumbers: {
|
|
22
48
|
description: 'A number of valid types of phone numbers for a branch.',
|
|
23
49
|
anyOf: [
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
const baseObject = require('../../common/base')
|
|
2
2
|
const commonResponse = require('../../common/response')
|
|
3
3
|
const base = require('./base')
|
|
4
|
+
const baseMms = require('./base-mms')
|
|
5
|
+
|
|
6
|
+
module.exports.mms = {
|
|
7
|
+
$id: 'https://schemas.tillhub.com/v0/branches.create.mms.schema.json',
|
|
8
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
9
|
+
additionalProperties: false,
|
|
10
|
+
required: [
|
|
11
|
+
'branch_id'
|
|
12
|
+
],
|
|
13
|
+
properties: baseMms,
|
|
14
|
+
type: 'object'
|
|
15
|
+
}
|
|
4
16
|
|
|
5
17
|
module.exports.request = {
|
|
6
18
|
$id: 'https://schemas.tillhub.com/v0/branches.create.request.schema.json',
|