@pdtf/schemas 3.6.0-35 → 3.6.0-37

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 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.6.0-32 (pre-release on branch/package-tag `next`)
10
+ **Current Version:** 3.5.0 (3.6.0-37 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdtf/schemas",
3
- "version": "3.6.0-35",
3
+ "version": "3.6.0-37",
4
4
  "description": "Property Data Trust Framework Schemas and Utilities",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "role": "Seller",
21
21
  "sellersCapacity": { "capacity": "Legal Owner" },
22
- "externalIds": { "Moverly": "123434" }
22
+ "externalIds": { "Platform": "123434" }
23
23
  },
24
24
  {
25
25
  "role": "Seller's Conveyancer",
@@ -988,7 +988,7 @@
988
988
  "name": "Example Agency Agreement",
989
989
  "url": "https://example.com/example-agency-agreement",
990
990
  "externalIds": {
991
- "Moverly": "file123"
991
+ "Platform": "file123"
992
992
  },
993
993
  "requiredSignatories": [
994
994
  {
@@ -1027,7 +1027,7 @@
1027
1027
  "name": "Peter Ronald Hetherington-Smythe",
1028
1028
  "signedOn": "2024-11-29T16:15:02.735Z",
1029
1029
  "externalIds": {
1030
- "Moverly": "123434"
1030
+ "Platform": "123434"
1031
1031
  },
1032
1032
  "role": "Seller",
1033
1033
  "contractHash": "IYnBjUI8TauXFop6WCvnPA=="
@@ -10414,7 +10414,7 @@
10414
10414
  "sef25Ref": "P1.2",
10415
10415
  "title": "Payment frequency",
10416
10416
  "type": "string",
10417
- "enum": ["Per month", "Per year"]
10417
+ "enum": ["Per month", "Per year", "Not applicable"]
10418
10418
  }
10419
10419
  },
10420
10420
  "baspi5Required": ["costOfPermit"],
@@ -21601,40 +21601,20 @@
21601
21601
  "sef25Ref": "S1.1",
21602
21602
  "title": "Associated costs of leased solar panels",
21603
21603
  "type": "object",
21604
- "sef25Required": ["frequency"],
21604
+ "sef25Required": ["amount", "frequency"],
21605
21605
  "properties": {
21606
- "frequency": {
21606
+ "amount": {
21607
21607
  "sef25Ref": "S1.1.1",
21608
- "title": "If costs are associated, what is the payment frequency?",
21608
+ "title": "Associated costs of leased solar panels if any (£)",
21609
+ "type": "number"
21610
+ },
21611
+ "frequency": {
21612
+ "sef25Ref": "S1.1.2",
21613
+ "title": "Payment frequency if costs are associated",
21609
21614
  "type": "string",
21610
21615
  "enum": ["Per month", "Per year", "Not applicable"]
21611
21616
  }
21612
- },
21613
- "discriminator": {
21614
- "propertyName": "frequency"
21615
- },
21616
- "oneOf": [
21617
- {
21618
- "properties": {
21619
- "frequency": {
21620
- "enum": ["Not applicable"]
21621
- }
21622
- }
21623
- },
21624
- {
21625
- "properties": {
21626
- "frequency": {
21627
- "enum": ["Per month", "Per year"]
21628
- },
21629
- "amount": {
21630
- "sef25Ref": "S1.1.2",
21631
- "title": "Amount (£)",
21632
- "type": "number"
21633
- }
21634
- },
21635
- "sef25Required": ["amount"]
21636
- }
21637
- ]
21617
+ }
21638
21618
  }
21639
21619
  },
21640
21620
  "baspi4Required": ["details", "attachments"],
@@ -22431,42 +22411,22 @@
22431
22411
  },
