@pdtf/schemas 0.7.6 → 0.9.0

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.
@@ -0,0 +1,50 @@
1
+ # Sample workflow for building and deploying a Jekyll site to GitHub Pages
2
+ name: Deploy Jekyll with GitHub Pages dependencies preinstalled
3
+
4
+ on:
5
+ # Runs on pushes targeting the default branch
6
+ push:
7
+ branches: ["master"]
8
+
9
+ # Allows you to run this workflow manually from the Actions tab
10
+ workflow_dispatch:
11
+
12
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13
+ permissions:
14
+ contents: read
15
+ pages: write
16
+ id-token: write
17
+
18
+ # Allow one concurrent deployment
19
+ concurrency:
20
+ group: "pages"
21
+ cancel-in-progress: true
22
+
23
+ jobs:
24
+ # Build job
25
+ build:
26
+ runs-on: ubuntu-latest
27
+ steps:
28
+ - name: Checkout
29
+ uses: actions/checkout@v3
30
+ - name: Setup Pages
31
+ uses: actions/configure-pages@v2
32
+ - name: Build with Jekyll
33
+ uses: actions/jekyll-build-pages@v1
34
+ with:
35
+ source: src
36
+ destination: ./_site
37
+ - name: Upload artifact
38
+ uses: actions/upload-pages-artifact@v1
39
+
40
+ # Deployment job
41
+ deploy:
42
+ environment:
43
+ name: github-pages
44
+ url: ${{ steps.deployment.outputs.page_url }}
45
+ runs-on: ubuntu-latest
46
+ needs: build
47
+ steps:
48
+ - name: Deploy to GitHub Pages
49
+ id: deployment
50
+ uses: actions/deploy-pages@v1
package/CNAME ADDED
@@ -0,0 +1 @@
1
+ trust.propdata.org.uk
package/index.js CHANGED
@@ -2,24 +2,33 @@ const { dereference } = require("@jdw/jst");
2
2
  const Ajv = require("ajv");
3
3
  const addFormats = require("ajv-formats");
4
4
 
5
- const pdtfTransaction = require("./src/schemas/pdtf-transaction.json");
6
- const materialFacts = require("./src/schemas/material-facts.json");
7
- const legalInformation = require("./src/schemas/legal-information.json");
8
- const energyPerformanceCertificate = require("./src/schemas/energy-performance-certificate.json");
9
- const titleDeed = require("./src/schemas/title-deed.json");
10
- const geoJson = require("./src/schemas/GeoJSON.json");
11
- const verifiedClaimsSchema = require("./src/schemas/pdtf-verified-claims.json");
5
+ const pdtfTransaction = require("./src/schemas/v1/pdtf-transaction.json");
6
+ const materialFacts = require("./src/schemas/v1/material-facts.json");
7
+ const legalInformation = require("./src/schemas/v1/legal-information.json");
8
+ const energyPerformanceCertificate = require("./src/schemas/v1/energy-performance-certificate.json");
9
+ const titleDeed = require("./src/schemas/v1/title-deed.json");
10
+ const searches = require("./src/schemas/v1/searches.json");
11
+ const localLandCharges = require("./src/schemas/v1/searches/local-land-charges.json");
12
+ const localSearchesRequired = require("./src/schemas/v1/searches/local-searches-required.json");
13
+ const drainageAndWater = require("./src/schemas/v1/searches/drainage-and-water.json");
14
+ const geoJson = require("./src/schemas/v1/GeoJSON.json");
15
+ const verifiedClaimsSchema = require("./src/schemas/v1/pdtf-verified-claims.json");
12
16
 
