@planning-inspectorate/data-model 2.50.0 → 2.51.1
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/commitlint.config.js +3 -8
- package/docs/address.md +1 -1
- package/docs/nsip-exam-timetable-defs-event.md +1 -0
- package/docs/nsip-exam-timetable.md +1 -0
- package/eslint.config.js +3 -20
- package/load-test/appeals/generate-appeals-messages.js +1 -1
- package/load-test/appeals/run-load-script.js +2 -2
- package/load-test/service-bus-client.js +1 -1
- package/package.json +5 -2
- package/pins_data_model/gen_models.py +2 -1
- package/pins_data_model/models/model_address.py +3 -3
- 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 +4 -4
- package/pins_data_model/models/model_applications_application_update.py +2 -2
- package/pins_data_model/models/model_applications_notify_email.py +2 -2
- package/pins_data_model/models/model_applications_representation.py +4 -4
- 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/prettier.config.js +13 -0
- package/requirements.txt +1 -1
- package/schemas/address.schema.json +1 -1
- package/schemas/nsip-exam-timetable.schema.json +2 -1
- package/src/index.cjs +1 -1
- package/src/lib/gen-docs.js +1 -1
- package/src/lib/gen-enum-impl.test.js +1 -1
- package/src/lib/gen-enums.js +1 -1
- package/src/lib/gen-types.js +2 -2
- package/src/lib/load.js +1 -1
- package/src/schemas.d.ts +30 -2
- package/tests/appeals/appeal-event.test.js +2 -2
- package/tests/appeals/appeal-has.test.js +2 -2
- package/tests/appeals/appeal-s78.test.js +2 -2
- package/tests/appeals/commands/adverts-questionnaire.test.js +2 -2
- package/tests/appeals/commands/adverts-submission.test.js +2 -2
- package/tests/appeals/commands/appeal-representation-submission.test.js +2 -2
- package/tests/appeals/commands/cas-adverts-questionnaire.test.js +2 -2
- package/tests/appeals/commands/cas-adverts-submission.test.js +2 -2
- package/tests/appeals/commands/enforcement-listed-questionnaire.test.js +2 -2
- package/tests/appeals/commands/enforcement-listed-submission.test.js +2 -2
- package/tests/appeals/commands/enforcement-notice-submission.test.js +2 -2
- package/tests/appeals/commands/enforcement-questionnaire.test.js +2 -2
- package/tests/appeals/commands/has-questionnaire.test.js +2 -2
- package/tests/appeals/commands/has-submission.test.js +2 -2
- package/tests/appeals/commands/ldc-questionnaire.test.js +2 -2
- package/tests/appeals/commands/ldc-submission.test.js +2 -2
- package/tests/appeals/commands/s20-questionnaire.test.js +2 -2
- package/tests/appeals/commands/s78-questionnaire.test.js +2 -2
- package/tests/appeals/commands/s78-submission.test.js +2 -2
- package/tests/appeals/expedited-appeals.test.js +2 -2
- package/tests/schemas.test.js +1 -1
- package/.prettierrc +0 -19
|
@@ -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 ApplicationUpdateStatus(
|
|
11
|
+
class ApplicationUpdateStatus(StrEnum):
|
|
12
12
|
"""
|
|
13
13
|
Application Update Status. Name displayed to users, e.g. Draft
|
|
14
14
|
"""
|
|
@@ -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, Field
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class Type(
|
|
11
|
+
class Type(StrEnum):
|
|
12
12
|
"""
|
|
13
13
|
Type of application. Name displayed to users
|
|
14
14
|
"""
|
|
@@ -35,7 +35,7 @@ class SubType(Enum):
|
|
|
35
35
|
Listed_building_consent__LBC_ = "Listed building consent (LBC)"
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
class ApplicationStatus(
|
|
38
|
+
class ApplicationStatus(StrEnum):
|
|
39
39
|
"""
|
|
40
40
|
Current status of the case (enum)
|
|
41
41
|
"""
|
|
@@ -128,7 +128,7 @@ class Procedure(Enum):
|
|
|
128
128
|
Inquiry = "Inquiry"
|
|
129
129
|
|
|
130
130
|
|
|
131
|
-
class RoleType(
|
|
131
|
+
class RoleType(StrEnum):
|
|
132
132
|
"""
|
|
133
133
|
Agent or Applicant details
|
|
134
134
|
"""
|
|
@@ -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 ApplicationUpdateStatus(
|
|
11
|
+
class ApplicationUpdateStatus(StrEnum):
|
|
12
12
|
"""
|
|
13
13
|
Application Update Status. Name displayed to users, e.g. Draft
|
|
14
14
|
"""
|
|
@@ -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 EmailStatus(
|
|
11
|
+
class EmailStatus(StrEnum):
|
|
12
12
|
"""
|
|
13
13
|
Outcome of the email (status)
|
|
14
14
|
"""
|
|
@@ -3,19 +3,19 @@
|
|
|
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, Field
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class RepresentationStatus(
|
|
11
|
+
class RepresentationStatus(StrEnum):
|
|
12
12
|
Awaiting_review = "Awaiting review"
|
|
13
13
|
Accepted = "Accepted"
|
|
14
14
|
Rejected = "Rejected"
|
|
15
15
|
Withdrawn = "Withdrawn"
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
class SubmittedFor(
|
|
18
|
+
class SubmittedFor(StrEnum):
|
|
19
19
|
Myself = "Myself"
|
|
20
20
|
On_behalf_of_another_person_or_an_organisation = (
|
|
21
21
|
"On behalf of another person or an organisation"
|
|
@@ -79,7 +79,7 @@ class Contact(BaseModel):
|
|
|
79
79
|
writtenRepJobTitleorRole: str | None = None
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
class Status(
|
|
82
|
+
class Status(StrEnum):
|
|
83
83
|
"""
|
|
84
84
|
The status of the document
|
|
85
85
|
"""
|
|
@@ -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
|
|
@@ -10,11 +10,11 @@ class Address(BaseModel):
|
|
|
10
10
|
model_config = ConfigDict(
|
|
11
11
|
extra="allow",
|
|
12
12
|
)
|
|
13
|
-
addressLine1: str | None
|
|
14
|
-
addressLine2: str | None
|
|
15
|
-
townCity: str | None
|
|
16
|
-
county: str | None
|
|
17
|
-
postcode: str | None
|
|
13
|
+
addressLine1: str | None
|
|
14
|
+
addressLine2: str | None
|
|
15
|
+
townCity: str | None
|
|
16
|
+
county: str | None
|
|
17
|
+
postcode: str | None
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
class Specialism(BaseModel):
|
|
@@ -65,11 +65,11 @@ class S51Advice(BaseModel):
|
|
|
65
65
|
"""
|
|
66
66
|
Who the enquiry is from
|
|
67
67
|
"""
|
|
68
|
-
agent: str | None
|
|
68
|
+
agent: str | None
|
|
69
69
|
"""
|
|
70
70
|
Who the enquiry is on behalf of
|
|
71
71
|
"""
|
|
72
|
-
method: Method
|
|
72
|
+
method: Method | None
|
|
73
73
|
"""
|
|
74
74
|
How the enquiry was made
|
|
75
75
|
"""
|
|
@@ -79,7 +79,7 @@ class S51Advice(BaseModel):
|
|
|
79
79
|
"""
|
|
80
80
|
Date the enquiry was made
|
|
81
81
|
"""
|
|
82
|
-
enquiryDetails: str | None
|
|
82
|
+
enquiryDetails: str | None
|
|
83
83
|
"""
|
|
84
84
|
Details of the enquiry
|
|
85
85
|
"""
|
|
@@ -87,7 +87,7 @@ class S51Advice(BaseModel):
|
|
|
87
87
|
"""
|
|
88
88
|
Details of the enquiry in Welsh
|
|
89
89
|
"""
|
|
90
|
-
adviceGivenBy: str | None
|
|
90
|
+
adviceGivenBy: str | None
|
|
91
91
|
"""
|
|
92
92
|
Who issued the advice
|
|
93
93
|
"""
|
|
@@ -95,7 +95,7 @@ class S51Advice(BaseModel):
|
|
|
95
95
|
"""
|
|
96
96
|
Date the advice was given
|
|
97
97
|
"""
|
|
98
|
-
adviceDetails: str | None
|
|
98
|
+
adviceDetails: str | None
|
|
99
99
|
"""
|
|
100
100
|
Details of the advice
|
|
101
101
|
"""
|
|
@@ -103,6 +103,6 @@ class S51Advice(BaseModel):
|
|
|
103
103
|
"""
|
|
104
104
|
Details of the advice in Welsh
|
|
105
105
|
"""
|
|
106
|
-
status: Status
|
|
107
|
-
redactionStatus: RedactionStatus
|
|
106
|
+
status: Status | None
|
|
107
|
+
redactionStatus: RedactionStatus | None
|
|
108
108
|
attachmentIds: list[str]
|
|
@@ -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 BaseModel, ConfigDict, Field
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class ServiceUserType(
|
|
11
|
+
class ServiceUserType(StrEnum):
|
|
12
12
|
"""
|
|
13
13
|
Type or category of the service user.
|
|
14
14
|
"""
|
package/requirements.txt
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
datamodel-code-generator==0.
|
|
1
|
+
datamodel-code-generator==0.64.0
|
|
2
2
|
jsonc-parser==1.1.0
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"UPRN": {
|
|
76
76
|
"type": ["string", "null"],
|
|
77
77
|
"example": 100023336956,
|
|
78
|
-
"description": "The Unique Property Reference Number (UPRN) is a unique number (a geocode) for every addressable location
|
|
78
|
+
"description": "The Unique Property Reference Number (UPRN) is a unique number (a geocode) for every addressable location - e.g., a building, a bus stop, a post box, a feature in the landscape, or a defibrillator - in Great Britain."
|
|
79
79
|
},
|
|
80
80
|
"dependentRequired": {
|
|
81
81
|
"easting": ["northing"],
|
package/src/index.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var path = require('path');
|
|
4
4
|
var url = require('url');
|
|
5
|
-
var promises = require('fs/promises');
|
|
6
5
|
var fs = require('fs');
|
|
6
|
+
var promises = require('fs/promises');
|
|
7
7
|
var jsoncParser = require('jsonc-parser');
|
|
8
8
|
|
|
9
9
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
package/src/lib/gen-docs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import assert from 'node:assert';
|
|
1
2
|
import { describe, it } from 'node:test';
|
|
2
3
|
import { collectEnumProps, generateConstants, generateEnumMap } from './gen-enum-impl.js';
|
|
3
|
-
import assert from 'node:assert';
|
|
4
4
|
|
|
5
5
|
describe('gen-enum-impl', () => {
|
|
6
6
|
describe('generateConstants', () => {
|
package/src/lib/gen-enums.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import fs from 'fs/promises';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { loadAllSchemas } from '../index.js';
|
|
4
|
-
import { loadSchema } from './load.js';
|
|
5
4
|
import { collectEnumProps, generateConstants, generateEnumMap } from './gen-enum-impl.js';
|
|
5
|
+
import { loadSchema } from './load.js';
|
|
6
6
|
|
|
7
7
|
const __dirname = import.meta.dirname;
|
|
8
8
|
|
package/src/lib/gen-types.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import fs from 'fs/promises';
|
|
2
|
+
import { compile } from 'json-schema-to-typescript';
|
|
3
|
+
import { generateName } from 'json-schema-to-typescript/dist/src/utils.js';
|
|
2
4
|
import path from 'path';
|
|
3
5
|
import url from 'url';
|
|
4
6
|
import { commandsPath, loadAllSchemas, schemasPath } from '../index.js';
|
|
5
|
-
import { compile } from 'json-schema-to-typescript';
|
|
6
|
-
import { generateName } from 'json-schema-to-typescript/dist/src/utils.js';
|
|
7
7
|
|
|
8
8
|
const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
|
|
9
9
|
|