@pdtf/schemas 1.0.0 → 1.1.2
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/index.js +13 -10
- package/package.json +1 -1
- package/src/schemas/v1/leasehold-information.json +2064 -0
- package/src/schemas/v1/legal-information.json +2 -2
- package/src/schemas/v1/material-facts.json +4 -4
- package/src/schemas/v1/pdtf-transaction.json +3 -0
- package/src/tests/transactionSchema.test.js +21 -0
|
@@ -313,7 +313,7 @@
|
|
|
313
313
|
"type": "number"
|
|
314
314
|
},
|
|
315
315
|
"panelsOwnedOutright": {
|
|
316
|
-
"baspiRef": "",
|
|
316
|
+
"baspiRef": "B4.3.2",
|
|
317
317
|
"lawSocietyRef": "TA6/4.6b",
|
|
318
318
|
"RDSRef": "Objects/Ownership",
|
|
319
319
|
"title": "Do you own the panels, and all equipment related to them, outright?",
|
|
@@ -321,7 +321,7 @@
|
|
|
321
321
|
"description": "If no, provide details of who owns them and the relevant documentation"
|
|
322
322
|
},
|
|
323
323
|
"panelProviderLease": {
|
|
324
|
-
"baspiRef": "B4.3.
|
|
324
|
+
"baspiRef": "B4.3.3",
|
|
325
325
|
"lawSocietyRef": "TA6/4.6c",
|
|
326
326
|
"RDSRef": "Objects/Ownership",
|
|
327
327
|
"title": "Is there an existing long lease of the roof/air space granted to a panel provider?",
|
|
@@ -515,7 +515,7 @@
|
|
|
515
515
|
}
|
|
516
516
|
},
|
|
517
517
|
"listingAndConservation": {
|
|
518
|
-
"baspiRef": "
|
|
518
|
+
"baspiRef": "A1.7",
|
|
519
519
|
"lawSocietyRef": "TA6/4.7",
|
|
520
520
|
"title": "Listing and Conservation",
|
|
521
521
|
"type": "object",
|
|
@@ -590,7 +590,7 @@
|
|
|
590
590
|
}
|
|
591
591
|
},
|
|
592
592
|
"typeOfConstruction": {
|
|
593
|
-
"baspiRef": "
|
|
593
|
+
"baspiRef": "A1.8",
|
|
594
594
|
"title": "Type of Construction",
|
|
595
595
|
"type": "object",
|
|
596
596
|
"required": ["isStandardForm", "hasFlammableExternalWallSystem"],
|
|
@@ -602,7 +602,7 @@
|
|
|
602
602
|
"$ref": "#/$defs/yesNoDetailIfNo"
|
|
603
603
|
},
|
|
604
604
|
"hasFlammableExternalWallSystem": {
|
|
605
|
-
"baspiRef": "
|
|
605
|
+
"baspiRef": "A1.8.2",
|
|
606
606
|
"RDSRef": "Tenure/DisputesComplaints,Tenure/LegalClaims",
|
|
607
607
|
"title": "Does the property have potentially flammable external wall system - including cladding and balconies etc?",
|
|
608
608
|
"$ref": "#/$defs/yesNoDetailIfYes",
|
|
@@ -617,7 +617,7 @@
|
|
|
617
617
|
"required": ["energyEfficiencyRating", "hasSprayFoamInstalled"],
|
|
618
618
|
"properties": {
|
|
619
619
|
"energyEfficiencyRating": {
|
|
620
|
-
"baspiRef": "
|
|
620
|
+
"baspiRef": "A1.8.3",
|
|
621
621
|
"lawSocietyRef": "TA6/7.6",
|
|
622
622
|
"title": "Energy Efficiency Rating",
|
|
623
623
|
"description": "What is the energy efficiency rating of the property according to the latest Energy Performance Certificate (EPC)?",
|
|
@@ -118,6 +118,27 @@ test("correctly gets yet, yet, yet another subschema through a dependency", () =
|
|
|
118
118
|
expect(subschema.enum).toStrictEqual(["Yes", "No"]);
|
|
119
119
|
});
|
|
120
120
|
|
|
121
|
+
test("correctly gets yet, yet, yet another subschema through a second item dependency", () => {
|
|
122
|
+
const subschema = getSubschema(
|
|
123
|
+
"/propertyPack/materialFacts/otherIssues/flooding/typeOfFlooding"
|
|
124
|
+
);
|
|
125
|
+
expect(subschema.type).toBe("object");
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
test("correctly gets yes another subschema but through a non-baspi oneOf structure", () => {
|
|
129
|
+
const subschema = getSubschema(
|
|
130
|
+
"/propertyPack/titlesToBeSold/0/registerExtract/OCSummaryData/RestrictionDetails/RestrictionEntry/ChargeRestriction/EntryDetails/EntryText"
|
|
131
|
+
);
|
|
132
|
+
expect(subschema).toEqual({ type: "string" });
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
test("correctly gets yes another subschema but through a non-baspi oneOf structure with array option", () => {
|
|
136
|
+
const subschema = getSubschema(
|
|
137
|
+
"/propertyPack/titlesToBeSold/0/registerExtract/OCSummaryData/RestrictionDetails/RestrictionEntry/0/ChargeRestriction/EntryDetails/EntryText"
|
|
138
|
+
);
|
|
139
|
+
expect(subschema).toEqual({ type: "string" });
|
|
140
|
+
});
|
|
141
|
+
|
|
121
142
|
test("correctly gets a subschema validator which is already cached", () => {
|
|
122
143
|
const validator = getSubschemaValidator(
|
|
123
144
|
"/propertyPack/energyPerformanceCertificate"
|