@pdtf/schemas 0.7.0 → 0.7.1
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/index.js +7 -6
- package/package.json +1 -1
- package/src/mappings/adf.js +198 -0
- package/src/schemas/{baspi-b-legal-information.json → legal-information.json} +16 -8
- package/src/schemas/{baspi-a-material-facts.json → material-facts.json} +422 -140
- package/src/schemas/pdtf-transaction.json +2 -2
- package/src/tests/transactionSchema.test.js +4 -4
package/index.js
CHANGED
|
@@ -3,18 +3,18 @@ const Ajv = require("ajv");
|
|
|
3
3
|
const addFormats = require("ajv-formats");
|
|
4
4
|
|
|
5
5
|
const pdtfTransaction = require("./src/schemas/pdtf-transaction.json");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
6
|
+
const materialFacts = require("./src/schemas/material-facts.json");
|
|
7
|
+
const legalInformation = require("./src/schemas/legal-information.json");
|
|
8
8
|
const energyPerformanceCertificate = require("./src/schemas/energy-performance-certificate.json");
|
|
9
9
|
const titleDeed = require("./src/schemas/title-deed.json");
|
|
10
10
|
const geoJson = require("./src/schemas/GeoJSON.json");
|
|
11
11
|
const verifiedClaimsSchema = require("./src/schemas/pdtf-verified-claims.json");
|
|
12
12
|
|
|
13
13
|
const subSchemas = {
|
|
14
|
-
"https://raw.githubusercontent.com/Property-Data-Trust-Framework/schemas/master/src/schemas/
|
|
15
|
-
|
|
16
|
-
"https://raw.githubusercontent.com/Property-Data-Trust-Framework/schemas/master/src/schemas/
|
|
17
|
-
|
|
14
|
+
"https://raw.githubusercontent.com/Property-Data-Trust-Framework/schemas/master/src/schemas/material-facts.json":
|
|
15
|
+
materialFacts,
|
|
16
|
+
"https://raw.githubusercontent.com/Property-Data-Trust-Framework/schemas/master/src/schemas/legal-information.json":
|
|
17
|
+
legalInformation,
|
|
18
18
|
"https://raw.githubusercontent.com/Property-Data-Trust-Framework/schemas/master/src/schemas/energy-performance-certificate.json":
|
|
19
19
|
energyPerformanceCertificate,
|
|
20
20
|
"https://geojson.org/schema/GeoJSON.json": geoJson,
|
|
@@ -39,6 +39,7 @@ const getSubschema = (path) => {
|
|
|
39
39
|
if (pathArray.length < 1) {
|
|
40
40
|
return transactionSchema;
|
|
41
41
|
}
|
|
42
|
+
|
|
42
43
|
return pathArray.reduce((schema, pathElement) => {
|
|
43
44
|
if (schema.type === "array") return schema.items;
|
|
44
45
|
if (schema.properties[pathElement]) return schema.properties[pathElement];
|
package/package.json
CHANGED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
const PROPERTY_TYPES = {
|
|
2
|
+
0: "Not Specified",
|
|
3
|
+
1: "Terraced House",
|
|
4
|
+
2: "End of terrace house",
|
|
5
|
+
3: "Semi-detached house",
|
|
6
|
+
4: "Detached house",
|
|
7
|
+
5: "Mews house",
|
|
8
|
+
6: "Cluster house",
|
|
9
|
+
7: "Ground floor flat",
|
|
10
|
+
8: "Flat",
|
|
11
|
+
9: "Studio flat",
|
|
12
|
+
10: "Ground floor maisonette",
|
|
13
|
+
11: "Maisonette",
|
|
14
|
+
12: "Bungalow",
|
|
15
|
+
13: "Terraced bungalow",
|
|
16
|
+
14: "Semi-detached bungalow",
|
|
17
|
+
15: "Detached bungalow",
|
|
18
|
+
16: "Mobile home",
|
|
19
|
+
20: "Land (Residential)",
|
|
20
|
+
21: "Link detached house",
|
|
21
|
+
22: "Town house",
|
|
22
|
+
23: "Cottage",
|
|
23
|
+
24: "Chalet",
|
|
24
|
+
25: "Character Property",
|
|
25
|
+
26: "House (unspecified)",
|
|
26
|
+
27: "Villa",
|
|
27
|
+
28: "Apartment",
|
|
28
|
+
29: "Penthouse",
|
|
29
|
+
30: "Finca",
|
|
30
|
+
43: "Barn Conversion",
|
|
31
|
+
44: "Serviced apartment",
|
|
32
|
+
45: "Parking",
|
|
33
|
+
46: "Sheltered Housing",
|
|
34
|
+
47: "Reteirment property",
|
|
35
|
+
48: "House share",
|
|
36
|
+
49: "Flat share",
|
|
37
|
+
50: "Park home",
|
|
38
|
+
51: "Garages",
|
|
39
|
+
52: "Farm House",
|
|
40
|
+
53: "Equestrian facility",
|
|
41
|
+
56: "Duplex",
|
|
42
|
+
59: "Triplex",
|
|
43
|
+
62: "Longere",
|
|
44
|
+
65: "Gite",
|
|
45
|
+
68: "Barn",
|
|
46
|
+
71: "Trulli",
|
|
47
|
+
74: "Mill",
|
|
48
|
+
77: "Ruins",
|
|
49
|
+
80: "Restaurant",
|
|
50
|
+
83: "Cafe",
|
|
51
|
+
86: "Mill",
|
|
52
|
+
92: "Castle",
|
|
53
|
+
95: "Village House",
|
|
54
|
+
101: "Cave House",
|
|
55
|
+
104: "Cortijo",
|
|
56
|
+
107: "Farm Land",
|
|
57
|
+
110: "Plot",
|
|
58
|
+
113: "Country House",
|
|
59
|
+
116: "Stone House",
|
|
60
|
+
117: "Caravan",
|
|
61
|
+
118: "Lodge",
|
|
62
|
+
119: "Log Cabin",
|
|
63
|
+
120: "Manor House",
|
|
64
|
+
121: "Stately Home",
|
|
65
|
+
125: "Off-Plan",
|
|
66
|
+
128: "Semi-detached Villa",
|
|
67
|
+
131: "Detached Villa",
|
|
68
|
+
134: "Bar/Nightclub",
|
|
69
|
+
137: "Shop",
|
|
70
|
+
140: "Riad",
|
|
71
|
+
141: "House Boat",
|
|
72
|
+
142: "Hotel Room",
|
|
73
|
+
143: "Block of Apartments",
|
|
74
|
+
144: "Private Halls",
|
|
75
|
+
178: "Office",
|
|
76
|
+
181: "Business Park",
|
|
77
|
+
184: "Serviced Office",
|
|
78
|
+
187: "Retail Property (High Street)",
|
|
79
|
+
190: "Retail Property (Out of Town)",
|
|
80
|
+
193: "Convenience Store",
|
|
81
|
+
196: "Garages",
|
|
82
|
+
199: "Hairdresser/Barber Shop",
|
|
83
|
+
202: "Hotel",
|
|
84
|
+
205: "Petrol Station",
|
|
85
|
+
208: "Post Office",
|
|
86
|
+
211: "Pub",
|
|
87
|
+
214: "Workshop & Retail Space",
|
|
88
|
+
217: "Distribution Warehouse",
|
|
89
|
+
220: "Factory",
|
|
90
|
+
223: "Heavy Industrial",
|
|
91
|
+
226: "Industrial Park",
|
|
92
|
+
229: "Light Industrial",
|
|
93
|
+
232: "Storage",
|
|
94
|
+
235: "Showroom",
|
|
95
|
+
238: "Warehouse",
|
|
96
|
+
241: "Land (Commercial)",
|
|
97
|
+
244: "Commercial Development",
|
|
98
|
+
247: "Industrial Development",
|
|
99
|
+
250: "Residential Development",
|
|
100
|
+
253: "Commercial Property",
|
|
101
|
+
256: "Data Centre",
|
|
102
|
+
259: "Farm",
|
|
103
|
+
262: "Healthcare Facility",
|
|
104
|
+
265: "Marine Property",
|
|
105
|
+
268: "Mixed Use",
|
|
106
|
+
271: "Research & Development Facility",
|
|
107
|
+
274: "Science Park",
|
|
108
|
+
277: "Guest House",
|
|
109
|
+
280: "Hospitality",
|
|
110
|
+
283: "Leisure Facility",
|
|
111
|
+
298: "Takeaway",
|
|
112
|
+
301: "Childcare Facility",
|
|
113
|
+
304: "Smallholding",
|
|
114
|
+
307: "Place of Worship",
|
|
115
|
+
310: "Trade Counter",
|
|
116
|
+
511: "Coach House",
|
|
117
|
+
512: "House of Multiple Occupation",
|
|
118
|
+
535: "Sports facilities",
|
|
119
|
+
538: "Spa",
|
|
120
|
+
541: "Campsite & Holiday Village",
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
const PRICE_QUALIFIER_TYPES = {
|
|
124
|
+
0: "Default",
|
|
125
|
+
1: "POA",
|
|
126
|
+
2: "Guide Price",
|
|
127
|
+
3: "Fixed Price",
|
|
128
|
+
4: "Offers in excess of",
|
|
129
|
+
5: "OIRO",
|
|
130
|
+
6: "Sale by Tender",
|
|
131
|
+
7: "From",
|
|
132
|
+
9: "Shared Ownership",
|
|
133
|
+
10: "Offers over",
|
|
134
|
+
11: "Part Buy, Part Rent",
|
|
135
|
+
12: "Shared Equity",
|
|
136
|
+
15: "Offers Invited",
|
|
137
|
+
16: "Coming Soon",
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
const TENURE_TYPES = {
|
|
141
|
+
1: "Freehold",
|
|
142
|
+
2: "Leasehold",
|
|
143
|
+
3: "Feudal",
|
|
144
|
+
4: "Commonhold",
|
|
145
|
+
5: "Share of Freehold",
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
const FREQUENCY_TYPES = {
|
|
149
|
+
1: "Yearly",
|
|
150
|
+
4: "Quarterly",
|
|
151
|
+
12: "Monthly",
|
|
152
|
+
52: "Weekly",
|
|
153
|
+
365: "Daily",
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
export const adfProperty = (pdtfTransaction) => {
|
|
157
|
+
const materialFacts = pdtfTransaction.propertyPack?.materialFacts;
|
|
158
|
+
return {
|
|
159
|
+
property_type:
|
|
160
|
+
Object.keys(PROPERTY_TYPES).find(
|
|
161
|
+
(key) => PROPERTY_TYPES(key) === materialFacts?.propertyType
|
|
162
|
+
) || 0,
|
|
163
|
+
new_home: materialFacts?.isNewBuild,
|
|
164
|
+
address: {
|
|
165
|
+
house_name_number: materialFacts?.address?.line1,
|
|
166
|
+
address_2: materialFacts?.address?.line2,
|
|
167
|
+
town: materialFacts?.address?.town,
|
|
168
|
+
postcode_1: materialFacts?.address?.postcode.split(" ")[0],
|
|
169
|
+
postcode_2: materialFacts?.address?.postcode.split(" ")[1],
|
|
170
|
+
display_address: materialFacts?.address?.line1,
|
|
171
|
+
latitude: materialFacts?.location?.latitude,
|
|
172
|
+
longitude: materialFacts?.location?.longitude,
|
|
173
|
+
},
|
|
174
|
+
price_information: {
|
|
175
|
+
price: materialFacts?.price_information?.price,
|
|
176
|
+
price_qualifier: materialFacts?.price_information?.priceQualifier,
|
|
177
|
+
},
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
export const pdtfClaims = (adfProperty) => {
|
|
182
|
+
return {
|
|
183
|
+
"/propertyPack/materialFacts/address": {
|
|
184
|
+
line1: adfProperty?.address?.house_name_number,
|
|
185
|
+
line2: adfProperty?.address?.line2,
|
|
186
|
+
town: adfProperty?.address?.town,
|
|
187
|
+
postcode: `${adfProperty?.address?.postcode_1} ${adfProperty?.address?.postcode_2}`,
|
|
188
|
+
},
|
|
189
|
+
"/propertyPack/materialFacts/location": {
|
|
190
|
+
latitude: adfProperty?.address?.latitude,
|
|
191
|
+
longitude: adfProperty?.address?.longitude,
|
|
192
|
+
},
|
|
193
|
+
"/propertyPack/materialFacts/priceInformation": {
|
|
194
|
+
price: adfProperty?.price_information?.price,
|
|
195
|
+
priceQualifier: adfProperty?.price_information?.price_qualifier,
|
|
196
|
+
},
|
|
197
|
+
};
|
|
198
|
+
};
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"Personal Representative for a Deceased Owner",
|
|
66
66
|
"Under Power of Attorney",
|
|
67
67
|
"Mortgagee in Possession",
|
|
68
|
-
"Other
|
|
68
|
+
"Other"
|
|
69
69
|
]
|
|
70
70
|
}
|
|
71
71
|
},
|
|
@@ -86,17 +86,17 @@
|
|
|
86
86
|
"enum": [
|
|
87
87
|
"Personal Representative for a Deceased Owner",
|
|
88
88
|
"Under Power of Attorney",
|
|
89
|
-
"Other
|
|
89
|
+
"Other"
|
|
90
90
|
]
|
|
91
91
|
},
|
|
92
|
-
"
|
|
92
|
+
"sellersCapacityDetails": {
|
|
93
93
|
"baspiRef": "B1.4",
|
|
94
94
|
"RDSRef": "Participants/OtherDocumentation",
|
|
95
|
-
"title": "Please provide details
|
|
95
|
+
"title": "Please provide details and provide any probate, grant of representation or power of attorney ",
|
|
96
96
|
"type": "string"
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
|
-
"required": ["
|
|
99
|
+
"required": ["sellersCapacityDetails"]
|
|
100
100
|
}
|
|
101
101
|
]
|
|
102
102
|
}
|
|
@@ -309,7 +309,7 @@
|
|
|
309
309
|
"baspiRef": "B4.3.5",
|
|
310
310
|
"RDSRef": "Objects/isNotWorking=yes|no|true|false",
|
|
311
311
|
"title": "Is the system in good working order to your satisfaction?",
|
|
312
|
-
"$ref": "#/$defs/
|
|
312
|
+
"$ref": "#/$defs/yesNoDetailIfNo"
|
|
313
313
|
},
|
|
314
314
|
"isConnectedToNationalGrid": {
|
|
315
315
|
"baspiRef": "B4.3.6",
|
|
@@ -318,7 +318,15 @@
|
|
|
318
318
|
"type": "string",
|
|
319
319
|
"enum": ["Yes (FiT)", "Yes (SEG)", "No"]
|
|
320
320
|
}
|
|
321
|
-
}
|
|
321
|
+
},
|
|
322
|
+
"required": [
|
|
323
|
+
"yearInstalled",
|
|
324
|
+
"panelsOwnedOutright",
|
|
325
|
+
"panelProviderLease",
|
|
326
|
+
"lastMaintained",
|
|
327
|
+
"inGoodWorkingOrder",
|
|
328
|
+
"isConnectedToNationalGrid"
|
|
329
|
+
]
|
|
322
330
|
}
|
|
323
331
|
]
|
|
324
332
|
}
|
|
@@ -589,7 +597,7 @@
|
|
|
589
597
|
"type": "string"
|
|
590
598
|
},
|
|
591
599
|
"lastName": {
|
|
592
|
-
"title": "
|
|
600
|
+
"title": "Last Name",
|
|
593
601
|
"type": "string",
|
|
594
602
|
"minLength": 1
|
|
595
603
|
},
|
|
@@ -43,10 +43,196 @@
|
|
|
43
43
|
"title": "Property Address",
|
|
44
44
|
"$ref": "#/$defs/address"
|
|
45
45
|
},
|
|
46
|
+
"propertyType": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"enum": [
|
|
49
|
+
"Not Specified",
|
|
50
|
+
"Terraced House",
|
|
51
|
+
"End of terrace house",
|
|
52
|
+
"Semi-detached house",
|
|
53
|
+
"Detached house",
|
|
54
|
+
"Mews house",
|
|
55
|
+
"Cluster house",
|
|
56
|
+
"Ground floor flat",
|
|
57
|
+
"Flat",
|
|
58
|
+
"Studio flat",
|
|
59
|
+
"Ground floor maisonette",
|
|
60
|
+
"Maisonette",
|
|
61
|
+
"Bungalow",
|
|
62
|
+
"Terraced bungalow",
|
|
63
|
+
"Semi-detached bungalow",
|
|
64
|
+
"Detached bungalow",
|
|
65
|
+
"Mobile home",
|
|
66
|
+
"Land (Residential)",
|
|
67
|
+
"Link detached house",
|
|
68
|
+
"Town house",
|
|
69
|
+
"Cottage",
|
|
70
|
+
"Chalet",
|
|
71
|
+
"Character Property",
|
|
72
|
+
"House (unspecified)",
|
|
73
|
+
"Villa",
|
|
74
|
+
"Apartment",
|
|
75
|
+
"Penthouse",
|
|
76
|
+
"Finca",
|
|
77
|
+
"Barn Conversion",
|
|
78
|
+
"Serviced apartment",
|
|
79
|
+
"Parking",
|
|
80
|
+
"Sheltered Housing",
|
|
81
|
+
"Retirement property",
|
|
82
|
+
"House share",
|
|
83
|
+
"Flat share",
|
|
84
|
+
"Park home",
|
|
85
|
+
"Garages",
|
|
86
|
+
"Farm House",
|
|
87
|
+
"Equestrian facility",
|
|
88
|
+
"Duplex",
|
|
89
|
+
"Triplex",
|
|
90
|
+
"Longere",
|
|
91
|
+
"Gite",
|
|
92
|
+
"Barn",
|
|
93
|
+
"Trulli",
|
|
94
|
+
"Mill",
|
|
95
|
+
"Ruins",
|
|
96
|
+
"Restaurant",
|
|
97
|
+
"Cafe",
|
|
98
|
+
"Castle",
|
|
99
|
+
"Village House",
|
|
100
|
+
"Cave House",
|
|
101
|
+
"Cortijo",
|
|
102
|
+
"Farm Land",
|
|
103
|
+
"Plot",
|
|
104
|
+
"Country House",
|
|
105
|
+
"Stone House",
|
|
106
|
+
"Caravan",
|
|
107
|
+
"Lodge",
|
|
108
|
+
"Log Cabin",
|
|
109
|
+
"Manor House",
|
|
110
|
+
"Stately Home",
|
|
111
|
+
"Off-Plan",
|
|
112
|
+
"Semi-detached Villa",
|
|
113
|
+
"Detached Villa",
|
|
114
|
+
"Bar/Nightclub",
|
|
115
|
+
"Shop",
|
|
116
|
+
"Riad",
|
|
117
|
+
"House Boat",
|
|
118
|
+
"Hotel Room",
|
|
119
|
+
"Block of Apartments",
|
|
120
|
+
"Private Halls",
|
|
121
|
+
"Office",
|
|
122
|
+
"Business Park",
|
|
123
|
+
"Serviced Office",
|
|
124
|
+
"Retail Property (High Street)",
|
|
125
|
+
"Retail Property (Out of Town)",
|
|
126
|
+
"Convenience Store",
|
|
127
|
+
"Hairdresser/Barber Shop",
|
|
128
|
+
"Hotel",
|
|
129
|
+
"Petrol Station",
|
|
130
|
+
"Post Office",
|
|
131
|
+
"Pub",
|
|
132
|
+
"Workshop & Retail Space",
|
|
133
|
+
"Distribution Warehouse",
|
|
134
|
+
"Factory",
|
|
135
|
+
"Heavy Industrial",
|
|
136
|
+
"Industrial Park",
|
|
137
|
+
"Light Industrial",
|
|
138
|
+
"Storage",
|
|
139
|
+
"Showroom",
|
|
140
|
+
"Warehouse",
|
|
141
|
+
"Land (Commercial)",
|
|
142
|
+
"Commercial Development",
|
|
143
|
+
"Industrial Development",
|
|
144
|
+
"Residential Development",
|
|
145
|
+
"Commercial Property",
|
|
146
|
+
"Data Centre",
|
|
147
|
+
"Farm",
|
|
148
|
+
"Healthcare Facility",
|
|
149
|
+
"Marine Property",
|
|
150
|
+
"Mixed Use",
|
|
151
|
+
"Research & Development Facility",
|
|
152
|
+
"Science Park",
|
|
153
|
+
"Guest House",
|
|
154
|
+
"Hospitality",
|
|
155
|
+
"Leisure Facility",
|
|
156
|
+
"Takeaway",
|
|
157
|
+
"Childcare Facility",
|
|
158
|
+
"Smallholding",
|
|
159
|
+
"Place of Worship",
|
|
160
|
+
"Trade Counter",
|
|
161
|
+
"Coach House",
|
|
162
|
+
"House of Multiple Occupation",
|
|
163
|
+
"Sports facilities",
|
|
164
|
+
"Spa",
|
|
165
|
+
"Campsite & Holiday Village"
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
"isNewBuild": {
|
|
169
|
+
"type": "boolean"
|
|
170
|
+
},
|
|
171
|
+
"location": {
|
|
172
|
+
"latitude": {
|
|
173
|
+
"type": "number",
|
|
174
|
+
"minimum": -90,
|
|
175
|
+
"maximum": 90
|
|
176
|
+
},
|
|
177
|
+
"longitude": {
|
|
178
|
+
"type": "number",
|
|
179
|
+
"minimum": -180,
|
|
180
|
+
"maximum": 180
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"priceInformation": {
|
|
184
|
+
"price": {
|
|
185
|
+
"type": "number",
|
|
186
|
+
"minimum": 1
|
|
187
|
+
},
|
|
188
|
+
"priceQualifier": {
|
|
189
|
+
"type": "string",
|
|
190
|
+
"enum": [
|
|
191
|
+
"POA",
|
|
192
|
+
"Guide price",
|
|
193
|
+
"Fixed price",
|
|
194
|
+
"Offers in excess of",
|
|
195
|
+
"Offers in region of",
|
|
196
|
+
"Sale by tender"
|
|
197
|
+
]
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"summaryDescription": {
|
|
201
|
+
"type": "string"
|
|
202
|
+
},
|
|
203
|
+
"media": {
|
|
204
|
+
"type": "array",
|
|
205
|
+
"items": {
|
|
206
|
+
"type": "object",
|
|
207
|
+
"title": "Media item",
|
|
208
|
+
"required": ["mediaUrl"],
|
|
209
|
+
"properties": {
|
|
210
|
+
"mediaType": {
|
|
211
|
+
"type": "string",
|
|
212
|
+
"enum": [
|
|
213
|
+
"Image",
|
|
214
|
+
"Floorplan",
|
|
215
|
+
"Brochure",
|
|
216
|
+
"Virtual tour",
|
|
217
|
+
"Audio tour",
|
|
218
|
+
"EPC",
|
|
219
|
+
"EPC graph"
|
|
220
|
+
]
|
|
221
|
+
},
|
|
222
|
+
"mediaUrl": {
|
|
223
|
+
"type": "string",
|
|
224
|
+
"format": "uri"
|
|
225
|
+
},
|
|
226
|
+
"caption": {
|
|
227
|
+
"type": "string"
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
},
|
|
46
232
|
"delayFactors": {
|
|
47
233
|
"baspiRef": "A1.2",
|
|
48
234
|
"RDSMapping": {
|
|
49
|
-
"hasDelayFactors/yesNo": "
|
|
235
|
+
"hasDelayFactors/yesNo": "Metadata/PotentialDelays",
|
|
50
236
|
"hasDelayFactors/details": "Metadata/PotentialDelayDuration"
|
|
51
237
|
},
|
|
52
238
|
"title": "Delay Factors",
|
|
@@ -71,7 +257,7 @@
|
|
|
71
257
|
"RDSRef": "Tenure/Tenure",
|
|
72
258
|
"lawSocietyRef": "TA7/1.1",
|
|
73
259
|
"title": "What type of ownership is the property?",
|
|
74
|
-
"description": "
|
|
260
|
+
"description": "A Managed Freehold is any freehold where there are shared amenities, the maintenance of which you pay for through an estate rentcharge, service charge, informal or formal contribution.",
|
|
75
261
|
"type": "string",
|
|
76
262
|
"enum": [
|
|
77
263
|
"Freehold",
|
|
@@ -89,9 +275,23 @@
|
|
|
89
275
|
{
|
|
90
276
|
"properties": {
|
|
91
277
|
"ownershipType": {
|
|
92
|
-
"enum": ["Freehold"
|
|
278
|
+
"enum": ["Freehold"]
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
"additionalProperties": false
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"properties": {
|
|
285
|
+
"ownershipType": {
|
|
286
|
+
"enum": ["Other"]
|
|
287
|
+
},
|
|
288
|
+
"otherOwnershipDetails": {
|
|
289
|
+
"title": "Details of the ownership type",
|
|
290
|
+
"type": "string",
|
|
291
|
+
"minLength": 1
|
|
93
292
|
}
|
|
94
293
|
},
|
|
294
|
+
"required": ["otherOwnershipDetails"],
|
|
95
295
|
"additionalProperties": false
|
|
96
296
|
},
|
|
97
297
|
{
|
|
@@ -99,152 +299,234 @@
|
|
|
99
299
|
"ownershipType": {
|
|
100
300
|
"enum": ["Leasehold"]
|
|
101
301
|
},
|
|
102
|
-
"
|
|
103
|
-
"baspiRef": "A1.4",
|
|
104
|
-
"title": "
|
|
105
|
-
"type": "
|
|
106
|
-
"
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
"
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
},
|
|
164
|
-
"freeholderContactDetails": {
|
|
165
|
-
"baspiRef": "A1.5.4",
|
|
166
|
-
"RDSRef": "TenureAgreements/Assignor",
|
|
167
|
-
"title": "The name, address and email address of the freeholder or rentcharge owner",
|
|
168
|
-
"$ref": "#/$defs/contactDetails"
|
|
169
|
-
},
|
|
170
|
-
"managingAgentContactDetails": {
|
|
171
|
-
"baspiRef": "A1.5.5",
|
|
172
|
-
"RDSRef": "Participants/Role",
|
|
173
|
-
"title": "The name, address and email address of the managing agent",
|
|
174
|
-
"$ref": "#/$defs/contactDetails"
|
|
175
|
-
},
|
|
176
|
-
"managementCompanyDirectorRequirement": {
|
|
177
|
-
"baspiRef": "A1.5.6",
|
|
178
|
-
"RDSRef": "Property/Flags",
|
|
179
|
-
"title": "Is the owner of the Property required to become a director in a management company for the maintenance of shared amenities?",
|
|
180
|
-
"$ref": "#/$defs/yesNo"
|
|
181
|
-
}
|
|
182
|
-
}
|
|
302
|
+
"startYearOfLease": {
|
|
303
|
+
"baspiRef": "A1.4.1b",
|
|
304
|
+
"title": "Year that the lease commenced",
|
|
305
|
+
"type": "integer",
|
|
306
|
+
"minimum": 1000
|
|
307
|
+
},
|
|
308
|
+
"lengthOfLeaseInYears": {
|
|
309
|
+
"baspiRef": "A1.4.1a",
|
|
310
|
+
"title": "Length of lease (years)",
|
|
311
|
+
"type": "integer"
|
|
312
|
+
},
|
|
313
|
+
"currentGroundRent": {
|
|
314
|
+
"baspiRef": "A1.4.2",
|
|
315
|
+
"RDSRef": "TenureAgreements/RentPayable/Value",
|
|
316
|
+
"lawSocietyRef": "TA7/1.2",
|
|
317
|
+
"title": "Current annual ground rent (£)",
|
|
318
|
+
"type": "integer"
|
|
319
|
+
},
|
|
320
|
+
"rentIncrease": {
|
|
321
|
+
"baspiRef": "A1.4.3",
|
|
322
|
+
"RDSRef": "TenureAgreement/isRentChangeable, TenureAgreements/RentChanges",
|
|
323
|
+
"title": "Does the ground rent increase?",
|
|
324
|
+
"$ref": "#/$defs/yesNoDetailIfYes",
|
|
325
|
+
"description": "Please provide full details of the ground rent increase e.g. how often and by how much and when the next increase is due."
|
|
326
|
+
},
|
|
327
|
+
"annualServiceCharge": {
|
|
328
|
+
"baspiRef": "A1.5.1",
|
|
329
|
+
"RDSRef": "TenureAgreements/ServiceCharges",
|
|
330
|
+
"title": "Amount of current annual service charge/estate rentcharge/maintenance contribution (£)",
|
|
331
|
+
"type": "integer"
|
|
332
|
+
},
|
|
333
|
+
"largeAdditionalExpense": {
|
|
334
|
+
"baspiRef": "A1.5.2",
|
|
335
|
+
"RDSRef": "TenureAgreements/Repairs,TenureAgreements/ServicesCharges/Breakdown",
|
|
336
|
+
"title": "Have you received notice of any large expense in addition to the annual payment?",
|
|
337
|
+
"$ref": "#/$defs/yesNoDetailIfYes",
|
|
338
|
+
"description": "If yes, please provide details and confirm whether there is a reserve fund or sinking fund which will cover the cost of the works."
|
|
339
|
+
},
|
|
340
|
+
"additionalFeesOnSale": {
|
|
341
|
+
"baspiRef": "A1.5.3",
|
|
342
|
+
"RDSRef": "TenureAgreements/LegalCosts/Actual, TenureAgreements/LegalCosts/Estimated",
|
|
343
|
+
"title": "Additional fees payable on sale (£)",
|
|
344
|
+
"type": "integer"
|
|
345
|
+
},
|
|
346
|
+
"freeholderContactDetails": {
|
|
347
|
+
"baspiRef": "A1.5.4",
|
|
348
|
+
"RDSRef": "TenureAgreements/Assignor",
|
|
349
|
+
"title": "The name, address and email address of the freeholder or rentcharge owner",
|
|
350
|
+
"$ref": "#/$defs/contactDetails"
|
|
351
|
+
},
|
|
352
|
+
"managingAgentContactDetails": {
|
|
353
|
+
"baspiRef": "A1.5.5",
|
|
354
|
+
"RDSRef": "Participants/Role",
|
|
355
|
+
"title": "The name, address and email address of the managing agent",
|
|
356
|
+
"$ref": "#/$defs/contactDetails"
|
|
357
|
+
},
|
|
358
|
+
"managementCompanyDirectorRequirement": {
|
|
359
|
+
"baspiRef": "A1.5.6",
|
|
360
|
+
"RDSRef": "Property/Flags",
|
|
361
|
+
"title": "Is the owner of the property required to become a director in a management company for the maintenance of shared amenities?",
|
|
362
|
+
"$ref": "#/$defs/yesNo"
|
|
183
363
|
}
|
|
184
364
|
},
|
|
185
|
-
"required": [
|
|
365
|
+
"required": [
|
|
366
|
+
"startYearOfLease",
|
|
367
|
+
"lengthOfLeaseInYears",
|
|
368
|
+
"currentGroundRent",
|
|
369
|
+
"rentIncrease",
|
|
370
|
+
"annualServiceCharge",
|
|
371
|
+
"largeAdditionalExpense",
|
|
372
|
+
"additionalFeesOnSale",
|
|
373
|
+
"freeholderContactDetails",
|
|
374
|
+
"managingAgentContactDetails",
|
|
375
|
+
"managementCompanyDirectorRequirement"
|
|
376
|
+
]
|
|
186
377
|
},
|
|
187
378
|
{
|
|
188
379
|
"properties": {
|
|
189
380
|
"ownershipType": {
|
|
190
|
-
"enum": ["Managed Freehold", "Commonhold"
|
|
381
|
+
"enum": ["Managed Freehold", "Commonhold"]
|
|
191
382
|
},
|
|
192
|
-
"
|
|
193
|
-
"baspiRef": "A1.5",
|
|
194
|
-
"
|
|
195
|
-
"
|
|
196
|
-
"
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
"
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
"title": "The contact details of the freeholder or rentcharge owner",
|
|
230
|
-
"$ref": "#/$defs/contactDetails"
|
|
231
|
-
},
|
|
232
|
-
"managingAgentContactDetails": {
|
|
233
|
-
"baspiRef": "A1.5.5",
|
|
234
|
-
"RDSRef": "Participants/Role",
|
|
235
|
-
"title": "The contact details of the managing agent",
|
|
236
|
-
"$ref": "#/$defs/contactDetails"
|
|
237
|
-
},
|
|
238
|
-
"managementCompanyDirectorRequirement": {
|
|
239
|
-
"baspiRef": "A1.5.6",
|
|
240
|
-
"RDSRef": "Property/Flags",
|
|
241
|
-
"title": "Is the owner of the Property required to become a director in a management company for the maintenance of shared amenities?",
|
|
242
|
-
"$ref": "#/$defs/yesNo"
|
|
243
|
-
}
|
|
244
|
-
}
|
|
383
|
+
"annualServiceCharge": {
|
|
384
|
+
"baspiRef": "A1.5.1",
|
|
385
|
+
"RDSRef": "TenureAgreements/ServiceCharges",
|
|
386
|
+
"title": "Amount of current annual service charge/estate rentcharge/maintenance contribution (£)",
|
|
387
|
+
"type": "string",
|
|
388
|
+
"minLength": 1
|
|
389
|
+
},
|
|
390
|
+
"largeAdditionalExpense": {
|
|
391
|
+
"baspiRef": "A1.5.2",
|
|
392
|
+
"RDSRef": "TenureAgreements/Repairs,TenureAgreements/ServicesCharges/Breakdown",
|
|
393
|
+
"title": "Have you received notice of any large expense in addition to the annual payment?",
|
|
394
|
+
"$ref": "#/$defs/yesNoDetailIfYes",
|
|
395
|
+
"description": "If yes, please provide details and confirm whether there is a reserve fund or sinking fund which will cover the cost of the works."
|
|
396
|
+
},
|
|
397
|
+
"additionalFeesOnSale": {
|
|
398
|
+
"baspiRef": "A1.5.3",
|
|
399
|
+
"RDSRef": "TenureAgreements/LegalCosts/Actual, TenureAgreements/LegalCosts/Estimated",
|
|
400
|
+
"title": "Additional fees payable on sale (£)",
|
|
401
|
+
"type": "integer"
|
|
402
|
+
},
|
|
403
|
+
"freeholderContactDetails": {
|
|
404
|
+
"baspiRef": "A1.5.4",
|
|
405
|
+
"RDSRef": "TenureAgreements/Assignor",
|
|
406
|
+
"title": "The contact details of the freeholder or rentcharge owner",
|
|
407
|
+
"$ref": "#/$defs/contactDetails"
|
|
408
|
+
},
|
|
409
|
+
"managingAgentContactDetails": {
|
|
410
|
+
"baspiRef": "A1.5.5",
|
|
411
|
+
"RDSRef": "Participants/Role",
|
|
412
|
+
"title": "The contact details of the managing agent",
|
|
413
|
+
"$ref": "#/$defs/contactDetails"
|
|
414
|
+
},
|
|
415
|
+
"managementCompanyDirectorRequirement": {
|
|
416
|
+
"baspiRef": "A1.5.6",
|
|
417
|
+
"RDSRef": "Property/Flags",
|
|
418
|
+
"title": "Is the owner of the property required to become a director in a management company for the maintenance of shared amenities?",
|
|
419
|
+
"$ref": "#/$defs/yesNo"
|
|
245
420
|
}
|
|
246
421
|
},
|
|
247
|
-
"required": [
|
|
422
|
+
"required": [
|
|
423
|
+
"annualServiceCharge",
|
|
424
|
+
"largeAdditionalExpense",
|
|
425
|
+
"additionalFeesOnSale",
|
|
426
|
+
"freeholderContactDetails",
|
|
427
|
+
"managingAgentContactDetails",
|
|
428
|
+
"managementCompanyDirectorRequirement"
|
|
429
|
+
]
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
"properties": {
|
|
433
|
+
"ownershipType": {
|
|
434
|
+
"enum": ["Shared Ownership"]
|
|
435
|
+
},
|
|
436
|
+
"sharedOwnershipPercentage": {
|
|
437
|
+
"title": "Shared ownership percentage",
|
|
438
|
+
"type": "integer",
|
|
439
|
+
"minimum": 5,
|
|
440
|
+
"exclusiveMaximum": 100
|
|
441
|
+
},
|
|
442
|
+
"sharedOwnershipRent": {
|
|
443
|
+
"title": "Shared ownership rent (£)",
|
|
444
|
+
"type": "integer",
|
|
445
|
+
"minimum": 0
|
|
446
|
+
},
|
|
447
|
+
"sharedOwnershipRentFrequency": {
|
|
448
|
+
"title": "Shared ownership rent frequency",
|
|
449
|
+
"type": "string",
|
|
450
|
+
"enum": ["Yearly", "Monthly", "Weekly"]
|
|
451
|
+
},
|
|
452
|
+
"startYearOfLease": {
|
|
453
|
+
"baspiRef": "A1.4.1b",
|
|
454
|
+
"title": "Year that the lease commenced",
|
|
455
|
+
"type": "integer",
|
|
456
|
+
"minimum": 1000
|
|
457
|
+
},
|
|
458
|
+
"lengthOfLeaseInYears": {
|
|
459
|
+
"baspiRef": "A1.4.1a",
|
|
460
|
+
"title": "Length of lease (years)",
|
|
461
|
+
"type": "integer"
|
|
462
|
+
},
|
|
463
|
+
"currentGroundRent": {
|
|
464
|
+
"baspiRef": "A1.4.2",
|
|
465
|
+
"RDSRef": "TenureAgreements/RentPayable/Value",
|
|
466
|
+
"lawSocietyRef": "TA7/1.2",
|
|
467
|
+
"title": "Current annual ground rent (£)",
|
|
468
|
+
"type": "integer"
|
|
469
|
+
},
|
|
470
|
+
"rentIncrease": {
|
|
471
|
+
"baspiRef": "A1.4.3",
|
|
472
|
+
"RDSRef": "TenureAgreement/isRentChangeable, TenureAgreements/RentChanges",
|
|
473
|
+
"title": "Does the ground rent increase?",
|
|
474
|
+
"$ref": "#/$defs/yesNoDetailIfYes",
|
|
475
|
+
"description": "Please provide full details of the ground rent increase e.g. how often and by how much and when the next increase is due."
|
|
476
|
+
},
|
|
477
|
+
"annualServiceCharge": {
|
|
478
|
+
"baspiRef": "A1.5.1",
|
|
479
|
+
"RDSRef": "TenureAgreements/ServiceCharges",
|
|
480
|
+
"title": "Amount of current annual service charge/estate rentcharge/maintenance contribution (£)",
|
|
481
|
+
"type": "integer"
|
|
482
|
+
},
|
|
483
|
+
"largeAdditionalExpense": {
|
|
484
|
+
"baspiRef": "A1.5.2",
|
|
485
|
+
"RDSRef": "TenureAgreements/Repairs,TenureAgreements/ServicesCharges/Breakdown",
|
|
486
|
+
"title": "Have you received notice of any large expense in addition to the annual payment?",
|
|
487
|
+
"$ref": "#/$defs/yesNoDetailIfYes",
|
|
488
|
+
"description": "If yes, please provide details and confirm whether there is a reserve fund or sinking fund which will cover the cost of the works."
|
|
489
|
+
},
|
|
490
|
+
"additionalFeesOnSale": {
|
|
491
|
+
"baspiRef": "A1.5.3",
|
|
492
|
+
"RDSRef": "TenureAgreements/LegalCosts/Actual, TenureAgreements/LegalCosts/Estimated",
|
|
493
|
+
"title": "Additional fees payable on sale or letting (£)",
|
|
494
|
+
"type": "integer"
|
|
495
|
+
},
|
|
496
|
+
"freeholderContactDetails": {
|
|
497
|
+
"baspiRef": "A1.5.4",
|
|
498
|
+
"RDSRef": "TenureAgreements/Assignor",
|
|
499
|
+
"title": "The contact details of the freeholder or rentcharge owner",
|
|
500
|
+
"$ref": "#/$defs/contactDetails"
|
|
501
|
+
},
|
|
502
|
+
"managingAgentContactDetails": {
|
|
503
|
+
"baspiRef": "A1.5.5",
|
|
504
|
+
"RDSRef": "Participants/Role",
|
|
505
|
+
"title": "The contact details of the managing agent",
|
|
506
|
+
"$ref": "#/$defs/contactDetails"
|
|
507
|
+
},
|
|
508
|
+
"managementCompanyDirectorRequirement": {
|
|
509
|
+
"baspiRef": "A1.5.6",
|
|
510
|
+
"RDSRef": "Property/Flags",
|
|
511
|
+
"title": "Is the owner of the Property required to become a director in a management company for the maintenance of shared amenities?",
|
|
512
|
+
"$ref": "#/$defs/yesNo"
|
|
513
|
+
}
|
|
514
|
+
},
|
|
515
|
+
"required": [
|
|
516
|
+
"sharedOwnershipPercentage",
|
|
517
|
+
"sharedOwnershipRent",
|
|
518
|
+
"sharedOwnershipRentFrequency",
|
|
519
|
+
"startYearOfLease",
|
|
520
|
+
"lengthOfLeaseInYears",
|
|
521
|
+
"currentGroundRent",
|
|
522
|
+
"rentIncrease",
|
|
523
|
+
"annualServiceCharge",
|
|
524
|
+
"largeAdditionalExpense",
|
|
525
|
+
"additionalFeesOnSale",
|
|
526
|
+
"freeholderContactDetails",
|
|
527
|
+
"managingAgentContactDetails",
|
|
528
|
+
"managementCompanyDirectorRequirement"
|
|
529
|
+
]
|
|
248
530
|
}
|
|
249
531
|
]
|
|
250
532
|
}
|
|
@@ -107,10 +107,10 @@
|
|
|
107
107
|
"type": "object",
|
|
108
108
|
"properties": {
|
|
109
109
|
"materialFacts": {
|
|
110
|
-
"$ref": "https://raw.githubusercontent.com/Property-Data-Trust-Framework/schemas/master/src/schemas/
|
|
110
|
+
"$ref": "https://raw.githubusercontent.com/Property-Data-Trust-Framework/schemas/master/src/schemas/material-facts.json"
|
|
111
111
|
},
|
|
112
112
|
"additionalLegalInfo": {
|
|
113
|
-
"$ref": "https://raw.githubusercontent.com/Property-Data-Trust-Framework/schemas/master/src/schemas/
|
|
113
|
+
"$ref": "https://raw.githubusercontent.com/Property-Data-Trust-Framework/schemas/master/src/schemas/legal-information.json"
|
|
114
114
|
},
|
|
115
115
|
"titlesToBeSold": {
|
|
116
116
|
"RDSRef": "",
|
|
@@ -90,14 +90,14 @@ test("correctly gets a subschema through a dependency", () => {
|
|
|
90
90
|
|
|
91
91
|
test("correctly gets another subschema through a dependency", () => {
|
|
92
92
|
const subschema = getSubschema(
|
|
93
|
-
"/propertyPack/materialFacts/ownership/
|
|
93
|
+
"/propertyPack/materialFacts/ownership/lengthOfLeaseInYears"
|
|
94
94
|
);
|
|
95
95
|
expect(subschema.title).toBe("Length of lease (years)");
|
|
96
96
|
});
|
|
97
97
|
|
|
98
98
|
test("correctly gets yet another subschema through a dependency", () => {
|
|
99
99
|
const subschema = getSubschema(
|
|
100
|
-
"/propertyPack/materialFacts/ownership/
|
|
100
|
+
"/propertyPack/materialFacts/ownership/rentIncrease/details"
|
|
101
101
|
);
|
|
102
102
|
expect(subschema.title).toBe("Details");
|
|
103
103
|
});
|
|
@@ -143,13 +143,13 @@ test("correctly gets titles across schemas, arrays and non-existient title prope
|
|
|
143
143
|
expect(
|
|
144
144
|
getTitleAtPath(
|
|
145
145
|
transactionSchema,
|
|
146
|
-
"/propertyPack/materialFacts/ownership/
|
|
146
|
+
"/propertyPack/materialFacts/ownership/lengthOfLeaseInYears"
|
|
147
147
|
)
|
|
148
148
|
).toBe("Length of lease (years)");
|
|
149
149
|
expect(
|
|
150
150
|
getTitleAtPath(
|
|
151
151
|
transactionSchema,
|
|
152
|
-
"/propertyPack/materialFacts/ownership/
|
|
152
|
+
"/propertyPack/materialFacts/ownership/annualServiceCharge"
|
|
153
153
|
)
|
|
154
154
|
).toBe(
|
|
155
155
|
"Amount of current annual service charge/estate rentcharge/maintenance contribution (£)"
|