@pdtf/schemas 3.6.0-3 → 3.6.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.
Files changed (37) hide show
  1. package/.claude/settings.local.json +22 -3
  2. package/docs/sef25-extensions-ui-spec.md +146 -0
  3. package/index.js +121 -66
  4. package/package.json +4 -2
  5. package/src/schemas/v3/combined.json +7021 -1316
  6. package/src/schemas/v3/compactSkeleton.txt +353 -11
  7. package/src/schemas/v3/overlays/baspi4.json +163 -18
  8. package/src/schemas/v3/overlays/baspi5.json +168 -20
  9. package/src/schemas/v3/overlays/extensions/dr.json +5 -7
  10. package/src/schemas/v3/overlays/extensions/jk.json +24 -6
  11. package/src/schemas/v3/overlays/extensions/pc.json +36 -0
  12. package/src/schemas/v3/overlays/extensions/ph.json +197 -0
  13. package/src/schemas/v3/overlays/extensions/sc.json +83 -0
  14. package/src/schemas/v3/overlays/fme1.json +16 -14
  15. package/src/schemas/v3/overlays/lpe1.json +60 -30
  16. package/src/schemas/v3/overlays/nts.json +68 -1
  17. package/src/schemas/v3/overlays/nts2.json +68 -4
  18. package/src/schemas/v3/overlays/ntsl.json +68 -1
  19. package/src/schemas/v3/overlays/ntsl2.json +68 -4
  20. package/src/schemas/v3/overlays/piq.json +38 -1
  21. package/src/schemas/v3/overlays/rds.json +118 -6
  22. package/src/schemas/v3/overlays/ta6.json +46 -16
  23. package/src/schemas/v3/overlays/ta6ed6.json +6479 -0
  24. package/src/schemas/v3/overlays/ta7.json +70 -6
  25. package/src/schemas/v3/overlays/ta7ed5.json +1539 -0
  26. package/src/schemas/v3/pdtf-transaction.json +4114 -621
  27. package/src/schemas/v3/skeleton.json +491 -34
  28. package/src/tests/v3/buyerCircumstances.test.js +543 -0
  29. package/src/tests/v3/extensionOverlays.test.js +436 -0
  30. package/src/tests/v3/offers.test.js +37 -40
  31. package/src/tests/v3/patternProperties.test.js +149 -30
  32. package/src/tests/v3/ta6ed6.test.js +2364 -0
  33. package/src/tests/v3/ta7ed5.test.js +567 -0
  34. package/src/tests/v3/transactionSchema.test.js +31 -0
  35. package/src/utils/extractExtensionOverlays.js +104 -31
  36. package/src/utils/extractOverlay.js +87 -23
  37. package/src/utils/pathSkeleton.js +1 -1
@@ -292,6 +292,29 @@
292
292
  },
293
293
  "electricVehicleChargingPoint": {
294
294
  "ntslRef": "B4.4",
295
+ "discriminator": {
296
+ "propertyName": "yesNo"
297
+ },
298
+ "oneOf": [
299
+ {
300
+ "properties": {
301
+ "yesNo": {
302
+ "enum": [
303
+ "No"
304
+ ]
305
+ }
306
+ }
307
+ },
308
+ {
309
+ "properties": {
310
+ "yesNo": {
311
+ "enum": [
312
+ "Yes"
313
+ ]
314
+ }
315
+ }
316
+ }
317
+ ],
295
318
  "required": [
296
319
  "yesNo"
297
320
  ],
@@ -1374,7 +1397,25 @@
1374
1397
  }
1375
1398
  },
1376
1399
  "otherHeatingFeatures": {
1377
- "ntslRef": "B3.4.2"
1400
+ "ntslRef": "B3.4.2",
1401
+ "items": {
1402
+ "enum": [
1403
+ "None",
1404
+ "Air conditioning",
1405
+ "Double glazing",
1406
+ "Triple glazing",
1407
+ "Night storage",
1408
+ "Solar water",
1409
+ "Underfloor heating",
1410
+ "Wood burner",
1411
+ "Aga/Rayburn",
1412
+ "Open fire",
1413
+ "Ground source heat pump",
1414
+ "Air source heat pump",
1415
+ "Solar thermal",
1416
+ "Passive House design"
1417
+ ]
1418
+ }
1378
1419
  }
