@pdtf/schemas 0.11.0 → 0.12.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.11.0",
3
+ "version": "0.12.0-0",
4
4
  "description": "Property Data Trust Framework Schemas and Utilities",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -30,22 +30,27 @@
30
30
  "hasDelayFactors": { "yesNo": "No" }
31
31
  },
32
32
  "ownership": {
33
- "ownershipType": "Leasehold",
34
- "sharedOwnership": { "isSharedOwnership": "No" },
35
- "startYearOfLease": 1900,
36
- "lengthOfLeaseInYears": 999,
37
- "currentGroundRent": 1750,
38
- "rentIncrease": { "yesNo": "No" },
39
- "annualServiceCharge": 250.23,
40
- "largeAdditionalExpense": { "yesNo": "No" },
41
- "additionalFeesOnSale": 0,
42
- "freeholderContactDetails": {
43
- "nameOrOrganisation": "Fleesum Properties"
44
- },
45
- "managingAgentContactDetails": {
46
- "nameOrOrganisation": "Pricee Living"
47
- },
48
- "managementCompanyDirectorRequirement": { "yesNo": "No" }
33
+ "ownershipsToBeTransferredOnSale": [
34
+ {
35
+ "titleNumber": "HD221222",
36
+ "ownershipType": "Leasehold",
37
+ "sharedOwnership": { "isSharedOwnership": "No" },
38
+ "startYearOfLease": 1900,
39
+ "lengthOfLeaseInYears": 999,
40
+ "currentGroundRent": 1750,
41
+ "rentIncrease": { "yesNo": "No" },
42
+ "annualServiceCharge": 250.23,
43
+ "largeAdditionalExpense": { "yesNo": "No" },
44
+ "additionalFeesOnSale": 0,
45
+ "freeholderContactDetails": {
46
+ "nameOrOrganisation": "Fleesum Properties"
47
+ },
48
+ "managingAgentContactDetails": {
49
+ "nameOrOrganisation": "Pricee Living"
50
+ },
51
+ "managementCompanyDirectorRequirement": { "yesNo": "No" }
52
+ }
53
+ ]
49
54
  },
