@planning-inspectorate/data-model 2.52.0 → 2.53.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 CHANGED
@@ -35,7 +35,7 @@ extends:
35
35
  displayName: Cache NPM
36
36
  - template: ../steps/node_script.yml
37
37
  parameters:
38
- nodeVersion: 22
38
+ nodeVersion: 24
39
39
  script: npm ci
40
40
  environmentVariables:
41
41
  npm_config_cache: $(pipeline.workspace)/.npm
@@ -43,23 +43,23 @@ extends:
43
43
  parameters:
44
44
  # only run commitlint on branches, not main
45
45
  condition: ne(variables['Build.SourceBranchName'], 'main')
46
- nodeVersion: 22
46
+ nodeVersion: 24
47
47
  script: npm run commitlint
48
48
  - template: ../steps/node_script.yml
49
49
  parameters:
50
- nodeVersion: 22
50
+ nodeVersion: 24
51
51
  script: npm run lint
52
52
  - template: ../steps/node_script.yml
53
53
  parameters:
54
- nodeVersion: 22
54
+ nodeVersion: 24
55
55
  script: npm run format-check
56
56
  - template: ../steps/node_script.yml
57
57
  parameters:
58
- nodeVersion: 22
58
+ nodeVersion: 24
59
59
  script: npm run gen
60
60
  - template: ../steps/node_script.yml
61
61
  parameters:
62
- nodeVersion: 22
62
+ nodeVersion: 24
63
63
  script: node --test
64
64
  - script: |
65
65
  set -e
@@ -44,11 +44,11 @@ jobs:
44
44
  - checkout: self
45
45
  - template: steps/node_script.yml@templates
46
46
  parameters:
47
- nodeVersion: 22
47
+ nodeVersion: 24
48
48
  script: npm ci
49
49
  - template: steps/node_script.yml@templates
50
50
  parameters:
51
- nodeVersion: 22
51
+ nodeVersion: 24
52
52
  script: npx semantic-release --branches main --tag-format '${version}' ${{ variables.dryRunFlag }}
53
53
  environmentVariables:
54
54
  GH_TOKEN: $(GITHUB_TOKEN)
package/docs/README.md CHANGED
@@ -80,6 +80,10 @@
80
80
 
81
81
  * [Untitled object in Appeal S78 Case](./appeal-s78-properties-applicationelbappealgroundsdetails-items.md) – `appeal-s78.schema.json#/properties/applicationElbAppealGroundsDetails/items`
82
82
 
83
+ * [Untitled object in Appeal S78 Case](./appeal-s78-properties-enforcementcasegroundsofappeal-items.md) – `appeal-s78.schema.json#/properties/enforcementCaseGroundsOfAppeal/items`
84
+
85
+ * [Untitled object in Appeal S78 Case](./appeal-s78-properties-elbcasegroundsofappeal-items.md) – `appeal-s78.schema.json#/properties/elbCaseGroundsOfAppeal/items`
86
+
83
87
  * [Untitled object in Appeal S78 Case](./appeal-s78-properties-significantchangesaffectingapplicationappellant-items.md) – `appeal-s78.schema.json#/properties/significantChangesAffectingApplicationAppellant/items`
84
88
 
85
89
  * [Untitled object in Appeal S78 Case](./appeal-s78-properties-significantchangesaffectingapplicationlpa-items.md) – `appeal-s78.schema.json#/properties/significantChangesAffectingApplicationLpa/items`
@@ -636,6 +636,7 @@ The type of document, used for exchange, migrations and consumption from the app
636
636
  | `"hearingProcess"` | |
637
637
  | `"inquiryCore"` | |
638
638
  | `"inquiryPostEvent"` | |
639
+ | `"noticeWithdrawal"` | |
639
640
  | `null` | |
640
641
 
641
642
  ## sourceSystem
@@ -221,21 +221,23 @@ The processing status for the appeal
221
221
 
222
222
  **enum**: the value of this property must be equal to one of the following values:
223
223
 
224
- | Value | Explanation |
225
- | :---------------------- | :---------- |
226
- | `"assign_case_officer"` | |
227
- | `"validation"` | |
228
- | `"ready_to_start"` | |
229
- | `"lpa_questionnaire"` | |
230
- | `"issue_determination"` | |
231
- | `"complete"` | |
232
- | `"invalid"` | |
233
- | `"closed"` | |
234
- | `"withdrawn"` | |
235
- | `"awaiting_transfer"` | |
236
- | `"transferred"` | |
237
- | `"event"` | |
238
- | `"awaiting_event"` | |
224
+ | Value | Explanation |
225
+ | :------------------------- | :---------- |
226
+ | `"assign_case_officer"` | |
227
+ | `"validation"` | |
228
+ | `"ready_to_start"` | |
229
+ | `"lpa_questionnaire"` | |
230
+ | `"issue_determination"` | |
231
+ | `"complete"` | |
232
+ | `"invalid"` | |
233
+ | `"closed"` | |
234
+ | `"withdrawn"` | |
235
+ | `"awaiting_transfer"` | |
236
+ | `"transferred"` | |
237
+ | `"event"` | |
238
+ | `"awaiting_event"` | |
239
+ | `"notice_withdrawn"` | |
240
+ | `"closed_opened_in_error"` | |
239
241
 
