@pdtf/schemas 3.6.0-9 → 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 +131 -75
  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 -688
  70. package/src/tests/v3/transactionSchema.test.js +0 -615
  71. package/src/tests/v3/verifiedClaimsValidator.test.js +0 -195
@@ -0,0 +1,129 @@
1
+ {
2
+ "properties": {
3
+ "propertyPack": {
4
+ "properties": {
5
+ "waterAndDrainage": {
6
+ "properties": {
7
+ "water": {
8
+ "properties": {
9
+ "mainsWater": {
10
+ "oneOf": [
11
+ {
12
+ "properties": {
13
+ "associatedCost": {
14
+ "ntsRef": "U1.1",
15
+ "required": [
16
+ "frequency"
17
+ ],
18
+ "discriminator": {
19
+ "propertyName": "frequency"
20
+ },
21
+ "properties": {
22
+ "frequency": {
23
+ "ntsRef": "U1.1.2",
24
+ "type": "string"
25
+ }
26
+ },
27
+ "oneOf": [
28
+ {
29
+ "properties": {
30
+ "frequency": {
31
+ "enum": [
32
+ "Not applicable"
33
+ ]
34
+ }
35
+ }
36
+ },
37
+ {
38
+ "properties": {
39
+ "amount": {
40
+ "ntsRef": "U1.1.1",
41
+ "type": "number"
42
+ },
43
+ "frequency": {
44
+ "enum": [
45
+ "Per month",
46
+ "Per year"
47
+ ]
48
+ }
49
+ }
50
+ }
51
+ ],
52
+ "type": "object"
53
+ }
54
+ },
55
+ "required": [
56
+ "associatedCost"
57
+ ]
58
+ }
59
+ ]
60
+ }
61
+ }
62
+ },
63
+ "drainage": {
64
+ "properties": {
65
+ "mainsFoulDrainage": {
66
+ "oneOf": [
67
+ null,
68
+ null,
69
+ {
70
+ "properties": {
71
+ "associatedCost": {
72
+ "ntsRef": "U1.2",
73
+ "required": [
74
+ "frequency"
75
+ ],
76
+ "discriminator": {
77
+ "propertyName": "frequency"
78
+ },
79
+ "properties": {
80
+ "frequency": {
81
+ "ntsRef": "U1.2.2",
82
+ "type": "string"
83
+ }
84
+ },
85
+ "oneOf": [
86
+ {
87
+ "properties": {
88
+ "frequency": {
89
+ "enum": [
90
+ "Not applicable"
91
+ ]
92
+ }
93
+ }
94
+ },
95
+ {
96
+ "properties": {
97
+ "amount": {
98
+ "ntsRef": "U1.2.1",
99
+ "type": "number"
100
+ },
101
+ "frequency": {
102
+ "enum": [
103
+ "Per month",
104
+ "Per year"
105
+ ]
106
+ }
107
+ }
108
+ }
109
+ ],
110
+ "type": "object"
111
+ }
112
+ },
113
+ "required": [
114
+ "associatedCost"
115
+ ]
116
+ }
117
+ ]
118
+ }
119
+ }
120
+ }
121
+ }
122
+ }
123
+ }
124
+ }
125
+ },
126
+ "$schema": "http://json-schema.org/draft-07/schema#",
127
+ "$id": "https://trust.propdata.org.uk/schemas/v3/overlays/extensions/sc.json",
128
+ "$comment": "Associated costs for private water and sewerage supply"
129
+ }
@@ -0,0 +1,63 @@
1
+ {
2
+ "properties": {
3
+ "propertyPack": {
4
+ "properties": {
5
+ "environmentalIssues": {
6
+ "properties": {
7
+ "stormFireFloodDamage": {
8
+ "ntsRef": "E1.1",
9
+ "required": [
10
+ "yesNo"
11
+ ],
12
+ "discriminator": {
13
+ "propertyName": "yesNo"
14
+ },
15
+ "properties": {
16
+ "yesNo": {
17
+ "ntsRef": "E1.1.1",
18
+ "type": "string"
19
+ }
20
+ },
21
+ "oneOf": [
22
+ {
23
+ "properties": {
24
+ "yesNo": {
25
+ "enum": [
26
+ "No"
27
+ ]
28
+ }
29
+ }
30
+ },
31
+ {
32
+ "required": [
33
+ "details"
34
+ ],
35
+ "properties": {
36
+ "details": {
37
+ "ntsRef": "E1.1.2",
38
+ "type": "string",
39
+ "minLength": 1
40
+ },
41
+ "yesNo": {
42
+ "enum": [
43
+ "Yes"
44
+ ]
45
+ }
46
+ }
47
+ }
48
+ ],
49
+ "type": "object"
50
+ }
51
+ },
52
+ "required": [
53
+ "stormFireFloodDamage"
54
+ ],
55
+ "ntsRef": "E1"
56
+ }
57
+ }
58
+ }
59
+ },
60
+ "$schema": "http://json-schema.org/draft-07/schema#",
61
+ "$id": "https://trust.propdata.org.uk/schemas/v3/overlays/extensions/sd.json",
62
+ "$comment": "Storm, fire or flood damage"
63
+ }
@@ -58,12 +58,14 @@
58
58
  },
