@pdtf/schemas 3.2.0-1 → 3.2.0-3
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/README.md +5 -0
- package/index.js +3 -3
- package/package.json +1 -1
- package/src/examples/v3/exampleTransaction.json +26 -11
- package/src/schemas/v3/combined.json +3476 -1624
- package/src/schemas/v3/overlays/{baspi.json → baspi4.json} +1083 -900
- package/src/schemas/v3/overlays/baspi5.json +8018 -0
- package/src/schemas/v3/overlays/nts.json +82 -2
- package/src/schemas/v3/overlays/ntsl.json +82 -2
- package/src/schemas/v3/overlays/oc1.json +26 -8
- package/src/schemas/v3/overlays/piq.json +212 -149
- package/src/schemas/v3/overlays/rds.json +41 -36
- package/src/schemas/v3/overlays/ta6.json +181 -157
- package/src/schemas/v3/pdtf-transaction.json +639 -234
- package/src/schemas/v3/skeleton.json +51 -6
- package/src/schemas/verifiedClaims/README.md +12 -0
- package/src/schemas/{v1 → verifiedClaims}/pdtf-verified-claims.json +1 -1
- package/src/tests/v3/transactionSchema.test.js +4 -4
- package/src/utils/extractOverlay.js +2 -1
|
@@ -7,17 +7,24 @@
|
|
|
7
7
|
"firstName": {},
|
|
8
8
|
"middleName": {},
|
|
9
9
|
"lastName": {},
|
|
10
|
+
"maidenName": {},
|
|
10
11
|
"preferredName": {}
|
|
11
12
|
},
|
|
12
13
|
"dateOfBirth": {},
|
|
13
14
|
"phone": {},
|
|
14
15
|
"email": {},
|
|
15
16
|
"address": {
|
|
17
|
+
"buildingNumber": {},
|
|
18
|
+
"buildingName": {},
|
|
19
|
+
"subBuilding": {},
|
|
20
|
+
"street": {},
|
|
16
21
|
"line1": {},
|
|
17
22
|
"line2": {},
|
|
18
23
|
"line 3": {},
|
|
19
24
|
"town": {},
|
|
20
|
-
"postcode": {}
|
|
25
|
+
"postcode": {},
|
|
26
|
+
"homeNation": {},
|
|
27
|
+
"countryCode": {}
|
|
21
28
|
},
|
|
22
29
|
"organisation": {},
|
|
23
30
|
"organisationReference": {},
|
|
@@ -31,11 +38,17 @@
|
|
|
31
38
|
},
|
|
32
39
|
"propertyPack": {
|
|
33
40
|
"address": {
|
|
41
|
+
"buildingNumber": {},
|
|
42
|
+
"buildingName": {},
|
|
43
|
+
"subBuilding": {},
|
|
44
|
+
"street": {},
|
|
34
45
|
"line1": {},
|
|
35
46
|
"line2": {},
|
|
36
47
|
"line3": {},
|
|
37
48
|
"town": {},
|
|
38
|
-
"postcode": {}
|
|
49
|
+
"postcode": {},
|
|
50
|
+
"homeNation": {},
|
|
51
|
+
"countryCode": {}
|
|
39
52
|
},
|
|
40
53
|
"uprn": {},
|
|
41
54
|
"location": {
|
|
@@ -80,6 +93,14 @@
|
|
|
80
93
|
"mediaUrl": {},
|
|
81
94
|
"caption": {}
|
|
82
95
|
},
|
|
96
|
+
"saleAtUndervalue": {},
|
|
97
|
+
"hasHelpToBuyEquityLoan": {},
|
|
98
|
+
"isHMO": {},
|
|
99
|
+
"isStudentAccommodation": {},
|
|
100
|
+
"numberOfSellers": {},
|
|
101
|
+
"numberOfNonUkResidentSellers": {},
|
|
102
|
+
"isFirstRegistration": {},
|
|
103
|
+
"isLimitedCompanySale": {},
|
|
83
104
|
"buildInformation": {
|
|
84
105
|
"building": {
|
|
85
106
|
"builtForm": {},
|
|
@@ -781,6 +802,7 @@
|
|
|
781
802
|
"reserveFund": {
|
|
782
803
|
"yesNo": {},
|
|
783
804
|
"details": {},
|
|
805
|
+
"contributionIncludedInServiceCharge": {},
|
|
784
806
|
"sufficentToCoverSection20Expenditure": {
|
|
785
807
|
"yesNo": {},
|
|
786
808
|
"details": {}
|
|
@@ -1006,10 +1028,18 @@
|
|
|
1006
1028
|
"yesNo": {}
|
|
1007
1029
|
},
|
|
1008
1030
|
"controlledParking": {
|
|
1009
|
-
"yesNo": {}
|
|
1031
|
+
"yesNo": {},
|
|
1032
|
+
"annualCostOfPermit": {}
|
|
1033
|
+
},
|
|
1034
|
+
"vehicleTypeRestriction": {
|
|
1035
|
+
"yesNo": {},
|
|
1036
|
+
"details": {}
|
|
1010
1037
|
},
|
|
1011
1038
|
"electricVehicleChargingPoint": {
|
|
1012
1039
|
"yesNo": {}
|
|
1040
|
+
},
|
|
1041
|
+
"locatedInUlez": {
|
|
1042
|
+
"yesNo": {}
|
|
1013
1043
|
}
|
|
1014
1044
|
},
|
|
1015
1045
|
"listingAndConservation": {
|
|
@@ -1969,6 +1999,14 @@
|
|
|
1969
1999
|
},
|
|
1970
2000
|
"dateToBeConnected": {}
|
|
1971
2001
|
},
|
|
2002
|
+
"heatPump": {
|
|
2003
|
+
"yesNo": {},
|
|
2004
|
+
"details": {},
|
|
2005
|
+
"supplier": {},
|
|
2006
|
+
"dateInstalled": {},
|
|
2007
|
+
"attachments": {},
|
|
2008
|
+
"dateToBeConnected": {}
|
|
2009
|
+
},
|
|
1972
2010
|
"otherSources": {
|
|
1973
2011
|
"yesNo": {},
|
|
1974
2012
|
"details": {},
|
|
@@ -2193,9 +2231,6 @@
|
|
|
2193
2231
|
}
|
|
2194
2232
|
},
|
|
2195
2233
|
"insurance": {
|
|
2196
|
-
"isInsured": {},
|
|
2197
|
-
"details": {},
|
|
2198
|
-
"landlordInsuresIfFlat": {},
|
|
2199
2234
|
"difficultiesObtainingInsurance": {
|
|
2200
2235
|
"abnormalRiseInPremiums": {
|
|
2201
2236
|
"yesNo": {},
|
|
@@ -2214,6 +2249,9 @@
|
|
|
2214
2249
|
"details": {}
|
|
2215
2250
|
}
|
|
2216
2251
|
},
|
|
2252
|
+
"isInsured": {},
|
|
2253
|
+
"details": {},
|
|
2254
|
+
"landlordInsuresIfFlat": {},
|
|
2217
2255
|
"insuranceClaims": {
|
|
2218
2256
|
"yesNo": {},
|
|
2219
2257
|
"details": {}
|
|
@@ -3967,6 +4005,13 @@
|
|
|
3967
4005
|
}
|
|
3968
4006
|
}
|
|
3969
4007
|
}
|
|
4008
|
+
},
|
|
4009
|
+
"additionalDocuments": {
|
|
4010
|
+
"documentType": {},
|
|
4011
|
+
"documentTypeCode": {},
|
|
4012
|
+
"documentDate": {},
|
|
4013
|
+
"retrievedOn": {},
|
|
4014
|
+
"filedUnder": {}
|
|
3970
4015
|
}
|
|
3971
4016
|
},
|
|
3972
4017
|
"searches": {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
## README
|
|
2
|
+
|
|
3
|
+
### About verified claims
|
|
4
|
+
`pdtf-verified-claims.json` describes the schema container in which we store property `claims` and their corresponding `verification`.
|
|
5
|
+
|
|
6
|
+
This schema structure is strongly influenced by OpenID Connect for Identity Assurance 1.0's way of storing "verified claims".
|
|
7
|
+
|
|
8
|
+
More Details from the OIDC page which describes the details the nature of `verification` and `claims` objects: https://openid.net/specs/openid-connect-4-identity-assurance-1_0.html#name-representing-verified-claim
|
|
9
|
+
|
|
10
|
+
Notes:
|
|
11
|
+
* For PDTF Schema, all data included in the `claims` object must adhere to [pdtf-transaction.json (v3)](../v3/pdtf-transaction.json)
|
|
12
|
+
* For verification, there is more freedom in terms of the type of data that can currently be provided, see the documentation in the OIDC link above for details and examples.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://trust.propdata.org.uk/schemas/
|
|
3
|
+
"$id": "https://trust.propdata.org.uk/schemas/verifiedClaims/pdtf-verified-claims.json",
|
|
4
4
|
"definitions": {
|
|
5
5
|
"date_type": {
|
|
6
6
|
"type": "string",
|
|
@@ -22,14 +22,14 @@ test("exports a property pack schema, v3 with no overlay by default", () => {
|
|
|
22
22
|
// expect(testSchema.$id).toEqual(
|
|
23
23
|
// "https://trust.propdata.org.uk/schemas/v3/pdtf-transaction.json"
|
|
24
24
|
// );
|
|
25
|
-
expect(testSchema.properties.propertyPack.properties.
|
|
25
|
+
expect(testSchema.properties.propertyPack.properties.baspi5Ref).toEqual(
|
|
26
26
|
undefined
|
|
27
27
|
);
|
|
28
28
|
});
|
|
29
29
|
|
|
30
30
|
test("sample is valid BASPI", () => {
|
|
31
31
|
const testSchema = getTransactionSchema(schemaId, ["baspiV4"]);
|
|
32
|
-
expect(testSchema.properties.propertyPack.
|
|
32
|
+
expect(testSchema.properties.propertyPack.baspi4Ref).toEqual("0");
|
|
33
33
|
const validator = getValidator(schemaId, ["baspiV4"]);
|
|
34
34
|
const isValid = validator(exampleTransaction);
|
|
35
35
|
if (!isValid) console.log(validator.errors);
|
|
@@ -201,9 +201,9 @@ test("correctly gets a subschema with multiple overlays", () => {
|
|
|
201
201
|
const subschema = getSubschema(
|
|
202
202
|
"/propertyPack/parking/parkingArrangements",
|
|
203
203
|
schemaId,
|
|
204
|
-
["
|
|
204
|
+
["baspiV5", "ta6ed4"]
|
|
205
205
|
);
|
|
206
|
-
expect(subschema.
|
|
206
|
+
expect(subschema.baspi5Ref).toBe("A1.6.0");
|
|
207
207
|
expect(subschema.ta6Ref).toBe("9.1");
|
|
208
208
|
});
|
|
209
209
|
|