240
242
  ## caseType
241
243
 
@@ -167,6 +167,8 @@ any of
167
167
  | [occupancyConditionsMet](#occupancyconditionsmet) | `boolean` | Optional | can be null | [Appeal S78 Case](appeal-s78-properties-occupancyconditionsmet.md "appeal-s78.schema.json#/properties/occupancyConditionsMet") |
168
168
  | [enforcementAppealGroundsDetails](#enforcementappealgroundsdetails) | `array` | Optional | can be null | [Appeal S78 Case](appeal-s78-properties-enforcementappealgroundsdetails.md "appeal-s78.schema.json#/properties/enforcementAppealGroundsDetails") |
169
169
  | [applicationElbAppealGroundsDetails](#applicationelbappealgroundsdetails) | `array` | Optional | can be null | [Appeal S78 Case](appeal-s78-properties-applicationelbappealgroundsdetails.md "appeal-s78.schema.json#/properties/applicationElbAppealGroundsDetails") |
170
+ | [enforcementCaseGroundsOfAppeal](#enforcementcasegroundsofappeal) | `array` | Optional | can be null | [Appeal S78 Case](appeal-s78-properties-enforcementcasegroundsofappeal.md "appeal-s78.schema.json#/properties/enforcementCaseGroundsOfAppeal") |
171
+ | [elbCaseGroundsOfAppeal](#elbcasegroundsofappeal) | `array` | Optional | can be null | [Appeal S78 Case](appeal-s78-properties-elbcasegroundsofappeal.md "appeal-s78.schema.json#/properties/elbCaseGroundsOfAppeal") |
170
172
  | [applicationMadeAndFeePaid](#applicationmadeandfeepaid) | `boolean` | Optional | can be null | [Appeal S78 Case](appeal-s78-properties-applicationmadeandfeepaid.md "appeal-s78.schema.json#/properties/applicationMadeAndFeePaid") |
171
173
  | [noticeRelatesToBuildingEngineeringMiningOther](#noticerelatestobuildingengineeringminingother) | `boolean` | Optional | can be null | [Appeal S78 Case](appeal-s78-properties-noticerelatestobuildingengineeringminingother.md "appeal-s78.schema.json#/properties/noticeRelatesToBuildingEngineeringMiningOther") |
172
174
  | [changeOfUseRefuseOrWaste](#changeofuserefuseorwaste) | `boolean` | Optional | can be null | [Appeal S78 Case](appeal-s78-properties-changeofuserefuseorwaste.md "appeal-s78.schema.json#/properties/changeOfUseRefuseOrWaste") |
@@ -316,25 +318,27 @@ The processing status for the appeal
316
318
 
317
319
  **enum**: the value of this property must be equal to one of the following values:
318
320
 
319
- | Value | Explanation |
320
- | :---------------------- | :---------- |
321
- | `"assign_case_officer"` | |
322
- | `"validation"` | |
323
- | `"ready_to_start"` | |
324
- | `"lpa_questionnaire"` | |
325
- | `"issue_determination"` | |
326
- | `"statements"` | |
327
- | `"evidence"` | |
328
- | `"witnesses"` | |
329
- | `"final_comments"` | |
330
- | `"complete"` | |
331
- | `"invalid"` | |
332
- | `"closed"` | |
333
- | `"withdrawn"` | |
334
- | `"awaiting_transfer"` | |
335
- | `"transferred"` | |
336
- | `"event"` | |
337
- | `"awaiting_event"` | |
321
+ | Value | Explanation |
322
+ | :------------------------- | :---------- |
323
+ | `"assign_case_officer"` | |
324
+ | `"validation"` | |
325
+ | `"ready_to_start"` | |
326
+ | `"lpa_questionnaire"` | |
327
+ | `"issue_determination"` | |
328
+ | `"statements"` | |
329
+ | `"evidence"` | |
330
+ | `"witnesses"` | |
331
+ | `"final_comments"` | |
332
+ | `"complete"` | |
333
+ | `"invalid"` | |
334
+ | `"closed"` | |
335
+ | `"withdrawn"` | |
336
+ | `"awaiting_transfer"` | |
337
+ | `"transferred"` | |
338
+ | `"event"` | |
339
+ | `"awaiting_event"` | |
340
+ | `"notice_withdrawn"` | |
341
+ | `"closed_opened_in_error"` | |
338
342
 
339
343
  ## caseType
340
344
 
@@ -4070,6 +4074,46 @@ A list of grounds for the appeal, supporting facts & start dates. Enforcement ca
4070
4074
 
4071
4075
  `object[]` ([Details](appeal-s78-properties-applicationelbappealgroundsdetails-items.md))
4072
4076
 
4077
+ ## enforcementCaseGroundsOfAppeal
4078
+
4079
+ Case Officer list of grounds for the appeal & start dates. Enforcement cases (C) can have grounds (a) to (g)
4080
+
4081
+ > Enforcement Listed Building cases (F) have a separate list of grounds (a) to (k)
4082
+
4083
+ `enforcementCaseGroundsOfAppeal`
4084
+
4085
+ * is optional
4086
+
4087
+ * Type: `object[]` ([Details](appeal-s78-properties-enforcementcasegroundsofappeal-items.md))
4088
+
4089
+ * can be null
4090
+
4091
+ * defined in: [Appeal S78 Case](appeal-s78-properties-enforcementcasegroundsofappeal.md "appeal-s78.schema.json#/properties/enforcementCaseGroundsOfAppeal")
4092
+
4093
+ ### enforcementCaseGroundsOfAppeal Type
4094
+
4095
+ `object[]` ([Details](appeal-s78-properties-enforcementcasegroundsofappeal-items.md))
4096
+
4097
+ ## elbCaseGroundsOfAppeal
4098
+
4099
+ Case Officer list of grounds for the appeal & start dates. Enforcement cases (C) can have grounds (a) to (g)
4100
+
4101
+ > Enforcement Listed Building cases (F) have a separate list of grounds (a) to (k)
4102
+
4103
+ `elbCaseGroundsOfAppeal`
4104
+
4105
+ * is optional
4106
+
4107
+ * Type: `object[]` ([Details](appeal-s78-properties-elbcasegroundsofappeal-items.md))
4108
+
4109
+ * can be null
4110
+
4111
+ * defined in: [Appeal S78 Case](appeal-s78-properties-elbcasegroundsofappeal.md "appeal-s78.schema.json#/properties/elbCaseGroundsOfAppeal")
4112
+
4113
+ ### elbCaseGroundsOfAppeal Type
4114
+
4115
+ `object[]` ([Details](appeal-s78-properties-elbcasegroundsofappeal-items.md))
4116
+
4073
4117
  ## applicationMadeAndFeePaid
4074
4118
 
4075
4119
  Was an application made and paid for
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planning-inspectorate/data-model",
3
- "version": "2.52.0",
3
+ "version": "2.53.0",
4
4
  "description": "JSON Schemas for the Planning Inspectorate's Data Model",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -157,6 +157,7 @@ class DocumentType(Enum):
157
157
  hearingProcess = "hearingProcess"
158
158
  inquiryCore = "inquiryCore"
159
159
  inquiryPostEvent = "inquiryPostEvent"
160
+ noticeWithdrawal = "noticeWithdrawal"
160
161
  NoneType_None = None
161
162
 
162
163
 
@@ -27,6 +27,8 @@ class CaseStatus(StrEnum):
27
27
  transferred = "transferred"
28
28
  event = "event"
29
29
  awaiting_event = "awaiting_event"
30
+ notice_withdrawn = "notice_withdrawn"
31
+ closed_opened_in_error = "closed_opened_in_error"
30
32
 
31
33
 
32
34
  class CaseType(StrEnum):
@@ -31,6 +31,8 @@ class CaseStatus(StrEnum):
31
31
  transferred = "transferred"
32
32
  event = "event"
33
33
  awaiting_event = "awaiting_event"
34
+ notice_withdrawn = "notice_withdrawn"
35
+ closed_opened_in_error = "closed_opened_in_error"
34
36
 
35
37
 
36
38
  class CaseType(StrEnum):
@@ -394,6 +396,52 @@ class ApplicationElbAppealGroundsDetail(BaseModel):
394
396
  """
395
397
 
396
398
 
399
+ class AppealGroundLetter2(Enum):
400
+ a = "a"
401
+ b = "b"
402
+ c = "c"
403
+ d = "d"
404
+ e = "e"
405
+ f = "f"
406
+ g = "g"
407
+ NoneType_None = None
408
+
409
+
410
+ class EnforcementCaseGroundsOfAppealItem(BaseModel):
411
+ model_config = ConfigDict(
412
+ extra="allow",
413
+ )
414
+ appealGroundLetter: AppealGroundLetter2 | None = None
415
+ groundForAppealStartDate: AwareDatetime | None = Field(
416
+ None, examples=["2023-07-27T20:30:00.000Z"]
417
+ )
418
+
419
+
420
+ class AppealGroundLetter3(Enum):
421
+ a = "a"
422
+ b = "b"
423
+ c = "c"
424
+ d = "d"
425
+ e = "e"
426
+ f = "f"
427
+ g = "g"
428
+ h = "h"
429
+ i = "i"
430
+ j = "j"
431
+ k = "k"
432
+ NoneType_None = None
433
+
434
+
435
+ class ElbCaseGroundsOfAppealItem(BaseModel):
436
+ model_config = ConfigDict(
437
+ extra="allow",
438
+ )
439
+ appealGroundLetter: AppealGroundLetter3 | None = None
440
+ groundForAppealStartDate: AwareDatetime | None = Field(
441
+ None, examples=["2023-07-27T20:30:00.000Z"]
442
+ )
443
+
444
+
397
445
  class ApplicationPartOrWholeDevelopment(Enum):
398
446
  """
399
447
  Did the application relate to all or part of the development
@@ -1099,6 +1147,16 @@ class AppealS78Case1(BaseModel):
1099
1147
  """
1100
1148
  A list of grounds for the appeal, supporting facts & start dates. Enforcement cases (C) can have grounds (a) to (g)
1101
1149
  """
1150
+ enforcementCaseGroundsOfAppeal: list[EnforcementCaseGroundsOfAppealItem] | None = (
1151
+ None
1152
+ )
1153
+ """
1154
+ Case Officer list of grounds for the appeal & start dates. Enforcement cases (C) can have grounds (a) to (g)
1155
+ """
1156
+ elbCaseGroundsOfAppeal: list[ElbCaseGroundsOfAppealItem] | None = None
1157
+ """
1158
+ Case Officer list of grounds for the appeal & start dates. Enforcement cases (C) can have grounds (a) to (g)
1159
+ """
1102
1160
  applicationMadeAndFeePaid: bool | None = None
1103
1161
  """
1104
1162
  Was an application made and paid for
@@ -1223,7 +1281,7 @@ class AdvertDetail1(BaseModel):
1223
1281
  """
1224
1282
 
1225
1283
 
1226
- class AppealGroundLetter2(Enum):
1284
+ class AppealGroundLetter4(Enum):
1227
1285
  a = "a"
1228
1286
  b = "b"
1229
1287
  c = "c"
@@ -1238,7 +1296,7 @@ class EnforcementAppealGroundsDetail1(BaseModel):
1238
1296
  model_config = ConfigDict(
1239
1297
  extra="allow",
1240
1298
  )
1241
- appealGroundLetter: AppealGroundLetter2 | None = None
1299
+ appealGroundLetter: AppealGroundLetter4 | None = None
1242
1300
  groundForAppealStartDate: AwareDatetime | None = Field(
1243
1301
  None, examples=["2023-07-27T20:30:00.000Z"]
1244
1302
  )
@@ -1248,7 +1306,7 @@ class EnforcementAppealGroundsDetail1(BaseModel):
1248
1306
  """
1249
1307
 
1250
1308
 
1251
- class AppealGroundLetter3(Enum):
1309
+ class AppealGroundLetter5(Enum):
1252
1310
  a = "a"
1253
1311
  b = "b"
1254
1312
  c = "c"
@@ -1267,7 +1325,7 @@ class ApplicationElbAppealGroundsDetail1(BaseModel):
1267
1325
  model_config = ConfigDict(
1268
1326
  extra="allow",
1269
1327
  )
1270
- appealGroundLetter: AppealGroundLetter3 | None = None
1328
+ appealGroundLetter: AppealGroundLetter5 | None = None
1271
1329
  groundForAppealStartDate: AwareDatetime | None = Field(
1272
1330
  None, examples=["2023-07-27T20:30:00.000Z"]
1273
1331
  )
@@ -1277,6 +1335,52 @@ class ApplicationElbAppealGroundsDetail1(BaseModel):
1277
1335
  """
1278
1336
 
1279
1337
 
1338
+ class AppealGroundLetter6(Enum):
1339
+ a = "a"
1340
+ b = "b"
1341
+ c = "c"
1342
+ d = "d"
1343
+ e = "e"
1344
+ f = "f"
1345
+ g = "g"
1346
+ NoneType_None = None
1347
+
1348
+
1349
+ class EnforcementCaseGroundsOfAppealItem1(BaseModel):
1350
+ model_config = ConfigDict(
1351
+ extra="allow",
1352
+ )
1353
+ appealGroundLetter: AppealGroundLetter6 | None = None
1354
+ groundForAppealStartDate: AwareDatetime | None = Field(
1355
+ None, examples=["2023-07-27T20:30:00.000Z"]
1356
+ )
1357
+
1358
+
1359
+ class AppealGroundLetter7(Enum):
1360
+ a = "a"
1361
+ b = "b"
1362
+ c = "c"
1363
+ d = "d"
1364
+ e = "e"
1365
+ f = "f"
1366
+ g = "g"
1367
+ h = "h"
1368
+ i = "i"
1369
+ j = "j"
1370
+ k = "k"
1371
+ NoneType_None = None
1372
+
1373
+
1374
+ class ElbCaseGroundsOfAppealItem1(BaseModel):
1375
+ model_config = ConfigDict(
1376
+ extra="allow",
1377
+ )
1378
+ appealGroundLetter: AppealGroundLetter7 | None = None
1379
+ groundForAppealStartDate: AwareDatetime | None = Field(
1380
+ None, examples=["2023-07-27T20:30:00.000Z"]
1381
+ )
1382
+
1383
+
1280
1384
  class SignificantChangesAffectingApplicationAppellantItem1(BaseModel):
1281
1385
  value: Value | None
1282
1386
  comment: str | None = None
@@ -1941,6 +2045,16 @@ class AppealS78Case2(BaseModel):
1941
2045
  """
1942
2046
  A list of grounds for the appeal, supporting facts & start dates. Enforcement cases (C) can have grounds (a) to (g)
1943
2047
  """
2048
+ enforcementCaseGroundsOfAppeal: list[EnforcementCaseGroundsOfAppealItem1] | None = (
2049
+ None
2050
+ )
2051
+ """
2052
+ Case Officer list of grounds for the appeal & start dates. Enforcement cases (C) can have grounds (a) to (g)
2053
+ """
2054
+ elbCaseGroundsOfAppeal: list[ElbCaseGroundsOfAppealItem1] | None = None
2055
+ """
2056
+ Case Officer list of grounds for the appeal & start dates. Enforcement cases (C) can have grounds (a) to (g)
2057
+ """
1944
2058
  applicationMadeAndFeePaid: bool | None = None
1945
2059
  """
1946
2060
  Was an application made and paid for
@@ -236,6 +236,7 @@
236
236
  "hearingProcess",
237
237
  "inquiryCore",
238
238
  "inquiryPostEvent",
239
+ "noticeWithdrawal",
239
240
  null
240
241
  ],
241
242
  "description": "The type of document, used for exchange, migrations and consumption from the appeal back-office system"
@@ -125,7 +125,9 @@
125
125
  "awaiting_transfer",
126
126
  "transferred",
127
127
  "event",
128
- "awaiting_event"
128
+ "awaiting_event",
129
+ "notice_withdrawn",
130
+ "closed_opened_in_error"
129
131
  ],
130
132
  "description": "The processing status for the appeal"
131
133
  },
@@ -196,7 +196,9 @@
196
196
  "awaiting_transfer",
197
197
  "transferred",
198
198
  "event",
199
- "awaiting_event"
199
+ "awaiting_event",
200
+ "notice_withdrawn",
201
+ "closed_opened_in_error"
200
202
  ],
201
203
  "description": "The processing status for the appeal",
202
204
  "$comment": "Also available on HAS cases"
@@ -1214,6 +1216,46 @@
1214
1216
  "description": "A list of grounds for the appeal, supporting facts & start dates. Enforcement cases (C) can have grounds (a) to (g)",
1215
1217
  "$comment": "Enforcement Listed Building cases (F) have a separate list of grounds (a) to (k)"
1216
1218
  },
1219
+ "enforcementCaseGroundsOfAppeal": {
1220
+ "type": ["array", "null"],
1221
+ "items": {
1222
+ "type": "object",
1223
+ "additionalProperties": true,
1224
+ "properties": {
1225
+ "appealGroundLetter": {
1226
+ "type": ["string", "null"],
1227
+ "enum": ["a", "b", "c", "d", "e", "f", "g", null]
1228
+ },
1229
+ "groundForAppealStartDate": {
1230
+ "type": ["string", "null"],
1231
+ "format": "date-time",
1232
+ "examples": ["2023-07-27T20:30:00.000Z"]
1233
+ }
1234
+ }
1235
+ },
1236
+ "description": "Case Officer list of grounds for the appeal & start dates. Enforcement cases (C) can have grounds (a) to (g)",
1237
+ "$comment": "Enforcement Listed Building cases (F) have a separate list of grounds (a) to (k)"
1238
+ },
1239
+ "elbCaseGroundsOfAppeal": {
1240
+ "type": ["array", "null"],
1241
+ "items": {
1242
+ "type": "object",
1243
+ "additionalProperties": true,
1244
+ "properties": {
1245
+ "appealGroundLetter": {
1246
+ "type": ["string", "null"],
1247
+ "enum": ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", null]
1248
+ },
1249
+ "groundForAppealStartDate": {
1250
+ "type": ["string", "null"],
1251
+ "format": "date-time",
1252
+ "examples": ["2023-07-27T20:30:00.000Z"]
1253
+ }
1254
+ }
1255
+ },
1256
+ "description": "Case Officer list of grounds for the appeal & start dates. Enforcement cases (C) can have grounds (a) to (g)",
1257
+ "$comment": "Enforcement Listed Building cases (F) have a separate list of grounds (a) to (k)"
1258
+ },
1217
1259
  "applicationMadeAndFeePaid": {
1218
1260
  "type": ["boolean", "null"],
1219
1261
  "description": "Was an application made and paid for"
package/src/enums.cjs CHANGED
@@ -19,11 +19,13 @@ const APPEAL_HAS_CASE_STATUS = Object.freeze({
19
19
  AWAITING_EVENT: 'awaiting_event',
20
20
  AWAITING_TRANSFER: 'awaiting_transfer',
21
21
  CLOSED: 'closed',
22
+ CLOSED_OPENED_IN_ERROR: 'closed_opened_in_error',
22
23
  COMPLETE: 'complete',
23
24
  EVENT: 'event',
24
25
  INVALID: 'invalid',
25
26
  ISSUE_DETERMINATION: 'issue_determination',
26
27
  LPA_QUESTIONNAIRE: 'lpa_questionnaire',
28
+ NOTICE_WITHDRAWN: 'notice_withdrawn',
27
29
  READY_TO_START: 'ready_to_start',
28
30
  TRANSFERRED: 'transferred',
29
31
  VALIDATION: 'validation',
@@ -122,6 +124,7 @@ const APPEAL_CASE_STATUS = Object.freeze({
122
124
  AWAITING_EVENT: 'awaiting_event',
123
125
  AWAITING_TRANSFER: 'awaiting_transfer',
124
126
  CLOSED: 'closed',
127
+ CLOSED_OPENED_IN_ERROR: 'closed_opened_in_error',
125
128
  COMPLETE: 'complete',
126
129
  EVENT: 'event',
127
130
  EVIDENCE: 'evidence',
@@ -129,6 +132,7 @@ const APPEAL_CASE_STATUS = Object.freeze({
129
132
  INVALID: 'invalid',
130
133
  ISSUE_DETERMINATION: 'issue_determination',
131
134
  LPA_QUESTIONNAIRE: 'lpa_questionnaire',
135
+ NOTICE_WITHDRAWN: 'notice_withdrawn',
132
136
  READY_TO_START: 'ready_to_start',
133
137
  STATEMENTS: 'statements',
134
138
  TRANSFERRED: 'transferred',
@@ -258,6 +262,7 @@ const APPEAL_DOCUMENT_TYPE = Object.freeze({
258
262
  LPA_WITNESSES_EVIDENCE: 'lpaWitnessesEvidence',
259
263
  MAIN_PARTY_CORRESPONDENCE: 'mainPartyCorrespondence',
260
264
  NEW_PLANS_DRAWINGS: 'newPlansDrawings',
265
+ NOTICE_WITHDRAWAL: 'noticeWithdrawal',
261
266
  ORIGINAL_APPLICATION_FORM: 'originalApplicationForm',
262
267
  OTHER_NEW_DOCUMENTS: 'otherNewDocuments',
263
268
  OTHER_PARTY_REPRESENTATIONS: 'otherPartyRepresentations',
package/src/enums.d.ts CHANGED
@@ -17,11 +17,13 @@ export const APPEAL_HAS_CASE_STATUS = {
17
17
  AWAITING_EVENT: 'awaiting_event',
18
18
  AWAITING_TRANSFER: 'awaiting_transfer',
19
19
  CLOSED: 'closed',
20
+ CLOSED_OPENED_IN_ERROR: 'closed_opened_in_error',
20
21
  COMPLETE: 'complete',
21
22
  EVENT: 'event',
22
23
  INVALID: 'invalid',
23
24
  ISSUE_DETERMINATION: 'issue_determination',
24
25
  LPA_QUESTIONNAIRE: 'lpa_questionnaire',
26
+ NOTICE_WITHDRAWN: 'notice_withdrawn',
25
27
  READY_TO_START: 'ready_to_start',
26
28
  TRANSFERRED: 'transferred',
27
29
  VALIDATION: 'validation',
@@ -120,6 +122,7 @@ export const APPEAL_CASE_STATUS = {
120
122
  AWAITING_EVENT: 'awaiting_event',
121
123
  AWAITING_TRANSFER: 'awaiting_transfer',
122
124
  CLOSED: 'closed',
125
+ CLOSED_OPENED_IN_ERROR: 'closed_opened_in_error',
123
126
  COMPLETE: 'complete',
124
127
  EVENT: 'event',
125
128
  EVIDENCE: 'evidence',
@@ -127,6 +130,7 @@ export const APPEAL_CASE_STATUS = {
127
130
  INVALID: 'invalid',
128
131
  ISSUE_DETERMINATION: 'issue_determination',
129
132
  LPA_QUESTIONNAIRE: 'lpa_questionnaire',
133
+ NOTICE_WITHDRAWN: 'notice_withdrawn',
130
134
  READY_TO_START: 'ready_to_start',
131
135
  STATEMENTS: 'statements',
132
136
  TRANSFERRED: 'transferred',
@@ -256,6 +260,7 @@ export const APPEAL_DOCUMENT_TYPE = {
256
260
  LPA_WITNESSES_EVIDENCE: 'lpaWitnessesEvidence',
257
261
  MAIN_PARTY_CORRESPONDENCE: 'mainPartyCorrespondence',
258
262
  NEW_PLANS_DRAWINGS: 'newPlansDrawings',
263
+ NOTICE_WITHDRAWAL: 'noticeWithdrawal',
259
264
  ORIGINAL_APPLICATION_FORM: 'originalApplicationForm',
260
265
  OTHER_NEW_DOCUMENTS: 'otherNewDocuments',
261
266
  OTHER_PARTY_REPRESENTATIONS: 'otherPartyRepresentations',
package/src/enums.js CHANGED
@@ -17,11 +17,13 @@ export const APPEAL_HAS_CASE_STATUS = Object.freeze({
17
17
  AWAITING_EVENT: 'awaiting_event',
18
18
  AWAITING_TRANSFER: 'awaiting_transfer',
19
19
  CLOSED: 'closed',
20
+ CLOSED_OPENED_IN_ERROR: 'closed_opened_in_error',
20
21
  COMPLETE: 'complete',
21
22
  EVENT: 'event',
22
23
  INVALID: 'invalid',
23
24
  ISSUE_DETERMINATION: 'issue_determination',
24
25
  LPA_QUESTIONNAIRE: 'lpa_questionnaire',
26
+ NOTICE_WITHDRAWN: 'notice_withdrawn',
25
27
  READY_TO_START: 'ready_to_start',
26
28
  TRANSFERRED: 'transferred',
27
29
  VALIDATION: 'validation',
@@ -120,6 +122,7 @@ export const APPEAL_CASE_STATUS = Object.freeze({
120
122
  AWAITING_EVENT: 'awaiting_event',
121
123
  AWAITING_TRANSFER: 'awaiting_transfer',
122
124
  CLOSED: 'closed',
125
+ CLOSED_OPENED_IN_ERROR: 'closed_opened_in_error',
123
126
  COMPLETE: 'complete',
124
127
  EVENT: 'event',
125
128
  EVIDENCE: 'evidence',
@@ -127,6 +130,7 @@ export const APPEAL_CASE_STATUS = Object.freeze({
127
130
  INVALID: 'invalid',
128
131
  ISSUE_DETERMINATION: 'issue_determination',
129
132
  LPA_QUESTIONNAIRE: 'lpa_questionnaire',
133
+ NOTICE_WITHDRAWN: 'notice_withdrawn',
130
134
  READY_TO_START: 'ready_to_start',
131
135
  STATEMENTS: 'statements',
132
136
  TRANSFERRED: 'transferred',
@@ -256,6 +260,7 @@ export const APPEAL_DOCUMENT_TYPE = Object.freeze({
256
260
  LPA_WITNESSES_EVIDENCE: 'lpaWitnessesEvidence',
257
261
  MAIN_PARTY_CORRESPONDENCE: 'mainPartyCorrespondence',
258
262
  NEW_PLANS_DRAWINGS: 'newPlansDrawings',
263
+ NOTICE_WITHDRAWAL: 'noticeWithdrawal',
259
264
  ORIGINAL_APPLICATION_FORM: 'originalApplicationForm',
260
265
  OTHER_NEW_DOCUMENTS: 'otherNewDocuments',
261
266
  OTHER_PARTY_REPRESENTATIONS: 'otherPartyRepresentations',
package/src/index.cjs CHANGED
@@ -100,11 +100,13 @@ const APPEAL_HAS_CASE_STATUS = Object.freeze({
100
100
  AWAITING_EVENT: 'awaiting_event',
101
101
  AWAITING_TRANSFER: 'awaiting_transfer',
102
102
  CLOSED: 'closed',
103
+ CLOSED_OPENED_IN_ERROR: 'closed_opened_in_error',
103
104
  COMPLETE: 'complete',
104
105
  EVENT: 'event',
105
106
  INVALID: 'invalid',
106
107
  ISSUE_DETERMINATION: 'issue_determination',
107
108
  LPA_QUESTIONNAIRE: 'lpa_questionnaire',
109
+ NOTICE_WITHDRAWN: 'notice_withdrawn',
108
110
  READY_TO_START: 'ready_to_start',
109
111
  TRANSFERRED: 'transferred',
110
112
  VALIDATION: 'validation',
@@ -203,6 +205,7 @@ const APPEAL_CASE_STATUS = Object.freeze({
203
205
  AWAITING_EVENT: 'awaiting_event',
204
206
  AWAITING_TRANSFER: 'awaiting_transfer',
205
207
  CLOSED: 'closed',
208
+ CLOSED_OPENED_IN_ERROR: 'closed_opened_in_error',
206
209
  COMPLETE: 'complete',
207
210
  EVENT: 'event',
208
211
  EVIDENCE: 'evidence',
@@ -210,6 +213,7 @@ const APPEAL_CASE_STATUS = Object.freeze({
210
213
  INVALID: 'invalid',
211
214
  ISSUE_DETERMINATION: 'issue_determination',
212
215
  LPA_QUESTIONNAIRE: 'lpa_questionnaire',
216
+ NOTICE_WITHDRAWN: 'notice_withdrawn',
213
217
  READY_TO_START: 'ready_to_start',
214
218
  STATEMENTS: 'statements',
215
219
  TRANSFERRED: 'transferred',
@@ -339,6 +343,7 @@ const APPEAL_DOCUMENT_TYPE = Object.freeze({
339
343
  LPA_WITNESSES_EVIDENCE: 'lpaWitnessesEvidence',
340
344
  MAIN_PARTY_CORRESPONDENCE: 'mainPartyCorrespondence',
341
345
  NEW_PLANS_DRAWINGS: 'newPlansDrawings',
346
+ NOTICE_WITHDRAWAL: 'noticeWithdrawal',
342
347
  ORIGINAL_APPLICATION_FORM: 'originalApplicationForm',
343
348
  OTHER_NEW_DOCUMENTS: 'otherNewDocuments',
344
349
  OTHER_PARTY_REPRESENTATIONS: 'otherPartyRepresentations',
package/src/schemas.d.ts CHANGED
@@ -232,6 +232,7 @@ export interface AppealDocument {
232
232
  | 'hearingProcess'
233
233
  | 'inquiryCore'
234
234
  | 'inquiryPostEvent'
235
+ | 'noticeWithdrawal'
235
236
  | null;
236
237
  /**
237
238
  * The system mastering the metadata for the current document
@@ -421,7 +422,9 @@ export type AppealHASCase = (GridReference | SiteAddress) & {
421
422
  | 'awaiting_transfer'
422
423
  | 'transferred'
423
424
  | 'event'
424
- | 'awaiting_event';
425
+ | 'awaiting_event'
426
+ | 'notice_withdrawn'
427
+ | 'closed_opened_in_error';
425
428
  /**
426
429
  * The internal code for an appeal type, e.g. D (Householder)
427
430
  */
@@ -1049,7 +1052,9 @@ export type AppealS78Case = (GridReference | SiteAddress) & {
1049
1052
  | 'awaiting_transfer'
1050
1053
  | 'transferred'
1051
1054
  | 'event'
1052
- | 'awaiting_event';
1055
+ | 'awaiting_event'
1056
+ | 'notice_withdrawn'
1057
+ | 'closed_opened_in_error';
1053
1058
  /**
1054
1059
  * The internal code for an appeal type, e.g. D (Householder)
1055
1060
  */
@@ -1701,6 +1706,26 @@ export type AppealS78Case = (GridReference | SiteAddress) & {
1701
1706
  [k: string]: unknown;
1702
1707
  }[]
1703
1708
  | null;
1709
+ /**
1710
+ * Case Officer list of grounds for the appeal & start dates. Enforcement cases (C) can have grounds (a) to (g)
1711
+ */
1712
+ enforcementCaseGroundsOfAppeal?:
1713
+ | {
1714
+ appealGroundLetter?: 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | null;
1715
+ groundForAppealStartDate?: string | null;
1716
+ [k: string]: unknown;
1717
+ }[]
1718
+ | null;
1719
+ /**
1720
+ * Case Officer list of grounds for the appeal & start dates. Enforcement cases (C) can have grounds (a) to (g)
1721
+ */
1722
+ elbCaseGroundsOfAppeal?:
1723
+ | {
1724
+ appealGroundLetter?: 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | null;
1725
+ groundForAppealStartDate?: string | null;
1726
+ [k: string]: unknown;
1727
+ }[]
1728
+ | null;
1704
1729
  /**
1705
1730
  * Was an application made and paid for
1706
1731
  */
@@ -363,4 +363,45 @@ describe(schema, () => {
363
363
  assert.strictEqual(validationResult, false, 'Expected invalid caseProcedure value to fail validation');
364
364
  });
365
365
  });
366
+
367
+ describe('caseStatus schema validation (Group A - HAS)', () => {
368
+ it('should accept caseStatus values', () => {
369
+ for (const status of [
370
+ 'assign_case_officer',
371
+ 'validation',
372
+ 'ready_to_start',
373
+ 'lpa_questionnaire',
374
+ 'issue_determination',
375
+ 'complete',
376
+ 'invalid',
377
+ 'closed',
378
+ 'withdrawn',
379
+ 'awaiting_transfer',
380
+ 'transferred',
381
+ 'event',
382
+ 'awaiting_event',
383
+ 'notice_withdrawn',
384
+ 'closed_opened_in_error'
385
+ ]) {
386
+ const test = structuredClone(appealHas);
387
+ test.caseStatus = status;
388
+ const validationResult = ajv.validate(schema, test);
389
+ assert.strictEqual(validationResult, true, `Expected caseStatus "${status}" to be valid`);
390
+ }
391
+ });
392
+
393
+ it('should not accept null value for caseStatus', () => {
394
+ const test = structuredClone(appealHas);
395
+ test.caseStatus = null;
396
+ const validationResult = ajv.validate(schema, test);
397
+ assert.strictEqual(validationResult, false, 'Expected caseStatus null not to be valid');
398
+ });
399
+
400
+ it('should reject invalid caseStatus values', () => {
401
+ const test = structuredClone(appealHas);
402
+ test.caseStatus = 'invalid_status';
403
+ const validationResult = ajv.validate(schema, test);
404
+ assert.strictEqual(validationResult, false, 'Expected invalid caseStatus value to fail validation');
405
+ });
406
+ });
366
407
  });
@@ -283,4 +283,45 @@ describe(schema, () => {
283
283
  const validationResult = ajv.validate(schema, test);
284
284
  assert.strictEqual(validationResult, true);
285
285
  });
286
+
287
+ describe('caseStatus schema validation (Group B)', () => {
288
+ it('should accept caseStatus values', () => {
289
+ for (const status of [
290
+ 'assign_case_officer',
291
+ 'validation',
292
+ 'ready_to_start',
293
+ 'lpa_questionnaire',
294
+ 'issue_determination',
295
+ 'complete',
296
+ 'invalid',
297
+ 'closed',
298
+ 'withdrawn',
299
+ 'awaiting_transfer',
300
+ 'transferred',
301
+ 'event',
302
+ 'awaiting_event',
303
+ 'notice_withdrawn',
304
+ 'closed_opened_in_error'
305
+ ]) {
306
+ const test = structuredClone(appealS78);
307
+ test.caseStatus = status;
308
+ const validationResult = ajv.validate(schema, test);
309
+ assert.strictEqual(validationResult, true, `Expected caseStatus "${status}" to be valid`);
310
+ }
311
+ });
312
+
313
+ it('should not accept null value for caseStatus', () => {
314
+ const test = structuredClone(appealS78);
315
+ test.caseStatus = null;
316
+ const validationResult = ajv.validate(schema, test);
317
+ assert.strictEqual(validationResult, false, 'Expected caseStatus null not to be valid');
318
+ });
319
+
320
+ it('should reject invalid caseStatus values', () => {
321
+ const test = structuredClone(appealS78);
322
+ test.caseStatus = 'invalid_status';
323
+ const validationResult = ajv.validate(schema, test);
324
+ assert.strictEqual(validationResult, false, 'Expected invalid caseStatus value to fail validation');
325
+ });
326
+ });
286
327
  });