@pdtf/schemas 3.6.0-8 → 3.6.0-dev.1

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.
Files changed (71) hide show
  1. package/CLAUDE.md +101 -0
  2. package/README.md +57 -33
  3. package/docs/backend-lms-profile-filtering-spec.md +180 -0
  4. package/docs/branch-release-workflow.md +138 -0
  5. package/docs/sef25-extensions-ui-spec.md +355 -0
  6. package/index.js +134 -66
  7. package/package.json +6 -2
  8. package/src/examples/v3/exampleTransaction.json +3 -3
  9. package/src/schemas/v3/combined.json +6981 -1234
  10. package/src/schemas/v3/compactSkeleton.txt +316 -5
  11. package/src/schemas/v3/overlays/baspi4.json +162 -20
  12. package/src/schemas/v3/overlays/baspi5.json +167 -22
  13. package/src/schemas/v3/overlays/extensions/ac.json +333 -0
  14. package/src/schemas/v3/overlays/extensions/as.json +4 -2
  15. package/src/schemas/v3/overlays/extensions/dk.json +32 -0
  16. package/src/schemas/v3/overlays/extensions/dr.json +9 -9
  17. package/src/schemas/v3/overlays/extensions/er.json +4 -2
  18. package/src/schemas/v3/overlays/extensions/fd.json +6 -3
  19. package/src/schemas/v3/overlays/extensions/hi.json +6 -3
  20. package/src/schemas/v3/overlays/extensions/hs.json +4 -2
  21. package/src/schemas/v3/overlays/extensions/ic.json +59 -0
  22. package/src/schemas/v3/overlays/extensions/jk.json +28 -8
  23. package/src/schemas/v3/overlays/extensions/la.json +4 -2
  24. package/src/schemas/v3/overlays/extensions/lc.json +75 -0
  25. package/src/schemas/v3/overlays/extensions/ma.json +6 -3
  26. package/src/schemas/v3/overlays/extensions/mc.json +4 -2
  27. package/src/schemas/v3/overlays/extensions/mi.json +69 -0
  28. package/src/schemas/v3/overlays/extensions/nd.json +43 -0
  29. package/src/schemas/v3/overlays/extensions/oa.json +4 -2
  30. package/src/schemas/v3/overlays/extensions/oc.json +4 -2
  31. package/src/schemas/v3/overlays/extensions/pc.json +37 -0
  32. package/src/schemas/v3/overlays/extensions/ph.json +194 -0
  33. package/src/schemas/v3/overlays/extensions/rw.json +68 -0
  34. package/src/schemas/v3/overlays/extensions/sb.json +4 -2
  35. package/src/schemas/v3/overlays/extensions/sc.json +129 -0
  36. package/src/schemas/v3/overlays/extensions/sd.json +63 -0
  37. package/src/schemas/v3/overlays/extensions/sf.json +4 -2
  38. package/src/schemas/v3/overlays/extensions/sl.json +4 -2
  39. package/src/schemas/v3/overlays/extensions/ta.json +252 -0
  40. package/src/schemas/v3/overlays/extensions/tf.json +6 -3
  41. package/src/schemas/v3/overlays/extensions/tr.json +73 -0
  42. package/src/schemas/v3/overlays/extensions/wg.json +350 -0
  43. package/src/schemas/v3/overlays/fme1.json +16 -14
  44. package/src/schemas/v3/overlays/lpe1.json +60 -30
  45. package/src/schemas/v3/overlays/nts.json +68 -1
  46. package/src/schemas/v3/overlays/nts2.json +68 -4
  47. package/src/schemas/v3/overlays/ntsl.json +68 -1
  48. package/src/schemas/v3/overlays/ntsl2.json +68 -4
  49. package/src/schemas/v3/overlays/piq.json +37 -3
  50. package/src/schemas/v3/overlays/rds.json +117 -8
  51. package/src/schemas/v3/overlays/sef25.json +1639 -0
  52. package/src/schemas/v3/overlays/ta6.json +46 -16
  53. package/src/schemas/v3/overlays/ta6ed6.json +6533 -0
  54. package/src/schemas/v3/overlays/ta7.json +70 -6
  55. package/src/schemas/v3/overlays/ta7ed5.json +1551 -0
  56. package/src/schemas/v3/pdtf-transaction.json +3896 -686
  57. package/src/schemas/v3/skeleton.json +442 -35
  58. package/src/utils/extractExtensionOverlays.js +293 -31
  59. package/src/utils/extractOverlay.js +94 -27
  60. package/src/utils/pathSkeleton.js +1 -1
  61. package/.claude/settings.local.json +0 -42
  62. package/.github/workflows/pages.yml +0 -50
  63. package/CNAME +0 -1
  64. package/_config.yml +0 -1
  65. package/src/tests/v3/caching.test.js +0 -591
  66. package/src/tests/v3/enquiries.test.js +0 -1096
  67. package/src/tests/v3/extensionOverlays.test.js +0 -525
  68. package/src/tests/v3/offers.test.js +0 -823
  69. package/src/tests/v3/patternProperties.test.js +0 -565
  70. package/src/tests/v3/transactionSchema.test.js +0 -615
  71. package/src/tests/v3/verifiedClaimsValidator.test.js +0 -195
