@planning-inspectorate/data-model 2.49.0 → 2.51.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 +23 -1
- package/docs/address.md +366 -0
- package/docs/applications-application-defs-address.md +108 -0
- package/docs/applications-application-defs-contact.md +98 -0
- package/docs/applications-application-defs-organisation.md +117 -0
- package/docs/applications-application-defs.md +3 -0
- package/docs/{application-update.md → applications-application-update.md} +22 -22
- package/docs/applications-application.md +2250 -0
- package/docs/applications-notify-email-defs-contact.md +93 -0
- package/docs/applications-notify-email-defs.md +3 -0
- package/docs/applications-notify-email.md +458 -0
- package/docs/applications-representation-definitions-contact.md +93 -0
- package/docs/applications-representation-definitions-representationdocument.md +152 -0
- package/docs/applications-representation-definitions.md +3 -0
- package/docs/applications-representation.md +834 -0
- package/docs/nsip-exam-timetable-defs-event.md +1 -0
- package/docs/nsip-exam-timetable.md +1 -0
- package/package.json +1 -1
- package/pins_data_model/gen_models.py +2 -1
- package/pins_data_model/models/model_address.py +69 -0
- package/pins_data_model/models/model_appeal_document.py +11 -11
- package/pins_data_model/models/model_appeal_event.py +4 -4
- package/pins_data_model/models/model_appeal_event_estimate.py +3 -3
- package/pins_data_model/models/model_appeal_has.py +111 -93
- package/pins_data_model/models/model_appeal_representation.py +12 -12
- package/pins_data_model/models/model_appeal_s78.py +246 -228
- package/pins_data_model/models/model_application_update.py +2 -2
- package/pins_data_model/models/model_applications_application.py +518 -0
- package/pins_data_model/models/model_applications_application_update.py +55 -0
- package/pins_data_model/models/model_applications_notify_email.py +124 -0
- package/pins_data_model/models/model_applications_representation.py +207 -0
- package/pins_data_model/models/model_dart_response.py +1 -1
- package/pins_data_model/models/model_folder.py +3 -3
- package/pins_data_model/models/model_nsip_document.py +12 -12
- package/pins_data_model/models/model_nsip_exam_timetable.py +3 -2
- package/pins_data_model/models/model_nsip_invoice.py +2 -2
- package/pins_data_model/models/model_nsip_project.py +19 -19
- package/pins_data_model/models/model_nsip_project_update.py +5 -5
- package/pins_data_model/models/model_nsip_representation.py +7 -7
- package/pins_data_model/models/model_nsip_subscription.py +6 -6
- package/pins_data_model/models/model_pins_inspector.py +5 -5
- package/pins_data_model/models/model_s51_advice.py +7 -7
- package/pins_data_model/models/model_service_user.py +2 -2
- package/requirements.txt +1 -1
- package/schemas/address.schema.json +87 -0
- package/schemas/{application-update.schema.json → applications-application-update.schema.json} +1 -1
- package/schemas/applications-application.schema.json +539 -0
- package/schemas/applications-notify-email.schema.json +118 -0
- package/schemas/applications-representation.schema.json +202 -0
- package/schemas/nsip-exam-timetable.schema.json +2 -1
- package/src/enums.cjs +147 -0
- package/src/enums.d.ts +131 -0
- package/src/enums.js +131 -0
- package/src/index.cjs +147 -0
- package/src/schemas.d.ts +680 -2
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: applications-notify-email.schema.json
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
from enum import Enum, StrEnum
|
|
7
|
+
|
|
8
|
+
from pydantic import AwareDatetime, BaseModel, ConfigDict, EmailStr, Field
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class EmailStatus(StrEnum):
|
|
12
|
+
"""
|
|
13
|
+
Outcome of the email (status)
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
Sending = "Sending"
|
|
17
|
+
Delivered = "Delivered"
|
|
18
|
+
Permanent_failure = "Permanent failure"
|
|
19
|
+
Temporary_failure = "Temporary failure"
|
|
20
|
+
Technical_failure = "Technical failure"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class ContactPreference(Enum):
|
|
24
|
+
"""
|
|
25
|
+
Preferred contact method
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
email = "email"
|
|
29
|
+
post = "post"
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class Contact(BaseModel):
|
|
33
|
+
"""
|
|
34
|
+
Contact the email was sent to
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
contactId: str = Field(..., examples=["AAAAAAAA-1234-1234-1234-AAAAAAAAAAAA"])
|
|
38
|
+
"""
|
|
39
|
+
Source PK for Contact
|
|
40
|
+
"""
|
|
41
|
+
contactPreference: ContactPreference | None = Field(None, examples=["email"])
|
|
42
|
+
"""
|
|
43
|
+
Preferred contact method
|
|
44
|
+
"""
|
|
45
|
+
writtenRepOrgName: str | None = None
|
|
46
|
+
writtenRepJobTitleorRole: str | None = None
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class EmailNotificationRecordSchema(BaseModel):
|
|
50
|
+
"""
|
|
51
|
+
Email Notifications for Casework Projects
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
model_config = ConfigDict(
|
|
55
|
+
extra="allow",
|
|
56
|
+
)
|
|
57
|
+
id: str = Field(..., examples=["AAAAAAAA-1234-1234-1234-AAAAAAAAAAAA"])
|
|
58
|
+
"""
|
|
59
|
+
Internal Identifier UUID
|
|
60
|
+
"""
|
|
61
|
+
notifyId: str | None = None
|
|
62
|
+
"""
|
|
63
|
+
Id used by Notify
|
|
64
|
+
"""
|
|
65
|
+
reference: str | None = None
|
|
66
|
+
"""
|
|
67
|
+
Reference passed to notify (used to identify the case or representation it relates to)
|
|
68
|
+
"""
|
|
69
|
+
caseReference: str = Field(..., examples=["CROWN/2025/12345"])
|
|
70
|
+
"""
|
|
71
|
+
Business Key for the related case
|
|
72
|
+
"""
|
|
73
|
+
caseId: str = Field(..., examples=["AAAAAAAA-1234-1234-1234-AAAAAAAAAAAA"])
|
|
74
|
+
"""
|
|
75
|
+
The unique ID for the case this notification belongs to.
|
|
76
|
+
"""
|
|
77
|
+
caseType: str = Field(..., examples=["Crown Development Application"])
|
|
78
|
+
"""
|
|
79
|
+
The type of case this notification is for.
|
|
80
|
+
"""
|
|
81
|
+
createdDate: AwareDatetime | None = None
|
|
82
|
+
"""
|
|
83
|
+
Date the email was created
|
|
84
|
+
"""
|
|
85
|
+
createdBy: str | None = None
|
|
86
|
+
"""
|
|
87
|
+
Name of the person that triggered the email (only applies when done manually)
|
|
88
|
+
"""
|
|
89
|
+
completedDate: AwareDatetime | None = None
|
|
90
|
+
"""
|
|
91
|
+
When the email completed (succeeded or failed)
|
|
92
|
+
"""
|
|
93
|
+
email: EmailStr | None = None
|
|
94
|
+
"""
|
|
95
|
+
Email address sent to if unable to be linked to an LPA or Contact
|
|
96
|
+
"""
|
|
97
|
+
contact: list[Contact] | None = None
|
|
98
|
+
"""
|
|
99
|
+
Contact(s) the email was sent to
|
|
100
|
+
"""
|
|
101
|
+
lpaCode: str = Field(..., examples=["Z0116"])
|
|
102
|
+
"""
|
|
103
|
+
Planning Body code
|
|
104
|
+
"""
|
|
105
|
+
emailStatus: EmailStatus | None = Field(None, examples=["Delivered"])
|
|
106
|
+
"""
|
|
107
|
+
Outcome of the email (status)
|
|
108
|
+
"""
|
|
109
|
+
templateId: str | None = None
|
|
110
|
+
"""
|
|
111
|
+
The id of the template sent in Notify
|
|
112
|
+
"""
|
|
113
|
+
templateVersion: int | None = None
|
|
114
|
+
"""
|
|
115
|
+
The version of the template sent
|
|
116
|
+
"""
|
|
117
|
+
body: str | None = None
|
|
118
|
+
"""
|
|
119
|
+
The full HTML/plain text body of the email
|
|
120
|
+
"""
|
|
121
|
+
subject: str | None = None
|
|
122
|
+
"""
|
|
123
|
+
The full HTML/plain text subject of the email
|
|
124
|
+
"""
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: applications-representation.schema.json
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
from enum import Enum, StrEnum
|
|
7
|
+
|
|
8
|
+
from pydantic import AwareDatetime, BaseModel, ConfigDict, Field
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class RepresentationStatus(StrEnum):
|
|
12
|
+
Awaiting_review = "Awaiting review"
|
|
13
|
+
Accepted = "Accepted"
|
|
14
|
+
Rejected = "Rejected"
|
|
15
|
+
Withdrawn = "Withdrawn"
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class SubmittedFor(StrEnum):
|
|
19
|
+
Myself = "Myself"
|
|
20
|
+
On_behalf_of_another_person_or_an_organisation = (
|
|
21
|
+
"On behalf of another person or an organisation"
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class SubmittedReceivedMethod(Enum):
|
|
26
|
+
"""
|
|
27
|
+
How we received the representation
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
Online = "Online"
|
|
31
|
+
Phone = "Phone"
|
|
32
|
+
Email = "Email"
|
|
33
|
+
Post = "Post"
|
|
34
|
+
In_person = "In person"
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class RepresentedType(Enum):
|
|
38
|
+
"""
|
|
39
|
+
When representation is on behalf of a person/org/group
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
A_person = "A person"
|
|
43
|
+
An_organisation_or_charity_I_work_or_volunteer_for = (
|
|
44
|
+
"An organisation or charity I work or volunteer for"
|
|
45
|
+
)
|
|
46
|
+
An_organisation_or_charity_I_do_not_work_or_volunteer_for = (
|
|
47
|
+
"An organisation or charity I do not work or volunteer for"
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class RepresentedCategory(Enum):
|
|
52
|
+
Consultees = "Consultees"
|
|
53
|
+
Interested_party = "Interested party"
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class WithdrawalReason(Enum):
|
|
57
|
+
"""
|
|
58
|
+
Reason for the withdrawal
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
Change_of_opinion = "Change of opinion"
|
|
62
|
+
Mistaken_Submission = "Mistaken Submission"
|
|
63
|
+
Misunderstanding = "Misunderstanding"
|
|
64
|
+
Personal_Reasons = "Personal Reasons"
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class ContactPreference(Enum):
|
|
68
|
+
email = "email"
|
|
69
|
+
post = "post"
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class Contact(BaseModel):
|
|
73
|
+
contactId: str = Field(..., examples=["AAAAAAAA-1234-1234-1234-AAAAAAAAAAAA"])
|
|
74
|
+
"""
|
|
75
|
+
Source PK for Contact
|
|
76
|
+
"""
|
|
77
|
+
contactPreference: ContactPreference | None = Field(None, examples=["email"])
|
|
78
|
+
writtenRepOrgName: str | None = None
|
|
79
|
+
writtenRepJobTitleorRole: str | None = None
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
class Status(StrEnum):
|
|
83
|
+
"""
|
|
84
|
+
The status of the document
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
Awaiting_review = "Awaiting review"
|
|
88
|
+
Accepted = "Accepted"
|
|
89
|
+
Rejected = "Rejected"
|
|
90
|
+
Withdrawn = "Withdrawn"
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
class RepresentationDocument(BaseModel):
|
|
94
|
+
id: str = Field(..., examples=["AAAAAAAA-1234-1234-1234-AAAAAAAAAAAA"])
|
|
95
|
+
"""
|
|
96
|
+
Source Key for Representation Document
|
|
97
|
+
"""
|
|
98
|
+
representationId: str = Field(
|
|
99
|
+
..., examples=["AAAAAAAA-1234-1234-1234-AAAAAAAAAAAA"]
|
|
100
|
+
)
|
|
101
|
+
"""
|
|
102
|
+
The representation this relates to
|
|
103
|
+
"""
|
|
104
|
+
itemId: str
|
|
105
|
+
"""
|
|
106
|
+
The id of the item in SharePoint
|
|
107
|
+
"""
|
|
108
|
+
fileName: str
|
|
109
|
+
"""
|
|
110
|
+
The name of the file
|
|
111
|
+
"""
|
|
112
|
+
redactedItemId: str | None = None
|
|
113
|
+
"""
|
|
114
|
+
The id of the redacted version of the item in sharepoint
|
|
115
|
+
"""
|
|
116
|
+
redactedFileName: str | None = None
|
|
117
|
+
"""
|
|
118
|
+
the name of the redacted file
|
|
119
|
+
"""
|
|
120
|
+
status: Status
|
|
121
|
+
"""
|
|
122
|
+
The status of the document
|
|
123
|
+
"""
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
class CaseworkRepresentationSchema(BaseModel):
|
|
127
|
+
"""
|
|
128
|
+
Representations and related document metadata for Casework Projects
|
|
129
|
+
"""
|
|
130
|
+
|
|
131
|
+
model_config = ConfigDict(
|
|
132
|
+
extra="allow",
|
|
133
|
+
)
|
|
134
|
+
id: str = Field(..., examples=["AAAAAAAA-1234-1234-1234-AAAAAAAAAAAA"])
|
|
135
|
+
"""
|
|
136
|
+
Primary key
|
|
137
|
+
"""
|
|
138
|
+
reference: str
|
|
139
|
+
"""
|
|
140
|
+
Auto-generated hexadecimal reference: AAAAA-BBBBB
|
|
141
|
+
"""
|
|
142
|
+
caseReference: str = Field(..., examples=["CROWN/2025/12345"])
|
|
143
|
+
"""
|
|
144
|
+
Business Key for the related case
|
|
145
|
+
"""
|
|
146
|
+
caseId: str = Field(..., examples=["AAAAAAAA-1234-1234-1234-AAAAAAAAAAAA"])
|
|
147
|
+
"""
|
|
148
|
+
The unique ID for the case this representation belongs to.
|
|
149
|
+
"""
|
|
150
|
+
caseType: str = Field(..., examples=["Crown Development Application"])
|
|
151
|
+
"""
|
|
152
|
+
The type of case this representation is for.
|
|
153
|
+
"""
|
|
154
|
+
representationStatus: RepresentationStatus | None = None
|
|
155
|
+
submittedFor: SubmittedFor
|
|
156
|
+
submittedByContact: list[Contact] | None = None
|
|
157
|
+
submittedByAgentFlag: bool | None = None
|
|
158
|
+
submittedByAgentOrgName: str | None = None
|
|
159
|
+
submittedDate: AwareDatetime
|
|
160
|
+
submittedReceivedMethod: SubmittedReceivedMethod | None = None
|
|
161
|
+
"""
|
|
162
|
+
How we received the representation
|
|
163
|
+
"""
|
|
164
|
+
submissionMethodReason: str | None = None
|
|
165
|
+
comment: str
|
|
166
|
+
commentRedacted: str | None = None
|
|
167
|
+
"""
|
|
168
|
+
redacted version of the comment, null if not redacted
|
|
169
|
+
"""
|
|
170
|
+
representedType: RepresentedType | None = None
|
|
171
|
+
"""
|
|
172
|
+
When representation is on behalf of a person/org/group
|
|
173
|
+
"""
|
|
174
|
+
representedContact: list[Contact] | None = None
|
|
175
|
+
"""
|
|
176
|
+
When representation is on behalf of a person/org/group
|
|
177
|
+
"""
|
|
178
|
+
representedCategory: RepresentedCategory | None = None
|
|
179
|
+
wantsToBeHeard: bool | None = None
|
|
180
|
+
"""
|
|
181
|
+
Internal: wants to be heard at a hearing
|
|
182
|
+
"""
|
|
183
|
+
containsAttachments: bool | None = None
|
|
184
|
+
"""
|
|
185
|
+
Is a document attached to the representation
|
|
186
|
+
"""
|
|
187
|
+
sharePointFolderCreated: bool | None = None
|
|
188
|
+
"""
|
|
189
|
+
to avoid creating new folders for documents when managing representations
|
|
190
|
+
"""
|
|
191
|
+
distressingContentInRepresentation: bool | None = None
|
|
192
|
+
"""
|
|
193
|
+
Flags the representation as containing distressing content
|
|
194
|
+
"""
|
|
195
|
+
withdrawalRequestDate: AwareDatetime | None = None
|
|
196
|
+
"""
|
|
197
|
+
Date the representing party requested that the representation be withdrawn
|
|
198
|
+
"""
|
|
199
|
+
withdrawalReason: WithdrawalReason | None = None
|
|
200
|
+
"""
|
|
201
|
+
Reason for the withdrawal
|
|
202
|
+
"""
|
|
203
|
+
dateWithdrawn: AwareDatetime | None = None
|
|
204
|
+
"""
|
|
205
|
+
Date the representation was withdrawn
|
|
206
|
+
"""
|
|
207
|
+
representationDocuments: list[RepresentationDocument] | None = None
|
|
@@ -14,7 +14,7 @@ class NeighbouringSiteAddress(BaseModel):
|
|
|
14
14
|
"""
|
|
15
15
|
First line of address of the neighbouring site
|
|
16
16
|
"""
|
|
17
|
-
neighbouringSiteAddressLine2: str | None
|
|
17
|
+
neighbouringSiteAddressLine2: str | None
|
|
18
18
|
"""
|
|
19
19
|
Second line of address of the neighbouring site
|
|
20
20
|
"""
|
|
@@ -44,12 +44,12 @@ class Folder(BaseModel):
|
|
|
44
44
|
"""
|
|
45
45
|
Folder display name in English.
|
|
46
46
|
"""
|
|
47
|
-
displayNameWelsh: str | None
|
|
47
|
+
displayNameWelsh: str | None
|
|
48
48
|
"""
|
|
49
49
|
Folder display name in Welsh.
|
|
50
50
|
"""
|
|
51
|
-
parentFolderId: int | None
|
|
51
|
+
parentFolderId: int | None
|
|
52
52
|
"""
|
|
53
53
|
Optional parent folder ID.
|
|
54
54
|
"""
|
|
55
|
-
caseStage: CaseStage
|
|
55
|
+
caseStage: CaseStage | None
|
|
@@ -147,24 +147,24 @@ class NsipDocument(BaseModel):
|
|
|
147
147
|
"EN010011/2. Post-Submission/Application Documents/Application Form/Letter.PDF"
|
|
148
148
|
],
|
|
149
149
|
)
|
|
150
|
-
virusCheckStatus: VirusCheckStatus
|
|
150
|
+
virusCheckStatus: VirusCheckStatus | None
|
|
151
151
|
fileMD5: str | None = Field(..., examples=["b1946ac92492d2347c6235b4d2611184"])
|
|
152
152
|
dateCreated: AwareDatetime = Field(..., examples=["2023-07-27T20:30:00.000Z"])
|
|
153
153
|
lastModified: AwareDatetime | None = Field(
|
|
154
154
|
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
155
155
|
)
|
|
156
|
-
caseType: CaseType
|
|
157
|
-
redactedStatus: RedactedStatus
|
|
158
|
-
publishedStatus: PublishedStatus
|
|
156
|
+
caseType: CaseType | None
|
|
157
|
+
redactedStatus: RedactedStatus | None
|
|
158
|
+
publishedStatus: PublishedStatus | None
|
|
159
159
|
datePublished: AwareDatetime | None = Field(
|
|
160
160
|
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
161
161
|
)
|
|
162
162
|
documentType: str | None = Field(..., examples=["Rule 8 letter"])
|
|
163
|
-
securityClassification: SecurityClassification
|
|
164
|
-
sourceSystem: SourceSystem
|
|
165
|
-
origin: Origin
|
|
166
|
-
owner: str | None
|
|
167
|
-
author: str | None
|
|
163
|
+
securityClassification: SecurityClassification | None
|
|
164
|
+
sourceSystem: SourceSystem | None
|
|
165
|
+
origin: Origin | None
|
|
166
|
+
owner: str | None
|
|
167
|
+
author: str | None
|
|
168
168
|
"""
|
|
169
169
|
Name of person who authored document
|
|
170
170
|
"""
|
|
@@ -183,7 +183,7 @@ class NsipDocument(BaseModel):
|
|
|
183
183
|
],
|
|
184
184
|
)
|
|
185
185
|
descriptionWelsh: str | None = None
|
|
186
|
-
documentCaseStage: DocumentCaseStage
|
|
186
|
+
documentCaseStage: DocumentCaseStage | None
|
|
187
187
|
filter1: str | None = Field(..., examples=["Deadline 2"])
|
|
188
188
|
"""
|
|
189
189
|
Filter field to provide additional filtering
|
|
@@ -196,11 +196,11 @@ class NsipDocument(BaseModel):
|
|
|
196
196
|
"""
|
|
197
197
|
Filter field to provide additional filtering
|
|
198
198
|
"""
|
|
199
|
-
horizonFolderId: str | None
|
|
199
|
+
horizonFolderId: str | None
|
|
200
200
|
"""
|
|
201
201
|
The folder where the document exists
|
|
202
202
|
"""
|
|
203
|
-
transcriptId: str | None
|
|
203
|
+
transcriptId: str | None
|
|
204
204
|
"""
|
|
205
205
|
The GUID of the transcript document (if one was provided).
|
|
206
206
|
"""
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
6
|
-
from enum import
|
|
6
|
+
from enum import StrEnum
|
|
7
7
|
|
|
8
8
|
from pydantic import AwareDatetime, BaseModel, ConfigDict, Field
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class Type(
|
|
11
|
+
class Type(StrEnum):
|
|
12
12
|
"""
|
|
13
13
|
Compulsory Acquisition Hearing/Deadline/Issue Specific Hearing etc
|
|
14
14
|
"""
|
|
@@ -25,6 +25,7 @@ class Type(Enum):
|
|
|
25
25
|
Procedural_Deadline__Pre_Examination_ = "Procedural Deadline (Pre-Examination)"
|
|
26
26
|
Procedural_Decision = "Procedural Decision"
|
|
27
27
|
Publication_Of = "Publication Of"
|
|
28
|
+
Unaccompanied_Site_Inspection = "Unaccompanied Site Inspection"
|
|
28
29
|
|
|
29
30
|
|
|
30
31
|
class LineItem(BaseModel):
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
6
|
-
from enum import
|
|
6
|
+
from enum import StrEnum
|
|
7
7
|
|
|
8
8
|
from pydantic import AwareDatetime, BaseModel, ConfigDict, Field
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class InvoiceStage(
|
|
11
|
+
class InvoiceStage(StrEnum):
|
|
12
12
|
"""
|
|
13
13
|
Invoice stage
|
|
14
14
|
"""
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
6
|
-
from enum import Enum
|
|
6
|
+
from enum import Enum, StrEnum
|
|
7
7
|
from typing import Any
|
|
8
8
|
|
|
9
9
|
from pydantic import AwareDatetime, BaseModel, ConfigDict, Field
|
|
@@ -85,7 +85,7 @@ class ProjectType(Enum):
|
|
|
85
85
|
NoneType_None = None
|
|
86
86
|
|
|
87
87
|
|
|
88
|
-
class SourceSystem(
|
|
88
|
+
class SourceSystem(StrEnum):
|
|
89
89
|
back_office_applications = "back-office-applications"
|
|
90
90
|
horizon = "horizon"
|
|
91
91
|
|
|
@@ -107,7 +107,7 @@ class Stage(Enum):
|
|
|
107
107
|
NoneType_None = None
|
|
108
108
|
|
|
109
109
|
|
|
110
|
-
class Region(
|
|
110
|
+
class Region(StrEnum):
|
|
111
111
|
"""
|
|
112
112
|
Geographical region of UK. Applications can cover multiple regions.
|
|
113
113
|
"""
|
|
@@ -340,7 +340,7 @@ class Meeting(BaseModel):
|
|
|
340
340
|
"""
|
|
341
341
|
|
|
342
342
|
|
|
343
|
-
class InvoiceStage(
|
|
343
|
+
class InvoiceStage(StrEnum):
|
|
344
344
|
"""
|
|
345
345
|
Invoice stage
|
|
346
346
|
"""
|
|
@@ -436,21 +436,21 @@ class NsipProject(BaseModel):
|
|
|
436
436
|
],
|
|
437
437
|
)
|
|
438
438
|
projectDescriptionWelsh: str | None = None
|
|
439
|
-
decision: Decision
|
|
439
|
+
decision: Decision | None
|
|
440
440
|
"""
|
|
441
441
|
Decision outcome: approved/refused/split-decision/granted/partially_consented/quashed/redetermination/withdrawn
|
|
442
442
|
"""
|
|
443
|
-
publishStatus: PublishStatus
|
|
444
|
-
sector: Sector
|
|
443
|
+
publishStatus: PublishStatus | None
|
|
444
|
+
sector: Sector | None
|
|
445
445
|
"""
|
|
446
446
|
{Sector Abbreviation} - {Sector Display Name}
|
|
447
447
|
"""
|
|
448
|
-
projectType: ProjectType
|
|
448
|
+
projectType: ProjectType | None
|
|
449
449
|
"""
|
|
450
450
|
{SubSector Abbreviation} - {SubSector Display Name}
|
|
451
451
|
"""
|
|
452
452
|
sourceSystem: SourceSystem
|
|
453
|
-
stage: Stage
|
|
453
|
+
stage: Stage | None
|
|
454
454
|
"""
|
|
455
455
|
Process stage identifier
|
|
456
456
|
"""
|
|
@@ -490,11 +490,11 @@ class NsipProject(BaseModel):
|
|
|
490
490
|
"""
|
|
491
491
|
Welsh Language translation required.
|
|
492
492
|
"""
|
|
493
|
-
mapZoomLevel: MapZoomLevel
|
|
493
|
+
mapZoomLevel: MapZoomLevel | None
|
|
494
494
|
"""
|
|
495
495
|
Resolution of pinned map. Set when co-ordinates are created.
|
|
496
496
|
"""
|
|
497
|
-
secretaryOfState: str | None
|
|
497
|
+
secretaryOfState: str | None
|
|
498
498
|
"""
|
|
499
499
|
Relevant Government Department. [TODO]
|
|
500
500
|
"""
|
|
@@ -705,38 +705,38 @@ class NsipProject(BaseModel):
|
|
|
705
705
|
"""
|
|
706
706
|
DateProjectWithdrawn by applicant
|
|
707
707
|
"""
|
|
708
|
-
operationsLeadId: str | None
|
|
708
|
+
operationsLeadId: str | None
|
|
709
709
|
"""
|
|
710
710
|
Maps to [Employee].[EmployeeID].
|
|
711
711
|
"""
|
|
712
|
-
operationsManagerId: str | None
|
|
712
|
+
operationsManagerId: str | None
|
|
713
713
|
"""
|
|
714
714
|
New NSIP role, Maps to [Employee].[EmployeeID]
|
|
715
715
|
"""
|
|
716
|
-
caseManagerId: str | None
|
|
716
|
+
caseManagerId: str | None
|
|
717
717
|
"""
|
|
718
718
|
Maps to [Employee].[EmployeeID]
|
|
719
719
|
"""
|
|
720
720
|
nsipOfficerIds: list[str]
|
|
721
721
|
nsipAdministrationOfficerIds: list[str]
|
|
722
|
-
leadInspectorId: str | None
|
|
722
|
+
leadInspectorId: str | None
|
|
723
723
|
"""
|
|
724
724
|
Maps to [Employee].[EmployeeID]
|
|
725
725
|
"""
|
|
726
726
|
inspectorIds: list[str]
|
|
727
|
-
environmentalServicesOfficerId: str | None
|
|
727
|
+
environmentalServicesOfficerId: str | None
|
|
728
728
|
"""
|
|
729
729
|
Maps to [Employee].[EmployeeID]
|
|
730
730
|
"""
|
|
731
|
-
legalOfficerId: str | None
|
|
731
|
+
legalOfficerId: str | None
|
|
732
732
|
"""
|
|
733
733
|
Maps to [Employee].[EmployeeID]
|
|
734
734
|
"""
|
|
735
|
-
applicantId: str | None
|
|
735
|
+
applicantId: str | None
|
|
736
736
|
"""
|
|
737
737
|
Maps to [ServiceUser].[id] where the serviceUserType is Applicant
|
|
738
738
|
"""
|
|
739
|
-
migrationStatus: bool | None
|
|
739
|
+
migrationStatus: bool | None
|
|
740
740
|
"""
|
|
741
741
|
Has this case been migrated from the legacy system? True if so.
|
|
742
742
|
"""
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
6
|
-
from enum import
|
|
6
|
+
from enum import StrEnum
|
|
7
7
|
|
|
8
8
|
from pydantic import AwareDatetime, BaseModel, ConfigDict
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class UpdateStatus(
|
|
11
|
+
class UpdateStatus(StrEnum):
|
|
12
12
|
"""
|
|
13
13
|
The current status of this update
|
|
14
14
|
"""
|
|
@@ -37,11 +37,11 @@ class NsipProjectUpdate(BaseModel):
|
|
|
37
37
|
"""
|
|
38
38
|
the case reference this update relates to
|
|
39
39
|
"""
|
|
40
|
-
updateDate: AwareDatetime | None
|
|
40
|
+
updateDate: AwareDatetime | None
|
|
41
41
|
"""
|
|
42
42
|
The date the update was published
|
|
43
43
|
"""
|
|
44
|
-
updateName: str | None
|
|
44
|
+
updateName: str | None
|
|
45
45
|
"""
|
|
46
46
|
Internal title or name of the update
|
|
47
47
|
"""
|
|
@@ -49,7 +49,7 @@ class NsipProjectUpdate(BaseModel):
|
|
|
49
49
|
"""
|
|
50
50
|
HTML content of the update in English. Can only include `<a> <b> <ul> <li>` tags.
|
|
51
51
|
"""
|
|
52
|
-
updateContentWelsh: str | None
|
|
52
|
+
updateContentWelsh: str | None
|
|
53
53
|
"""
|
|
54
54
|
HTML content of the update in Welsh. Can only include `<a> <b> <ul> <li>` tags.
|
|
55
55
|
"""
|
|
@@ -62,22 +62,22 @@ class Representation(BaseModel):
|
|
|
62
62
|
"""
|
|
63
63
|
The unique identifier within the Back Office. This is not the same as the case reference
|
|
64
64
|
"""
|
|
65
|
-
status: Status
|
|
65
|
+
status: Status | None
|
|
66
66
|
originalRepresentation: str
|
|
67
|
-
redacted: bool | None
|
|
68
|
-
redactedRepresentation: str | None
|
|
67
|
+
redacted: bool | None
|
|
68
|
+
redactedRepresentation: str | None
|
|
69
69
|
redactedBy: str | None = Field(..., examples=["Joe Blogs"])
|
|
70
70
|
redactedNotes: str | None = Field(..., examples=["Removed names of family members"])
|
|
71
|
-
representationFrom: RepresentationFrom
|
|
71
|
+
representationFrom: RepresentationFrom | None
|
|
72
72
|
representedId: str
|
|
73
73
|
"""
|
|
74
74
|
ServiceUser Id of the person or organisation being represented
|
|
75
75
|
"""
|
|
76
|
-
representativeId: str | None
|
|
76
|
+
representativeId: str | None
|
|
77
77
|
"""
|
|
78
78
|
ServiceUser Id of the person or organisation submitting representation in the case of Agent representationFrom
|
|
79
79
|
"""
|
|
80
|
-
registerFor: RegisterFor
|
|
81
|
-
representationType: RepresentationType
|
|
80
|
+
registerFor: RegisterFor | None
|
|
81
|
+
representationType: RepresentationType | None
|
|
82
82
|
dateReceived: AwareDatetime = Field(..., examples=["2023-07-27T20:30:00.000Z"])
|
|
83
83
|
attachmentIds: list[str]
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
6
|
-
from enum import Enum
|
|
6
|
+
from enum import Enum, StrEnum
|
|
7
7
|
|
|
8
8
|
from pydantic import AwareDatetime, BaseModel, ConfigDict, EmailStr, Field
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class SubscriptionType(
|
|
11
|
+
class SubscriptionType(StrEnum):
|
|
12
12
|
"""
|
|
13
13
|
which update does the subscriber want to get notified of. For multiple types, use multiple messages.
|
|
14
14
|
"""
|
|
@@ -33,7 +33,7 @@ class NsipSubscription(BaseModel):
|
|
|
33
33
|
model_config = ConfigDict(
|
|
34
34
|
extra="allow",
|
|
35
35
|
)
|
|
36
|
-
subscriptionId: int | None
|
|
36
|
+
subscriptionId: int | None
|
|
37
37
|
"""
|
|
38
38
|
The unique identifier within the Back Office. Ignored as part of register-nsip-subscription.
|
|
39
39
|
"""
|
|
@@ -48,12 +48,12 @@ class NsipSubscription(BaseModel):
|
|
|
48
48
|
"""
|
|
49
49
|
which update does the subscriber want to get notified of. For multiple types, use multiple messages.
|
|
50
50
|
"""
|
|
51
|
-
startDate: AwareDatetime | None
|
|
51
|
+
startDate: AwareDatetime | None
|
|
52
52
|
"""
|
|
53
53
|
The date to start getting updates
|
|
54
54
|
"""
|
|
55
|
-
endDate: AwareDatetime | None
|
|
55
|
+
endDate: AwareDatetime | None
|
|
56
56
|
"""
|
|
57
57
|
The date to stop getting updates
|
|
58
58
|
"""
|
|
59
|
-
language: Language
|
|
59
|
+
language: Language | None
|