50
55
  "parking": {
51
56
  "parkingArrangements": {
@@ -425,6 +430,7 @@
425
430
  "legalOwners": {
426
431
  "namesOfLegalOwners": [
427
432
  {
433
+ "ownerType": "Private individual",
428
434
  "firstName": "Peter",
429
435
  "lastName": "Hetherington-Smythe"
430
436
  }
@@ -24,39 +24,68 @@
24
24
  "type": "object",
25
25
  "properties": {
26
26
  "namesOfLegalOwners": {
27
- "baspiRef": "B1.1",
27
+ "baspiRef": "B1",
28
28
  "RDSRef": "RightsHolders",
29
- "title": "Full names of all legal owner(s)",
29
+ "title": "Names of all legal owners",
30
30
  "type": "array",
31
31
  "minItems": 1,
32
32
  "items": {
33
+ "baspiRef": "B1",
34
+ "title": "Legal owner",
33
35
  "type": "object",
34
- "baspiRef": "B1.1.1",
35
- "title": "Owner name",
36
- "required": ["firstName", "lastName"],
36
+ "required": ["ownerType"],
37
37
  "properties": {
38
- "firstName": {
39
- "baspiRef": "B1.1.1",
40
- "title": "First name",
38
+ "ownerType": {
41
39
  "type": "string",
42
- "minLength": 1
43
- },
44
- "middleNames": {
45
- "baspiRef": "B1.1.2",
46
- "title": "Middle names",
47
- "type": "string"
40
+ "title": "Type of owner",
41
+ "enum": ["Private individual", "Organisation"]
42
+ }
43
+ },
44
+ "discriminator": { "propertyName": "ownerType" },
45
+ "oneOf": [
46
+ {
47
+ "properties": {
48
+ "ownerType": {
49
+ "enum": ["Private individual"]
50
+ },
51
+ "firstName": {
52
+ "baspiRef": "B1.1.1",
53
+ "title": "First name",
54
+ "type": "string",
55
+ "minLength": 1
56
+ },
57
+ "middleNames": {
58
+ "baspiRef": "B1.1.2",
59
+ "title": "Middle names",
60
+ "type": "string"
61
+ },
62
+ "lastName": {
63
+ "baspiRef": "B1.1.3",
64
+ "title": "Last name",
65
+ "type": "string",
66
+ "minLength": 1
67
+ }
68
+ },
69
+ "required": ["firstName", "lastName"]
48
70
  },
49
- "lastName": {
50
- "baspiRef": "B1.1.3",
51
- "title": "Last name",
52
- "type": "string",
53
- "minLength": 1
71
+ {
72
+ "properties": {
73
+ "ownerType": {
74
+ "enum": ["Organisation"]
75
+ },
76
+ "organisationName": {
77
+ "baspiRef": "B1.1.1",
78
+ "title": "Organisation name",
79
+ "type": "string",
80
+ "minLength": 1
81
+ }
82
+ },
83
+ "required": ["organisationName"]
54
84
  }
55
- }
85
+ ]
56
86
  }
57
87
  }
58
- },
59
- "required": ["namesOfLegalOwners"]
88
+ }
60
89
  },
61
90
  "sellersCapacity": {
62
91
  "baspiRef": "B1.3",
@@ -164,255 +164,275 @@
164
164
  "ntsRef": "A1.1",
165
165
  "title": "Ownership",
166
166
  "type": "object",
167
- "required": ["ownershipType"],
167
+ "required": ["ownershipsToBeTransferredOnSale"],
168
168
  "properties": {
169
- "ownershipType": {
170
- "baspiRef": "A1.3.1",
171
- "RDSRef": "Tenure/Tenure",
172
- "lawSocietyRef": "TA7/1.1",
173
- "title": "What type of ownership is the property?",
174
- "description": "A Managed Freehold is any freehold where there are shared amenities, the maintenance of which you pay for through an estate rentcharge, service charge, informal or formal contribution. Choose Leasehold if your property is under a Shared Ownership arrangement.",
175
- "type": "string",
176
- "enum": [
177
- "Freehold",
178
- "Managed Freehold",
179
- "Commonhold",
180
- "Leasehold",
181
- "Other"
182
- ]
183
- }
184
- },
185
- "discriminator": { "propertyName": "ownershipType" },
186
- "oneOf": [
187
- {
188
- "properties": {
189
- "ownershipType": {
190
- "enum": ["Freehold"]
191
- },
192
- "wholeFreeholdForSale": {
193
- "title": "Is the entire freehold being sold?",
194
- "description": "If not, describe the share for sale (e.g. Ground floor flat only)",
195
- "$ref": "#/$defs/yesNoDetailIfNo"
196
- }
197
- },
198
- "required": ["wholeFreeholdForSale"]
199
- },
200
- {
201
- "properties": {
202
- "ownershipType": {
203
- "enum": ["Managed Freehold", "Commonhold"]
204
- },
205
- "annualServiceCharge": {
206
- "baspiRef": "A1.5.1",
207
- "lawSocietyRef": "TA6/10.1",
208
- "ntsRef": "A1.6",
209
- "RDSRef": "TenureAgreements/ServiceCharges",
210
- "title": "Amount of current annual service charge/estate rentcharge/maintenance contribution (£)",
211
- "type": "number"
212
- },
213
- "largeAdditionalExpense": {
214
- "baspiRef": "A1.5.2",
215
- "lawSocietyRef": "TA6/10.1",
216
- "RDSRef": "TenureAgreements/Repairs,TenureAgreements/ServicesCharges/Breakdown",
217
- "title": "Have you received notice of any large expense in addition to the annual payment?",
218
- "$ref": "#/$defs/yesNoDetailIfYes",
219
- "description": "If yes, please provide details and confirm whether there is a reserve fund or sinking fund which will cover the cost of the works."
220
- },
221
- "additionalFeesOnSale": {
222
- "baspiRef": "A1.5.3",
223
- "lawSocietyRef": "TA6/10.1",
224
- "RDSRef": "TenureAgreements/LegalCosts/Actual, TenureAgreements/LegalCosts/Estimated",
225
- "title": "Additional fees payable on sale (£)",
226
- "type": "number"
227
- },
228
- "freeholderContactDetails": {
229
- "baspiRef": "A1.5.4",
230
- "lawSocietyRef": "TA7/4.1a",
231
- "RDSRef": "TenureAgreements/Assignor",
232
- "title": "The contact details of the freeholder or rentcharge owner",
233
- "$ref": "#/$defs/contactDetails"
234
- },
235
- "managingAgentContactDetails": {
236
- "baspiRef": "A1.5.5",
237
- "lawSocietyRef": "TA7/4.1a",
238
- "RDSRef": "Participants/Role",
239
- "title": "The contact details of the managing agent",
240
- "$ref": "#/$defs/contactDetails"
241
- },
242
- "managementCompanyDirectorRequirement": {
243
- "baspiRef": "A1.5.6",
244
- "RDSRef": "Property/Flags",
245
- "title": "Is the owner of the property required to become a director in a management company for the maintenance of shared amenities?",
246
- "$ref": "#/$defs/yesNo"
247
- }
248
- },
249
- "required": [
250
- "annualServiceCharge",
251
- "largeAdditionalExpense",
252
- "additionalFeesOnSale",
253
- "freeholderContactDetails",
254
- "managingAgentContactDetails",
255
- "managementCompanyDirectorRequirement"
256
- ]
257
- },
258
- {
259
- "properties": {
260
- "ownershipType": {
261
- "enum": ["Leasehold"]
169
+ "ownershipsToBeTransferredOnSale": {
170
+ "baspiRef": "A1.3",
171
+ "lawSocietyRef": "TA7/1",
172
+ "title": "Ownerships to be transferred on sale",
173
+ "type": "array",
174
+ "minItems": 1,
175
+ "items": {
176
+ "baspiRef": "A1.3",
177
+ "title": "Ownership to be transferred",
178
+ "type": "object",
179
+ "required": ["ownershipType"],
180
+ "properties": {
181
+ "titleNumber": {
182
+ "title": "Title number (if registered)",
183
+ "type": "string",
184
+ "minLength": 1
185
+ },
186
+ "ownershipType": {
187
+ "baspiRef": "A1.3.1",
188
+ "RDSRef": "Tenure/Tenure",
189
+ "lawSocietyRef": "TA7/1.1",
190
+ "title": "What type of ownership is the property?",
191
+ "description": "A Managed Freehold is any freehold where there are shared amenities, the maintenance of which you pay for through an estate rentcharge, service charge, informal or formal contribution. Choose Leasehold if your property is under a Shared Ownership arrangement.",
192
+ "type": "string",
193
+ "enum": [
194
+ "Freehold",
195
+ "Managed Freehold",
196
+ "Commonhold",
197
+ "Leasehold",
198
+ "Other"
199
+ ]
200
+ }
262
201
  },
263
- "sharedOwnership": {
264
- "ntsRef": "A1.7",
265
- "title": "Shared ownership",
266
- "type": "object",
267
- "properties": {
268
- "isSharedOwnership": {
269
- "title": "Is the property under Shared Owenership or a Part-buy Part-rent arrangement?",
270
- "type": "string",
271
- "enum": ["Yes", "No"]
272
- }
202
+ "discriminator": { "propertyName": "ownershipType" },
203
+ "oneOf": [
204
+ {
205
+ "properties": {
206
+ "ownershipType": {
207
+ "enum": ["Freehold"]
208
+ },
209
+ "wholeFreeholdForSale": {
210
+ "title": "Is the entire freehold being sold?",
211
+ "description": "If not, describe the share for sale (e.g. Ground floor flat only)",
212
+ "$ref": "#/$defs/yesNoDetailIfNo"
213
+ }
214
+ },
215
+ "required": ["wholeFreeholdForSale"]
273
216
  },
274
- "required": ["isSharedOwnership"],
275
- "discriminator": { "propertyName": "isSharedOwnership" },
276
- "oneOf": [
277
- {
278
- "properties": {
279
- "isSharedOwnership": {
280
- "enum": ["No"]
281
- }
217
+ {
218
+ "properties": {
219
+ "ownershipType": {
220
+ "enum": ["Managed Freehold", "Commonhold"]
221
+ },
222
+ "annualServiceCharge": {
223
+ "baspiRef": "A1.5.1",
224
+ "lawSocietyRef": "TA6/10.1",
225
+ "ntsRef": "A1.6",
226
+ "RDSRef": "TenureAgreements/ServiceCharges",
227
+ "title": "Amount of current annual service charge/estate rentcharge/maintenance contribution (£)",
228
+ "type": "number"
229
+ },
230
+ "largeAdditionalExpense": {
231
+ "baspiRef": "A1.5.2",
232
+ "lawSocietyRef": "TA6/10.1",
233
+ "RDSRef": "TenureAgreements/Repairs,TenureAgreements/ServicesCharges/Breakdown",
234
+ "title": "Have you received notice of any large expense in addition to the annual payment?",
235
+ "$ref": "#/$defs/yesNoDetailIfYes",
236
+ "description": "If yes, please provide details and confirm whether there is a reserve fund or sinking fund which will cover the cost of the works."
237
+ },
238
+ "additionalFeesOnSale": {
239
+ "baspiRef": "A1.5.3",
240
+ "lawSocietyRef": "TA6/10.1",
241
+ "RDSRef": "TenureAgreements/LegalCosts/Actual, TenureAgreements/LegalCosts/Estimated",
242
+ "title": "Additional fees payable on sale (£)",
243
+ "type": "number"
244
+ },
245
+ "freeholderContactDetails": {
246
+ "baspiRef": "A1.5.4",
247
+ "lawSocietyRef": "TA7/4.1a",
248
+ "RDSRef": "TenureAgreements/Assignor",
249
+ "title": "The contact details of the freeholder or rentcharge owner",
250
+ "$ref": "#/$defs/contactDetails"
251
+ },
252
+ "managingAgentContactDetails": {
253
+ "baspiRef": "A1.5.5",
254
+ "lawSocietyRef": "TA7/4.1a",
255
+ "RDSRef": "Participants/Role",
256
+ "title": "The contact details of the managing agent",
257
+ "$ref": "#/$defs/contactDetails"
258
+ },
259
+ "managementCompanyDirectorRequirement": {
260
+ "baspiRef": "A1.5.6",
261
+ "RDSRef": "Property/Flags",
262
+ "title": "Is the owner of the property required to become a director in a management company for the maintenance of shared amenities?",
263
+ "$ref": "#/$defs/yesNo"
282
264
  }
283
265
  },
284
- {
285
- "properties": {
286
- "isSharedOwnership": {
287
- "enum": ["Yes"]
288
- },
289
- "sharedOwnershipPercentage": {
290
- "ntsRef": "A1.7.1",
291
- "title": "Shared ownership percentage",
292
- "type": "integer",
293
- "minimum": 5,
294
- "exclusiveMaximum": 100
295
- },
296
- "sharedOwnershipRent": {
297
- "ntsRef": "A1.7.2",
298
- "title": "Shared ownership rent (£)",
299
- "type": "number",
300
- "minimum": 0
266
+ "required": [
267
+ "annualServiceCharge",
268
+ "largeAdditionalExpense",
269
+ "additionalFeesOnSale",
270
+ "freeholderContactDetails",
271
+ "managingAgentContactDetails",
272
+ "managementCompanyDirectorRequirement"
273
+ ]
274
+ },
275
+ {
276
+ "properties": {
277
+ "ownershipType": {
278
+ "enum": ["Leasehold"]
279
+ },
280
+ "sharedOwnership": {
281
+ "ntsRef": "A1.7",
282
+ "title": "Shared ownership",
283
+ "type": "object",
284
+ "properties": {
285
+ "isSharedOwnership": {
286
+ "title": "Is the property under Shared Owenership or a Part-buy Part-rent arrangement?",
287
+ "type": "string",
288
+ "enum": ["Yes", "No"]
289
+ }
301
290
  },
302
- "sharedOwnershipRentFrequency": {
303
- "ntsRef": "A1.7.3",
304
- "title": "Shared ownership rent frequency",
305
- "type": "string",
306
- "enum": ["Yearly", "Monthly", "Weekly"]
307
- }
291
+ "required": ["isSharedOwnership"],
292
+ "discriminator": { "propertyName": "isSharedOwnership" },
293
+ "oneOf": [
294
+ {
295
+ "properties": {
296
+ "isSharedOwnership": {
297
+ "enum": ["No"]
298
+ }
299
+ }
300
+ },
301
+ {
302
+ "properties": {
303
+ "isSharedOwnership": {
304
+ "enum": ["Yes"]
305
+ },
306
+ "sharedOwnershipPercentage": {
307
+ "ntsRef": "A1.7.1",
308
+ "title": "Shared ownership percentage",
309
+ "type": "integer",
310
+ "minimum": 5,
311
+ "exclusiveMaximum": 100
312
+ },
313
+ "sharedOwnershipRent": {
314
+ "ntsRef": "A1.7.2",
315
+ "title": "Shared ownership rent (£)",
316
+ "type": "number",
317
+ "minimum": 0
318
+ },
319
+ "sharedOwnershipRentFrequency": {
320
+ "ntsRef": "A1.7.3",
321
+ "title": "Shared ownership rent frequency",
322
+ "type": "string",
323
+ "enum": ["Yearly", "Monthly", "Weekly"]
324
+ }
325
+ },
326
+ "required": [
327
+ "sharedOwnershipPercentage",
328
+ "sharedOwnershipRent",
329
+ "sharedOwnershipRentFrequency"
330
+ ]
331
+ }
332
+ ]
308
333
  },
309
- "required": [
310
- "sharedOwnershipPercentage",
311
- "sharedOwnershipRent",
312
- "sharedOwnershipRentFrequency"
313
- ]
314
- }
315
- ]
316
- },
317
- "startYearOfLease": {
318
- "baspiRef": "A1.4.1b",
319
- "ntsRef": "A1.2",
320
- "title": "Year that the lease commenced",
321
- "type": "integer",
322
- "minimum": 1000
323
- },
324
- "lengthOfLeaseInYears": {
325
- "baspiRef": "A1.4.1a",
326
- "ntsRef": "A1.3",
327
- "title": "Length of lease (years)",
328
- "type": "integer"
329
- },
330
- "currentGroundRent": {
331
- "baspiRef": "A1.4.2",
332
- "ntsRef": "A1.4",
333
- "RDSRef": "TenureAgreements/RentPayable/Value",
334
- "lawSocietyRef": "TA7/1.2a",
335
- "title": "Current annual ground rent (£)",
336
- "type": "number"
337
- },
338
- "rentIncrease": {
339
- "baspiRef": "A1.4.3",
340
- "ntsRef": "A1.5",
341
- "RDSRef": "TenureAgreement/isRentChangeable, TenureAgreements/RentChanges",
342
- "title": "Does the ground rent increase?",
343
- "$ref": "#/$defs/yesNoDetailIfYes",
344
- "description": "Please provide full details of the ground rent increase e.g. how often and by how much and when the next increase is due."
345
- },
346
- "annualServiceCharge": {
347
- "baspiRef": "A1.5.1",
348
- "ntsRef": "A1.6",
349
- "RDSRef": "TenureAgreements/ServiceCharges",
350
- "title": "Amount of current annual service charge/estate rentcharge/maintenance contribution (£)",
351
- "type": "number"
352
- },
353
- "largeAdditionalExpense": {
354
- "baspiRef": "A1.5.2",
355
- "RDSRef": "TenureAgreements/Repairs,TenureAgreements/ServicesCharges/Breakdown",
356
- "title": "Have you received notice of any large expense in addition to the annual payment?",
357
- "$ref": "#/$defs/yesNoDetailIfYes",
358
- "description": "If yes, please provide details and confirm whether there is a reserve fund or sinking fund which will cover the cost of the works."
359
- },
360
- "additionalFeesOnSale": {
361
- "baspiRef": "A1.5.3",
362
- "RDSRef": "TenureAgreements/LegalCosts/Actual, TenureAgreements/LegalCosts/Estimated",
363
- "title": "Additional fees payable on sale (£)",
364
- "type": "number"
365
- },
366
- "freeholderContactDetails": {
367
- "baspiRef": "A1.5.4",
368
- "lawSocietyRef": "TA7/4.1a",
369
- "RDSRef": "TenureAgreements/Assignor",
370
- "title": "The name, address and email address of the freeholder or rentcharge owner",
371
- "$ref": "#/$defs/contactDetails"
372
- },
373
- "managingAgentContactDetails": {
374
- "baspiRef": "A1.5.5",
375
- "lawSocietyRef": "TA7/4.1b",
376
- "RDSRef": "Participants/Role",
377
- "title": "The name, address and email address of the managing agent",
378
- "$ref": "#/$defs/contactDetails"
379
- },
380
- "managementCompanyDirectorRequirement": {
381
- "baspiRef": "A1.5.6",
382
- "RDSRef": "Property/Flags",
383
- "title": "Is the owner of the property required to become a director in a management company for the maintenance of shared amenities?",
384
- "$ref": "#/$defs/yesNo"
385
- }
386
- },
387
- "required": [
388
- "sharedOwnership",
389
- "startYearOfLease",
390
- "lengthOfLeaseInYears",
391
- "currentGroundRent",
392
- "rentIncrease",
393
- "annualServiceCharge",
394
- "largeAdditionalExpense",
395
- "additionalFeesOnSale",
396
- "freeholderContactDetails",
397
- "managingAgentContactDetails",
398
- "managementCompanyDirectorRequirement"
399
- ]
400
- },
401
- {
402
- "properties": {
403
- "ownershipType": {
404
- "enum": ["Other"]
405
- },
406
- "otherOwnershipDetails": {
407
- "baspiRef": "A1.3.2",
408
- "title": "Details of the ownership type",
409
- "type": "string",
410
- "minLength": 1
411
- }
412
- },
413
- "required": ["otherOwnershipDetails"]
334
+ "startYearOfLease": {
335
+ "baspiRef": "A1.4.1b",
336
+ "ntsRef": "A1.2",
337
+ "title": "Year that the lease commenced",
338
+ "type": "integer",
339
+ "minimum": 1000
340
+ },
341
+ "lengthOfLeaseInYears": {
342
+ "baspiRef": "A1.4.1a",
343
+ "ntsRef": "A1.3",
344
+ "title": "Length of lease (years)",
345
+ "type": "integer"
346
+ },
347
+ "currentGroundRent": {
348
+ "baspiRef": "A1.4.2",
349
+ "ntsRef": "A1.4",
350
+ "RDSRef": "TenureAgreements/RentPayable/Value",
351
+ "lawSocietyRef": "TA7/1.2a",
352
+ "title": "Current annual ground rent (£)",
353
+ "type": "number"
354
+ },
355
+ "rentIncrease": {
356
+ "baspiRef": "A1.4.3",
357
+ "ntsRef": "A1.5",
358
+ "RDSRef": "TenureAgreement/isRentChangeable, TenureAgreements/RentChanges",
359
+ "title": "Does the ground rent increase?",
360
+ "$ref": "#/$defs/yesNoDetailIfYes",
361
+ "description": "Please provide full details of the ground rent increase e.g. how often and by how much and when the next increase is due."
362
+ },
363
+ "annualServiceCharge": {
364
+ "baspiRef": "A1.5.1",
365
+ "ntsRef": "A1.6",
366
+ "RDSRef": "TenureAgreements/ServiceCharges",
367
+ "title": "Amount of current annual service charge/estate rentcharge/maintenance contribution (£)",
368
+ "type": "number"
369
+ },
370
+ "largeAdditionalExpense": {
371
+ "baspiRef": "A1.5.2",
372
+ "RDSRef": "TenureAgreements/Repairs,TenureAgreements/ServicesCharges/Breakdown",
373
+ "title": "Have you received notice of any large expense in addition to the annual payment?",
374
+ "$ref": "#/$defs/yesNoDetailIfYes",
375
+ "description": "If yes, please provide details and confirm whether there is a reserve fund or sinking fund which will cover the cost of the works."
376
+ },
377
+ "additionalFeesOnSale": {
378
+ "baspiRef": "A1.5.3",
379
+ "RDSRef": "TenureAgreements/LegalCosts/Actual, TenureAgreements/LegalCosts/Estimated",
380
+ "title": "Additional fees payable on sale (£)",
381
+ "type": "number"
382
+ },
383
+ "freeholderContactDetails": {
384
+ "baspiRef": "A1.5.4",
385
+ "lawSocietyRef": "TA7/4.1a",
386
+ "RDSRef": "TenureAgreements/Assignor",
387
+ "title": "The name, address and email address of the freeholder or rentcharge owner",
388
+ "$ref": "#/$defs/contactDetails"
389
+ },
390
+ "managingAgentContactDetails": {
391
+ "baspiRef": "A1.5.5",
392
+ "lawSocietyRef": "TA7/4.1b",
393
+ "RDSRef": "Participants/Role",
394
+ "title": "The name, address and email address of the managing agent",
395
+ "$ref": "#/$defs/contactDetails"
396
+ },
397
+ "managementCompanyDirectorRequirement": {
398
+ "baspiRef": "A1.5.6",
399
+ "RDSRef": "Property/Flags",
400
+ "title": "Is the owner of the property required to become a director in a management company for the maintenance of shared amenities?",
401
+ "$ref": "#/$defs/yesNo"
402
+ }
403
+ },
404
+ "required": [
405
+ "sharedOwnership",
406
+ "startYearOfLease",
407
+ "lengthOfLeaseInYears",
408
+ "currentGroundRent",
409
+ "rentIncrease",
410
+ "annualServiceCharge",
411
+ "largeAdditionalExpense",
412
+ "additionalFeesOnSale",
413
+ "freeholderContactDetails",
414
+ "managingAgentContactDetails",
415
+ "managementCompanyDirectorRequirement"
416
+ ]
417
+ },
418
+ {
419
+ "properties": {
420
+ "ownershipType": {
421
+ "enum": ["Other"]
422
+ },
423
+ "otherOwnershipDetails": {
424
+ "baspiRef": "A1.3.2",
425
+ "title": "Details of the ownership type",
426
+ "type": "string",
427
+ "minLength": 1
428
+ }
429
+ },
430
+ "required": ["otherOwnershipDetails"]
431
+ }
432
+ ]
433
+ }
414
434
  }
415
- ]
435
+ }
416
436
  },
417
437
  "parking": {
418
438
  "baspiRef": "A1.6",
@@ -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.ownershipType =
36
+ clonedExampleTransaction.propertyPack.materialFacts.ownership.ownershipsToBeTransferredOnSale[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/lengthOfLeaseInYears"
93
+ "/propertyPack/materialFacts/ownership/ownershipsToBeTransferredOnSale/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/rentIncrease/details"
100
+ "/propertyPack/materialFacts/ownership/ownershipsToBeTransferredOnSale/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/ownershipType"
148
+ "/propertyPack/materialFacts/ownership/ownershipsToBeTransferredOnSale/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/lengthOfLeaseInYears"
154
+ "/propertyPack/materialFacts/ownership/ownershipsToBeTransferredOnSale/0/lengthOfLeaseInYears"
155
155
  )
156
156
  ).toBe("Length of lease (years)");
157
157
  expect(
158
158
  getTitleAtPath(
159
159
  transactionSchema,
160
- "/propertyPack/materialFacts/ownership/annualServiceCharge"
160
+ "/propertyPack/materialFacts/ownership/ownershipsToBeTransferredOnSale/0/annualServiceCharge"
161
161
  )
162
162
  ).toBe(
163
163
  "Amount of current annual service charge/estate rentcharge/maintenance contribution (£)"