@@ -0,0 +1,350 @@
1
+ {
2
+ "properties": {
3
+ "propertyPack": {
4
+ "properties": {
5
+ "guaranteesWarrantiesAndIndemnityInsurances": {
6
+ "ntsRef": "W1",
7
+ "required": [
8
+ "hasValidGuaranteesOrWarranties"
9
+ ],
10
+ "discriminator": {
11
+ "propertyName": "hasValidGuaranteesOrWarranties"
12
+ },
13
+ "properties": {
14
+ "hasValidGuaranteesOrWarranties": {
15
+ "ntsRef": "W1.0",
16
+ "type": "string"
17
+ }
18
+ },
19
+ "oneOf": [
20
+ {
21
+ "properties": {
22
+ "hasValidGuaranteesOrWarranties": {
23
+ "enum": [
24
+ "No"
25
+ ]
26
+ }
27
+ }
28
+ },
29
+ {
30
+ "required": [
31
+ "newHomeWarranty",
32
+ "roofingWork",
33
+ "dampProofingTreatment",
34
+ "centralHeatingAndorPlumbing",
35
+ "electricalRepairOrInstallation",
36
+ "subsidenceWork",
37
+ "otherGuarantees"
38
+ ],
39
+ "properties": {
40
+ "newHomeWarranty": {
41
+ "ntsRef": "W1.1",
42
+ "required": [
43
+ "yesNo"
44
+ ],
45
+ "discriminator": {
46
+ "propertyName": "yesNo"
47
+ },
48
+ "properties": {
49
+ "yesNo": {
50
+ "ntsRef": "W1.1.1",
51
+ "type": "string"
52
+ }
53
+ },
54
+ "oneOf": [
55
+ {
56
+ "properties": {
57
+ "yesNo": {
58
+ "enum": [
59
+ "No"
60
+ ]
61
+ }
62
+ }
63
+ },
64
+ {
65
+ "properties": {
66
+ "yesNo": {
67
+ "enum": [
68
+ "Yes"
69
+ ]
70
+ }
71
+ }
72
+ }
73
+ ]
74
+ },
75
+ "roofingWork": {
76
+ "ntsRef": "W1.2",
77
+ "required": [
78
+ "yesNo"
79
+ ],
80
+ "discriminator": {
81
+ "propertyName": "yesNo"
82
+ },
83
+ "properties": {
84
+ "yesNo": {
85
+ "ntsRef": "W1.2.1",
86
+ "type": "string"
87
+ }
88
+ },
89
+ "oneOf": [
90
+ {
91
+ "properties": {
92
+ "yesNo": {
93
+ "enum": [
94
+ "No"
95
+ ]
96
+ }
97
+ }
98
+ },
99
+ {
100
+ "properties": {
101
+ "yesNo": {
102
+ "enum": [
103
+ "Yes"
104
+ ]
105
+ }
106
+ }
107
+ }
108
+ ]
109
+ },
110
+ "dampProofingTreatment": {
111
+ "ntsRef": "W1.3",
112
+ "required": [
113
+ "yesNo"
114
+ ],
115
+ "discriminator": {
116
+ "propertyName": "yesNo"
117
+ },
118
+ "properties": {
119
+ "yesNo": {
120
+ "ntsRef": "W1.3.1",
121
+ "type": "string"
122
+ }
123
+ },
124
+ "oneOf": [
125
+ {
126
+ "properties": {
127
+ "yesNo": {
128
+ "enum": [
129
+ "No"
130
+ ]
131
+ }
132
+ }
133
+ },
134
+ {
135
+ "properties": {
136
+ "yesNo": {
137
+ "enum": [
138
+ "Yes"
139
+ ]
140
+ }
141
+ }
142
+ }
143
+ ]
144
+ },
145
+ "centralHeatingAndorPlumbing": {
146
+ "ntsRef": "W1.4",
147
+ "required": [
148
+ "yesNo"
149
+ ],
150
+ "discriminator": {
151
+ "propertyName": "yesNo"
152
+ },
153
+ "properties": {
154
+ "yesNo": {
155
+ "ntsRef": "W1.4.1",
156
+ "type": "string"
157
+ }
158
+ },
159
+ "oneOf": [
160
+ {
161
+ "properties": {
162
+ "yesNo": {
163
+ "enum": [
164
+ "No"
165
+ ]
166
+ }
167
+ }
168
+ },
169
+ {
170
+ "properties": {
171
+ "yesNo": {
172
+ "enum": [
173
+ "Yes"
174
+ ]
175
+ }
176
+ }
177
+ }
178
+ ]
179
+ },
180
+ "doubleGlazing": {
181
+ "ntsRef": "W1.8",
182
+ "required": [
183
+ "yesNo"
184
+ ],
185
+ "discriminator": {
186
+ "propertyName": "yesNo"
187
+ },
188
+ "properties": {
189
+ "yesNo": {
190
+ "ntsRef": "W1.8.1",
191
+ "type": "string"
192
+ }
193
+ },
194
+ "oneOf": [
195
+ {
196
+ "properties": {
197
+ "yesNo": {
198
+ "enum": [
199
+ "No"
200
+ ]
201
+ }
202
+ }
203
+ },
204
+ {
205
+ "properties": {
206
+ "yesNo": {
207
+ "enum": [
208
+ "Yes"
209
+ ]
210
+ }
211
+ }
212
+ }
213
+ ]
214
+ },
215
+ "electricalRepairOrInstallation": {
216
+ "ntsRef": "W1.5",
217
+ "required": [
218
+ "yesNo"
219
+ ],
220
+ "discriminator": {
221
+ "propertyName": "yesNo"
222
+ },
223
+ "properties": {
224
+ "yesNo": {
225
+ "ntsRef": "W1.5.1",
226
+ "type": "string"
227
+ }
228
+ },
229
+ "oneOf": [
230
+ {
231
+ "properties": {
232
+ "yesNo": {
233
+ "enum": [
234
+ "No"
235
+ ]
236
+ }
237
+ }
238
+ },
239
+ {
240
+ "properties": {
241
+ "yesNo": {
242
+ "enum": [
243
+ "Yes"
244
+ ]
245
+ }
246
+ }
247
+ }
248
+ ]
249
+ },
250
+ "subsidenceWork": {
251
+ "ntsRef": "W1.6",
252
+ "required": [
253
+ "yesNo"
254
+ ],
255
+ "discriminator": {
256
+ "propertyName": "yesNo"
257
+ },
258
+ "properties": {
259
+ "yesNo": {
260
+ "ntsRef": "W1.6.1",
261
+ "type": "string"
262
+ }
263
+ },
264
+ "oneOf": [
265
+ {
266
+ "properties": {
267
+ "yesNo": {
268
+ "enum": [
269
+ "No"
270
+ ]
271
+ }
272
+ }
273
+ },
274
+ {
275
+ "properties": {
276
+ "yesNo": {
277
+ "enum": [
278
+ "Yes"
279
+ ]
280
+ }
281
+ }
282
+ }
283
+ ]
284
+ },
285
+ "otherGuarantees": {
286
+ "ntsRef": "W1.7",
287
+ "required": [
288
+ "yesNo"
289
+ ],
290
+ "discriminator": {
291
+ "propertyName": "yesNo"
292
+ },
293
+ "properties": {
294
+ "yesNo": {
295
+ "ntsRef": "W1.7.1",
296
+ "type": "string"
297
+ }
298
+ },
299
+ "oneOf": [
300
+ {
301
+ "properties": {
302
+ "yesNo": {
303
+ "enum": [
304
+ "No"
305
+ ]
306
+ }
307
+ }
308
+ },
309
+ {
310
+ "required": [
311
+ "details"
312
+ ],
313
+ "properties": {
314
+ "details": {
315
+ "ntsRef": "W1.7.2",
316
+ "type": "string",
317
+ "minLength": 1
318
+ },
319
+ "yesNo": {
320
+ "enum": [
321
+ "Yes"
322
+ ]
323
+ },
324
+ "attachments": {
325
+ "enum": [
326
+ "Attached",
327
+ "To follow"
328
+ ]
329
+ }
330
+ }
331
+ }
332
+ ]
333
+ },
334
+ "hasValidGuaranteesOrWarranties": {
335
+ "enum": [
336
+ "Yes"
337
+ ]
338
+ }
339
+ }
340
+ }
341
+ ],
342
+ "type": "object"
343
+ }
344
+ }
345
+ }
346
+ },
347
+ "$schema": "http://json-schema.org/draft-07/schema#",
348
+ "$id": "https://trust.propdata.org.uk/schemas/v3/overlays/extensions/wg.json",
349
+ "$comment": "Warranties and guarantees upfront Y/N for SEF25"
350
+ }
@@ -203,20 +203,22 @@
203
203
  "contact",
