Skip to content

Commit f8b09b6

Browse files
bryn-pinsNHAL22fabfab-kc
authored
feat(appeals): S20 data model updates (#100)
* feat(appeals): make event address optional * update appeal_document.documentType enumeration list * add new S20 fields, adds doctype to commands * generating types --------- Co-authored-by: NHAL22 <113360585+NHAL22@users.noreply.github.com> Co-authored-by: Fabio Fabrizio <fabio.fabrizio@kinandcarta.com>
1 parent bfe8388 commit f8b09b6

39 files changed

Lines changed: 221 additions & 41 deletions

docs/appeal-document.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,7 @@ The type of document, used for exchange, migrations and consumption from the app
594594
| `"rule6WitnessesEvidence"` | |
595595
| `"environmentalAssessment"` | |
596596
| `"appealNotification"` | |
597+
| `"historicEnglandConsultation"` | |
597598
| `null` | |
598599

599600
## sourceSystem

docs/appeal-event.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
| [eventStartDateTime](#eventstartdatetime) | `string` | Required | cannot be null | [Appeal Event](appeal-event-properties-eventstartdatetime.md "appeal-event.schema.json#/properties/eventStartDateTime") |
1717
| [eventEndDateTime](#eventenddatetime) | `string` | Required | can be null | [Appeal Event](appeal-event-properties-eventenddatetime.md "appeal-event.schema.json#/properties/eventEndDateTime") |
1818
| [notificationOfSiteVisit](#notificationofsitevisit) | `string` | Required | can be null | [Appeal Event](appeal-event-properties-notificationofsitevisit.md "appeal-event.schema.json#/properties/notificationOfSiteVisit") |
19-
| [addressLine1](#addressline1) | `string` | Required | cannot be null | [Appeal Event](appeal-event-properties-addressline1.md "appeal-event.schema.json#/properties/addressLine1") |
19+
| [addressLine1](#addressline1) | `string` | Required | can be null | [Appeal Event](appeal-event-properties-addressline1.md "appeal-event.schema.json#/properties/addressLine1") |
2020
| [addressLine2](#addressline2) | `string` | Required | can be null | [Appeal Event](appeal-event-properties-addressline2.md "appeal-event.schema.json#/properties/addressLine2") |
21-
| [addressTown](#addresstown) | `string` | Required | cannot be null | [Appeal Event](appeal-event-properties-addresstown.md "appeal-event.schema.json#/properties/addressTown") |
21+
| [addressTown](#addresstown) | `string` | Required | can be null | [Appeal Event](appeal-event-properties-addresstown.md "appeal-event.schema.json#/properties/addressTown") |
2222
| [addressCounty](#addresscounty) | `string` | Required | can be null | [Appeal Event](appeal-event-properties-addresscounty.md "appeal-event.schema.json#/properties/addressCounty") |
23-
| [addressPostcode](#addresspostcode) | `string` | Required | cannot be null | [Appeal Event](appeal-event-properties-addresspostcode.md "appeal-event.schema.json#/properties/addressPostcode") |
23+
| [addressPostcode](#addresspostcode) | `string` | Required | can be null | [Appeal Event](appeal-event-properties-addresspostcode.md "appeal-event.schema.json#/properties/addressPostcode") |
2424
| Additional Properties | Any | Optional | can be null | |
2525

2626
## eventId
@@ -295,7 +295,7 @@ First line of address for the event site
295295

296296
* Type: `string`
297297

298-
* cannot be null
298+
* can be null
299299

300300
* defined in: [Appeal Event](appeal-event-properties-addressline1.md "appeal-event.schema.json#/properties/addressLine1")
301301

@@ -337,7 +337,7 @@ Town / City of the event address
337337

338338
* Type: `string`
339339

340-
* cannot be null
340+
* can be null
341341

342342
* defined in: [Appeal Event](appeal-event-properties-addresstown.md "appeal-event.schema.json#/properties/addressTown")
343343

@@ -385,7 +385,7 @@ Postal code of the event address
385385

386386
* Type: `string`
387387

388-
* cannot be null
388+
* can be null
389389

390390
* defined in: [Appeal Event](appeal-event-properties-addresspostcode.md "appeal-event.schema.json#/properties/addressPostcode")
391391

docs/appeal-s78.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@
7979
| [reasonForNeighbourVisits](#reasonforneighbourvisits) | `string` | Required | can be null | [Appeal S78 Case](appeal-s78-properties-reasonforneighbourvisits.md "appeal-s78.schema.json#/properties/reasonForNeighbourVisits") |
8080
| [affectedListedBuildingNumbers](#affectedlistedbuildingnumbers) | `array` | Required | can be null | [Appeal S78 Case](appeal-s78-properties-affectedlistedbuildingnumbers.md "appeal-s78.schema.json#/properties/affectedListedBuildingNumbers") |
8181
| [changedListedBuildingNumbers](#changedlistedbuildingnumbers) | `array` | Required | can be null | [Appeal S78 Case](appeal-s78-properties-changedlistedbuildingnumbers.md "appeal-s78.schema.json#/properties/changedListedBuildingNumbers") |
82+
| [preserveGrantLoan](#preservegrantloan) | `boolean` | Optional | can be null | [Appeal S78 Case](appeal-s78-properties-preservegrantloan.md "appeal-s78.schema.json#/properties/preserveGrantLoan") |
83+
| [consultHistoricEngland](#consulthistoricengland) | `boolean` | Optional | can be null | [Appeal S78 Case](appeal-s78-properties-consulthistoricengland.md "appeal-s78.schema.json#/properties/consultHistoricEngland") |
8284
| [appellantCostsAppliedFor](#appellantcostsappliedfor) | `boolean` | Required | can be null | [Appeal S78 Case](appeal-s78-properties-appellantcostsappliedfor.md "appeal-s78.schema.json#/properties/appellantCostsAppliedFor") |
8385
| [lpaCostsAppliedFor](#lpacostsappliedfor) | `boolean` | Required | can be null | [Appeal S78 Case](appeal-s78-properties-lpacostsappliedfor.md "appeal-s78.schema.json#/properties/lpaCostsAppliedFor") |
8486
| [agriculturalHolding](#agriculturalholding) | `boolean` | Required | can be null | [Appeal S78 Case](appeal-s78-properties-agriculturalholding.md "appeal-s78.schema.json#/properties/agriculturalHolding") |
@@ -2092,6 +2094,46 @@ A list of changed listed building IDs from Historic England
20922094

20932095
`string[]`
20942096

2097+
## preserveGrantLoan
2098+
2099+
A grant or loan has been made to preserve the listed building
2100+
2101+
> Only available in S20 cases
2102+
2103+
`preserveGrantLoan`
2104+
2105+
* is optional
2106+
2107+
* Type: `boolean`
2108+
2109+
* can be null
2110+
2111+
* defined in: [Appeal S78 Case](appeal-s78-properties-preservegrantloan.md "appeal-s78.schema.json#/properties/preserveGrantLoan")
2112+
2113+
### preserveGrantLoan Type
2114+
2115+
`boolean`
2116+
2117+
## consultHistoricEngland
2118+
2119+
Are Historic England to be consulted?
2120+
2121+
> Only available in S20 cases
2122+
2123+
`consultHistoricEngland`
2124+
2125+
* is optional
2126+
2127+
* Type: `boolean`
2128+
2129+
* can be null
2130+
2131+
* defined in: [Appeal S78 Case](appeal-s78-properties-consulthistoricengland.md "appeal-s78.schema.json#/properties/consultHistoricEngland")
2132+
2133+
### consultHistoricEngland Type
2134+
2135+
`boolean`
2136+
20952137
## appellantCostsAppliedFor
20962138

20972139
Indicates if the appellant has applied for costs

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pins-data-model",
3-
"version": "1.10.1",
3+
"version": "1.10.2",
44
"description": "JSON Schemas for the Planning Inspectorate's Data Model",
55
"main": "src/index.js",
66
"type": "module",

pins_data_model/models/model_appeal_document.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: appeal-document.schema.json
3-
# timestamp: 2025-05-08T14:17:31+00:00
3+
# timestamp: 2025-06-03T09:08:46+00:00
44

55
from __future__ import annotations
66

@@ -116,6 +116,7 @@ class DocumentType(Enum):
116116
rule6WitnessesEvidence = "rule6WitnessesEvidence"
117117
environmentalAssessment = "environmentalAssessment"
118118
appealNotification = "appealNotification"
119+
historicEnglandConsultation = "historicEnglandConsultation"
119120
NoneType_None = None
120121

121122

pins_data_model/models/model_appeal_event.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: appeal-event.schema.json
3-
# timestamp: 2025-05-08T14:17:31+00:00
3+
# timestamp: 2025-06-03T09:08:45+00:00
44

55
from __future__ import annotations
66

@@ -95,23 +95,23 @@ class AppealEvent(BaseModel):
9595
"""
9696
The date third-parties were informed of the site visit event
9797
"""
98-
addressLine1: str = Field(..., examples=["96 The Avenue"])
98+
addressLine1: str | None = Field(..., examples=["96 The Avenue"])
9999
"""
100100
First line of address for the event site
101101
"""
102102
addressLine2: str | None = None
103103
"""
104104
Second line of address for the event site
105105
"""
106-
addressTown: str = Field(..., examples=["Maidstone"])
106+
addressTown: str | None = Field(..., examples=["Maidstone"])
107107
"""
108108
Town / City of the event address
109109
"""
110110
addressCounty: str | None = Field(..., examples=["Kent"])
111111
"""
112112
County of the event address
113113
"""
114-
addressPostcode: str = Field(..., examples=["MD21 5XY"])
114+
addressPostcode: str | None = Field(..., examples=["MD21 5XY"])
115115
"""
116116
Postal code of the event address
117117
"""

pins_data_model/models/model_appeal_event_estimate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: appeal-event-estimate.schema.json
3-
# timestamp: 2025-05-08T14:17:31+00:00
3+
# timestamp: 2025-06-03T09:08:45+00:00
44

55
from __future__ import annotations
66

pins_data_model/models/model_appeal_has.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: appeal-has.schema.json
3-
# timestamp: 2025-05-08T14:17:31+00:00
3+
# timestamp: 2025-06-03T09:08:45+00:00
44

55
from __future__ import annotations
66

pins_data_model/models/model_appeal_representation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: appeal-representation.schema.json
3-
# timestamp: 2025-05-08T14:17:31+00:00
3+
# timestamp: 2025-06-03T09:08:45+00:00
44

55
from __future__ import annotations
66

0 commit comments

Comments
 (0)