59
59
  "required": [
60
60
  "sprayFoamInsulation"
61
- ]
61
+ ],
62
+ "ntsRef": "A1.2"
62
63
  }
63
64
  },
64
65
  "required": [
65
66
  "typeOfConstruction"
66
- ]
67
+ ],
68
+ "ntsRef": "0"
67
69
  }
68
70
  },
69
71
  "$schema": "http://json-schema.org/draft-07/schema#",
@@ -52,12 +52,14 @@
52
52
  },
53
53
  "required": [
54
54
  "solarPanels"
55
- ]
55
+ ],
56
+ "ntsRef": "B3.1"
56
57
  }
57
58
  },
58
59
  "required": [
59
60
  "electricity"
60
- ]
61
+ ],
62
+ "ntsRef": "0"
61
63
  }
62
64
  },
63
65
  "$schema": "http://json-schema.org/draft-07/schema#",
@@ -0,0 +1,252 @@
1
+ {
2
+ "properties": {
3
+ "propertyPack": {
4
+ "properties": {
5
+ "parking": {
6
+ "ta6ed6CompatRef": "TA6ED6-COMPAT.10",
7
+ "properties": {
8
+ "controlledParking": {
9
+ "ta6ed6CompatRef": "TA6ED6-COMPAT.10.2",
10
+ "required": [
11
+ "yesNo"
12
+ ],
13
+ "discriminator": {
14
+ "propertyName": "yesNo"
15
+ },
16
+ "properties": {
17
+ "yesNo": {
18
+ "ta6ed6CompatRef": "TA6ED6-COMPAT.10.2.1",
19
+ "enum": [
20
+ "Yes",
21
+ "No"
22
+ ],
23
+ "type": "string"
24
+ }
25
+ },
26
+ "oneOf": [
27
+ {
28
+ "properties": {
29
+ "yesNo": {
30
+ "enum": [
31
+ "No"
32
+ ]
33
+ }
34
+ }
35
+ },
36
+ {
37
+ "properties": {
38
+ "yesNo": {
39
+ "enum": [
40
+ "Yes"
41
+ ]
42
+ }
43
+ }
44
+ }
45
+ ]
46
+ }
47
+ },
48
+ "type": "object"
49
+ },
50
+ "heating": {
51
+ "ta6ed6CompatRef": "TA6ED6-COMPAT.11.4",
52
+ "properties": {
53
+ "heatingSystem": {
54
+ "discriminator": {
55
+ "propertyName": "heatingType"
56
+ },
57
+ "oneOf": [
58
+ {
59
+ "properties": {
60
+ "heatingType": {
61
+ "enum": [
62
+ "None",
63
+ "Room heaters only"
64
+ ]
65
+ }
66
+ }
67
+ },
68
+ {
69
+ "properties": {
70
+ "centralHeatingDetails": {
71
+ "properties": {
72
+ "heatingLastServicedReport": {
73
+ "ta6ed6CompatRef": "TA6ED6-COMPAT.11.4.g2",
74
+ "enum": [
75
+ "Attached",
76
+ "To follow"
77
+ ],
78
+ "type": "string"
79
+ }
80
+ },
81
+ "type": "object"
82
+ },
83
+ "heatingType": {
84
+ "enum": [
85
+ "Central heating"
86
+ ]
87
+ }
88
+ }
89
+ },
90
+ {
91
+ "properties": {
92
+ "heatingType": {
93
+ "enum": [
94
+ "Communal heating system"
95
+ ]
96
+ }
97
+ }
98
+ }
99
+ ]
100
+ },
101
+ "otherHeatingFeatures": {
102
+ "ta6ed6CompatRef": "TA6ED6-COMPAT.11.4.other",
103
+ "items": {
104
+ "ta6ed6CompatRef": "TA6ED6-COMPAT.11.4.other.item",
105
+ "enum": [
106
+ "None",
107
+ "Air conditioning",
108
+ "Double glazing",
109
+ "Triple glazing",
110
+ "Night storage",
111
+ "Solar water",
112
+ "Underfloor heating",
113
+ "Wood burner",
114
+ "Aga/Rayburn",
115
+ "Open fire",
116
+ "Ground source heat pump",
117
+ "Air source heat pump",
118
+ "Solar thermal",
119
+ "Passive House design",
120
+ "Mains gas",
121
+ "Electricity",
122
+ "Oil",
123
+ "LPG",
124
+ "Biomass"
125
+ ],
126
+ "type": "string"
127
+ },
128
+ "type": "array"
129
+ }
130
+ },
131
+ "type": "object"
132
+ },
133
+ "rightsAndInformalArrangements": {
134
+ "ta6ed6CompatRef": "TA6ED6-COMPAT.9",
135
+ "properties": {
136
+ "sharedContributions": {
137
+ "ta6ed6CompatRef": "TA6ED6-COMPAT.9.2",
138
+ "required": [
139
+ "yesNo"
140
+ ],
141
+ "discriminator": {
142
+ "propertyName": "yesNo"
143
+ },
144
+ "oneOf": [
145
+ {
146
+ "properties": {
147
+ "yesNo": {
148
+ "enum": [
149
+ "No",
150
+ "Not applicable"
151
+ ]
152
+ }
153
+ }
154
+ },
155
+ {
156
+ "properties": {
157
+ "yesNo": {
158
+ "enum": [
159
+ "Yes"
160
+ ]
161
+ }
162
+ }
163
+ }
164
+ ]
165
+ },
166
+ "accessRestrictionAttempts": {
167
+ "ta6ed6CompatRef": "TA6ED6-COMPAT.9.3",
168
+ "required": [
169
+ "yesNo"
170
+ ],
171
+ "discriminator": {
172
+ "propertyName": "yesNo"
173
+ },
174
+ "oneOf": [
175
+ {
176
+ "properties": {
177
+ "yesNo": {
178
+ "enum": [
179
+ "No",
180
+ "Not known"
181
+ ]
182
+ }
183
+ }
184
+ },
185
+ {
186
+ "properties": {
187
+ "yesNo": {
188
+ "enum": [
189
+ "Yes"
190
+ ]
191
+ }
192
+ }
193
+ }
194
+ ]
195
+ }
196
+ },
197
+ "type": "object"
198
+ },
199
+ "legalBoundaries": {
200
+ "ta6ed6CompatRef": "TA6ED6-COMPAT.2",
201
+ "properties": {
202
+ "flyingFreehold": {
203
+ "ta6ed6CompatRef": "TA6ED6-COMPAT.2.4",
204
+ "required": [
205
+ "yesNo"
206
+ ],
207
+ "discriminator": {
208
+ "propertyName": "yesNo"
209
+ },
210
+ "properties": {
211
+ "yesNo": {
212
+ "ta6ed6CompatRef": "TA6ED6-COMPAT.2.4.1",
213
+ "enum": [
214
+ "Yes",
215
+ "No",
216
+ "Not known"
217
+ ],
218
+ "type": "string"
219
+ }
220
+ },
221
+ "oneOf": [
222
+ {
223
+ "properties": {
224
+ "yesNo": {
225
+ "enum": [
226
+ "No",
227
+ "Not known"
228
+ ]
229
+ }
230
+ }
231
+ },
232
+ {
233
+ "properties": {
234
+ "yesNo": {
235
+ "enum": [
236
+ "Yes"
237
+ ]
238
+ }
239
+ }
240
+ }
241
+ ]
242
+ }
243
+ },
244
+ "type": "object"
245
+ }
246
+ }
247
+ }
248
+ },
249
+ "$schema": "http://json-schema.org/draft-07/schema#",
250
+ "$id": "https://trust.propdata.org.uk/schemas/v3/overlays/extensions/ta.json",
251
+ "$comment": "Compatibility enum ranges for validating shared PDTF state containing TA6 edition 6 answers"
252
+ }
@@ -73,7 +73,8 @@
73
73
  },
