@pdtf/schemas 0.5.7 → 0.5.8

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://homebuyingandsellinggroup.co.uk/schemas/energy-performance-certificate-0.1.0.json",
3
+ "$id": "https://homebuyingandsellinggroup.co.uk/schemas/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",
@@ -12,106 +12,109 @@
12
12
  "address1": { "type": "string" },
13
13
  "address2": { "type": "string" },
14
14
  "address3": { "type": "string" },
15
- "building-reference-number": { "type": "string" },
16
- "built-form": { "type": "string" },
17
- "co2-emiss-curr-per-floor-area": { "type": "number" },
18
- "co2-emissions-current": { "type": "number" },
19
- "co2-emissions-potential": { "type": "number" },
20
- "constituency-label": { "type": "string" },
15
+ "buildingReferenceNumber": { "type": "string" },
16
+ "builtForm": { "type": "string" },
17
+ "co2EmissCurrPerFloorArea": { "type": "number" },
18
+ "co2EmissionsCurrent": { "type": "number" },
19
+ "co2EmissionsPotential": { "type": "number" },
20
+ "constituencyLabel": { "type": "string" },
21
21
  "constituency": { "type": "string" },
22
- "construction-age-band": { "type": "string" },
22
+ "constructionAgeBand": { "type": "string" },
23
23
  "county": { "type": "string" },