13
17
  const subSchemas = {
14
- "https://raw.githubusercontent.com/Property-Data-Trust-Framework/schemas/master/src/schemas/material-facts.json":
15
- materialFacts,
16
- "https://raw.githubusercontent.com/Property-Data-Trust-Framework/schemas/master/src/schemas/legal-information.json":
18
+ "https://trust.propdata.org.uk/schemas/v1/material-facts.json": materialFacts,
19
+ "https://trust.propdata.org.uk/schemas/v1/legal-information.json":
17
20
  legalInformation,
18
- "https://raw.githubusercontent.com/Property-Data-Trust-Framework/schemas/master/src/schemas/energy-performance-certificate.json":
21
+ "https://trust.propdata.org.uk/schemas/v1/energy-performance-certificate.json":
19
22
  energyPerformanceCertificate,
20
23
  "https://geojson.org/schema/GeoJSON.json": geoJson,
21
- "https://raw.githubusercontent.com/Property-Data-Trust-Framework/schemas/master/src/schemas/title-deed.json":
22
- titleDeed,
24
+ "https://trust.propdata.org.uk/schemas/v1/title-deed.json": titleDeed,
25
+ "https://trust.propdata.org.uk/schemas/v1/searches.json": searches,
26
+ "https://trust.propdata.org.uk/schemas/v1/searches/local-land-charges.json":
27
+ localLandCharges,
28
+ "https://trust.propdata.org.uk/schemas/v1/searches/local-searches-required.json":
29
+ localSearchesRequired,
30
+ "https://trust.propdata.org.uk/schemas/v1/searches/drainage-and-water.json":
31
+ drainageAndWater,
23
32
  };
24
33
 
25
34
  const transactionSchema = dereference(pdtfTransaction, (id) => subSchemas[id]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdtf/schemas",
3
- "version": "0.7.6",
3
+ "version": "0.9.0",
4
4
  "description": "Property Data Trust Framework Schemas and Utilities",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://raw.githubusercontent.com/Property-Data-Trust-Framework/schemas/master/src/schemas/pdtf-transaction.json",
2
+ "$schema": "https://trust.propdata.org.uk/schemas/v1/pdtf-transaction.json",
3
3
  "transactionId": "3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a",
4
4
  "status": "active",
5
5
  "participants": [
@@ -290,13 +290,13 @@
290
290
  }
291
291
  },
292
292
  "insurance": {
293
+ "isInsured": "Yes",
293
294
  "difficultiesObtainingInsurance": {
294
295
  "yesNo": "No"
295
296
  },
296
297
  "insuranceClaims": {
297
298
  "yesNo": "No"
298
- },
299
- "isInsured": "Yes"
299
+ }
300
300
  },
301
301
  "boundaries": {
302
302
  "partOutsideLegalOwnership": {
@@ -407,8 +407,14 @@
407
407
  },
408
408
  "occupiers": {
409
409
  "sellerLivesAtProperty": { "yesNo": "Yes" },
410
- "otherOver17sAtProperty": [],
411
- "over17sWillSignToConfirmWillVacate": { "yesNo": "Yes" }
410
+ "otherOver17sAtProperty": {
411
+ "hasOver17s": "Yes",
412
+ "over17sNames": [
413
+ { "firstName": "Freya", "lastName": "Jones", "age": 21 }
414
+ ],
415
+ "over17sTenantsOrLodgers": { "yesNo": "No" },
416
+ "over17sWillSignToConfirmWillVacate": { "yesNo": "Yes" }
417
+ }
412
418
  },
413
419
  "completionAndMoving": {
414
420
  "willRemoveAllRubbish": true,
@@ -716,6 +722,128 @@
716
722
  }
717
723
  }
718
724
  }
