@planning-inspectorate/data-model 2.29.0 → 2.31.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/docs/README.md +4 -0
- package/docs/appeal-document.md +96 -93
- package/docs/appeal-s78-definitions-significantchangesaffectingapplication.md +14 -0
- package/docs/appeal-s78-definitions.md +3 -0
- package/docs/appeal-s78-if.md +35 -0
- package/docs/appeal-s78-then.md +31 -0
- package/docs/appeal-s78.md +360 -197
- package/package.json +1 -1
- package/pins_data_model/models/model_appeal_document.py +4 -1
- package/pins_data_model/models/model_appeal_event.py +1 -1
- package/pins_data_model/models/model_appeal_event_estimate.py +1 -1
- package/pins_data_model/models/model_appeal_has.py +1 -1
- package/pins_data_model/models/model_appeal_representation.py +1 -1
- package/pins_data_model/models/model_appeal_s78.py +154 -74
- package/pins_data_model/models/model_dart_response.py +1 -1
- package/pins_data_model/models/model_entraid.py +1 -1
- package/pins_data_model/models/model_folder.py +1 -1
- package/pins_data_model/models/model_gettimesheets_response.py +1 -1
- package/pins_data_model/models/model_listed_building.py +1 -1
- package/pins_data_model/models/model_listed_buildings.py +1 -1
- package/pins_data_model/models/model_nsip_document.py +1 -1
- package/pins_data_model/models/model_nsip_exam_timetable.py +1 -1
- package/pins_data_model/models/model_nsip_invoice.py +1 -1
- package/pins_data_model/models/model_nsip_meeting.py +1 -1
- package/pins_data_model/models/model_nsip_project.py +1 -1
- package/pins_data_model/models/model_nsip_project_update.py +1 -1
- package/pins_data_model/models/model_nsip_representation.py +1 -1
- package/pins_data_model/models/model_nsip_subscription.py +1 -1
- package/pins_data_model/models/model_pins_inspector.py +1 -1
- package/pins_data_model/models/model_pins_lpa.py +1 -1
- package/pins_data_model/models/model_s51_advice.py +1 -1
- package/pins_data_model/models/model_service_user.py +1 -1
- package/schemas/appeal-document.schema.json +3 -0
- package/schemas/appeal-s78.schema.json +72 -7
- package/schemas/commands/appellant-submission.schema.json +2 -1
- package/src/enums.cjs +26 -0
- package/src/enums.d.ts +24 -0
- package/src/enums.js +24 -0
- package/src/index.cjs +26 -0
- package/src/schemas.d.ts +54 -8
- package/tests/appeals/appeal-s78.test.js +21 -1
- package/tests/appeals/expedited-appeals.test.js +238 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: appeal-document.schema.json
|
|
3
|
-
# timestamp: 2026-
|
|
3
|
+
# timestamp: 2026-04-13T16:15:35+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -149,6 +149,9 @@ class DocumentType(Enum):
|
|
|
149
149
|
groundISupporting = "groundISupporting"
|
|
150
150
|
groundJSupporting = "groundJSupporting"
|
|
151
151
|
groundKSupporting = "groundKSupporting"
|
|
152
|
+
discontinuanceNotice = "discontinuanceNotice"
|
|
153
|
+
otherSupportingInformationAppellant = "otherSupportingInformationAppellant"
|
|
154
|
+
eiaEnvironmentalStatementAppellant = "eiaEnvironmentalStatementAppellant"
|
|
152
155
|
NoneType_None = None
|
|
153
156
|
|
|
154
157
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: appeal-s78.schema.json
|
|
3
|
-
# timestamp: 2026-
|
|
3
|
+
# timestamp: 2026-04-13T16:15:34+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -65,6 +65,7 @@ class CaseProcedure(Enum):
|
|
|
65
65
|
hearing = "hearing"
|
|
66
66
|
inquiry = "inquiry"
|
|
67
67
|
writtenPart1 = "writtenPart1"
|
|
68
|
+
writtenPart2 = "writtenPart2"
|
|
68
69
|
NoneType_None = None
|
|
69
70
|
|
|
70
71
|
|
|
@@ -284,6 +285,7 @@ class TypeOfPlanningApplication(Enum):
|
|
|
284
285
|
minor_commercial_development = "minor-commercial-development"
|
|
285
286
|
advertisement = "advertisement"
|
|
286
287
|
lawful_development_certificate = "lawful-development-certificate"
|
|
288
|
+
discontinuance_notice = "discontinuance-notice"
|
|
287
289
|
NoneType_None = None
|
|
288
290
|
|
|
289
291
|
|
|
@@ -416,6 +418,101 @@ class AppealUnderActSection(Enum):
|
|
|
416
418
|
NoneType_None = None
|
|
417
419
|
|
|
418
420
|
|
|
421
|
+
class DiscontinuanceNoticeServedReason(Enum):
|
|
422
|
+
risk_of_injury_to_the_amenity_of_locality = (
|
|
423
|
+
"risk-of-injury-to-the-amenity-of-locality"
|
|
424
|
+
)
|
|
425
|
+
danger_to_members_of_the_public = "danger-to-members-of-the-public"
|
|
426
|
+
other = "other"
|
|
427
|
+
NoneType_None = None
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
class AdvertDetail1(BaseModel):
|
|
431
|
+
model_config = ConfigDict(
|
|
432
|
+
extra="allow",
|
|
433
|
+
)
|
|
434
|
+
advertType: AdvertType
|
|
435
|
+
isAdvertInPosition: bool | None = None
|
|
436
|
+
"""
|
|
437
|
+
Is the advertisement in position?
|
|
438
|
+
"""
|
|
439
|
+
isSiteOnHighwayLand: bool | None = None
|
|
440
|
+
"""
|
|
441
|
+
Is the site on highway land?
|
|
442
|
+
"""
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
class AppealGroundLetter2(Enum):
|
|
446
|
+
a = "a"
|
|
447
|
+
b = "b"
|
|
448
|
+
c = "c"
|
|
449
|
+
d = "d"
|
|
450
|
+
e = "e"
|
|
451
|
+
f = "f"
|
|
452
|
+
g = "g"
|
|
453
|
+
NoneType_None = None
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
class EnforcementAppealGroundsDetail1(BaseModel):
|
|
457
|
+
model_config = ConfigDict(
|
|
458
|
+
extra="allow",
|
|
459
|
+
)
|
|
460
|
+
appealGroundLetter: AppealGroundLetter2 | None = None
|
|
461
|
+
groundForAppealStartDate: AwareDatetime | None = Field(
|
|
462
|
+
None, examples=["2023-07-27T20:30:00.000Z"]
|
|
463
|
+
)
|
|
464
|
+
groundFacts: str | None = None
|
|
465
|
+
"""
|
|
466
|
+
Facts supporting the appeal ground
|
|
467
|
+
"""
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
class AppealGroundLetter3(Enum):
|
|
471
|
+
a = "a"
|
|
472
|
+
b = "b"
|
|
473
|
+
c = "c"
|
|
474
|
+
d = "d"
|
|
475
|
+
e = "e"
|
|
476
|
+
f = "f"
|
|
477
|
+
g = "g"
|
|
478
|
+
h = "h"
|
|
479
|
+
i = "i"
|
|
480
|
+
j = "j"
|
|
481
|
+
k = "k"
|
|
482
|
+
NoneType_None = None
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
class ApplicationElbAppealGroundsDetail1(BaseModel):
|
|
486
|
+
model_config = ConfigDict(
|
|
487
|
+
extra="allow",
|
|
488
|
+
)
|
|
489
|
+
appealGroundLetter: AppealGroundLetter3 | None = None
|
|
490
|
+
groundForAppealStartDate: AwareDatetime | None = Field(
|
|
491
|
+
None, examples=["2023-07-27T20:30:00.000Z"]
|
|
492
|
+
)
|
|
493
|
+
groundFacts: str | None = None
|
|
494
|
+
"""
|
|
495
|
+
Facts supporting the appeal ground
|
|
496
|
+
"""
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
class SignificantChangesAffectingApplication(Enum):
|
|
500
|
+
adopted_a_new_local_plan = "adopted-a-new-local-plan"
|
|
501
|
+
national_policy_change = "national-policy-change"
|
|
502
|
+
court_judgement = "court-judgement"
|
|
503
|
+
other = "other"
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
class SignificantChangesAffectingApplicationAppellantItem(BaseModel):
|
|
507
|
+
value: SignificantChangesAffectingApplication
|
|
508
|
+
comment: str | None = None
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
class SignificantChangesAffectingApplicationLpaItem(BaseModel):
|
|
512
|
+
value: SignificantChangesAffectingApplication
|
|
513
|
+
comment: str | None = None
|
|
514
|
+
|
|
515
|
+
|
|
419
516
|
class AppealS78Case1(BaseModel):
|
|
420
517
|
"""
|
|
421
518
|
Group B - Schema defining the metadata for an appeal
|
|
@@ -957,10 +1054,10 @@ class AppealS78Case1(BaseModel):
|
|
|
957
1054
|
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
958
1055
|
)
|
|
959
1056
|
finalCommentsDueDate: AwareDatetime | None = Field(
|
|
960
|
-
|
|
1057
|
+
None, examples=["2023-07-27T20:30:00.000Z"]
|
|
961
1058
|
)
|
|
962
1059
|
interestedPartyRepsDueDate: AwareDatetime | None = Field(
|
|
963
|
-
|
|
1060
|
+
None, examples=["2023-07-27T20:30:00.000Z"]
|
|
964
1061
|
)
|
|
965
1062
|
lpaCommentsSubmittedDate: AwareDatetime | None = Field(
|
|
966
1063
|
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
@@ -972,13 +1069,13 @@ class AppealS78Case1(BaseModel):
|
|
|
972
1069
|
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
973
1070
|
)
|
|
974
1071
|
proofsOfEvidenceDueDate: AwareDatetime | None = Field(
|
|
975
|
-
|
|
1072
|
+
None, examples=["2023-07-27T20:30:00.000Z"]
|
|
976
1073
|
)
|
|
977
1074
|
siteNoticesSentDate: AwareDatetime | None = Field(
|
|
978
1075
|
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
979
1076
|
)
|
|
980
1077
|
statementDueDate: AwareDatetime | None = Field(
|
|
981
|
-
|
|
1078
|
+
None, examples=["2023-07-27T20:30:00.000Z"]
|
|
982
1079
|
)
|
|
983
1080
|
caseManagementConferenceDate: AwareDatetime | None = Field(
|
|
984
1081
|
None, examples=["2023-07-27T20:30:00.000Z"]
|
|
@@ -1085,13 +1182,13 @@ class AppealS78Case1(BaseModel):
|
|
|
1085
1182
|
None, examples=["2023-07-27T20:30:00.000Z"]
|
|
1086
1183
|
)
|
|
1087
1184
|
"""
|
|
1088
|
-
The date on which an
|
|
1185
|
+
The date on which an Enforcement Notice or Discontinuance Notice was issued
|
|
1089
1186
|
"""
|
|
1090
1187
|
effectiveDateOfEnforcementNotice: AwareDatetime | None = Field(
|
|
1091
1188
|
None, examples=["2023-07-27T20:30:00.000Z"]
|
|
1092
1189
|
)
|
|
1093
1190
|
"""
|
|
1094
|
-
The effective date of an
|
|
1191
|
+
The effective date of an Enforcement Notice or Discontinuance Notice
|
|
1095
1192
|
"""
|
|
1096
1193
|
didAppellantAppealLpaDecision: bool | None = None
|
|
1097
1194
|
"""
|
|
@@ -1147,74 +1244,31 @@ class AppealS78Case1(BaseModel):
|
|
|
1147
1244
|
"""
|
|
1148
1245
|
Reason(s) why LPA consider the appeal invalid
|
|
1149
1246
|
"""
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
class AdvertDetail1(BaseModel):
|
|
1153
|
-
model_config = ConfigDict(
|
|
1154
|
-
extra="allow",
|
|
1155
|
-
)
|
|
1156
|
-
advertType: AdvertType
|
|
1157
|
-
isAdvertInPosition: bool | None = None
|
|
1247
|
+
discontinuanceNoticeServedReason: DiscontinuanceNoticeServedReason | None = None
|
|
1248
|
+
discontinuanceNoticeServedOtherReason: str | None = None
|
|
1158
1249
|
"""
|
|
1159
|
-
|
|
1250
|
+
Other reason for serving a discontinuance notice, for discontinuanceNoticeServedReason: other
|
|
1160
1251
|
"""
|
|
1161
|
-
|
|
1252
|
+
wasRetrospectivePlanningApplicationMade: bool | None = None
|
|
1253
|
+
reasonForAppealAppellant: constr(max_length=250) | None = None
|
|
1162
1254
|
"""
|
|
1163
|
-
|
|
1255
|
+
Reason for appeal as provided by the appellant (Expedited Appeals)
|
|
1164
1256
|
"""
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
class AppealGroundLetter2(Enum):
|
|
1168
|
-
a = "a"
|
|
1169
|
-
b = "b"
|
|
1170
|
-
c = "c"
|
|
1171
|
-
d = "d"
|
|
1172
|
-
e = "e"
|
|
1173
|
-
f = "f"
|
|
1174
|
-
g = "g"
|
|
1175
|
-
NoneType_None = None
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
class EnforcementAppealGroundsDetail1(BaseModel):
|
|
1179
|
-
model_config = ConfigDict(
|
|
1180
|
-
extra="allow",
|
|
1181
|
-
)
|
|
1182
|
-
appealGroundLetter: AppealGroundLetter2 | None = None
|
|
1183
|
-
groundForAppealStartDate: AwareDatetime | None = Field(
|
|
1184
|
-
None, examples=["2023-07-27T20:30:00.000Z"]
|
|
1185
|
-
)
|
|
1186
|
-
groundFacts: str | None = None
|
|
1257
|
+
screeningOpinionIndicatesEiaRequired: bool | None = None
|
|
1187
1258
|
"""
|
|
1188
|
-
|
|
1259
|
+
Indicates if the screening opinion specifies that an EIA is required (Expedited Appeals)
|
|
1189
1260
|
"""
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
a = "a"
|
|
1194
|
-
b = "b"
|
|
1195
|
-
c = "c"
|
|
1196
|
-
d = "d"
|
|
1197
|
-
e = "e"
|
|
1198
|
-
f = "f"
|
|
1199
|
-
g = "g"
|
|
1200
|
-
h = "h"
|
|
1201
|
-
i = "i"
|
|
1202
|
-
j = "j"
|
|
1203
|
-
k = "k"
|
|
1204
|
-
NoneType_None = None
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
class ApplicationElbAppealGroundsDetail1(BaseModel):
|
|
1208
|
-
model_config = ConfigDict(
|
|
1209
|
-
extra="allow",
|
|
1210
|
-
)
|
|
1211
|
-
appealGroundLetter: AppealGroundLetter3 | None = None
|
|
1212
|
-
groundForAppealStartDate: AwareDatetime | None = Field(
|
|
1213
|
-
None, examples=["2023-07-27T20:30:00.000Z"]
|
|
1214
|
-
)
|
|
1215
|
-
groundFacts: str | None = None
|
|
1261
|
+
significantChangesAffectingApplicationAppellant: (
|
|
1262
|
+
list[SignificantChangesAffectingApplicationAppellantItem] | None
|
|
1263
|
+
) = None
|
|
1216
1264
|
"""
|
|
1217
|
-
|
|
1265
|
+
Significant changes affecting the application as reported by the appellant (Expedited Appeals)
|
|
1266
|
+
"""
|
|
1267
|
+
significantChangesAffectingApplicationLpa: (
|
|
1268
|
+
list[SignificantChangesAffectingApplicationLpaItem] | None
|
|
1269
|
+
) = None
|
|
1270
|
+
"""
|
|
1271
|
+
Significant changes affecting the application as reported by the LPA (Expedited Appeals)
|
|
1218
1272
|
"""
|
|
1219
1273
|
|
|
1220
1274
|
|
|
@@ -1759,10 +1813,10 @@ class AppealS78Case2(BaseModel):
|
|
|
1759
1813
|
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
1760
1814
|
)
|
|
1761
1815
|
finalCommentsDueDate: AwareDatetime | None = Field(
|
|
1762
|
-
|
|
1816
|
+
None, examples=["2023-07-27T20:30:00.000Z"]
|
|
1763
1817
|
)
|
|
1764
1818
|
interestedPartyRepsDueDate: AwareDatetime | None = Field(
|
|
1765
|
-
|
|
1819
|
+
None, examples=["2023-07-27T20:30:00.000Z"]
|
|
1766
1820
|
)
|
|
1767
1821
|
lpaCommentsSubmittedDate: AwareDatetime | None = Field(
|
|
1768
1822
|
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
@@ -1774,13 +1828,13 @@ class AppealS78Case2(BaseModel):
|
|
|
1774
1828
|
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
1775
1829
|
)
|
|
1776
1830
|
proofsOfEvidenceDueDate: AwareDatetime | None = Field(
|
|
1777
|
-
|
|
1831
|
+
None, examples=["2023-07-27T20:30:00.000Z"]
|
|
1778
1832
|
)
|
|
1779
1833
|
siteNoticesSentDate: AwareDatetime | None = Field(
|
|
1780
1834
|
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
1781
1835
|
)
|
|
1782
1836
|
statementDueDate: AwareDatetime | None = Field(
|
|
1783
|
-
|
|
1837
|
+
None, examples=["2023-07-27T20:30:00.000Z"]
|
|
1784
1838
|
)
|
|
1785
1839
|
caseManagementConferenceDate: AwareDatetime | None = Field(
|
|
1786
1840
|
None, examples=["2023-07-27T20:30:00.000Z"]
|
|
@@ -1887,13 +1941,13 @@ class AppealS78Case2(BaseModel):
|
|
|
1887
1941
|
None, examples=["2023-07-27T20:30:00.000Z"]
|
|
1888
1942
|
)
|
|
1889
1943
|
"""
|
|
1890
|
-
The date on which an
|
|
1944
|
+
The date on which an Enforcement Notice or Discontinuance Notice was issued
|
|
1891
1945
|
"""
|
|
1892
1946
|
effectiveDateOfEnforcementNotice: AwareDatetime | None = Field(
|
|
1893
1947
|
None, examples=["2023-07-27T20:30:00.000Z"]
|
|
1894
1948
|
)
|
|
1895
1949
|
"""
|
|
1896
|
-
The effective date of an
|
|
1950
|
+
The effective date of an Enforcement Notice or Discontinuance Notice
|
|
1897
1951
|
"""
|
|
1898
1952
|
didAppellantAppealLpaDecision: bool | None = None
|
|
1899
1953
|
"""
|
|
@@ -1949,6 +2003,32 @@ class AppealS78Case2(BaseModel):
|
|
|
1949
2003
|
"""
|
|
1950
2004
|
Reason(s) why LPA consider the appeal invalid
|
|
1951
2005
|
"""
|
|
2006
|
+
discontinuanceNoticeServedReason: DiscontinuanceNoticeServedReason | None = None
|
|
2007
|
+
discontinuanceNoticeServedOtherReason: str | None = None
|
|
2008
|
+
"""
|
|
2009
|
+
Other reason for serving a discontinuance notice, for discontinuanceNoticeServedReason: other
|
|
2010
|
+
"""
|
|
2011
|
+
wasRetrospectivePlanningApplicationMade: bool | None = None
|
|
2012
|
+
reasonForAppealAppellant: constr(max_length=250) | None = None
|
|
2013
|
+
"""
|
|
2014
|
+
Reason for appeal as provided by the appellant (Expedited Appeals)
|
|
2015
|
+
"""
|
|
2016
|
+
screeningOpinionIndicatesEiaRequired: bool | None = None
|
|
2017
|
+
"""
|
|
2018
|
+
Indicates if the screening opinion specifies that an EIA is required (Expedited Appeals)
|
|
2019
|
+
"""
|
|
2020
|
+
significantChangesAffectingApplicationAppellant: (
|
|
2021
|
+
list[SignificantChangesAffectingApplicationAppellantItem] | None
|
|
2022
|
+
) = None
|
|
2023
|
+
"""
|
|
2024
|
+
Significant changes affecting the application as reported by the appellant (Expedited Appeals)
|
|
2025
|
+
"""
|
|
2026
|
+
significantChangesAffectingApplicationLpa: (
|
|
2027
|
+
list[SignificantChangesAffectingApplicationLpaItem] | None
|
|
2028
|
+
) = None
|
|
2029
|
+
"""
|
|
2030
|
+
Significant changes affecting the application as reported by the LPA (Expedited Appeals)
|
|
2031
|
+
"""
|
|
1952
2032
|
|
|
1953
2033
|
|
|
1954
2034
|
class AppealS78Case(RootModel[AppealS78Case1 | AppealS78Case2]):
|
|
@@ -227,6 +227,9 @@
|
|
|
227
227
|
"groundISupporting",
|
|
228
228
|
"groundJSupporting",
|
|
229
229
|
"groundKSupporting",
|
|
230
|
+
"discontinuanceNotice",
|
|
231
|
+
"otherSupportingInformationAppellant",
|
|
232
|
+
"eiaEnvironmentalStatementAppellant",
|
|
230
233
|
null
|
|
231
234
|
],
|
|
232
235
|
"description": "The type of document, used for exchange, migrations and consumption from the appeal back-office system"
|