@pdtf/schemas 3.6.0-13 → 3.6.0-15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdtf/schemas",
3
- "version": "3.6.0-13",
3
+ "version": "3.6.0-15",
4
4
  "description": "Property Data Trust Framework Schemas and Utilities",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -62,6 +62,7 @@
62
62
  "baspi4Ref": "B1",
63
63
  "baspi5Ref": "B1",
64
64
  "piqRef": "B1",
65
+ "ta6ed6Ref": "1",
65
66
  "title": "Transaction participants",
66
67
  "type": "array",
67
68
  "minItems": 1,
@@ -4387,6 +4388,7 @@
4387
4388
  "baspi5Ref": "A1.5",
4388
4389
  "ntsRef": "A3.2",
4389
4390
  "nts2Ref": "A3.2",
4391
+ "ta7ed5Ref": "2",
4390
4392
  "title": "Leasehold information",
4391
4393
  "type": "object",
4392
4394
  "lpe1Required": [
@@ -5661,6 +5663,7 @@
5661
5663
  },
5662
5664
  "serviceContactAssignments": {
5663
5665
  "ta7Ref": "5.1",
5666
+ "ta7ed5Ref": "4",
5664
5667
  "lpe1Ref": "1.6",
5665
5668
  "type": "object",
5666
5669
  "lpe1Required": [
@@ -6298,7 +6301,7 @@
6298
6301
  },
6299
6302
  "otherCollector": {
6300
6303
  "ta7ed5Ref": "4.3.3",
6301
- "title": "If 'Other' collects the ground rent, specify who",
6304
+ "title": "Please specify who",
6302
6305
  "type": "string",
6303
6306
  "minLength": 1
6304
6307
  }
@@ -6378,7 +6381,7 @@
6378
6381
  },
6379
6382
  "otherCollector": {
6380
6383
  "ta7ed5Ref": "4.2.3",
6381
- "title": "If 'Other' collects the building insurance premiums, specify who",
6384
+ "title": "Please specify who",
6382
6385
  "type": "string",
6383
6386
  "minLength": 1
6384
6387
  }
@@ -6590,7 +6593,8 @@
6590
6593
  ]
6591
6594
  }
6592
6595
  },
6593
- "lpe1Required": ["details"]
6596
+ "lpe1Required": ["details"],
6597
+ "ta7ed5Required": ["details"]
6594
6598
  }
6595
6599
  ]
6596
6600
  },
@@ -6636,7 +6640,8 @@
6636
6640
  "type": "string",
6637
6641
  "enum": ["Attached", "To follow"]
6638
6642
  }
6639
- }
6643
+ },
6644
+ "ta7ed5Required": ["details", "attachments"]
6640
6645
  }
6641
6646
  ]
6642
6647
  }
@@ -7213,20 +7218,6 @@
7213
7218
  }
7214
7219
  ]
7215
7220
  },
7216
- "hasTenantCompanyDissolved": {
7217
- "ta7Ref": "2.4",
7218
- "ta7ed5Ref": "4.5.1",
7219
- "title": "Has any tenants’ management company been dissolved or struck off the register at Companies House?",
7220
- "ta7ed5Title": "Are you aware of any company responsible for managing the building having been dissolved or struck off the register at Companies House?",
7221
- "type": "string",
7222
- "enum": ["Yes", "No"],
7223
- "ta7ed5Enum": ["Yes", "No", "Not applicable"]
7224
- },
7225
- "hasTenantCompanyDissolvedDetails": {
7226
- "ta7ed5Ref": "4.5.2",
7227
- "ta7ed5Title": "If tenants’ management company has been dissolved or struck off, please provide details",
7228
- "type": "string"
7229
- },
7230
7221
  "isManagingAgentEmployed": {
7231
7222
  "ta7Ref": "2.5",
7232
7223
  "ta7ed5Ref": "4.1.1",
@@ -7275,8 +7266,38 @@
7275
7266
  "ta7ed5Required": ["attachments"]
7276
7267
  }
7277
7268
  ]
7269
+ },
7270
+ "hasTenantCompanyDissolved": {
7271
+ "ta7Ref": "2.4",
7272
+ "ta7ed5Ref": "4.5.1",
7273
+ "title": "Has any tenants' management company been dissolved or struck off the register at Companies House?",
7274
+ "ta7ed5Title": "Are you aware of any company responsible for managing the building having been dissolved or struck off the register at Companies House?",
7275
+ "type": "string",
7276
+ "enum": ["Yes", "No"],
7277
+ "ta7ed5Enum": ["Yes", "No", "Not applicable"]
7278
7278
  }
