@pdtf/schemas 2.0.0-23 → 2.0.0-25
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 +0 -3
- package/package.json +1 -1
- package/src/examples/v2/exampleTransaction.json +18 -11
- package/src/schemas/v2/combined.json +1366 -338
- package/src/schemas/v2/overlays/baspi.json +554 -84
- package/src/schemas/v2/overlays/rds.json +195 -35
- package/src/schemas/v2/overlays/ta10.json +3 -0
- package/src/schemas/v2/overlays/ta6.json +3294 -320
- package/src/schemas/v2/pdtf-transaction.json +474 -140
- package/src/schemas/v2/skeleton.json +40 -13
- package/src/tests/v2/transactionSchema.test.js +78 -1
- package/src/utils/LLCSearchResponseV2_0.xsd.json +341 -0
- package/src/utils/deref.js +9 -0
- package/src/utils/extractOverlay.js +1 -1
- package/src/utils/hmlrLLC1.json +275 -0
package/index.js
CHANGED
|
@@ -135,7 +135,6 @@ const getSubschema = (path, schemaId, overlays) => {
|
|
|
135
135
|
};
|
|
136
136
|
|
|
137
137
|
const isPathValid = (path, schemaId, overlays) => {
|
|
138
|
-
const schema = getTransactionSchema(schemaId, overlays);
|
|
139
138
|
try {
|
|
140
139
|
return getSubschema(path, schemaId, overlays) !== undefined;
|
|
141
140
|
} catch (err) {
|
|
@@ -148,7 +147,6 @@ const getSubschemaValidator = (path, schemaId, overlays = ["baspiV4"]) => {
|
|
|
148
147
|
const overlayKey = (overlays || []).join(".");
|
|
149
148
|
// see if we can retrieve the schema by path, schemaId and overlays
|
|
150
149
|
const cacheKey = `${path}-${schemaId}-${overlayKey}`;
|
|
151
|
-
console.log("cacheKey", cacheKey);
|
|
152
150
|
let validator = ajv.getSchema(cacheKey);
|
|
153
151
|
// retrieve whole schema by $id if available
|
|
154
152
|
if (!validator && subSchema.$id) validator = ajv.getSchema(cacheKey);
|
|
@@ -224,7 +222,6 @@ const validateVerifiedClaims = (verifiedClaims, schemaId, overlays) => {
|
|
|
224
222
|
for (const path of paths) {
|
|
225
223
|
const validPath = isPathValid(path, schemaId, overlays);
|
|
226
224
|
if (validPath) {
|
|
227
|
-
console.log("overlays", path, overlays);
|
|
228
225
|
const subValidator = getSubschemaValidator(path, schemaId, overlays);
|
|
229
226
|
const isValid = subValidator(claim.claims[path]);
|
|
230
227
|
if (!isValid) {
|
package/package.json
CHANGED
|
@@ -144,6 +144,10 @@
|
|
|
144
144
|
"disputesAndComplaints": {
|
|
145
145
|
"hasDisputesAndComplaints": {
|
|
146
146
|
"yesNo": "No"
|
|
147
|
+
},
|
|
148
|
+
"leadingToDisputesAndComplaints": {
|
|
149
|
+
"yesNo": "Yes",
|
|
150
|
+
"details": "Neighbour's dog barking"
|
|
147
151
|
}
|
|
148
152
|
},
|
|
149
153
|
"alterationsAndChanges": {
|
|
@@ -164,9 +168,6 @@
|
|
|
164
168
|
"yesNo": "Not required",
|
|
165
169
|
"details": "No restriction"
|
|
166
170
|
},
|
|
167
|
-
"unfinished": {
|
|
168
|
-
"yesNo": "No"
|
|
169
|
-
},
|
|
170
171
|
"yesNo": "Yes",
|
|
171
172
|
"details": "Bedroom and ensuite shower room extension 2005"
|
|
172
173
|
},
|
|
@@ -190,9 +191,6 @@
|
|
|
190
191
|
"yesNo": "Not required",
|
|
191
192
|
"details": "No restriction"
|
|
192
193
|
},
|
|
193
|
-
"unfinished": {
|
|
194
|
-
"yesNo": "No"
|
|
195
|
-
},
|
|
196
194
|
"yesNo": "Yes",
|
|
197
195
|
"details": "New front door added 2016",
|
|
198
196
|
"yearCompleted": 2016
|
|
@@ -214,13 +212,13 @@
|
|
|
214
212
|
"yesNo": "No",
|
|
215
213
|
"details": "Added as part of initial build and deeds"
|
|
216
214
|
},
|
|
217
|
-
"unfinished": {
|
|
218
|
-
"yesNo": "No"
|
|
219
|
-
},
|
|
220
215
|
"yesNo": "Yes",
|
|
221
216
|
"details": "Conservatory added during house build in 1990 and exterior quality door separates the conservatory from the kitchen/dining room",
|
|
222
217
|
"yearCompleted": 1990
|
|
223
218
|
},
|
|
219
|
+
"worksUnfinished": {
|
|
220
|
+
"yesNo": "No"
|
|
221
|
+
},
|
|
224
222
|
"planningPermissionBreaches": {
|
|
225
223
|
"yesNo": "No"
|
|
226
224
|
},
|
|
@@ -382,7 +380,10 @@
|
|
|
382
380
|
"insurance": {
|
|
383
381
|
"isInsured": "Yes",
|
|
384
382
|
"difficultiesObtainingInsurance": {
|
|
385
|
-
"yesNo": "No"
|
|
383
|
+
"abnormalRiseInPremiums": { "yesNo": "No" },
|
|
384
|
+
"subjectToHighExcesses": { "yesNo": "No" },
|
|
385
|
+
"subjectToUnusualConditions": { "yesNo": "No" },
|
|
386
|
+
"refused": { "yesNo": "No" }
|
|
386
387
|
},
|
|
387
388
|
"insuranceClaims": {
|
|
388
389
|
"yesNo": "No"
|
|
@@ -477,6 +478,9 @@
|
|
|
477
478
|
},
|
|
478
479
|
"otherMaterialIssue": {
|
|
479
480
|
"yesNo": "No"
|
|
481
|
+
},
|
|
482
|
+
"otherCharges": {
|
|
483
|
+
"yesNo": "No"
|
|
480
484
|
}
|
|
481
485
|
},
|
|
482
486
|
"consumerProtectionRegulationsDeclaration": {
|
|
@@ -551,7 +555,10 @@
|
|
|
551
555
|
"completionAndMoving": {
|
|
552
556
|
"willRemoveAllRubbish": true,
|
|
553
557
|
"otherPropertyInChain": { "yesNo": "No" },
|
|
554
|
-
"moveRestrictionDates": {
|
|
558
|
+
"moveRestrictionDates": {
|
|
559
|
+
"yesNo": "Yes",
|
|
560
|
+
"details": "On holiday 1-15 Aug 23"
|
|
561
|
+
},
|
|
555
562
|
"digitalPropertyLogbook": {
|
|
556
563
|
"yesNo": "Yes",
|
|
557
564
|
"logbookProvider": "someone",
|