22432
22412
  "associatedCost": {
22433
22413
  "sef25Ref": "U1.1",
22434
- "title": "Associated costs for water supply",
22414
+ "title": "Please provide the associated costs for water supply",
22435
22415
  "type": "object",
22436
- "sef25Required": ["frequency"],
22416
+ "sef25Required": ["amount", "frequency"],
22437
22417
  "properties": {
22438
- "frequency": {
22418
+ "amount": {
22439
22419
  "sef25Ref": "U1.1.1",
22440
- "title": "If costs are associated, what is the payment frequency?",
22420
+ "title": "Associated costs of supply if any (£)",
22421
+ "type": "number"
22422
+ },
22423
+ "frequency": {
22424
+ "sef25Ref": "U1.1.2",
22425
+ "title": "Payment frequency if costs are associated",
22441
22426
  "type": "string",
22442
22427
  "enum": ["Per month", "Per year", "Not applicable"]
22443
22428
  }
22444
- },
22445
- "discriminator": {
22446
- "propertyName": "frequency"
22447
- },
22448
- "oneOf": [
22449
- {
22450
- "properties": {
22451
- "frequency": {
22452
- "enum": ["Not applicable"]
22453
- }
22454
- }
22455
- },
22456
- {
22457
- "properties": {
22458
- "frequency": {
22459
- "enum": ["Per month", "Per year"]
22460
- },
22461
- "amount": {
22462
- "sef25Ref": "U1.1.2",
22463
- "title": "Amount (£)",
22464
- "type": "number"
22465
- }
22466
- },
22467
- "sef25Required": ["amount"]
22468
- }
22469
- ]
22429
+ }
22470
22430
  }
22471
22431
  },
22472
22432
  "ntsRequired": ["details"],
@@ -23562,40 +23522,20 @@
23562
23522
  "sef25Ref": "U1.2",
23563
23523
  "title": "Associated costs for sewerage",
23564
23524
  "type": "object",
23565
- "sef25Required": ["frequency"],
23525
+ "sef25Required": ["amount", "frequency"],
23566
23526
  "properties": {
23567
- "frequency": {
23527
+ "amount": {
23568
23528
  "sef25Ref": "U1.2.1",
23569
- "title": "If costs are associated, what is the payment frequency?",
23529
+ "title": "Associated costs for sewerage if any (£)",
23530
+ "type": "number"
23531
+ },
23532
+ "frequency": {
23533
+ "sef25Ref": "U1.2.2",
23534
+ "title": "Payment frequency if costs are associated",
23570
23535
  "type": "string",
23571
23536
  "enum": ["Per month", "Per year", "Not applicable"]
23572
23537
  }
23573
- },
23574
- "discriminator": {
23575
- "propertyName": "frequency"
23576
- },
23577
- "oneOf": [
23578
- {
23579
- "properties": {
23580
- "frequency": {
23581
- "enum": ["Not applicable"]
23582
- }
23583
- }
23584
- },
23585
- {
23586
- "properties": {
23587
- "frequency": {
23588
- "enum": ["Per month", "Per year"]
23589
- },
23590
- "amount": {
23591
- "sef25Ref": "U1.2.2",
23592
- "title": "Amount (£)",
23593
- "type": "number"
23594
- }
23595
- },
23596
- "sef25Required": ["amount"]
23597
- }
23598
- ]
23538
+ }
23599
23539
  }
23600
23540
  },
23601
23541
  "ntsRequired": ["offMainsDrainageSystem"],
@@ -1881,8 +1881,8 @@
1881
1881
  details
1882
1882
  attachments
1883
1883
  associatedCost
1884
- frequency
1885
1884
  amount
1885
+ frequency
1886
1886
  panelProviderLease
1887
1887
  yesNo
1888
1888
  details
@@ -1932,8 +1932,8 @@
1932
1932
  yesNo
1933
1933
  details
1934
1934
  associatedCost
1935
- frequency
1936
1935
  amount
1936
+ frequency
1937
1937
  supplier
1938
1938
  stopcock
1939
1939
  location
@@ -1991,8 +1991,8 @@
1991
1991
  attachments
1992
1992
  details
1993
1993
  associatedCost
1994
- frequency
1995
1994
  amount
1995
+ frequency
1996
1996
  surfaceDrainageCharge
1997
1997
  yesNo
1998
1998
  details