1379
1420
  }
1380
1421
  },
@@ -1406,6 +1447,32 @@
1406
1447
  },
1407
1448
  "broadband": {
1408
1449
  "ntslRef": "B3.5",
1450
+ "discriminator": {
1451
+ "propertyName": "typeOfConnection"
1452
+ },
1453
+ "oneOf": [
1454
+ {
1455
+ "properties": {
1456
+ "typeOfConnection": {
1457
+ "enum": [
1458
+ "None"
1459
+ ]
1460
+ }
1461
+ }
1462
+ },
1463
+ {
1464
+ "properties": {
1465
+ "typeOfConnection": {
1466
+ "enum": [
1467
+ "ADSL copper wire",
1468
+ "Cable",
1469
+ "FTTC (Fibre to the Cabinet)",
1470
+ "FTTP (Fibre to the Premises)"
1471
+ ]
1472
+ }
1473
+ }
1474
+ }
1475
+ ],
1409
1476
  "required": [
1410
1477
  "typeOfConnection"
1411
1478
  ],
@@ -313,6 +313,29 @@
313
313
  },
314
314
  "electricVehicleChargingPoint": {
315
315
  "ntsl2Ref": "B4.4",
316
+ "discriminator": {
317
+ "propertyName": "yesNo"
318
+ },
319
+ "oneOf": [
320
+ {
321
+ "properties": {
322
+ "yesNo": {
323
+ "enum": [
324
+ "No"
325
+ ]
326
+ }
327
+ }
328
+ },
329
+ {
330
+ "properties": {
331
+ "yesNo": {
332
+ "enum": [
333
+ "Yes"
334
+ ]
335
+ }
336
+ }
337
+ }
338
+ ],
316
339
  "required": [
317
340
  "yesNo"
318
341
  ],
@@ -897,9 +920,6 @@
897
920
  },
898
921
  "details": {
899
922
  "ntsl2Ref": "A5.1.2"
900
- },
901
- "attachments": {
902
- "ntsl2Ref": "A5.1.3"
903
923
  }
904
924
  },
905
925
  "required": [
@@ -1740,7 +1760,25 @@
1740
1760
  }
1741
1761
  },
1742
1762
  "otherHeatingFeatures": {
1743
- "ntsl2Ref": "B3.4.2"
1763
+ "ntsl2Ref": "B3.4.2",
1764
+ "items": {
1765
+ "enum": [
1766
+ "None",
1767
+ "Air conditioning",
1768
+ "Double glazing",
1769
+ "Triple glazing",
1770
+ "Night storage",
1771
+ "Solar water",
1772
+ "Underfloor heating",
1773
+ "Wood burner",
1774
+ "Aga/Rayburn",
1775
+ "Open fire",
1776
+ "Ground source heat pump",
1777
+ "Air source heat pump",
1778
+ "Solar thermal",
1779
+ "Passive House design"
1780
+ ]
1781
+ }
1744
1782
  }
1745
1783
  }
1746
1784
  },
@@ -1772,6 +1810,32 @@
1772
1810
  },