74
74
  "required": [
75
75
  "serviceCharge"
76
- ]
76
+ ],
77
+ "ntsRef": "A3.2"
77
78
  }
78
79
  },
79
80
  "required": [
@@ -86,12 +87,14 @@
86
87
  },
87
88
  "required": [
88
89
  "ownershipsToBeTransferred"
89
- ]
90
+ ],
91
+ "ntsRef": "A3"
90
92
  }
91
93
  },
92
94
  "required": [
93
95
  "ownership"
94
- ]
96
+ ],
97
+ "ntsRef": "0"
95
98
  }
96
99
  },
97
100
  "$schema": "http://json-schema.org/draft-07/schema#",
@@ -0,0 +1,73 @@
1
+ {
2
+ "properties": {
3
+ "propertyPack": {
4
+ "properties": {
5
+ "ownership": {
6
+ "properties": {
7
+ "ownershipsToBeTransferred": {
8
+ "items": {
9
+ "oneOf": [
10
+ {
11
+ "properties": {
12
+ "titleRestrictions": {
13
+ "ntsRef": "T1.1",
14
+ "required": [
15
+ "yesNo"
16
+ ],
17
+ "discriminator": {
18
+ "propertyName": "yesNo"
19
+ },
20
+ "properties": {
21
+ "yesNo": {
22
+ "ntsRef": "T1.1.1",
23
+ "type": "string"
24
+ }
25
+ },
26
+ "oneOf": [
27
+ {
28
+ "properties": {
29
+ "yesNo": {
30
+ "enum": [
31
+ "No"
32
+ ]
33
+ }
34
+ }
35
+ },
36
+ {
37
+ "required": [
38
+ "details"
39
+ ],
40
+ "properties": {
41
+ "details": {
42
+ "ntsRef": "T1.1.2",
43
+ "type": "string",
44
+ "minLength": 1
45
+ },
46
+ "yesNo": {
47
+ "enum": [
48
+ "Yes"
49
+ ]
50
+ }
51
+ }
52
+ }
53
+ ],
54
+ "type": "object"
55
+ }
56
+ },
57
+ "required": [
58
+ "titleRestrictions"
59
+ ]
60
+ }
61
+ ]
62
+ }
63
+ }
64
+ },
65
+ "ntsRef": "T1"
66
+ }
67
+ }
68
+ }
69
+ },
70
+ "$schema": "http://json-schema.org/draft-07/schema#",
71
+ "$id": "https://trust.propdata.org.uk/schemas/v3/overlays/extensions/tr.json",
72
+ "$comment": "Title restrictions for freehold properties"
73
+ }