24
- "current-energy-efficiency": { "type": "integer" },
25
- "current-energy-rating": { "type": "string" },
26
- "energy-consumption-current": { "type": "integer" },
27
- "energy-consumption-potential": { "type": "integer" },
28
- "energy-tariff": { "type": "string" },
29
- "environment-impact-current": { "type": "integer" },
30
- "environment-impact-potential": { "type": "integer" },
31
- "extension-count": { "type": "integer" },
32
- "fixed-lighting-outlets-count": { "type": "integer" },
33
- "flat-storey-count": { "type": "integer" },
34
- "flat-top-storey": { "type": "string" },
35
- "floor-description": { "type": "string" },
36
- "floor-energy-eff": { "type": "string" },
37
- "floor-env-eff": { "type": "string" },
38
- "floor-height": { "type": "number" },
39
- "floor-level": { "type": "string" },
40
- "glazed-area": { "type": "string" },
41
- "glazed-type": { "type": "string" },
42
- "heat-loss-corridor": { "type": "string" },
43
- "heating-cost-current": { "type": "integer" },
44
- "heating-cost-potential": { "type": "integer" },
45
- "hot-water-cost-current": { "type": "integer" },
46
- "hot-water-cost-potential": { "type": "integer" },
47
- "hot-water-energy-eff": { "type": "string" },
48
- "hot-water-env-eff": { "type": "string" },
49
- "hotwater-description": { "type": "string" },
50
- "inspection-date": { "type": "string", "format": "date" },
51
- "lighting-cost-current": { "type": "integer" },
52
- "lighting-cost-potential": { "type": "integer" },
53
- "lighting-description": { "type": "string" },
54
- "lighting-energy-eff": { "type": "string" },
55
- "lighting-env-eff": { "type": "string" },
56
- "lmk-key": { "type": "string" },
57
- "local-authority-label": { "type": "string" },
58
- "local-authority": { "type": "string" },
59
- "lodgement-date": { "type": "string", "format": "date" },
60
- "lodgement-datetime": { "type": "string", "format": "date-time" },
61
- "low-energy-fixed-light-count": { "type": "integer" },
62
- "low-energy-lighting": { "type": "integer" },
63
- "main-fuel": { "type": "string" },
64
- "main-heating-controls": { "type": "string" },
65
- "mainheat-description": { "type": "string" },
66
- "mainheat-energy-eff": { "type": "string" },
67
- "mainheat-env-eff": { "type": "string" },
68
- "mainheatc-energy-eff": { "type": "string" },
69
- "mainheatc-env-eff": { "type": "string" },
70
- "mainheatcont-description": { "type": "string" },
71
- "mains-gas-flag": { "type": "string" },
72
- "mechanical-ventilation": { "type": "string" },
73
- "multi-glaze-proportion": { "type": "integer" },
74
- "number-habitable-rooms": { "type": "integer" },
75
- "number-heated-rooms": { "type": "integer" },
76
- "number-open-fireplaces": { "type": "integer" },
77
- "photo-supply": { "type": "integer" },
24
+ "currentEnergyEfficiency": { "type": "integer" },
25
+ "currentEnergyRating": { "type": "string" },
26
+ "energyConsumptionCurrent": { "type": "integer" },
27
+ "energyConsumptionPotential": { "type": "integer" },
28
+ "energyTariff": { "type": "string" },
29
+ "environmentImpactCurrent": { "type": "integer" },
30
+ "environmentImpactPotential": { "type": "integer" },
31
+ "extensionCount": { "type": "integer" },
32
+ "fixedLightingOutletsCount": { "type": "integer" },
33
+ "flatStoreyCount": { "type": "integer" },
34
+ "flatTopStorey": { "type": "string" },
35
+ "floorDescription": { "type": "string" },
36
+ "floorEnergyEff": { "type": "string" },
37
+ "floorEnvEff": { "type": "string" },
38
+ "floorHeight": { "type": "number" },
39
+ "floorLevel": { "type": "string" },
40
+ "glazedArea": { "type": "string" },
41
+ "glazedType": { "type": "string" },
42
+ "heatLossCorridor": { "type": "string" },
43
+ "heatingCostCurrent": { "type": "integer" },
44
+ "heatingCostPotential": { "type": "integer" },
45
+ "hotWaterCostCurrent": { "type": "integer" },
46
+ "hotWaterCostPotential": { "type": "integer" },
47
+ "hotWaterEnergyEff": { "type": "string" },
48
+ "hotWaterEnvEff": { "type": "string" },
49
+ "hotwaterDescription": { "type": "string" },
50
+ "inspectionDate": { "type": "string", "format": "date" },
51
+ "lightingCostCurrent": { "type": "integer" },
52
+ "lightingCostPotential": { "type": "integer" },
53
+ "lightingDescription": { "type": "string" },
54
+ "lightingEnergyEff": { "type": "string" },
55
+ "lightingEnvEff": { "type": "string" },
56
+ "lmkKey": { "type": "string" },
57
+ "localAuthorityLabel": { "type": "string" },
58
+ "localAuthority": { "type": "string" },
59
+ "lodgementDate": { "type": "string", "format": "date" },
60
+ "lodgementDatetime": { "type": "string", "format": "date-time" },
61
+ "lowEnergyFixedLightCount": { "type": "integer" },
62
+ "lowEnergyLighting": { "type": "integer" },
63
+ "mainFuel": { "type": "string" },
64
+ "mainHeatingControls": { "type": "string" },
65
+ "mainheatDescription": { "type": "string" },
66
+ "mainheatEnergyEff": { "type": "string" },
67
+ "mainheatEnvEff": { "type": "string" },
68
+ "mainheatcEnergyEff": { "type": "string" },
69
+ "mainheatcEnvEff": { "type": "string" },
70
+ "mainheatcontDescription": { "type": "string" },
71
+ "mainsGasFlag": { "type": "string" },
72
+ "mechanicalVentilation": { "type": "string" },
73
+ "multiGlazeProportion": { "type": "integer" },
74
+ "numberHabitableRooms": { "type": "integer" },
75
+ "numberHeatedRooms": { "type": "integer" },
76
+ "numberOpenFireplaces": { "type": "integer" },
77
+ "photoSupply": { "type": "integer" },
78
78
  "postcode": { "type": "string" },
79
79
  "posttown": { "type": "string" },
