@pdtf/schemas 0.7.5 → 0.8.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.5",
3
+ "version": "0.8.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": [
@@ -716,6 +716,128 @@
716
716
  }
717
717
  }
718
718
  }
719
+ ],
720
+ "searches": [
721
+ {
722
+ "displayName": "Groundsure Homebuyers",
723
+ "productCode": "GSEnviro",
724
+ "providerName": "TM Group",
725
+ "status": "Ordered",
726
+ "orderDate": "2022-10-06T08:55:49.483",
727
+ "expectedDeliveryDate": "2022-10-10T08:55:49",
728
+ "searchContentTypes": ["Flood", "Contaminated Land", "Ground Stability"]
729
+ },
730
+ {
731
+ "displayName": "Drainage and Water Enquiry (Residential)",
732
+ "productCode": "Con29DW",
733
+ "providerName": "TM Group",
734
+ "status": "Ordered",
735
+ "orderDate": "2022-10-06T08:55:49.5",
736
+ "expectedDeliveryDate": "2022-10-13T08:55:49",
737
+ "searchContentTypes": ["Drainage and Water Searches"]
738
+ },
739
+ {
740
+ "displayName": "Environmental Risk Flags",
741
+ "productCode": "TMRiskFlags",
742
+ "providerName": "TM Group",
743
+ "status": "Delivered",
744
+ "reportDate": "2022-10-13T08:55:49",
745
+ "searchContentTypes": [
746
+ "Coal",
747
+ "Bath Stone",
748
+ "Metalliferous (Tin)",
749
+ "Kaolin & Ball Clay",
750
+ "Limestone",
751
+ "Brine",
752
+ "HS2",
753
+ "Flood",
754
+ "Crossrail",
755
+ "Energy Exploration",
756
+ "Wind Farms",
757
+ "Renewable Power Plants",
758
+ "Solar Farms",
759
+ "London Underground",
760
+ "Ground Stability",
761
+ "Non Coal Mining",
762
+ "Ground Movement",
763
+ "Mineral"
764
+ ],
765
+
766
+ "results": [
767
+ {
768
+ "contentType": "Coal",
769
+ "recommendedActionIndicator": "No"
770
+ },
771
+ {
772
+ "contentType": "Bath Stone",
773
+ "recommendedActionIndicator": "No"
774
+ },
775
+ {
776
+ "contentType": "Metalliferous (Tin)",
777
+ "recommendedActionIndicator": "No"
778
+ },
779
+ {
780
+ "contentType": "Kaolin & Ball Clay",
781
+ "recommendedActionIndicator": "No"
782
+ },
783
+ {
784
+ "contentType": "Limestone",
785
+ "recommendedActionIndicator": "No"
786
+ },
787
+ {
788
+ "contentType": "Brine",
789
+ "recommendedActionIndicator": "No"
790
+ },
791
+ {
792
+ "contentType": "HS2",
793
+ "recommendedActionIndicator": "No"
794
+ },
795
+ {
796
+ "contentType": "Flood",
797
+ "recommendedActionIndicator": "Yes"
798
+ },
799
+ {
800
+ "contentType": "Crossrail",
801
+ "recommendedActionIndicator": "No"
802
+ },
803
+ {
804
+ "contentType": "Energy Exploration",
805
+ "recommendedActionIndicator": "No"
806
+ },
807
+ {
808
+ "contentType": "Wind Farms",
809
+ "recommendedActionIndicator": "No"
810
+ },
811
+ {
812
+ "contentType": "Renewable Power Plants",
813
+ "recommendedActionIndicator": "No"
814
+ },
815
+ {
816
+ "contentType": "Solar Farms",
817
+ "recommendedActionIndicator": "No"
818
+ },
819
+ {
820
+ "contentType": "London Underground",
821
+ "recommendedActionIndicator": "No"
822
+ },
823
+ {
824
+ "contentType": "Ground Stability",
825
+ "recommendedActionIndicator": "Yes"
826
+ },
827
+ {
828
+ "contentType": "Non Coal Mining",
829
+ "recommendedActionIndicator": "No"
830
+ },
831
+ {
832
+ "contentType": "Ground Movement",
833
+ "recommendedActionIndicator": "No"
834
+ },
835
+ {
836
+ "contentType": "Mineral",
837
+ "recommendedActionIndicator": "No"
838
+ }
839
+ ]
840
+ }
719
841
  ]