1773
1811
  "broadband": {
1774
1812
  "ntsl2Ref": "B3.5",
1813
+ "discriminator": {
1814
+ "propertyName": "typeOfConnection"
1815
+ },
1816
+ "oneOf": [
1817
+ {
1818
+ "properties": {
1819
+ "typeOfConnection": {
1820
+ "enum": [
1821
+ "None"
1822
+ ]
1823
+ }
1824
+ }
1825
+ },
1826
+ {
1827
+ "properties": {
1828
+ "typeOfConnection": {
1829
+ "enum": [
1830
+ "ADSL copper wire",
1831
+ "Cable",
1832
+ "FTTC (Fibre to the Cabinet)",
1833
+ "FTTP (Fibre to the Premises)"
1834
+ ]
1835
+ }
1836
+ }
1837
+ }
1838
+ ],
1775
1839
  "required": [
1776
1840
  "typeOfConnection"
1777
1841
  ],
@@ -13,9 +13,9 @@
13
13
  "properties": {
14
14
  "role": {
15
15
  "enum": [
16
- "Seller's Conveyancer",
17
16
  "Prospective Buyer",
18
17
  "Buyer's Conveyancer",
18
+ "Seller's Conveyancer",
19
19
  "Estate Agent",
20
20
  "Buyer's Agent",
21
21
  "Surveyor",
@@ -65,11 +65,22 @@
65
65
  "enum": [
66
66
  "Personal Representative for a Deceased Owner",
67
67
  "Under Power of Attorney",
68
+ "Trustee",
68
69
  "Assistant",
69
70
  "Other"
70
71
  ]
71
72
  }
72
73
  }
74
+ },
75
+ {
76
+ "properties": {
77
+ "capacity": {
78
+ "enum": [
79
+ "Company Director",
80
+ "Company Secretary"
81
+ ]
82
+ }
83
+ }
73
84
  }
74
85
  ]
75
86
  }
@@ -1743,6 +1754,32 @@
1743
1754
  },
1744
1755
  "broadband": {
1745
1756
  "piqRef": "A7.1.15",
1757
+ "discriminator": {
1758
+ "propertyName": "typeOfConnection"
1759
+ },
1760
+ "oneOf": [
1761
+ {
1762
+ "properties": {
1763
+ "typeOfConnection": {
1764
+ "enum": [
1765
+ "None"
1766
+ ]
1767
+ }
1768
+ }
1769
+ },
1770
+ {
1771
+ "properties": {
1772
+ "typeOfConnection": {
1773
+ "enum": [
1774
+ "ADSL copper wire",
1775
+ "Cable",
1776
+ "FTTC (Fibre to the Cabinet)",
1777
+ "FTTP (Fibre to the Premises)"
1778
+ ]
1779
+ }
1780
+ }
1781
+ }
1782
+ ],
1746
1783
  "properties": {
1747
1784
  "typeOfConnection": {
1748
1785
  "piqRef": "A7.1.16"
@@ -34,6 +34,7 @@
34
34
  "enum": [
35
35
  "Personal Representative for a Deceased Owner",
36
36
  "Under Power of Attorney",
37
+ "Trustee",
37
38
  "Assistant",
38
39
  "Other"
39
40
  ]
@@ -42,6 +43,19 @@
42
43
  "rdsRef": "Participants/OtherDocumentation"
43
44
  }
44
45
  }
46
+ },
47
+ {
48
+ "properties": {
49
+ "capacity": {
50
+ "enum": [
51
+ "Company Director",
52
+ "Company Secretary"
53
+ ]
54
+ },
55
+ "sellersCapacityDetails": {
56
+ "rdsRef": "Participants/OtherDocumentation"
57
+ }
58
+ }
45
59
  }
46
60
  ]
47
61
  }
@@ -1476,14 +1490,60 @@
1476
1490
  }
1477
1491
  ]
1478
1492
  },
1479
- "isConnectedToNationalGrid": {
1480
- "rdsRef": "Objects/isExternallyConnected=yes|no|true|false,Connection,Objects/ExternalConnection"
1481
- },
1482
1493
  "photovoltaicMeterPanelLocation": {
1483
1494
  "rdsRef": "Objects/class='meters|valve|stopcock'&access=?&accessLocation=?"
1484
1495
  },
