@pdtf/schemas 2.0.0-3 → 2.0.0-30

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 CHANGED
@@ -45,25 +45,28 @@ const validator = ajv.compile(transactionSchema);
45
45
 
46
46
  // v2, via accessor functions and overlays
47
47
  const combinedSchema = require("./src/schemas/v2/combined.json");
48
- const coreSchema = require("./src/schemas/v2/core.json");
48
+ const v2CoreSchema = require("./src/schemas/v2/pdtf-transaction.json");
49
49
 
50
50
  const baspiOverlay = require("./src/schemas/v2/overlays/baspi.json");
51
- // const ta6Overlay = require("./src/schemas/v2/overlays/ta6.json");
52
- // const ta7Overlay = require("./src/schemas/v2/overlays/ta7.json");
53
- // const lpe1Overlay = require("./src/schemas/v2/overlays/lpe1.json");
54
- // const fme1Overlay = require("./src/schemas/v2/overlays/fme1.json");
55
- // const llc1Overlay = require("./src/schemas/v2/overlays/llc1.json");
56
- // const con29ROverlay = require("./src/schemas/v2/overlays/con29R.json");
57
- // const con29DWOverlay = require("./src/schemas/v2/overlays/con29DW.json");
58
- // const rdsOverlay = require("./src/schemas/v2/overlays/rds.json");
59
- // const oc1Overlay = require("./src/schemas/v2/overlays/oc1.json");
60
-
61
- const overlays = { baspiV4: baspiOverlay };
51
+ const ta6Overlay = require("./src/schemas/v2/overlays/ta6.json");
52
+ const ta7Overlay = require("./src/schemas/v2/overlays/ta7.json");
53
+ const ta10Overlay = require("./src/schemas/v2/overlays/ta10.json");
54
+ const lpe1Overlay = require("./src/schemas/v2/overlays/lpe1.json");
55
+ const fme1Overlay = require("./src/schemas/v2/overlays/fme1.json");
56
+ const llc1Overlay = require("./src/schemas/v2/overlays/llc1.json");
57
+ const ntsOverlay = require("./src/schemas/v2/overlays/nts.json");
58
+ const con29ROverlay = require("./src/schemas/v2/overlays/con29R.json");
59
+ const con29DWOverlay = require("./src/schemas/v2/overlays/con29DW.json");
60
+ const rdsOverlay = require("./src/schemas/v2/overlays/rds.json");
61
+ const oc1Overlay = require("./src/schemas/v2/overlays/oc1.json");
62
+
63
+ const overlaysMap = { baspiV4: baspiOverlay, ta6ed4: ta6Overlay, null: {} };
62
64
 
63
65
  const transactionSchemas = {
64
66
  "https://trust.propdata.org.uk/schemas/v1/pdtf-transaction.json":
65
67
  transactionSchema,
66
- "https://trust.propdata.org.uk/schemas/v2/pdtf-transaction.json": coreSchema,
68
+ "https://trust.propdata.org.uk/schemas/v2/pdtf-transaction.json":
69
+ v2CoreSchema,
67
70
  };
68
71
 
