@pdtf/schemas 0.10.0 → 0.10.1-a

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": "0.10.0",
3
+ "version": "0.10.1a",
4
4
  "description": "Property Data Trust Framework Schemas and Utilities",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -454,14 +454,18 @@
454
454
  },
455
455
  "occupiers": {
456
456
  "sellerLivesAtProperty": { "yesNo": "Yes" },
457
- "hasOthersAgedOver17": "Yes",
458
- "aged17OrOverNames": [
459
- { "firstName": "Freya", "lastName": "Jones", "age": 21 }
460
- ],
461
- "aged17OrOverTenantsOrLodgers": { "yesNo": "No" },
462
- "soldWithVacantPosesssion": "Yes",
463
- "aged17OrOverAgreedToLeave": { "yesNo": "Yes" },
464
- "over17sWillSignToConfirmWillVacate": { "yesNo": "Yes" }
457
+ "othersAged17OrOver": {
458
+ "hasOthersAged17OrOver": "Yes",
459
+ "aged17OrOverNames": [
460
+ { "firstName": "Freya", "lastName": "Jones", "age": 21 }
461
+ ],
462
+ "aged17OrOverTenantsOrLodgers": { "yesNo": "No" },
463
+ "vacantPossession": {
464
+ "soldWithVacantPossession": "Yes",
465
+ "aged17OrOverAgreedToLeave": { "yesNo": "Yes" },
466
+ "aged17OrOverWillSignToConfirmWillVacate": { "yesNo": "Yes" }
467
+ }
468
+ }
465
469
  },
