@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,488 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: nsip-project.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 typing import Any
|
|
9
|
+
|
|
10
|
+
from pydantic import AwareDatetime, BaseModel, ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Decision(Enum):
|
|
14
|
+
"""
|
|
15
|
+
Decision: approved/refused/split-decision
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
approved = "approved"
|
|
19
|
+
refused = "refused"
|
|
20
|
+
split_decision = "split-decision"
|
|
21
|
+
NoneType_None = None
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class PublishStatus(Enum):
|
|
25
|
+
published = "published"
|
|
26
|
+
unpublished = "unpublished"
|
|
27
|
+
NoneType_None = None
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class Sector(Enum):
|
|
31
|
+
"""
|
|
32
|
+
{Sector Abbreviation} - {Sector Display Name}
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
BC___Business_and_Commercial = "BC - Business and Commercial"
|
|
36
|
+
EN___Energy = "EN - Energy"
|
|
37
|
+
TR___Transport = "TR - Transport"
|
|
38
|
+
WA___Water = "WA - Water"
|
|
39
|
+
WS___Waste = "WS - Waste"
|
|
40
|
+
WW___Waste_Water = "WW - Waste Water"
|
|
41
|
+
NoneType_None = None
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class ProjectType(Enum):
|
|
45
|
+
"""
|
|
46
|
+
{SubSector Abbreviation} - {SubSector Display Name}
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
BC01___Office_Use = "BC01 - Office Use"
|
|
50
|
+
BC02___Research_and_Development_of_Products_or_Processes = (
|
|
51
|
+
"BC02 - Research and Development of Products or Processes"
|
|
52
|
+
)
|
|
53
|
+
BC03___An_Industrial_Process_or_Processes = (
|
|
54
|
+
"BC03 - An Industrial Process or Processes"
|
|
55
|
+
)
|
|
56
|
+
BC04___Storage_or_Distribution_of_Goods = "BC04 - Storage or Distribution of Goods"
|
|
57
|
+
BC05___Conferences = "BC05 - Conferences"
|
|
58
|
+
BC06___Exhibitions = "BC06 - Exhibitions"
|
|
59
|
+
BC07___Sport = "BC07 - Sport"
|
|
60
|
+
BC08___Leisure = "BC08 - Leisure"
|
|
61
|
+
BC09___Tourism = "BC09 - Tourism"
|
|
62
|
+
EN01___Generating_Stations = "EN01 - Generating Stations"
|
|
63
|
+
EN02___Electric_Lines = "EN02 - Electric Lines"
|
|
64
|
+
EN03___Underground_Gas_Storage_Facilities = (
|
|
65
|
+
"EN03 - Underground Gas Storage Facilities"
|
|
66
|
+
)
|
|
67
|
+
EN04___LNG_Facilities = "EN04 - LNG Facilities"
|
|
68
|
+
EN05___Gas_Reception_Facilities = "EN05 - Gas Reception Facilities"
|
|
69
|
+
EN06___Gas_Transporter_Pipe_lines = "EN06 - Gas Transporter Pipe-lines"
|
|
70
|
+
EN07___Other_Pipe_lines = "EN07 - Other Pipe-lines"
|
|
71
|
+
TR01___Highways = "TR01 - Highways"
|
|
72
|
+
TR02___Airports = "TR02 - Airports"
|
|
73
|
+
TR03___Harbour_Facilities = "TR03 - Harbour Facilities"
|
|
74
|
+
TR04___Railways = "TR04 - Railways"
|
|
75
|
+
TR05___Rail_Freight_Interchanges = "TR05 - Rail Freight Interchanges"
|
|
76
|
+
WS01___Hazardous_Waste_Facilities = "WS01 - Hazardous Waste Facilities"
|
|
77
|
+
WW01___Waste_Water_Treatment_Plants = "WW01 - Waste Water Treatment Plants"
|
|
78
|
+
WA01___Dams_and_Reservoirs = "WA01 - Dams and Reservoirs"
|
|
79
|
+
WA02___Transfer_of_Water_Resources = "WA02 - Transfer of Water Resources"
|
|
80
|
+
NoneType_None = None
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
class SourceSystem(Enum):
|
|
84
|
+
back_office_applications = "back-office-applications"
|
|
85
|
+
horizon = "horizon"
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class Stage(Enum):
|
|
89
|
+
"""
|
|
90
|
+
Process stage identifier
|
|
91
|
+
"""
|
|
92
|
+
|
|
93
|
+
draft = "draft"
|
|
94
|
+
pre_application = "pre_application"
|
|
95
|
+
acceptance = "acceptance"
|
|
96
|
+
pre_examination = "pre_examination"
|
|
97
|
+
examination = "examination"
|
|
98
|
+
recommendation = "recommendation"
|
|
99
|
+
decision = "decision"
|
|
100
|
+
post_decision = "post_decision"
|
|
101
|
+
withdrawn = "withdrawn"
|
|
102
|
+
NoneType_None = None
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
class Region(Enum):
|
|
106
|
+
"""
|
|
107
|
+
Geographical region of UK. Applications can cover multiple regions.
|
|
108
|
+
"""
|
|
109
|
+
|
|
110
|
+
east_midlands = "east_midlands"
|
|
111
|
+
eastern = "eastern"
|
|
112
|
+
london = "london"
|
|
113
|
+
north_east = "north_east"
|
|
114
|
+
north_west = "north_west"
|
|
115
|
+
south_east = "south_east"
|
|
116
|
+
south_west = "south_west"
|
|
117
|
+
wales = "wales"
|
|
118
|
+
west_midlands = "west_midlands"
|
|
119
|
+
yorkshire_and_the_humber = "yorkshire_and_the_humber"
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
class MapZoomLevel(Enum):
|
|
123
|
+
"""
|
|
124
|
+
Resolution of pinned map. Set when co-ordinates are created.
|
|
125
|
+
"""
|
|
126
|
+
|
|
127
|
+
country = "country"
|
|
128
|
+
region = "region"
|
|
129
|
+
county = "county"
|
|
130
|
+
borough = "borough"
|
|
131
|
+
district = "district"
|
|
132
|
+
city = "city"
|
|
133
|
+
town = "town"
|
|
134
|
+
junction = "junction"
|
|
135
|
+
none = "none"
|
|
136
|
+
NoneType_None = None
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
class NsipProject(BaseModel):
|
|
140
|
+
"""
|
|
141
|
+
Subset of Pins Data Model [Case]
|
|
142
|
+
"""
|
|
143
|
+
|
|
144
|
+
model_config = ConfigDict(
|
|
145
|
+
extra="allow",
|
|
146
|
+
)
|
|
147
|
+
caseId: int = Field(..., examples=[1242])
|
|
148
|
+
"""
|
|
149
|
+
The unique identifier within the Back Office. This is not the same as the case reference
|
|
150
|
+
"""
|
|
151
|
+
caseReference: str | None = Field(..., examples=["BC0510001"])
|
|
152
|
+
projectName: str | None = Field(
|
|
153
|
+
..., examples=["A1 Birtley to Coal House Improvement Scheme"]
|
|
154
|
+
)
|
|
155
|
+
"""
|
|
156
|
+
Name of project
|
|
157
|
+
"""
|
|
158
|
+
projectNameWelsh: str | None = None
|
|
159
|
+
"""
|
|
160
|
+
Name of project in Welsh
|
|
161
|
+
"""
|
|
162
|
+
projectDescription: str | None = Field(
|
|
163
|
+
...,
|
|
164
|
+
examples=[
|
|
165
|
+
"The scheme is 6.5 km in length and will consist of online widening of the A1 south of Gateshead to four lanes between junction 65"
|
|
166
|
+
],
|
|
167
|
+
)
|
|
168
|
+
projectDescriptionWelsh: str | None = None
|
|
169
|
+
decision: Decision
|
|
170
|
+
"""
|
|
171
|
+
Decision: approved/refused/split-decision
|
|
172
|
+
"""
|
|
173
|
+
publishStatus: PublishStatus
|
|
174
|
+
sector: Sector
|
|
175
|
+
"""
|
|
176
|
+
{Sector Abbreviation} - {Sector Display Name}
|
|
177
|
+
"""
|
|
178
|
+
projectType: ProjectType
|
|
179
|
+
"""
|
|
180
|
+
{SubSector Abbreviation} - {SubSector Display Name}
|
|
181
|
+
"""
|
|
182
|
+
sourceSystem: SourceSystem
|
|
183
|
+
stage: Stage
|
|
184
|
+
"""
|
|
185
|
+
Process stage identifier
|
|
186
|
+
"""
|
|
187
|
+
projectLocation: str | None = Field(
|
|
188
|
+
...,
|
|
189
|
+
examples=[
|
|
190
|
+
"The scheme is located on the A1 Newcastle Gateshead Western Bypass, between junctions 65 and 67."
|
|
191
|
+
],
|
|
192
|
+
)
|
|
193
|
+
"""
|
|
194
|
+
Description of site location
|
|
195
|
+
"""
|
|
196
|
+
projectLocationWelsh: str | None = None
|
|
197
|
+
"""
|
|
198
|
+
Description of site location in Welsh
|
|
199
|
+
"""
|
|
200
|
+
projectEmailAddress: str | None = Field(
|
|
201
|
+
..., examples=["NIEnquiries@planninginspectorate.gsi.gov.uk"]
|
|
202
|
+
)
|
|
203
|
+
"""
|
|
204
|
+
PINS Project email address pubished on website
|
|
205
|
+
"""
|
|
206
|
+
regions: list[Region]
|
|
207
|
+
transboundary: bool | None = Field(..., examples=[True, False])
|
|
208
|
+
"""
|
|
209
|
+
Drives addition of Transboundary tab on website. [TODO]
|
|
210
|
+
"""
|
|
211
|
+
easting: int | None = Field(..., examples=[345678])
|
|
212
|
+
"""
|
|
213
|
+
Project site Easting co-ordinate.
|
|
214
|
+
"""
|
|
215
|
+
northing: int | None = Field(..., examples=[345678])
|
|
216
|
+
"""
|
|
217
|
+
Project site Northing co-ordinate.
|
|
218
|
+
"""
|
|
219
|
+
welshLanguage: bool | None = Field(..., examples=[True, False])
|
|
220
|
+
"""
|
|
221
|
+
Welsh Language translation required.
|
|
222
|
+
"""
|
|
223
|
+
mapZoomLevel: MapZoomLevel
|
|
224
|
+
"""
|
|
225
|
+
Resolution of pinned map. Set when co-ordinates are created.
|
|
226
|
+
"""
|
|
227
|
+
secretaryOfState: str | None = None
|
|
228
|
+
"""
|
|
229
|
+
Relevant Government Department. [TODO]
|
|
230
|
+
"""
|
|
231
|
+
field_preApplicationDates: Any | None = Field(None, alias="_preApplicationDates")
|
|
232
|
+
datePINSFirstNotifiedOfProject: AwareDatetime | None = Field(
|
|
233
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
234
|
+
)
|
|
235
|
+
"""
|
|
236
|
+
Date at which applicant notify PINS of a project (pre-publishing)
|
|
237
|
+
"""
|
|
238
|
+
dateProjectAppearsOnWebsite: AwareDatetime | None = Field(
|
|
239
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
240
|
+
)
|
|
241
|
+
"""
|
|
242
|
+
Date Project Appears On Website
|
|
243
|
+
"""
|
|
244
|
+
anticipatedSubmissionDateNonSpecific: str | None = Field(..., examples=["Q3 2023"])
|
|
245
|
+
"""
|
|
246
|
+
Approximate Anticipated Submission Date Of Application, e.g. Q3 2023
|
|
247
|
+
"""
|
|
248
|
+
anticipatedDateOfSubmission: AwareDatetime | None = Field(
|
|
249
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
250
|
+
)
|
|
251
|
+
"""
|
|
252
|
+
Anticipated Submission Date Of Application
|
|
253
|
+
"""
|
|
254
|
+
screeningOpinionSought: AwareDatetime | None = Field(
|
|
255
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
256
|
+
)
|
|
257
|
+
"""
|
|
258
|
+
(TBC by Env. Services Team)
|
|
259
|
+
"""
|
|
260
|
+
screeningOpinionIssued: AwareDatetime | None = Field(
|
|
261
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
262
|
+
)
|
|
263
|
+
"""
|
|
264
|
+
(TBC by Env. Services Team)
|
|
265
|
+
"""
|
|
266
|
+
scopingOpinionSought: AwareDatetime | None = Field(
|
|
267
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
268
|
+
)
|
|
269
|
+
"""
|
|
270
|
+
(TBC by Env. Services Team)
|
|
271
|
+
"""
|
|
272
|
+
scopingOpinionIssued: AwareDatetime | None = Field(
|
|
273
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
274
|
+
)
|
|
275
|
+
"""
|
|
276
|
+
(TBC by Env. Services Team)
|
|
277
|
+
"""
|
|
278
|
+
section46Notification: AwareDatetime | None = Field(
|
|
279
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
280
|
+
)
|
|
281
|
+
"""
|
|
282
|
+
Applicant must notify PINS of statutory consultation
|
|
283
|
+
"""
|
|
284
|
+
field_acceptanceDates: Any | None = Field(None, alias="_acceptanceDates")
|
|
285
|
+
dateOfDCOSubmission: AwareDatetime | None = Field(
|
|
286
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
287
|
+
)
|
|
288
|
+
"""
|
|
289
|
+
Date Applcation is submitted
|
|
290
|
+
"""
|
|
291
|
+
deadlineForAcceptanceDecision: AwareDatetime | None = Field(
|
|
292
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
293
|
+
)
|
|
294
|
+
"""
|
|
295
|
+
DeadlineForAcceptanceDecision
|
|
296
|
+
"""
|
|
297
|
+
dateOfDCOAcceptance: AwareDatetime | None = Field(
|
|
298
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
299
|
+
)
|
|
300
|
+
"""
|
|
301
|
+
Date Application is Formerly Accepted by PINS
|
|
302
|
+
"""
|
|
303
|
+
dateOfNonAcceptance: AwareDatetime | None = Field(
|
|
304
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
305
|
+
)
|
|
306
|
+
"""
|
|
307
|
+
Date of Non Acceptance
|
|
308
|
+
"""
|
|
309
|
+
field_preExaminationDates: Any | None = Field(None, alias="_preExaminationDates")
|
|
310
|
+
dateOfRepresentationPeriodOpen: AwareDatetime | None = Field(
|
|
311
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
312
|
+
)
|
|
313
|
+
"""
|
|
314
|
+
Date at which point publish can submit relevant reps
|
|
315
|
+
"""
|
|
316
|
+
dateOfRelevantRepresentationClose: AwareDatetime | None = Field(
|
|
317
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
318
|
+
)
|
|
319
|
+
"""
|
|
320
|
+
Date at which point publish can no longer submit relevant reps
|
|
321
|
+
"""
|
|
322
|
+
extensionToDateRelevantRepresentationsClose: AwareDatetime | None = Field(
|
|
323
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
324
|
+
)
|
|
325
|
+
"""
|
|
326
|
+
ExtensionToDateRelevantRepresentationsClose
|
|
327
|
+
"""
|
|
328
|
+
dateRRepAppearOnWebsite: AwareDatetime | None = Field(
|
|
329
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
330
|
+
)
|
|
331
|
+
"""
|
|
332
|
+
Date at which relevant reps appear on the website
|
|
333
|
+
"""
|
|
334
|
+
dateIAPIDue: AwareDatetime | None = Field(
|
|
335
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
336
|
+
)
|
|
337
|
+
rule6LetterPublishDate: AwareDatetime | None = Field(
|
|
338
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
339
|
+
)
|
|
340
|
+
preliminaryMeetingStartDate: AwareDatetime | None = Field(
|
|
341
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
342
|
+
)
|
|
343
|
+
"""
|
|
344
|
+
Meeting between all parties inc public
|
|
345
|
+
"""
|
|
346
|
+
notificationDateForPMAndEventsDirectlyFollowingPM: AwareDatetime | None = Field(
|
|
347
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
348
|
+
)
|
|
349
|
+
notificationDateForEventsDeveloper: AwareDatetime | None = Field(
|
|
350
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
351
|
+
)
|
|
352
|
+
field_examinationDates: Any | None = Field(None, alias="_examinationDates")
|
|
353
|
+
dateSection58NoticeReceived: AwareDatetime | None = Field(
|
|
354
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
355
|
+
)
|
|
356
|
+
"""
|
|
357
|
+
Applicant has notified all parties of application
|
|
358
|
+
"""
|
|
359
|
+
confirmedStartOfExamination: AwareDatetime | None = Field(
|
|
360
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
361
|
+
)
|
|
362
|
+
"""
|
|
363
|
+
ConfirmedStartOfExamination by panel
|
|
364
|
+
"""
|
|
365
|
+
rule8LetterPublishDate: AwareDatetime | None = Field(
|
|
366
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
367
|
+
)
|
|
368
|
+
deadlineForCloseOfExamination: AwareDatetime | None = Field(
|
|
369
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
370
|
+
)
|
|
371
|
+
"""
|
|
372
|
+
DeadlineForCloseOfExamination
|
|
373
|
+
"""
|
|
374
|
+
dateTimeExaminationEnds: AwareDatetime | None = Field(
|
|
375
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
376
|
+
)
|
|
377
|
+
"""
|
|
378
|
+
ConfirmedSEndOfExamination by panel
|
|
379
|
+
"""
|
|
380
|
+
stage4ExtensionToExamCloseDate: AwareDatetime | None = Field(
|
|
381
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
382
|
+
)
|
|
383
|
+
"""
|
|
384
|
+
Examination Period extended to this date
|
|
385
|
+
"""
|
|
386
|
+
field_recommendationDates: Any | None = Field(None, alias="_recommendationDates")
|
|
387
|
+
deadlineForSubmissionOfRecommendation: AwareDatetime | None = Field(
|
|
388
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
389
|
+
)
|
|
390
|
+
"""
|
|
391
|
+
DeadlineForSubmissionOfRecommendation
|
|
392
|
+
"""
|
|
393
|
+
dateOfRecommendations: AwareDatetime | None = Field(
|
|
394
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
395
|
+
)
|
|
396
|
+
"""
|
|
397
|
+
Date recomm report sent to SoS
|
|
398
|
+
"""
|
|
399
|
+
stage5ExtensionToRecommendationDeadline: AwareDatetime | None = Field(
|
|
400
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
401
|
+
)
|
|
402
|
+
"""
|
|
403
|
+
Recommendation period extended to this date
|
|
404
|
+
"""
|
|
405
|
+
field_decisionDates: Any | None = Field(None, alias="_decisionDates")
|
|
406
|
+
deadlineForDecision: AwareDatetime | None = Field(
|
|
407
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
408
|
+
)
|
|
409
|
+
"""
|
|
410
|
+
DeadlineForDecision
|
|
411
|
+
"""
|
|
412
|
+
confirmedDateOfDecision: AwareDatetime | None = Field(
|
|
413
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
414
|
+
)
|
|
415
|
+
"""
|
|
416
|
+
Decision by SoS
|
|
417
|
+
"""
|
|
418
|
+
stage5ExtensionToDecisionDeadline: AwareDatetime | None = Field(
|
|
419
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
420
|
+
)
|
|
421
|
+
"""
|
|
422
|
+
Decision period extended to this date
|
|
423
|
+
"""
|
|
424
|
+
field_postDecisionDates: Any | None = Field(None, alias="_postDecisionDates")
|
|
425
|
+
jRPeriodEndDate: AwareDatetime | None = Field(
|
|
426
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
427
|
+
)
|
|
428
|
+
"""
|
|
429
|
+
Judicial Review
|
|
430
|
+
"""
|
|
431
|
+
field_withdrawalDates: Any | None = Field(None, alias="_withdrawalDates")
|
|
432
|
+
dateProjectWithdrawn: AwareDatetime | None = Field(
|
|
433
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
434
|
+
)
|
|
435
|
+
"""
|
|
436
|
+
DateProjectWithdrawn by applicant
|
|
437
|
+
"""
|
|
438
|
+
operationsLeadId: str | None = None
|
|
439
|
+
"""
|
|
440
|
+
Maps to [Employee].[EmployeeID].
|
|
441
|
+
"""
|
|
442
|
+
operationsManagerId: str | None = None
|
|
443
|
+
"""
|
|
444
|
+
New NSIP role, Maps to [Employee].[EmployeeID]
|
|
445
|
+
"""
|
|
446
|
+
caseManagerId: str | None = None
|
|
447
|
+
"""
|
|
448
|
+
Maps to [Employee].[EmployeeID]
|
|
449
|
+
"""
|
|
450
|
+
nsipOfficerIds: list[str]
|
|
451
|
+
nsipAdministrationOfficerIds: list[str]
|
|
452
|
+
leadInspectorId: str | None = None
|
|
453
|
+
"""
|
|
454
|
+
Maps to [Employee].[EmployeeID]
|
|
455
|
+
"""
|
|
456
|
+
inspectorIds: list[str]
|
|
457
|
+
environmentalServicesOfficerId: str | None = None
|
|
458
|
+
"""
|
|
459
|
+
Maps to [Employee].[EmployeeID]
|
|
460
|
+
"""
|
|
461
|
+
legalOfficerId: str | None = None
|
|
462
|
+
"""
|
|
463
|
+
Maps to [Employee].[EmployeeID]
|
|
464
|
+
"""
|
|
465
|
+
applicantId: str | None = None
|
|
466
|
+
"""
|
|
467
|
+
Maps to [ServiceUser].[id] where the serviceUserType is Applicant
|
|
468
|
+
"""
|
|
469
|
+
migrationStatus: bool | None = None
|
|
470
|
+
"""
|
|
471
|
+
Has this case been migrated from the legacy system? True if so.
|
|
472
|
+
"""
|
|
473
|
+
dateOfReOpenRelevantRepresentationStart: AwareDatetime | None = Field(
|
|
474
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
475
|
+
)
|
|
476
|
+
"""
|
|
477
|
+
Date at which relevant reps can be reopened
|
|
478
|
+
"""
|
|
479
|
+
dateOfReOpenRelevantRepresentationClose: AwareDatetime | None = Field(
|
|
480
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
481
|
+
)
|
|
482
|
+
"""
|
|
483
|
+
Date at which relevant reps can no longer be reopened
|
|
484
|
+
"""
|
|
485
|
+
isMaterialChange: bool | None = Field(None, examples=[True, False])
|
|
486
|
+
"""
|
|
487
|
+
Is this an application for a material change?
|
|
488
|
+
"""
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: nsip-project-update.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
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class UpdateStatus(Enum):
|
|
13
|
+
"""
|
|
14
|
+
The current status of this update
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
draft = "draft"
|
|
18
|
+
ready_to_publish = "ready-to-publish"
|
|
19
|
+
published = "published"
|
|
20
|
+
ready_to_unpublish = "ready-to-unpublish"
|
|
21
|
+
unpublished = "unpublished"
|
|
22
|
+
archived = "archived"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class NsipProjectUpdate(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
NSIP Project Update (formerly known as Banners)
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
model_config = ConfigDict(
|
|
31
|
+
extra="allow",
|
|
32
|
+
)
|
|
33
|
+
id: int
|
|
34
|
+
"""
|
|
35
|
+
The unique identifier within the Back Office.
|
|
36
|
+
"""
|
|
37
|
+
caseReference: str
|
|
38
|
+
"""
|
|
39
|
+
the case reference this update relates to
|
|
40
|
+
"""
|
|
41
|
+
updateDate: AwareDatetime | None = None
|
|
42
|
+
"""
|
|
43
|
+
The date the update was published
|
|
44
|
+
"""
|
|
45
|
+
updateName: str | None = None
|
|
46
|
+
"""
|
|
47
|
+
Internal title or name of the update
|
|
48
|
+
"""
|
|
49
|
+
updateContentEnglish: str
|
|
50
|
+
"""
|
|
51
|
+
HTML content of the update in English. Can only include `<a> <b> <ul> <li>` tags.
|
|
52
|
+
"""
|
|
53
|
+
updateContentWelsh: str | None = None
|
|
54
|
+
"""
|
|
55
|
+
HTML content of the update in Welsh. Can only include `<a> <b> <ul> <li>` tags.
|
|
56
|
+
"""
|
|
57
|
+
updateStatus: UpdateStatus
|
|
58
|
+
"""
|
|
59
|
+
The current status of this update
|
|
60
|
+
"""
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: nsip-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
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Status(Enum):
|
|
13
|
+
awaiting_review = "awaiting_review"
|
|
14
|
+
referred = "referred"
|
|
15
|
+
valid = "valid"
|
|
16
|
+
invalid = "invalid"
|
|
17
|
+
published = "published"
|
|
18
|
+
archived = "archived"
|
|
19
|
+
draft = "draft"
|
|
20
|
+
withdrawn = "withdrawn"
|
|
21
|
+
NoneType_None = None
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class RepresentationFrom(Enum):
|
|
25
|
+
PERSON = "PERSON"
|
|
26
|
+
ORGANISATION = "ORGANISATION"
|
|
27
|
+
AGENT = "AGENT"
|
|
28
|
+
NoneType_None = None
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class RegisterFor(Enum):
|
|
32
|
+
PERSON = "PERSON"
|
|
33
|
+
ORGANISATION = "ORGANISATION"
|
|
34
|
+
FAMILY_GROUP = "FAMILY_GROUP"
|
|
35
|
+
NoneType_None = None
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class RepresentationType(Enum):
|
|
39
|
+
Local_Authorities = "Local Authorities"
|
|
40
|
+
Parish_Councils = "Parish Councils"
|
|
41
|
+
Members_of_the_Public_Businesses = "Members of the Public/Businesses"
|
|
42
|
+
Public___Businesses = "Public & Businesses"
|
|
43
|
+
Statutory_Consultees = "Statutory Consultees"
|
|
44
|
+
Non_Statutory_Organisations = "Non-Statutory Organisations"
|
|
45
|
+
Another_Individual = "Another Individual"
|
|
46
|
+
NoneType_None = None
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class Representation(BaseModel):
|
|
50
|
+
"""
|
|
51
|
+
NSIP Representation schema
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
model_config = ConfigDict(
|
|
55
|
+
extra="allow",
|
|
56
|
+
)
|
|
57
|
+
representationId: int
|
|
58
|
+
referenceId: str | None = Field(..., examples=["TR043003-000010"])
|
|
59
|
+
examinationLibraryRef: str | None = Field(..., examples=["RR-0001"])
|
|
60
|
+
caseRef: str
|
|
61
|
+
caseId: int | None = Field(..., examples=[1242])
|
|
62
|
+
"""
|
|
63
|
+
The unique identifier within the Back Office. This is not the same as the case reference
|
|
64
|
+
"""
|
|
65
|
+
status: Status
|
|
66
|
+
originalRepresentation: str
|
|
67
|
+
redacted: bool | None = None
|
|
68
|
+
redactedRepresentation: str | None = None
|
|
69
|
+
redactedBy: str | None = Field(..., examples=["Joe Blogs"])
|
|
70
|
+
redactedNotes: str | None = Field(..., examples=["Removed names of family members"])
|
|
71
|
+
representationFrom: RepresentationFrom
|
|
72
|
+
representedId: str
|
|
73
|
+
"""
|
|
74
|
+
ServiceUser Id of the person or organisation being represented
|
|
75
|
+
"""
|
|
76
|
+
representativeId: str | None = None
|
|
77
|
+
"""
|
|
78
|
+
ServiceUser Id of the person or organisation submitting representation in the case of Agent representationFrom
|
|
79
|
+
"""
|
|
80
|
+
registerFor: RegisterFor
|
|
81
|
+
representationType: RepresentationType
|
|
82
|
+
dateReceived: AwareDatetime = Field(..., examples=["2023-07-27T20:30:00.000Z"])
|
|
83
|
+
attachmentIds: list[str]
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: nsip-subscription.schema.json
|
|
3
|
+
# timestamp: 2025-07-16T14:06:10+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from enum import Enum
|
|
8
|
+
|
|
9
|
+
from pydantic import AwareDatetime, BaseModel, ConfigDict, EmailStr, Field
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class SubscriptionType(Enum):
|
|
13
|
+
"""
|
|
14
|
+
which update does the subscriber want to get notified of. For multiple types, use multiple messages.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
allUpdates = "allUpdates"
|
|
18
|
+
applicationSubmitted = "applicationSubmitted"
|
|
19
|
+
applicationDecided = "applicationDecided"
|
|
20
|
+
registrationOpen = "registrationOpen"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class Language(Enum):
|
|
24
|
+
English = "English"
|
|
25
|
+
Welsh = "Welsh"
|
|
26
|
+
NoneType_None = None
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class NsipSubscription(BaseModel):
|
|
30
|
+
"""
|
|
31
|
+
Subscribers are a subset of Service Users, part of the PINS Data Model
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
extra="allow",
|
|
36
|
+
)
|
|
37
|
+
subscriptionId: int | None = None
|
|
38
|
+
"""
|
|
39
|
+
The unique identifier within the Back Office. Ignored as part of register-nsip-subscription.
|
|
40
|
+
"""
|
|
41
|
+
caseReference: str
|
|
42
|
+
"""
|
|
43
|
+
the case reference the subscription relates to
|
|
44
|
+
"""
|
|
45
|
+
emailAddress: EmailStr = Field(
|
|
46
|
+
..., examples=["alan.turing@planninginspectorate.gov.uk"]
|
|
47
|
+
)
|
|
48
|
+
subscriptionType: SubscriptionType
|
|
49
|
+
"""
|
|
50
|
+
which update does the subscriber want to get notified of. For multiple types, use multiple messages.
|
|
51
|
+
"""
|
|
52
|
+
startDate: AwareDatetime | None = None
|
|
53
|
+
"""
|
|
54
|
+
The date to start getting updates
|
|
55
|
+
"""
|
|
56
|
+
endDate: AwareDatetime | None = None
|
|
57
|
+
"""
|
|
58
|
+
The date to stop getting updates
|
|
59
|
+
"""
|
|
60
|
+
language: Language
|