7279
- }
7279
+ },
7280
+ "discriminator": {
7281
+ "propertyName": "hasTenantCompanyDissolved"
7282
+ },
7283
+ "oneOf": [
7284
+ {
7285
+ "properties": {
7286
+ "hasTenantCompanyDissolved": { "enum": ["No", "Not applicable"] }
7287
+ }
7288
+ },
7289
+ {
7290
+ "properties": {
7291
+ "hasTenantCompanyDissolved": { "enum": ["Yes"] },
7292
+ "hasTenantCompanyDissolvedDetails": {
7293
+ "ta7ed5Ref": "4.5.2",
7294
+ "title": "If tenants' management company has been dissolved or struck off, please provide details",
7295
+ "type": "string"
7296
+ }
7297
+ },
7298
+ "ta7ed5Required": ["hasTenantCompanyDissolvedDetails"]
7299
+ }
7300
+ ]
7280
7301
  },
7281
7302
  "serviceCharge": {
7282
7303
  "baspi4Ref": "A1.5.1",
@@ -8276,6 +8297,7 @@
8276
8297
  },
8277
8298
  "buildingsInsurance": {
8278
8299
  "lpe1Ref": "5",
8300
+ "ta7ed5Ref": "2.2",
8279
8301
  "title": "Buildings Insurance",
8280
8302
  "type": "object",
8281
8303
  "lpe1Required": [
@@ -9652,6 +9674,7 @@
9652
9674
  "requiredDocuments": {
9653
9675
  "lpe1Ref": "8",
9654
9676
  "ta7Ref": "3",
9677
+ "ta7ed5Ref": "6",
9655
9678
  "title": "Required documents",
9656
9679
  "ta7Title": "Relevant documents",
9657
9680
  "type": "object",
@@ -10481,7 +10504,7 @@
10481
10504
  },
10482
10505
  "details": {
10483
10506
  "ta6ed6Ref": "10.3b2",
10484
- "description": "Specify any relevant local authority licence or terms and conditions",
10507
+ "title": "Specify any relevant local authority licence or terms and conditions",
10485
10508
  "type": "string",
10486
10509
  "minLength": 1
10487
10510
  }
@@ -10490,7 +10513,8 @@
10490
10513
  }
10491
10514
  ]
10492
10515
  }
10493
- }
10516
+ },
10517
+ "ta6ed6Required": ["chargerDetails", "cableCrossesPavement"]
10494
10518
  }
10495
10519
  ]
10496
10520
  },
@@ -10908,6 +10932,7 @@
10908
10932
  "nts2Ref": "A1.2",
10909
10933
  "ntslRef": "A1.2",
10910
10934
  "ntsl2Ref": "A1.2",
10935
+ "ta7ed5Ref": "11",
10911
10936
  "title": "Type of Construction",
10912
10937
  "type": "object",
10913
10938
  "baspi4Required": [
@@ -11331,6 +11356,7 @@
11331
11356
  "baspi4Ref": "A1.8.3",
11332
11357
  "baspi5Ref": "A1.8.3",
11333
11358
  "ta6Ref": "7.6",
11359
+ "ta6ed6Ref": "8",
11334
11360
  "ntsRef": "A4",
11335
11361
  "nts2Ref": "A4",
11336
11362
  "ntslRef": "A4",
@@ -21156,7 +21182,7 @@
21156
21182
  "title": "Meter Point Administration Number (MPAN)",
21157
21183
  "description": "Your MPAN is on your electricity or dual fuel bill, usually in a box marked 'Supply Number'. It's 21 digits long and begins with 'S'. You'll only need the last 12 or 13 digits.",
21158
21184
  "ta6ed6Description": "Your MPAN is on your electricity or dual fuel bill, usually in a box marked 'Supply Number'. It's 21 digits long and begins with 'S'. You'll only need the last 12 or 13 digits.",
21159
- "type": "integer"
21185
+ "type": "string"
21160
21186
  }
21161
21187
  }
21162
21188
  }
@@ -23809,7 +23835,7 @@
23809
23835
  "ta6ed6Ref": "12.2.4",
23810
23836
  "title": "Meter Point Reference Number (MPRN)",
23811
23837
  "description": "You can find your property's MPRN on your gas or dual fuel bill. It's usually marked 'Meter Point Reference Number' and is between six and 10 digits long.",
23812
- "type": "integer"
23838
+ "type": "string"
23813
23839
  }
23814
23840
  },
23815
23841
  "baspi4Required": ["location"],
@@ -25232,6 +25258,7 @@
25232
25258
  "enum": ["Yes"]
25233
25259
  },
