@pdtf/schemas 3.6.0-32 → 3.6.0-33
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 +52 -33
- package/docs/sef25-extensions-ui-spec.md +63 -123
- package/package.json +1 -1
- package/src/schemas/v3/combined.json +12 -51
- package/src/schemas/v3/compactSkeleton.txt +0 -5
- package/src/schemas/v3/overlays/extensions/ic.json +3 -0
- package/src/schemas/v3/overlays/extensions/mi.json +3 -0
- package/src/schemas/v3/overlays/sef25.json +966 -0
- package/src/schemas/v3/pdtf-transaction.json +13 -233
- package/src/schemas/v3/skeleton.json +1 -7
- package/src/tests/v3/extensionOverlays.test.js +14 -14
- package/src/utils/extractOverlay.js +1 -0
|
@@ -166,13 +166,7 @@
|
|
|
166
166
|
},
|
|
167
167
|
"yearOfBuild": "integer",
|
|
168
168
|
"isNewBuild": {
|
|
169
|
-
"yesNo": "
|
|
170
|
-
"newBuildDetails": {
|
|
171
|
-
"snaggingCompletion": "string",
|
|
172
|
-
"adoptionStatus": "string",
|
|
173
|
-
"conversionConsent": "boolean",
|
|
174
|
-
"conversionQuality": "string"
|
|
175
|
-
}
|
|
169
|
+
"yesNo": "string"
|
|
176
170
|
},
|
|
177
171
|
"isHMO": "string",
|
|
178
172
|
"isStudentAccommodation": "string",
|
|
@@ -494,7 +494,7 @@ describe("Extension Overlays", () => {
|
|
|
494
494
|
const noBranch = mainsWater.oneOf[0];
|
|
495
495
|
const cost = noBranch?.properties?.associatedCost;
|
|
496
496
|
expect(cost).toBeDefined();
|
|
497
|
-
expect(cost.
|
|
497
|
+
expect(cost.ntsRef).toBe("U1.1");
|
|
498
498
|
expect(cost.required).toEqual(["hasCost"]);
|
|
499
499
|
expect(cost.properties.hasCost.type).toBe("string");
|
|
500
500
|
expect(cost.oneOf).toHaveLength(2);
|
|
@@ -517,7 +517,7 @@ describe("Extension Overlays", () => {
|
|
|
517
517
|
const noBranch = mainsFoul.oneOf[2];
|
|
518
518
|
const cost = noBranch?.properties?.associatedCost;
|
|
519
519
|
expect(cost).toBeDefined();
|
|
520
|
-
expect(cost.
|
|
520
|
+
expect(cost.ntsRef).toBe("U1.2");
|
|
521
521
|
expect(cost.required).toEqual(["hasCost"]);
|
|
522
522
|
});
|
|
523
523
|
|
|
@@ -533,12 +533,12 @@ describe("Extension Overlays", () => {
|
|
|
533
533
|
const yesBranch = controlled.oneOf[1];
|
|
534
534
|
const cost = yesBranch?.properties?.costOfPermit;
|
|
535
535
|
expect(cost).toBeDefined();
|
|
536
|
-
expect(cost.
|
|
536
|
+
expect(cost.ntsRef).toBe("P1.1");
|
|
537
537
|
expect(cost.type).toBe("number");
|
|
538
538
|
|
|
539
539
|
const freq = yesBranch?.properties?.costOfPermitFrequency;
|
|
540
540
|
expect(freq).toBeDefined();
|
|
541
|
-
expect(freq.
|
|
541
|
+
expect(freq.ntsRef).toBe("P1.2");
|
|
542
542
|
expect(freq.type).toBe("string");
|
|
543
543
|
});
|
|
544
544
|
|
|
@@ -557,7 +557,7 @@ describe("Extension Overlays", () => {
|
|
|
557
557
|
|
|
558
558
|
expectedFields.forEach(({ key, ref }) => {
|
|
559
559
|
expect(si[key]).toBeDefined();
|
|
560
|
-
expect(si[key].
|
|
560
|
+
expect(si[key].ntsRef).toBe(ref);
|
|
561
561
|
expect(si[key].required).toContain("yesNo");
|
|
562
562
|
expect(si[key].discriminator?.propertyName).toBe("yesNo");
|
|
563
563
|
expect(si[key].oneOf).toHaveLength(2);
|
|
@@ -988,8 +988,8 @@ describe("Extension Overlays", () => {
|
|
|
988
988
|
expect(si?.required).toContain("ongoingHealthOrSafetyIssue");
|
|
989
989
|
|
|
990
990
|
// SEF25 hazards also present
|
|
991
|
-
expect(si?.properties?.wellsDitchesShaft?.
|
|
992
|
-
expect(si?.properties?.knownAreasInPoorCondition?.
|
|
991
|
+
expect(si?.properties?.wellsDitchesShaft?.ntsRef).toBe("H1.1");
|
|
992
|
+
expect(si?.properties?.knownAreasInPoorCondition?.ntsRef).toBe(
|
|
993
993
|
"H1.4"
|
|
994
994
|
);
|
|
995
995
|
});
|
|
@@ -1187,8 +1187,8 @@ describe("Extension Overlays", () => {
|
|
|
1187
1187
|
{ path: "otherGuarantees", ref: "W1.7" },
|
|
1188
1188
|
];
|
|
1189
1189
|
|
|
1190
|
-
test("should have
|
|
1191
|
-
const schema = getTransactionSchema(schemaId, ["baspiV5"]);
|
|
1190
|
+
test("should have ntsRef on all warranty categories when wg overlay loaded", () => {
|
|
1191
|
+
const schema = getTransactionSchema(schemaId, ["baspiV5", "wg"]);
|
|
1192
1192
|
const warranties =
|
|
1193
1193
|
schema.properties?.propertyPack?.properties?.guaranteesWarrantiesAndIndemnityInsurances;
|
|
1194
1194
|
|
|
@@ -1196,7 +1196,7 @@ describe("Extension Overlays", () => {
|
|
|
1196
1196
|
const yesBranch = warranties.oneOf[1];
|
|
1197
1197
|
|
|
1198
1198
|
warrantyCategoryPaths.forEach(({ path, ref }) => {
|
|
1199
|
-
expect(yesBranch.properties[path]?.
|
|
1199
|
+
expect(yesBranch.properties[path]?.ntsRef).toBe(ref);
|
|
1200
1200
|
});
|
|
1201
1201
|
});
|
|
1202
1202
|
|
|
@@ -1252,11 +1252,11 @@ describe("Extension Overlays", () => {
|
|
|
1252
1252
|
});
|
|
1253
1253
|
|
|
1254
1254
|
describe("Neighbour development (nd)", () => {
|
|
1255
|
-
test("should add
|
|
1255
|
+
test("should add ntsRef to neighbourDevelopment", () => {
|
|
1256
1256
|
const schema = getTransactionSchema(schemaId, ["nd"]);
|
|
1257
1257
|
const nd = schema.properties?.propertyPack?.properties?.notices
|
|
1258
1258
|
?.properties?.neighbourDevelopment;
|
|
1259
|
-
expect(nd?.
|
|
1259
|
+
expect(nd?.ntsRef).toBe("N1.1");
|
|
1260
1260
|
});
|
|
1261
1261
|
|
|
1262
1262
|
test("should add ntsRef via nd overlay", () => {
|
|
@@ -1326,7 +1326,7 @@ describe("Extension Overlays", () => {
|
|
|
1326
1326
|
expect(freeholdBranch?.required || []).not.toContain("titleRestrictions");
|
|
1327
1327
|
});
|
|
1328
1328
|
|
|
1329
|
-
test("should have correct
|
|
1329
|
+
test("should have correct ntsRef", () => {
|
|
1330
1330
|
const schema = getTransactionSchema(schemaId, ["tr"]);
|
|
1331
1331
|
const items = schema.properties?.propertyPack?.properties?.ownership
|
|
1332
1332
|
?.properties?.ownershipsToBeTransferred?.items;
|
|
@@ -1349,7 +1349,7 @@ describe("Extension Overlays", () => {
|
|
|
1349
1349
|
|
|
1350
1350
|
// NTS2 fields still work
|
|
1351
1351
|
const si = schema.properties?.propertyPack?.properties?.specialistIssues;
|
|
1352
|
-
expect(si?.properties?.wellsDitchesShaft?.
|
|
1352
|
+
expect(si?.properties?.wellsDitchesShaft?.ntsRef).toBe("H1.1");
|
|
1353
1353
|
|
|
1354
1354
|
// New SEF25 fields present
|
|
1355
1355
|
const parking = schema.properties?.propertyPack?.properties?.parking?.properties;
|