@@ -17,53 +17,19 @@
17
17
  "associatedCost": {
18
18
  "ntsRef": "S1.1",
19
19
  "required": [
20
- "hasCost"
20
+ "amount",
21
+ "frequency"
21
22
  ],
22
- "discriminator": {
23
- "propertyName": "hasCost"
24
- },
25
23
  "properties": {
26
- "hasCost": {
24
+ "amount": {
27
25
  "ntsRef": "S1.1.1",
26
+ "type": "number"
27
+ },
28
+ "frequency": {
29
+ "ntsRef": "S1.1.2",
28
30
  "type": "string"
29
31
  }
30
32
  },
31
- "oneOf": [
32
- {
33
- "properties": {
34
- "hasCost": {
35
- "enum": [
36
- "No"
37
- ]
38
- }
39
- }
40
- },
41
- {
42
- "required": [
43
- "amount",
44
- "frequency"
45
- ],
46
- "properties": {
47
- "amount": {
48
- "ntsRef": "S1.1.2",
49
- "type": "number"
50
- },
51
- "frequency": {
52
- "ntsRef": "S1.1.3",
53
- "type": "string",
54
- "enum": [
55
- "Per month",
56
- "Per year"
57
- ]
58
- },
59
- "hasCost": {
60
- "enum": [
61
- "Yes"
62
- ]
63
- }
64
- }
65
- }
66
- ],
67
33
  "type": "object"
68
34
  }
69
35
  }
@@ -13,53 +13,19 @@
13
13
  "associatedCost": {
14
14
  "ntsRef": "U1.1",
15
15
  "required": [
16
- "hasCost"
16
+ "amount",
17
+ "frequency"
17
18
  ],
18
- "discriminator": {
19
- "propertyName": "hasCost"
20
- },
21
19
  "properties": {
22
- "hasCost": {
20
+ "amount": {
23
21
  "ntsRef": "U1.1.1",
22
+ "type": "number"
23
+ },
24
+ "frequency": {
25
+ "ntsRef": "U1.1.2",
24
26
  "type": "string"
25
27
  }
26
28
  },
27
- "oneOf": [
28
- {
29
- "properties": {
30
- "hasCost": {
31
- "enum": [
32
- "No"
33
- ]
34
- }
35
- }
36
- },
37
- {
38
- "required": [
39
- "amount",
40
- "frequency"
41
- ],
42
- "properties": {
43
- "amount": {
44
- "ntsRef": "U1.1.2",
45
- "type": "number"
46
- },
47
- "frequency": {
48
- "ntsRef": "U1.1.3",
49
- "type": "string",
50
- "enum": [
51
- "Per month",
52
- "Per year"
53
- ]
54
- },
55
- "hasCost": {
56
- "enum": [
57
- "Yes"
58
- ]
59
- }
60
- }
61
- }
62
- ],
63
29
  "type": "object"
64
30
  }
65
31
  },
@@ -82,53 +48,19 @@
82
48
  "associatedCost": {
83
49
  "ntsRef": "U1.2",
84
50
  "required": [
85
- "hasCost"
51
+ "amount",
52
+ "frequency"
86
53
  ],
87
- "discriminator": {
88
- "propertyName": "hasCost"
89
- },
90
54
  "properties": {
91
- "hasCost": {
55
+ "amount": {
92
56
  "ntsRef": "U1.2.1",
57
+ "type": "number"
58
+ },
59
+ "frequency": {
60
+ "ntsRef": "U1.2.2",
93
61
  "type": "string"
94
62
  }
95
63
  },
96
- "oneOf": [
97
- {
98
- "properties": {
99
- "hasCost": {
100
- "enum": [
101
- "No"
102
- ]
103
- }
104
- }
105
- },
106
- {
107
- "required": [
108
- "amount",
109
- "frequency"
110
- ],
111
- "properties": {
112
- "amount": {
113
- "ntsRef": "U1.2.2",
114
- "type": "number"
115
- },
116
- "frequency": {
117
- "ntsRef": "U1.2.3",
118
- "type": "string",
119
- "enum": [
120
- "Per month",
121
- "Per year"
122
- ]
123
- },
124
- "hasCost": {
125
- "enum": [
126
- "Yes"
127
- ]
128
- }
129
- }
130
- }
131
- ],
132
64
  "type": "object"
133
65
  }
134
66
  },
