@pdtf/schemas 2.3.0-1 → 2.3.0-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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdtf/schemas",
3
- "version": "2.3.0-1",
3
+ "version": "2.3.0-2",
4
4
  "description": "Property Data Trust Framework Schemas and Utilities",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -25,7 +25,6 @@
25
25
  "county": "Herts",
26
26
  "postcode": "AL3 5AF"
27
27
  },
28
-
29
28
  "delayFactors": {
30
29
  "hasDelayFactors": { "yesNo": "No" }
31
30
  },
@@ -6,6 +6,7 @@
6
6
  "description": "A schema defining the PDTF transaction data structure, supporting mapping to BASPI, Law Society and RICS Data Schema elements.",
7
7
  "baspiRequired": ["participants", "propertyPack"],
8
8
  "ta6Required": ["participants", "propertyPack"],
9
+ "ntsRequired": ["propertyPack"],
9
10
  "properties": {
10
11
  "$schema": {
11
12
  "type": "string"
@@ -181,12 +182,7 @@
181
182
  "environmentalIssues",
182
183
  "additionalInformation"
183
184
  ],
184
- "ntsRequired": [
185
- "priceInformation",
186
- "ownership",
187
- "councilTax",
188
- "energyEfficiency"
189
- ],
185
+ "ntsRequired": ["ownership", "councilTax", "energyEfficiency"],
190
186
  "properties": {
191
187
  "address": {
192
188
  "baspiRef": "A1.1",
@@ -356,7 +352,7 @@
356
352
  "ntsRef": "A3",
357
353
  "title": "Price information",
358
354
  "type": "object",
359
- "ntsRequired": ["price", "preiceQualifier"],
355
+ "ntsRequired": ["price", "priceQualifier"],
360
356
  "properties": {
361
357
  "price": {
362
358
  "ntsRef": "A3.1",
@@ -8242,6 +8238,7 @@
8242
8238
  "title": "Energy Efficiency",
8243
8239
  "type": "object",
8244
8240
  "baspiRequired": ["certificate", "greenDealLoan"],
8241
+ "ntsRequired": ["certificate"],
8245
8242
  "ta6Required": ["certificateIsSupplied", "greenDealLoan"],
8246
8243
  "properties": {
8247
8244
  "certificateIsSupplied": {
@@ -8254,6 +8251,7 @@
8254
8251
  "baspiRef": "A1.8.3.1",
8255
8252
  "type": "object",
8256
8253
  "baspiRequired": ["currentEnergyRating"],
8254
+ "ntsRequired": ["currentEnergyRating"],
8257
8255
  "properties": {
8258
8256
  "certificateNumber": {
8259
8257
  "type": "string"
@@ -8660,6 +8658,7 @@
8660
8658
  "councilTaxBand",
8661
8659
  "councilTaxAffectingAlterations"
8662
8660
  ],
8661
+ "ntsRequired": ["councilTaxBand"],
8663
8662
  "properties": {
8664
8663
  "councilTaxBand": {
8665
8664
  "baspiRef": "A1.9.1",
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "$id": "https://trust.propdata.org.uk/schemas/v2/overlays/nts.json",
4
+ "required": [
5
+ "propertyPack"
6
+ ],
4
7
  "properties": {
5
8
  "propertyPack": {
6
9
  "required": [
@@ -9,7 +12,6 @@
9
12
  "properties": {
10
13
  "materialFacts": {
11
14
  "required": [
12
- "priceInformation",
13
15
  "ownership",
14
16
  "councilTax",
15
17
  "energyEfficiency"
@@ -20,7 +22,7 @@
20
22
  "title": "Price information",
21
23
  "required": [
22
24
  "price",
23
- "preiceQualifier"
25
+ "priceQualifier"
24
26
  ],
25
27
  "properties": {
26
28
  "price": {
@@ -212,9 +214,24 @@
212
214
  }
213
215
  }
214
216
  },
217
+ "energyEfficiency": {
218
+ "required": [
219
+ "certificate"
220
+ ],
221
+ "properties": {
222
+ "certificate": {
223
+ "required": [
224
+ "currentEnergyRating"
225
+ ]
226
+ }
227
+ }
228
+ },
215
229
  "councilTax": {
216
230
  "ntsRef": "A2",
217
231
  "title": "Council Tax",
232
+ "required": [
233
+ "councilTaxBand"
234
+ ],
218
235
  "properties": {
219
236
  "councilTaxBand": {
220
237
  "ntsRef": "A2.1",
@@ -26,7 +26,7 @@ test("exports a property pack schema, v2 with baspi overlay by default", () => {
26
26
  ).toEqual("A");
27
27
  });
28
28
 
29
- test("sample is valid", () => {
29
+ test("sample is valid BASPI", () => {
30
30
  const testSchema = getTransactionSchema();
31
31
  expect(
32
32
  testSchema.properties.propertyPack.properties.materialFacts.baspiRef
@@ -265,7 +265,7 @@ test("correctly gets a subschema validator for an NTS overlay", () => {
265
265
  "nts2023",
266
266
  ]);
267
267
  let isValid = validator(data);
268
- expect(isValid).toBe(false);
268
+ expect(isValid).toBe(true);
269
269
  });
270
270
 
271
271
  test("correctly gets a subschema validator for an LPE1 overlay", () => {