720
842
  }
721
843
  }
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.",
@@ -412,10 +412,15 @@
412
412
  "handoverOnCompletion": {
413
413
  "title": "Confirm that you will handover details on day of completion",
414
414
  "description": "Confirm that you will provide the buyer with the login, password and link to user instructions for the relevant system(s). [NOTE: It is recommended that you reset the password before handing it over to avoid security issues by passing on your own password.]",
415
- "type": "boolean",
416
- "const": true
415
+ "type": "boolean"
417
416
  }
418
- }
417
+ },
418
+ "required": [
419
+ "heatingAndPower",
420
+ "security",
421
+ "entertainment",
422
+ "handoverOnCompletion"
423
+ ]
419
424
  }
420
425
  ]
421
426
  }
@@ -525,8 +530,7 @@
525
530
  "baspiRef": "B5.1.11",
526
531
  "RDSRef": "Property/Flags",
527
532
  "title": "Please confirm that you will leave all paperwork relating to any guarantee or warranty at the property when you move out",
528
- "type": "boolean",
529
- "const": true
533
+ "type": "boolean"
530
534
  },
531
535
  "outstandingClaimsOrApplications": {
532
536
  "baspiRef": "B5.2",
@@ -637,8 +641,7 @@
637
641
  "lawSocietyRef": "TA6/14.4",
638
642
  "title": "Please confirm that on completion you will remove all rubbish and items not included in the sale from the property including its garden, loft and any sheds or outbuildings.",
639
643
  "description": "When the property is cleared out you will be expected to take reasonable care when clearing the property, leaving it clean and tidy and repairing any damage caused when removing items from the property and making safe any light or electrical fittings which are being removed.\n\nKeys for all door and window locks, along with any alarm codes, should be available for the buyer on the day of completion. If there is any reason why you cannot do this you should let the estate agent and your property lawyer know. For all internet connected services eg doorbells, boiler controls, burglar alarms, CCTV cameras etc) access to them will need to be provided to the buyer on the day of completion so that they can control them or sign up to the service. If there is any reason why you cannot do this you should let the estate agent and your property lawyer know.",
640
- "type": "boolean",
641
- "const": true
644
+ "type": "boolean"
642
645
  },
643
646
  "otherPropertyInChain": {
644
647
  "baspiRef": "B7.2",
@@ -765,8 +768,7 @@
765
768
  },
766
769
  "willHandoverLogbook": {
767
770
  "title": "Please confirm that on completion you will transfer it to the new owner",
768
- "type": "boolean",
769
- "const": true
771
+ "type": "boolean"
770
772
  }
771
773
  },
772
774
  "required": ["willHandoverLogbook"]
@@ -789,14 +791,12 @@
789
791
  "confirmWillProvideAdditionalDocumentation": {
790
792
  "baspiRef": "B8.1",
791
793
  "title": "I/we will provide my property lawyer with the additional documentation in support of the information supplied.",
792
- "type": "boolean",
793
- "const": true
794
+ "type": "boolean"
794
795
  },
795
796
  "confirmInformationIsAccurate": {
796
797
  "baspiRef": "B8.2",
797
798
  "title": "I/we confirm that all information provided is accurate to the best of our knowledge and if we become aware of any change to/changes which alter the information supplied/provided prior to exchange of contracts for the sale of the property, I/we will update immediately notify the person marketing the property as well as my/our property lawyer. All sellers should sign this form",
798
- "type": "boolean",
799
- "const": true
799
+ "type": "boolean"
800
800
  }
801
801
  }
802
802
  }
@@ -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-a-material-facts.json",
3
+ "$id": "https://trust.propdata.org.uk/schemas/v1/material-facts.json",
4
4
  "type": "object",
5
5
  "title": "Material facts at the point of marketing",
6
6
  "description": "BASPI v2.0 Part A - Disclosure of material facts at the point of marketing, supporting mapping to BASPI, Law Society and RICS Data Schema elements.",
@@ -732,7 +732,17 @@
732
732
  "title": "Energy Efficiency Rating",