@@ -350,42 +350,16 @@
350
350
  },
351
351
  "associatedCost": {
352
352
  "sef25Ref": "S1.1",
353
- "discriminator": {
354
- "propertyName": "frequency"
355
- },
356
- "oneOf": [
357
- {
358
- "properties": {
359
- "frequency": {
360
- "enum": [
361
- "Not applicable"
362
- ]
363
- }
364
- }
365
- },
366
- {
367
- "properties": {
368
- "frequency": {
369
- "enum": [
370
- "Per month",
371
- "Per year"
372
- ]
373
- },
374
- "amount": {
375
- "sef25Ref": "S1.1.2"
376
- }
377
- },
378
- "required": [
379
- "amount"
380
- ]
381
- }
382
- ],
383
353
  "required": [
354
+ "amount",
384
355
  "frequency"
385
356
  ],
386
357
  "properties": {
387
- "frequency": {
358
+ "amount": {
388
359
  "sef25Ref": "S1.1.1"
360
+ },
361
+ "frequency": {
362
+ "sef25Ref": "S1.1.2"
389
363
  }
390
364
  }
391
365
  }
@@ -421,42 +395,16 @@
421
395
  "properties": {
422
396
  "associatedCost": {
423
397
  "sef25Ref": "U1.1",
424
- "discriminator": {
425
- "propertyName": "frequency"
426
- },
427
- "oneOf": [
428
- {
429
- "properties": {
430
- "frequency": {
431
- "enum": [
432
- "Not applicable"
433
- ]
434
- }
435
- }
436
- },
437
- {
438
- "properties": {
439
- "frequency": {
440
- "enum": [
441
- "Per month",
442
- "Per year"
443
- ]
444
- },
445
- "amount": {
446
- "sef25Ref": "U1.1.2"
447
- }
448
- },
449
- "required": [
450
- "amount"
451
- ]
452
- }
453
- ],
454
398
  "required": [
399
+ "amount",
455
400
  "frequency"
456
401
  ],
457
402
  "properties": {
458
- "frequency": {
403
+ "amount": {
459
404
  "sef25Ref": "U1.1.1"
405
+ },
406
+ "frequency": {
407
+ "sef25Ref": "U1.1.2"
460
408
  }
461
409
  }
462
410
  }
@@ -479,42 +427,16 @@
479
427
  "properties": {
480
428
  "associatedCost": {
481
429
  "sef25Ref": "U1.2",
482
- "discriminator": {
483
- "propertyName": "frequency"
484
- },
485
- "oneOf": [
486
- {
487
- "properties": {
488
- "frequency": {
489
- "enum": [
490
- "Not applicable"
491
- ]
492
- }
493
- }
494
- },
495
- {
496
- "properties": {
497
- "frequency": {
498
- "enum": [
499
- "Per month",
500
- "Per year"
501
- ]
502
- },
503
- "amount": {
504
- "sef25Ref": "U1.2.2"
505
- }
506
- },
507
- "required": [
508
- "amount"
509
- ]
510
- }
511
- ],
512
430
  "required": [
431
+ "amount",
513
432
  "frequency"
514
433
  ],
515
434
  "properties": {
516
- "frequency": {
435
+ "amount": {
517
436
  "sef25Ref": "U1.2.1"
437
+ },
438
+ "frequency": {
439
+ "sef25Ref": "U1.2.2"
518
440
  }
519
441
  }
520
442
  }
@@ -8422,7 +8422,8 @@
8422
8422
  "type": "string",
8423
8423
  "enum": [
8424
8424
  "Per month",
8425
- "Per year"
8425
+ "Per year",
8426
+ "Not applicable"
8426
8427
  ]
8427
8428
  }
8428
8429
  }
@@ -18066,8 +18067,12 @@
18066
18067
  "title": "Associated costs of leased solar panels",
18067
18068
  "type": "object",
18068
18069
  "properties": {
18070
+ "amount": {
18071
+ "title": "Associated costs of leased solar panels if any (£)",
18072
+ "type": "number"
18073
+ },
18069
18074
  "frequency": {
18070
- "title": "If costs are associated, what is the payment frequency?",
18075
+ "title": "Payment frequency if costs are associated",
18071
18076
  "type": "string",
18072
18077
  "enum": [
18073
18078
  "Per month",
@@ -18075,32 +18080,7 @@
18075
18080
  "Not applicable"
18076
18081
  ]
18077
18082
  }
18078
- },
18079
- "oneOf": [
18080
- {
18081
- "properties": {
18082
- "frequency": {
18083
- "enum": [
18084
- "Not applicable"
18085
- ]
18086
- }
18087
- }
18088
- },
18089
- {
18090
- "properties": {
18091
- "frequency": {
18092
- "enum": [
18093
- "Per month",
18094
- "Per year"
18095
- ]
18096
- },
18097
- "amount": {
18098
- "title": "Amount (£)",
18099
- "type": "number"
18100
- }
18101
- }
18102
- }
18103
- ]
18083
+ }
18104
18084
  }
18105
18085
  }