25234
25260
  "details": {
25261
+ "title": "Provide details",
25235
25262
  "ta6ed6Ref": "9.3.2",
25236
25263
  "type": "string",
25237
25264
  "minLength": 1
@@ -29220,7 +29247,7 @@
29220
29247
  },
29221
29248
  "suppliedCertificate": {
29222
29249
  "title": "Please supply one of the following:",
29223
- "ta6ed6Title": "Please supply any certificates for electrical installtion work",
29250
+ "ta6ed6Title": "Please supply any certificates for electrical installation work",
29224
29251
  "type": "object",
29225
29252
  "baspi4Ref": "B4.2.4.1",
29226
29253
  "baspi5Ref": "B4.2.4.1",
@@ -30908,10 +30935,6 @@
30908
30935
  "type": "string",
30909
30936
  "title": "",
30910
30937
  "enum": ["Yes", "No"]
30911
- },
30912
- "details": {
30913
- "ta6ed6Ref": "13.2.2",
30914
- "type": "string"
30915
30938
  }
30916
30939
  },
30917
30940
  "baspi4Required": ["yesNo"],
@@ -30935,9 +30958,11 @@
30935
30958
  "enum": ["Yes"]
30936
30959
  },
30937
30960
  "details": {
30961
+ "title": "Please provide details",
30938
30962
  "baspi4Ref": "B7.3.2",
30939
30963
  "baspi5Ref": "B7.3.2",
30940
30964
  "ta6Ref": "14.2.2",
30965
+ "ta6ed6Ref": "13.2.2",
30941
30966
  "type": "string"
30942
30967
  }
30943
30968
  },
@@ -726,12 +726,12 @@
726
726
  buildingManager
727
727
  buildingManagerType
728
728
  details
729
- hasTenantCompanyDissolved
730
- hasTenantCompanyDissolvedDetails
731
729
  isManagingAgentEmployed
732
730
  sellerOwnership
733
731
  yesNo
734
732
  attachments
733
+ hasTenantCompanyDissolved
734
+ hasTenantCompanyDissolvedDetails
735
735
  serviceCharge
736
736
  sellerContributesToServiceCharge
737
737
  annualServiceCharge
@@ -827,6 +827,9 @@
827
827
  riskAssessments
828
828
  assessmentsCarriedOut
829
829
  urgentWorksRecommended
830
+ urgentWorksCarriedOut
831
+ outstandingEnforcementAction
832
+ dateRemedialActionRequired
830
833
  standardTermsAvailable
831
834
  yesNo
832
835
  details
@@ -1378,6 +1381,7 @@
1378
1381
  attachments
1379
1382
  yesNo
1380
1383
  managementPlanInPlace
1384
+ attachments
1381
1385
  subsidenceOrStructuralFault
1382
1386
  yesNo
1383
1387
  details
@@ -7,19 +7,46 @@
7
7
  ],
8
8
  "properties": {
9
9
  "participants": {
10
+ "ta6ed6Ref": "1",
10
11
  "items": {
11
- "required": [
12
- "role"
13
- ],
12
+ "discriminator": {
13
+ "propertyName": "role"
14
+ },
14
15
  "oneOf": [
15
- null,
16
- null,
17
16
  {
18
- "required": [
19
- "sellersCapacity",
20
- "dateBecameOwnerOrAuthority"
21
- ],
22
17
  "properties": {
18
+ "role": {
19
+ "enum": [
20
+ "Prospective Buyer",
21
+ "Buyer's Conveyancer",
22
+ "Seller's Conveyancer",
23
+ "Estate Agent",
24
+ "Buyer's Agent",
25
+ "Surveyor",
26
+ "Mortgage Broker",
27
+ "Lender",
28
+ "Landlord",
29
+ "Tenant"
30
+ ]
31
+ }
32
+ }
33
+ },
34
+ {
35
+ "properties": {
36
+ "role": {
37
+ "enum": [
38
+ "Buyer"
39
+ ]
40
+ }
41
+ }
42
+ },
43
+ {
44
+ "properties": {
45
+ "role": {
46
+ "enum": [
47
+ "Seller"
48
+ ]
49
+ },
23
50
  "sellersCapacity": {
24
51
  "ta6ed6Ref": "1.4",
25
52
  "discriminator": {
@@ -81,8 +108,15 @@
81
108
  "dateBecameOwnerOrAuthority": {
82
109
  "ta6ed6Ref": "1.5"
83
110
  }
84
- }
111
+ },
112
+ "required": [
113
+ "sellersCapacity",
114
+ "dateBecameOwnerOrAuthority"
115
+ ]
85
116
  }
117
+ ],
118
+ "required": [
119
+ "role"
86
120
  ]
87
121
  }
88
122
  },
@@ -258,7 +292,11 @@
258
292
  }
259
293
  }