80
- "potential-energy-efficiency": { "type": "integer" },
81
- "potential-energy-rating": { "type": "string" },
82
- "property-type": { "type": "string" },
83
- "roof-description": { "type": "string" },
84
- "roof-energy-eff": { "type": "string" },
85
- "roof-env-eff": { "type": "string" },
86
- "secondheat-description": { "type": "string" },
87
- "sheating-energy-eff": { "type": "string" },
88
- "sheating-env-eff": { "type": "string" },
89
- "solar-water-heating-flag": { "type": "string" },
80
+ "potentialEnergyEfficiency": { "type": "integer" },
81
+ "potentialEnergyRating": { "type": "string" },
82
+ "propertyType": { "type": "string" },
83
+ "roofDescription": { "type": "string" },
84
+ "roofEnergyEff": { "type": "string" },
85
+ "roofEnvEff": { "type": "string" },
86
+ "secondheatDescription": { "type": "string" },
87
+ "sheatingEnergyEff": { "type": "string" },
88
+ "sheatingEnvEff": { "type": "string" },
89
+ "solarWaterHeatingFlag": { "type": "string" },
90
90
  "tenure": { "type": "string" },
91
- "total-floor-area": { "type": "number" },
92
- "transaction-type": { "type": "string" },
93
- "unheated-corridor-length": { "type": "number" },
94
- "uprn-source": { "type": "string" },
91
+ "totalFloorArea": { "type": "number" },
92
+ "transactionType": { "type": "string" },
93
+ "unheatedCorridorLength": { "type": "number" },
94
+ "uprnSource": { "type": "string" },
95
95
  "uprn": { "type": "integer" },
96
- "walls-description": { "type": "string" },
97
- "walls-energy-eff": { "type": "string" },
98
- "walls-env-eff": { "type": "string" },
99
- "wind-turbine-count": { "type": "integer" },
100
- "windows-description": { "type": "string" },
101
- "windows-energy-eff": { "type": "string" },
102
- "windows-env-eff": { "type": "string" }
96
+ "wallsDescription": { "type": "string" },
97
+ "wallsEnergyEff": { "type": "string" },
98
+ "wallsEnvEff": { "type": "string" },
99
+ "windTurbineCount": { "type": "integer" },
100
+ "windowsDescription": { "type": "string" },
101
+ "windowsEnergyEff": { "type": "string" },
102
+ "windowsEnvEff": { "type": "string" }
103
103
  }
104
104
  },
