@pdtf/schemas 3.0.0-11 → 3.0.0-13

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.0.0-11",
3
+ "version": "3.0.0-13",
4
4
  "description": "Property Data Trust Framework Schemas and Utilities",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -43,7 +43,7 @@
43
43
  "buildInformation": {
44
44
  "building": { "propertyType": "House", "builtForm": "Detached" },
45
45
  "roomDimensions": {
46
- "hasFloorplan": { "yesNo": "Yes" }
46
+ "hasFloorplan": "Yes"
47
47
  }
48
48
  },
49
49
  "delayFactors": {
@@ -466,9 +466,11 @@
466
466
  "riskIndicator": "Yes",
467
467
  "summary": "Likely to flood from surface water"
468
468
  },
469
- "hasBeenFlooded": "Yes",
470
- "details": "Minor basement flood",
471
- "typeOfFlooding": ["Surface water"]
469
+ "historicalFlooding": {
470
+ "hasBeenFlooded": "Yes",
471
+ "details": "Minor basement flood",
472
+ "typeOfFlooding": ["Surface water"]
473
+ }
472
474
  },
473
475
  "radon": {
474
476
  "radonTest": { "yesNo": "No" },
@@ -484,7 +486,7 @@
484
486
  "riskIndicator": "No"
485
487
  },
486
488
  "otherEnvironmental": {
487
- "yesNo": "No"
489
+ "riskIndicator": "No"
488
490
  }
489
491
  },
