@pdtf/schemas 3.6.0-dev.20 → 3.6.0-dev.21
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/docs/v4-mapping-and-recomposition.md +416 -0
- package/index.js +18 -0
- package/package.json +2 -1
- package/src/schemas/v3/combined.json +65 -0
- package/src/schemas/v3/compactSkeleton.txt +10 -0
- package/src/schemas/v3/pdtf-transaction.json +65 -0
- package/src/schemas/v3/skeleton.json +12 -0
- package/src/schemas/v4/Gift.json +88 -0
- package/src/schemas/v4/Offer.json +384 -0
- package/src/schemas/v4/Organisation.json +167 -0
- package/src/schemas/v4/Person.json +321 -0
- package/src/schemas/v4/Property.json +27769 -0
- package/src/schemas/v4/Representation.json +67 -0
- package/src/schemas/v4/SellerCapacity.json +193 -0
- package/src/schemas/v4/Title.json +14672 -0
- package/src/schemas/v4/Transaction.json +1570 -0
- package/src/schemas/v4/TransactionRole.json +59 -0
- package/src/schemas/v4/mapping.json +1129 -0
- package/src/utils/generateV4Schemas.js +1341 -0
- package/src/utils/v4.js +765 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://trust.propdata.org.uk/schemas/v4/entities/organisation.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"title": "Organisation Entity",
|
|
6
|
+
"description": "A legal entity (company, firm, partnership) participating in a property transaction.",
|
|
7
|
+
"x-pdtf-source": {
|
|
8
|
+
"packageName": "@pdtf/schemas",
|
|
9
|
+
"packageVersion": "3.6.0-dev.21",
|
|
10
|
+
"v3SchemaId": "https://trust.propdata.org.uk/schemas/v3/pdtf-transaction.json",
|
|
11
|
+
"combinedPath": "src/schemas/v3/combined.json",
|
|
12
|
+
"combinedSha256": "1c6c5812f73a36d3674d5fb7b5eb1f6ce524d09c4195e281e078b9e41ea94f6d"
|
|
13
|
+
},
|
|
14
|
+
"properties": {
|
|
15
|
+
"id": {
|
|
16
|
+
"title": "Organisation DID",
|
|
17
|
+
"description": "Decentralised Identifier for the organisation",
|
|
18
|
+
"type": "string",
|
|
19
|
+
"pattern": "^did:[a-z0-9]+:(?:(?:[a-zA-Z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[a-zA-Z0-9._-]|%[0-9A-Fa-f]{2})+$"
|
|
20
|
+
},
|
|
21
|
+
"name": {
|
|
22
|
+
"title": "Organisation name",
|
|
23
|
+
"description": "The legal / registered name of the organisation",
|
|
24
|
+
"type": "string",
|
|
25
|
+
"minLength": 1
|
|
26
|
+
},
|
|
27
|
+
"tradingName": {
|
|
28
|
+
"title": "Trading name",
|
|
29
|
+
"description": "Trading name, if different from the registered legal name",
|
|
30
|
+
"type": "string"
|
|
31
|
+
},
|
|
32
|
+
"organisationType": {
|
|
33
|
+
"title": "Organisation type",
|
|
34
|
+
"type": "string",
|
|
35
|
+
"enum": [
|
|
36
|
+
"Limited Company",
|
|
37
|
+
"Limited Liability Partnership",
|
|
38
|
+
"Partnership",
|
|
39
|
+
"Sole Trader",
|
|
40
|
+
"Public Limited Company",
|
|
41
|
+
"Charity",
|
|
42
|
+
"Public Body",
|
|
43
|
+
"Trust",
|
|
44
|
+
"Other"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"companiesHouseNumber": {
|
|
48
|
+
"title": "Companies House registration number",
|
|
49
|
+
"description": "UK Companies House company registration number (or equivalent)",
|
|
50
|
+
"type": "string"
|
|
51
|
+
},
|
|
52
|
+
"vatNumber": {
|
|
53
|
+
"title": "VAT registration number",
|
|
54
|
+
"type": "string"
|
|
55
|
+
},
|
|
56
|
+
"regulatoryIds": {
|
|
57
|
+
"title": "Regulatory identifiers",
|
|
58
|
+
"description": "Identifiers for the professional / regulatory bodies the organisation is registered with",
|
|
59
|
+
"type": "object",
|
|
60
|
+
"properties": {
|
|
61
|
+
"sraNumber": {
|
|
62
|
+
"title": "Solicitors Regulation Authority (SRA) number",
|
|
63
|
+
"type": "string"
|
|
64
|
+
},
|
|
65
|
+
"clcNumber": {
|
|
66
|
+
"title": "Council for Licensed Conveyancers (CLC) number",
|
|
67
|
+
"type": "string"
|
|
68
|
+
},
|
|
69
|
+
"ricsNumber": {
|
|
70
|
+
"title": "Royal Institution of Chartered Surveyors (RICS) number",
|
|
71
|
+
"type": "string"
|
|
72
|
+
},
|
|
73
|
+
"fcaNumber": {
|
|
74
|
+
"title": "Financial Conduct Authority (FCA) reference number",
|
|
75
|
+
"type": "string"
|
|
76
|
+
},
|
|
77
|
+
"tpoNumber": {
|
|
78
|
+
"title": "The Property Ombudsman (TPO) membership number",
|
|
79
|
+
"type": "string"
|
|
80
|
+
},
|
|
81
|
+
"icoNumber": {
|
|
82
|
+
"title": "Information Commissioner's Office (ICO) registration number",
|
|
83
|
+
"type": "string"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"registeredAddress": {
|
|
88
|
+
"title": "Registered address",
|
|
89
|
+
"type": "object",
|
|
90
|
+
"properties": {
|
|
91
|
+
"buildingNumber": {
|
|
92
|
+
"title": "Building number",
|
|
93
|
+
"type": "string"
|
|
94
|
+
},
|
|
95
|
+
"buildingName": {
|
|
96
|
+
"title": "Building name",
|
|
97
|
+
"type": "string"
|
|
98
|
+
},
|
|
99
|
+
"subBuilding": {
|
|
100
|
+
"title": "Sub building name",
|
|
101
|
+
"type": "string"
|
|
102
|
+
},
|
|
103
|
+
"street": {
|
|
104
|
+
"title": "Street",
|
|
105
|
+
"type": "string"
|
|
106
|
+
},
|
|
107
|
+
"line1": {
|
|
108
|
+
"title": "Address 1",
|
|
109
|
+
"type": "string"
|
|
110
|
+
},
|
|
111
|
+
"line2": {
|
|
112
|
+
"title": "Address 2",
|
|
113
|
+
"type": "string"
|
|
114
|
+
},
|
|
115
|
+
"line3": {
|
|
116
|
+
"title": "Address 3",
|
|
117
|
+
"type": "string"
|
|
118
|
+
},
|
|
119
|
+
"town": {
|
|
120
|
+
"title": "Town",
|
|
121
|
+
"type": "string"
|
|
122
|
+
},
|
|
123
|
+
"postcode": {
|
|
124
|
+
"title": "Postcode",
|
|
125
|
+
"type": "string"
|
|
126
|
+
},
|
|
127
|
+
"homeNation": {
|
|
128
|
+
"title": "Home nation",
|
|
129
|
+
"type": "string",
|
|
130
|
+
"enum": [
|
|
131
|
+
"England",
|
|
132
|
+
"Wales",
|
|
133
|
+
"Scotland",
|
|
134
|
+
"Northern Ireland"
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
"countryCode": {
|
|
138
|
+
"title": "Country code",
|
|
139
|
+
"description": "ISO 3166-1 alpha-3 country code",
|
|
140
|
+
"type": "string",
|
|
141
|
+
"minLength": 3,
|
|
142
|
+
"maxLength": 3
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"phone": {
|
|
147
|
+
"title": "Primary phone number",
|
|
148
|
+
"type": "string"
|
|
149
|
+
},
|
|
150
|
+
"email": {
|
|
151
|
+
"title": "Primary email address",
|
|
152
|
+
"type": "string",
|
|
153
|
+
"format": "email"
|
|
154
|
+
},
|
|
155
|
+
"website": {
|
|
156
|
+
"title": "Website",
|
|
157
|
+
"type": "string",
|
|
158
|
+
"format": "uri"
|
|
159
|
+
},
|
|
160
|
+
"externalIds": {
|
|
161
|
+
"type": "object"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"required": [
|
|
165
|
+
"name"
|
|
166
|
+
]
|
|
167
|
+
}
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://trust.propdata.org.uk/schemas/v4/entities/person.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"title": "Person Entity",
|
|
6
|
+
"description": "A natural person participating in a property transaction — name, contact details, address, verification status.",
|
|
7
|
+
"x-pdtf-source": {
|
|
8
|
+
"packageName": "@pdtf/schemas",
|
|
9
|
+
"packageVersion": "3.6.0-dev.21",
|
|
10
|
+
"v3SchemaId": "https://trust.propdata.org.uk/schemas/v3/pdtf-transaction.json",
|
|
11
|
+
"combinedPath": "src/schemas/v3/combined.json",
|
|
12
|
+
"combinedSha256": "1c6c5812f73a36d3674d5fb7b5eb1f6ce524d09c4195e281e078b9e41ea94f6d"
|
|
13
|
+
},
|
|
14
|
+
"properties": {
|
|
15
|
+
"name": {
|
|
16
|
+
"title": "Name",
|
|
17
|
+
"type": "object",
|
|
18
|
+
"properties": {
|
|
19
|
+
"title": {
|
|
20
|
+
"title": "Title or honorific",
|
|
21
|
+
"type": "string",
|
|
22
|
+
"enum": [
|
|
23
|
+
"Mr",
|
|
24
|
+
"Mrs",
|
|
25
|
+
"Miss",
|
|
26
|
+
"Ms",
|
|
27
|
+
"Mx",
|
|
28
|
+
"Dr"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"firstName": {
|
|
32
|
+
"title": "First name",
|
|
33
|
+
"type": "string",
|
|
34
|
+
"minLength": 1
|
|
35
|
+
},
|
|
36
|
+
"middleName": {
|
|
37
|
+
"title": "Middle name(s)",
|
|
38
|
+
"type": "string"
|
|
39
|
+
},
|
|
40
|
+
"lastName": {
|
|
41
|
+
"title": "lastName",
|
|
42
|
+
"type": "string",
|
|
43
|
+
"minLength": 1
|
|
44
|
+
},
|
|
45
|
+
"maidenName": {
|
|
46
|
+
"title": "Middle name(s)",
|
|
47
|
+
"type": "string"
|
|
48
|
+
},
|
|
49
|
+
"preferredName": {
|
|
50
|
+
"title": "Preferred name / known as",
|
|
51
|
+
"type": "string"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"dateOfBirth": {
|
|
56
|
+
"title": "Date of birth",
|
|
57
|
+
"type": "string",
|
|
58
|
+
"format": "date"
|
|
59
|
+
},
|
|
60
|
+
"phone": {
|
|
61
|
+
"title": "Phone number",
|
|
62
|
+
"type": "string"
|
|
63
|
+
},
|
|
64
|
+
"email": {
|
|
65
|
+
"title": "Email address",
|
|
66
|
+
"type": "string",
|
|
67
|
+
"format": "email"
|
|
68
|
+
},
|
|
69
|
+
"address": {
|
|
70
|
+
"title": "Address",
|
|
71
|
+
"type": "object",
|
|
72
|
+
"properties": {
|
|
73
|
+
"buildingNumber": {
|
|
74
|
+
"title": "Building number",
|
|
75
|
+
"type": "string",
|
|
76
|
+
"minLength": 1
|
|
77
|
+
},
|
|
78
|
+
"buildingName": {
|
|
79
|
+
"title": "Building name",
|
|
80
|
+
"type": "string"
|
|
81
|
+
},
|
|
82
|
+
"subBuilding": {
|
|
83
|
+
"title": "Sub building name",
|
|
84
|
+
"type": "string"
|
|
85
|
+
},
|
|
86
|
+
"street": {
|
|
87
|
+
"title": "Street",
|
|
88
|
+
"type": "string",
|
|
89
|
+
"minLength": 1
|
|
90
|
+
},
|
|
91
|
+
"line1": {
|
|
92
|
+
"title": "Address 1",
|
|
93
|
+
"type": "string",
|
|
94
|
+
"minLength": 1
|
|
95
|
+
},
|
|
96
|
+
"line2": {
|
|
97
|
+
"title": "Address 2",
|
|
98
|
+
"type": "string"
|
|
99
|
+
},
|
|
100
|
+
"line3": {
|
|
101
|
+
"title": "Address 3",
|
|
102
|
+
"type": "string"
|
|
103
|
+
},
|
|
104
|
+
"town": {
|
|
105
|
+
"title": "Town",
|
|
106
|
+
"type": "string"
|
|
107
|
+
},
|
|
108
|
+
"postcode": {
|
|
109
|
+
"title": "Postcode",
|
|
110
|
+
"type": "string",
|
|
111
|
+
"minLength": 1
|
|
112
|
+
},
|
|
113
|
+
"homeNation": {
|
|
114
|
+
"title": "Home nation",
|
|
115
|
+
"type": "string",
|
|
116
|
+
"enum": [
|
|
117
|
+
"England",
|
|
118
|
+
"Wales",
|
|
119
|
+
"Scotland",
|
|
120
|
+
"Northern Ireland"
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
"countryCode": {
|
|
124
|
+
"title": "Country code",
|
|
125
|
+
"description": "ISO 3166-1 alpha-3 country code",
|
|
126
|
+
"type": "string",
|
|
127
|
+
"minLength": 3,
|
|
128
|
+
"maxLength": 3
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"did": {
|
|
133
|
+
"title": "Participant DID",
|
|
134
|
+
"description": "Decentralised Identifier for this party - the primary way to identify them. Unlike participantId it is global and stable: the same person carries the same DID across transactions, and across two entries in one transaction where they are both buying and selling. Minted when the party is created, so it should always be present.",
|
|
135
|
+
"type": "string",
|
|
136
|
+
"pattern": "^did:[a-z0-9]+:(?:(?:[a-zA-Z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[a-zA-Z0-9._-]|%[0-9A-Fa-f]{2})+$"
|
|
137
|
+
},
|
|
138
|
+
"externalIds": {
|
|
139
|
+
"type": "object",
|
|
140
|
+
"patternProperties": {
|
|
141
|
+
".*": {
|
|
142
|
+
"oneOf": [
|
|
143
|
+
{
|
|
144
|
+
"type": "string"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"type": "number"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"type": "boolean"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"type": "object",
|
|
154
|
+
"patternProperties": {
|
|
155
|
+
".*": {}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"participantStatus": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"enum": [
|
|
165
|
+
"Proposed",
|
|
166
|
+
"Invited",
|
|
167
|
+
"Active",
|
|
168
|
+
"Removed"
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
"verification": {
|
|
172
|
+
"type": "object",
|
|
173
|
+
"properties": {
|
|
174
|
+
"identity": {
|
|
175
|
+
"type": "object",
|
|
176
|
+
"properties": {
|
|
177
|
+
"status": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"enum": [
|
|
180
|
+
"Requested",
|
|
181
|
+
"In progress",
|
|
182
|
+
"User tasks complete",
|
|
183
|
+
"Report available",
|
|
184
|
+
"Complete",
|
|
185
|
+
"Cancelled"
|
|
186
|
+
]
|
|
187
|
+
},
|
|
188
|
+
"result": {
|
|
189
|
+
"type": "string",
|
|
190
|
+
"enum": [
|
|
191
|
+
"pass",
|
|
192
|
+
"fail",
|
|
193
|
+
"consider"
|
|
194
|
+
]
|
|
195
|
+
},
|
|
196
|
+
"reports": {
|
|
197
|
+
"type": "array",
|
|
198
|
+
"items": {
|
|
199
|
+
"type": "object",
|
|
200
|
+
"properties": {
|
|
201
|
+
"reportName": {
|
|
202
|
+
"type": "string"
|
|
203
|
+
},
|
|
204
|
+
"result": {
|
|
205
|
+
"type": "string",
|
|
206
|
+
"enum": [
|
|
207
|
+
"pass",
|
|
208
|
+
"fail",
|
|
209
|
+
"consider"
|
|
210
|
+
]
|
|
211
|
+
},
|
|
212
|
+
"details": {
|
|
213
|
+
"type": "string"
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"antiMoneyLaundering": {
|
|
221
|
+
"type": "object",
|
|
222
|
+
"properties": {
|
|
223
|
+
"status": {
|
|
224
|
+
"type": "string",
|
|
225
|
+
"enum": [
|
|
226
|
+
"Requested",
|
|
227
|
+
"In progress",
|
|
228
|
+
"User tasks complete",
|
|
229
|
+
"Report available",
|
|
230
|
+
"Complete",
|
|
231
|
+
"Cancelled"
|
|
232
|
+
]
|
|
233
|
+
},
|
|
234
|
+
"result": {
|
|
235
|
+
"type": "string",
|
|
236
|
+
"enum": [
|
|
237
|
+
"pass",
|
|
238
|
+
"fail",
|
|
239
|
+
"consider"
|
|
240
|
+
]
|
|
241
|
+
},
|
|
242
|
+
"reports": {
|
|
243
|
+
"type": "array",
|
|
244
|
+
"items": {
|
|
245
|
+
"type": "object",
|
|
246
|
+
"properties": {
|
|
247
|
+
"reportName": {
|
|
248
|
+
"type": "string"
|
|
249
|
+
},
|
|
250
|
+
"result": {
|
|
251
|
+
"type": "string",
|
|
252
|
+
"enum": [
|
|
253
|
+
"pass",
|
|
254
|
+
"fail",
|
|
255
|
+
"consider"
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
"details": {
|
|
259
|
+
"type": "string"
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
"sourceOfFunds": {
|
|
267
|
+
"type": "object",
|
|
268
|
+
"properties": {
|
|
269
|
+
"status": {
|
|
270
|
+
"type": "string",
|
|
271
|
+
"enum": [
|
|
272
|
+
"Requested",
|
|
273
|
+
"In progress",
|
|
274
|
+
"User tasks complete",
|
|
275
|
+
"Report available",
|
|
276
|
+
"Complete",
|
|
277
|
+
"Cancelled"
|
|
278
|
+
]
|
|
279
|
+
},
|
|
280
|
+
"result": {
|
|
281
|
+
"type": "string",
|
|
282
|
+
"enum": [
|
|
283
|
+
"pass",
|
|
284
|
+
"fail",
|
|
285
|
+
"consider"
|
|
286
|
+
]
|
|
287
|
+
},
|
|
288
|
+
"reports": {
|
|
289
|
+
"type": "array",
|
|
290
|
+
"items": {
|
|
291
|
+
"type": "object",
|
|
292
|
+
"properties": {
|
|
293
|
+
"reportName": {
|
|
294
|
+
"type": "string"
|
|
295
|
+
},
|
|
296
|
+
"result": {
|
|
297
|
+
"type": "string",
|
|
298
|
+
"enum": [
|
|
299
|
+
"pass",
|
|
300
|
+
"fail",
|
|
301
|
+
"consider"
|
|
302
|
+
]
|
|
303
|
+
},
|
|
304
|
+
"details": {
|
|
305
|
+
"type": "string"
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
"id": {
|
|
315
|
+
"title": "Person DID",
|
|
316
|
+
"description": "Decentralised Identifier for the person",
|
|
317
|
+
"type": "string",
|
|
318
|
+
"pattern": "^did:[a-z0-9]+:(?:(?:[a-zA-Z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[a-zA-Z0-9._-]|%[0-9A-Fa-f]{2})+$"
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|