@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,199 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: nsip-document.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, Field
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class VirusCheckStatus(Enum):
|
|
13
|
+
not_scanned = "not_scanned"
|
|
14
|
+
scanned = "scanned"
|
|
15
|
+
affected = "affected"
|
|
16
|
+
NoneType_None = None
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class CaseType(Enum):
|
|
20
|
+
nsip = "nsip"
|
|
21
|
+
has = "has"
|
|
22
|
+
NoneType_None = None
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class RedactedStatus(Enum):
|
|
26
|
+
not_redacted = "not_redacted"
|
|
27
|
+
redacted = "redacted"
|
|
28
|
+
NoneType_None = None
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class PublishedStatus(Enum):
|
|
32
|
+
not_checked = "not_checked"
|
|
33
|
+
checked = "checked"
|
|
34
|
+
ready_to_publish = "ready_to_publish"
|
|
35
|
+
do_not_publish = "do_not_publish"
|
|
36
|
+
publishing = "publishing"
|
|
37
|
+
published = "published"
|
|
38
|
+
archived = "archived"
|
|
39
|
+
unpublished = "unpublished"
|
|
40
|
+
unpublishing = "unpublishing"
|
|
41
|
+
awaiting_upload = "awaiting_upload"
|
|
42
|
+
NoneType_None = None
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class SecurityClassification(Enum):
|
|
46
|
+
public = "public"
|
|
47
|
+
official = "official"
|
|
48
|
+
secret = "secret"
|
|
49
|
+
top_secret = "top-secret"
|
|
50
|
+
NoneType_None = None
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class SourceSystem(Enum):
|
|
54
|
+
back_office_appeals = "back-office-appeals"
|
|
55
|
+
back_office_applications = "back-office-applications"
|
|
56
|
+
horizon = "horizon"
|
|
57
|
+
ni_file = "ni_file"
|
|
58
|
+
sharepoint = "sharepoint"
|
|
59
|
+
NoneType_None = None
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
class Origin(Enum):
|
|
63
|
+
pins = "pins"
|
|
64
|
+
citizen = "citizen"
|
|
65
|
+
lpa = "lpa"
|
|
66
|
+
ogd = "ogd"
|
|
67
|
+
NoneType_None = None
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
class DocumentCaseStage(Enum):
|
|
71
|
+
draft = "draft"
|
|
72
|
+
pre_application = "pre-application"
|
|
73
|
+
acceptance = "acceptance"
|
|
74
|
+
pre_examination = "pre-examination"
|
|
75
|
+
examination = "examination"
|
|
76
|
+
recommendation = "recommendation"
|
|
77
|
+
decision = "decision"
|
|
78
|
+
post_decision = "post_decision"
|
|
79
|
+
withdrawn = "withdrawn"
|
|
80
|
+
developers_application = "developers_application"
|
|
81
|
+
correspondence = "correspondence"
|
|
82
|
+
field_0 = "0"
|
|
83
|
+
NoneType_None = None
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
class NsipDocument(BaseModel):
|
|
87
|
+
"""
|
|
88
|
+
NSIP document schema
|
|
89
|
+
"""
|
|
90
|
+
|
|
91
|
+
model_config = ConfigDict(
|
|
92
|
+
extra="allow",
|
|
93
|
+
)
|
|
94
|
+
documentId: str = Field(..., examples=["01c958f2-4e9f-4ce2-adf9-81038702cafa"])
|
|
95
|
+
"""
|
|
96
|
+
The unique identifier for the file. This will be different to documentReference
|
|
97
|
+
"""
|
|
98
|
+
caseId: int | None = Field(..., examples=[1])
|
|
99
|
+
"""
|
|
100
|
+
Internal case identifier
|
|
101
|
+
"""
|
|
102
|
+
caseRef: str | None = Field(..., examples=["EN010120"])
|
|
103
|
+
documentReference: str | None = Field(..., examples=["WA0110015-000002"])
|
|
104
|
+
"""
|
|
105
|
+
Reference used throughout ODT <CaseRef>-<SequenceNo>
|
|
106
|
+
"""
|
|
107
|
+
version: int = Field(..., examples=[1])
|
|
108
|
+
examinationRefNo: str | None = Field(..., examples=["XXX-0000"])
|
|
109
|
+
filename: str = Field(..., examples=["filename.pdf"])
|
|
110
|
+
"""
|
|
111
|
+
Current stored filename of the file
|
|
112
|
+
"""
|
|
113
|
+
originalFilename: str = Field(..., examples=["original_filename.pdf"])
|
|
114
|
+
"""
|
|
115
|
+
Original filename of file
|
|
116
|
+
"""
|
|
117
|
+
size: int = Field(..., examples=[23452])
|
|
118
|
+
mime: str | None = Field(..., examples=["application/pdf"])
|
|
119
|
+
documentURI: str = Field(
|
|
120
|
+
...,
|
|
121
|
+
examples=[
|
|
122
|
+
"https://pinsstdocsboprodukw001.blob.core.windows.net/document-service-uploads/application/BC0110001/01adeade-791a-483a-a51d-99df2122b5cc/1"
|
|
123
|
+
],
|
|
124
|
+
)
|
|
125
|
+
"""
|
|
126
|
+
The internal location of the document
|
|
127
|
+
"""
|
|
128
|
+
publishedDocumentURI: str | None = Field(
|
|
129
|
+
...,
|
|
130
|
+
examples=[
|
|
131
|
+
"https://pinsstdocsboprodukw001.blob.core.windows.net/published-documents/BC0110003-001-olive-oil.pdf"
|
|
132
|
+
],
|
|
133
|
+
)
|
|
134
|
+
"""
|
|
135
|
+
The location of the published document. Only applicable to documents which are published.
|
|
136
|
+
"""
|
|
137
|
+
path: str | None = Field(
|
|
138
|
+
...,
|
|
139
|
+
examples=[
|
|
140
|
+
"EN010011/2. Post-Submission/Application Documents/Application Form/Letter.PDF"
|
|
141
|
+
],
|
|
142
|
+
)
|
|
143
|
+
virusCheckStatus: VirusCheckStatus
|
|
144
|
+
fileMD5: str | None = Field(..., examples=["b1946ac92492d2347c6235b4d2611184"])
|
|
145
|
+
dateCreated: AwareDatetime = Field(..., examples=["2023-07-27T20:30:00.000Z"])
|
|
146
|
+
lastModified: AwareDatetime | None = Field(
|
|
147
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
148
|
+
)
|
|
149
|
+
caseType: CaseType
|
|
150
|
+
redactedStatus: RedactedStatus
|
|
151
|
+
publishedStatus: PublishedStatus
|
|
152
|
+
datePublished: AwareDatetime | None = Field(
|
|
153
|
+
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
154
|
+
)
|
|
155
|
+
documentType: str | None = Field(..., examples=["Rule 8 letter"])
|
|
156
|
+
securityClassification: SecurityClassification
|
|
157
|
+
sourceSystem: SourceSystem
|
|
158
|
+
origin: Origin
|
|
159
|
+
owner: str | None = None
|
|
160
|
+
author: str | None = None
|
|
161
|
+
"""
|
|
162
|
+
Name of person who authored document
|
|
163
|
+
"""
|
|
164
|
+
authorWelsh: str | None = None
|
|
165
|
+
"""
|
|
166
|
+
Welsh name of person who authored document
|
|
167
|
+
"""
|
|
168
|
+
representative: str | None = Field(..., examples=["ZZZ Agency"])
|
|
169
|
+
"""
|
|
170
|
+
The on behalf of or agent submitter of document
|
|
171
|
+
"""
|
|
172
|
+
description: str | None = Field(
|
|
173
|
+
...,
|
|
174
|
+
examples=[
|
|
175
|
+
"Attachments to the letter to Department for Business, Energy & Industrial Strategy"
|
|
176
|
+
],
|
|
177
|
+
)
|
|
178
|
+
descriptionWelsh: str | None = None
|
|
179
|
+
documentCaseStage: DocumentCaseStage
|
|
180
|
+
filter1: str | None = Field(..., examples=["Deadline 2"])
|
|
181
|
+
"""
|
|
182
|
+
Filter field to provide additional filtering
|
|
183
|
+
"""
|
|
184
|
+
filter1Welsh: str | None = None
|
|
185
|
+
"""
|
|
186
|
+
Filter field in Welsh
|
|
187
|
+
"""
|
|
188
|
+
filter2: str | None = Field(..., examples=["Scoping Option Report"])
|
|
189
|
+
"""
|
|
190
|
+
Filter field to provide additional filtering
|
|
191
|
+
"""
|
|
192
|
+
horizonFolderId: str | None = None
|
|
193
|
+
"""
|
|
194
|
+
The folder where the document exists
|
|
195
|
+
"""
|
|
196
|
+
transcriptId: str | None = None
|
|
197
|
+
"""
|
|
198
|
+
The GUID of the transcript document (if one was provided).
|
|
199
|
+
"""
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: nsip-exam-timetable.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 Type(Enum):
|
|
13
|
+
"""
|
|
14
|
+
Compulsory Acquisition Hearing/Deadline/Issue Specific Hearing etc
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
Accompanied_Site_Inspection = "Accompanied Site Inspection"
|
|
18
|
+
Compulsory_Acquisition_Hearing = "Compulsory Acquisition Hearing"
|
|
19
|
+
Deadline = "Deadline"
|
|
20
|
+
Deadline_For_Close_Of_Examination = "Deadline For Close Of Examination"
|
|
21
|
+
Issued_By = "Issued By"
|
|
22
|
+
Issue_Specific_Hearing = "Issue Specific Hearing"
|
|
23
|
+
Open_Floor_Hearing = "Open Floor Hearing"
|
|
24
|
+
Other_Meeting = "Other Meeting"
|
|
25
|
+
Preliminary_Meeting = "Preliminary Meeting"
|
|
26
|
+
Procedural_Deadline__Pre_Examination_ = "Procedural Deadline (Pre-Examination)"
|
|
27
|
+
Procedural_Decision = "Procedural Decision"
|
|
28
|
+
Publication_Of = "Publication Of"
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class LineItem(BaseModel):
|
|
32
|
+
model_config = ConfigDict(
|
|
33
|
+
extra="allow",
|
|
34
|
+
)
|
|
35
|
+
description: str
|
|
36
|
+
descriptionWelsh: str | None = None
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class Event(BaseModel):
|
|
40
|
+
model_config = ConfigDict(
|
|
41
|
+
extra="allow",
|
|
42
|
+
)
|
|
43
|
+
eventId: int
|
|
44
|
+
"""
|
|
45
|
+
Event Identifier
|
|
46
|
+
"""
|
|
47
|
+
type: Type
|
|
48
|
+
"""
|
|
49
|
+
Compulsory Acquisition Hearing/Deadline/Issue Specific Hearing etc
|
|
50
|
+
"""
|
|
51
|
+
eventTitle: str
|
|
52
|
+
"""
|
|
53
|
+
Title Of Examination Timetable Event
|
|
54
|
+
"""
|
|
55
|
+
eventTitleWelsh: str | None = None
|
|
56
|
+
"""
|
|
57
|
+
Title Of Examination Timetable Event In Welsh
|
|
58
|
+
"""
|
|
59
|
+
description: str
|
|
60
|
+
descriptionWelsh: str | None = None
|
|
61
|
+
eventDeadlineStartDate: AwareDatetime | None = Field(
|
|
62
|
+
None, examples=["2023-07-27T20:30:00.000Z"]
|
|
63
|
+
)
|
|
64
|
+
"""
|
|
65
|
+
Optional start date for event window
|
|
66
|
+
"""
|
|
67
|
+
date: AwareDatetime = Field(..., examples=["2023-07-27T20:30:00.000Z"])
|
|
68
|
+
"""
|
|
69
|
+
Event Date = effective deadline (end) date
|
|
70
|
+
"""
|
|
71
|
+
eventLineItems: list[LineItem]
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
class ExaminationTimetable(BaseModel):
|
|
75
|
+
"""
|
|
76
|
+
Examination Timetable for an NSIP Project
|
|
77
|
+
"""
|
|
78
|
+
|
|
79
|
+
model_config = ConfigDict(
|
|
80
|
+
extra="allow",
|
|
81
|
+
)
|
|
82
|
+
caseReference: str
|
|
83
|
+
"""
|
|
84
|
+
Unique string reference of the associated Case
|
|
85
|
+
"""
|
|
86
|
+
published: bool | None = None
|
|
87
|
+
"""
|
|
88
|
+
whether the Examination Timetable has been published or not
|
|
89
|
+
"""
|
|
90
|
+
events: list[Event]
|