490
492
  "otherIssues": {
@@ -448,8 +448,20 @@
448
448
  "ntsRef": "B1.1.1",
449
449
  "title": "Building informatiom",
450
450
  "type": "object",
451
- "ntsRequired": ["propertyType"],
451
+ "ntsRequired": ["builtForm", "propertyType"],
452
452
  "properties": {
453
+ "builtForm": {
454
+ "ntsRef": "B1.1.2",
455
+ "title": "Built form",
456
+ "type": "string",
457
+ "enum": [
458
+ "Detached",
459
+ "Semi-detached",
460
+ "Terraced",
461
+ "End of terrace",
462
+ "Other"
463
+ ]
464
+ },
453
465
  "propertyType": {
454
466
  "ntsRef": "B1.1.1.1",
455
467
  "title": "Property type",
@@ -486,39 +498,14 @@
486
498
  "properties": {
487
499
  "propertyType": {
488
500
  "enum": ["House", "Bungalow"]
489
- },
490
- "builtForm": {
491
- "ntsRef": "B1.1.2",
492
- "title": "Built form",
493
- "type": "string",
494
- "enum": [
495
- "Detached",
496
- "Semi-detached",
497
- "Terraced",
498
- "End of terrace",
499
- "Other"
500
- ]
501
501
  }
502
- },
503
- "ntsRequired": ["builtForm"]
502
+ }
504
503
  },
505
504
  {
506
505
  "properties": {
507
506
  "propertyType": {
508
507
  "enum": ["Maisonette", "Flat"]
509
508
  },
510
- "builtForm": {
511
- "ntsRef": "B1.1.2",
512
- "title": "Built form",
513
- "type": "string",
514
- "enum": [
515
- "Detached",
516
- "Semi-detached",
517
- "Terraced",
518
- "End of terrace",
519
- "Other"
520
- ]
521
- },
522
509
  "numberOfFloors": {
523
510
  "ntsRef": "B1.1.3",
524
511
  "title": "Number of floors in the building",
@@ -532,14 +519,13 @@
532
519
  },
533
520
  "hasLift": {
534
521
  "ntsRef": "B1.1.5",
535
- "title": "Entrance floor",
536
- "description": "Is the property served by a lift?",
522
+ "title": "Is the property served by a lift?",
537
523
  "type": "string",
538
524
  "enum": ["Yes", "No"]
539
525
  },
540
526
  "overCommercialPremises": {
541
527
  "ntsRef": "B1.1.6",
542
- "title": "Is the property located over commercial premises?",
528
+ "title": "Located over commercial premises?",
543
529
  "type": "object",
544
530
  "properties": {
545
531
  "isLocatedOverCommercialPremises": {
@@ -579,7 +565,6 @@
579
565
  }
580
566
  },
581
567
  "ntsRequired": [
582
- "builtForm",
583
568
  "numberOfFloors",
584
569
  "entranceFloor",
585
570
  "hasLift",
@@ -622,111 +607,94 @@
622
607
  "ntsRef": "B2",
623
608
  "title": "Room dimensions",
624
609
  "type": "object",
625
- "baspiRequired": ["hasFloorplan"],
610
+ "ntsRequired": ["hasFloorplan"],
626
611
  "properties": {
627
612
  "hasFloorplan": {
628
613
  "ntsRef": "B2.1",
629
614
  "title": "Is a floorplan available which includes the dimensions of all the rooms?",
630
- "type": "object",
615
+ "type": "string",
616
+ "enum": ["Yes", "No"]
617
+ }
618
+ },
619
+ "discriminator": {
620
+ "propertyName": "hasFloorplan"
621
+ },
622
+ "oneOf": [
623
+ {
631
624
  "properties": {
632
- "yesNo": {
633
- "ntsRef": "B2.1.1",
634
- "type": "string",
635
- "title": "",
636
- "enum": ["Yes", "No"]
625
+ "hasFloorplan": {
626
+ "enum": ["Yes"]
637
627
  }
638
- },
639
- "ntsRequired": ["yesNo"],
640
- "discriminator": {
641
- "propertyName": "yesNo"
642
- },
643
- "oneOf": [
644
- {
645
- "properties": {
646
- "yesNo": {
647
- "enum": ["Yes"]
648
- }
649
- }
628
+ }
629
+ },
630
+ {
631
+ "properties": {
632
+ "hasFloorplan": {
633
+ "enum": ["No"]
650
634
  },
651
- {
652
- "properties": {
653
- "yesNo": {
654
- "enum": ["No"]
655
- },
656
- "rooms": {
657
- "ntsRef": "B2",
658
- "title": "Rooms",
659
- "description": "Please supply dimensions for each of the rooms.",
660
- "type": "array",
661
- "items": {
662
- "type": "object",
663
- "properties": {
664
- "roomName": {
665
- "ntsRef": "B2.1.1",
666
- "type": "string",
667
- "title": "The name of the room",
668
- "minLength": 1
669
- },
670
- "description": {
671
- "ntsRef": "B2.1.2",
672
- "type": "string",
673
- "minLength": 1,
674
- "title": "Description of the room"
675
- },
676
- "length": {
677
- "ntsRef": "B2.1.3",
678
- "type": "number",
679
- "minimum": 0,
680
- "title": "The length of the room"
681
- },
682
- "width": {
683
- "ntsRef": "B2.1.4",
684
- "type": "number",
685
- "minimum": 0,
686
- "title": "The width of the room"
687
- },
688
- "units": {
689
- "ntsRef": "B2.1.5",
690
- "title": "The units which the length and width of the room have been provided in",
691
- "type": "string",
692
- "enum": [
693
- "meters",
694
- "centimetres",
695
- "millimetres",
696
- "feet",
697
- "inches"
698
- ]
699
- },
700
- "dimensionDetails": {
701
- "ntsRef": "B2.6",
702
- "title": "Any additional description or clarification of the room dimensions",
703
- "type": "string",
704
- "minLength": 1
705
- },
706
- "photoUrls": {
707
- "ntsRef": "B2.7",
708
- "title": "The URLs of images which should be associated with this room",
709
- "type": "array",
710
- "items": {
711
- "type": "string",
712
- "format": "uri"
713
- }
714
- }
715
- },
716
- "ntsRequired": [
717
- "roomName",
718
- "length",
719
- "width",
720
- "units"
635
+ "rooms": {
636
+ "ntsRef": "B2.2",
637
+ "title": "Rooms",
638
+ "description": "Please supply dimensions for each of the rooms.",
639
+ "type": "array",
640
+ "items": {
641
+ "type": "object",
642
+ "properties": {
643
+ "roomName": {
644
+ "ntsRef": "B2.2.1",
645
+ "type": "string",
646
+ "title": "The name of the room",
647
+ "minLength": 1
648
+ },
649
+ "description": {
650
+ "ntsRef": "B2.2.2",
651
+ "type": "string",
652
+ "minLength": 1,
653
+ "title": "Description of the room"
654
+ },
655
+ "length": {
656
+ "ntsRef": "B2.2.3",
657
+ "type": "number",
658
+ "minimum": 0,
659
+ "title": "The length of the room"
660
+ },
661
+ "width": {
662
+ "ntsRef": "B2.2.4",
663
+ "type": "number",
664
+ "minimum": 0,
665
+ "title": "The width of the room"
666
+ },
667
+ "units": {
668
+ "ntsRef": "B2.2.5",
669
+ "title": "The units which the length and width of the room have been provided in",
670
+ "type": "string",
671
+ "enum": [
672
+ "meters",
673
+ "centimetres",
674
+ "millimetres",
675
+ "feet",
676
+ "inches"
721
677
  ]
678
+ },
679
+ "dimensionDetails": {
680
+ "ntsRef": "B2.6",
681
+ "title": "Any additional description or clarification of the room dimensions",
682
+ "type": "string",
683
+ "minLength": 1
722
684
  }
723
- }
724
- },
725
- "ntsRequired": ["rooms"]
685
+ },
686
+ "ntsRequired": [
687
+ "roomName",
688
+ "length",
689
+ "width",
690
+ "units"
691
+ ]
692
+ }
726
693
  }
727
- ]
694
+ },
695
+ "ntsRequired": ["rooms"]
728
696
  }
729
- }
697
+ ]
730
698
  }
731
699
  }
732
700
  },
@@ -21371,9 +21339,9 @@
21371
21339
  "ta6Ref": "7.1.0",
21372
21340
  "title": "Flooding",
21373
21341
  "type": "object",
21374
- "baspiRequired": ["hasBeenFlooded"],
21375
- "ntsRequired": ["floodRisk", "hasBeenFlooded"],
21376
- "ta6Required": ["hasBeenFlooded"],
21342
+ "baspiRequired": ["historicalFlooding"],
21343
+ "ntsRequired": ["floodRisk", "historicalFlooding"],
21344
+ "ta6Required": ["historicalFlooding"],
21377
21345
  "properties": {
21378
21346
  "floodRisk": {
21379
21347
  "ntsRef": "C3.1.1.1",
@@ -21484,64 +21452,76 @@
21484
21452
  }
21485
21453
  ]
21486
21454
  },
21487
- "hasBeenFlooded": {
21455
+ "historicalFlooding": {
21488
21456
  "ntsRef": "C3.1.1.2",
21489
21457
  "baspiRef": "A11.1.2",
21490
21458
  "ta6Ref": "7.1.1",
21491
- "title": "Has any part of the property (whether buildings or surrounding garden or land) ever been flooded?",
21492
- "type": "string",
21493
- "enum": ["Yes", "No"]
21494
- }
21495
- },
21496
- "discriminator": {
21497
- "propertyName": "hasBeenFlooded"
21498
- },
21499
- "oneOf": [
21500
- {
21501
- "properties": {
21502
- "hasBeenFlooded": {
21503
- "enum": ["No"]
21504
- }
21505
- }
21506
- },
21507
- {
21459
+ "title": "Historical flooding",
21460
+ "type": "object",
21461
+ "baspiRequired": ["hasBeenFlooded"],
21462
+ "ntsRequired": ["hasBeenFlooded"],
21463
+ "ta6Required": ["hasBeenFlooded"],
21508
21464
  "properties": {
21509
21465
  "hasBeenFlooded": {
21510
- "enum": ["Yes"]
21511
- },
21512
- "typeOfFlooding": {
21513
- "ntsRef": "C3.1.1.3",
21514
- "baspiRef": "A11.1.2.2",
21515
- "rdsRef": "Sustainability/Environmental|Natural|Situational",
21516
- "ta6Ref": "7.2",
21517
- "title": "What type of flooding occurred?",
21518
- "type": "array",
21519
- "items": {
21520
- "type": "string",
21521
- "enum": [
21522
- "Ground water",
21523
- "Sewer",
21524
- "Surface water",
21525
- "Coastal flooding",
21526
- "River flooding",
21527
- "Other"
21528
- ]
21529
- }
21530
- },
21531
- "details": {
21532
- "ntsRef": "C3.1.1.4",
21466
+ "ntsRef": "C3.1.1.2.1",
21533
21467
  "baspiRef": "A11.1.2.1",
21534
- "ta6Ref": "7.1.2",
21535
- "title": "Please state when the flooding occurred and identify the parts that flooded",
21468
+ "ta6Ref": "7.1.1.1",
21469
+ "title": "Has any part of the property (whether buildings or surrounding garden or land) ever been flooded?",
21536
21470
  "type": "string",
21537
- "minLength": 1
21471
+ "enum": ["Yes", "No"]
21538
21472
  }
21539
21473
  },
21540
- "baspiRequired": ["typeOfFlooding", "details"],
21541
- "ntsRequired": ["typeOfFlooding", "details"],
21542
- "ta6Required": ["typeOfFlooding", "details"]
21474
+ "discriminator": {
21475
+ "propertyName": "hasBeenFlooded"
21476
+ },
21477
+ "oneOf": [
21478
+ {
21479
+ "properties": {
21480
+ "hasBeenFlooded": {
21481
+ "enum": ["No"]
21482
+ }
21483
+ }
21484
+ },
21485
+ {
21486
+ "properties": {
21487
+ "hasBeenFlooded": {
21488
+ "enum": ["Yes"]
21489
+ },
21490
+ "typeOfFlooding": {
21491
+ "ntsRef": "C3.1.1.3",
21492
+ "baspiRef": "A11.1.2.2",
21493
+ "rdsRef": "Sustainability/Environmental|Natural|Situational",
21494
+ "ta6Ref": "7.2",
21495
+ "title": "What type of flooding occurred?",
21496
+ "type": "array",
21497
+ "items": {
21498
+ "type": "string",
21499
+ "enum": [
21500
+ "Ground water",
21501
+ "Sewer",
21502
+ "Surface water",
21503
+ "Coastal flooding",
21504
+ "River flooding",
21505
+ "Other"
21506
+ ]
21507
+ }
21508
+ },
21509
+ "details": {
21510
+ "ntsRef": "C3.1.1.4",
21511
+ "baspiRef": "A11.1.2.1",
21512
+ "ta6Ref": "7.1.2",
21513
+ "title": "Please state when the flooding occurred and identify the parts that flooded",
21514
+ "type": "string",
21515
+ "minLength": 1
21516
+ }
21517
+ },
21518
+ "baspiRequired": ["typeOfFlooding", "details"],
21519
+ "ntsRequired": ["typeOfFlooding", "details"],
21520
+ "ta6Required": ["typeOfFlooding", "details"]
21521
+ }
21522
+ ]
21543
21523
  }
21544
- ]
21524
+ }
21545
21525
  },
21546
21526
  "radon": {
21547
21527
  "baspiRef": "A11.1.3",
@@ -22546,7 +22526,7 @@
22546
22526
  "title": "To your knowledge, have there been any other environmental issues that affect the property or garden (for example, these could include air pollution, mining, sink holes, quarrying or fracking etc)?",
22547
22527
  "type": "object",
22548
22528
  "properties": {
22549
- "yesNo": {
22529
+ "riskIndicator": {
22550
22530
  "piqRef": "A11.5.1",
22551
22531
  "baspiRef": "A11.1.4.1",
22552
22532
  "type": "string",
@@ -22554,31 +22534,31 @@
22554
22534
  "enum": ["Yes", "No"]
22555
22535
  }
22556
22536
  },
22557
- "baspiRequired": ["yesNo"],
22537
+ "baspiRequired": ["riskIndicator"],
22558
22538
  "discriminator": {
22559
- "propertyName": "yesNo"
22539
+ "propertyName": "riskIndicator"
22560
22540
  },
22561
22541
  "oneOf": [
22562
22542
  {
22563
22543
  "properties": {
22564
- "yesNo": {
22544
+ "riskIndicator": {
22565
22545
  "enum": ["No", "Not known"]
22566
22546
  }
22567
22547
  }
22568
22548
  },
22569
22549
  {
22570
22550
  "properties": {
22571
- "yesNo": {
22551
+ "riskIndicator": {
22572
22552
  "enum": ["Yes"]
22573
22553
  },
22574
- "details": {
22554
+ "summary": {
22575
22555
  "baspiRef": "A11.1.4.2",
22576
22556
  "title": "Please provide details. For example the level of air pollution, location of fracking etc, and whether any action has been taken to prevent harm.",
22577
22557
  "type": "string",
22578
22558
  "minLength": 1
22579
22559
  }
22580
22560
  },
22581
- "baspiRequired": ["details"]
22561
+ "baspiRequired": ["summary"]
22582
22562
  }
22583
22563
  ]
22584
22564
  }
@@ -99,15 +99,6 @@
99
99
  ]
100
100
  }
101
101
  },
102
- "buildInformation": {
103
- "properties": {
104
- "roomDimensions": {
105
- "required": [
106
- "hasFloorplan"
107
- ]
108
- }
109
- }
110
- },
111
102
  "delayFactors": {
112
103
  "baspiRef": "A1.2",
113
104
  "required": [
@@ -5486,41 +5477,8 @@
5486
5477
  "properties": {
5487
5478
  "flooding": {
5488
5479
  "baspiRef": "A11.1.1",
5489
- "discriminator": {
5490
- "propertyName": "hasBeenFlooded"
5491
- },
5492
- "oneOf": [
5493
- {
5494
- "properties": {
5495
- "hasBeenFlooded": {
5496
- "enum": [
5497
- "No"
5498
- ]
5499
- }
5500
- }
5501
- },
5502
- {
5503
- "properties": {
5504
- "hasBeenFlooded": {
5505
- "enum": [
5506
- "Yes"
5507
- ]
5508
- },
5509
- "typeOfFlooding": {
5510
- "baspiRef": "A11.1.2.2"
5511
- },
5512
- "details": {
5513
- "baspiRef": "A11.1.2.1"
5514
- }
5515
- },
5516
- "required": [
5517
- "typeOfFlooding",
5518
- "details"
5519
- ]
5520
- }
5521
- ],
5522
5480
  "required": [
5523
- "hasBeenFlooded"
5481
+ "historicalFlooding"
5524
5482
  ],
5525
5483
  "properties": {
5526
5484
  "floodRisk": {
@@ -5533,8 +5491,49 @@
5533
5491
  }
5534
5492
  }
5535
5493
  },
5536
- "hasBeenFlooded": {
5537
- "baspiRef": "A11.1.2"
5494
+ "historicalFlooding": {
5495
+ "baspiRef": "A11.1.2",
5496
+ "discriminator": {
5497
+ "propertyName": "hasBeenFlooded"
5498
+ },
5499
+ "oneOf": [
5500
+ {
5501
+ "properties": {
5502
+ "hasBeenFlooded": {
5503
+ "enum": [
5504
+ "No"
5505
+ ]
5506
+ }
5507
+ }
5508
+ },
5509
+ {
5510
+ "properties": {
5511
+ "hasBeenFlooded": {
5512
+ "enum": [
5513
+ "Yes"
5514
+ ]
5515
+ },
5516
+ "typeOfFlooding": {
5517
+ "baspiRef": "A11.1.2.2"
5518
+ },
5519
+ "details": {
5520
+ "baspiRef": "A11.1.2.1"
5521
+ }
5522
+ },
5523
+ "required": [
5524
+ "typeOfFlooding",
5525
+ "details"
5526
+ ]
5527
+ }
5528
+ ],
5529
+ "required": [
5530
+ "hasBeenFlooded"
5531
+ ],
5532
+ "properties": {
5533
+ "hasBeenFlooded": {
5534
+ "baspiRef": "A11.1.2.1"
5535
+ }
5536
+ }
5538
5537
  }
5539
5538
  }
5540
5539
  },
@@ -5605,12 +5604,12 @@
5605
5604
  "otherEnvironmental": {
5606
5605
  "baspiRef": "A11.1.4",
5607
5606
  "discriminator": {
5608
- "propertyName": "yesNo"
5607
+ "propertyName": "riskIndicator"
5609
5608
  },
5610
5609
  "oneOf": [
5611
5610
  {
5612
5611
  "properties": {
5613
- "yesNo": {
5612
+ "riskIndicator": {
5614
5613
  "enum": [
5615
5614
  "No",
5616
5615
  "Not known"
@@ -5620,25 +5619,25 @@
5620
5619
  },
5621
5620
  {
5622
5621
  "properties": {
5623
- "yesNo": {
5622
+ "riskIndicator": {
5624
5623
  "enum": [
5625
5624
  "Yes"
5626
5625
  ]
5627
5626
  },
5628
- "details": {
5627
+ "summary": {
5629
5628
  "baspiRef": "A11.1.4.2"
5630
5629
  }
5631
5630
  },
5632
5631
  "required": [
5633
- "details"
5632
+ "summary"
5634
5633
  ]
5635
5634
  }
5636
5635
  ],
5637
5636
  "required": [
5638
- "yesNo"
5637
+ "riskIndicator"
5639
5638
  ],
5640
5639
  "properties": {
5641
- "yesNo": {
5640
+ "riskIndicator": {
5642
5641
  "baspiRef": "A11.1.4.1"
5643
5642
  }
5644
5643
  }