@pdtf/schemas 0.12.0-0 → 1.0.0

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": "0.12.0-0",
3
+ "version": "1.0.0",
4
4
  "description": "Property Data Trust Framework Schemas and Utilities",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -30,7 +30,7 @@
30
30
  "hasDelayFactors": { "yesNo": "No" }
31
31
  },
32
32
  "ownership": {
33
- "ownershipsToBeTransferredOnSale": [
33
+ "ownershipsToBeTransferred": [
34
34
  {
35
35
  "titleNumber": "HD221222",
36
36
  "ownershipType": "Leasehold",
@@ -164,9 +164,9 @@
164
164
  "ntsRef": "A1.1",
165
165
  "title": "Ownership",
166
166
  "type": "object",
167
- "required": ["ownershipsToBeTransferredOnSale"],
167
+ "required": ["ownershipsToBeTransferred"],
168
168
  "properties": {
169
- "ownershipsToBeTransferredOnSale": {
169
+ "ownershipsToBeTransferred": {
170
170
  "baspiRef": "A1.3",
171
171
  "lawSocietyRef": "TA7/1",
172
172
  "title": "Ownerships to be transferred on sale",
@@ -33,7 +33,7 @@ test("sample with missing dependent required fields is invalid", () => {
33
33
  const clonedExampleTransaction = JSON.parse(
34
34
  JSON.stringify(exampleTransaction)
35
35
  );
36
- clonedExampleTransaction.propertyPack.materialFacts.ownership.ownershipsToBeTransferredOnSale[0].ownershipType =
36
+ clonedExampleTransaction.propertyPack.materialFacts.ownership.ownershipsToBeTransferred[0].ownershipType =
37
37
  "leashold";
38
38
  const isValid = validator(clonedExampleTransaction);
39
39
  expect(isValid).toBe(false);
@@ -90,14 +90,14 @@ test("correctly gets a subschema through a dependency", () => {
90
90
 
91
91
  test("correctly gets another subschema through a dependency", () => {
92
92
  const subschema = getSubschema(
93
- "/propertyPack/materialFacts/ownership/ownershipsToBeTransferredOnSale/0/lengthOfLeaseInYears"
93
+ "/propertyPack/materialFacts/ownership/ownershipsToBeTransferred/0/lengthOfLeaseInYears"
94
94
  );
95
95
  expect(subschema.title).toBe("Length of lease (years)");
96
96
  });
97
97
 
98
98
  test("correctly gets yet another subschema through a dependency", () => {
99
99
  const subschema = getSubschema(
100
- "/propertyPack/materialFacts/ownership/ownershipsToBeTransferredOnSale/0/rentIncrease/details"
100
+ "/propertyPack/materialFacts/ownership/ownershipsToBeTransferred/0/rentIncrease/details"
101
101
  );
102
102
  expect(subschema.title).toBe("Details");
103
103
  });
@@ -145,19 +145,19 @@ test("correctly gets titles across schemas, arrays and non-existient title prope
145
145
  expect(
146
146
  getTitleAtPath(
147
147
  transactionSchema,
148
- "/propertyPack/materialFacts/ownership/ownershipsToBeTransferredOnSale/0/ownershipType"
148
+ "/propertyPack/materialFacts/ownership/ownershipsToBeTransferred/0/ownershipType"
149
149
  )
150
150
  ).toBe("What type of ownership is the property?");
151
151
  expect(
152
152
  getTitleAtPath(
153
153
  transactionSchema,
154
- "/propertyPack/materialFacts/ownership/ownershipsToBeTransferredOnSale/0/lengthOfLeaseInYears"
154
+ "/propertyPack/materialFacts/ownership/ownershipsToBeTransferred/0/lengthOfLeaseInYears"
155
155
  )
156
156
  ).toBe("Length of lease (years)");
157
157
  expect(
158
158
  getTitleAtPath(
159
159
  transactionSchema,
160
- "/propertyPack/materialFacts/ownership/ownershipsToBeTransferredOnSale/0/annualServiceCharge"
160
+ "/propertyPack/materialFacts/ownership/ownershipsToBeTransferred/0/annualServiceCharge"
161
161
  )
162
162
  ).toBe(
163
163
  "Amount of current annual service charge/estate rentcharge/maintenance contribution (£)"