466
470
  "completionAndMoving": {
467
471
  "willRemoveAllRubbish": true,
@@ -574,7 +574,7 @@
574
574
  "lawSocietyRef": "TA6/11",
575
575
  "title": "Occupiers",
576
576
  "type": "object",
577
- "required": ["sellerLivesAtProperty", "hasOthersAgedOver17"],
577
+ "required": ["sellerLivesAtProperty", "othersAged17OrOver"],
578
578
  "properties": {
579
579
  "sellerLivesAtProperty": {
580
580
  "baspiRef": "B6.1",
@@ -583,119 +583,136 @@
583
583
  "title": "Does the seller live at the property?",
584
584
  "$ref": "#/$defs/yesNo"
585
585
  },
586
- "hasOthersAgedOver17": {
586
+ "othersAged17OrOver": {
587
587
  "baspiRef": "B6.2",
588
588
  "RDSRef": "Participants",
589
589
  "lawSocietyRef": "TA6/11.2",
590
- "title": "Does anyone else, aged 17 or over, live at the property?",
591
- "type": "string",
592
- "enum": ["Yes", "No"]
593
- }
594
- },
595
-
596
- "dependencies": {
597
- "hasOthersAgedOver17": {
598
- "oneOf": [
599
- {
600
- "properties": {
601
- "hasOthersAgedOver17": {
602
- "enum": ["No"]
603
- }
604
- },
605
- "additionalProperties": false
606
- },
607
- {
608
- "properties": {
609
- "hasOthersAgedOver17": {
610
- "enum": ["Yes"]
590
+ "type": "object",
591
+ "properties": {
592
+ "hasOthersAged17OrOver": {
593
+ "baspiRef": "B6.2",
594
+ "RDSRef": "Participants",
595
+ "lawSocietyRef": "TA6/11.2",
596
+ "title": "Does anyone else, aged 17 or over, live at the property?",
597
+ "type": "string",
598
+ "enum": ["Yes", "No"]
599
+ }
600
+ },
601
+ "dependencies": {
602
+ "hasOthersAged17OrOver": {
603
+ "oneOf": [
604
+ {
605
+ "properties": {
606
+ "hasOthersAged17OrOver": {
607
+ "enum": ["No"]
608
+ }
609
+ },
610
+ "additionalProperties": false
611
611
  },
612
- "aged17OrOverNames": {
613
- "lawSocietyRef": "TA6/11.3",
614
- "title": "Please specify their full names and ages.",
615
- "type": "array",
616
- "minItems": 1,
617
- "items": {
618
- "type": "object",
619
- "properties": {
620
- "firstName": {
621
- "title": "First Name",
622
- "type": "string",
623
- "minLength": 1
624
- },
625
- "middleNames": {
626
- "title": "Middle name(s) if any",
627
- "type": "string"
628
- },
629
- "lastName": {
630
- "title": "Last Name",
631
- "type": "string",
632
- "minLength": 1
633
- },
634
- "age": {
635
- "title": "Age",
636
- "type": "integer"
612
+ {
613
+ "properties": {
614
+ "hasOthersAged17OrOver": {
615
+ "enum": ["Yes"]
616
+ },
617
+ "aged17OrOverNames": {
618
+ "lawSocietyRef": "TA6/11.3",
619
+ "title": "Please specify their full names and ages.",
620
+ "type": "array",
621
+ "minItems": 1,
622
+ "items": {
623
+ "type": "object",
624
+ "properties": {
625
+ "firstName": {
626
+ "title": "First Name",
627
+ "type": "string",
628
+ "minLength": 1
629
+ },
630
+ "middleNames": {
631
+ "title": "Middle name(s) if any",
632
+ "type": "string"
633
+ },
634
+ "lastName": {
635
+ "title": "Last Name",
636
+ "type": "string",
637
+ "minLength": 1
638
+ },
639
+ "age": {
640
+ "title": "Age",
641
+ "type": "integer"
642
+ }
643
+ },
644
+ "required": ["firstName", "lastName", "age"]
637
645
  }
638
646
  },
639
- "required": ["firstName", "lastName", "age"]
640
- }
641
- },
642
- "aged17OrOverTenantsOrLodgers": {
643
- "baspiRef": "B6.1",
644
- "RDSRef": "Property/Flags",
645
- "lawSocietyRef": "TA6/11.4",
646
- "title": "Are any of them tenants or lodgers?",
647
- "$ref": "#/$defs/yesNo"
648
- },
649
- "soldWithVacantPosesssion": {
650
- "lawSocietyRef": "TA6/11.5",
651
- "type": "string",
652
- "title": "Is the property being sold with vacant possession?",
653
- "enum": ["Yes", "No"]
654
- }
655
- },
656
- "required": [
657
- "aged17OrOverNames",
658
- "aged17OrOverTenantsOrLodgers",
659
- "soldWithVacantPosesssion"
660
- ],
661
- "dependencies": {
662
- "soldWithVacantPosesssion": {
663
- "oneOf": [
664
- {
647
+ "aged17OrOverTenantsOrLodgers": {
648
+ "baspiRef": "B6.1",
649
+ "RDSRef": "Property/Flags",
650
+ "lawSocietyRef": "TA6/11.4",
651
+ "title": "Are any of them tenants or lodgers?",
652
+ "$ref": "#/$defs/yesNo"
653
+ },
654
+ "vacantPossession": {
655
+ "lawSocietyRef": "TA6/11.5",
656
+ "type": "object",
657
+ "required": ["soldWithVacantPossession"],
665
658
  "properties": {
666
- "soldWithVacantPosesssion": {
667
- "enum": ["No"]
659
+ "soldWithVacantPossession": {
660
+ "type": "string",
661
+ "title": "Is the property being sold with vacant possession?",
662
+ "enum": ["Yes", "No"]
668
663
  }
669
664
  },
670
- "additionalProperties": false
671
- },
672
- {
673
- "properties": {
674
- "soldWithVacantPosesssion": {
675
- "enum": ["Yes"]
676
- },
677
- "aged17OrOverAgreedToLeave": {
678
- "baspiRef": "B6.4",
679
- "RDSRef": "RightsHolders,TenureAgreements,Notifications",
680
- "lawSocietyRef": "TA6/11.5a",
681
- "title": "Have all occupiers aged 17 or over agreed to leave prior to completion?",
682
- "$ref": "#/$defs/yesNo"
683
- },
684
- "aged17OrOverWillSignToConfirmWillVacate": {
685
- "baspiRef": "B6.4",
686
- "RDSRef": "RightsHolders,TenureAgreements,Notifications",
687
- "lawSocietyRef": "TA6/11.5b",
688
- "title": "Have all occupiers aged 17 or over, agreed to sign the sale contract?",
689
- "$ref": "#/$defs/yesNoDetailIfNo",
690
- "description": "If 'No', please supply other evidence that the property will be vacant on completion."
665
+ "dependencies": {
666
+ "soldWithVacantPossession": {
667
+ "oneOf": [
668
+ {
669
+ "properties": {
670
+ "soldWithVacantPossession": {
671
+ "enum": ["No"]
672
+ }
673
+ },
674
+ "additionalProperties": false
675
+ },
676
+ {
677
+ "properties": {
678
+ "soldWithVacantPossession": {
679
+ "enum": ["Yes"]
680
+ },
681
+ "aged17OrOverAgreedToLeave": {
682
+ "baspiRef": "B6.4",
683
+ "RDSRef": "RightsHolders,TenureAgreements,Notifications",
684
+ "lawSocietyRef": "TA6/11.5a",
685
+ "title": "Have all occupiers aged 17 or over agreed to leave prior to completion?",
686
+ "$ref": "#/$defs/yesNo"
687
+ },
688
+ "aged17OrOverWillSignToConfirmWillVacate": {
689
+ "baspiRef": "B6.4",
690
+ "RDSRef": "RightsHolders,TenureAgreements,Notifications",
691
+ "lawSocietyRef": "TA6/11.5b",
692
+ "title": "Have all occupiers aged 17 or over, agreed to sign the sale contract?",
693
+ "$ref": "#/$defs/yesNoDetailIfNo",
694
+ "description": "If 'No', please supply other evidence that the property will be vacant on completion."
695
+ }
696
+ },
697
+ "required": [
698
+ "aged17OrOverAgreedToLeave",
699
+ "aged17OrOverWillSignToConfirmWillVacate"
700
+ ]
701
+ }
702
+ ]
691
703
  }
692
704
  }
693
705
  }
706
+ },
707
+ "required": [
708
+ "aged17OrOverNames",
709
+ "aged17OrOverTenantsOrLodgers",
710
+ "vacantPossession"
694
711
  ]
695
712
  }
696
- }
713
+ ]
697
714
  }
698
- ]
715
+ }
699
716
  }
700
717
  }
701
718
  },
@@ -1639,6 +1639,7 @@
1639
1639
  },
1640
1640
  "hasBeenFlooded": {
1641
1641
  "title": "Has any part of the property (whether buildings or surrounding garden or land) ever been flooded?",
1642
+ "description": "If yes, please state when the flooding occurred and identify the parts that flooded",
1642
1643
  "lawSocietyRef": "TA6/7.2",
1643
1644
  "type": "string",
1644
1645
  "enum": ["Yes", "No"]
@@ -2125,7 +2126,6 @@
2125
2126
  },
2126
2127
  "address": {
2127
2128
  "title": "Address",
2128
-
2129
2129
  "type": "string",
2130
2130
  "minLength": 1
2131
2131
  }
@@ -184,7 +184,7 @@ test("correctly gets titles across schemas, arrays and non-existient title prope
184
184
  expect(
185
185
  getTitleAtPath(
186
186
  transactionSchema,
187
- "/propertyPack/additionalLegalInfo/occupiers/aged17OrOverNames/0/firstName"
187
+ "/propertyPack/additionalLegalInfo/occupiers/othersAged17OrOver/aged17OrOverNames/0/firstName"
188
188
  )
189
189
  ).toBe("First Name");
190
190
  });