@pdtf/schemas 3.6.0-35 → 3.6.0-36
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/README.md +33 -52
- package/docs/sef25-extensions-ui-spec.md +49 -258
- package/index.js +0 -9
- package/package.json +1 -1
- package/src/examples/v3/exampleTransaction.json +3 -3
- package/src/schemas/v3/combined.json +32 -279
- package/src/schemas/v3/compactSkeleton.txt +2 -16
- package/src/schemas/v3/overlays/extensions/as.json +2 -4
- package/src/schemas/v3/overlays/extensions/dr.json +2 -4
- package/src/schemas/v3/overlays/extensions/er.json +2 -4
- package/src/schemas/v3/overlays/extensions/fd.json +3 -6
- package/src/schemas/v3/overlays/extensions/hi.json +3 -6
- package/src/schemas/v3/overlays/extensions/hs.json +2 -4
- package/src/schemas/v3/overlays/extensions/jk.json +2 -4
- package/src/schemas/v3/overlays/extensions/la.json +2 -4
- package/src/schemas/v3/overlays/extensions/ma.json +3 -6
- package/src/schemas/v3/overlays/extensions/mc.json +2 -4
- package/src/schemas/v3/overlays/extensions/oa.json +2 -4
- package/src/schemas/v3/overlays/extensions/oc.json +2 -4
- package/src/schemas/v3/overlays/extensions/pc.json +1 -2
- package/src/schemas/v3/overlays/extensions/ph.json +14 -11
- package/src/schemas/v3/overlays/extensions/sb.json +2 -4
- package/src/schemas/v3/overlays/extensions/sc.json +14 -82
- package/src/schemas/v3/overlays/extensions/sf.json +2 -4
- package/src/schemas/v3/overlays/extensions/sl.json +2 -4
- package/src/schemas/v3/overlays/extensions/tf.json +3 -6
- package/src/schemas/v3/overlays/sef25.json +10 -727
- package/src/schemas/v3/pdtf-transaction.json +15 -227
- package/src/schemas/v3/skeleton.json +5 -24
- package/src/tests/v3/extensionOverlays.test.js +5 -411
- package/src/utils/extractExtensionOverlays.js +4 -116
- package/src/schemas/v3/overlays/extensions/dk.json +0 -32
- package/src/schemas/v3/overlays/extensions/ic.json +0 -59
- package/src/schemas/v3/overlays/extensions/lc.json +0 -86
- package/src/schemas/v3/overlays/extensions/mi.json +0 -55
- package/src/schemas/v3/overlays/extensions/nd.json +0 -43
- package/src/schemas/v3/overlays/extensions/rw.json +0 -68
- package/src/schemas/v3/overlays/extensions/sd.json +0 -63
- package/src/schemas/v3/overlays/extensions/tr.json +0 -73
- package/src/schemas/v3/overlays/extensions/wg.json +0 -250
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ The Property Data Trust Framework (PDTF) Schemas provide standardized JSON Schem
|
|
|
7
7
|
|
|
8
8
|
## Project Goals & Status
|
|
9
9
|
|
|
10
|
-
**Current Version:** 3.
|
|
10
|
+
**Current Version:** 3.5.0 (3.5.1-1 available as a pre-release on branch/package-tag `next`)
|
|
11
11
|
|
|
12
12
|
This schema framework aims to support the [Home Buying and Selling Group](https://homebuyingandsellinggroup.co.uk) 'Property Pack' initiative, encompassing all requirements starting with the Buyers and Sellers Property Information set ([BASPI v4.0](https://homebuyingandsellinggroup.co.uk/baspi/)).
|
|
13
13
|
|
|
@@ -62,7 +62,7 @@ if (!isValid) {
|
|
|
62
62
|
|
|
63
63
|
- **🏗️ Modular Schema System** - Base schemas with flexible overlay composition
|
|
64
64
|
- **📋 Multiple Form Support** - BASPI, NTS, Law Society TA forms, and more
|
|
65
|
-
- **🧩 Extension Overlays** - Granular NTS2
|
|
65
|
+
- **🧩 Extension Overlays** - Granular NTS2 features as individual modules
|
|
66
66
|
- **✅ JSON Schema Validation** - Full JSON Schema Draft 07 support with AJV
|
|
67
67
|
- **🔗 Verified Claims** - Support for verified data provenance tracking
|
|
68
68
|
- **📚 Comprehensive Documentation** - Detailed usage guides and examples
|
|
@@ -82,7 +82,7 @@ if (!isValid) {
|
|
|
82
82
|
│ │ │ │ └── extensions/ # Modular NTS2 extensions
|
|
83
83
|
│ │ │ │ ├── jk.json # Japanese Knotweed
|
|
84
84
|
│ │ │ │ ├── tf.json # Transfer Fees
|
|
85
|
-
│ │ │ │ └── ... #
|
|
85
|
+
│ │ │ │ └── ... # 16 total extensions
|
|
86
86
|
│ │ │ └── combined.json # Master schema for generation
|
|
87
87
|
│ │ ├── v2/ # Legacy schema version
|
|
88
88
|
│ │ ├── verifiedClaims/ # Verified claims schemas
|
|
@@ -163,56 +163,31 @@ const errors = validateVerifiedClaims(verifiedClaims, schemaId, ["nts2023"]);
|
|
|
163
163
|
|
|
164
164
|
#### Extension Overlays
|
|
165
165
|
|
|
166
|
-
Modular features for selective adoption
|
|
166
|
+
Modular NTS2 features for selective adoption:
|
|
167
167
|
|
|
168
168
|
```javascript
|
|
169
|
-
//
|
|
170
|
-
const schema = getTransactionSchema(schemaId, ["nts2023", "jk", "tf"
|
|
171
|
-
|
|
172
|
-
//
|
|
173
|
-
const
|
|
174
|
-
|
|
169
|
+
// Individual extensions
|
|
170
|
+
const schema = getTransactionSchema(schemaId, ["nts2023", "jk", "tf"]);
|
|
171
|
+
|
|
172
|
+
// Multiple specialist issues
|
|
173
|
+
const schema = getTransactionSchema(schemaId, [
|
|
174
|
+
"nts2023",
|
|
175
|
+
"as",
|
|
176
|
+
"dr",
|
|
177
|
+
"jk",
|
|
178
|
+
"sb",
|
|
179
|
+
]);
|
|
175
180
|
```
|
|
176
181
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
| Extension | Code | Description |
|
|
180
|
-
| --- | --- | --- |
|
|
182
|
+
| Extension | Code | Description |
|
|
183
|
+
| ----------------- | ---- | -------------------------------- |
|
|
181
184
|
| Japanese Knotweed | `jk` | Knotweed presence and management |
|
|
182
|
-
|
|
|
183
|
-
|
|
|
184
|
-
|
|
|
185
|
-
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
| Loft Access | `la` | Loft access and details |
|
|
189
|
-
| Spray Foam | `sf` | Spray foam insulation |
|
|
190
|
-
| Solar Panels | `sl` | Solar panel ownership details |
|
|
191
|
-
| Heating Installed | `hi` | Central heating installation date |
|
|
192
|
-
| Flood Defences | `fd` | Flood defence information |
|
|
193
|
-
| Estate Rentcharges | `er` | Estate rentcharges for freehold |
|
|
194
|
-
| Managing Agent | `ma` | Leasehold managing agent details |
|
|
195
|
-
| Transfer Fees | `tf` | Additional leasehold fees |
|
|
196
|
-
| Onward Chain | `oc` | Other property in chain |
|
|
197
|
-
|
|
198
|
-
**SEF25 Extensions (Seller Enquiry Form):**
|
|
199
|
-
|
|
200
|
-
| Extension | Code | Description |
|
|
201
|
-
| --- | --- | --- |
|
|
202
|
-
| Supply Costs | `sc` | Private water/sewerage costs |
|
|
203
|
-
| Parking Permit Cost | `pc` | Parking permit frequency |
|
|
204
|
-
| Property Hazards | `ph` | 4 hazard Yes/No questions |
|
|
205
|
-
| Dropped Kerb | `dk` | Dropped kerb access to parking |
|
|
206
|
-
| Private Right of Way | `rw` | Private right of way |
|
|
207
|
-
| Storm/Fire/Flood Damage | `sd` | Storm, fire or flood damage |
|
|
208
|
-
| Solar Lease Costs | `lc` | Solar panel lease costs |
|
|
209
|
-
| Warranties & Guarantees | `wg` | 7 warranty categories upfront |
|
|
210
|
-
| Insurance Claims | `ic` | Insurance claims upfront |
|
|
211
|
-
| Neighbour Development | `nd` | Neighbour development |
|
|
212
|
-
| Material Issue | `mi` | Other material issue upfront |
|
|
213
|
-
| Title Restrictions | `tr` | Title restrictions for freehold |
|
|
214
|
-
|
|
215
|
-
[View full SEF25 UI spec →](docs/sef25-extensions-ui-spec.md) | [View all extensions →](src/schemas/v3/overlays/README.md#extension-overlays)
|
|
185
|
+
| Transfer Fees | `tf` | Additional leasehold fees |
|
|
186
|
+
| Managing Agent | `ma` | Leasehold managing agent details |
|
|
187
|
+
| Solar Panels | `sl` | Solar panel ownership details |
|
|
188
|
+
| Asbestos | `as` | Asbestos presence and management |
|
|
189
|
+
|
|
190
|
+
[View all extensions →](src/schemas/v3/overlays/README.md#extension-overlays)
|
|
216
191
|
|
|
217
192
|
## Usage Examples
|
|
218
193
|
|
|
@@ -229,7 +204,7 @@ const legalSchema = getTransactionSchema(schemaId, ["ta6ed4", "ta7ed3"]);
|
|
|
229
204
|
const ntsSchema = getTransactionSchema(schemaId, ["nts2023"]);
|
|
230
205
|
```
|
|
231
206
|
|
|
232
|
-
### Modular
|
|
207
|
+
### Modular NTS2 Features
|
|
233
208
|
|
|
234
209
|
```javascript
|
|
235
210
|
// Selective NTS2 adoption
|
|
@@ -240,9 +215,15 @@ const partialNts2 = getTransactionSchema(schemaId, [
|
|
|
240
215
|
"ma", // Managing Agent
|
|
241
216
|
]);
|
|
242
217
|
|
|
243
|
-
//
|
|
244
|
-
const
|
|
245
|
-
|
|
218
|
+
// Full specialist issues
|
|
219
|
+
const specialistIssues = getTransactionSchema(schemaId, [
|
|
220
|
+
"nts2023",
|
|
221
|
+
"as",
|
|
222
|
+
"dr",
|
|
223
|
+
"jk",
|
|
224
|
+
"sb",
|
|
225
|
+
"hs",
|
|
226
|
+
]);
|
|
246
227
|
```
|
|
247
228
|
|
|
248
229
|
### Data Validation
|
|
@@ -2,232 +2,115 @@
|
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
### Pre-existing overlays
|
|
8
|
-
|
|
9
|
-
These were added before this PR and are already in production.
|
|
5
|
+
Three new extension overlays add follow-up questions to existing form sections. Each overlay is loaded by passing its key to `getTransactionSchema(schemaId, overlays)`.
|
|
10
6
|
|
|
11
7
|
| Overlay Key | Name | Section | Fields Added |
|
|
12
8
|
|-------------|------|---------|-------------|
|
|
13
|
-
| `sc` | Supply Costs | Water & Drainage |
|
|
9
|
+
| `sc` | Supply Costs | Water & Drainage | 2 cost fields (private water, private sewerage) |
|
|
14
10
|
| `pc` | Parking Permit Cost | Parking | 1 frequency field |
|
|
15
11
|
| `ph` | Property Hazards | Specialist Issues | 4 Yes/No + details fields |
|
|
16
12
|
|
|
17
|
-
### New overlays (this PR)
|
|
18
|
-
|
|
19
|
-
| Overlay Key | Name | Section | Fields Added |
|
|
20
|
-
|-------------|------|---------|-------------|
|
|
21
|
-
| `dk` | Dropped Kerb | Parking | 1 Yes/No field |
|
|
22
|
-
| `rw` | Private Right of Way | Rights & Informal Arrangements | 1 Yes/No + details field |
|
|
23
|
-
| `sd` | Storm/Fire/Flood Damage | Environmental Issues | 1 Yes/No + details field |
|
|
24
|
-
| `lc` | Solar Lease Costs | Utilities (Solar Panels) | 1 cost field (hasCost + amount + frequency) |
|
|
25
|
-
| `wg` | Warranties & Guarantees | Guarantees & Warranties | Marks 7 warranty categories as required |
|
|
26
|
-
| `ic` | Insurance Claims | Insurance | Marks insuranceClaims required (isInsured=Yes branch) |
|
|
27
|
-
| `nd` | Neighbour Development | Notices | Adds sef25Ref to neighbourDevelopment (already required via NTS) |
|
|
28
|
-
| `mi` | Material Issue | Additional Information | Marks otherMaterialIssue required |
|
|
29
|
-
| `tr` | Title Restrictions | Ownership (Freehold) | Adds titleRestrictions field to freehold branch |
|
|
30
|
-
|
|
31
|
-
### Existing fields with sef25Ref only (no separate overlay needed)
|
|
32
|
-
|
|
33
|
-
| Field | Path | sef25Ref | Notes |
|
|
34
|
-
|-------|------|----------|-------|
|
|
35
|
-
| `hasBeenFlooded` | `environmentalIssues.flooding.historicalFlooding.hasBeenFlooded` | E1.2 | Already required and rendered via NTS flooding section |
|
|
36
|
-
|
|
37
13
|
All fields use `sef25Ref` for reference codes.
|
|
38
14
|
|
|
39
15
|
---
|
|
40
16
|
|
|
41
|
-
##
|
|
42
|
-
|
|
43
|
-
### 1. Supply Costs (`sc`)
|
|
17
|
+
## 1. Supply Costs (`sc`)
|
|
44
18
|
|
|
45
|
-
|
|
19
|
+
### 1a. Private Water Cost
|
|
46
20
|
|
|
47
21
|
**Trigger:** Show when `propertyPack.waterAndDrainage.water.mainsWater.yesNo` = `"No"`
|
|
48
22
|
|
|
49
23
|
**Path:** `propertyPack.waterAndDrainage.water.mainsWater.associatedCost`
|
|
50
24
|
|
|
51
|
-
**UI:** Render alongside the existing "How is water supplied?" details field.
|
|
25
|
+
**UI:** Render alongside the existing "How is water supplied?" details field.
|
|
52
26
|
|
|
53
27
|
| Field | Path (relative) | Type | Validation | UI Element |
|
|
54
28
|
|-------|-----------------|------|------------|------------|
|
|
55
|
-
|
|
|
56
|
-
|
|
|
57
|
-
| Payment frequency | `associatedCost.frequency` | `string` | Required when Yes, enum | Dropdown |
|
|
29
|
+
| Cost (£) | `associatedCost.amount` | `number` | Required | Numeric input |
|
|
30
|
+
| Payment frequency | `associatedCost.frequency` | `string` | Required, enum | Dropdown |
|
|
58
31
|
|
|
59
32
|
**Frequency enum values:** `"Per month"`, `"Per year"`
|
|
60
33
|
|
|
61
|
-
**Ref:** `U1.1` (
|
|
34
|
+
**Ref:** `U1.1` (amount: `U1.1.1`, frequency: `U1.1.2`)
|
|
62
35
|
|
|
63
|
-
|
|
36
|
+
### 1b. Private Sewerage Cost
|
|
64
37
|
|
|
65
38
|
**Trigger:** Show when `propertyPack.waterAndDrainage.drainage.mainsFoulDrainage.yesNo` = `"No"` or `"Not known"`
|
|
66
39
|
|
|
67
40
|
**Path:** `propertyPack.waterAndDrainage.drainage.mainsFoulDrainage.associatedCost`
|
|
68
41
|
|
|
69
|
-
**UI:**
|
|
70
|
-
|
|
71
|
-
**Ref:** `U1.2` (hasCost: `U1.2.1`, amount: `U1.2.2`, frequency: `U1.2.3`)
|
|
72
|
-
|
|
73
|
-
### 2. Parking Permit Cost (`pc`)
|
|
74
|
-
|
|
75
|
-
**Trigger:** Show when `propertyPack.parking.controlledParking.yesNo` = `"Yes"`
|
|
76
|
-
|
|
77
|
-
**Path:** `propertyPack.parking.controlledParking.costOfPermitFrequency`
|
|
78
|
-
|
|
79
|
-
**UI:** Render alongside the existing cost of permit field. The frequency dropdown clarifies whether the cost amount is monthly or annual.
|
|
42
|
+
**UI:** Render alongside the existing off-mains drainage system questions.
|
|
80
43
|
|
|
81
44
|
| Field | Path (relative) | Type | Validation | UI Element |
|
|
82
45
|
|-------|-----------------|------|------------|------------|
|
|
83
|
-
|
|
|
46
|
+
| Cost (£) | `associatedCost.amount` | `number` | Required | Numeric input |
|
|
47
|
+
| Payment frequency | `associatedCost.frequency` | `string` | Required, enum | Dropdown |
|
|
84
48
|
|
|
85
49
|
**Frequency enum values:** `"Per month"`, `"Per year"`
|
|
86
50
|
|
|
87
|
-
**Ref:** `
|
|
88
|
-
|
|
89
|
-
### 3. Property Hazards (`ph`)
|
|
90
|
-
|
|
91
|
-
**Trigger:** Always shown (standalone questions within Specialist Issues).
|
|
92
|
-
|
|
93
|
-
**Path prefix:** `propertyPack.specialistIssues`
|
|
94
|
-
|
|
95
|
-
All 4 fields follow the same pattern: Yes/No, if Yes show required details.
|
|
96
|
-
|
|
97
|
-
| Property | Title | sef25Ref |
|
|
98
|
-
|----------|-------|----------|
|
|
99
|
-
| `wellsDitchesShaft` | Are there any wells, ditches, or shafts at the property? | H1.1 |
|
|
100
|
-
| `damagedOrExposedElectrics` | Are there any damaged or exposed electrics at the property? | H1.2 |
|
|
101
|
-
| `damageToFlooringOrStaircases` | Is there any damage to flooring and/or staircases? | H1.3 |
|
|
102
|
-
| `knownAreasInPoorCondition` | Are there any known areas in poor condition (internal or external)? | H1.4 |
|
|
103
|
-
|
|
104
|
-
---
|
|
105
|
-
|
|
106
|
-
## New overlays (detail)
|
|
107
|
-
|
|
108
|
-
### 4. Dropped Kerb (`dk`)
|
|
109
|
-
|
|
110
|
-
**Trigger:** Always shown within Parking section.
|
|
111
|
-
|
|
112
|
-
**Path:** `propertyPack.parking.droppedKerbAccess`
|
|
113
|
-
|
|
114
|
-
| Field | Path (relative) | Type | Validation | UI Element |
|
|
115
|
-
|-------|-----------------|------|------------|------------|
|
|
116
|
-
| Dropped kerb? | `droppedKerbAccess.yesNo` | `string` | Required, enum | Yes/No radio |
|
|
117
|
-
|
|
118
|
-
**Ref:** `K1.1` (yesNo: `K1.1.1`)
|
|
51
|
+
**Ref:** `U1.2` (amount: `U1.2.1`, frequency: `U1.2.2`)
|
|
119
52
|
|
|
120
53
|
---
|
|
121
54
|
|
|
122
|
-
|
|
55
|
+
## 2. Parking Permit Cost (`pc`)
|
|
123
56
|
|
|
124
|
-
**Trigger:**
|
|
57
|
+
**Trigger:** Show when `propertyPack.parking.controlledParking.yesNo` = `"Yes"`
|
|
125
58
|
|
|
126
|
-
**Path:** `propertyPack.
|
|
59
|
+
**Path:** `propertyPack.parking.controlledParking.costOfPermitFrequency`
|
|
127
60
|
|
|
128
|
-
**UI:**
|
|
61
|
+
**UI:** Render alongside the existing cost of permit field (previously titled "Annual cost of permit (£)", now retitled to "Cost of permit (£)"). The frequency dropdown clarifies whether the cost amount is monthly or annual.
|
|
129
62
|
|
|
130
63
|
| Field | Path (relative) | Type | Validation | UI Element |
|
|
131
64
|
|-------|-----------------|------|------------|------------|
|
|
132
|
-
|
|
|
133
|
-
| Details | `privateRightOfWay.details` | `string` | Required when Yes, minLength 1 | Text input |
|
|
134
|
-
|
|
135
|
-
**Ref:** `R1.1` (yesNo: `R1.1.1`, details: `R1.1.2`)
|
|
136
|
-
|
|
137
|
-
---
|
|
138
|
-
|
|
139
|
-
### 6. Storm, Fire or Flood Damage (`sd`)
|
|
140
|
-
|
|
141
|
-
**Trigger:** Always shown within Environmental Issues section.
|
|
65
|
+
| Payment frequency | `costOfPermitFrequency` | `string` | Enum | Dropdown |
|
|
142
66
|
|
|
143
|
-
**
|
|
67
|
+
**Frequency enum values:** `"Per month"`, `"Per year"`
|
|
144
68
|
|
|
145
|
-
|
|
146
|
-
|-------|-----------------|------|------------|------------|
|
|
147
|
-
| Damage? | `stormFireFloodDamage.yesNo` | `string` | Required, enum | Yes/No radio |
|
|
148
|
-
| Details | `stormFireFloodDamage.details` | `string` | Required when Yes, minLength 1 | Text area |
|
|
69
|
+
**Note:** The existing `annualCostOfPermit` numeric field remains unchanged. The new frequency field sits beside it to indicate whether the entered amount is per month or per year.
|
|
149
70
|
|
|
150
|
-
**Ref:** `
|
|
71
|
+
**Ref:** `P1.1`
|
|
151
72
|
|
|
152
73
|
---
|
|
153
74
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
**Trigger:** Show when `propertyPack.electricity.solarPanels.panelsOwnedOutright.yesNo` = `"No"` (panels are leased).
|
|
157
|
-
|
|
158
|
-
**Path:** `propertyPack.electricity.solarPanels.panelsOwnedOutright.associatedCost`
|
|
159
|
-
|
|
160
|
-
**UI:** Render alongside existing lease details. First ask if there are costs, then show amount and frequency if Yes.
|
|
161
|
-
|
|
162
|
-
| Field | Path (relative) | Type | Validation | UI Element |
|
|
163
|
-
|-------|-----------------|------|------------|------------|
|
|
164
|
-
| Has costs? | `associatedCost.hasCost` | `string` | Required, enum | Yes/No radio |
|
|
165
|
-
| Amount (£) | `associatedCost.amount` | `number` | Required when Yes | Numeric input |
|
|
166
|
-
| Frequency | `associatedCost.frequency` | `string` | Required when Yes, enum | Dropdown |
|
|
167
|
-
|
|
168
|
-
**Frequency enum values:** `"Per month"`, `"Per year"`
|
|
169
|
-
|
|
170
|
-
**Ref:** `S1.1` (hasCost: `S1.1.1`, amount: `S1.1.2`, frequency: `S1.1.3`)
|
|
75
|
+
## 3. Property Hazards (`ph`)
|
|
171
76
|
|
|
172
|
-
|
|
77
|
+
**Trigger:** Always shown (no conditional trigger — these are standalone questions within Specialist Issues).
|
|
173
78
|
|
|
174
|
-
|
|
79
|
+
**Path prefix:** `propertyPack.specialistIssues`
|
|
175
80
|
|
|
176
|
-
|
|
81
|
+
All 4 fields follow the same pattern:
|
|
177
82
|
|
|
178
|
-
**
|
|
83
|
+
- **Initial question:** Yes/No radio/toggle
|
|
84
|
+
- **If "Yes":** Show a required free-text "Give details" field
|
|
179
85
|
|
|
180
|
-
|
|
86
|
+
### Fields
|
|
181
87
|
|
|
182
88
|
| Property | Title | sef25Ref |
|
|
183
89
|
|----------|-------|----------|
|
|
184
|
-
| `
|
|
185
|
-
| `
|
|
186
|
-
| `
|
|
187
|
-
| `
|
|
188
|
-
| `electricalRepairOrInstallation` | Electrical repair or installation | W1.5 |
|
|
189
|
-
| `subsidenceWork` | Underpinning or other preventative work / remedial action relating to subsidence | W1.6 |
|
|
190
|
-
| `otherGuarantees` | Other Guarantees or warranties | W1.7 |
|
|
191
|
-
|
|
192
|
-
**Note:** These fields already exist in the base schema under the `hasValidGuaranteesOrWarranties = "Yes"` branch. The `wg` overlay marks them as required within that branch. The Moverly app shows them upfront for SEF25 users without requiring the parent gate question first.
|
|
193
|
-
|
|
194
|
-
---
|
|
195
|
-
|
|
196
|
-
### 9. Insurance Claims (`ic`)
|
|
197
|
-
|
|
198
|
-
**Path:** `propertyPack.insurance.insuranceClaims` (inside `isInsured = "Yes"` branch)
|
|
199
|
-
|
|
200
|
-
**Ref:** `I1.1` (yesNo: `I1.1.1`) — "Have you made any buildings insurance claims?"
|
|
201
|
-
|
|
202
|
-
**Note:** The overlay marks insuranceClaims required within the `isInsured = "Yes"` oneOf branch.
|
|
203
|
-
|
|
204
|
-
---
|
|
205
|
-
|
|
206
|
-
### 10. Neighbour Development (`nd`)
|
|
207
|
-
|
|
208
|
-
**Path:** `propertyPack.notices.neighbourDevelopment`
|
|
209
|
-
|
|
210
|
-
**Ref:** `N1.1` — "Is the seller aware of any proposals to develop property or land nearby?"
|
|
211
|
-
|
|
212
|
-
**Note:** `neighbourDevelopment` is already required via `ntsRequired` at the notices level. The `nd` overlay adds `sef25Ref` and `ntsRef` annotations so the field is identifiable as SEF25-relevant.
|
|
213
|
-
|
|
214
|
-
---
|
|
215
|
-
|
|
216
|
-
### 11. Material Issue (`mi`)
|
|
90
|
+
| `wellsDitchesShaft` | Are there any wells, ditches, or shafts at the property? | H1.1 |
|
|
91
|
+
| `damagedOrExposedElectrics` | Are there any damaged or exposed electrics at the property? | H1.2 |
|
|
92
|
+
| `damageToFlooringOrStaircases` | Is there any damage to flooring and/or staircases? | H1.3 |
|
|
93
|
+
| `knownAreasInPoorCondition` | Are there any known areas in poor condition (internal or external)? | H1.4 |
|
|
217
94
|
|
|
218
|
-
|
|
95
|
+
### Data shape per field
|
|
219
96
|
|
|
220
|
-
|
|
97
|
+
```json
|
|
98
|
+
// When "No":
|
|
99
|
+
{ "yesNo": "No" }
|
|
221
100
|
|
|
222
|
-
|
|
101
|
+
// When "Yes":
|
|
102
|
+
{ "yesNo": "Yes", "details": "Free text description..." }
|
|
103
|
+
```
|
|
223
104
|
|
|
224
|
-
###
|
|
105
|
+
### Validation
|
|
225
106
|
|
|
226
|
-
|
|
107
|
+
- `yesNo` is required (enum: `["Yes", "No"]`)
|
|
108
|
+
- When `yesNo` = `"Yes"`, `details` is required (string, minLength: 1)
|
|
109
|
+
- When `yesNo` = `"No"`, `details` should not be shown or submitted
|
|
227
110
|
|
|
228
|
-
|
|
111
|
+
### UI pattern
|
|
229
112
|
|
|
230
|
-
|
|
113
|
+
These follow the identical pattern to existing specialist issues (dry rot, asbestos, subsidence, health & safety). Render them the same way — group them under "Hazards and Known Issues" within the Specialist Issues section.
|
|
231
114
|
|
|
232
115
|
---
|
|
233
116
|
|
|
@@ -238,15 +121,14 @@ import { getTransactionSchema, getValidator } from "@pdtf/schemas";
|
|
|
238
121
|
|
|
239
122
|
const schemaId = "https://trust.propdata.org.uk/schemas/v3/pdtf-transaction.json";
|
|
240
123
|
|
|
241
|
-
// Load
|
|
242
|
-
const
|
|
243
|
-
const schema = getTransactionSchema(schemaId, sef25Extensions);
|
|
124
|
+
// Load with one or more SEF25 extensions
|
|
125
|
+
const schema = getTransactionSchema(schemaId, ["sc", "pc", "ph"]);
|
|
244
126
|
|
|
245
127
|
// Or combine with other overlays
|
|
246
|
-
const schema = getTransactionSchema(schemaId, ["baspiV5",
|
|
128
|
+
const schema = getTransactionSchema(schemaId, ["baspiV5", "sc", "pc", "ph"]);
|
|
247
129
|
|
|
248
130
|
// Validate data against the merged schema
|
|
249
|
-
const validator = getValidator(schemaId,
|
|
131
|
+
const validator = getValidator(schemaId, ["sc", "pc", "ph"]);
|
|
250
132
|
```
|
|
251
133
|
|
|
252
134
|
---
|
|
@@ -262,94 +144,3 @@ const validator = getValidator(schemaId, sef25Extensions);
|
|
|
262
144
|
| Damaged electrics | Always (within Specialist Issues) |
|
|
263
145
|
| Flooring/staircase damage | Always (within Specialist Issues) |
|
|
264
146
|
| Areas in poor condition | Always (within Specialist Issues) |
|
|
265
|
-
| Dropped kerb access | Always (within Parking) |
|
|
266
|
-
| Private right of way | Always (within Rights & Informal Arrangements) |
|
|
267
|
-
| Storm/fire/flood damage | Always (within Environmental Issues) |
|
|
268
|
-
| Solar panel lease costs | `panelsOwnedOutright.yesNo` = `"No"` |
|
|
269
|
-
| Warranty categories (7) | Always when `wg` overlay loaded (within Guarantees & Warranties) |
|
|
270
|
-
| Insurance claims | `isInsured.yesNo` = `"Yes"` (via `ic` overlay) |
|
|
271
|
-
| Neighbour development | Always (via `nd` overlay) |
|
|
272
|
-
| Other material issue | Always (via `mi` overlay) |
|
|
273
|
-
| Title restrictions | Always (via `tr` overlay, freehold only) |
|
|
274
|
-
|
|
275
|
-
---
|
|
276
|
-
|
|
277
|
-
## Moverly propertyPackTasks Changes
|
|
278
|
-
|
|
279
|
-
The following changes are needed in the Moverly app's `propertyPackTasks` configuration to surface the new SEF25 fields in the listing journey.
|
|
280
|
-
|
|
281
|
-
### Existing tasks to deprecate
|
|
282
|
-
|
|
283
|
-
The flooding and planning tasks should be stepped up to their parent section level to cover the new sibling fields (`stormFireFloodDamage` and `neighbourDevelopment`).
|
|
284
|
-
|
|
285
|
-
```js
|
|
286
|
-
// Replace existing flooding task with deprecated version
|
|
287
|
-
{
|
|
288
|
-
name: "Flooding",
|
|
289
|
-
path: "/propertyPack/environmentalIssues/flooding",
|
|
290
|
-
category: "listing",
|
|
291
|
-
overlay: "nts2023",
|
|
292
|
-
deprecated: true, // replaced by environmental issues check
|
|
293
|
-
},
|
|
294
|
-
|
|
295
|
-
// Replace existing planning task with deprecated version
|
|
296
|
-
{
|
|
297
|
-
name: "Planning and development",
|
|
298
|
-
path: "/propertyPack/notices/planningApplication",
|
|
299
|
-
category: "listing",
|
|
300
|
-
overlay: "nts2023",
|
|
301
|
-
deprecated: true, // replaced by notices check
|
|
302
|
-
},
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
### New listing tasks to add
|
|
306
|
-
|
|
307
|
-
```js
|
|
308
|
-
{
|
|
309
|
-
name: "Environmental issues",
|
|
310
|
-
checkName: "sef25-environmentalIssues",
|
|
311
|
-
path: "/propertyPack/environmentalIssues",
|
|
312
|
-
category: "listing",
|
|
313
|
-
overlay: "sd",
|
|
314
|
-
},
|
|
315
|
-
{
|
|
316
|
-
name: "Notices",
|
|
317
|
-
checkName: "sef25-notices",
|
|
318
|
-
path: "/propertyPack/notices",
|
|
319
|
-
category: "listing",
|
|
320
|
-
overlay: "nd",
|
|
321
|
-
},
|
|
322
|
-
{
|
|
323
|
-
name: "Guarantees & warranties",
|
|
324
|
-
checkName: "sef25-warranties",
|
|
325
|
-
path: "/propertyPack/guaranteesWarrantiesAndIndemnityInsurances",
|
|
326
|
-
category: "listing",
|
|
327
|
-
overlay: "wg",
|
|
328
|
-
},
|
|
329
|
-
{
|
|
330
|
-
name: "Insurance claims",
|
|
331
|
-
checkName: "sef25-insurance",
|
|
332
|
-
path: "/propertyPack/insurance",
|
|
333
|
-
category: "listing",
|
|
334
|
-
overlay: "ic",
|
|
335
|
-
},
|
|
336
|
-
{
|
|
337
|
-
name: "Additional material information",
|
|
338
|
-
checkName: "sef25-additionalInformation",
|
|
339
|
-
path: "/propertyPack/additionalInformation",
|
|
340
|
-
category: "listing",
|
|
341
|
-
overlay: "mi",
|
|
342
|
-
},
|
|
343
|
-
```
|
|
344
|
-
|
|
345
|
-
### Fields covered by existing listing tasks (no new task needed)
|
|
346
|
-
|
|
347
|
-
| Extension | Covered by |
|
|
348
|
-
|-----------|------------|
|
|
349
|
-
| `dk` (dropped kerb) | Parking |
|
|
350
|
-
| `rw` (private right of way) | Rights and easements |
|
|
351
|
-
| `lc` (solar lease costs) | Electricity |
|
|
352
|
-
| `sc` (supply costs) | Water and drainage |
|
|
353
|
-
| `pc` (parking permit cost) | Parking |
|
|
354
|
-
| `ph` (property hazards) | Specialist issues |
|
|
355
|
-
| `tr` (title restrictions) | Ownership |
|
package/index.js
CHANGED
|
@@ -57,15 +57,6 @@ const extensionOverlays = {
|
|
|
57
57
|
sc: require("./src/schemas/v3/overlays/extensions/sc.json"),
|
|
58
58
|
pc: require("./src/schemas/v3/overlays/extensions/pc.json"),
|
|
59
59
|
ph: require("./src/schemas/v3/overlays/extensions/ph.json"),
|
|
60
|
-
dk: require("./src/schemas/v3/overlays/extensions/dk.json"),
|
|
61
|
-
rw: require("./src/schemas/v3/overlays/extensions/rw.json"),
|
|
62
|
-
sd: require("./src/schemas/v3/overlays/extensions/sd.json"),
|
|
63
|
-
lc: require("./src/schemas/v3/overlays/extensions/lc.json"),
|
|
64
|
-
wg: require("./src/schemas/v3/overlays/extensions/wg.json"),
|
|
65
|
-
ic: require("./src/schemas/v3/overlays/extensions/ic.json"),
|
|
66
|
-
nd: require("./src/schemas/v3/overlays/extensions/nd.json"),
|
|
67
|
-
mi: require("./src/schemas/v3/overlays/extensions/mi.json"),
|
|
68
|
-
tr: require("./src/schemas/v3/overlays/extensions/tr.json"),
|
|
69
60
|
};
|
|
70
61
|
|
|
71
62
|
const overlaysMap = {
|
package/package.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"role": "Seller",
|
|
21
21
|
"sellersCapacity": { "capacity": "Legal Owner" },
|
|
22
|
-
"externalIds": { "
|
|
22
|
+
"externalIds": { "Platform": "123434" }
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"role": "Seller's Conveyancer",
|
|
@@ -988,7 +988,7 @@
|
|
|
988
988
|
"name": "Example Agency Agreement",
|
|
989
989
|
"url": "https://example.com/example-agency-agreement",
|
|
990
990
|
"externalIds": {
|
|
991
|
-
"
|
|
991
|
+
"Platform": "file123"
|
|
992
992
|
},
|
|
993
993
|
"requiredSignatories": [
|
|
994
994
|
{
|
|
@@ -1027,7 +1027,7 @@
|
|
|
1027
1027
|
"name": "Peter Ronald Hetherington-Smythe",
|
|
1028
1028
|
"signedOn": "2024-11-29T16:15:02.735Z",
|
|
1029
1029
|
"externalIds": {
|
|
1030
|
-
"
|
|
1030
|
+
"Platform": "123434"
|
|
1031
1031
|
},
|
|
1032
1032
|
"role": "Seller",
|
|
1033
1033
|
"contractHash": "IYnBjUI8TauXFop6WCvnPA=="
|