260
294
  }
261
- }
295
+ },
296
+ "required": [
297
+ "chargerDetails",
298
+ "cableCrossesPavement"
299
+ ]
262
300
  }
263
301
  ],
264
302
  "required": [
@@ -441,6 +479,7 @@
441
479
  }
442
480
  },
443
481
  "energyEfficiency": {
482
+ "ta6ed6Ref": "8",
444
483
  "properties": {
445
484
  "greenDealLoan": {
446
485
  "ta6ed6Ref": "8.5",
@@ -5553,7 +5592,7 @@
5553
5592
  "required": [
5554
5593
  "attachments"
5555
5594
  ],
5556
- "title": "Please supply any certificates for electrical installtion work",
5595
+ "title": "Please supply any certificates for electrical installation work",
5557
5596
  "properties": {
5558
5597
  "attachments": {
5559
5598
  "ta6ed6Ref": "11.2"
@@ -6334,6 +6373,9 @@
6334
6373
  "enum": [
6335
6374
  "Yes"
6336
6375
  ]
6376
+ },
6377
+ "details": {
6378
+ "ta6ed6Ref": "13.2.2"
6337
6379
  }
6338
6380
  },
6339
6381
  "required": [
@@ -6347,9 +6389,6 @@
6347
6389
  "properties": {
6348
6390
  "yesNo": {
6349
6391
  "ta6ed6Ref": "13.2.1"
6350
- },
6351
- "details": {
6352
- "ta6ed6Ref": "13.2.2"
6353
6392
  }
6354
6393
  }
6355
6394
  },
@@ -425,6 +425,30 @@
425
425
  },
426
426
  "ownershipAndManagement": {
427
427
  "ta7Ref": "2",
428
+ "discriminator": {
429
+ "propertyName": "hasTenantCompanyDissolved"
430
+ },
431
+ "oneOf": [
432
+ {
433
+ "properties": {
434
+ "hasTenantCompanyDissolved": {
435
+ "enum": [
436
+ "No",
437
+ "Not applicable"
438
+ ]
439
+ }
440
+ }
441
+ },
442
+ {
443
+ "properties": {
444
+ "hasTenantCompanyDissolved": {
445
+ "enum": [
446
+ "Yes"
447
+ ]
448
+ }
449
+ }
450
+ }
451
+ ],
428
452
  "required": [
429
453
  "freeholdOwner",
430
454
  "hasHeadlease",
@@ -519,11 +543,11 @@
519
543
  }
520
544
  }
521
545
  },
522
- "hasTenantCompanyDissolved": {
523
- "ta7Ref": "2.4"
524
- },
525
546
  "isManagingAgentEmployed": {
526
547
  "ta7Ref": "2.5"
548
+ },
549
+ "hasTenantCompanyDissolved": {
550
+ "ta7Ref": "2.4"
527
551
  }
528
552
  }
529
553
  },
@@ -71,6 +71,7 @@
71
71
  ]
72
72
  },
73
73
  "leaseholdInformation": {
74
+ "ta7ed5Ref": "2",
74
75
  "required": [
75
76
  "typeOfLeasehold",
76
77
  "sharedOwnership",
@@ -372,6 +373,7 @@
372
373
  }
373
374
  },
374
375
  "serviceContactAssignments": {
376
+ "ta7ed5Ref": "4",
375
377
  "required": [
376
378
  "collectsGroundRent",
377
379
  "collectsbuildingInsurancePremiums"
@@ -516,7 +518,10 @@
516
518
  "attachments": {
517
519
  "ta7ed5Ref": "8.1.3"
518
520
  }
519
- }
521
+ },
522
+ "required": [
523
+ "details"
524
+ ]
520
525
  }
521
526
  ],
522
527
  "required": [
@@ -556,7 +561,11 @@
556
561
  "attachments": {
557
562
  "ta7ed5Ref": "8.2.3"
558
563
  }
559
- }
564
+ },
565
+ "required": [
566
+ "details",
567
+ "attachments"
568
+ ]
560
569
  }
561
570
  ],
562
571
  "required": [
@@ -612,25 +621,42 @@
612
621
  },
