@pdtf/schemas 3.3.0 → 3.4.0-10
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 +2 -1
- package/package.json +1 -1
- package/src/examples/v3/exampleTransaction.json +2 -2
- package/src/schemas/v3/combined.json +1236 -485
- package/src/schemas/v3/overlays/baspi4.json +1 -6
- package/src/schemas/v3/overlays/baspi5.json +3 -7
- package/src/schemas/v3/overlays/lpe1.json +6 -1
- package/src/schemas/v3/overlays/nts.json +5 -4
- package/src/schemas/v3/overlays/{nts-sef.json → nts2.json} +744 -233
- package/src/schemas/v3/overlays/ntsl.json +4 -2
- package/src/schemas/v3/overlays/ntsl2.json +2144 -0
- package/src/schemas/v3/overlays/ta10.json +124 -134
- package/src/schemas/v3/overlays/ta6.json +3 -1
- package/src/schemas/v3/pdtf-transaction.json +360 -55
- package/src/schemas/v3/skeleton.json +38 -1
- package/src/tests/v3/transactionSchema.test.js +36 -0
- package/src/utils/extractOverlay.js +2 -1
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"organisationReference": {},
|
|
31
31
|
"role": {},
|
|
32
32
|
"externalIds": {},
|
|
33
|
-
"
|
|
33
|
+
"participantStatus": {},
|
|
34
34
|
"sellersCapacity": {
|
|
35
35
|
"capacity": {},
|
|
36
36
|
"sellersCapacityDetails": {},
|
|
@@ -215,6 +215,11 @@
|
|
|
215
215
|
"titleNumber": {},
|
|
216
216
|
"titlePropertyDescription": {},
|
|
217
217
|
"ownershipType": {},
|
|
218
|
+
"estateRentcharges": {
|
|
219
|
+
"yesNo": {},
|
|
220
|
+
"details": {},
|
|
221
|
+
"amount": {}
|
|
222
|
+
},
|
|
218
223
|
"wholeFreeholdForSale": {
|
|
219
224
|
"yesNo": {},
|
|
220
225
|
"details": {}
|
|
@@ -1067,6 +1072,7 @@
|
|
|
1067
1072
|
"typeOfConstruction": {
|
|
1068
1073
|
"isStandardForm": {
|
|
1069
1074
|
"yesNo": {},
|
|
1075
|
+
"constructionType": {},
|
|
1070
1076
|
"details": {}
|
|
1071
1077
|
},
|
|
1072
1078
|
"buildingSafety": {
|
|
@@ -1494,6 +1500,7 @@
|
|
|
1494
1500
|
"otherItems": {
|
|
1495
1501
|
"itemName": {},
|
|
1496
1502
|
"isIncludedOrExcluded": {},
|
|
1503
|
+
"comments": {},
|
|
1497
1504
|
"price": {}
|
|
1498
1505
|
}
|
|
1499
1506
|
},
|
|
@@ -1581,6 +1588,7 @@
|
|
|
1581
1588
|
"otherItems": {
|
|
1582
1589
|
"itemName": {},
|
|
1583
1590
|
"isIncludedOrExcluded": {},
|
|
1591
|
+
"comments": {},
|
|
1584
1592
|
"fittedOrFreestanding": {
|
|
1585
1593
|
"fittedOrFreestanding": {}
|
|
1586
1594
|
},
|
|
@@ -1721,6 +1729,7 @@
|
|
|
1721
1729
|
"otherRooms": {
|
|
1722
1730
|
"itemName": {},
|
|
1723
1731
|
"isIncludedOrExcluded": {},
|
|
1732
|
+
"comments": {},
|
|
1724
1733
|
"price": {}
|
|
1725
1734
|
}
|
|
1726
1735
|
},
|
|
@@ -1806,6 +1815,7 @@
|
|
|
1806
1815
|
"otherRooms": {
|
|
1807
1816
|
"itemName": {},
|
|
1808
1817
|
"isIncludedOrExcluded": {},
|
|
1818
|
+
"comments": {},
|
|
1809
1819
|
"price": {}
|
|
1810
1820
|
}
|
|
1811
1821
|
},
|
|
@@ -1848,6 +1858,7 @@
|
|
|
1848
1858
|
"otherRooms": {
|
|
1849
1859
|
"itemName": {},
|
|
1850
1860
|
"isIncludedOrExcluded": {},
|
|
1861
|
+
"comments": {},
|
|
1851
1862
|
"price": {}
|
|
1852
1863
|
}
|
|
1853
1864
|
},
|
|
@@ -1915,6 +1926,7 @@
|
|
|
1915
1926
|
"otherItems": {
|
|
1916
1927
|
"itemName": {},
|
|
1917
1928
|
"isIncludedOrExcluded": {},
|
|
1929
|
+
"comments": {},
|
|
1918
1930
|
"price": {}
|
|
1919
1931
|
}
|
|
1920
1932
|
},
|
|
@@ -1961,6 +1973,7 @@
|
|
|
1961
1973
|
"otherItems": {
|
|
1962
1974
|
"itemName": {},
|
|
1963
1975
|
"isIncludedOrExcluded": {},
|
|
1976
|
+
"comments": {},
|
|
1964
1977
|
"price": {}
|
|
1965
1978
|
}
|
|
1966
1979
|
},
|
|
@@ -2338,6 +2351,10 @@
|
|
|
2338
2351
|
"hasBeenFlooded": {},
|
|
2339
2352
|
"typeOfFlooding": {},
|
|
2340
2353
|
"details": {}
|
|
2354
|
+
},
|
|
2355
|
+
"floodDefences": {
|
|
2356
|
+
"hasFloodDefences": {},
|
|
2357
|
+
"details": {}
|
|
2341
2358
|
}
|
|
2342
2359
|
},
|
|
2343
2360
|
"radon": {
|
|
@@ -4114,5 +4131,25 @@
|
|
|
4114
4131
|
"signedOn": {},
|
|
4115
4132
|
"externalIds": {}
|
|
4116
4133
|
}
|
|
4134
|
+
},
|
|
4135
|
+
"chain": {
|
|
4136
|
+
"onwardPurchase": {
|
|
4137
|
+
"transactionId": {},
|
|
4138
|
+
"externalIds": {},
|
|
4139
|
+
"address": {
|
|
4140
|
+
"buildingNumber": {},
|
|
4141
|
+
"buildingName": {},
|
|
4142
|
+
"subBuilding": {},
|
|
4143
|
+
"street": {},
|
|
4144
|
+
"line1": {},
|
|
4145
|
+
"line2": {},
|
|
4146
|
+
"line 3": {},
|
|
4147
|
+
"town": {},
|
|
4148
|
+
"postcode": {},
|
|
4149
|
+
"homeNation": {}
|
|
4150
|
+
},
|
|
4151
|
+
"uprn": {},
|
|
4152
|
+
"sellingAgent": {}
|
|
4153
|
+
}
|
|
4117
4154
|
}
|
|
4118
4155
|
}
|
|
@@ -44,6 +44,42 @@ test("sample is valid NTS", () => {
|
|
|
44
44
|
expect(isValid).toBe(true);
|
|
45
45
|
});
|
|
46
46
|
|
|
47
|
+
test("sample is not valid nts2025 out of the box", () => {
|
|
48
|
+
const validator = getValidator(schemaId, ["nts2025"]);
|
|
49
|
+
const isValid = validator(exampleTransaction);
|
|
50
|
+
expect(isValid).toBe(false);
|
|
51
|
+
expect(validator.errors.length).toBe(3);
|
|
52
|
+
expect(validator.errors.map((e) => e.message)).toEqual([
|
|
53
|
+
"must have required property 'transferFees'",
|
|
54
|
+
"must have required property 'constructionType'",
|
|
55
|
+
"must have required property 'floodDefences'",
|
|
56
|
+
]);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
test("sample is valid nts2025 with some additions", () => {
|
|
60
|
+
const validator = getValidator(schemaId, ["nts2025"]);
|
|
61
|
+
const clonedExampleTransaction = JSON.parse(
|
|
62
|
+
JSON.stringify(exampleTransaction)
|
|
63
|
+
);
|
|
64
|
+
clonedExampleTransaction.propertyPack.ownership.ownershipsToBeTransferred[0].leaseholdInformation.serviceCharge.transferFees =
|
|
65
|
+
{
|
|
66
|
+
yesNo: "Yes",
|
|
67
|
+
details: "Transfer fees exist",
|
|
68
|
+
};
|
|
69
|
+
clonedExampleTransaction.propertyPack.typeOfConstruction.isStandardForm = {
|
|
70
|
+
yesNo: "Yes",
|
|
71
|
+
constructionType: "Timber frame",
|
|
72
|
+
};
|
|
73
|
+
clonedExampleTransaction.propertyPack.environmentalIssues.flooding.floodDefences =
|
|
74
|
+
{
|
|
75
|
+
hasFloodDefences: "Yes",
|
|
76
|
+
details: "Flood defences exist",
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const isValid = validator(clonedExampleTransaction);
|
|
80
|
+
expect(isValid).toBe(true);
|
|
81
|
+
});
|
|
82
|
+
|
|
47
83
|
test("sample is not valid NTSL (lettings)", () => {
|
|
48
84
|
const validator = getValidator(schemaId, ["ntsl2023"]);
|
|
49
85
|
const isValid = validator(exampleTransaction);
|