204
204
  "capacity"
205
205
  ],
206
- "contact": {
207
- "required": [
208
- "nameOrOrganisation",
209
- "line1",
210
- "postcode",
211
- "telephone",
212
- "emailAddress"
213
- ],
214
- "properties": {
215
- "address": {
216
- "required": [
217
- "line1",
218
- "postcode"
219
- ]
206
+ "properties": {
207
+ "contact": {
208
+ "required": [
209
+ "nameOrOrganisation",
210
+ "line1",
211
+ "postcode",
212
+ "telephone",
213
+ "emailAddress"
214
+ ],
215
+ "properties": {
216
+ "address": {
217
+ "required": [
218
+ "line1",
219
+ "postcode"
220
+ ]
221
+ }
220
222
  }
221
223
  }
222
224
  }
@@ -282,20 +282,22 @@
282
282
  "contact",
283
283
  "capacity"
284
284
  ],
285
- "contact": {
286
- "required": [
287
- "nameOrOrganisation",
288
- "line1",
289
- "postcode",
290
- "telephone",
291
- "emailAddress"
292
- ],
293
- "properties": {
294
- "address": {
295
- "required": [
296
- "line1",
297
- "postcode"
298
- ]
285
+ "properties": {
286
+ "contact": {
287
+ "required": [
288
+ "nameOrOrganisation",
289
+ "line1",
290
+ "postcode",
291
+ "telephone",
292
+ "emailAddress"
293
+ ],
294
+ "properties": {
295
+ "address": {
296
+ "required": [
297
+ "line1",
298
+ "postcode"
299
+ ]
300
+ }
299
301
  }
300
302
  }
301
303
  }
@@ -381,20 +383,22 @@
381
383
  "contact",
382
384
  "capacity"
383
385
  ],
384
- "contact": {
385
- "required": [
386
- "nameOrOrganisation",
387
- "line1",
388
- "postcode",
389
- "telephone",
390
- "emailAddress"
391
- ],
392
- "properties": {
393
- "address": {
394
- "required": [
395
- "line1",
396
- "postcode"
397
- ]
386
+ "properties": {
387
+ "contact": {
388
+ "required": [
389
+ "nameOrOrganisation",
390
+ "line1",
391
+ "postcode",
392
+ "telephone",
393
+ "emailAddress"
394
+ ],
395
+ "properties": {
396
+ "address": {
397
+ "required": [
398
+ "line1",
399
+ "postcode"
400
+ ]
401
+ }
398
402
  }
399
403
  }
400
404
  }
@@ -436,13 +440,39 @@
436
440
  }
437
441
  },
438
442
  "collectsGroundRent": {
439
- "lpe1Ref": "1.7"
443
+ "required": [
444
+ "collector"
445
+ ],
446
+ "properties": {
447
+ "collector": {
448
+ "lpe1Ref": "1.7",
449
+ "enum": [
450
+ "Landlord",
451
+ "Management Company",
452
+ "Managing Agent",
453
+ "Not applicable"
454
+ ]
455
+ }
456
+ }
440
457
  },
441
458
  "collectsServiceCharges": {
442
459
  "lpe1Ref": "1.8"
443
460
  },
444
461
  "collectsbuildingInsurancePremiums": {
445
- "lpe1Ref": "1.9"
462
+ "required": [
463
+ "collector"
464
+ ],
465
+ "properties": {
466
+ "collector": {
467
+ "lpe1Ref": "1.9",
468
+ "enum": [
469
+ "Landlord",
470
+ "Management Company",
471
+ "Managing Agent",
472
+ "Not applicable"
473
+ ]
474
+ }
475
+ }
446
476
  },
447
477
  "dealsWithDayToDayMaintenanceOfManagedArea": {
448
478
  "lpe1Ref": "1.11"
@@ -631,6 +631,29 @@
631
631
  },
632
632
  "electricVehicleChargingPoint": {
633
633
  "ntsRef": "B4.4",
634
+ "discriminator": {
635
+ "propertyName": "yesNo"
636
+ },
637
+ "oneOf": [
638
+ {
639
+ "properties": {
640
+ "yesNo": {
641
+ "enum": [
642
+ "No"
643
+ ]
644
+ }
645
+ }
646
+ },
647
+ {
648
+ "properties": {
649
+ "yesNo": {
650
+ "enum": [
651
+ "Yes"
652
+ ]
653
+ }
654
+ }
655
+ }
656
+ ],
634
657
  "required": [
635
658
  "yesNo"
636
659
  ],
@@ -1713,7 +1736,25 @@
1713
1736
  }
1714
1737
  },
1715
1738
  "otherHeatingFeatures": {
1716
- "ntsRef": "B3.4.2"
1739
+ "ntsRef": "B3.4.2",
1740
+ "items": {
1741
+ "enum": [
1742
+ "None",
1743
+ "Air conditioning",
1744
+ "Double glazing",
1745
+ "Triple glazing",
1746
+ "Night storage",
1747
+ "Solar water",
1748
+ "Underfloor heating",
1749
+ "Wood burner",
1750
+ "Aga/Rayburn",
1751
+ "Open fire",
1752
+ "Ground source heat pump",
1753
+ "Air source heat pump",
1754
+ "Solar thermal",
1755
+ "Passive House design"
1756
+ ]
1757
+ }
1717
1758
  }
1718
1759
  }
1719
1760
  },
@@ -1745,6 +1786,32 @@
1745
1786
  },
1746
1787
  "broadband": {
1747
1788
  "ntsRef": "B3.5",
1789
+ "discriminator": {
1790
+ "propertyName": "typeOfConnection"
1791
+ },
1792
+ "oneOf": [
1793
+ {
1794
+ "properties": {
1795
+ "typeOfConnection": {
1796
+ "enum": [
1797
+ "None"
1798
+ ]
1799
+ }
1800
+ }
1801
+ },
1802
+ {
1803
+ "properties": {
1804
+ "typeOfConnection": {
1805
+ "enum": [
1806
+ "ADSL copper wire",
1807
+ "Cable",
1808
+ "FTTC (Fibre to the Cabinet)",
1809
+ "FTTP (Fibre to the Premises)"
1810
+ ]
1811
+ }
1812
+ }
1813
+ }
1814
+ ],
1748
1815
  "required": [
1749
1816
  "typeOfConnection"
1750
1817
  ],