613
622
  "ownershipAndManagement": {
614
623
  "ta7ed5Ref": "4",
624
+ "discriminator": {
625
+ "propertyName": "hasTenantCompanyDissolved"
626
+ },
627
+ "oneOf": [
628
+ {
629
+ "properties": {
630
+ "hasTenantCompanyDissolved": {
631
+ "enum": [
632
+ "No",
633
+ "Not applicable"
634
+ ]
635
+ }
636
+ }
637
+ },
638
+ {
639
+ "properties": {
640
+ "hasTenantCompanyDissolved": {
641
+ "enum": [
642
+ "Yes"
643
+ ]
644
+ },
645
+ "hasTenantCompanyDissolvedDetails": {
646
+ "ta7ed5Ref": "4.5.2"
647
+ }
648
+ },
649
+ "required": [
650
+ "hasTenantCompanyDissolvedDetails"
651
+ ]
652
+ }
653
+ ],
615
654
  "required": [
616
655
  "isManagingAgentEmployed",
617
656
  "sellerOwnership",
618
657
  "hasTenantCompanyDissolved"
619
658
  ],
620
659
  "properties": {
621
- "hasTenantCompanyDissolved": {
622
- "ta7ed5Ref": "4.5.1",
623
- "title": "Are you aware of any company responsible for managing the building having been dissolved or struck off the register at Companies House?",
624
- "enum": [
625
- "Yes",
626
- "No",
627
- "Not applicable"
628
- ]
629
- },
630
- "hasTenantCompanyDissolvedDetails": {
631
- "ta7ed5Ref": "4.5.2",
632
- "title": "If tenants’ management company has been dissolved or struck off, please provide details"
633
- },
634
660
  "isManagingAgentEmployed": {
635
661
  "ta7ed5Ref": "4.1.1",
636
662
  "title": "Is a managing agent appointed to manage the building and collect service charges?",
@@ -680,6 +706,15 @@
680
706
  "ta7ed5Ref": "4.4.1"
681
707
  }
682
708
  }
709
+ },
710
+ "hasTenantCompanyDissolved": {
711
+ "ta7ed5Ref": "4.5.1",
712
+ "title": "Are you aware of any company responsible for managing the building having been dissolved or struck off the register at Companies House?",
713
+ "enum": [
714
+ "Yes",
715
+ "No",
716
+ "Not applicable"
717
+ ]
683
718
  }
684
719
  }
685
720
  },
@@ -911,6 +946,7 @@
911
946
  }
912
947
  },
913
948
  "buildingsInsurance": {
949
+ "ta7ed5Ref": "2.2",
914
950
  "required": [
915
951
  "mostRecentBuildingsInsuranceDemandStatus"
916
952
  ],
@@ -1362,6 +1398,7 @@
1362
1398
  }
1363
1399
  },
1364
1400
  "requiredDocuments": {
1401
+ "ta7ed5Ref": "6",
1365
1402
  "required": [
1366
1403
  "noticeOfSale",
1367
1404
  "noticeOfBuildingCondition"
@@ -1491,6 +1528,7 @@
1491
1528
  }
1492
1529
  },
1493
1530
  "typeOfConstruction": {
1531
+ "ta7ed5Ref": "11",
1494
1532
  "required": [
1495
1533
  "buildingSafety"
1496
1534
  ],
@@ -5068,7 +5068,7 @@
5068
5068
  ]
5069
5069
  },
5070
5070
  "otherCollector": {
5071
- "title": "If 'Other' collects the ground rent, specify who",
5071
+ "title": "Please specify who",
5072
5072
  "type": "string",
5073
5073
  "minLength": 1
5074
5074
  }
@@ -5123,7 +5123,7 @@
5123
5123
  ]
5124
5124
  },
5125
5125
  "otherCollector": {
5126
- "title": "If 'Other' collects the building insurance premiums, specify who",
5126
+ "title": "Please specify who",
5127
5127
  "type": "string",
5128
5128
  "minLength": 1
5129
5129
  }
@@ -5764,17 +5764,6 @@
5764
5764
  }
5765
5765
  ]
5766
5766
  },
5767
- "hasTenantCompanyDissolved": {
5768
- "title": "Has any tenants’ management company been dissolved or struck off the register at Companies House?",
5769
- "type": "string",
5770
- "enum": [
5771
- "Yes",
5772
- "No"
5773
- ]
5774
- },
5775
- "hasTenantCompanyDissolvedDetails": {
5776
- "type": "string"
5777
- },
5778
5767
  "isManagingAgentEmployed": {
5779
5768
  "title": "Does the landlord, tenants’ management company or Right to Manage company employ a managing agent to collect rent or manage the building?",
5780
5769
  "type": "string",
@@ -5827,8 +5816,41 @@
5827
5816
  }
5828
5817
  }
5829
5818
  ]
5819
+ },
5820
+ "hasTenantCompanyDissolved": {
5821
+ "title": "Has any tenants' management company been dissolved or struck off the register at Companies House?",
5822
+ "type": "string",
5823
+ "enum": [
5824
+ "Yes",
5825
+ "No"
5826
+ ]
5830
5827
  }