18106
18086
  }
@@ -18648,11 +18628,15 @@
18648
18628
  "minLength": 1
18649
18629
  },
18650
18630
  "associatedCost": {
18651
- "title": "Associated costs for water supply",
18631
+ "title": "Please provide the associated costs for water supply",
18652
18632
  "type": "object",
18653
18633
  "properties": {
18634
+ "amount": {
18635
+ "title": "Associated costs of supply if any (£)",
18636
+ "type": "number"
18637
+ },
18654
18638
  "frequency": {
18655
- "title": "If costs are associated, what is the payment frequency?",
18639
+ "title": "Payment frequency if costs are associated",
18656
18640
  "type": "string",
18657
18641
  "enum": [
18658
18642
  "Per month",
@@ -18660,32 +18644,7 @@
18660
18644
  "Not applicable"
18661
18645
  ]
18662
18646
  }
18663
- },
18664
- "oneOf": [
18665
- {
18666
- "properties": {
18667
- "frequency": {
18668
- "enum": [
18669
- "Not applicable"
18670
- ]
18671
- }
18672
- }
18673
- },
18674
- {
18675
- "properties": {
18676
- "frequency": {
18677
- "enum": [
18678
- "Per month",
18679
- "Per year"
18680
- ]
18681
- },
18682
- "amount": {
18683
- "title": "Amount (£)",
18684
- "type": "number"
18685
- }
18686
- }
18687
- }
18688
- ]
18647
+ }
18689
18648
  }
18690
18649
  }
18691
18650
  },
@@ -19404,8 +19363,12 @@
19404
19363
  "title": "Associated costs for sewerage",
19405
19364
  "type": "object",
19406
19365
  "properties": {
19366
+ "amount": {
19367
+ "title": "Associated costs for sewerage if any (£)",
19368
+ "type": "number"
19369
+ },
19407
19370
  "frequency": {
19408
- "title": "If costs are associated, what is the payment frequency?",
19371
+ "title": "Payment frequency if costs are associated",
19409
19372
  "type": "string",
19410
19373
  "enum": [
19411
19374
  "Per month",
@@ -19413,32 +19376,7 @@
19413
19376
  "Not applicable"
19414
19377
  ]
19415
19378
  }
19416
- },
19417
- "oneOf": [
19418
- {
19419
- "properties": {
19420
- "frequency": {
19421
- "enum": [
19422
- "Not applicable"
19423
- ]
19424
- }
19425
- }
19426
- },
19427
- {
19428
- "properties": {
19429
- "frequency": {
19430
- "enum": [
19431
- "Per month",
19432
- "Per year"
19433
- ]
19434
- },
19435
- "amount": {
19436
- "title": "Amount (£)",
19437
- "type": "number"
19438
- }
19439
- }
19440
- }
19441
- ]
19379
+ }
19442
19380
  }
19443
19381
  }
19444
19382
  }
@@ -2395,8 +2395,8 @@
2395
2395
  "details": "string",