725
+ ],
726
+ "searches": [
727
+ {
728
+ "displayName": "Groundsure Homebuyers",
729
+ "productCode": "GSEnviro",
730
+ "providerName": "TM Group",
731
+ "status": "Ordered",
732
+ "orderDate": "2022-10-06T08:55:49.483",
733
+ "expectedDeliveryDate": "2022-10-10T08:55:49",
734
+ "searchContentTypes": ["Flood", "Contaminated Land", "Ground Stability"]
735
+ },
736
+ {
737
+ "displayName": "Drainage and Water Enquiry (Residential)",
738
+ "productCode": "Con29DW",
739
+ "providerName": "TM Group",
740
+ "status": "Ordered",
741
+ "orderDate": "2022-10-06T08:55:49.5",
742
+ "expectedDeliveryDate": "2022-10-13T08:55:49",
743
+ "searchContentTypes": ["Drainage and Water Searches"]
744
+ },
745
+ {
746
+ "displayName": "Environmental Risk Flags",
747
+ "productCode": "TMRiskFlags",
748
+ "providerName": "TM Group",
749
+ "status": "Delivered",
750
+ "reportDate": "2022-10-13T08:55:49",
751
+ "searchContentTypes": [
752
+ "Coal",
753
+ "Bath Stone",
754
+ "Metalliferous (Tin)",
755
+ "Kaolin & Ball Clay",
756
+ "Limestone",
757
+ "Brine",
758
+ "HS2",
759
+ "Flood",
760
+ "Crossrail",
761
+ "Energy Exploration",
762
+ "Wind Farms",
763
+ "Renewable Power Plants",
764
+ "Solar Farms",
765
+ "London Underground",
766
+ "Ground Stability",
767
+ "Non Coal Mining",
768
+ "Ground Movement",
769
+ "Mineral"
770
+ ],
771
+
772
+ "results": [
773
+ {
774
+ "contentType": "Coal",
775
+ "recommendedActionIndicator": "No"
776
+ },
777
+ {
778
+ "contentType": "Bath Stone",
779
+ "recommendedActionIndicator": "No"
780
+ },
781
+ {
782
+ "contentType": "Metalliferous (Tin)",
783
+ "recommendedActionIndicator": "No"
784
+ },
785
+ {
786
+ "contentType": "Kaolin & Ball Clay",
787
+ "recommendedActionIndicator": "No"
788
+ },
789
+ {
790
+ "contentType": "Limestone",
791
+ "recommendedActionIndicator": "No"
792
+ },
793
+ {
794
+ "contentType": "Brine",
795
+ "recommendedActionIndicator": "No"
796
+ },
797
+ {
798
+ "contentType": "HS2",
799
+ "recommendedActionIndicator": "No"
800
+ },
801
+ {
802
+ "contentType": "Flood",
803
+ "recommendedActionIndicator": "Yes"
804
+ },
805
+ {
806
+ "contentType": "Crossrail",
807
+ "recommendedActionIndicator": "No"
808
+ },
809
+ {
810
+ "contentType": "Energy Exploration",
811
+ "recommendedActionIndicator": "No"
812
+ },
813
+ {
814
+ "contentType": "Wind Farms",
815
+ "recommendedActionIndicator": "No"
816
+ },
817
+ {
818
+ "contentType": "Renewable Power Plants",
819
+ "recommendedActionIndicator": "No"
820
+ },
821
+ {
822
+ "contentType": "Solar Farms",
823
+ "recommendedActionIndicator": "No"
824
+ },
825
+ {
826
+ "contentType": "London Underground",
827
+ "recommendedActionIndicator": "No"
828
+ },
829
+ {
830
+ "contentType": "Ground Stability",
831
+ "recommendedActionIndicator": "Yes"
832
+ },
833
+ {
834
+ "contentType": "Non Coal Mining",
835
+ "recommendedActionIndicator": "No"
836
+ },
837
+ {
838
+ "contentType": "Ground Movement",
839
+ "recommendedActionIndicator": "No"
840
+ },
841
+ {
842
+ "contentType": "Mineral",
843
+ "recommendedActionIndicator": "No"
844
+ }
845
+ ]
846
+ }
719
847
  ]
720
848
  }
721
849
  }
File without changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://raw.githubusercontent.com/Property-Data-Trust-Framework/schemas/master/src/schemas/energy-performance-certificate.json",
3
+ "$id": "https://trust.propdata.org.uk/schemas/v1/energy-performance-certificate.json",
4
4
  "type": "object",
5
5
  "title": "Energy Performance Certificate and Recommendations Schema, supporting data retrieved from https://epc.opendatacommunities.org ",
6
6
  "description": "Mirrors the Domestic EPC Glossary at https://epc.opendatacommunities.org/docs/guidance#glossary",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://raw.githubusercontent.com/Property-Data-Trust-Framework/schemas/master/src/schemas/baspi-b-legal-information.json",
3
+ "$id": "https://trust.propdata.org.uk/schemas/v1/legal-information.json",
4
4
  "type": "object",
5
5
  "title": "Additional information required for the legal process",
6
6
  "description": "A schema defining Part B of BASPI v2.0 spporting mapping to BASPI, Law Society and RICS Data Schema elements.",
@@ -105,6 +105,7 @@
105
105
  },