1485
- "photovoltaicBatteriesLocation": {
1486
- "rdsRef": "Objects/class='meters|valve|stopcock'&access=?&accessLocation=?"
1496
+ "photovoltaicBatteries": {
1497
+ "rdsRef": "Objects/class='meters|valve|stopcock'&access=?&accessLocation=?",
1498
+ "discriminator": {
1499
+ "propertyName": "yesNo"
1500
+ },
1501
+ "oneOf": [
1502
+ {
1503
+ "properties": {
1504
+ "yesNo": {
1505
+ "enum": [
1506
+ "No"
1507
+ ]
1508
+ }
1509
+ }
1510
+ },
1511
+ {
1512
+ "properties": {
1513
+ "yesNo": {
1514
+ "enum": [
1515
+ "Yes"
1516
+ ]
1517
+ }
1518
+ }
1519
+ }
1520
+ ]
1521
+ },
1522
+ "nationalGrid": {
1523
+ "rdsRef": "Objects/isExternallyConnected=yes|no|true|false,Connection,Objects/ExternalConnection",
1524
+ "discriminator": {
1525
+ "propertyName": "yesNo"
1526
+ },
1527
+ "oneOf": [
1528
+ {
1529
+ "properties": {
1530
+ "yesNo": {
1531
+ "enum": [
1532
+ "No"
1533
+ ]
1534
+ }
1535
+ }
1536
+ },
1537
+ {
1538
+ "properties": {
1539
+ "yesNo": {
1540
+ "enum": [
1541
+ "Yes"
1542
+ ]
1543
+ }
1544
+ }
1545
+ }
1546
+ ]
1487
1547
  }
1488
1548
  }
1489
1549
  }
@@ -1983,7 +2043,33 @@
1983
2043
  ]
1984
2044
  },
1985
2045
  "broadband": {
1986
- "rdsRef": "Services/Internet"
2046
+ "rdsRef": "Services/Internet",
2047
+ "discriminator": {
2048
+ "propertyName": "typeOfConnection"
2049
+ },
2050
+ "oneOf": [
2051
+ {
2052
+ "properties": {
2053
+ "typeOfConnection": {
2054
+ "enum": [
2055
+ "None"
2056
+ ]
2057
+ }
2058
+ }
2059
+ },
2060
+ {
2061
+ "properties": {
2062
+ "typeOfConnection": {
2063
+ "enum": [
2064
+ "ADSL copper wire",
2065
+ "Cable",
2066
+ "FTTC (Fibre to the Cabinet)",
2067
+ "FTTP (Fibre to the Premises)"
2068
+ ]
2069
+ }
2070
+ }
2071
+ }
2072
+ ]
1987
2073
  }
1988
2074
  }
1989
2075
  },
@@ -3301,6 +3387,32 @@
3301
3387
  }
3302
3388
  ]
3303
3389
  },
3390
+ "insulation": {
3391
+ "rdsRef": "Certificates",
3392
+ "discriminator": {
3393
+ "propertyName": "yesNo"
3394
+ },
3395
+ "oneOf": [
3396
+ {
3397
+ "properties": {
3398
+ "yesNo": {
3399
+ "enum": [
3400
+ "No"
3401
+ ]
3402
+ }
3403
+ }
3404
+ },
3405
+ {
3406
+ "properties": {
3407
+ "yesNo": {
3408
+ "enum": [
3409
+ "Yes"
3410
+ ]
3411
+ }
3412
+ }
3413
+ }
3414
+ ]
3415
+ },
3304
3416
  "solarPanels": {
3305
3417
  "rdsRef": "Certificates",
3306
3418
  "discriminator": {
@@ -1405,6 +1405,7 @@
1405
1405
  }
1406
1406
  },
1407
1407
  "specialistIssues": {
1408
+ "ta6Ref": "7.8",
1408
1409
  "required": [
1409
1410
  "japaneseKnotweed"
1410
1411
  ],
@@ -1434,24 +1435,33 @@
1434
1435
  },
1435
1436
  "managementPlanInPlace": {
1436
1437
  "ta6Ref": "7.8.2"
1437
- },
1438
- "attachments": {
1439
- "ta6Ref": "7.8.3"
1440
1438
  }
1441
1439
  },
1442
1440
  "required": [
1443
- "managementPlanInPlace",
1444
- "attachments"
1441
+ "managementPlanInPlace"
1442
+ ],
1443
+ "oneOf": [
1444
+ null,
1445
+ {
1446
+ "required": [
1447
+ "attachments"
1448
+ ],
1449
+ "properties": {
1450
+ "attachments": {
1451
+ "ta6Ref": "7.8.3"
1452
+ }
1453
+ }
1454
+ }
1445
1455
  ]
1446
1456
  }
1447
1457
  ],
1448
1458
  "required": [
1449
1459
  "yesNo"
1450
1460
  ],