105
105
  "recommendations": {
106
- "type": "object",
107
- "properties": {
108
- "lmk-key": { "type": "string" },
109
- "improvement-item": { "type": "integer" },
110
- "indicative-cost": { "type": "string" },
111
- "improvement-summary-text": { "type": "string" },
112
- "improvement-descr-text": { "type": "string" },
113
- "improvement-id": { "type": "string" },
114
- "improvement-id-text": { "type": "string" }
106
+ "type": "array",
107
+ "items": {
108
+ "type": "object",
109
+ "properties": {
110
+ "lmkKey": { "type": "string" },
111
+ "improvementItem": { "type": "integer" },
112
+ "indicativeCost": { "type": "string" },
113
+ "improvementSummaryText": { "type": "string" },
114
+ "improvementDescrText": { "type": "string" },
115
+ "improvementId": { "type": "string" },
116
+ "improvementIdText": { "type": "string" }
117
+ }
115
118
  }
116
119
  }
117
120
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://homebuyingandsellinggroup.co.uk/schemas/pdtf-claim-0.1.0.json",
3
+ "$id": "https://homebuyingandsellinggroup.co.uk/schemas/pdtf-claim.json",
4
4
  "type": "object",
5
5
  "title": "Property Data Trust Framework Claim",
6
6
  "description": "PDTF verified claims are implemented in accordance with the OpenID Connect Verified Claims model, within which the actual claims object should conform to this schema to ensure the necessary metadata is attached",
@@ -3,7 +3,7 @@
3
3
  "$id": "https://homebuyingandsellinggroup.co.uk/schemas/property-pack.json",
4
4
  "type": "object",
5
5
  "title": "Property Data Trust Framework Schema",
6
- "description": "A schema defining the PDTF data structure, supporting mapping to BASPI, Law Society and RICS Data Schema elements.",
6
+ "description": "A schema defining the PDTF Property Pack data structure, supporting mapping to BASPI, Law Society and RICS Data Schema elements.",
7
7
  "required": ["$schema", "uprn", "propertyPack"],
8
8
  "properties": {
9
9
  "$schema": {
@@ -18,7 +18,59 @@
18
18
  "propertyPack": {
19
19
  "title": "Property Pack",
20
20
  "type": "object",
21
+ "required": ["sellers"],
21
22
  "properties": {
23
+ "sellers": {
24
+ "RDSRef": "",
25
+ "title": "About the sellers",
26
+ "type": "array",
27
+ "minItems": 1,
28
+ "items": {
29
+ "type": "object",
30
+ "title": "Seller information",
31
+ "required": [
32
+ "firstName",
33
+ "lastName",
34
+ "dateOfBirth",
35
+ "emailAddress",
36
+ "address"
37
+ ],
38
+ "properties": {
39
+ "firstName": {
40
+ "RDSRef": "",
41
+ "title": "First name",
42
+ "type": "string"
43
+ },
44
+ "middleNames": {
45
+ "title": "Middle name(s)",
46
+ "type": "string"
47
+ },
48
+ "lastName": {
49
+ "title": "Last name",
50
+ "type": "string"
51
+ },
52
+ "dateOfBirth": {
53
+ "title": "Date of birth",
54
+ "type": "string",
55
+ "format": "date"
56
+ },
57
+ "emailAddress": {
58
+ "title": "Email address",
59
+ "type": "string",
60
+ "format": "email"
61
+ },
62
+ "address": {
63
+ "title": "Address",
64
+ "$ref": "#/$defs/address"
65
+ },
66
+ "amlCheckResult": {
67
+ "title": "AML check result",
68
+ "type": "string",
69
+ "enum": ["clear", "consider"]
70
+ }
71
+ }
72
+ }
73
+ },
22
74
  "materialFacts": {
23
75
  "$ref": "https://homebuyingandsellinggroup.co.uk/schemas/baspi-a-material-facts.json"
24
76
  },
@@ -95,5 +147,35 @@
95
147
  }
96
148
  }
97
149
  }
150
+ },
151
+ "$defs": {
152
+ "address": {
153
+ "type": "object",
154
+ "properties": {
155
+ "address1": {
156
+ "title": "Address 1",
157
+ "type": "string",
158
+ "minLength": 1
159
+ },
160
+ "address2": {
161
+ "title": "Address 2",
162
+ "type": "string"
163
+ },
164
+ "town": {
165
+ "title": "Town",
166
+ "type": "string"
167
+ },
168
+ "county": {
169
+ "title": "County",
170
+ "type": "string"
171
+ },
172
+ "postcode": {
173
+ "title": "Postcode",
174
+ "type": "string",
175
+ "minLength": 1
176
+ }
177
+ },
178
+ "required": ["address1", "postcode"]
179
+ }
98
180
  }
99
181
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://homebuyingandsellinggroup.co.uk/schemas/title-deed-0.1.0.json",
3
+ "$id": "https://homebuyingandsellinggroup.co.uk/schemas/title-deed.json",
4
4
  "title": "Property Data Trust Framework HMLR Register Extract representation",
5
- "description": "A schema mirroring the V2_1 XML version of the HMLR Register Extract web service. Versioning is using SchemaVer",
5
+ "description": "A schema mirroring the V2_1 XML version of the HMLR Register Extract web service.",
6
6
  "definitions": {
7
7
  "BinaryObjectType": {
8
8
  "type": "object",
@@ -766,7 +766,6 @@
766
766
  },
767
767
  "type": "object",
768
768
  "properties": {
769
- "Attachment": { "$ref": "#/definitions/Q1AttachmentType" },
770
769
  "OCSummaryData": { "$ref": "#/definitions/Q1OCSummaryDataType" },
771
770
  "OCRegisterData": { "$ref": "#/definitions/Q1OCRegisterDataType" }
772
771
  }
@@ -2,50 +2,53 @@
2
2
  "$schema": "https://homebuyingandsellinggroup.co.uk/schemas/property-pack.json",
3
3
  "uprn": 100000059583,
4
4
  "propertyPack": {
5
+ "sellers": [
6
+ {
7
+ "firstName": "John",
8
+ "lastName": "Davies",
9
+ "dateOfBirth": "1975-12-25",
10
+ "emailAddress": "john@theseller.com",
11
+ "address": { "address1": "10 Downend Park", "postcode": "BS7 9PU" }
12
+ }
13
+ ],
5
14
  "materialFacts": {
6
- "propertyToBeSold": {
7
- "address": {
8
- "address1": "10 Downend Park",
9
- "address2": "",
10
- "town": "BRISTOLS",
11
- "county": "Avon",
12
- "postcode": "BS7 9PU"
13
- },
14
- "energyEfficiency": {
15
- "energyEfficiencyRating": "A"
16
- },
17
- "delayFactors": {
15
+ "address": {
16
+ "address1": "10 Downend Park",
17
+ "address2": "",
18
+ "town": "BRISTOLS",
19
+ "county": "Avon",
20
+ "postcode": "BS7 9PU"
21
+ },
22
+ "energyEfficiency": {
23
+ "energyEfficiencyRating": "A"
24
+ },
25
+ "delayFactors": {
26
+ "yesNo": "No"
27
+ },
28
+ "ownership": {
29
+ "ownershipType": "Freehold"
30
+ },
31
+ "parkingArrangements": {
32
+ "parkingArrangementsType": "Other",
33
+ "otherParkingType": "Garage and double width driveway",
34
+ "electricVehicleChargingPoint": { "yesNo": "No" }
35
+ },
36
+ "listingAndConservation": {
37
+ "isListed": {
18
38
  "yesNo": "No"
19
39
  },
20
- "ownership": {
21
- "ownershipType": "Freehold"
22
- },
23
- "parkingArrangements": {
24
- "parkingArrangementsType": "Other",
25
- "otherParkingType": "Garage and double width driveway"
26
- },
27
- "listingAndConservation": {
28
- "isListed": {
29
- "yesNo": "No"
30
- },
31
- "isConservationArea": {
32
- "yesNo": "No"
33
- },
34
- "hasTreePreservationOrder": {
35
- "yesNo": "No"
36
- }
37
- },
38
- "typeOfConstruction": {
39
- "isStandardForm": {
40
- "yesNo": "Yes"
41
- },
42
- "hasFlammableExternalWallSystem": "No"
40
+ "isConservationArea": {
41
+ "yesNo": "No"
43
42
  },
44
- "councilTax": {
45
- "councilTaxBand": "A",
46
- "councilTaxAffectingAlterations": {
47
- "yesNo": "No"
48
- }
43
+ "hasTreePreservationOrder": {
44
+ "yesNo": "No"
45
+ }
46
+ },
47
+ "hasFlammableExternalWallSystem": "No",
48
+ "councilTax": {
49
+ "councilTaxBand": "A",
50
+ "councilTaxAffectingAlterations": {
51
+ "yesNo": "No"
49
52
  }
50
53
  },
51
54
  "disputesAndComplaints": {
@@ -357,7 +360,9 @@
357
360
  "yesNo": "No"
358
361
  }
359
362
  },
360
- "consumerProtectionRegulationsDeclaration": true
363
+ "consumerProtectionRegulationsDeclaration": {
364
+ "consumerProtectionRegulationsResponse": true
365
+ }
361
366
  }
362
367
  }
363
368
  }
@@ -14,6 +14,7 @@ test("exports a property pack schema", () => {
14
14
 
15
15
  test("sample is valid", () => {
16
16
  const isValid = validator(examplePropertyPack);
17
+ console.log(validator.errors);
17
18
  expect(isValid).toBe(true);
18
19
  });
19
20