5831
- }
5828
+ },
5829
+ "oneOf": [
5830
+ {
5831
+ "properties": {
5832
+ "hasTenantCompanyDissolved": {
5833
+ "enum": [
5834
+ "No",
5835
+ "Not applicable"
5836
+ ]
5837
+ }
5838
+ }
5839
+ },
5840
+ {
5841
+ "properties": {
5842
+ "hasTenantCompanyDissolved": {
5843
+ "enum": [
5844
+ "Yes"
5845
+ ]
5846
+ },
5847
+ "hasTenantCompanyDissolvedDetails": {
5848
+ "title": "If tenants' management company has been dissolved or struck off, please provide details",
5849
+ "type": "string"
5850
+ }
5851
+ }
5852
+ }
5853
+ ]
5832
5854
  },
5833
5855
  "serviceCharge": {
5834
5856
  "title": "Service Charge",
@@ -8460,7 +8482,7 @@
8460
8482
  ]
8461
8483
  },
8462
8484
  "details": {
8463
- "description": "Specify any relevant local authority licence or terms and conditions",
8485
+ "title": "Specify any relevant local authority licence or terms and conditions",
8464
8486
  "type": "string",
8465
8487
  "minLength": 1
8466
8488
  }
@@ -17694,7 +17716,7 @@
17694
17716
  "mpan": {
17695
17717
  "title": "Meter Point Administration Number (MPAN)",
17696
17718
  "description": "Your MPAN is on your electricity or dual fuel bill, usually in a box marked 'Supply Number'. It's 21 digits long and begins with 'S'. You'll only need the last 12 or 13 digits.",
17697
- "type": "integer"
17719
+ "type": "string"
17698
17720
  }
17699
17721
  }
17700
17722
  }
@@ -19504,7 +19526,7 @@
19504
19526
  "mprn": {
19505
19527
  "title": "Meter Point Reference Number (MPRN)",
19506
19528
  "description": "You can find your property's MPRN on your gas or dual fuel bill. It's usually marked 'Meter Point Reference Number' and is between six and 10 digits long.",
19507
- "type": "integer"
19529
+ "type": "string"
19508
19530
  }
19509
19531
  }
19510
19532
  }
@@ -20462,6 +20484,7 @@
20462
20484
  ]
20463
20485
  },
20464
20486
  "details": {
20487
+ "title": "Provide details",
20465
20488
  "type": "string",
20466
20489
  "minLength": 1
20467
20490
  }
@@ -24745,9 +24768,6 @@
24745
24768
  "Yes",
24746
24769
  "No"
24747
24770
  ]
24748
- },
24749
- "details": {
24750
- "type": "string"
24751
24771
  }
24752
24772
  },
24753
24773
  "oneOf": [
@@ -24768,6 +24788,7 @@
24768
24788
  ]
24769
24789
  },
24770
24790
  "details": {
24791
+ "title": "Please provide details",
24771
24792
  "type": "string"
24772
24793
  }
24773
24794
  }
@@ -1,7 +1,9 @@
1
1
  {
2
2
  "transactionId": "string",
3
3
  "externalIds": {
4
- "*": {}
4
+ "*": {
5
+ "*": {}
6
+ }
5
7
  },
6
8
  "status": "string",
7
9
  "participants": [
@@ -33,7 +35,9 @@
33
35
  "organisationReference": "string",
34
36
  "role": "variant",
35
37
  "externalIds": {
36
- "*": {}
38
+ "*": {
39
+ "*": {}
40
+ }
37
41
  },
38
42
  "participantStatus": "string",
39
43
  "verification": {
@@ -923,13 +927,13 @@
923
927
  "buildingManagerType": "variant",
924
928
  "details": "string"
925
929
  },
926
- "hasTenantCompanyDissolved": "string",
927
- "hasTenantCompanyDissolvedDetails": "string",
928
930
  "isManagingAgentEmployed": "string",
929
931
  "sellerOwnership": {
930
932
  "yesNo": "variant",
931
933
  "attachments": "string"
932
- }
934
+ },
935
+ "hasTenantCompanyDissolved": "variant",
936
+ "hasTenantCompanyDissolvedDetails": "string"
933
937
  },
934
938
  "serviceCharge": {
935
939
  "sellerContributesToServiceCharge": "variant",
@@ -1053,7 +1057,10 @@
1053
1057
  "yesNo": "variant",
1054
1058
  "riskAssessments": {
1055
1059
  "assessmentsCarriedOut": "variant",
1056
- "urgentWorksRecommended": "string"
1060
+ "urgentWorksRecommended": "variant",
1061
+ "urgentWorksCarriedOut": "string",
1062
+ "outstandingEnforcementAction": "variant",
1063
+ "dateRemedialActionRequired": "string"
1057
1064
  }
1058
1065
  },
