@planning-inspectorate/data-model 1.11.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/.azure/ci.yml +60 -0
- package/.azure/release.yml +57 -0
- package/.github/dependabot.yml +11 -0
- package/.husky/install.mjs +7 -0
- package/.husky/pre-commit +1 -0
- package/.prettierignore +11 -0
- package/.prettierrc +19 -0
- package/LICENSE +21 -0
- package/README.md +237 -0
- package/commitlint.config.js +8 -0
- package/docs/README.md +85 -0
- package/docs/appeal-document.md +776 -0
- package/docs/appeal-event-estimate.md +108 -0
- package/docs/appeal-event.md +404 -0
- package/docs/appeal-has.md +1960 -0
- package/docs/appeal-representation.md +375 -0
- package/docs/appeal-s78.md +3607 -0
- package/docs/appeal.md +1879 -0
- package/docs/case-schedule.md +8 -0
- package/docs/dart-response.md +1413 -0
- package/docs/employee.md +70 -0
- package/docs/entraid.md +108 -0
- package/docs/folder.md +147 -0
- package/docs/gettimesheets-response.md +188 -0
- package/docs/interested-party.md +284 -0
- package/docs/listed-building.md +113 -0
- package/docs/listed-buildings.md +113 -0
- package/docs/nsip-document.md +966 -0
- package/docs/nsip-exam-timetable-defs-event.md +223 -0
- package/docs/nsip-exam-timetable-defs-line-item.md +51 -0
- package/docs/nsip-exam-timetable-defs.md +3 -0
- package/docs/nsip-exam-timetable-submission.md +113 -0
- package/docs/nsip-exam-timetable.md +352 -0
- package/docs/nsip-project-update.md +163 -0
- package/docs/nsip-project.md +2098 -0
- package/docs/nsip-representation-defs-attachment.md +133 -0
- package/docs/nsip-representation-defs.md +3 -0
- package/docs/nsip-representation.md +448 -0
- package/docs/nsip-subscription.md +193 -0
- package/docs/pins-inspector.md +184 -0
- package/docs/pins-lpa.md +260 -0
- package/docs/s51-advice.md +460 -0
- package/docs/service-user.md +575 -0
- package/eslint.config.js +21 -0
- package/jsconfig.json +12 -0
- package/package.json +55 -0
- package/pins_data_model/__init__.py +0 -0
- package/pins_data_model/gen_models.py +51 -0
- package/pins_data_model/load_schemas.py +51 -0
- package/pins_data_model/models/__init__.py +0 -0
- package/pins_data_model/models/model_appeal_document.py +294 -0
- package/pins_data_model/models/model_appeal_event.py +117 -0
- package/pins_data_model/models/model_appeal_event_estimate.py +37 -0
- package/pins_data_model/models/model_appeal_has.py +585 -0
- package/pins_data_model/models/model_appeal_representation.py +132 -0
- package/pins_data_model/models/model_appeal_s78.py +864 -0
- package/pins_data_model/models/model_case_schedule.py +11 -0
- package/pins_data_model/models/model_dart_response.py +292 -0
- package/pins_data_model/models/model_entraid.py +37 -0
- package/pins_data_model/models/model_folder.py +56 -0
- package/pins_data_model/models/model_gettimesheets_response.py +45 -0
- package/pins_data_model/models/model_listed_building.py +33 -0
- package/pins_data_model/models/model_listed_buildings.py +33 -0
- package/pins_data_model/models/model_nsip_document.py +199 -0
- package/pins_data_model/models/model_nsip_exam_timetable.py +90 -0
- package/pins_data_model/models/model_nsip_project.py +488 -0
- package/pins_data_model/models/model_nsip_project_update.py +60 -0
- package/pins_data_model/models/model_nsip_representation.py +83 -0
- package/pins_data_model/models/model_nsip_subscription.py +60 -0
- package/pins_data_model/models/model_pins_inspector.py +53 -0
- package/pins_data_model/models/model_pins_lpa.py +69 -0
- package/pins_data_model/models/model_s51_advice.py +109 -0
- package/pins_data_model/models/model_service_user.py +121 -0
- package/requirements.txt +2 -0
- package/schemas/__init__.py +0 -0
- package/schemas/appeal-document.schema.json +250 -0
- package/schemas/appeal-event-estimate.schema.json +31 -0
- package/schemas/appeal-event.schema.json +123 -0
- package/schemas/appeal-has.schema.json +576 -0
- package/schemas/appeal-representation.schema.json +131 -0
- package/schemas/appeal-s78.schema.json +1060 -0
- package/schemas/commands/__init__.py +0 -0
- package/schemas/commands/appeal-common-submission.schema.json +202 -0
- package/schemas/commands/appeal-has-submission.schema.json +82 -0
- package/schemas/commands/appeal-representation-submission.schema.json +192 -0
- package/schemas/commands/appeal-s78-submission.schema.json +100 -0
- package/schemas/commands/appellant-submission.schema.json +164 -0
- package/schemas/commands/interested-party.schema.json +80 -0
- package/schemas/commands/lpa-questionnaire-common.schema.json +110 -0
- package/schemas/commands/lpa-questionnaire-has.schema.json +69 -0
- package/schemas/commands/lpa-questionnaire-s78.schema.json +218 -0
- package/schemas/commands/lpa-questionnaire.schema.json +125 -0
- package/schemas/commands/new-deadline-submission.schema.json +59 -0
- package/schemas/commands/nsip-exam-timetable-submission.schema.json +27 -0
- package/schemas/commands/register-nsip-subscription.schema.json +32 -0
- package/schemas/commands/register-representation.schema.json +51 -0
- package/schemas/dart-response.schema.json +350 -0
- package/schemas/entraid.schema.json +31 -0
- package/schemas/folder.schema.json +49 -0
- package/schemas/gettimesheets-response.schema.json +46 -0
- package/schemas/listed-building.schema.json +31 -0
- package/schemas/listed-buildings.schema.json +31 -0
- package/schemas/nsip-document.schema.json +235 -0
- package/schemas/nsip-exam-timetable.schema.json +101 -0
- package/schemas/nsip-project-update.schema.json +49 -0
- package/schemas/nsip-project.schema.json +539 -0
- package/schemas/nsip-representation.schema.json +110 -0
- package/schemas/nsip-subscription.schema.json +52 -0
- package/schemas/pins-inspector.schema.json +47 -0
- package/schemas/pins-lpa.schema.json +63 -0
- package/schemas/s51-advice.schema.json +113 -0
- package/schemas/service-user.schema.json +152 -0
- package/setup.py +15 -0
- package/src/enums.cjs +632 -0
- package/src/enums.d.ts +573 -0
- package/src/enums.js +573 -0
- package/src/gen-docs.js +34 -0
- package/src/gen-enums.js +119 -0
- package/src/gen-types.js +70 -0
- package/src/index.cjs +746 -0
- package/src/index.d.ts +18 -0
- package/src/index.js +34 -0
- package/src/lib/load.js +78 -0
- package/src/schemas.d.ts +4570 -0
- package/tests/appeals/appeal-event.test.js +62 -0
- package/tests/appeals/commands/appeal-representation-submission.test.js +107 -0
- package/tests/appeals/commands/has-questionnaire.test.js +92 -0
- package/tests/appeals/commands/has-submission.test.js +113 -0
- package/tests/appeals/commands/s78-questionnaire.test.js +96 -0
- package/tests/appeals/commands/s78-submission.test.js +119 -0
- package/tests/schemas.test.js +97 -0
|
@@ -0,0 +1,585 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: appeal-has.schema.json
|
|
3
|
+
# timestamp: 2025-07-16T14:06:09+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from enum import Enum
|
|
8
|
+
from uuid import UUID
|
|
9
|
+
|
|
10
|
+
from pydantic import AwareDatetime, BaseModel, ConfigDict, Field, RootModel
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class CaseStatus(Enum):
|
|
14
|
+
"""
|
|
15
|
+
The processing status for the appeal
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
assign_case_officer = "assign_case_officer"
|
|
19
|
+
validation = "validation"
|
|
20
|
+
ready_to_start = "ready_to_start"
|
|
21
|
+
lpa_questionnaire = "lpa_questionnaire"
|
|
22
|
+
issue_determination = "issue_determination"
|
|
23
|
+
complete = "complete"
|
|
24
|
+
invalid = "invalid"
|
|
25
|
+
closed = "closed"
|
|
26
|
+
withdrawn = "withdrawn"
|
|
27
|
+
awaiting_transfer = "awaiting_transfer"
|
|
28
|
+
transferred = "transferred"
|
|
29
|
+
event = "event"
|
|
30
|
+
awaiting_event = "awaiting_event"
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class CaseType(Enum):
|
|
34
|
+
"""
|
|
35
|
+
The internal code for an appeal type, e.g. D (Householder)
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
C = "C"
|
|
39
|
+
D = "D"
|
|
40
|
+
F = "F"
|
|
41
|
+
G = "G"
|
|
42
|
+
H = "H"
|
|
43
|
+
L = "L"
|
|
44
|
+
Q = "Q"
|
|
45
|
+
S = "S"
|
|
46
|
+
V = "V"
|
|
47
|
+
W = "W"
|
|
48
|
+
X = "X"
|
|
49
|
+
Y = "Y"
|
|
50
|
+
Z = "Z"
|
|
51
|
+
ZA = "ZA"
|
|
52
|
+
ZP = "ZP"
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class CaseProcedure(Enum):
|
|
56
|
+
"""
|
|
57
|
+
The type of procedure for the appeal
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
written = "written"
|
|
61
|
+
hearing = "hearing"
|
|
62
|
+
inquiry = "inquiry"
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
class AllocationLevel(Enum):
|
|
66
|
+
"""
|
|
67
|
+
A level used for allocation purposes
|
|
68
|
+
"""
|
|
69
|
+
|
|
70
|
+
A = "A"
|
|
71
|
+
B = "B"
|
|
72
|
+
C = "C"
|
|
73
|
+
D = "D"
|
|
74
|
+
E = "E"
|
|
75
|
+
F = "F"
|
|
76
|
+
G = "G"
|
|
77
|
+
H = "H"
|
|
78
|
+
NoneType_None = None
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class AllocationBand(Enum):
|
|
82
|
+
"""
|
|
83
|
+
A band used for allocation purposes
|
|
84
|
+
"""
|
|
85
|
+
|
|
86
|
+
int_1 = 1
|
|
87
|
+
int_2 = 2
|
|
88
|
+
int_3 = 3
|
|
89
|
+
NoneType_None = None
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
class CaseValidationOutcome(Enum):
|
|
93
|
+
"""
|
|
94
|
+
The outcome of the validation action
|
|
95
|
+
"""
|
|
96
|
+
|
|
97
|
+
valid = "valid"
|
|
98
|
+
invalid = "invalid"
|
|
99
|
+
incomplete = "incomplete"
|
|
100
|
+
NoneType_None = None
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
class LinkedCaseStatus(Enum):
|
|
104
|
+
"""
|
|
105
|
+
Indicates if the case is linked, and the type of relationship
|
|
106
|
+
"""
|
|
107
|
+
|
|
108
|
+
lead = "lead"
|
|
109
|
+
child = "child"
|
|
110
|
+
NoneType_None = None
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
class LpaQuestionnaireValidationOutcome(Enum):
|
|
114
|
+
"""
|
|
115
|
+
The outcome of the validation action
|
|
116
|
+
"""
|
|
117
|
+
|
|
118
|
+
complete = "complete"
|
|
119
|
+
incomplete = "incomplete"
|
|
120
|
+
NoneType_None = None
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
class CaseDecisionOutcome(Enum):
|
|
124
|
+
"""
|
|
125
|
+
The final outcome for the decision
|
|
126
|
+
"""
|
|
127
|
+
|
|
128
|
+
allowed = "allowed"
|
|
129
|
+
split_decision = "split_decision"
|
|
130
|
+
dismissed = "dismissed"
|
|
131
|
+
invalid = "invalid"
|
|
132
|
+
NoneType_None = None
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
class ApplicationDecision(Enum):
|
|
136
|
+
"""
|
|
137
|
+
The outcome of the original LPA decision
|
|
138
|
+
"""
|
|
139
|
+
|
|
140
|
+
granted = "granted"
|
|
141
|
+
refused = "refused"
|
|
142
|
+
not_received = "not_received"
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
class KnowsOtherOwners(Enum):
|
|
146
|
+
"""
|
|
147
|
+
Indicates if the appellant knows other owners of the site
|
|
148
|
+
"""
|
|
149
|
+
|
|
150
|
+
Yes = "Yes"
|
|
151
|
+
No = "No"
|
|
152
|
+
Some = "Some"
|
|
153
|
+
NoneType_None = None
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
class KnowsAllOwners(Enum):
|
|
157
|
+
"""
|
|
158
|
+
Indicates if the appellant knows all owners of the site
|
|
159
|
+
"""
|
|
160
|
+
|
|
161
|
+
Yes = "Yes"
|
|
162
|
+
No = "No"
|
|
163
|
+
Some = "Some"
|
|
164
|
+
NoneType_None = None
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
class NotificationMethodEnumEnumEnum(Enum):
|
|
168
|
+
notice = "notice"
|
|
169
|
+
letter = "letter"
|
|
170
|
+
advert = "advert"
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
class NotificationMethodEnum(RootModel[NotificationMethodEnumEnumEnum | None]):
|
|
174
|
+
root: NotificationMethodEnumEnumEnum | None = None
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
class NeighbouringSiteAddress(BaseModel):
|
|
178
|
+
model_config = ConfigDict(
|
|
179
|
+
extra="allow",
|
|
180
|
+
)
|
|
181
|
+
neighbouringSiteAddressLine1: str = Field(..., examples=["96 The Avenue"])
|
|
182
|
+
"""
|
|
183
|
+
First line of address of the site
|
|
184
|
+
"""
|
|
185
|
+
neighbouringSiteAddressLine2: str | None = None
|
|
186
|
+
"""
|
|
187
|
+
Second line of address of the site
|
|
188
|
+
"""
|
|
189
|
+
neighbouringSiteAddressTown: str = Field(..., examples=["Maidstone"])
|
|
190
|
+
"""
|
|
191
|
+
Town / City of the site address
|
|
192
|
+
"""
|
|
193
|
+
neighbouringSiteAddressCounty: str | None = Field(..., examples=["Kent"])
|
|
194
|
+
"""
|
|
195
|
+
County of the site address
|
|
196
|
+
"""
|
|
197
|
+
neighbouringSiteAddressPostcode: str = Field(..., examples=["MD21 5XY"])
|
|
198
|
+
"""
|
|
199
|
+
Postal code of the site address
|
|
200
|
+
"""
|
|
201
|
+
neighbouringSiteAccessDetails: str | None = Field(
|
|
202
|
+
..., examples=["Ongoing road works at this address"]
|
|
203
|
+
)
|
|
204
|
+
"""
|
|
205
|
+
Provided information on site accessibility on this address
|
|
206
|
+
"""
|
|
207
|
+
neighbouringSiteSafetyDetails: str | None = Field(
|
|
208
|
+
..., examples=["Ongoing road works at this address"]
|
|
209
|
+
)
|
|
210
|
+
"""
|
|
211
|
+
Provided information on site health and safety on this address
|
|
212
|
+
"""
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
class TypeOfPlanningApplication(Enum):
|
|
216
|
+
full_appeal = "full-appeal"
|
|
217
|
+
householder_planning = "householder-planning"
|
|
218
|
+
outline_planning = "outline-planning"
|
|
219
|
+
prior_approval = "prior-approval"
|
|
220
|
+
reserved_matters = "reserved-matters"
|
|
221
|
+
removal_or_variation_of_conditions = "removal-or-variation-of-conditions"
|
|
222
|
+
listed_building = "listed-building"
|
|
223
|
+
minor_commercial_development = "minor-commercial-development"
|
|
224
|
+
NoneType_None = None
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
class AppealHasCase(BaseModel):
|
|
228
|
+
"""
|
|
229
|
+
Schema defining the metadata for an appeal
|
|
230
|
+
"""
|
|
231
|
+
|
|
232
|
+
model_config = ConfigDict(
|
|
233
|
+
extra="allow",
|
|
234
|
+
)
|
|
235
|
+
caseId: int | None = Field(..., examples=[1200])
|
|
236
|
+
"""
|
|
237
|
+
Internal case identifier
|
|
238
|
+
"""
|
|
239
|
+
caseReference: str = Field(..., examples=["7002471"])
|
|
240
|
+
"""
|
|
241
|
+
External case identifier
|
|
242
|
+
"""
|
|
243
|
+
submissionId: UUID | None = Field(
|
|
244
|
+
None, examples=["7f45748c-2342-4b59-b934-ad6183e8d834"]
|
|
245
|
+
)
|
|
246
|
+
"""
|
|
247
|
+
Case submission id - link to draft submission created by appellant
|
|
248
|
+
"""
|
|
249
|
+
caseStatus: CaseStatus
|
|
250
|
+
"""
|
|
251
|
+
The processing status for the appeal
|
|
252
|
+
"""
|
|
253
|
+
caseType: CaseType
|
|
254
|
+
"""
|
|
255
|
+
The internal code for an appeal type, e.g. D (Householder)
|
|
256
|
+
"""
|
|
257
|
+
caseProcedure: CaseProcedure
|
|
258
|
+
"""
|
|
259
|
+
The type of procedure for the appeal
|
|
260
|
+
"""
|
|
261
|
+
lpaCode: str = Field(..., examples=["Q9999"])
|
|
262
|
+
"""
|
|
263
|
+
A unique identifier for the Local Planning Authority
|
|
264
|
+
"""
|
|
265
|
+
caseOfficerId: str | None = None
|
|
266
|
+
"""
|
|
267
|
+
Unique identifier for the case officer assigned to the case
|
|
268
|
+
"""
|
|
269
|
+
inspectorId: str | None = None
|
|
270
|
+
"""
|
|
271
|
+
Unique identifier for the inspector assigned to the case
|
|
272
|
+
"""
|
|
273
|
+
allocationLevel: AllocationLevel
|
|
274
|
+
"""
|
|
275
|
+
A level used for allocation purposes
|
|
276
|
+
"""
|
|
277
|
+
allocationBand: AllocationBand
|
|
278
|
+
"""
|
|
279
|
+
A band used for allocation purposes
|
|
280
|
+
"""
|
|
281
|
+
caseSpecialisms: list[str] = Field(
|
|
282
|
+
...,
|
|
283
|
+
examples=[
|
|
284
|
+
"Access",
|
|
285
|
+
"Listed building and enforcement",
|
|
286
|
+
"Roads and traffics",
|
|
287
|
+
"Natural heritage",
|
|
288
|
+
"Schedule 1",
|
|
289
|
+
],
|
|
290
|
+
)
|
|
291
|
+
"""
|
|
292
|
+
A list of specialisms for allocation purposes
|
|
293
|
+
"""
|
|
294
|
+
caseSubmittedDate: AwareDatetime = Field(..., examples=["2023-07-27T20:30:00.000Z"])
|
|
295
|
+
"""
|
|
296
|
+
The date the appeal was submitted by the appellant
|
|
297
|
+
"""
|
|
298
|
+
caseCreatedDate: AwareDatetime = Field(..., examples=["2023-07-27T20:30:00.000Z"])
|
|
299
|
+
"""
|
|
300
|
+
The date the appeal was received
|
|
301
|
+
"""
|
|
302
|
+
caseUpdatedDate: AwareDatetime = Field(..., examples=["2023-07-27T20:30:00.000Z"])
|
|
303
|
+
"""
|
|
304
|
+
The date the appeal was last updated in the back-office
|
|
305
|
+
"""
|
|
306
|
+
caseValidDate: AwareDatetime | None = Field(
|
|
307
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
308
|
+
)
|
|
309
|
+
"""
|
|
310
|
+
The date since when the appeal was considered valid
|
|
311
|
+
"""
|
|
312
|
+
caseValidationDate: AwareDatetime | None = Field(
|
|
313
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
314
|
+
)
|
|
315
|
+
"""
|
|
316
|
+
The date the appeal was validated in the back-office
|
|
317
|
+
"""
|
|
318
|
+
caseValidationOutcome: CaseValidationOutcome
|
|
319
|
+
"""
|
|
320
|
+
The outcome of the validation action
|
|
321
|
+
"""
|
|
322
|
+
caseValidationInvalidDetails: list[str]
|
|
323
|
+
"""
|
|
324
|
+
A list of reasons why the appeal is invalid
|
|
325
|
+
"""
|
|
326
|
+
caseValidationIncompleteDetails: list[str]
|
|
327
|
+
"""
|
|
328
|
+
A list of reasons why the appeal is incomplete
|
|
329
|
+
"""
|
|
330
|
+
caseExtensionDate: AwareDatetime | None = Field(
|
|
331
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
332
|
+
)
|
|
333
|
+
"""
|
|
334
|
+
When the validation outcome is incomplete, an extension may be granted to provide missing information
|
|
335
|
+
"""
|
|
336
|
+
caseStartedDate: AwareDatetime | None = Field(
|
|
337
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
338
|
+
)
|
|
339
|
+
"""
|
|
340
|
+
A date indicating when the case was started, resulting in the creation of a timetable
|
|
341
|
+
"""
|
|
342
|
+
casePublishedDate: AwareDatetime | None = Field(
|
|
343
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
344
|
+
)
|
|
345
|
+
"""
|
|
346
|
+
A date indicating when the case was published
|
|
347
|
+
"""
|
|
348
|
+
linkedCaseStatus: LinkedCaseStatus
|
|
349
|
+
"""
|
|
350
|
+
Indicates if the case is linked, and the type of relationship
|
|
351
|
+
"""
|
|
352
|
+
leadCaseReference: str | None = Field(..., examples=["7002471"])
|
|
353
|
+
"""
|
|
354
|
+
The reference of the lead case, if the case is a child case
|
|
355
|
+
"""
|
|
356
|
+
lpaQuestionnaireDueDate: AwareDatetime | None = Field(
|
|
357
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
358
|
+
)
|
|
359
|
+
"""
|
|
360
|
+
If the case is started and has a timetable, a deadline for the LPA to provide a response
|
|
361
|
+
"""
|
|
362
|
+
lpaQuestionnaireSubmittedDate: AwareDatetime | None = Field(
|
|
363
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
364
|
+
)
|
|
365
|
+
"""
|
|
366
|
+
The date the LPA provided a response to the case
|
|
367
|
+
"""
|
|
368
|
+
lpaQuestionnaireCreatedDate: AwareDatetime | None = Field(
|
|
369
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
370
|
+
)
|
|
371
|
+
"""
|
|
372
|
+
The date the LPA response was receeived
|
|
373
|
+
"""
|
|
374
|
+
lpaQuestionnairePublishedDate: AwareDatetime | None = Field(
|
|
375
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
376
|
+
)
|
|
377
|
+
"""
|
|
378
|
+
The date indicating when the questionnaire review was completed and the questionnaire published
|
|
379
|
+
"""
|
|
380
|
+
lpaQuestionnaireValidationOutcome: LpaQuestionnaireValidationOutcome
|
|
381
|
+
"""
|
|
382
|
+
The outcome of the validation action
|
|
383
|
+
"""
|
|
384
|
+
lpaQuestionnaireValidationOutcomeDate: AwareDatetime | None = Field(
|
|
385
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
386
|
+
)
|
|
387
|
+
"""
|
|
388
|
+
The date the LPA response was validated
|
|
389
|
+
"""
|
|
390
|
+
lpaQuestionnaireValidationDetails: list[str]
|
|
391
|
+
"""
|
|
392
|
+
A list of reasons why the questionnaire is incomplete
|
|
393
|
+
"""
|
|
394
|
+
lpaStatement: str | None = Field(
|
|
395
|
+
..., examples=["We refused the application because of ..."]
|
|
396
|
+
)
|
|
397
|
+
"""
|
|
398
|
+
A statement provided by the LPA
|
|
399
|
+
"""
|
|
400
|
+
caseWithdrawnDate: AwareDatetime | None = Field(
|
|
401
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
402
|
+
)
|
|
403
|
+
"""
|
|
404
|
+
The date the appeal was withdrawn by the appellant
|
|
405
|
+
"""
|
|
406
|
+
caseTransferredDate: AwareDatetime | None = Field(
|
|
407
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
408
|
+
)
|
|
409
|
+
"""
|
|
410
|
+
The date the appeal was transferred to a new case of a different type
|
|
411
|
+
"""
|
|
412
|
+
transferredCaseClosedDate: AwareDatetime | None = Field(
|
|
413
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
414
|
+
)
|
|
415
|
+
"""
|
|
416
|
+
The date the appeal was closed and the appellant requested to resubmit
|
|
417
|
+
"""
|
|
418
|
+
caseDecisionOutcomeDate: AwareDatetime | None = Field(
|
|
419
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
420
|
+
)
|
|
421
|
+
"""
|
|
422
|
+
The date of the appeal decision
|
|
423
|
+
"""
|
|
424
|
+
caseDecisionPublishedDate: AwareDatetime | None = Field(
|
|
425
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
426
|
+
)
|
|
427
|
+
"""
|
|
428
|
+
The date the appeal decision was published
|
|
429
|
+
"""
|
|
430
|
+
caseDecisionOutcome: CaseDecisionOutcome
|
|
431
|
+
"""
|
|
432
|
+
The final outcome for the decision
|
|
433
|
+
"""
|
|
434
|
+
caseCompletedDate: AwareDatetime | None = Field(
|
|
435
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
436
|
+
)
|
|
437
|
+
"""
|
|
438
|
+
The date the appeal decision letter
|
|
439
|
+
"""
|
|
440
|
+
enforcementNotice: bool | None = None
|
|
441
|
+
"""
|
|
442
|
+
Indicates if an enforcement notice is the reason for the appeal
|
|
443
|
+
"""
|
|
444
|
+
applicationReference: str = Field(..., examples=["43010/APP/1/290572"])
|
|
445
|
+
"""
|
|
446
|
+
The unique identifier of the LPA application
|
|
447
|
+
"""
|
|
448
|
+
applicationDate: AwareDatetime = Field(..., examples=["2023-07-27T20:30:00.000Z"])
|
|
449
|
+
"""
|
|
450
|
+
The date of the original LPA application
|
|
451
|
+
"""
|
|
452
|
+
applicationDecision: ApplicationDecision
|
|
453
|
+
"""
|
|
454
|
+
The outcome of the original LPA decision
|
|
455
|
+
"""
|
|
456
|
+
applicationDecisionDate: AwareDatetime | None = Field(
|
|
457
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
458
|
+
)
|
|
459
|
+
"""
|
|
460
|
+
The date of the original LPA decision
|
|
461
|
+
"""
|
|
462
|
+
caseSubmissionDueDate: AwareDatetime | None = Field(
|
|
463
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
464
|
+
)
|
|
465
|
+
"""
|
|
466
|
+
The statutory deadline for submitting an appeal from the original LPA decision date
|
|
467
|
+
"""
|
|
468
|
+
siteAddressLine1: str = Field(..., examples=["96 The Avenue"])
|
|
469
|
+
"""
|
|
470
|
+
First line of address for the appeal site
|
|
471
|
+
"""
|
|
472
|
+
siteAddressLine2: str | None = None
|
|
473
|
+
"""
|
|
474
|
+
Second line of address for the appeal site
|
|
475
|
+
"""
|
|
476
|
+
siteAddressTown: str = Field(..., examples=["Maidstone"])
|
|
477
|
+
"""
|
|
478
|
+
Town / City of the site address
|
|
479
|
+
"""
|
|
480
|
+
siteAddressCounty: str | None = Field(..., examples=["Kent"])
|
|
481
|
+
"""
|
|
482
|
+
County of the site address
|
|
483
|
+
"""
|
|
484
|
+
siteAddressPostcode: str = Field(..., examples=["MD21 5XY"])
|
|
485
|
+
"""
|
|
486
|
+
Postal code of the site address
|
|
487
|
+
"""
|
|
488
|
+
siteAccessDetails: list[str]
|
|
489
|
+
"""
|
|
490
|
+
Provided information on site accessibility
|
|
491
|
+
"""
|
|
492
|
+
siteSafetyDetails: list[str]
|
|
493
|
+
"""
|
|
494
|
+
Provided information on site health and safety
|
|
495
|
+
"""
|
|
496
|
+
siteAreaSquareMetres: float | None = Field(..., examples=[45.7])
|
|
497
|
+
"""
|
|
498
|
+
The site area, in square meters
|
|
499
|
+
"""
|
|
500
|
+
floorSpaceSquareMetres: float | None = Field(..., examples=[3.5])
|
|
501
|
+
"""
|
|
502
|
+
The floor space, in square meters
|
|
503
|
+
"""
|
|
504
|
+
isCorrectAppealType: bool | None = None
|
|
505
|
+
"""
|
|
506
|
+
Indicates if the LPA considers the appeal type appropriate
|
|
507
|
+
"""
|
|
508
|
+
isGreenBelt: bool | None = None
|
|
509
|
+
"""
|
|
510
|
+
Indicates if the site is in a green belt
|
|
511
|
+
"""
|
|
512
|
+
inConservationArea: bool | None = None
|
|
513
|
+
"""
|
|
514
|
+
Indicates if the site is in a conservation area
|
|
515
|
+
"""
|
|
516
|
+
ownsAllLand: bool | None = None
|
|
517
|
+
"""
|
|
518
|
+
Indicates if the appellant has complete ownership of the site
|
|
519
|
+
"""
|
|
520
|
+
ownsSomeLand: bool | None = None
|
|
521
|
+
"""
|
|
522
|
+
Indicates if the appellant has partial ownership of the site
|
|
523
|
+
"""
|
|
524
|
+
knowsOtherOwners: KnowsOtherOwners
|
|
525
|
+
"""
|
|
526
|
+
Indicates if the appellant knows other owners of the site
|
|
527
|
+
"""
|
|
528
|
+
knowsAllOwners: KnowsAllOwners
|
|
529
|
+
"""
|
|
530
|
+
Indicates if the appellant knows all owners of the site
|
|
531
|
+
"""
|
|
532
|
+
advertisedAppeal: bool | None = None
|
|
533
|
+
"""
|
|
534
|
+
Indicates if the appellant has advertised the appeal to the LPA decision
|
|
535
|
+
"""
|
|
536
|
+
notificationMethod: list[NotificationMethodEnum]
|
|
537
|
+
"""
|
|
538
|
+
The methods used to notify relevant parties
|
|
539
|
+
"""
|
|
540
|
+
ownersInformed: bool | None = None
|
|
541
|
+
"""
|
|
542
|
+
Indicates if the appellant has informed other owners of the site
|
|
543
|
+
"""
|
|
544
|
+
originalDevelopmentDescription: str | None = Field(
|
|
545
|
+
..., examples=["Replacement of an existing gate to access the property"]
|
|
546
|
+
)
|
|
547
|
+
"""
|
|
548
|
+
The original description of the development, as provided by the appellant
|
|
549
|
+
"""
|
|
550
|
+
changedDevelopmentDescription: bool | None = None
|
|
551
|
+
"""
|
|
552
|
+
Indicates that the LPA has changed the development description
|
|
553
|
+
"""
|
|
554
|
+
newConditionDetails: str | None = Field(
|
|
555
|
+
...,
|
|
556
|
+
examples=["Since the original application, a number of things have changed..."],
|
|
557
|
+
)
|
|
558
|
+
"""
|
|
559
|
+
New conditions details provided by the LPA
|
|
560
|
+
"""
|
|
561
|
+
nearbyCaseReferences: list[str]
|
|
562
|
+
"""
|
|
563
|
+
A list of related case references known to the appellant and the LPA
|
|
564
|
+
"""
|
|
565
|
+
neighbouringSiteAddresses: list[NeighbouringSiteAddress]
|
|
566
|
+
"""
|
|
567
|
+
A list of neighbouring site addresses
|
|
568
|
+
"""
|
|
569
|
+
reasonForNeighbourVisits: str | None = None
|
|
570
|
+
"""
|
|
571
|
+
A general reason given for the need to visit any neighbours
|
|
572
|
+
"""
|
|
573
|
+
affectedListedBuildingNumbers: list[str]
|
|
574
|
+
"""
|
|
575
|
+
A list of affected listed building IDs from Historic England
|
|
576
|
+
"""
|
|
577
|
+
appellantCostsAppliedFor: bool | None = None
|
|
578
|
+
"""
|
|
579
|
+
Indicates if the appellant has applied for costs
|
|
580
|
+
"""
|
|
581
|
+
lpaCostsAppliedFor: bool | None = None
|
|
582
|
+
"""
|
|
583
|
+
Indicates if the appellant has applied for costs
|
|
584
|
+
"""
|
|
585
|
+
typeOfPlanningApplication: TypeOfPlanningApplication | None = None
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: appeal-representation.schema.json
|
|
3
|
+
# timestamp: 2025-07-16T14:06:09+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from enum import Enum
|
|
8
|
+
|
|
9
|
+
from pydantic import AwareDatetime, BaseModel, ConfigDict, Field, RootModel
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class RepresentationStatus(Enum):
|
|
13
|
+
"""
|
|
14
|
+
Status of the representation
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
awaiting_review = "awaiting_review"
|
|
18
|
+
referred = "referred"
|
|
19
|
+
valid = "valid"
|
|
20
|
+
invalid = "invalid"
|
|
21
|
+
invalid_incomplete = "invalid_incomplete"
|
|
22
|
+
published = "published"
|
|
23
|
+
archived = "archived"
|
|
24
|
+
draft = "draft"
|
|
25
|
+
withdrawn = "withdrawn"
|
|
26
|
+
NoneType_None = None
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class InvalidOrIncompleteDetailEnumEnum(Enum):
|
|
30
|
+
Received_after_deadline = "Received after deadline"
|
|
31
|
+
Includes_personal_or_medical_information = (
|
|
32
|
+
"Includes personal or medical information"
|
|
33
|
+
)
|
|
34
|
+
Includes_inflammatory_content = "Includes inflammatory content"
|
|
35
|
+
Duplicated_or_repeated_comment = "Duplicated or repeated comment"
|
|
36
|
+
Not_relevant_to_this_appeal = "Not relevant to this appeal"
|
|
37
|
+
Contains_links_to_web_pages = "Contains links to web pages"
|
|
38
|
+
No_list_of_suggested_conditions = "No list of suggested conditions"
|
|
39
|
+
other_reason = "other_reason"
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class InvalidOrIncompleteDetail(RootModel[InvalidOrIncompleteDetailEnumEnum | None]):
|
|
43
|
+
root: InvalidOrIncompleteDetailEnumEnum | None = None
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class Source(Enum):
|
|
47
|
+
"""
|
|
48
|
+
Source of the representation (citizen or LPA)
|
|
49
|
+
"""
|
|
50
|
+
|
|
51
|
+
lpa = "lpa"
|
|
52
|
+
citizen = "citizen"
|
|
53
|
+
NoneType_None = None
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class RepresentationType(Enum):
|
|
57
|
+
"""
|
|
58
|
+
The type of representation
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
statement = "statement"
|
|
62
|
+
comment = "comment"
|
|
63
|
+
final_comment = "final_comment"
|
|
64
|
+
proofs_evidence = "proofs_evidence"
|
|
65
|
+
NoneType_None = None
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class AppealRepresentation(BaseModel):
|
|
69
|
+
"""
|
|
70
|
+
Schema defining the metadata for appeal representations, such as statements, third-party comments and final comments
|
|
71
|
+
"""
|
|
72
|
+
|
|
73
|
+
model_config = ConfigDict(
|
|
74
|
+
extra="allow",
|
|
75
|
+
)
|
|
76
|
+
representationId: str = Field(..., examples=["7000000-1"])
|
|
77
|
+
"""
|
|
78
|
+
The unique identifier for the representation
|
|
79
|
+
"""
|
|
80
|
+
caseId: int | None = Field(..., examples=[1200])
|
|
81
|
+
"""
|
|
82
|
+
Internal case identifier
|
|
83
|
+
"""
|
|
84
|
+
caseReference: str = Field(..., examples=["7002471"])
|
|
85
|
+
"""
|
|
86
|
+
External case identifier
|
|
87
|
+
"""
|
|
88
|
+
representationStatus: RepresentationStatus
|
|
89
|
+
"""
|
|
90
|
+
Status of the representation
|
|
91
|
+
"""
|
|
92
|
+
originalRepresentation: str | None = None
|
|
93
|
+
"""
|
|
94
|
+
The original representation
|
|
95
|
+
"""
|
|
96
|
+
redacted: bool | None = None
|
|
97
|
+
"""
|
|
98
|
+
Indicates if the representation is redacted
|
|
99
|
+
"""
|
|
100
|
+
redactedRepresentation: str | None = None
|
|
101
|
+
"""
|
|
102
|
+
The redacted version of the representation
|
|
103
|
+
"""
|
|
104
|
+
redactedBy: str | None = None
|
|
105
|
+
"""
|
|
106
|
+
Unique identifier for the case team member that performed the redaction
|
|
107
|
+
"""
|
|
108
|
+
invalidOrIncompleteDetails: list[InvalidOrIncompleteDetail]
|
|
109
|
+
"""
|
|
110
|
+
A list of reasons why the representation has been marked as invalid or incomplete.
|
|
111
|
+
"""
|
|
112
|
+
otherInvalidOrIncompleteDetails: list[str]
|
|
113
|
+
"""
|
|
114
|
+
A list of free text reasons why the representation has been marked as invalid or incomplete
|
|
115
|
+
"""
|
|
116
|
+
source: Source
|
|
117
|
+
"""
|
|
118
|
+
Source of the representation (citizen or LPA)
|
|
119
|
+
"""
|
|
120
|
+
serviceUserId: str | None = None
|
|
121
|
+
"""
|
|
122
|
+
Service User Id of the person or organisation making the representation
|
|
123
|
+
"""
|
|
124
|
+
representationType: RepresentationType
|
|
125
|
+
"""
|
|
126
|
+
The type of representation
|
|
127
|
+
"""
|
|
128
|
+
dateReceived: AwareDatetime = Field(..., examples=["2023-07-27T20:30:00.000Z"])
|
|
129
|
+
documentIds: list[str]
|
|
130
|
+
"""
|
|
131
|
+
An array of documentIds
|
|
132
|
+
"""
|