106
106
  "legalBoundaries": {
107
107
  "baspiRef": "B2.1",
108
+ "lawSocietyRef": "TA6/1",
108
109
  "title": "Legal Boundaries",
109
110
  "description": "Please indicate who has repaired, or treated as belonging to them, each of the boundaries. Identify each boundary as if you were looking at the property from the road",
110
111
  "type": "object",
@@ -281,12 +282,14 @@
281
282
  },
282
283
  "yearInstalled": {
283
284
  "baspiRef": "B4.3.1",
285
+ "lawSocietyRef": "TA6/4.6a",
284
286
  "RDSRef": "Objects/Installation",
285
287
  "title": "What year were they installed?",
286
288
  "type": "number"
287
289
  },
288
290
  "panelsOwnedOutright": {
289
291
  "baspiRef": "",
292
+ "lawSocietyRef": "TA6/4.6b",
290
293
  "RDSRef": "Objects/Ownership",
291
294
  "title": "Do you own the panels, and all equipment related to them, outright?",
292
295
  "$ref": "#/$defs/yesNoDetailIfNo",
@@ -294,6 +297,7 @@
294
297
  },
295
298
  "panelProviderLease": {
296
299
  "baspiRef": "B4.3.2",
300
+ "lawSocietyRef": "TA6/4.6c",
297
301
  "RDSRef": "Objects/Ownership",
298
302
  "title": "Is there an existing long lease of the roof/air space granted to a panel provider?",
299
303
  "$ref": "#/$defs/yesNoDetailIfYes",
@@ -367,7 +371,6 @@
367
371
  },
368
372
  "smartHomeSystems": {
369
373
  "baspiRef": "B7.4",
370
- "RDSRef": "",
371
374
  "title": "Smart Home Systems",
372
375
  "type": "object",
373
376
  "required": ["hasSmartHomeSystems"],
@@ -460,7 +463,7 @@
460
463
  "baspiRef": "B5.1.1",
461
464
  "RDSRef": "Certificates",
462
465
  "lawSocietyRef": "TA6/5.1a",
463
- "title": "New Home Warranty",
466
+ "title": "New Home Warranty (NHBC or similar)",
464
467
  "$ref": "#/$defs/yesNoDetailIfYes",
465
468
  "description": "If yes, please confirm the name of the warranty provider and the date of the warranty:"
466
469
  },
@@ -510,7 +513,7 @@
510
513
  "baspiRef": "B5.1.8",
511
514
  "RDSRef": "Certificates",
512
515
  "lawSocietyRef": "TA6/5.1h",
513
- "title": "Preventative work and/or remedial action relating to subsidence",
516
+ "title": "Underpinning or other preventative work and/or remedial action relating to subsidence",
514
517
  "$ref": "#/$defs/yesNo"
515
518
  },