1059
1066
  "standardTermsAvailable": {
@@ -1740,7 +1747,8 @@
1740
1747
  "attachments": "string"
1741
1748
  },
1742
1749
  "yesNo": "variant",
1743
- "managementPlanInPlace": "string"
1750
+ "managementPlanInPlace": "variant",
1751
+ "attachments": "string"
1744
1752
  },
1745
1753
  "subsidenceOrStructuralFault": {
1746
1754
  "yesNo": "variant",
@@ -2349,7 +2357,7 @@
2349
2357
  "electricityMeter": {
2350
2358
  "location": "string",
2351
2359
  "attachments": "string",
2352
- "mpan": "integer"
2360
+ "mpan": "string"
2353
2361
  },
2354
2362
  "dateToBeConnected": "string"
2355
2363
  },
@@ -2551,7 +2559,7 @@
2551
2559
  "gasMeter": {
2552
2560
  "location": "string",
2553
2561
  "attachments": "string",
2554
- "mprn": "integer"
2562
+ "mprn": "string"
2555
2563
  },
2556
2564
  "otherCentralHeatingFuelType": "string"
2557
2565
  },
@@ -3323,7 +3331,9 @@
3323
3331
  "name": "string",
3324
3332
  "signedOn": "string",
3325
3333
  "externalIds": {
3326
- "*": {}
3334
+ "*": {
3335
+ "*": {}
3336
+ }
3327
3337
  }
3328
3338
  }
3329
3339
  ]
@@ -4632,7 +4642,9 @@
4632
4642
  "mimeType": "string",
4633
4643
  "documentType": "string",
4634
4644
  "externalIds": {
4635
- "*": {}
4645
+ "*": {
4646
+ "*": {}
4647
+ }
4636
4648
  },
4637
4649
  "isDeleted": "boolean",
4638
4650
  "summary": {}
@@ -5494,7 +5506,9 @@
5494
5506
  "name": "string",
5495
5507
  "url": "string",
5496
5508
  "externalIds": {
5497
- "*": {}
5509
+ "*": {
5510
+ "*": {}
5511
+ }
5498
5512
  },
5499
5513
  "requiredSignatories": [
5500
5514
  {
@@ -5510,7 +5524,9 @@
5510
5524
  "name": "string",
5511
5525
  "signedOn": "string",
5512
5526
  "externalIds": {
5513
- "*": {}
5527
+ "*": {
5528
+ "*": {}
5529
+ }
5514
5530
  }
5515
5531
  }
5516
5532
  ]
@@ -5521,7 +5537,9 @@
5521
5537
  {
5522
5538
  "transactionId": "string",
5523
5539
  "externalIds": {
5524
- "*": {}
5540
+ "*": {
5541
+ "*": {}
5542
+ }
5525
5543
  },
5526
5544
  "address": {
5527
5545
  "buildingNumber": "string",
@@ -5586,7 +5604,9 @@
5586
5604
  "string"
5587
5605
  ],
5588
5606
  "externalIds": {
5589
- "*": {}
5607
+ "*": {
5608
+ "*": {}
5609
+ }
5590
5610
  },
5591
5611
  "buyerCircumstances": {
5592
5612
  "intendedUse": "string",
@@ -5633,7 +5653,9 @@
5633
5653
  }
5634
5654
  },
5635
5655
  "externalIds": {
5636
- "*": {}
5656
+ "*": {
5657
+ "*": {}
5658
+ }
5637
5659
  },
5638
5660
  "resolutionCondition": "string"
5639
5661
  }
@@ -203,14 +203,18 @@ describe("TA6 Edition 6 overlay", () => {
203
203
  expect(parkingValidator(data)).toBe(true);
204
204
  });
205
205
 
