@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,292 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: dart-response.schema.json
|
|
3
|
+
# timestamp: 2025-07-16T14:06:10+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class NeighbouringSiteAddress(BaseModel):
|
|
11
|
+
model_config = ConfigDict(
|
|
12
|
+
extra="allow",
|
|
13
|
+
)
|
|
14
|
+
neighbouringSiteAddressLine1: str | None = Field(..., examples=["96 The Avenue"])
|
|
15
|
+
"""
|
|
16
|
+
First line of address of the neighbouring site
|
|
17
|
+
"""
|
|
18
|
+
neighbouringSiteAddressLine2: str | None = None
|
|
19
|
+
"""
|
|
20
|
+
Second line of address of the neighbouring site
|
|
21
|
+
"""
|
|
22
|
+
neighbouringSiteAddressTown: str | None = Field(..., examples=["Maidstone"])
|
|
23
|
+
"""
|
|
24
|
+
Town / City of the neighbouring site address
|
|
25
|
+
"""
|
|
26
|
+
neighbouringSiteAddressCounty: str | None = Field(..., examples=["Kent"])
|
|
27
|
+
"""
|
|
28
|
+
County of the neighbouring site address
|
|
29
|
+
"""
|
|
30
|
+
neighbouringSiteAddressPostcode: str | None = Field(..., examples=["MD21 5XY"])
|
|
31
|
+
"""
|
|
32
|
+
Postal code of the neighbouring site address
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class DartApiResponse(BaseModel):
|
|
37
|
+
"""
|
|
38
|
+
Schema defining the data returned by the DaRT API
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
model_config = ConfigDict(
|
|
42
|
+
extra="allow",
|
|
43
|
+
)
|
|
44
|
+
caseId: int | None = Field(None, examples=["2744"])
|
|
45
|
+
"""
|
|
46
|
+
Internal case identifier
|
|
47
|
+
"""
|
|
48
|
+
caseReference: int = Field(..., examples=["6002744"])
|
|
49
|
+
"""
|
|
50
|
+
External case identifier
|
|
51
|
+
"""
|
|
52
|
+
caseStatus: str | None = Field(None, examples=["lpa_questionnaire"])
|
|
53
|
+
"""
|
|
54
|
+
The processing state for the case
|
|
55
|
+
"""
|
|
56
|
+
caseType: str | None = Field(None, examples=["w"])
|
|
57
|
+
"""
|
|
58
|
+
The internal code for a type of case
|
|
59
|
+
"""
|
|
60
|
+
caseProcedure: str | None = Field(None, examples=["W"])
|
|
61
|
+
"""
|
|
62
|
+
The type of procedure for the case
|
|
63
|
+
"""
|
|
64
|
+
lpaCode: str | None = Field(None, examples=["DORS"])
|
|
65
|
+
"""
|
|
66
|
+
PINS internal code for LPA
|
|
67
|
+
"""
|
|
68
|
+
lpaName: str | None = Field(None, examples=["example"])
|
|
69
|
+
"""
|
|
70
|
+
Name of the LPA
|
|
71
|
+
"""
|
|
72
|
+
allocationLevel: str | None = Field(None, examples=["H"])
|
|
73
|
+
"""
|
|
74
|
+
A case level used for allocation purposes
|
|
75
|
+
"""
|
|
76
|
+
allocationBand: str | None = Field(None, examples=["1"])
|
|
77
|
+
"""
|
|
78
|
+
A band used for allocation purposes
|
|
79
|
+
"""
|
|
80
|
+
caseSpecialisms: list[str] | None = Field(
|
|
81
|
+
None, examples=["General allocation", "Housing orders", "Waste"]
|
|
82
|
+
)
|
|
83
|
+
"""
|
|
84
|
+
A list of case specialisms for allocation purposes
|
|
85
|
+
"""
|
|
86
|
+
caseSubmittedDate: str | None = Field(None, examples=["025-01-02T16:20:07.753Z"])
|
|
87
|
+
"""
|
|
88
|
+
The date the case was submitted by the appellant
|
|
89
|
+
"""
|
|
90
|
+
caseCreatedDate: str | None = Field(None, examples=["025-01-02T16:20:07.753Z"])
|
|
91
|
+
"""
|
|
92
|
+
The date the case was received
|
|
93
|
+
"""
|
|
94
|
+
caseUpdatedDate: str | None = Field(None, examples=["025-01-02T16:20:07.753Z"])
|
|
95
|
+
"""
|
|
96
|
+
The date the case was last updated in the back-office
|
|
97
|
+
"""
|
|
98
|
+
caseValidDate: str | None = Field(None, examples=["025-01-02T16:20:07.753Z"])
|
|
99
|
+
"""
|
|
100
|
+
The date since when the case was considered valid
|
|
101
|
+
"""
|
|
102
|
+
caseValidationDate: str | None = Field(None, examples=["025-01-02T16:20:07.753Z"])
|
|
103
|
+
"""
|
|
104
|
+
The date the case was validated in the back-office
|
|
105
|
+
"""
|
|
106
|
+
caseValidationOutcome: str | None = Field(None, examples=["valid"])
|
|
107
|
+
"""
|
|
108
|
+
The outcome of the validation action
|
|
109
|
+
"""
|
|
110
|
+
caseValidationInvalidDetails: list[str] | None = Field(
|
|
111
|
+
None,
|
|
112
|
+
examples=[
|
|
113
|
+
"Appeal has not been submitted on time",
|
|
114
|
+
"Documents have not been submitted on time",
|
|
115
|
+
"Other: scddsfv",
|
|
116
|
+
],
|
|
117
|
+
)
|
|
118
|
+
"""
|
|
119
|
+
A list of reasons why the appeal is invalid
|
|
120
|
+
"""
|
|
121
|
+
caseValidationIncompleteDetails: list[str] | None = Field(
|
|
122
|
+
None,
|
|
123
|
+
examples=[
|
|
124
|
+
"Appellant name is not the same on the application form and appeal form",
|
|
125
|
+
"LPA's decision notice is missing",
|
|
126
|
+
],
|
|
127
|
+
)
|
|
128
|
+
"""
|
|
129
|
+
A list of reasons why the appeal is incomplete
|
|
130
|
+
"""
|
|
131
|
+
caseExtensionDate: str | None = Field(None, examples=["2025-01-10T00:00:00.000Z"])
|
|
132
|
+
"""
|
|
133
|
+
When the validation outcome is incomplete, an extension may be granted to provide missing information
|
|
134
|
+
"""
|
|
135
|
+
caseStartedDate: str | None = Field(None, examples=["2025-01-10T00:00:00.000Z"])
|
|
136
|
+
"""
|
|
137
|
+
A date indicating when the case was started, resulting in the creation of a timetable
|
|
138
|
+
"""
|
|
139
|
+
casePublishedDate: str | None = Field(None, examples=["2025-01-10T00:00:00.000Z"])
|
|
140
|
+
"""
|
|
141
|
+
A date indicating when the case was published
|
|
142
|
+
"""
|
|
143
|
+
linkedCaseStatus: str | None = Field(None, examples=["child"])
|
|
144
|
+
"""
|
|
145
|
+
Indicates if the case is linked, and the type of relationship
|
|
146
|
+
"""
|
|
147
|
+
leadCaseReference: str | None = Field(None, examples=["6002745"])
|
|
148
|
+
"""
|
|
149
|
+
The reference of the lead case, if the case is a child case
|
|
150
|
+
"""
|
|
151
|
+
caseWithdrawnDate: str | None = Field(None, examples=["2025-01-10T00:00:00.000Z"])
|
|
152
|
+
"""
|
|
153
|
+
The date the case was withdrawn by the appellant
|
|
154
|
+
"""
|
|
155
|
+
caseTransferredDate: str | None = Field(None, examples=["2025-01-10T00:00:00.000Z"])
|
|
156
|
+
"""
|
|
157
|
+
The date the case was transferred to a new case of a different type
|
|
158
|
+
"""
|
|
159
|
+
transferredCaseClosedDate: str | None = Field(
|
|
160
|
+
None, examples=["2025-01-10T00:00:00.000Z"]
|
|
161
|
+
)
|
|
162
|
+
"""
|
|
163
|
+
The date the case was closed and the appellant requested to resubmit
|
|
164
|
+
"""
|
|
165
|
+
caseDecisionOutcomeDate: str | None = Field(
|
|
166
|
+
None, examples=["2025-01-10T00:00:00.000Z"]
|
|
167
|
+
)
|
|
168
|
+
"""
|
|
169
|
+
The date of the case decision
|
|
170
|
+
"""
|
|
171
|
+
caseDecisionPublishedDate: str | None = Field(
|
|
172
|
+
None, examples=["2025-01-10T00:00:00.000Z"]
|
|
173
|
+
)
|
|
174
|
+
"""
|
|
175
|
+
The date the case decision was published
|
|
176
|
+
"""
|
|
177
|
+
caseDecisionOutcome: str | None = Field(None, examples=["allowed"])
|
|
178
|
+
"""
|
|
179
|
+
The final outcome for the decision
|
|
180
|
+
"""
|
|
181
|
+
caseCompletedDate: str | None = Field(None, examples=["2025-01-10T00:00:00.000Z"])
|
|
182
|
+
"""
|
|
183
|
+
The date the case decision letter
|
|
184
|
+
"""
|
|
185
|
+
enforcementNotice: bool | None = None
|
|
186
|
+
"""
|
|
187
|
+
Indicates if an enforcement notice is the reason for the appeal
|
|
188
|
+
"""
|
|
189
|
+
applicationReference: str = Field(..., examples=["21824/APP/0/203130"])
|
|
190
|
+
"""
|
|
191
|
+
The unique identifier of the LPA application
|
|
192
|
+
"""
|
|
193
|
+
applicationDate: str | None = Field(None, examples=["2025-01-10T00:00:00.000Z"])
|
|
194
|
+
"""
|
|
195
|
+
The date of the original LPA application
|
|
196
|
+
"""
|
|
197
|
+
applicationDecision: str | None = Field(None, examples=["refused"])
|
|
198
|
+
"""
|
|
199
|
+
The outcome of the original LPA decision
|
|
200
|
+
"""
|
|
201
|
+
lpaDecisionDate: str | None = Field(None, examples=["2025-01-10T00:00:00.000Z"])
|
|
202
|
+
"""
|
|
203
|
+
The date of the original LPA decision
|
|
204
|
+
"""
|
|
205
|
+
caseSubmissionDueDate: str | None = Field(
|
|
206
|
+
None, examples=["2025-01-10T00:00:00.000Z"]
|
|
207
|
+
)
|
|
208
|
+
"""
|
|
209
|
+
The statutory deadline for submitting an appeal from the original LPA decision date
|
|
210
|
+
"""
|
|
211
|
+
siteAddressLine1: str | None = Field(None, examples=["21 The Pavement"])
|
|
212
|
+
"""
|
|
213
|
+
First line of case site address
|
|
214
|
+
"""
|
|
215
|
+
siteAddressLine2: str | None = Field(None, examples=["Shotesham Road"])
|
|
216
|
+
"""
|
|
217
|
+
Second line of case site address
|
|
218
|
+
"""
|
|
219
|
+
siteAddressTown: str | None = Field(None, examples=["Bristol"])
|
|
220
|
+
"""
|
|
221
|
+
Town / City of the site address
|
|
222
|
+
"""
|
|
223
|
+
siteAddressCounty: str | None = Field(None, examples=["Wandsworth"])
|
|
224
|
+
"""
|
|
225
|
+
County of the site address
|
|
226
|
+
"""
|
|
227
|
+
siteAddressPostcode: str | None = Field(None, examples=["SW4 0HY"])
|
|
228
|
+
"""
|
|
229
|
+
Postal code of the site address
|
|
230
|
+
"""
|
|
231
|
+
isCorrectAppealType: bool | None = Field(None, examples=["True"])
|
|
232
|
+
"""
|
|
233
|
+
Indicates if the LPA considers the appeal type appropriate
|
|
234
|
+
"""
|
|
235
|
+
originalDevelopmentDescription: str | None = Field(
|
|
236
|
+
None, examples=["Replacement of an existing gate to access the property"]
|
|
237
|
+
)
|
|
238
|
+
"""
|
|
239
|
+
The original description of the development, as provided by the appellant
|
|
240
|
+
"""
|
|
241
|
+
changedDevelopmentDescription: bool | None = Field(None, examples=["True"])
|
|
242
|
+
"""
|
|
243
|
+
Indicates that the LPA has changed the development description
|
|
244
|
+
"""
|
|
245
|
+
newConditionDetails: str | None = Field(None, examples=["example"])
|
|
246
|
+
"""
|
|
247
|
+
Since the original application, a number of things have changed.
|
|
248
|
+
"""
|
|
249
|
+
nearbyCaseReferences: list[str] | None = None
|
|
250
|
+
"""
|
|
251
|
+
A list of related case references known to the appellant and the LPA
|
|
252
|
+
"""
|
|
253
|
+
neighbouringSiteAddresses: list[NeighbouringSiteAddress] | None = None
|
|
254
|
+
"""
|
|
255
|
+
A list of neighbouring site addresses
|
|
256
|
+
"""
|
|
257
|
+
affectedListedBuildingNumbers: list[str] | None = None
|
|
258
|
+
"""
|
|
259
|
+
A list of affected listed building IDs from Historic England
|
|
260
|
+
"""
|
|
261
|
+
appellantCostsAppliedFor: bool | None = Field(None, examples=["True"])
|
|
262
|
+
"""
|
|
263
|
+
Indicates if the appellant has applied for costs
|
|
264
|
+
"""
|
|
265
|
+
lpaCostsAppliedFor: bool | None = Field(None, examples=["False"])
|
|
266
|
+
"""
|
|
267
|
+
Indicates if the LPA has applied for costs
|
|
268
|
+
"""
|
|
269
|
+
appellantName: str | None = Field(None, examples=["example"])
|
|
270
|
+
"""
|
|
271
|
+
Name of the appellant
|
|
272
|
+
"""
|
|
273
|
+
typeOfEvent: str | None = Field(None, examples=["site_visit_access_required"])
|
|
274
|
+
"""
|
|
275
|
+
The type of event
|
|
276
|
+
"""
|
|
277
|
+
startDateOfTheEvent: str | None = Field(None, examples=["2025-01-10T00:00:00.000Z"])
|
|
278
|
+
"""
|
|
279
|
+
Event start date and time
|
|
280
|
+
"""
|
|
281
|
+
inspectorName: str | None = Field(None, examples=["In Spector"])
|
|
282
|
+
"""
|
|
283
|
+
Name of inspector allocated to case
|
|
284
|
+
"""
|
|
285
|
+
caseOfficerName: str | None = Field(None, examples=["example"])
|
|
286
|
+
"""
|
|
287
|
+
name of case officer assigned to case
|
|
288
|
+
"""
|
|
289
|
+
inspectorQualifications: str | None = Field(None, examples=["example"])
|
|
290
|
+
"""
|
|
291
|
+
The qualifications of the inspector
|
|
292
|
+
"""
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: entraid.schema.json
|
|
3
|
+
# timestamp: 2025-07-16T14:06:09+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from pydantic import BaseModel, ConfigDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class EntraIdUserObjects(BaseModel):
|
|
11
|
+
"""
|
|
12
|
+
A list of users from EntraID
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
model_config = ConfigDict(
|
|
16
|
+
extra="allow",
|
|
17
|
+
)
|
|
18
|
+
employeeId: str
|
|
19
|
+
"""
|
|
20
|
+
The employee's unique identifier
|
|
21
|
+
"""
|
|
22
|
+
id: str
|
|
23
|
+
"""
|
|
24
|
+
The unique identifier within the EntraID
|
|
25
|
+
"""
|
|
26
|
+
givenName: str
|
|
27
|
+
"""
|
|
28
|
+
The employee's given name
|
|
29
|
+
"""
|
|
30
|
+
surname: str
|
|
31
|
+
"""
|
|
32
|
+
The employee's surname
|
|
33
|
+
"""
|
|
34
|
+
userPrincipalName: str
|
|
35
|
+
"""
|
|
36
|
+
The employee's email address
|
|
37
|
+
"""
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: folder.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 BaseModel, ConfigDict
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class CaseStage(Enum):
|
|
13
|
+
draft = "draft"
|
|
14
|
+
pre_application = "pre-application"
|
|
15
|
+
acceptance = "acceptance"
|
|
16
|
+
pre_examination = "pre-examination"
|
|
17
|
+
examination = "examination"
|
|
18
|
+
recommendation = "recommendation"
|
|
19
|
+
decision = "decision"
|
|
20
|
+
post_decision = "post_decision"
|
|
21
|
+
withdrawn = "withdrawn"
|
|
22
|
+
developers_application = "developers_application"
|
|
23
|
+
correspondence = "correspondence"
|
|
24
|
+
field_0 = "0"
|
|
25
|
+
NoneType_None = None
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class Folder(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
Folders can have optional parents. All folders belong to a Case.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
extra="allow",
|
|
35
|
+
)
|
|
36
|
+
id: int
|
|
37
|
+
"""
|
|
38
|
+
The unique identifier within the Back Office.
|
|
39
|
+
"""
|
|
40
|
+
caseReference: str
|
|
41
|
+
"""
|
|
42
|
+
The case reference this folder belongs to.
|
|
43
|
+
"""
|
|
44
|
+
displayNameEnglish: str
|
|
45
|
+
"""
|
|
46
|
+
Folder display name in English.
|
|
47
|
+
"""
|
|
48
|
+
displayNameWelsh: str | None = None
|
|
49
|
+
"""
|
|
50
|
+
Folder display name in Welsh.
|
|
51
|
+
"""
|
|
52
|
+
parentFolderId: int | None = None
|
|
53
|
+
"""
|
|
54
|
+
Optional parent folder ID.
|
|
55
|
+
"""
|
|
56
|
+
caseStage: CaseStage
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: gettimesheets-response.schema.json
|
|
3
|
+
# timestamp: 2025-07-16T14:06:09+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class GetTimesheetsApiResponse(BaseModel):
|
|
11
|
+
"""
|
|
12
|
+
Schema defining the data returned by the DaRT API
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
model_config = ConfigDict(
|
|
16
|
+
extra="allow",
|
|
17
|
+
)
|
|
18
|
+
caseReference: int = Field(..., examples=["6002744"])
|
|
19
|
+
"""
|
|
20
|
+
External case identifier
|
|
21
|
+
"""
|
|
22
|
+
applicationReference: str = Field(..., examples=["12345"])
|
|
23
|
+
"""
|
|
24
|
+
The unique identifier of the application
|
|
25
|
+
"""
|
|
26
|
+
siteAddressLine1: str | None = Field(None, examples=["21 The Pavement"])
|
|
27
|
+
"""
|
|
28
|
+
First line of case site address
|
|
29
|
+
"""
|
|
30
|
+
siteAddressLine2: str | None = Field(None, examples=["Shotesham Road"])
|
|
31
|
+
"""
|
|
32
|
+
Second line of case site address
|
|
33
|
+
"""
|
|
34
|
+
siteAddressTown: str | None = Field(None, examples=["Bristol"])
|
|
35
|
+
"""
|
|
36
|
+
Town / City of the site address
|
|
37
|
+
"""
|
|
38
|
+
siteAddressCounty: str | None = Field(None, examples=["Wandsworth"])
|
|
39
|
+
"""
|
|
40
|
+
County of the site address
|
|
41
|
+
"""
|
|
42
|
+
siteAddressPostcode: str | None = Field(None, examples=["SW4 0HY"])
|
|
43
|
+
"""
|
|
44
|
+
Postal code of the site address
|
|
45
|
+
"""
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: listed-building.schema.json
|
|
3
|
+
# timestamp: 2025-07-16T14:06:09+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ListedBuilding(BaseModel):
|
|
11
|
+
"""
|
|
12
|
+
Delta of listed building data pushed by the ODW. Primary use case is to support Appeals UI
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
model_config = ConfigDict(
|
|
16
|
+
extra="allow",
|
|
17
|
+
)
|
|
18
|
+
entity: int = Field(..., examples=["31717222"])
|
|
19
|
+
"""
|
|
20
|
+
A unique identifier for the listed building.
|
|
21
|
+
"""
|
|
22
|
+
reference: str = Field(..., examples=["1260842"])
|
|
23
|
+
"""
|
|
24
|
+
Reference number for the listed buildign
|
|
25
|
+
"""
|
|
26
|
+
name: str = Field(..., examples=["41A, NEWBIGGIN"])
|
|
27
|
+
"""
|
|
28
|
+
Name of listed building
|
|
29
|
+
"""
|
|
30
|
+
listedBuildingGrade: str = Field(..., examples=["II"])
|
|
31
|
+
"""
|
|
32
|
+
Grade assigned to the listing.
|
|
33
|
+
"""
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: listed-buildings.schema.json
|
|
3
|
+
# timestamp: 2025-07-16T14:06:09+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ListedBuildings(BaseModel):
|
|
11
|
+
"""
|
|
12
|
+
Temporary copy of listed-building to ensure compatibility until ODW is updated
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
model_config = ConfigDict(
|
|
16
|
+
extra="allow",
|
|
17
|
+
)
|
|
18
|
+
entity: int = Field(..., examples=["31717222"])
|
|
19
|
+
"""
|
|
20
|
+
A unique identifier for the listed building.
|
|
21
|
+
"""
|
|
22
|
+
reference: str = Field(..., examples=["1260842"])
|
|
23
|
+
"""
|
|
24
|
+
Reference number for the listed buildign
|
|
25
|
+
"""
|
|
26
|
+
name: str = Field(..., examples=["41A, NEWBIGGIN"])
|
|
27
|
+
"""
|
|
28
|
+
Name of listed building
|
|
29
|
+
"""
|
|
30
|
+
listedBuildingGrade: str = Field(..., examples=["II"])
|
|
31
|
+
"""
|
|
32
|
+
Grade assigned to the listing.
|
|
33
|
+
"""
|