733
733
  "description": "What is the energy efficiency rating of the property according to the latest Energy Performance Certificate (EPC)?",
734
734
  "type": "string",
735
- "enum": ["A", "B", "C", "D", "E", "F", "G", "Exempt Property"]
735
+ "enum": [
736
+ "A",
737
+ "B",
738
+ "C",
739
+ "D",
740
+ "E",
741
+ "F",
742
+ "G",
743
+ "Exempt Property",
744
+ "Survey Instructed"
745
+ ]
736
746
  },
737
747
  "hasSprayFoamInstalled": {
738
748
  "baspiRef": "A1.8.4",
@@ -1750,8 +1760,7 @@
1750
1760
  "baspiRef": "A13.1",
1751
1761
  "title": "Seller's declaration",
1752
1762
  "description": "I/we confirm the answers to be truthful and accurate and to the best of my/our knowledge. The questions have been designed to assist with the disclosure of material information and any misleading or incorrect answers are likely to be exposed later in the legal process which may hinder my/our sale. I/we will provide my property lawyer with the additional documentation in support of the information supplied on this form. If there are any changes which alter the information provided, I/we will immediately notify the person marketing the property as well as my/our property lawyer.",
1753
- "type": "boolean",
1754
- "const": true
1763
+ "type": "boolean"
1755
1764
  }
1756
1765
  }
1757
1766
  }
@@ -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/minified-pdtf-transaction.json",
3
+ "$id": "https://trust.propdata.org.uk/schemas/v1/minified-pdtf-transaction.json",
4
4
  "title": "Property Data Trust Framework Transaction Schema",
5
5
  "description": "A schema defining search results containing minimal elements of the PDTF transaction data structure.",
6
6
  "type": "array",
@@ -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/pdtf-transaction.json",
3
+ "$id": "https://trust.propdata.org.uk/schemas/v1/pdtf-transaction.json",
4
4
  "type": "object",
5
5
  "title": "Property Data Trust Framework Transaction Schema",
6
6
  "description": "A schema defining the PDTF transaction data structure, supporting mapping to BASPI, Law Society and RICS Data Schema elements.",
@@ -107,10 +107,10 @@
107
107
  "type": "object",
108
108
  "properties": {
109
109
  "materialFacts": {
110
- "$ref": "https://raw.githubusercontent.com/Property-Data-Trust-Framework/schemas/master/src/schemas/material-facts.json"
110
+ "$ref": "https://trust.propdata.org.uk/schemas/v1/material-facts.json"
111
111
  },
112
112
  "additionalLegalInfo": {
113
- "$ref": "https://raw.githubusercontent.com/Property-Data-Trust-Framework/schemas/master/src/schemas/legal-information.json"
113
+ "$ref": "https://trust.propdata.org.uk/schemas/v1/legal-information.json"
114
114
  },
115
115
  "titlesToBeSold": {
116
116
  "RDSRef": "",
@@ -125,6 +125,11 @@
125
125
  "title": "Title Number",
126
126
  "type": "string"
127
127
  },
128
+ "titleIncludedInSale": {
129
+ "RDSRef": "",
130
+ "title": "Confirms that this associated title is included in the sale",
131
+ "type": "boolean"
132
+ },
128
133
  "titleExtents": {
129
134
  "RDSRef": "",
130
135
  "title": "Title Extents",
@@ -136,7 +141,7 @@
136
141
  },
137
142
  "registerExtract": {
138
143
  "title": "HMLR Register Extract",
139
- "$ref": "https://raw.githubusercontent.com/Property-Data-Trust-Framework/schemas/master/src/schemas/title-deed.json"
144
+ "$ref": "https://trust.propdata.org.uk/schemas/v1/title-deed.json"
140
145
  }
141
146
  }
142
147
  }
@@ -144,98 +149,12 @@
144
149
  "energyPerformanceCertificate": {
145
150
  "RDSRef": "",
146
151
  "title": "Energy Performance Certificate",
147
- "$ref": "https://raw.githubusercontent.com/Property-Data-Trust-Framework/schemas/master/src/schemas/energy-performance-certificate.json"
152
+ "$ref": "https://trust.propdata.org.uk/schemas/v1/energy-performance-certificate.json"
148
153
  },