516
519
  "solarPanels": {
@@ -571,10 +574,7 @@
571
574
  "baspiRef": "B6",
572
575
  "title": "Occupiers",
573
576
  "type": "object",
574
- "required": [
575
- "sellerLivesAtProperty",
576
- "over17sWillSignToConfirmWillVacate"
577
- ],
577
+ "required": ["sellerLivesAtProperty", "otherOver17sAtProperty"],
578
578
  "properties": {
579
579
  "sellerLivesAtProperty": {
580
580
  "baspiRef": "B6.1",
@@ -586,41 +586,87 @@
586
586
  "otherOver17sAtProperty": {
587
587
  "baspiRef": "B6.2",
588
588
  "RDSRef": "Participants",
589
- "lawSocietyRef": "TA6/11.3",
590
- "title": "Please specify the full names and ages of anyone aged over 17, other than the owner(s), who live at the property?",
591
- "type": "array",
592
- "items": {
593
- "type": "object",
594
- "properties": {
595
- "firstName": {
596
- "title": "First Name",
597
- "type": "string",
598
- "minLength": 1
599
- },
600
- "middleNames": {
601
- "title": "Middle name(s) if any",
602
- "type": "string"
603
- },
604
- "lastName": {
605
- "title": "Last Name",
606
- "type": "string",
607
- "minLength": 1
608
- },
609
- "age": {
610
- "title": "Age",
611
- "type": "integer"
612
- }
613
- },
614
- "required": ["firstName", "lastName", "age"]
589
+ "lawSocietyRef": "TA6/11.1",
590
+ "title": "Does anyone else, aged 17 or over, live at the property?",
591
+ "type": "object",
592
+ "properties": {
593
+ "hasOver17s": {
594
+ "type": "string",
595
+ "title": "",
596
+ "enum": ["Yes", "No"]
597
+ }
598
+ },
599
+ "required": ["hasOver17s"],
600
+ "dependencies": {
601
+ "yesNo": {
602
+ "oneOf": [
603
+ {
604
+ "properties": {
605
+ "hasOver17s": {
606
+ "enum": ["No"]
607
+ }
608
+ },
609
+ "additionalProperties": false
610
+ },
611
+ {
612
+ "properties": {
613
+ "hasOver17s": {
614
+ "enum": ["Yes"]
615
+ },
616
+ "over17sNames": {
617
+ "lawSocietyRef": "TA6/11.3",
618
+ "title": "Please specify their full names and ages.",
619
+ "type": "array",
620
+ "items": {
621
+ "type": "object",
622
+ "properties": {
623
+ "firstName": {
624
+ "title": "First Name",
625
+ "type": "string",
626
+ "minLength": 1
627
+ },
628
+ "middleNames": {
629
+ "title": "Middle name(s) if any",
630
+ "type": "string"
631
+ },
632
+ "lastName": {
633
+ "title": "Last Name",
634
+ "type": "string",
635
+ "minLength": 1
636
+ },
637
+ "age": {
638
+ "title": "Age",
639
+ "type": "integer"
640
+ }
641
+ },
642
+ "required": ["firstName", "lastName", "age"]
643
+ }
644
+ },
645
+ "over17sTenantsOrLodgers": {
646
+ "baspiRef": "B6.1",
647
+ "RDSRef": "Property/Flags",
648
+ "lawSocietyRef": "TA6/11.1",
649
+ "title": "Are any of them tenants or lodgers?",
650
+ "$ref": "#/$defs/yesNo"
651
+ },
652
+ "over17sWillSignToConfirmWillVacate": {
653
+ "baspiRef": "B6.4",
654
+ "RDSRef": "RightsHolders,TenureAgreements,Notifications",
655
+ "lawSocietyRef": "TA6/11.5",
656
+ "title": "Have all occupiers aged over 17, agreed to sign the contract to confirm that they will vacate the property prior to completion of the sale?",
657
+ "$ref": "#/$defs/yesNoDetailIfNo",
658
+ "description": "If 'No', please provide details (e.g. the property is sold let to tenants) and supply a copy of the tenancy agreement together with a copy of any notice to quit which has been served upon them."
659
+ }
660
+ },
661
+ "required": [
662
+ "over17sNames",
663
+ "over17sTenantsOrLodgers",
664
+ "over17sWillSignToConfirmWillVacate"
665
+ ]
666
+ }
667
+ ]
668
+ }
615
669
  }
616
- },
617
- "over17sWillSignToConfirmWillVacate": {
618
- "baspiRef": "B6.4",
619
- "RDSRef": "RightsHolders,TenureAgreements,Notifications",
620
- "lawSocietyRef": "TA6/11.5",
621
- "title": "Have all occupiers aged over 17, agreed to sign the contract to confirm that they will vacate the property prior to completion of the sale?",
622
- "$ref": "#/$defs/yesNoDetailIfNo",
623
- "description": "If 'No', please provide details (e.g. the property is sold let to tenants) and supply a copy of the tenancy agreement together with a copy of any notice to quit which has been served upon them."
624
670
  }
625
671
  }
626
672
  },
@@ -736,9 +782,13 @@
736
782
  }
737
783
  }
738
784
  },
785
+ "sufficientToRepayAllMortgages": {
786
+ "lawSocietyRef": "TA6/14.3",
787
+ "title": "Will the sale price be sufficient to repay all mortgages and charges secured on the property?",
788
+ "$ref": "#/$defs/yesNo"
789
+ },
739
790
  "digitalPropertyLogbook": {
740
791
  "baspiRef": "B7.5",
741
- "RDSRef": "",
742
792
  "title": "Do you have a Digital Property Logbook?",
743
793
  "description": "See https://www.rlba.org.uk/what-is-a-property-logbook?",
744
794
  "type": "object",