2396
2396
  "attachments": "string",
2397
2397
  "associatedCost": {
2398
- "frequency": "variant",
2399
- "amount": "number"
2398
+ "amount": "number",
2399
+ "frequency": "string"
2400
2400
  }
2401
2401
  },
2402
2402
  "panelProviderLease": {
@@ -2460,8 +2460,8 @@
2460
2460
  "yesNo": "variant",
2461
2461
  "details": "string",
2462
2462
  "associatedCost": {
2463
- "frequency": "variant",
2464
- "amount": "number"
2463
+ "amount": "number",
2464
+ "frequency": "string"
2465
2465
  },
2466
2466
  "supplier": "string",
2467
2467
  "stopcock": {
@@ -2534,8 +2534,8 @@
2534
2534
  "details": "string"
2535
2535
  },
2536
2536
  "associatedCost": {
2537
- "frequency": "variant",
2538
- "amount": "number"
2537
+ "amount": "number",
2538
+ "frequency": "string"
2539
2539
  }
2540
2540
  },
2541
2541
  "surfaceDrainageCharge": {
@@ -495,14 +495,9 @@ describe("Extension Overlays", () => {
495
495
  const cost = noBranch?.properties?.associatedCost;
496
496
  expect(cost).toBeDefined();
497
497
  expect(cost.ntsRef).toBe("U1.1");
498
- expect(cost.required).toEqual(["hasCost"]);
499
- expect(cost.properties.hasCost.type).toBe("string");
500
- expect(cost.oneOf).toHaveLength(2);
501
- // Yes branch should have amount and frequency
502
- const yesBranch = cost.oneOf[1];
503
- expect(yesBranch.properties.amount.type).toBe("number");
504
- expect(yesBranch.properties.frequency.type).toBe("string");
505
- expect(yesBranch.required).toEqual(["amount", "frequency"]);
498
+ expect(cost.required).toEqual(["amount", "frequency"]);
499
+ expect(cost.properties.amount.type).toBe("number");
500
+ expect(cost.properties.frequency.type).toBe("string");
506
501
  });
507
502
 
508
503
  test("should merge supply costs extension into mainsFoulDrainage No/Not known branch", () => {
@@ -518,7 +513,7 @@ describe("Extension Overlays", () => {
518
513
  const cost = noBranch?.properties?.associatedCost;
519
514
  expect(cost).toBeDefined();
520
515
  expect(cost.ntsRef).toBe("U1.2");
521
- expect(cost.required).toEqual(["hasCost"]);
516
+ expect(cost.required).toEqual(["amount", "frequency"]);
522
517
  });
523
518
 
524
519
  test("should merge parking permit cost and frequency into controlledParking Yes branch", () => {
@@ -648,7 +643,6 @@ describe("Extension Overlays", () => {
648
643
  yesNo: "No",
649
644
  details: "Private borehole",
650
645
  associatedCost: {
651
- hasCost: "Yes",
652
646
  amount: 50,
653
647
  frequency: "Per month",
654
648
  },
@@ -668,7 +662,8 @@ describe("Extension Overlays", () => {
668
662
  yesNo: "No",
669
663
  details: "Private borehole",
670
664
  associatedCost: {
671
- hasCost: "No",
665
+ amount: 0,
666
+ frequency: "Not applicable",
672
667
  },
673
668
  });
674
669
 
@@ -702,7 +697,6 @@ describe("Extension Overlays", () => {
702
697
  yesNo: "No",
703
698
  details: "Borehole",
704
699
  associatedCost: {
705
- hasCost: "Yes",
706
700
  amount: 100,
707
701
  frequency: "Weekly",
708
702
  },
@@ -722,7 +716,6 @@ describe("Extension Overlays", () => {
722
716
  yesNo: "No",
723
717
  details: "Borehole",
724
718
  associatedCost: {
725
- hasCost: "Yes",
726
719
  amount: "fifty pounds",
727
720
  frequency: "Per month",
728
721
  },
@@ -742,7 +735,6 @@ describe("Extension Overlays", () => {
742
735
  const result = validator({
743
736
  yesNo: "No",
744
737
  associatedCost: {
745
- hasCost: "Yes",
746
738
  amount: 200,
747
739
  frequency: "Per year",
748
740
  },
@@ -761,7 +753,6 @@ describe("Extension Overlays", () => {
761
753
  const result = validator({
762
754
  yesNo: "No",
763
755
  associatedCost: {
764
- hasCost: "Yes",
765
756
  amount: 200,
766
757
  frequency: "Quarterly",
767
758
  },
@@ -987,7 +978,7 @@ describe("Extension Overlays", () => {
987
978
  expect(si?.required).toContain("japaneseKnotweed");
988
979
  expect(si?.required).toContain("ongoingHealthOrSafetyIssue");
989
980
 
990
- // SEF25 hazards also present
981
+ // SEF25 hazards also present (remapped to ntsRef in extension overlays)
991
982
  expect(si?.properties?.wellsDitchesShaft?.ntsRef).toBe("H1.1");
992
983
  expect(si?.properties?.knownAreasInPoorCondition?.ntsRef).toBe(
993
984
  "H1.4"
@@ -1130,40 +1121,40 @@ describe("Extension Overlays", () => {
1130
1121
  });
1131
1122
 
1132
1123
  describe("Solar lease costs (lc)", () => {
1133
- test("should validate No costs", () => {
1124
+ test("should validate Not applicable frequency", () => {
1134
1125
  const validator = getSubschemaValidator(
1135
1126
  "/propertyPack/electricity/solarPanels/panelsOwnedOutright/associatedCost",
1136
1127
  schemaId,
1137
1128
  ["lc"]
1138
1129
  );
1139
- expect(validator({ hasCost: "No" })).toBe(true);
1130
+ expect(validator({ amount: 0, frequency: "Not applicable" })).toBe(true);
1140
1131
  });
1141
1132
 
1142
- test("should validate Yes with amount and frequency", () => {
1133
+ test("should validate amount and frequency", () => {
1143
1134
  const validator = getSubschemaValidator(
1144
1135
  "/propertyPack/electricity/solarPanels/panelsOwnedOutright/associatedCost",
1145
1136
  schemaId,
1146
1137
  ["lc"]
1147
1138
  );
1148
- expect(validator({ hasCost: "Yes", amount: 75, frequency: "Per month" })).toBe(true);
1139
+ expect(validator({ amount: 75, frequency: "Per month" })).toBe(true);
1149
1140
  });
1150
1141
 
1151
- test("should reject Yes without amount", () => {
1142
+ test("should reject missing amount", () => {
1152
1143
  const validator = getSubschemaValidator(
1153
1144
  "/propertyPack/electricity/solarPanels/panelsOwnedOutright/associatedCost",
1154
1145
  schemaId,
1155
1146
  ["lc"]
1156
1147
  );
1157
- expect(validator({ hasCost: "Yes", frequency: "Per month" })).toBe(false);
1148
+ expect(validator({ frequency: "Per month" })).toBe(false);
1158
1149
  });
1159
1150
 
1160
- test("should reject Yes without frequency", () => {
1151
+ test("should reject missing frequency", () => {
1161
1152
  const validator = getSubschemaValidator(
1162
1153
  "/propertyPack/electricity/solarPanels/panelsOwnedOutright/associatedCost",
1163
1154
  schemaId,
1164
1155
  ["lc"]
1165
1156
  );
1166
- expect(validator({ hasCost: "Yes", amount: 75 })).toBe(false);
1157
+ expect(validator({ amount: 75 })).toBe(false);
1167
1158
  });
1168
1159
 
1169
1160
  test("should reject invalid frequency", () => {
@@ -1172,7 +1163,7 @@ describe("Extension Overlays", () => {
1172
1163
  schemaId,
1173
1164
  ["lc"]
1174
1165
  );
1175
- expect(validator({ hasCost: "Yes", amount: 75, frequency: "Weekly" })).toBe(false);
1166
+ expect(validator({ amount: 75, frequency: "Weekly" })).toBe(false);
1176
1167
  });
1177
1168
  });
1178
1169