69
72
  const combineMerge = (target, source, options) => {
@@ -82,22 +85,25 @@ const combineMerge = (target, source, options) => {
82
85
 
83
86
  const getTransactionSchema = (
84
87
  schemaId = "https://trust.propdata.org.uk/schemas/v2/pdtf-transaction.json",
85
- overlay = "baspiV4"
88
+ overlays = ["baspiV4"]
86
89
  ) => {
87
90
  const sourceSchema = transactionSchemas[schemaId];
88
- const overlaySchema = overlays[overlay];
89
- if (!overlaySchema) return sourceSchema;
90
- const mergedSchema = merge(overlaySchema, sourceSchema, {
91
- arrayMerge: combineMerge,
91
+ if (!overlays || overlays.length < 1) return sourceSchema;
92
+ let mergedSchema = sourceSchema;
93
+ overlays.forEach((overlay) => {
94
+ const overlaySchema = overlaysMap[overlay] || {};
95
+ mergedSchema = merge(overlaySchema, mergedSchema, {
96
+ arrayMerge: combineMerge,
97
+ });
92
98
  });
93
99
  // console.log("mergedSchema", mergedSchema);
94
100
  return mergedSchema;
95
101
  };
96
102
 
97
- const getValidator = (schemaId, overlay = "baspiV4") => {
103
+ const getValidator = (schemaId, overlays) => {
98
104
  let validator = ajv.getSchema(schemaId);
99
105
  if (!validator) {
100
- const schema = getTransactionSchema(schemaId, overlay);
106
+ const schema = getTransactionSchema(schemaId, overlays);
101
107
  ajv.addSchema(schema, schemaId);
102
108
  validator = ajv.getSchema(schemaId);
103
109
  }
@@ -105,8 +111,8 @@ const getValidator = (schemaId, overlay = "baspiV4") => {
105
111
  };
106
112
 
107
113
  // common functions for v1 and v2
108
- const getSubschema = (path, schemaId, overlay) => {
109
- const sourceSchema = getTransactionSchema(schemaId, overlay);
114
+ const getSubschema = (path, schemaId, overlays) => {
115
+ const sourceSchema = getTransactionSchema(schemaId, overlays);
110
116
  const pathArray = path.split("/").slice(1);
111
117
  if (pathArray.length < 1) return sourceSchema;
112
118
  return pathArray.reduce((schema, pathElement) => {
@@ -128,19 +134,19 @@ const getSubschema = (path, schemaId, overlay) => {
128
134
  }, sourceSchema);
129
135
  };
130
136
 
131
- const isPathValid = (path, schemaId, overlay) => {
132
- const schema = getTransactionSchema(schemaId, overlay);
137
+ const isPathValid = (path, schemaId, overlays) => {
133
138
  try {
134
- return getSubschema(path, schemaId, overlay) !== undefined;
139
+ return getSubschema(path, schemaId, overlays) !== undefined;
135
140
  } catch (err) {
136
141
  return false;
137
142
  }
138
143
  };
139
144
 
140
- const getSubschemaValidator = (path, schemaId, overlay) => {
141
- const subSchema = getSubschema(path, schemaId, overlay);
142
- // see if we can retrieve the schema by path
143
- const cacheKey = `${path}-${schemaId}`;
145
+ const getSubschemaValidator = (path, schemaId, overlays = ["baspiV4"]) => {
146
+ const subSchema = getSubschema(path, schemaId, overlays);
147
+ const overlayKey = (overlays || []).join(".");
148
+ // see if we can retrieve the schema by path, schemaId and overlays
149
+ const cacheKey = `${path}-${schemaId}-${overlayKey}`;
144
150
  let validator = ajv.getSchema(cacheKey);
145
151
  // retrieve whole schema by $id if available
146
152
  if (!validator && subSchema.$id) validator = ajv.getSchema(cacheKey);
@@ -195,7 +201,7 @@ const getTitleAtPath = (schema, path, rootPath = path) => {
195
201
  }
196
202
  };
197
203
 
198
- const validateVerifiedClaims = (verifiedClaims) => {
204
+ const validateVerifiedClaims = (verifiedClaims, schemaId, overlays) => {
199
205
  const validatorVClaims = ajv.compile(verifiedClaimsSchema);
200
206
 
201
207
  const validationErrorsArr = [];
@@ -213,11 +219,10 @@ const validateVerifiedClaims = (verifiedClaims) => {
213
219
 
214
220
  verifiedClaimsArray.forEach((claim) => {
215
221
  const paths = Object.keys(claim.claims);
216
-
217
222
  for (const path of paths) {
218
- const validPath = isPathValid(path);
223
+ const validPath = isPathValid(path, schemaId, overlays);
219
224
  if (validPath) {
220
- const subValidator = getSubschemaValidator(path);
225
+ const subValidator = getSubschemaValidator(path, schemaId, overlays);
221
226
  const isValid = subValidator(claim.claims[path]);
222
227
  if (!isValid) {
223
228
  validationErrorsArr.push(...subValidator.errors);
@@ -245,4 +250,16 @@ module.exports = {
245
250
  getTitleAtPath,
246
251
  verifiedClaimsSchema,
247
252
  validateVerifiedClaims,
253
+ baspiOverlay,
254
+ ta6Overlay,
255
+ ta7Overlay,
256
+ ta10Overlay,
257
+ lpe1Overlay,
258
+ fme1Overlay,
259
+ llc1Overlay,
260
+ ntsOverlay,
261
+ con29ROverlay,
262
+ con29DWOverlay,
263
+ rdsOverlay,
264
+ oc1Overlay,
248
265
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdtf/schemas",
3
- "version": "2.0.0-3",
3
+ "version": "2.0.0-30",
4
4
  "description": "Property Data Trust Framework Schemas and Utilities",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -12,7 +12,21 @@
12
12
  "phone": "07777 222333",
13
13
  "email": "peter@theseller.com",
14
14
  "address": { "line1": "47 Park Road", "postcode": "AL3 5AF" },
15
- "role": "Seller"
15
+ "role": "Seller",
16
+ "externalIds": { "MoveReady": "123434" }
17
+ },
18
+ {
19
+ "role": "Seller's Conveyancer",
20
+ "name": { "firstName": "Johnny", "lastName": "Law" },
21
+ "address": {
22
+ "line1": "123 Sweet St",
23
+ "line2": "Test building",
24
+ "town": "London",
25
+ "postcode": "SW1A 1AA"
26
+ },
27
+ "email": "johnny@suemme.co.uk",
28
+ "organisation": "Suemme and Profitt",
29
+ "organisationReference": "123456"
16
30
  }
17
31
  ],
18
32
  "propertyPack": {
@@ -34,23 +48,37 @@
34
48
  "titleNumber": "HD221222",
35
49
  "ownershipType": "Leasehold",
36
50
  "leaseholdInformation": {
51
+ "typeOfLeasehold": {
52
+ "leaseholdType": "Shared ownership",
53
+ "sharedOwnershipPercentage": 50,
54
+ "sharedOwnershipRent": 200,
55
+ "sharedOwnershipRentFrequency": "Monthly"
56
+ },
57
+ "leaseTerm": {
58
+ "startYearOfLease": 1900,
59
+ "lengthOfLeaseInYears": 999
60
+ },
37
61
  "contactDetails": {
38
62
  "contacts": {
39
63
  "landlord": {
40
- "nameOrOrganisation": "Fleesum Properties",
41
- "address": {
42
- "line1": "47 Park Road",
43
- "postcode": "AL3 5AF"
44
- },
45
- "emailAddress": "james@fleesum.com"
64
+ "contact": {
65
+ "nameOrOrganisation": "Fleesum Properties",
66
+ "address": {
67
+ "line1": "47 Park Road",
68
+ "postcode": "AL3 5AF"
69
+ },
70
+ "emailAddress": "james@fleesum.com"
71
+ }
46
72
  },
47
73
  "managingAgent": {
48
- "nameOrOrganisation": "Pricee Living",
49
- "address": {
50
- "line1": "Pricee House",
51
- "postcode": "AL3 5KK"
52
- },
53
- "emailAddress": "marcel@pricee.co.uk"
74
+ "contact": {
75
+ "nameOrOrganisation": "Pricee Living",
76
+ "address": {
77
+ "line1": "Pricee House",
78
+ "postcode": "AL3 5KK"
79
+ },
80
+ "emailAddress": "marcel@pricee.co.uk"
81
+ }
54
82
  }
55
83
  }
56
84
  },
@@ -77,20 +105,6 @@
77
105
  "details": "There is sinking fund."
78
106
  }
79
107
  },
80
- "general": {
81
- "typeOfLeasehold": {
82
- "leaseholdType": "Shared ownership",
83
- "sharedOwnershipPercentage": 50,
84
- "sharedOwnershipRent": 200,
85
- "sharedOwnershipRentFrequency": "Monthly"
86
- },
87
- "leaseTerm": {
88
- "startYearOfLease": 1900,
89
- "lengthOfLeaseInYears": 999
90
- }
91
- },
92
-
93
- "largeAdditionalExpense": { "yesNo": "No" },
94
108
  "additionalFeesOnSale": 0
95
109
  }
96
110
  }
@@ -106,10 +120,14 @@
106
120
  },
107
121
  "listingAndConservation": {
108
122
  "isListed": {
109
- "yesNo": "No"
123
+ "yesNo": "Yes",
124
+ "details": "Grade II listed",
125
+ "attachments": "To follow"
110
126
  },
111
127
  "isConservationArea": {
112
- "yesNo": "No"
128
+ "yesNo": "Yes",
129
+ "details": "Harpenden Conservation Area",
130
+ "attachments": "To follow"
113
131
  },
114
132
  "hasTreePreservationOrder": {
115
133
  "yesNo": "No"
@@ -125,9 +143,15 @@
125
143
  }
126
144
  },
127
145
  "energyEfficiency": {
146
+ "certificateIsSupplied": "Attached",
128
147
  "certificate": {
129
148
  "certificateNumber": "12345",
130
149
  "currentEnergyRating": "A"
150
+ },
151
+ "greenDealLoan": {
152
+ "hasGreenDealLoan": {
153
+ "yesNo": "No"
154
+ }
131
155
  }
132
156
  },
133
157
  "councilTax": {
@@ -138,7 +162,12 @@
138
162
  },
139
163
  "disputesAndComplaints": {
140
164
  "hasDisputesAndComplaints": {
141
- "yesNo": "No"
165
+ "yesNo": "Yes",
166
+ "details": "Neighbour's very annoying"
167
+ },
168
+ "leadingToDisputesAndComplaints": {
169
+ "yesNo": "Yes",
170
+ "details": "Neighbour's dog barking"
142
171
  }
143
172
  },
144
173
  "alterationsAndChanges": {
@@ -148,8 +177,8 @@
148
177
  "attachments": "Attached"
149
178
  },
150
179
  "planningPermission": {
151
- "yesNo": "Yes",
152
- "attachments": "Attached"
180
+ "yesNo": "Not required",
181
+ "details": "Permitted development rights applied"
153
182
  },
154
183
  "listedBuildingConsent": {
155
184
  "yesNo": "Not required",
@@ -159,9 +188,6 @@
159
188
  "yesNo": "Not required",
160
189
  "details": "No restriction"
161
190
  },
162
- "unfinished": {
163
- "yesNo": "No"
164
- },
165
191
  "yesNo": "Yes",
166
192
  "details": "Bedroom and ensuite shower room extension 2005"
167
193
  },
@@ -185,9 +211,6 @@
185
211
  "yesNo": "Not required",
186
212
  "details": "No restriction"
187
213
  },
188
- "unfinished": {
189
- "yesNo": "No"
190
- },
191
214
  "yesNo": "Yes",
192
215
  "details": "New front door added 2016",
193
216
  "yearCompleted": 2016
@@ -209,13 +232,13 @@
209
232
  "yesNo": "No",
210
233
  "details": "Added as part of initial build and deeds"
211
234
  },
212
- "unfinished": {
213
- "yesNo": "No"
214
- },
215
235
  "yesNo": "Yes",
216
236
  "details": "Conservatory added during house build in 1990 and exterior quality door separates the conservatory from the kitchen/dining room",
217
237
  "yearCompleted": 1990
218
238
  },
239
+ "worksUnfinished": {
240
+ "yesNo": "No"
241
+ },
219
242
  "planningPermissionBreaches": {
220
243
  "yesNo": "No"
221
244
  },
@@ -240,7 +263,9 @@
240
263
  "yesNo": "No"
241
264
  },
242
265
  "partyWallAct": {
243
- "yesNo": "No"
266
+ "yesNo": "Yes",
267
+ "details": "Party wall agreement in place",
268
+ "attachments": "Attached"
244
269
  },
245
270
  "otherNotices": {
246
271
  "yesNo": "No"
@@ -272,53 +297,48 @@
272
297
  }
273
298
  },
274
299
  "waterAndDrainage": {
275
- "mainsWater": {
276
- "maintenanceAgreements": {
277
- "yesNo": "No"
278
- },
279
- "yesNo": "To be connected",
280
- "dateToBeConnected": "2022-12-15",
281
- "supplier": "Northumbria Water"
300
+ "water": {
301
+ "mainsWater": {
302
+ "yesNo": "To be connected",
303
+ "dateToBeConnected": "2022-12-15",
304
+ "supplier": "Northumbria Water"
305
+ }
282
306
  },
283
- "mainsSurfaceWaterDrainage": {
284
- "maintenanceAgreements": {
285
- "yesNo": "No"
307
+ "drainage": {
308
+ "mainsSurfaceWaterDrainage": {
309
+ "yesNo": "Yes"
286
310
  },
287
- "yesNo": "Yes"
288
- },
289
- "mainsFoulDrainage": {
290
- "yesNo": "No",
291
- "sustainableDrainageSystem": { "yesNo": "No" },
292
- "septicTank": {
293
- "yesNo": "Yes",
294
- "details": "Last emptied on 1 Jan 2022",
295
- "dateReplaced": "2022-01-01",
296
- "dateLastEmptied": "2022-01-01"
297
- },
298
- "cesspit": { "yesNo": "No" },
299
- "sewerageTreatmentPlant": { "yesNo": "No" },
300
- "otherConnectedProperties": { "yesNo": "No" },
301
- "yearSystemInstalled": 1980,
302
- "plantOnOtherLand": { "yesNo": "No" },
303
- "plantRegistered": { "yesNo": "No" },
304
- "plantDrainsIntoWaterway": {
305
- "yesNo": "Yes",
306
- "dischargeCompliesWithGBR": "Yes"
311
+ "mainsFoulDrainage": {
312
+ "yesNo": "No",
313
+ "sustainableDrainageSystem": { "yesNo": "No" },
314
+ "septicTank": {
315
+ "yesNo": "Yes",
316
+ "details": "Last emptied on 1 Jan 2022",
317
+ "dateReplaced": "2022-01-01",
318
+ "dateLastEmptied": "2022-01-01"
319
+ },
320
+ "cesspit": { "yesNo": "No" },
321
+ "sewerageTreatmentPlant": { "yesNo": "No" },
322
+ "otherConnectedProperties": { "yesNo": "No" },
323
+ "yearSystemInstalled": 1980,
324
+ "plantOnOtherLand": { "yesNo": "No" },
325
+ "plantRegistered": { "yesNo": "No" },
326
+ "plantDrainsIntoWaterway": {
327
+ "yesNo": "Yes",
328
+ "dischargeCompliesWithGBR": "Yes"
329
+ }
307
330
  }
331
+ },
332
+ "maintenanceAgreements": {
333
+ "yesNo": "No"
308
334
  }
309
335
  },
310
- "utilities": {
311
- "electricity": {
312
- "maintenanceAgreements": {
313
- "yesNo": "No"
314
- },
336
+ "connectedUtilities": {
337
+ "mainsElectricity": {
315
338
  "yesNo": "Yes",
316
339
  "supplier": "Octopus Energy"
317
340
  },
318
- "gas": {
319
- "maintenanceAgreements": {
320
- "yesNo": "No"
321
- },
341
+ "mainsGas": {
322
342
  "yesNo": "Yes",
323
343
  "supplier": "Octopus Energy"
324
344
  },
@@ -329,23 +349,14 @@
329
349
  "yesNo": "No"
330
350
  },
331
351
  "telephone": {
332
- "maintenanceAgreements": {
333
- "yesNo": "No"
334
- },
335
352
  "yesNo": "Yes",
336
353
  "supplier": "EE"
337
354
  },
338
355
  "cableSatelliteTV": {
339
- "maintenanceAgreements": {
340
- "yesNo": "No"
341
- },
342
356
  "yesNo": "Yes",
343
357
  "supplier": "Sky"
344
358
  },
345
359
  "broadband": {
346
- "maintenanceAgreements": {
347
- "yesNo": "No"
348
- },
349
360
  "yesNo": "Yes",
350
361
  "supplier": "EE"
351
362
  },
@@ -354,10 +365,8 @@
354
365
  },
355
366
  "otherServices": {
356
367
  "yesNo": "No"
357
- }
358
- },
359
- "greenDealLoan": {
360
- "hasGreenDealLoan": {
368
+ },
369
+ "maintenanceAgreements": {
361
370
  "yesNo": "No"
362
371
  }
363
372
  },
@@ -372,15 +381,25 @@
372
381
  "heatingInGoodWorkingOrder": {
373
382
  "yesNo": "Yes"
374
383
  },
375
- "centralHeatingFuel": { "centralHeatingFuelType": "Gas" },
384
+ "centralHeatingFuel": {
385
+ "centralHeatingFuelType": "Other",
386
+ "otherCentralHeatingFuelType": "Ground-source Heat Pump"
387
+ },
376
388
  "centralHeatingInstalled": "2016-04-20",
377
- "heatingLastServiced": "2021-03-26"
389
+ "heatingLastServicedDate": "2021-03-26",
390
+ "heatingLastServicedReport": "To follow"
378
391
  }
379
392
  },
380
393
  "insurance": {
381
394
  "isInsured": "Yes",
382
395
  "difficultiesObtainingInsurance": {
383
- "yesNo": "No"
396
+ "abnormalRiseInPremiums": {
397
+ "yesNo": "Yes",
398
+ "details": "Very history"
399
+ },
400
+ "subjectToHighExcesses": { "yesNo": "No" },
401
+ "subjectToUnusualConditions": { "yesNo": "No" },
402
+ "refused": { "yesNo": "Yes", "details": "Much refuse" }
384
403
  },
385
404
  "insuranceClaims": {
386
405
  "yesNo": "No"
@@ -414,7 +433,10 @@
414
433
  "publicRightOfWay": {
415
434
  "yesNo": "No"
416
435
  },
417
- "rightsOfLightOrSupport": {
436
+ "rightsOfLight": {
437
+ "yesNo": "No"
438
+ },
439
+ "rightsOfSupport": {
418
440
  "yesNo": "No"
419
441
  },
420
442
  "rightsCreatedThroughCustom": {
@@ -426,6 +448,10 @@
426
448
  "churchChancel": {
427
449
  "yesNo": "No"
428
450
  },
451
+ "rightsToTakeFromLand": {
452
+ "yesNo": "Yes",
453
+ "details": "Annual gold mining festival"
454
+ },
429
455
  "otherRights": {
430
456
  "yesNo": "No"
431
457
  }
@@ -437,21 +463,11 @@
437
463
  "hasBeenFlooded": "Yes",
438
464
  "details": "Minor basement flood",
439
465
  "typeOfFlooding": {
440
- "groundWater": {
441
- "yesNo": "No"
442
- },
443
- "sewer": {
444
- "yesNo": "Yes"
445
- },
446
- "surfaceWater": {
447
- "yesNo": "No"
448
- },
449
- "coastal": {
450
- "yesNo": "No"
451
- },
452
- "river": {
453
- "yesNo": "No"
454
- },
466
+ "groundWater": "No",
467
+ "sewer": "Yes",
468
+ "surfaceWater": "No",
469
+ "coastal": "No",
470
+ "river": "No",
455
471
  "other": {
456
472
  "yesNo": "No"
457
473
  }
@@ -485,6 +501,9 @@
485
501
  },
486
502
  "otherMaterialIssue": {
487
503
  "yesNo": "No"
504
+ },
505
+ "otherCharges": {
506
+ "yesNo": "No"
488
507
  }
489
508
  },
490
509
  "consumerProtectionRegulationsDeclaration": {
@@ -511,14 +530,19 @@
511
530
  "legalBoundaries": {
512
531
  "ownership": {
513
532
  "areBoundariesUniform": "Yes",
514
- "left": "Seller",
515
- "right": "Seller",
516
- "rear": "Next-door neighbour",
517
- "front": "Next-door neighbour"
533
+ "uniformBoundaries": {
534
+ "left": "Neighbour",
535
+ "right": "Seller",
536
+ "rear": "Neighbour",
537
+ "front": "Not known"
538
+ }
518
539
  },
519
- "haveBoundaryFeaturesMoved": { "yesNo": "No" },
520
- "adjacentLandIncluded": { "yesNo": "No" },
521
- "flyingFreehold": { "yesNo": "No" }
540
+ "haveBoundaryFeaturesMoved": {
541
+ "yesNo": "Yes",
542
+ "details": "Moved a bit to the lefts"
543
+ },
544
+ "adjacentLandIncluded": { "yesNo": "Yes", "details": "Some movements" },
545
+ "flyingFreehold": { "yesNo": "Yes", "details": "Some flying stuff" }
522
546
  },
523
547
  "servicesCrossing": {
524
548
  "pipesWiresCablesDrainsToProperty": { "yesNo": "No" },
@@ -528,10 +552,15 @@
528
552
  "energyAndMeters": {
529
553
  "testedByQualifiedElectrician": {
530
554
  "yesNo": "Yes",
531
- "details": "2015",
555
+ "yearTested": 2015,
556
+ "attachments": "To follow"
557
+ },
558
+ "electricalWorkSince2005": {
559
+ "yesNo": "Yes",
560
+ "yearWorkCarriedOut": 2016,
561
+ "details": "New fuse box",
532
562
  "attachments": "To follow"
533
563
  },
534
- "electricalWorkSince2005": { "yesNo": "No" },
535
564
  "solarPanels": { "hasSolarPanels": "No" }
536
565
  },
537
566
  "smartHomeSystems": { "hasSmartHomeSystems": "No" },
@@ -552,19 +581,25 @@
552
581
  }
553
582
  },
554
583
  "completionAndMoving": {
555
- "willRemoveAllRubbish": true,
584
+ "sellerWillEnsure": {
585
+ "removeRubbish": true,
586
+ "replaceLightFittings": true,
587
+ "takeReasonableCare": true,
588
+ "leaveKeys": true
589
+ },
556
590
  "otherPropertyInChain": { "yesNo": "No" },
557
- "moveRestrictionDates": { "yesNo": "No" },
558
- "digitalPropertyLogbook": { "yesNo": "No" }
591
+ "moveRestrictionDates": {
592
+ "yesNo": "Yes",
593
+ "details": "On holiday 1-15 Aug 23"
594
+ },
595
+ "digitalPropertyLogbook": { "yesNo": "No" },
596
+ "sufficientToRepayAllMortgages": { "yesNo": "Yes" }
559
597
  },
560
598
  "confirmationOfAccuracyByOwners": {
561
599
  "confirmWillProvideAdditionalDocumentation": true,
562
600
  "confirmInformationIsAccurate": true
563
601
  }
564
602
  },
565
- "energyPerformanceCertificate": {
566
- "certificate": { "currentEnergyRating": "B" }
567
- },
568
603
  "titlesToBeSold": [
569
604
  {
570
605
  "titleNumber": "HD221222",