1451
- "title": "Is the property affected by Japanese knotweed?",
1452
1461
  "properties": {
1453
1462
  "yesNo": {
1454
- "ta6Ref": "7.8.1"
1463
+ "ta6Ref": "7.8.1",
1464
+ "title": "Is the property affected by Japanese knotweed?"
1455
1465
  }
1456
1466
  }
1457
1467
  }
@@ -2052,7 +2062,10 @@
2052
2062
  }
2053
2063
  }
2054
2064
  }
2055
- }
2065
+ },
2066
+ "required": [
2067
+ "offMainsDrainageSystem"
2068
+ ]
2056
2069
  }
2057
2070
  ],
2058
2071
  "required": [
@@ -2270,7 +2283,11 @@
2270
2283
  ],
2271
2284
  "properties": {
2272
2285
  "yesNo": {
2273
- "ta6Ref": "12.3c1"
2286
+ "ta6Ref": "12.3c1",
2287
+ "enum": [
2288
+ "Yes",
2289
+ "No"
2290
+ ]
2274
2291
  }
2275
2292
  }
2276
2293
  }
@@ -3234,7 +3251,8 @@
3234
3251
  "properties": {
3235
3252
  "yesNo": {
3236
3253
  "enum": [
3237
- "No"
3254
+ "No",
3255
+ "Not known"
3238
3256
  ]
3239
3257
  }
3240
3258
  }
@@ -3264,7 +3282,11 @@
3264
3282
  ],
3265
3283
  "properties": {
3266
3284
  "yesNo": {
3267
- "ta6Ref": "7.4.1"
3285
+ "ta6Ref": "7.4.1",
3286
+ "enum": [
3287
+ "Yes",
3288
+ "No"
3289
+ ]
3268
3290
  }
3269
3291
  }
3270
3292
  },
@@ -3451,7 +3473,7 @@
3451
3473
  "required": [
3452
3474
  "yesNo"
3453
3475
  ],
3454
- "title": "Is the seller aware of any boundary feature having been moved in the last 10 years or during the sellers period of ownership if longer?",
3476
+ "title": "Is the seller aware of any boundary feature having been moved in the last 10 years or during the seller's period of ownership if longer?",
3455
3477
  "properties": {
3456
3478
  "yesNo": {
3457
3479
  "ta6Ref": "1.3.1"
@@ -3493,7 +3515,7 @@
3493
3515
  "required": [
3494
3516
  "yesNo"
3495
3517
  ],
3496
- "title": "During the sellers ownership, has any adjacent land or property been purchased by the seller?",
3518
+ "title": "During the seller's ownership, has any adjacent land or property been purchased by the seller?",
3497
3519
  "properties": {
3498
3520
  "yesNo": {
3499
3521
  "ta6Ref": "1.4.1"
@@ -3587,7 +3609,7 @@
3587
3609
  "required": [
3588
3610
  "yesNo"
3589
3611
  ],
3590
- "title": "Do any drains, pipes or wires serving the property cross any neighbours property?",
3612
+ "title": "Do any drains, pipes or wires serving the property cross any neighbour's property?",
3591
3613
  "properties": {
3592
3614
  "yesNo": {
3593
3615
  "ta6Ref": "8.7.1"
@@ -3715,7 +3737,11 @@
3715
3737
  "ta6Ref": "12.1.2"
3716
3738
  },
3717
3739
  "attachments": {
3718
- "ta6Ref": "12.1.3"
3740
+ "ta6Ref": "12.1.3",
3741
+ "enum": [
3742
+ "Attached",
3743
+ "To follow"
3744
+ ]
3719
3745
  }
3720
3746
  },
3721
3747
  "required": [
@@ -3767,7 +3793,11 @@
3767
3793
  "ta6Ref": "12.2.2a.1"
3768
3794
  },
3769
3795
  "attachments": {
3770
- "ta6Ref": "12.2.2a.2"
3796
+ "ta6Ref": "12.2.2a.2",
3797
+ "enum": [
3798
+ "Attached",
3799
+ "To follow"
3800
+ ]
3771
3801
  }
3772
3802
  }
3773
3803
  }