206
- test("electricVehicleChargingPoint Yes without additional details is valid", () => {
207
- // The ta6ed6 overlay does not require chargerDetails etc. in the Yes branch
206
+ test("electricVehicleChargingPoint Yes without additional details is invalid", () => {
208
207
  const data = {
209
208
  parkingArrangements: ["Driveway"],
210
209
  controlledParking: { yesNo: "No" },
211
210
  electricVehicleChargingPoint: { yesNo: "Yes" },
212
211
  };
213
- expect(parkingValidator(data)).toBe(true);
212
+ expect(parkingValidator(data)).toBe(false);
213
+ expect(
214
+ parkingValidator.errors.some((e) =>
215
+ e.message.includes("'chargerDetails'")
216
+ )
217
+ ).toBe(true);
214
218
  });
215
219
 
216
220
  test("electricVehicleChargingPoint Yes with all required details is valid", () => {
@@ -1626,7 +1630,7 @@ describe("TA6 Edition 6 overlay", () => {
1626
1630
  mainsElectricity: {
1627
1631
  yesNo: "Yes",
1628
1632
  supplier: "British Gas",
1629
- electricityMeter: { location: "Hall cupboard", mpan: 1234567890123 },
1633
+ electricityMeter: { location: "Hall cupboard", mpan: "1234567890123" },
1630
1634
  },
1631
1635
  solarPanels: { yesNo: "No" },
1632
1636
  };
@@ -1638,7 +1642,7 @@ describe("TA6 Edition 6 overlay", () => {
1638
1642
  mainsElectricity: {
1639
1643
  yesNo: "Yes",
1640
1644
  supplier: "British Gas",
1641
- electricityMeter: { location: "Hall cupboard", mpan: 1234567890123 },
1645
+ electricityMeter: { location: "Hall cupboard", mpan: "1234567890123" },
1642
1646
  },
1643
1647
  solarPanels: { yesNo: "Yes" },
1644
1648
  };
@@ -1655,7 +1659,7 @@ describe("TA6 Edition 6 overlay", () => {
1655
1659
  mainsElectricity: {
1656
1660
  yesNo: "Yes",
1657
1661
  supplier: "British Gas",
1658
- electricityMeter: { location: "Hall cupboard", mpan: 1234567890123 },
1662
+ electricityMeter: { location: "Hall cupboard", mpan: "1234567890123" },
1659
1663
  },
1660
1664
  solarPanels: {
1661
1665
  yesNo: "Yes",
@@ -1677,7 +1681,7 @@ describe("TA6 Edition 6 overlay", () => {
1677
1681
  mainsElectricity: {
1678
1682
  yesNo: "Yes",
1679
1683
  supplier: "British Gas",
1680
- electricityMeter: { location: "Hall cupboard", mpan: 1234567890123 },
1684
+ electricityMeter: { location: "Hall cupboard", mpan: "1234567890123" },
1681
1685
  },
1682
1686
  solarPanels: {
1683
1687
  yesNo: "Yes",
@@ -85,23 +85,21 @@ const flattenSkeleton = (schema) => {
85
85
  });
86
86
  }
87
87
 
88
- // Handle oneOf - merge all possible properties
88
+ // Handle oneOf - merge all possible properties (recursively handles nested oneOf)
89
89
  if (schema.oneOf) {
90
90
  schema.oneOf.forEach((aOneOf) => {
91
- if (aOneOf.properties) {
92
- Object.entries(aOneOf.properties).forEach(([key, value]) => {
93
- // If property already exists and differs, mark as variant
94
- const newValue = flattenSkeleton(value);
95
- if (returnStructure[key] && JSON.stringify(returnStructure[key]) !== JSON.stringify(newValue)) {
96
- // For primitive types, just mark as variant type
97
- if (typeof returnStructure[key] === "string" || typeof newValue === "string") {
91
+ const variantResult = flattenSkeleton(aOneOf);
92
+ if (variantResult && typeof variantResult === "object" && !Array.isArray(variantResult)) {
93
+ Object.entries(variantResult).forEach(([key, value]) => {
94
+ if (key === "_variants") return;
95
+ if (returnStructure[key] && JSON.stringify(returnStructure[key]) !== JSON.stringify(value)) {
96
+ if (typeof returnStructure[key] === "string" || typeof value === "string") {
98
97
  returnStructure[key] = "variant";
99
98
  } else {
100
- // For complex types, merge properties
101
- returnStructure[key] = { ...returnStructure[key], ...newValue, _variants: true };
99
+ returnStructure[key] = { ...returnStructure[key], ...value, _variants: true };
102
100
  }
103
101
  } else {
104
- returnStructure[key] = newValue;
102
+ returnStructure[key] = value;
105
103
  }
106
104
  });
107
105
  }
@@ -333,8 +331,8 @@ const toCompact = (obj, indent = "") => {
333
331
  // Check if this is a keyed object (has "*" key)
334
332
  if (keys.length === 1 && keys[0] === "*") {
335
333
  const inner = toCompact(obj["*"], indent);
336
- if (inner === "") {
337
- return "{*}"; // Keyed object of primitives
334
+ if (inner === "" || inner === "{*}") {
335
+ return "{*}"; // Keyed object of primitives (or nested keyed objects with no structure)
338
336
  }
339
337
  return `{*}\n${inner}`;
340
338
  }