149
- "risks": {
154
+ "searches": {
150
155
  "RDSRef": "",
151
- "title": "Risks",
152
- "type": "object",
153
- "properties": {
154
- "coalMining": {
155
- "title": "Coal mining",
156
- "$ref": "#/$defs/riskIndicatorAndSearch"
157
- },
158
- "flood": {
159
- "title": "Flood",
160
- "$ref": "#/$defs/riskIndicatorAndSearch"
161
- },
162
- "miningAndGroundStability": {
163
- "title": "Mining and ground stability",
164
- "type": "object",
165
- "properties": {
166
- "bathStone": {
167
- "title": "Bath Stone",
168
- "$ref": "#/$defs/riskIndicatorAndSearch"
169
- },
170
- "metalliferousTin": {
171
- "title": "Matalliferous (Tin)",
172
- "$ref": "#/$defs/riskIndicatorAndSearch"
173
- },
174
- "kaolinAndBallClay": {
175
- "title": "Kaolin and ball clay",
176
- "$ref": "#/$defs/riskIndicatorAndSearch"
177
- },
178
- "limestone": {
179
- "title": "Limestone",
180
- "$ref": "#/$defs/riskIndicatorAndSearch"
181
- },
182
- "brine": {
183
- "title": "Brine",
184
- "$ref": "#/$defs/riskIndicatorAndSearch"
185
- },
186
- "groundStability": {
187
- "title": "Ground stability",
188
- "$ref": "#/$defs/riskIndicatorAndSearch"
189
- },
190
- "nonCoalMining": {
191
- "title": "Non coal mining",
192
- "$ref": "#/$defs/riskIndicatorAndSearch"
193
- },
194
- "groundMovement": {
195
- "title": "Ground movement",
196
- "$ref": "#/$defs/riskIndicatorAndSearch"
197
- },
198
- "mineral": {
199
- "title": "Mineral",
200
- "$ref": "#/$defs/riskIndicatorAndSearch"
201
- }
202
- }
203
- },
204
- "energyAndInfrastructure": {
205
- "title": "Energy and infrastructure",
206
- "type": "object",
207
- "properties": {
208
- "hs2": {
209
- "title": "HS2",
210
- "$ref": "#/$defs/riskIndicatorAndSearch"
211
- },
212
- "crossrail": {
213
- "title": "Crossrail",
214
- "$ref": "#/$defs/riskIndicatorAndSearch"
215
- },
216
- "londonUnderground": {
217
- "title": "London Underground",
218
- "$ref": "#/$defs/riskIndicatorAndSearch"
219
- },
220
- "energyExploration": {
221
- "title": "Energy exploration",
222
- "$ref": "#/$defs/riskIndicatorAndSearch"
223
- },
224
- "windFarms": {
225
- "title": "Wind farms",
226
- "$ref": "#/$defs/riskIndicatorAndSearch"
227
- },
228
- "solarFarms": {
229
- "title": "Solar farms",
230
- "$ref": "#/$defs/riskIndicatorAndSearch"
231
- },
232
- "renewablePowerPlants": {
233
- "title": "Renewable power plants",
234
- "$ref": "#/$defs/riskIndicatorAndSearch"
235
- }
236
- }
237
- }
238
- }
156
+ "title": "Searches",
157
+ "$ref": "https://trust.propdata.org.uk/schemas/v1/searches.json"
239
158
  }
240
159
  }
241
160
  }
@@ -268,17 +187,6 @@
268
187
  }
269
188
  },
270
189
  "required": ["line1", "postcode"]
271
- },
272
- "riskIndicatorAndSearch": {
273
- "type": "object",
274
- "properties": {
275
- "hasRisk": {
276
- "title": "",
277
- "type": "string",
278
- "enum": ["Yes", "No"]
279
- }
280
- },
281
- "required": ["hasRisk"]
282
190
  }
283
191
  }
284
192
  }
@@ -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/pdtf-verified-claims.json",
3
+ "$id": "https://trust.propdata.org.uk/schemas/v1/pdtf-verified-claims.json",
4
4
  "definitions": {
5
5
  "date_type": {
6
6
  "type": "string",