@pdtf/schemas 3.6.0-37 → 3.6.0-39
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/README.md +1 -1
- package/package.json +1 -1
- package/src/schemas/v3/combined.json +79 -22
- package/src/schemas/v3/compactSkeleton.txt +3 -3
- package/src/schemas/v3/overlays/extensions/lc.json +17 -5
- package/src/schemas/v3/overlays/extensions/mi.json +14 -0
- package/src/schemas/v3/overlays/extensions/sc.json +34 -10
- package/src/schemas/v3/overlays/extensions/wg.json +51 -0
- package/src/schemas/v3/overlays/sef25.json +92 -24
- package/src/schemas/v3/pdtf-transaction.json +87 -15
- package/src/schemas/v3/skeleton.json +6 -6
- package/src/tests/v3/extensionOverlays.test.js +81 -3
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ The Property Data Trust Framework (PDTF) Schemas provide standardized JSON Schem
|
|
|
7
7
|
|
|
8
8
|
## Project Goals & Status
|
|
9
9
|
|
|
10
|
-
**Current Version:** 3.5.0 (3.6.0-
|
|
10
|
+
**Current Version:** 3.5.0 (3.6.0-38 available as a pre-release on branch/package-tag `next`)
|
|
11
11
|
|
|
12
12
|
This schema framework aims to support the [Home Buying and Selling Group](https://homebuyingandsellinggroup.co.uk) 'Property Pack' initiative, encompassing all requirements starting with the Buyers and Sellers Property Information set ([BASPI v4.0](https://homebuyingandsellinggroup.co.uk/baspi/)).
|
|
13
13
|
|
package/package.json
CHANGED
|
@@ -21601,20 +21601,33 @@
|
|
|
21601
21601
|
"sef25Ref": "S1.1",
|
|
21602
21602
|
"title": "Associated costs of leased solar panels",
|
|
21603
21603
|
"type": "object",
|
|
21604
|
-
"sef25Required": ["
|
|
21604
|
+
"sef25Required": ["frequency"],
|
|
21605
21605
|
"properties": {
|
|
21606
|
-
"amount": {
|
|
21607
|
-
"sef25Ref": "S1.1.1",
|
|
21608
|
-
"title": "Associated costs of leased solar panels if any (£)",
|
|
21609
|
-
"type": "number"
|
|
21610
|
-
},
|
|
21611
21606
|
"frequency": {
|
|
21612
21607
|
"sef25Ref": "S1.1.2",
|
|
21613
21608
|
"title": "Payment frequency if costs are associated",
|
|
21614
21609
|
"type": "string",
|
|
21615
21610
|
"enum": ["Per month", "Per year", "Not applicable"]
|
|
21616
21611
|
}
|
|
21617
|
-
}
|
|
21612
|
+
},
|
|
21613
|
+
"oneOf": [
|
|
21614
|
+
{
|
|
21615
|
+
"properties": {
|
|
21616
|
+
"frequency": { "enum": ["Not applicable"] }
|
|
21617
|
+
}
|
|
21618
|
+
},
|
|
21619
|
+
{
|
|
21620
|
+
"properties": {
|
|
21621
|
+
"frequency": { "enum": ["Per month", "Per year"] },
|
|
21622
|
+
"amount": {
|
|
21623
|
+
"sef25Ref": "S1.1.1",
|
|
21624
|
+
"title": "Associated costs of leased solar panels if any (£)",
|
|
21625
|
+
"type": "number"
|
|
21626
|
+
}
|
|
21627
|
+
},
|
|
21628
|
+
"required": ["amount"]
|
|
21629
|
+
}
|
|
21630
|
+
]
|
|
21618
21631
|
}
|
|
21619
21632
|
},
|
|
21620
21633
|
"baspi4Required": ["details", "attachments"],
|
|
@@ -22413,20 +22426,33 @@
|
|
|
22413
22426
|
"sef25Ref": "U1.1",
|
|
22414
22427
|
"title": "Please provide the associated costs for water supply",
|
|
22415
22428
|
"type": "object",
|
|
22416
|
-
"sef25Required": ["
|
|
22429
|
+
"sef25Required": ["frequency"],
|
|
22417
22430
|
"properties": {
|
|
22418
|
-
"amount": {
|
|
22419
|
-
"sef25Ref": "U1.1.1",
|
|
22420
|
-
"title": "Associated costs of supply if any (£)",
|
|
22421
|
-
"type": "number"
|
|
22422
|
-
},
|
|
22423
22431
|
"frequency": {
|
|
22424
22432
|
"sef25Ref": "U1.1.2",
|
|
22425
22433
|
"title": "Payment frequency if costs are associated",
|
|
22426
22434
|
"type": "string",
|
|
22427
22435
|
"enum": ["Per month", "Per year", "Not applicable"]
|
|
22428
22436
|
}
|
|
22429
|
-
}
|
|
22437
|
+
},
|
|
22438
|
+
"oneOf": [
|
|
22439
|
+
{
|
|
22440
|
+
"properties": {
|
|
22441
|
+
"frequency": { "enum": ["Not applicable"] }
|
|
22442
|
+
}
|
|
22443
|
+
},
|
|
22444
|
+
{
|
|
22445
|
+
"properties": {
|
|
22446
|
+
"frequency": { "enum": ["Per month", "Per year"] },
|
|
22447
|
+
"amount": {
|
|
22448
|
+
"sef25Ref": "U1.1.1",
|
|
22449
|
+
"title": "Associated costs of supply if any (£)",
|
|
22450
|
+
"type": "number"
|
|
22451
|
+
}
|
|
22452
|
+
},
|
|
22453
|
+
"required": ["amount"]
|
|
22454
|
+
}
|
|
22455
|
+
]
|
|
22430
22456
|
}
|
|
22431
22457
|
},
|
|
22432
22458
|
"ntsRequired": ["details"],
|
|
@@ -23522,20 +23548,33 @@
|
|
|
23522
23548
|
"sef25Ref": "U1.2",
|
|
23523
23549
|
"title": "Associated costs for sewerage",
|
|
23524
23550
|
"type": "object",
|
|
23525
|
-
"sef25Required": ["
|
|
23551
|
+
"sef25Required": ["frequency"],
|
|
23526
23552
|
"properties": {
|
|
23527
|
-
"amount": {
|
|
23528
|
-
"sef25Ref": "U1.2.1",
|
|
23529
|
-
"title": "Associated costs for sewerage if any (£)",
|
|
23530
|
-
"type": "number"
|
|
23531
|
-
},
|
|
23532
23553
|
"frequency": {
|
|
23533
23554
|
"sef25Ref": "U1.2.2",
|
|
23534
23555
|
"title": "Payment frequency if costs are associated",
|
|
23535
23556
|
"type": "string",
|
|
23536
23557
|
"enum": ["Per month", "Per year", "Not applicable"]
|
|
23537
23558
|
}
|
|
23538
|
-
}
|
|
23559
|
+
},
|
|
23560
|
+
"oneOf": [
|
|
23561
|
+
{
|
|
23562
|
+
"properties": {
|
|
23563
|
+
"frequency": { "enum": ["Not applicable"] }
|
|
23564
|
+
}
|
|
23565
|
+
},
|
|
23566
|
+
{
|
|
23567
|
+
"properties": {
|
|
23568
|
+
"frequency": { "enum": ["Per month", "Per year"] },
|
|
23569
|
+
"amount": {
|
|
23570
|
+
"sef25Ref": "U1.2.1",
|
|
23571
|
+
"title": "Associated costs for sewerage if any (£)",
|
|
23572
|
+
"type": "number"
|
|
23573
|
+
}
|
|
23574
|
+
},
|
|
23575
|
+
"required": ["amount"]
|
|
23576
|
+
}
|
|
23577
|
+
]
|
|
23539
23578
|
}
|
|
23540
23579
|
},
|
|
23541
23580
|
"ntsRequired": ["offMainsDrainageSystem"],
|
|
@@ -28595,6 +28634,7 @@
|
|
|
28595
28634
|
"baspi4Ref": "A12.2.2",
|
|
28596
28635
|
"baspi5Ref": "A12.2.2",
|
|
28597
28636
|
"piqRef": "A12.2.2",
|
|
28637
|
+
"sef25Ref": "M1.1.2",
|
|
28598
28638
|
"title": "Please describe this issue and any action that has been taken, if applicable.",
|
|
28599
28639
|
"type": "string",
|
|
28600
28640
|
"minLength": 1
|
|
@@ -28608,7 +28648,8 @@
|
|
|
28608
28648
|
}
|
|
28609
28649
|
},
|
|
28610
28650
|
"baspi4Required": ["details"],
|
|
28611
|
-
"baspi5Required": ["details"]
|
|
28651
|
+
"baspi5Required": ["details"],
|
|
28652
|
+
"sef25Required": ["details"]
|
|
28612
28653
|
}
|
|
28613
28654
|
]
|
|
28614
28655
|
},
|
|
@@ -30029,6 +30070,7 @@
|
|
|
30029
30070
|
"baspi5Ref": "B5.1.1.1",
|
|
30030
30071
|
"ta6ed6Ref": "6.1a1",
|
|
30031
30072
|
"ta6Ref": "5.1a1",
|
|
30073
|
+
"sef25Ref": "W1.1.1",
|
|
30032
30074
|
"type": "string",
|
|
30033
30075
|
"title": "",
|
|
30034
30076
|
"enum": ["Yes", "No"]
|
|
@@ -30096,6 +30138,7 @@
|
|
|
30096
30138
|
"ta6ed6Ref": "6.1e1",
|
|
30097
30139
|
"ta6Ref": "5.1f1",
|
|
30098
30140
|
"piqRef": "B5.1.2",
|
|
30141
|
+
"sef25Ref": "W1.2.1",
|
|
30099
30142
|
"type": "string",
|
|
30100
30143
|
"title": "",
|
|
30101
30144
|
"enum": ["Yes", "No"]
|
|
@@ -30155,6 +30198,7 @@
|
|
|
30155
30198
|
"baspi5Ref": "B5.1.3.1",
|
|
30156
30199
|
"ta6ed6Ref": "6.1b1",
|
|
30157
30200
|
"ta6Ref": "5.1b1",
|
|
30201
|
+
"sef25Ref": "W1.3.1",
|
|
30158
30202
|
"type": "string",
|
|
30159
30203
|
"title": "",
|
|
30160
30204
|
"enum": ["Yes", "No"]
|
|
@@ -30272,6 +30316,7 @@
|
|
|
30272
30316
|
"baspi5Ref": "B5.1.5.1",
|
|
30273
30317
|
"ta6ed6Ref": "6.1f1",
|
|
30274
30318
|
"ta6Ref": "5.1g1",
|
|
30319
|
+
"sef25Ref": "W1.4.1",
|
|
30275
30320
|
"type": "string",
|
|
30276
30321
|
"title": "",
|
|
30277
30322
|
"enum": ["Yes", "No"]
|
|
@@ -30419,6 +30464,7 @@
|
|
|
30419
30464
|
"baspi4Ref": "B5.1.7.1",
|
|
30420
30465
|
"baspi5Ref": "B5.1.7.1",
|
|
30421
30466
|
"ta6Ref": "5.1e1",
|
|
30467
|
+
"sef25Ref": "W1.5.1",
|
|
30422
30468
|
"type": "string",
|
|
30423
30469
|
"title": "",
|
|
30424
30470
|
"enum": ["Yes", "No"]
|
|
@@ -30475,6 +30521,7 @@
|
|
|
30475
30521
|
"baspi5Ref": "B5.1.8.1",
|
|
30476
30522
|
"ta6ed6Ref": "6.1g1",
|
|
30477
30523
|
"ta6Ref": "5.1h1",
|
|
30524
|
+
"sef25Ref": "W1.6.1",
|
|
30478
30525
|
"type": "string",
|
|
30479
30526
|
"title": "",
|
|
30480
30527
|
"enum": ["Yes", "No"]
|
|
@@ -30622,6 +30669,7 @@
|
|
|
30622
30669
|
"baspi5Ref": "B5.1.10.1",
|
|
30623
30670
|
"ta6ed6Ref": "6.1i1",
|
|
30624
30671
|
"ta6Ref": "5.1i1",
|
|
30672
|
+
"sef25Ref": "W1.7.1",
|
|
30625
30673
|
"type": "string",
|
|
30626
30674
|
"title": "",
|
|
30627
30675
|
"enum": ["Yes", "No"]
|
|
@@ -30885,6 +30933,15 @@
|
|
|
30885
30933
|
"otherGuarantees",
|
|
30886
30934
|
"outstandingClaimsOrApplications",
|
|
30887
30935
|
"breachOfTermsOrConditions"
|
|
30936
|
+
],
|
|
30937
|
+
"sef25Required": [
|
|
30938
|
+
"newHomeWarranty",
|
|
30939
|
+
"roofingWork",
|
|
30940
|
+
"dampProofingTreatment",
|
|
30941
|
+
"centralHeatingAndorPlumbing",
|
|
30942
|
+
"electricalRepairOrInstallation",
|
|
30943
|
+
"subsidenceWork",
|
|
30944
|
+
"otherGuarantees"
|
|
30888
30945
|
]
|
|
30889
30946
|
}
|
|
30890
30947
|
]
|
|
@@ -1881,8 +1881,8 @@
|
|
|
1881
1881
|
details
|
|
1882
1882
|
attachments
|
|
1883
1883
|
associatedCost
|
|
1884
|
-
amount
|
|
1885
1884
|
frequency
|
|
1885
|
+
amount
|
|
1886
1886
|
panelProviderLease
|
|
1887
1887
|
yesNo
|
|
1888
1888
|
details
|
|
@@ -1932,8 +1932,8 @@
|
|
|
1932
1932
|
yesNo
|
|
1933
1933
|
details
|
|
1934
1934
|
associatedCost
|
|
1935
|
-
amount
|
|
1936
1935
|
frequency
|
|
1936
|
+
amount
|
|
1937
1937
|
supplier
|
|
1938
1938
|
stopcock
|
|
1939
1939
|
location
|
|
@@ -1991,8 +1991,8 @@
|
|
|
1991
1991
|
attachments
|
|
1992
1992
|
details
|
|
1993
1993
|
associatedCost
|
|
1994
|
-
amount
|
|
1995
1994
|
frequency
|
|
1995
|
+
amount
|
|
1996
1996
|
surfaceDrainageCharge
|
|
1997
1997
|
yesNo
|
|
1998
1998
|
details
|
|
@@ -17,19 +17,31 @@
|
|
|
17
17
|
"associatedCost": {
|
|
18
18
|
"ntsRef": "S1.1",
|
|
19
19
|
"required": [
|
|
20
|
-
"amount",
|
|
21
20
|
"frequency"
|
|
22
21
|
],
|
|
23
22
|
"properties": {
|
|
24
|
-
"amount": {
|
|
25
|
-
"ntsRef": "S1.1.1",
|
|
26
|
-
"type": "number"
|
|
27
|
-
},
|
|
28
23
|
"frequency": {
|
|
29
24
|
"ntsRef": "S1.1.2",
|
|
30
25
|
"type": "string"
|
|
31
26
|
}
|
|
32
27
|
},
|
|
28
|
+
"oneOf": [
|
|
29
|
+
{},
|
|
30
|
+
{
|
|
31
|
+
"properties": {
|
|
32
|
+
"amount": {
|
|
33
|
+
"ntsRef": "S1.1.1",
|
|
34
|
+
"type": "number"
|
|
35
|
+
},
|
|
36
|
+
"frequency": {
|
|
37
|
+
"enum": [
|
|
38
|
+
"Per month",
|
|
39
|
+
"Per year"
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
],
|
|
33
45
|
"type": "object"
|
|
34
46
|
}
|
|
35
47
|
}
|
|
@@ -29,11 +29,25 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
|
+
"required": [
|
|
33
|
+
"details"
|
|
34
|
+
],
|
|
32
35
|
"properties": {
|
|
36
|
+
"details": {
|
|
37
|
+
"ntsRef": "M1.1.2",
|
|
38
|
+
"type": "string",
|
|
39
|
+
"minLength": 1
|
|
40
|
+
},
|
|
33
41
|
"yesNo": {
|
|
34
42
|
"enum": [
|
|
35
43
|
"Yes"
|
|
36
44
|
]
|
|
45
|
+
},
|
|
46
|
+
"attachments": {
|
|
47
|
+
"enum": [
|
|
48
|
+
"Attached",
|
|
49
|
+
"To follow"
|
|
50
|
+
]
|
|
37
51
|
}
|
|
38
52
|
}
|
|
39
53
|
}
|
|
@@ -13,19 +13,31 @@
|
|
|
13
13
|
"associatedCost": {
|
|
14
14
|
"ntsRef": "U1.1",
|
|
15
15
|
"required": [
|
|
16
|
-
"amount",
|
|
17
16
|
"frequency"
|
|
18
17
|
],
|
|
19
18
|
"properties": {
|
|
20
|
-
"amount": {
|
|
21
|
-
"ntsRef": "U1.1.1",
|
|
22
|
-
"type": "number"
|
|
23
|
-
},
|
|
24
19
|
"frequency": {
|
|
25
20
|
"ntsRef": "U1.1.2",
|
|
26
21
|
"type": "string"
|
|
27
22
|
}
|
|
28
23
|
},
|
|
24
|
+
"oneOf": [
|
|
25
|
+
{},
|
|
26
|
+
{
|
|
27
|
+
"properties": {
|
|
28
|
+
"amount": {
|
|
29
|
+
"ntsRef": "U1.1.1",
|
|
30
|
+
"type": "number"
|
|
31
|
+
},
|
|
32
|
+
"frequency": {
|
|
33
|
+
"enum": [
|
|
34
|
+
"Per month",
|
|
35
|
+
"Per year"
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
],
|
|
29
41
|
"type": "object"
|
|
30
42
|
}
|
|
31
43
|
},
|
|
@@ -48,19 +60,31 @@
|
|
|
48
60
|
"associatedCost": {
|
|
49
61
|
"ntsRef": "U1.2",
|
|
50
62
|
"required": [
|
|
51
|
-
"amount",
|
|
52
63
|
"frequency"
|
|
53
64
|
],
|
|
54
65
|
"properties": {
|
|
55
|
-
"amount": {
|
|
56
|
-
"ntsRef": "U1.2.1",
|
|
57
|
-
"type": "number"
|
|
58
|
-
},
|
|
59
66
|
"frequency": {
|
|
60
67
|
"ntsRef": "U1.2.2",
|
|
61
68
|
"type": "string"
|
|
62
69
|
}
|
|
63
70
|
},
|
|
71
|
+
"oneOf": [
|
|
72
|
+
{},
|
|
73
|
+
{
|
|
74
|
+
"properties": {
|
|
75
|
+
"amount": {
|
|
76
|
+
"ntsRef": "U1.2.1",
|
|
77
|
+
"type": "number"
|
|
78
|
+
},
|
|
79
|
+
"frequency": {
|
|
80
|
+
"enum": [
|
|
81
|
+
"Per month",
|
|
82
|
+
"Per year"
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
],
|
|
64
88
|
"type": "object"
|
|
65
89
|
}
|
|
66
90
|
},
|
|
@@ -27,6 +27,15 @@
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
+
"required": [
|
|
31
|
+
"newHomeWarranty",
|
|
32
|
+
"roofingWork",
|
|
33
|
+
"dampProofingTreatment",
|
|
34
|
+
"centralHeatingAndorPlumbing",
|
|
35
|
+
"electricalRepairOrInstallation",
|
|
36
|
+
"subsidenceWork",
|
|
37
|
+
"otherGuarantees"
|
|
38
|
+
],
|
|
30
39
|
"properties": {
|
|
31
40
|
"newHomeWarranty": {
|
|
32
41
|
"ntsRef": "W1.1",
|
|
@@ -36,6 +45,12 @@
|
|
|
36
45
|
"discriminator": {
|
|
37
46
|
"propertyName": "yesNo"
|
|
38
47
|
},
|
|
48
|
+
"properties": {
|
|
49
|
+
"yesNo": {
|
|
50
|
+
"ntsRef": "W1.1.1",
|
|
51
|
+
"type": "string"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
39
54
|
"oneOf": [
|
|
40
55
|
{
|
|
41
56
|
"properties": {
|
|
@@ -65,6 +80,12 @@
|
|
|
65
80
|
"discriminator": {
|
|
66
81
|
"propertyName": "yesNo"
|
|
67
82
|
},
|
|
83
|
+
"properties": {
|
|
84
|
+
"yesNo": {
|
|
85
|
+
"ntsRef": "W1.2.1",
|
|
86
|
+
"type": "string"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
68
89
|
"oneOf": [
|
|
69
90
|
{
|
|
70
91
|
"properties": {
|
|
@@ -94,6 +115,12 @@
|
|
|
94
115
|
"discriminator": {
|
|
95
116
|
"propertyName": "yesNo"
|
|
96
117
|
},
|
|
118
|
+
"properties": {
|
|
119
|
+
"yesNo": {
|
|
120
|
+
"ntsRef": "W1.3.1",
|
|
121
|
+
"type": "string"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
97
124
|
"oneOf": [
|
|
98
125
|
{
|
|
99
126
|
"properties": {
|
|
@@ -123,6 +150,12 @@
|
|
|
123
150
|
"discriminator": {
|
|
124
151
|
"propertyName": "yesNo"
|
|
125
152
|
},
|
|
153
|
+
"properties": {
|
|
154
|
+
"yesNo": {
|
|
155
|
+
"ntsRef": "W1.4.1",
|
|
156
|
+
"type": "string"
|
|
157
|
+
}
|
|
158
|
+
},
|
|
126
159
|
"oneOf": [
|
|
127
160
|
{
|
|
128
161
|
"properties": {
|
|
@@ -152,6 +185,12 @@
|
|
|
152
185
|
"discriminator": {
|
|
153
186
|
"propertyName": "yesNo"
|
|
154
187
|
},
|
|
188
|
+
"properties": {
|
|
189
|
+
"yesNo": {
|
|
190
|
+
"ntsRef": "W1.5.1",
|
|
191
|
+
"type": "string"
|
|
192
|
+
}
|
|
193
|
+
},
|
|
155
194
|
"oneOf": [
|
|
156
195
|
{
|
|
157
196
|
"properties": {
|
|
@@ -181,6 +220,12 @@
|
|
|
181
220
|
"discriminator": {
|
|
182
221
|
"propertyName": "yesNo"
|
|
183
222
|
},
|
|
223
|
+
"properties": {
|
|
224
|
+
"yesNo": {
|
|
225
|
+
"ntsRef": "W1.6.1",
|
|
226
|
+
"type": "string"
|
|
227
|
+
}
|
|
228
|
+
},
|
|
184
229
|
"oneOf": [
|
|
185
230
|
{
|
|
186
231
|
"properties": {
|
|
@@ -210,6 +255,12 @@
|
|
|
210
255
|
"discriminator": {
|
|
211
256
|
"propertyName": "yesNo"
|
|
212
257
|
},
|
|
258
|
+
"properties": {
|
|
259
|
+
"yesNo": {
|
|
260
|
+
"ntsRef": "W1.7.1",
|
|
261
|
+
"type": "string"
|
|
262
|
+
}
|
|
263
|
+
},
|
|
213
264
|
"oneOf": [
|
|
214
265
|
{
|
|
215
266
|
"properties": {
|
|
@@ -351,17 +351,23 @@
|
|
|
351
351
|
"associatedCost": {
|
|
352
352
|
"sef25Ref": "S1.1",
|
|
353
353
|
"required": [
|
|
354
|
-
"amount",
|
|
355
354
|
"frequency"
|
|
356
355
|
],
|
|
357
356
|
"properties": {
|
|
358
|
-
"amount": {
|
|
359
|
-
"sef25Ref": "S1.1.1"
|
|
360
|
-
},
|
|
361
357
|
"frequency": {
|
|
362
358
|
"sef25Ref": "S1.1.2"
|
|
363
359
|
}
|
|
364
|
-
}
|
|
360
|
+
},
|
|
361
|
+
"oneOf": [
|
|
362
|
+
null,
|
|
363
|
+
{
|
|
364
|
+
"properties": {
|
|
365
|
+
"amount": {
|
|
366
|
+
"sef25Ref": "S1.1.1"
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
]
|
|
365
371
|
}
|
|
366
372
|
}
|
|
367
373
|
}
|
|
@@ -396,17 +402,23 @@
|
|
|
396
402
|
"associatedCost": {
|
|
397
403
|
"sef25Ref": "U1.1",
|
|
398
404
|
"required": [
|
|
399
|
-
"amount",
|
|
400
405
|
"frequency"
|
|
401
406
|
],
|
|
402
407
|
"properties": {
|
|
403
|
-
"amount": {
|
|
404
|
-
"sef25Ref": "U1.1.1"
|
|
405
|
-
},
|
|
406
408
|
"frequency": {
|
|
407
409
|
"sef25Ref": "U1.1.2"
|
|
408
410
|
}
|
|
409
|
-
}
|
|
411
|
+
},
|
|
412
|
+
"oneOf": [
|
|
413
|
+
null,
|
|
414
|
+
{
|
|
415
|
+
"properties": {
|
|
416
|
+
"amount": {
|
|
417
|
+
"sef25Ref": "U1.1.1"
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
]
|
|
410
422
|
}
|
|
411
423
|
}
|
|
412
424
|
}
|
|
@@ -428,17 +440,23 @@
|
|
|
428
440
|
"associatedCost": {
|
|
429
441
|
"sef25Ref": "U1.2",
|
|
430
442
|
"required": [
|
|
431
|
-
"amount",
|
|
432
443
|
"frequency"
|
|
433
444
|
],
|
|
434
445
|
"properties": {
|
|
435
|
-
"amount": {
|
|
436
|
-
"sef25Ref": "U1.2.1"
|
|
437
|
-
},
|
|
438
446
|
"frequency": {
|
|
439
447
|
"sef25Ref": "U1.2.2"
|
|
440
448
|
}
|
|
441
|
-
}
|
|
449
|
+
},
|
|
450
|
+
"oneOf": [
|
|
451
|
+
null,
|
|
452
|
+
{
|
|
453
|
+
"properties": {
|
|
454
|
+
"amount": {
|
|
455
|
+
"sef25Ref": "U1.2.1"
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
]
|
|
442
460
|
}
|
|
443
461
|
}
|
|
444
462
|
}
|
|
@@ -650,8 +668,14 @@
|
|
|
650
668
|
"enum": [
|
|
651
669
|
"Yes"
|
|
652
670
|
]
|
|
671
|
+
},
|
|
672
|
+
"details": {
|
|
673
|
+
"sef25Ref": "M1.1.2"
|
|
653
674
|
}
|
|
654
|
-
}
|
|
675
|
+
},
|
|
676
|
+
"required": [
|
|
677
|
+
"details"
|
|
678
|
+
]
|
|
655
679
|
}
|
|
656
680
|
],
|
|
657
681
|
"required": [
|
|
@@ -714,7 +738,12 @@
|
|
|
714
738
|
],
|
|
715
739
|
"required": [
|
|
716
740
|
"yesNo"
|
|
717
|
-
]
|
|
741
|
+
],
|
|
742
|
+
"properties": {
|
|
743
|
+
"yesNo": {
|
|
744
|
+
"sef25Ref": "W1.1.1"
|
|
745
|
+
}
|
|
746
|
+
}
|
|
718
747
|
},
|
|
719
748
|
"roofingWork": {
|
|
720
749
|
"sef25Ref": "W1.2",
|
|
@@ -743,7 +772,12 @@
|
|
|
743
772
|
],
|
|
744
773
|
"required": [
|
|
745
774
|
"yesNo"
|
|
746
|
-
]
|
|
775
|
+
],
|
|
776
|
+
"properties": {
|
|
777
|
+
"yesNo": {
|
|
778
|
+
"sef25Ref": "W1.2.1"
|
|
779
|
+
}
|
|
780
|
+
}
|
|
747
781
|
},
|
|
748
782
|
"dampProofingTreatment": {
|
|
749
783
|
"sef25Ref": "W1.3",
|
|
@@ -772,7 +806,12 @@
|
|
|
772
806
|
],
|
|
773
807
|
"required": [
|
|
774
808
|
"yesNo"
|
|
775
|
-
]
|
|
809
|
+
],
|
|
810
|
+
"properties": {
|
|
811
|
+
"yesNo": {
|
|
812
|
+
"sef25Ref": "W1.3.1"
|
|
813
|
+
}
|
|
814
|
+
}
|
|
776
815
|
},
|
|
777
816
|
"centralHeatingAndorPlumbing": {
|
|
778
817
|
"sef25Ref": "W1.4",
|
|
@@ -801,7 +840,12 @@
|
|
|
801
840
|
],
|
|
802
841
|
"required": [
|
|
803
842
|
"yesNo"
|
|
804
|
-
]
|
|
843
|
+
],
|
|
844
|
+
"properties": {
|
|
845
|
+
"yesNo": {
|
|
846
|
+
"sef25Ref": "W1.4.1"
|
|
847
|
+
}
|
|
848
|
+
}
|
|
805
849
|
},
|
|
806
850
|
"electricalRepairOrInstallation": {
|
|
807
851
|
"sef25Ref": "W1.5",
|
|
@@ -830,7 +874,12 @@
|
|
|
830
874
|
],
|
|
831
875
|
"required": [
|
|
832
876
|
"yesNo"
|
|
833
|
-
]
|
|
877
|
+
],
|
|
878
|
+
"properties": {
|
|
879
|
+
"yesNo": {
|
|
880
|
+
"sef25Ref": "W1.5.1"
|
|
881
|
+
}
|
|
882
|
+
}
|
|
834
883
|
},
|
|
835
884
|
"subsidenceWork": {
|
|
836
885
|
"sef25Ref": "W1.6",
|
|
@@ -859,7 +908,12 @@
|
|
|
859
908
|
],
|
|
860
909
|
"required": [
|
|
861
910
|
"yesNo"
|
|
862
|
-
]
|
|
911
|
+
],
|
|
912
|
+
"properties": {
|
|
913
|
+
"yesNo": {
|
|
914
|
+
"sef25Ref": "W1.6.1"
|
|
915
|
+
}
|
|
916
|
+
}
|
|
863
917
|
},
|
|
864
918
|
"otherGuarantees": {
|
|
865
919
|
"sef25Ref": "W1.7",
|
|
@@ -888,9 +942,23 @@
|
|
|
888
942
|
],
|
|
889
943
|
"required": [
|
|
890
944
|
"yesNo"
|
|
891
|
-
]
|
|
945
|
+
],
|
|
946
|
+
"properties": {
|
|
947
|
+
"yesNo": {
|
|
948
|
+
"sef25Ref": "W1.7.1"
|
|
949
|
+
}
|
|
950
|
+
}
|
|
892
951
|
}
|
|
893
|
-
}
|
|
952
|
+
},
|
|
953
|
+
"required": [
|
|
954
|
+
"newHomeWarranty",
|
|
955
|
+
"roofingWork",
|
|
956
|
+
"dampProofingTreatment",
|
|
957
|
+
"centralHeatingAndorPlumbing",
|
|
958
|
+
"electricalRepairOrInstallation",
|
|
959
|
+
"subsidenceWork",
|
|
960
|
+
"otherGuarantees"
|
|
961
|
+
]
|
|
894
962
|
}
|
|
895
963
|
],
|
|
896
964
|
"required": [
|
|
@@ -18067,10 +18067,6 @@
|
|
|
18067
18067
|
"title": "Associated costs of leased solar panels",
|
|
18068
18068
|
"type": "object",
|
|
18069
18069
|
"properties": {
|
|
18070
|
-
"amount": {
|
|
18071
|
-
"title": "Associated costs of leased solar panels if any (£)",
|
|
18072
|
-
"type": "number"
|
|
18073
|
-
},
|
|
18074
18070
|
"frequency": {
|
|
18075
18071
|
"title": "Payment frequency if costs are associated",
|
|
18076
18072
|
"type": "string",
|
|
@@ -18080,7 +18076,35 @@
|
|
|
18080
18076
|
"Not applicable"
|
|
18081
18077
|
]
|
|
18082
18078
|
}
|
|
18083
|
-
}
|
|
18079
|
+
},
|
|
18080
|
+
"oneOf": [
|
|
18081
|
+
{
|
|
18082
|
+
"properties": {
|
|
18083
|
+
"frequency": {
|
|
18084
|
+
"enum": [
|
|
18085
|
+
"Not applicable"
|
|
18086
|
+
]
|
|
18087
|
+
}
|
|
18088
|
+
}
|
|
18089
|
+
},
|
|
18090
|
+
{
|
|
18091
|
+
"properties": {
|
|
18092
|
+
"frequency": {
|
|
18093
|
+
"enum": [
|
|
18094
|
+
"Per month",
|
|
18095
|
+
"Per year"
|
|
18096
|
+
]
|
|
18097
|
+
},
|
|
18098
|
+
"amount": {
|
|
18099
|
+
"title": "Associated costs of leased solar panels if any (£)",
|
|
18100
|
+
"type": "number"
|
|
18101
|
+
}
|
|
18102
|
+
},
|
|
18103
|
+
"required": [
|
|
18104
|
+
"amount"
|
|
18105
|
+
]
|
|
18106
|
+
}
|
|
18107
|
+
]
|
|
18084
18108
|
}
|
|
18085
18109
|
}
|
|
18086
18110
|
}
|
|
@@ -18631,10 +18655,6 @@
|
|
|
18631
18655
|
"title": "Please provide the associated costs for water supply",
|
|
18632
18656
|
"type": "object",
|
|
18633
18657
|
"properties": {
|
|
18634
|
-
"amount": {
|
|
18635
|
-
"title": "Associated costs of supply if any (£)",
|
|
18636
|
-
"type": "number"
|
|
18637
|
-
},
|
|
18638
18658
|
"frequency": {
|
|
18639
18659
|
"title": "Payment frequency if costs are associated",
|
|
18640
18660
|
"type": "string",
|
|
@@ -18644,7 +18664,35 @@
|
|
|
18644
18664
|
"Not applicable"
|
|
18645
18665
|
]
|
|
18646
18666
|
}
|
|
18647
|
-
}
|
|
18667
|
+
},
|
|
18668
|
+
"oneOf": [
|
|
18669
|
+
{
|
|
18670
|
+
"properties": {
|
|
18671
|
+
"frequency": {
|
|
18672
|
+
"enum": [
|
|
18673
|
+
"Not applicable"
|
|
18674
|
+
]
|
|
18675
|
+
}
|
|
18676
|
+
}
|
|
18677
|
+
},
|
|
18678
|
+
{
|
|
18679
|
+
"properties": {
|
|
18680
|
+
"frequency": {
|
|
18681
|
+
"enum": [
|
|
18682
|
+
"Per month",
|
|
18683
|
+
"Per year"
|
|
18684
|
+
]
|
|
18685
|
+
},
|
|
18686
|
+
"amount": {
|
|
18687
|
+
"title": "Associated costs of supply if any (£)",
|
|
18688
|
+
"type": "number"
|
|
18689
|
+
}
|
|
18690
|
+
},
|
|
18691
|
+
"required": [
|
|
18692
|
+
"amount"
|
|
18693
|
+
]
|
|
18694
|
+
}
|
|
18695
|
+
]
|
|
18648
18696
|
}
|
|
18649
18697
|
}
|
|
18650
18698
|
},
|
|
@@ -19363,10 +19411,6 @@
|
|
|
19363
19411
|
"title": "Associated costs for sewerage",
|
|
19364
19412
|
"type": "object",
|
|
19365
19413
|
"properties": {
|
|
19366
|
-
"amount": {
|
|
19367
|
-
"title": "Associated costs for sewerage if any (£)",
|
|
19368
|
-
"type": "number"
|
|
19369
|
-
},
|
|
19370
19414
|
"frequency": {
|
|
19371
19415
|
"title": "Payment frequency if costs are associated",
|
|
19372
19416
|
"type": "string",
|
|
@@ -19376,7 +19420,35 @@
|
|
|
19376
19420
|
"Not applicable"
|
|
19377
19421
|
]
|
|
19378
19422
|
}
|
|
19379
|
-
}
|
|
19423
|
+
},
|
|
19424
|
+
"oneOf": [
|
|
19425
|
+
{
|
|
19426
|
+
"properties": {
|
|
19427
|
+
"frequency": {
|
|
19428
|
+
"enum": [
|
|
19429
|
+
"Not applicable"
|
|
19430
|
+
]
|
|
19431
|
+
}
|
|
19432
|
+
}
|
|
19433
|
+
},
|
|
19434
|
+
{
|
|
19435
|
+
"properties": {
|
|
19436
|
+
"frequency": {
|
|
19437
|
+
"enum": [
|
|
19438
|
+
"Per month",
|
|
19439
|
+
"Per year"
|
|
19440
|
+
]
|
|
19441
|
+
},
|
|
19442
|
+
"amount": {
|
|
19443
|
+
"title": "Associated costs for sewerage if any (£)",
|
|
19444
|
+
"type": "number"
|
|
19445
|
+
}
|
|
19446
|
+
},
|
|
19447
|
+
"required": [
|
|
19448
|
+
"amount"
|
|
19449
|
+
]
|
|
19450
|
+
}
|
|
19451
|
+
]
|
|
19380
19452
|
}
|
|
19381
19453
|
}
|
|
19382
19454
|
}
|
|
@@ -2395,8 +2395,8 @@
|
|
|
2395
2395
|
"details": "string",
|
|
2396
2396
|
"attachments": "string",
|
|
2397
2397
|
"associatedCost": {
|
|
2398
|
-
"
|
|
2399
|
-
"
|
|
2398
|
+
"frequency": "variant",
|
|
2399
|
+
"amount": "number"
|
|
2400
2400
|
}
|
|
2401
2401
|
},
|
|
2402
2402
|
"panelProviderLease": {
|
|
@@ -2460,8 +2460,8 @@
|
|
|
2460
2460
|
"yesNo": "variant",
|
|
2461
2461
|
"details": "string",
|
|
2462
2462
|
"associatedCost": {
|
|
2463
|
-
"
|
|
2464
|
-
"
|
|
2463
|
+
"frequency": "variant",
|
|
2464
|
+
"amount": "number"
|
|
2465
2465
|
},
|
|
2466
2466
|
"supplier": "string",
|
|
2467
2467
|
"stopcock": {
|
|
@@ -2534,8 +2534,8 @@
|
|
|
2534
2534
|
"details": "string"
|
|
2535
2535
|
},
|
|
2536
2536
|
"associatedCost": {
|
|
2537
|
-
"
|
|
2538
|
-
"
|
|
2537
|
+
"frequency": "variant",
|
|
2538
|
+
"amount": "number"
|
|
2539
2539
|
}
|
|
2540
2540
|
},
|
|
2541
2541
|
"surfaceDrainageCharge": {
|
|
@@ -143,6 +143,73 @@ describe("Extension Overlays", () => {
|
|
|
143
143
|
});
|
|
144
144
|
});
|
|
145
145
|
|
|
146
|
+
describe("SEF25 extension leaf annotations", () => {
|
|
147
|
+
test("wg: every W1.x subsection exposes a yesNo ntsRef", () => {
|
|
148
|
+
const schema = getTransactionSchema(schemaId, ["nts2023", "wg"]);
|
|
149
|
+
const subsections =
|
|
150
|
+
schema.properties?.propertyPack?.properties
|
|
151
|
+
?.guaranteesWarrantiesAndIndemnityInsurances?.oneOf?.[1]?.properties;
|
|
152
|
+
|
|
153
|
+
expect(subsections).toBeDefined();
|
|
154
|
+
|
|
155
|
+
const discriminated = Object.entries(subsections).filter(
|
|
156
|
+
([, sub]) => sub?.discriminator?.propertyName === "yesNo"
|
|
157
|
+
);
|
|
158
|
+
expect(discriminated.length).toBeGreaterThan(0);
|
|
159
|
+
|
|
160
|
+
for (const [key, sub] of discriminated) {
|
|
161
|
+
expect(sub.ntsRef).toMatch(/^W1\.\d+$/);
|
|
162
|
+
expect(sub.properties?.yesNo?.ntsRef).toMatch(/^W1\.\d+\.1$/);
|
|
163
|
+
expect(sub.required).toContain("yesNo");
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
test("ic: insuranceClaims exposes a yesNo ntsRef", () => {
|
|
168
|
+
const schema = getTransactionSchema(schemaId, ["nts2023", "ic"]);
|
|
169
|
+
const icProp =
|
|
170
|
+
schema.properties?.propertyPack?.properties?.insurance?.oneOf?.[1]
|
|
171
|
+
?.properties?.insuranceClaims;
|
|
172
|
+
|
|
173
|
+
expect(icProp).toBeDefined();
|
|
174
|
+
expect(icProp.ntsRef).toBe("I1.1");
|
|
175
|
+
expect(icProp.properties?.yesNo?.ntsRef).toBe("I1.1.1");
|
|
176
|
+
expect(icProp.required).toContain("yesNo");
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
test("nd: neighbourDevelopment N1.1 marker merges with nts yesNo ref", () => {
|
|
180
|
+
// nd extension only carries the parent N1.1 marker; the yesNo leaf
|
|
181
|
+
// annotation comes from the nts overlay (C4.1.1), which is required
|
|
182
|
+
// alongside nd for the field to render.
|
|
183
|
+
const schema = getTransactionSchema(schemaId, ["nts2023", "nd"]);
|
|
184
|
+
const ndProp =
|
|
185
|
+
schema.properties?.propertyPack?.properties?.notices?.properties
|
|
186
|
+
?.neighbourDevelopment;
|
|
187
|
+
|
|
188
|
+
expect(ndProp).toBeDefined();
|
|
189
|
+
expect(ndProp.ntsRef).toBe("N1.1");
|
|
190
|
+
expect(ndProp.properties?.yesNo?.ntsRef).toBe("C4.1.1");
|
|
191
|
+
expect(ndProp.required).toContain("yesNo");
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
test("mi: otherMaterialIssue exposes yesNo and details ntsRef", () => {
|
|
195
|
+
const schema = getTransactionSchema(schemaId, ["nts2023", "mi"]);
|
|
196
|
+
const miProp =
|
|
197
|
+
schema.properties?.propertyPack?.properties?.additionalInformation
|
|
198
|
+
?.properties?.otherMaterialIssue;
|
|
199
|
+
|
|
200
|
+
expect(miProp).toBeDefined();
|
|
201
|
+
expect(miProp.ntsRef).toBe("M1.1");
|
|
202
|
+
expect(miProp.properties?.yesNo?.ntsRef).toBe("M1.1.1");
|
|
203
|
+
expect(miProp.required).toContain("yesNo");
|
|
204
|
+
|
|
205
|
+
const yesBranch = miProp.oneOf?.find((branch) =>
|
|
206
|
+
branch.required?.includes("details")
|
|
207
|
+
);
|
|
208
|
+
expect(yesBranch).toBeDefined();
|
|
209
|
+
expect(yesBranch.properties?.details?.ntsRef).toBe("M1.1.2");
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
|
|
146
213
|
describe("Extension overlay availability", () => {
|
|
147
214
|
test("should export all extension overlays", () => {
|
|
148
215
|
const expectedKeys = [
|
|
@@ -495,9 +562,14 @@ describe("Extension Overlays", () => {
|
|
|
495
562
|
const cost = noBranch?.properties?.associatedCost;
|
|
496
563
|
expect(cost).toBeDefined();
|
|
497
564
|
expect(cost.ntsRef).toBe("U1.1");
|
|
498
|
-
expect(cost.required).toEqual(["
|
|
499
|
-
expect(cost.properties.amount.type).toBe("number");
|
|
565
|
+
expect(cost.required).toEqual(["frequency"]);
|
|
500
566
|
expect(cost.properties.frequency.type).toBe("string");
|
|
567
|
+
// amount now lives inside the frequency-discriminator's "Per month"/"Per year" branch
|
|
568
|
+
const costBranch = cost.oneOf?.find((b) =>
|
|
569
|
+
b.properties?.frequency?.enum?.includes("Per month")
|
|
570
|
+
);
|
|
571
|
+
expect(costBranch?.properties?.amount?.type).toBe("number");
|
|
572
|
+
expect(costBranch?.required).toEqual(["amount"]);
|
|
501
573
|
});
|
|
502
574
|
|
|
503
575
|
test("should merge supply costs extension into mainsFoulDrainage No/Not known branch", () => {
|
|
@@ -513,7 +585,13 @@ describe("Extension Overlays", () => {
|
|
|
513
585
|
const cost = noBranch?.properties?.associatedCost;
|
|
514
586
|
expect(cost).toBeDefined();
|
|
515
587
|
expect(cost.ntsRef).toBe("U1.2");
|
|
516
|
-
expect(cost.required).toEqual(["
|
|
588
|
+
expect(cost.required).toEqual(["frequency"]);
|
|
589
|
+
// amount now lives inside the frequency-discriminator's "Per month"/"Per year" branch
|
|
590
|
+
const costBranch = cost.oneOf?.find((b) =>
|
|
591
|
+
b.properties?.frequency?.enum?.includes("Per month")
|
|
592
|
+
);
|
|
593
|
+
expect(costBranch?.properties?.amount?.type).toBe("number");
|
|
594
|
+
expect(costBranch?.required).toEqual(["amount"]);
|
|
517
595
|
});
|
|
518
596
|
|
|
519
597
|
test("should merge parking permit cost and frequency into controlledParking Yes branch", () => {
|