@planning-inspectorate/data-model 2.29.0 → 2.30.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.
@@ -627,6 +627,7 @@ The type of document, used for exchange, migrations and consumption from the app
627
627
  | `"groundISupporting"` | |
628
628
  | `"groundJSupporting"` | |
629
629
  | `"groundKSupporting"` | |
630
+ | `"discontinuanceNotice"` | |
630
631
  | `null` | |
631
632
 
632
633
  ## sourceSystem
@@ -0,0 +1,35 @@
1
+ ## if Type
2
+
3
+ unknown
4
+
5
+ # if Properties
6
+
7
+ | Property | Type | Required | Nullable | Defined by |
8
+ | :-------------------------------------------------------------------- | :------------ | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------- |
9
+ | [discontinuanceNoticeServedReason](#discontinuancenoticeservedreason) | Not specified | Optional | cannot be null | [Appeal S78 Case](appeal-s78-if-properties-discontinuancenoticeservedreason.md "appeal-s78.schema.json#/if/properties/discontinuanceNoticeServedReason") |
10
+
11
+ ## discontinuanceNoticeServedReason
12
+
13
+
14
+
15
+ `discontinuanceNoticeServedReason`
16
+
17
+ * is optional
18
+
19
+ * Type: unknown
20
+
21
+ * cannot be null
22
+
23
+ * defined in: [Appeal S78 Case](appeal-s78-if-properties-discontinuancenoticeservedreason.md "appeal-s78.schema.json#/if/properties/discontinuanceNoticeServedReason")
24
+
25
+ ### discontinuanceNoticeServedReason Type
26
+
27
+ unknown
28
+
29
+ ### discontinuanceNoticeServedReason Constraints
30
+
31
+ **constant**: the value of this property must be equal to:
32
+
33
+ ```json
34
+ "other"
35
+ ```
@@ -0,0 +1,31 @@
1
+ ## then Type
2
+
3
+ unknown
4
+
5
+ # then Properties
6
+
7
+ | Property | Type | Required | Nullable | Defined by |
8
+ | :------------------------------------------------------------------------------ | :------- | :------- | :------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
9
+ | [discontinuanceNoticeServedOtherReason](#discontinuancenoticeservedotherreason) | `string` | Optional | cannot be null | [Appeal S78 Case](appeal-s78-then-properties-discontinuancenoticeservedotherreason.md "appeal-s78.schema.json#/then/properties/discontinuanceNoticeServedOtherReason") |
10
+
11
+ ## discontinuanceNoticeServedOtherReason
12
+
13
+
14
+
15
+ `discontinuanceNoticeServedOtherReason`
16
+
17
+ * is optional
18
+
19
+ * Type: `string`
20
+
21
+ * cannot be null
22
+
23
+ * defined in: [Appeal S78 Case](appeal-s78-then-properties-discontinuancenoticeservedotherreason.md "appeal-s78.schema.json#/then/properties/discontinuanceNoticeServedOtherReason")
24
+
25
+ ### discontinuanceNoticeServedOtherReason Type
26
+
27
+ `string`
28
+
29
+ ### discontinuanceNoticeServedOtherReason Constraints
30
+
31
+ **minimum length**: the minimum number of characters for this string is: `1`
@@ -200,6 +200,9 @@ any of
200
200
  | [appealUnderActSection](#appealunderactsection) | `string` | Optional | can be null | [Appeal S78 Case](appeal-s78-properties-appealunderactsection.md "appeal-s78.schema.json#/properties/appealUnderActSection") |
201
201
  | [lpaConsiderAppealInvalid](#lpaconsiderappealinvalid) | `boolean` | Optional | can be null | [Appeal S78 Case](appeal-s78-properties-lpaconsiderappealinvalid.md "appeal-s78.schema.json#/properties/lpaConsiderAppealInvalid") |
202
202
  | [lpaAppealInvalidReasons](#lpaappealinvalidreasons) | `string` | Optional | can be null | [Appeal S78 Case](appeal-s78-properties-lpaappealinvalidreasons.md "appeal-s78.schema.json#/properties/lpaAppealInvalidReasons") |
203
+ | [discontinuanceNoticeServedReason](#discontinuancenoticeservedreason) | `string` | Optional | can be null | [Appeal S78 Case](appeal-s78-properties-discontinuancenoticeservedreason.md "appeal-s78.schema.json#/properties/discontinuanceNoticeServedReason") |
204
+ | [discontinuanceNoticeServedOtherReason](#discontinuancenoticeservedotherreason) | `string` | Optional | can be null | [Appeal S78 Case](appeal-s78-properties-discontinuancenoticeservedotherreason.md "appeal-s78.schema.json#/properties/discontinuanceNoticeServedOtherReason") |
205
+ | [wasRetrospectivePlanningApplicationMade](#wasretrospectiveplanningapplicationmade) | `boolean` | Optional | can be null | [Appeal S78 Case](appeal-s78-properties-wasretrospectiveplanningapplicationmade.md "appeal-s78.schema.json#/properties/wasRetrospectivePlanningApplicationMade") |
203
206
  | Additional Properties | Any | Optional | can be null | |
204
207
 
205
208
  ## caseId
@@ -3664,6 +3667,7 @@ The net gain in residences of the proposed development
3664
3667
  | `"minor-commercial-development"` | |
3665
3668
  | `"advertisement"` | |
3666
3669
  | `"lawful-development-certificate"` | |
3670
+ | `"discontinuance-notice"` | |
3667
3671
  | `null` | |
3668
3672
 
3669
3673
  ## developmentType
@@ -4205,7 +4209,7 @@ Was planning permission granted in relation to a prior application
4205
4209
 
4206
4210
  ## issueDateOfEnforcementNotice
4207
4211
 
4208
- The date on which an enforcement notice was issued
4212
+ The date on which an Enforcement Notice or Discontinuance Notice was issued
4209
4213
 
4210
4214
  `issueDateOfEnforcementNotice`
4211
4215
 
@@ -4233,7 +4237,7 @@ The date on which an enforcement notice was issued
4233
4237
 
4234
4238
  ## effectiveDateOfEnforcementNotice
4235
4239
 
4236
- The effective date of an enforcement notice
4240
+ The effective date of an Enforcement Notice or Discontinuance Notice
4237
4241
 
4238
4242
  `effectiveDateOfEnforcementNotice`
4239
4243
 
@@ -4737,6 +4741,71 @@ Reason(s) why LPA consider the appeal invalid
4737
4741
 
4738
4742
  `string`
4739
4743
 
4744
+ ## discontinuanceNoticeServedReason
4745
+
4746
+
4747
+
4748
+ `discontinuanceNoticeServedReason`
4749
+
4750
+ * is optional
4751
+
4752
+ * Type: `string`
4753
+
4754
+ * can be null
4755
+
4756
+ * defined in: [Appeal S78 Case](appeal-s78-properties-discontinuancenoticeservedreason.md "appeal-s78.schema.json#/properties/discontinuanceNoticeServedReason")
4757
+
4758
+ ### discontinuanceNoticeServedReason Type
4759
+
4760
+ `string`
4761
+
4762
+ ### discontinuanceNoticeServedReason Constraints
4763
+
4764
+ **enum**: the value of this property must be equal to one of the following values:
4765
+
4766
+ | Value | Explanation |
4767
+ | :-------------------------------------------- | :---------- |
4768
+ | `"risk-of-injury-to-the-amenity-of-locality"` | |
4769
+ | `"danger-to-members-of-the-public"` | |
4770
+ | `"other"` | |
4771
+ | `null` | |
4772
+
4773
+ ## discontinuanceNoticeServedOtherReason
4774
+
4775
+ Other reason for serving a discontinuance notice, for discontinuanceNoticeServedReason: other
4776
+
4777
+ `discontinuanceNoticeServedOtherReason`
4778
+
4779
+ * is optional
4780
+
4781
+ * Type: `string`
4782
+
4783
+ * can be null
4784
+
4785
+ * defined in: [Appeal S78 Case](appeal-s78-properties-discontinuancenoticeservedotherreason.md "appeal-s78.schema.json#/properties/discontinuanceNoticeServedOtherReason")
4786
+
4787
+ ### discontinuanceNoticeServedOtherReason Type
4788
+
4789
+ `string`
4790
+
4791
+ ## wasRetrospectivePlanningApplicationMade
4792
+
4793
+
4794
+
4795
+ `wasRetrospectivePlanningApplicationMade`
4796
+
4797
+ * is optional
4798
+
4799
+ * Type: `boolean`
4800
+
4801
+ * can be null
4802
+
4803
+ * defined in: [Appeal S78 Case](appeal-s78-properties-wasretrospectiveplanningapplicationmade.md "appeal-s78.schema.json#/properties/wasRetrospectivePlanningApplicationMade")
4804
+
4805
+ ### wasRetrospectivePlanningApplicationMade Type
4806
+
4807
+ `boolean`
4808
+
4740
4809
  ## Additional Properties
4741
4810
 
4742
4811
  Additional properties are allowed and do not have to follow a specific schema
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planning-inspectorate/data-model",
3
- "version": "2.29.0",
3
+ "version": "2.30.0",
4
4
  "description": "JSON Schemas for the Planning Inspectorate's Data Model",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: appeal-document.schema.json
3
- # timestamp: 2026-03-06T13:54:17+00:00
3
+ # timestamp: 2026-03-17T18:45:49+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -149,6 +149,7 @@ class DocumentType(Enum):
149
149
  groundISupporting = "groundISupporting"
150
150
  groundJSupporting = "groundJSupporting"
151
151
  groundKSupporting = "groundKSupporting"
152
+ discontinuanceNotice = "discontinuanceNotice"
152
153
  NoneType_None = None
153
154
 
154
155
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: appeal-s78.schema.json
3
- # timestamp: 2026-03-06T13:54:17+00:00
3
+ # timestamp: 2026-03-17T18:45:48+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -284,6 +284,7 @@ class TypeOfPlanningApplication(Enum):
284
284
  minor_commercial_development = "minor-commercial-development"
285
285
  advertisement = "advertisement"
286
286
  lawful_development_certificate = "lawful-development-certificate"
287
+ discontinuance_notice = "discontinuance-notice"
287
288
  NoneType_None = None
288
289
 
289
290
 
@@ -416,6 +417,15 @@ class AppealUnderActSection(Enum):
416
417
  NoneType_None = None
417
418
 
418
419
 
420
+ class DiscontinuanceNoticeServedReason(Enum):
421
+ risk_of_injury_to_the_amenity_of_locality = (
422
+ "risk-of-injury-to-the-amenity-of-locality"
423
+ )
424
+ danger_to_members_of_the_public = "danger-to-members-of-the-public"
425
+ other = "other"
426
+ NoneType_None = None
427
+
428
+
419
429
  class AppealS78Case1(BaseModel):
420
430
  """
421
431
  Group B - Schema defining the metadata for an appeal
@@ -1085,13 +1095,13 @@ class AppealS78Case1(BaseModel):
1085
1095
  None, examples=["2023-07-27T20:30:00.000Z"]
1086
1096
  )
1087
1097
  """
1088
- The date on which an enforcement notice was issued
1098
+ The date on which an Enforcement Notice or Discontinuance Notice was issued
1089
1099
  """
1090
1100
  effectiveDateOfEnforcementNotice: AwareDatetime | None = Field(
1091
1101
  None, examples=["2023-07-27T20:30:00.000Z"]
1092
1102
  )
1093
1103
  """
1094
- The effective date of an enforcement notice
1104
+ The effective date of an Enforcement Notice or Discontinuance Notice
1095
1105
  """
1096
1106
  didAppellantAppealLpaDecision: bool | None = None
1097
1107
  """
@@ -1147,6 +1157,12 @@ class AppealS78Case1(BaseModel):
1147
1157
  """
1148
1158
  Reason(s) why LPA consider the appeal invalid
1149
1159
  """
1160
+ discontinuanceNoticeServedReason: DiscontinuanceNoticeServedReason | None = None
1161
+ discontinuanceNoticeServedOtherReason: str | None = None
1162
+ """
1163
+ Other reason for serving a discontinuance notice, for discontinuanceNoticeServedReason: other
1164
+ """
1165
+ wasRetrospectivePlanningApplicationMade: bool | None = None
1150
1166
 
1151
1167
 
1152
1168
  class AdvertDetail1(BaseModel):
@@ -1887,13 +1903,13 @@ class AppealS78Case2(BaseModel):
1887
1903
  None, examples=["2023-07-27T20:30:00.000Z"]
1888
1904
  )
1889
1905
  """
1890
- The date on which an enforcement notice was issued
1906
+ The date on which an Enforcement Notice or Discontinuance Notice was issued
1891
1907
  """
1892
1908
  effectiveDateOfEnforcementNotice: AwareDatetime | None = Field(
1893
1909
  None, examples=["2023-07-27T20:30:00.000Z"]
1894
1910
  )
1895
1911
  """
1896
- The effective date of an enforcement notice
1912
+ The effective date of an Enforcement Notice or Discontinuance Notice
1897
1913
  """
1898
1914
  didAppellantAppealLpaDecision: bool | None = None
1899
1915
  """
@@ -1949,6 +1965,12 @@ class AppealS78Case2(BaseModel):
1949
1965
  """
1950
1966
  Reason(s) why LPA consider the appeal invalid
1951
1967
  """
1968
+ discontinuanceNoticeServedReason: DiscontinuanceNoticeServedReason | None = None
1969
+ discontinuanceNoticeServedOtherReason: str | None = None
1970
+ """
1971
+ Other reason for serving a discontinuance notice, for discontinuanceNoticeServedReason: other
1972
+ """
1973
+ wasRetrospectivePlanningApplicationMade: bool | None = None
1952
1974
 
1953
1975
 
1954
1976
  class AppealS78Case(RootModel[AppealS78Case1 | AppealS78Case2]):
@@ -227,6 +227,7 @@
227
227
  "groundISupporting",
228
228
  "groundJSupporting",
229
229
  "groundKSupporting",
230
+ "discontinuanceNotice",
230
231
  null
231
232
  ],
232
233
  "description": "The type of document, used for exchange, migrations and consumption from the appeal back-office system"
@@ -151,6 +151,16 @@
151
151
  }
152
152
  }
153
153
  ],
154
+ "if": {
155
+ "properties": {
156
+ "discontinuanceNoticeServedReason": { "const": "other" }
157
+ }
158
+ },
159
+ "then": {
160
+ "properties": {
161
+ "discontinuanceNoticeServedOtherReason": { "type": "string", "minLength": 1 }
162
+ }
163
+ },
154
164
  "properties": {
155
165
  "caseId": {
156
166
  "type": ["integer", "null"],
@@ -1035,6 +1045,7 @@
1035
1045
  "minor-commercial-development",
1036
1046
  "advertisement",
1037
1047
  "lawful-development-certificate",
1048
+ "discontinuance-notice",
1038
1049
  null
1039
1050
  ]
1040
1051
  },
@@ -1234,13 +1245,13 @@
1234
1245
  "issueDateOfEnforcementNotice": {
1235
1246
  "type": ["string", "null"],
1236
1247
  "format": "date-time",
1237
- "description": "The date on which an enforcement notice was issued",
1248
+ "description": "The date on which an Enforcement Notice or Discontinuance Notice was issued",
1238
1249
  "examples": ["2023-07-27T20:30:00.000Z"]
1239
1250
  },
1240
1251
  "effectiveDateOfEnforcementNotice": {
1241
1252
  "type": ["string", "null"],
1242
1253
  "format": "date-time",
1243
- "description": "The effective date of an enforcement notice",
1254
+ "description": "The effective date of an Enforcement Notice or Discontinuance Notice",
1244
1255
  "examples": ["2023-07-27T20:30:00.000Z"]
1245
1256
  },
1246
1257
  "didAppellantAppealLpaDecision": {
@@ -1329,6 +1340,17 @@
1329
1340
  "lpaAppealInvalidReasons": {
1330
1341
  "type": ["string", "null"],
1331
1342
  "description": "Reason(s) why LPA consider the appeal invalid"
1343
+ },
1344
+ "discontinuanceNoticeServedReason": {
1345
+ "type": ["string", "null"],
1346
+ "enum": ["risk-of-injury-to-the-amenity-of-locality", "danger-to-members-of-the-public", "other", null]
1347
+ },
1348
+ "discontinuanceNoticeServedOtherReason": {
1349
+ "type": ["string", "null"],
1350
+ "description": "Other reason for serving a discontinuance notice, for discontinuanceNoticeServedReason: other"
1351
+ },
1352
+ "wasRetrospectivePlanningApplicationMade": {
1353
+ "type": ["boolean", "null"]
1332
1354
  }
1333
1355
  }
1334
1356
  }
package/src/enums.cjs CHANGED
@@ -29,6 +29,19 @@ const APPEAL_HAS_CASE_STATUS = Object.freeze({
29
29
  WITHDRAWN: 'withdrawn',
30
30
  });
31
31
 
32
+ const APPEAL_HAS_TYPE_OF_PLANNING_APPLICATION = Object.freeze({
33
+ ADVERTISEMENT: 'advertisement',
34
+ FULL_APPEAL: 'full-appeal',
35
+ HOUSEHOLDER_PLANNING: 'householder-planning',
36
+ LAWFUL_DEVELOPMENT_CERTIFICATE: 'lawful-development-certificate',
37
+ LISTED_BUILDING: 'listed-building',
38
+ MINOR_COMMERCIAL_DEVELOPMENT: 'minor-commercial-development',
39
+ OUTLINE_PLANNING: 'outline-planning',
40
+ PRIOR_APPROVAL: 'prior-approval',
41
+ REMOVAL_OR_VARIATION_OF_CONDITIONS: 'removal-or-variation-of-conditions',
42
+ RESERVED_MATTERS: 'reserved-matters',
43
+ });
44
+
32
45
  const APPEAL_ALLOCATION_LEVEL = Object.freeze({
33
46
  A: 'A',
34
47
  B: 'B',
@@ -163,6 +176,12 @@ const APPEAL_DEVELOPMENT_TYPE = Object.freeze({
163
176
  OTHER_MINOR: 'other-minor',
164
177
  });
165
178
 
179
+ const APPEAL_DISCONTINUANCE_NOTICE_SERVED_REASON = Object.freeze({
180
+ DANGER_TO_MEMBERS_OF_THE_PUBLIC: 'danger-to-members-of-the-public',
181
+ OTHER: 'other',
182
+ RISK_OF_INJURY_TO_THE_AMENITY_OF_LOCALITY: 'risk-of-injury-to-the-amenity-of-locality',
183
+ });
184
+
166
185
  const APPEAL_DOCUMENT_TYPE = Object.freeze({
167
186
  APPEAL_NOTIFICATION: 'appealNotification',
168
187
  APPELLANT_CASE_CORRESPONDENCE: 'appellantCaseCorrespondence',
@@ -189,6 +208,7 @@ const APPEAL_DOCUMENT_TYPE = Object.freeze({
189
208
  DELEGATED_REPORT: 'delegatedReport',
190
209
  DESIGN_ACCESS_STATEMENT: 'designAccessStatement',
191
210
  DEVELOPMENT_PLAN_POLICIES: 'developmentPlanPolicies',
211
+ DISCONTINUANCE_NOTICE: 'discontinuanceNotice',
192
212
  EIA_ENVIRONMENTAL_STATEMENT: 'eiaEnvironmentalStatement',
193
213
  EIA_SCOPING_OPINION: 'eiaScopingOpinion',
194
214
  EIA_SCREENING_DIRECTION: 'eiaScreeningDirection',
@@ -393,6 +413,7 @@ const APPEAL_SOURCE_SYSTEM = Object.freeze({
393
413
 
394
414
  const APPEAL_TYPE_OF_PLANNING_APPLICATION = Object.freeze({
395
415
  ADVERTISEMENT: 'advertisement',
416
+ DISCONTINUANCE_NOTICE: 'discontinuance-notice',
396
417
  FULL_APPEAL: 'full-appeal',
397
418
  HOUSEHOLDER_PLANNING: 'householder-planning',
398
419
  LAWFUL_DEVELOPMENT_CERTIFICATE: 'lawful-development-certificate',
@@ -798,6 +819,7 @@ exports.APPEAL_CASE_STATUS = APPEAL_CASE_STATUS;
798
819
  exports.APPEAL_CASE_TYPE = APPEAL_CASE_TYPE;
799
820
  exports.APPEAL_CASE_VALIDATION_OUTCOME = APPEAL_CASE_VALIDATION_OUTCOME;
800
821
  exports.APPEAL_DEVELOPMENT_TYPE = APPEAL_DEVELOPMENT_TYPE;
822
+ exports.APPEAL_DISCONTINUANCE_NOTICE_SERVED_REASON = APPEAL_DISCONTINUANCE_NOTICE_SERVED_REASON;
801
823
  exports.APPEAL_DOCUMENT_TYPE = APPEAL_DOCUMENT_TYPE;
802
824
  exports.APPEAL_EIA_DEVELOPMENT_DESCRIPTION = APPEAL_EIA_DEVELOPMENT_DESCRIPTION;
803
825
  exports.APPEAL_EIA_ENVIRONMENTAL_IMPACT_SCHEDULE = APPEAL_EIA_ENVIRONMENTAL_IMPACT_SCHEDULE;
@@ -806,6 +828,7 @@ exports.APPEAL_EVENT_TYPE = APPEAL_EVENT_TYPE;
806
828
  exports.APPEAL_HAS_CASE_DECISION_OUTCOME = APPEAL_HAS_CASE_DECISION_OUTCOME;
807
829
  exports.APPEAL_HAS_CASE_PROCEDURE = APPEAL_HAS_CASE_PROCEDURE;
808
830
  exports.APPEAL_HAS_CASE_STATUS = APPEAL_HAS_CASE_STATUS;
831
+ exports.APPEAL_HAS_TYPE_OF_PLANNING_APPLICATION = APPEAL_HAS_TYPE_OF_PLANNING_APPLICATION;
809
832
  exports.APPEAL_INVALID_OR_INCOMPLETE_DETAILS = APPEAL_INVALID_OR_INCOMPLETE_DETAILS;
810
833
  exports.APPEAL_KNOWS_ALL_OWNERS = APPEAL_KNOWS_ALL_OWNERS;
811
834
  exports.APPEAL_KNOWS_OTHER_OWNERS = APPEAL_KNOWS_OTHER_OWNERS;
package/src/enums.d.ts CHANGED
@@ -27,6 +27,19 @@ export const APPEAL_HAS_CASE_STATUS = {
27
27
  WITHDRAWN: 'withdrawn',
28
28
  } as const;
29
29
 
30
+ export const APPEAL_HAS_TYPE_OF_PLANNING_APPLICATION = {
31
+ ADVERTISEMENT: 'advertisement',
32
+ FULL_APPEAL: 'full-appeal',
33
+ HOUSEHOLDER_PLANNING: 'householder-planning',
34
+ LAWFUL_DEVELOPMENT_CERTIFICATE: 'lawful-development-certificate',
35
+ LISTED_BUILDING: 'listed-building',
36
+ MINOR_COMMERCIAL_DEVELOPMENT: 'minor-commercial-development',
37
+ OUTLINE_PLANNING: 'outline-planning',
38
+ PRIOR_APPROVAL: 'prior-approval',
39
+ REMOVAL_OR_VARIATION_OF_CONDITIONS: 'removal-or-variation-of-conditions',
40
+ RESERVED_MATTERS: 'reserved-matters',
41
+ } as const;
42
+
30
43
  export const APPEAL_ALLOCATION_LEVEL = {
31
44
  A: 'A',
32
45
  B: 'B',
@@ -161,6 +174,12 @@ export const APPEAL_DEVELOPMENT_TYPE = {
161
174
  OTHER_MINOR: 'other-minor',
162
175
  } as const;
163
176
 
177
+ export const APPEAL_DISCONTINUANCE_NOTICE_SERVED_REASON = {
178
+ DANGER_TO_MEMBERS_OF_THE_PUBLIC: 'danger-to-members-of-the-public',
179
+ OTHER: 'other',
180
+ RISK_OF_INJURY_TO_THE_AMENITY_OF_LOCALITY: 'risk-of-injury-to-the-amenity-of-locality',
181
+ } as const;
182
+
164
183
  export const APPEAL_DOCUMENT_TYPE = {
165
184
  APPEAL_NOTIFICATION: 'appealNotification',
166
185
  APPELLANT_CASE_CORRESPONDENCE: 'appellantCaseCorrespondence',
@@ -187,6 +206,7 @@ export const APPEAL_DOCUMENT_TYPE = {
187
206
  DELEGATED_REPORT: 'delegatedReport',
188
207
  DESIGN_ACCESS_STATEMENT: 'designAccessStatement',
189
208
  DEVELOPMENT_PLAN_POLICIES: 'developmentPlanPolicies',
209
+ DISCONTINUANCE_NOTICE: 'discontinuanceNotice',
190
210
  EIA_ENVIRONMENTAL_STATEMENT: 'eiaEnvironmentalStatement',
191
211
  EIA_SCOPING_OPINION: 'eiaScopingOpinion',
192
212
  EIA_SCREENING_DIRECTION: 'eiaScreeningDirection',
@@ -391,6 +411,7 @@ export const APPEAL_SOURCE_SYSTEM = {
391
411
 
392
412
  export const APPEAL_TYPE_OF_PLANNING_APPLICATION = {
393
413
  ADVERTISEMENT: 'advertisement',
414
+ DISCONTINUANCE_NOTICE: 'discontinuance-notice',
394
415
  FULL_APPEAL: 'full-appeal',
395
416
  HOUSEHOLDER_PLANNING: 'householder-planning',
396
417
  LAWFUL_DEVELOPMENT_CERTIFICATE: 'lawful-development-certificate',
package/src/enums.js CHANGED
@@ -27,6 +27,19 @@ export const APPEAL_HAS_CASE_STATUS = Object.freeze({
27
27
  WITHDRAWN: 'withdrawn',
28
28
  });
29
29
 
30
+ export const APPEAL_HAS_TYPE_OF_PLANNING_APPLICATION = Object.freeze({
31
+ ADVERTISEMENT: 'advertisement',
32
+ FULL_APPEAL: 'full-appeal',
33
+ HOUSEHOLDER_PLANNING: 'householder-planning',
34
+ LAWFUL_DEVELOPMENT_CERTIFICATE: 'lawful-development-certificate',
35
+ LISTED_BUILDING: 'listed-building',
36
+ MINOR_COMMERCIAL_DEVELOPMENT: 'minor-commercial-development',
37
+ OUTLINE_PLANNING: 'outline-planning',
38
+ PRIOR_APPROVAL: 'prior-approval',
39
+ REMOVAL_OR_VARIATION_OF_CONDITIONS: 'removal-or-variation-of-conditions',
40
+ RESERVED_MATTERS: 'reserved-matters',
41
+ });
42
+
30
43
  export const APPEAL_ALLOCATION_LEVEL = Object.freeze({
31
44
  A: 'A',
32
45
  B: 'B',
@@ -161,6 +174,12 @@ export const APPEAL_DEVELOPMENT_TYPE = Object.freeze({
161
174
  OTHER_MINOR: 'other-minor',
162
175
  });
163
176
 
177
+ export const APPEAL_DISCONTINUANCE_NOTICE_SERVED_REASON = Object.freeze({
178
+ DANGER_TO_MEMBERS_OF_THE_PUBLIC: 'danger-to-members-of-the-public',
179
+ OTHER: 'other',
180
+ RISK_OF_INJURY_TO_THE_AMENITY_OF_LOCALITY: 'risk-of-injury-to-the-amenity-of-locality',
181
+ });
182
+
164
183
  export const APPEAL_DOCUMENT_TYPE = Object.freeze({
165
184
  APPEAL_NOTIFICATION: 'appealNotification',
166
185
  APPELLANT_CASE_CORRESPONDENCE: 'appellantCaseCorrespondence',
@@ -187,6 +206,7 @@ export const APPEAL_DOCUMENT_TYPE = Object.freeze({
187
206
  DELEGATED_REPORT: 'delegatedReport',
188
207
  DESIGN_ACCESS_STATEMENT: 'designAccessStatement',
189
208
  DEVELOPMENT_PLAN_POLICIES: 'developmentPlanPolicies',
209
+ DISCONTINUANCE_NOTICE: 'discontinuanceNotice',
190
210
  EIA_ENVIRONMENTAL_STATEMENT: 'eiaEnvironmentalStatement',
191
211
  EIA_SCOPING_OPINION: 'eiaScopingOpinion',
192
212
  EIA_SCREENING_DIRECTION: 'eiaScreeningDirection',
@@ -391,6 +411,7 @@ export const APPEAL_SOURCE_SYSTEM = Object.freeze({
391
411
 
392
412
  export const APPEAL_TYPE_OF_PLANNING_APPLICATION = Object.freeze({
393
413
  ADVERTISEMENT: 'advertisement',
414
+ DISCONTINUANCE_NOTICE: 'discontinuance-notice',
394
415
  FULL_APPEAL: 'full-appeal',
395
416
  HOUSEHOLDER_PLANNING: 'householder-planning',
396
417
  LAWFUL_DEVELOPMENT_CERTIFICATE: 'lawful-development-certificate',
package/src/index.cjs CHANGED
@@ -110,6 +110,19 @@ const APPEAL_HAS_CASE_STATUS = Object.freeze({
110
110
  WITHDRAWN: 'withdrawn',
111
111
  });
112
112
 
113
+ const APPEAL_HAS_TYPE_OF_PLANNING_APPLICATION = Object.freeze({
114
+ ADVERTISEMENT: 'advertisement',
115
+ FULL_APPEAL: 'full-appeal',
116
+ HOUSEHOLDER_PLANNING: 'householder-planning',
117
+ LAWFUL_DEVELOPMENT_CERTIFICATE: 'lawful-development-certificate',
118
+ LISTED_BUILDING: 'listed-building',
119
+ MINOR_COMMERCIAL_DEVELOPMENT: 'minor-commercial-development',
120
+ OUTLINE_PLANNING: 'outline-planning',
121
+ PRIOR_APPROVAL: 'prior-approval',
122
+ REMOVAL_OR_VARIATION_OF_CONDITIONS: 'removal-or-variation-of-conditions',
123
+ RESERVED_MATTERS: 'reserved-matters',
124
+ });
125
+
113
126
  const APPEAL_ALLOCATION_LEVEL = Object.freeze({
114
127
  A: 'A',
115
128
  B: 'B',
@@ -244,6 +257,12 @@ const APPEAL_DEVELOPMENT_TYPE = Object.freeze({
244
257
  OTHER_MINOR: 'other-minor',
245
258
  });
246
259
 
260
+ const APPEAL_DISCONTINUANCE_NOTICE_SERVED_REASON = Object.freeze({
261
+ DANGER_TO_MEMBERS_OF_THE_PUBLIC: 'danger-to-members-of-the-public',
262
+ OTHER: 'other',
263
+ RISK_OF_INJURY_TO_THE_AMENITY_OF_LOCALITY: 'risk-of-injury-to-the-amenity-of-locality',
264
+ });
265
+
247
266
  const APPEAL_DOCUMENT_TYPE = Object.freeze({
248
267
  APPEAL_NOTIFICATION: 'appealNotification',
249
268
  APPELLANT_CASE_CORRESPONDENCE: 'appellantCaseCorrespondence',
@@ -270,6 +289,7 @@ const APPEAL_DOCUMENT_TYPE = Object.freeze({
270
289
  DELEGATED_REPORT: 'delegatedReport',
271
290
  DESIGN_ACCESS_STATEMENT: 'designAccessStatement',
272
291
  DEVELOPMENT_PLAN_POLICIES: 'developmentPlanPolicies',
292
+ DISCONTINUANCE_NOTICE: 'discontinuanceNotice',
273
293
  EIA_ENVIRONMENTAL_STATEMENT: 'eiaEnvironmentalStatement',
274
294
  EIA_SCOPING_OPINION: 'eiaScopingOpinion',
275
295
  EIA_SCREENING_DIRECTION: 'eiaScreeningDirection',
@@ -474,6 +494,7 @@ const APPEAL_SOURCE_SYSTEM = Object.freeze({
474
494
 
475
495
  const APPEAL_TYPE_OF_PLANNING_APPLICATION = Object.freeze({
476
496
  ADVERTISEMENT: 'advertisement',
497
+ DISCONTINUANCE_NOTICE: 'discontinuance-notice',
477
498
  FULL_APPEAL: 'full-appeal',
478
499
  HOUSEHOLDER_PLANNING: 'householder-planning',
479
500
  LAWFUL_DEVELOPMENT_CERTIFICATE: 'lawful-development-certificate',
@@ -911,6 +932,7 @@ exports.APPEAL_CASE_STATUS = APPEAL_CASE_STATUS;
911
932
  exports.APPEAL_CASE_TYPE = APPEAL_CASE_TYPE;
912
933
  exports.APPEAL_CASE_VALIDATION_OUTCOME = APPEAL_CASE_VALIDATION_OUTCOME;
913
934
  exports.APPEAL_DEVELOPMENT_TYPE = APPEAL_DEVELOPMENT_TYPE;
935
+ exports.APPEAL_DISCONTINUANCE_NOTICE_SERVED_REASON = APPEAL_DISCONTINUANCE_NOTICE_SERVED_REASON;
914
936
  exports.APPEAL_DOCUMENT_TYPE = APPEAL_DOCUMENT_TYPE;
915
937
  exports.APPEAL_EIA_DEVELOPMENT_DESCRIPTION = APPEAL_EIA_DEVELOPMENT_DESCRIPTION;
916
938
  exports.APPEAL_EIA_ENVIRONMENTAL_IMPACT_SCHEDULE = APPEAL_EIA_ENVIRONMENTAL_IMPACT_SCHEDULE;
@@ -919,6 +941,7 @@ exports.APPEAL_EVENT_TYPE = APPEAL_EVENT_TYPE;
919
941
  exports.APPEAL_HAS_CASE_DECISION_OUTCOME = APPEAL_HAS_CASE_DECISION_OUTCOME;
920
942
  exports.APPEAL_HAS_CASE_PROCEDURE = APPEAL_HAS_CASE_PROCEDURE;
921
943
  exports.APPEAL_HAS_CASE_STATUS = APPEAL_HAS_CASE_STATUS;
944
+ exports.APPEAL_HAS_TYPE_OF_PLANNING_APPLICATION = APPEAL_HAS_TYPE_OF_PLANNING_APPLICATION;
922
945
  exports.APPEAL_INVALID_OR_INCOMPLETE_DETAILS = APPEAL_INVALID_OR_INCOMPLETE_DETAILS;
923
946
  exports.APPEAL_KNOWS_ALL_OWNERS = APPEAL_KNOWS_ALL_OWNERS;
924
947
  exports.APPEAL_KNOWS_OTHER_OWNERS = APPEAL_KNOWS_OTHER_OWNERS;
package/src/schemas.d.ts CHANGED
@@ -175,6 +175,7 @@ export interface AppealDocument {
175
175
  | 'groundISupporting'
176
176
  | 'groundJSupporting'
177
177
  | 'groundKSupporting'
178
+ | 'discontinuanceNotice'
178
179
  | null;
179
180
  /**
180
181
  * The system mastering the metadata for the current document
@@ -1491,6 +1492,7 @@ export type AppealS78Case = (GridReference | SiteAddress) & {
1491
1492
  | 'minor-commercial-development'
1492
1493
  | 'advertisement'
1493
1494
  | 'lawful-development-certificate'
1495
+ | 'discontinuance-notice'
1494
1496
  | null;
1495
1497
  developmentType:
1496
1498
  | 'householder'
@@ -1626,11 +1628,11 @@ export type AppealS78Case = (GridReference | SiteAddress) & {
1626
1628
  */
1627
1629
  previousPlanningPermissionGranted?: boolean | null;
1628
1630
  /**
1629
- * The date on which an enforcement notice was issued
1631
+ * The date on which an Enforcement Notice or Discontinuance Notice was issued
1630
1632
  */
1631
1633
  issueDateOfEnforcementNotice?: string | null;
1632
1634
  /**
1633
- * The effective date of an enforcement notice
1635
+ * The effective date of an Enforcement Notice or Discontinuance Notice
1634
1636
  */
1635
1637
  effectiveDateOfEnforcementNotice?: string | null;
1636
1638
  /**
@@ -1691,6 +1693,16 @@ export type AppealS78Case = (GridReference | SiteAddress) & {
1691
1693
  * Reason(s) why LPA consider the appeal invalid
1692
1694
  */
1693
1695
  lpaAppealInvalidReasons?: string | null;
1696
+ discontinuanceNoticeServedReason?:
1697
+ | 'risk-of-injury-to-the-amenity-of-locality'
1698
+ | 'danger-to-members-of-the-public'
1699
+ | 'other'
1700
+ | null;
1701
+ /**
1702
+ * Other reason for serving a discontinuance notice, for discontinuanceNoticeServedReason: other
1703
+ */
1704
+ discontinuanceNoticeServedOtherReason?: string | null;
1705
+ wasRetrospectivePlanningApplicationMade?: boolean | null;
1694
1706
  [k: string]: unknown;
1695
1707
  };
1696
1708
 
@@ -247,7 +247,27 @@ describe(schema, () => {
247
247
  assert.strictEqual(validationResult, false);
248
248
  });
249
249
 
250
- const groupBAppealTypes = ['C', 'F', 'H', 'W', 'X', 'Y', 'Z'];
250
+ it('should enforce other for discontinuanceNoticeServedReason', () => {
251
+ const test = structuredClone(appealS78);
252
+ test.discontinuanceNoticeServedReason = 'other';
253
+ test.discontinuanceNoticeServedOtherReason = '';
254
+ const validationResult = ajv.validate(schema, test);
255
+ assert.strictEqual(validationResult, false);
256
+
257
+ test.discontinuanceNoticeServedOtherReason = null;
258
+ const validationResult2 = ajv.validate(schema, test);
259
+ assert.strictEqual(validationResult2, false);
260
+ });
261
+
262
+ it('should allow no reason for non other discontinuanceNoticeServedOtherReason', () => {
263
+ const test = structuredClone(appealS78);
264
+ test.discontinuanceNoticeServedReason = 'danger-to-members-of-the-public';
265
+ test.discontinuanceNoticeServedOtherReason = null;
266
+ const validationResult = ajv.validate(schema, test);
267
+ assert.strictEqual(validationResult, true);
268
+ });
269
+
270
+ const groupBAppealTypes = ['C', 'F', 'G', 'H', 'W', 'X', 'Y', 'Z'];
251
271
  groupBAppealTypes.forEach((appealType) => {
252
272
  it(`should support group B appeal type ${appealType}`, () => {
253
273
  const test = structuredClone(appealS78);