@planning-inspectorate/data-model 1.17.0 → 1.18.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.
@@ -452,23 +452,16 @@ A list of specialisms for allocation purposes
452
452
  ### caseSpecialisms Examples
453
453
 
454
454
  ```json
455
- "Access"
455
+ [
456
+ "Access",
457
+ "Listed building and enforcement"
458
+ ]
456
459
  ```
457
460
 
458
461
  ```json
459
- "Listed building and enforcement"
460
- ```
461
-
462
- ```json
463
- "Roads and traffics"
464
- ```
465
-
466
- ```json
467
- "Natural heritage"
468
- ```
469
-
470
- ```json
471
- "Schedule 1"
462
+ [
463
+ "Schedule 1"
464
+ ]
472
465
  ```
473
466
 
474
467
  ## caseSubmittedDate
@@ -2229,6 +2222,21 @@ The methods used to notify relevant parties
2229
2222
 
2230
2223
  `string[]`
2231
2224
 
2225
+ ### notificationMethod Examples
2226
+
2227
+ ```json
2228
+ [
2229
+ "notice",
2230
+ "letter"
2231
+ ]
2232
+ ```
2233
+
2234
+ ```json
2235
+ [
2236
+ "advert"
2237
+ ]
2238
+ ```
2239
+
2232
2240
  ## ownersInformed
2233
2241
 
2234
2242
  Indicates if the appellant has informed other owners of the site
@@ -506,23 +506,16 @@ A list of specialisms for allocation purposes
506
506
  ### caseSpecialisms Examples
507
507
 
508
508
  ```json
509
- "Access"
509
+ [
510
+ "Access",
511
+ "Listed building and enforcement"
512
+ ]
510
513
  ```
511
514
 
512
515
  ```json
513
- "Listed building and enforcement"
514
- ```
515
-
516
- ```json
517
- "Roads and traffics"
518
- ```
519
-
520
- ```json
521
- "Natural heritage"
522
- ```
523
-
524
- ```json
525
- "Schedule 1"
516
+ [
517
+ "Schedule 1"
518
+ ]
526
519
  ```
527
520
 
528
521
  ## caseSubmittedDate
@@ -1914,6 +1907,21 @@ The methods used to notify relevant parties
1914
1907
 
1915
1908
  `string[]`
1916
1909
 
1910
+ ### notificationMethod Examples
1911
+
1912
+ ```json
1913
+ [
1914
+ "notice",
1915
+ "letter"
1916
+ ]
1917
+ ```
1918
+
1919
+ ```json
1920
+ [
1921
+ "advert"
1922
+ ]
1923
+ ```
1924
+
1917
1925
  ## ownersInformed
1918
1926
 
1919
1927
  Indicates if the appellant has informed other owners of the site
@@ -301,15 +301,16 @@ A list of case specialisms for allocation purposes
301
301
  ### caseSpecialisms Examples
302
302
 
303
303
  ```json
304
- "General allocation"
304
+ [
305
+ "General allocation",
306
+ "Housing orders"
307
+ ]
305
308
  ```
306
309
 
307
310
  ```json
308
- "Housing orders"
309
- ```
310
-
311
- ```json
312
- "Waste"
311
+ [
312
+ "Waste"
313
+ ]
313
314
  ```
314
315
 
315
316
  ## caseSubmittedDate
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planning-inspectorate/data-model",
3
- "version": "1.17.0",
3
+ "version": "1.18.1",
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-has.schema.json
3
- # timestamp: 2025-09-09T11:38:23+00:00
3
+ # timestamp: 2025-09-15T15:35:44+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -175,16 +175,12 @@ class KnowsAllOwners(Enum):
175
175
  NoneType_None = None
176
176
 
177
177
 
178
- class NotificationMethodEnumEnumEnum(Enum):
178
+ class NotificationMethodEnum(Enum):
179
179
  notice = "notice"
180
180
  letter = "letter"
181
181
  advert = "advert"
182
182
 
183
183
 
184
- class NotificationMethodEnum(RootModel[NotificationMethodEnumEnumEnum | None]):
185
- root: NotificationMethodEnumEnumEnum | None = None
186
-
187
-
188
184
  class NeighbouringSiteAddress(BaseModel):
189
185
  model_config = ConfigDict(
190
186
  extra="allow",
@@ -291,14 +287,7 @@ class AppealHasCase1(BaseModel):
291
287
  A band used for allocation purposes
292
288
  """
293
289
  caseSpecialisms: list[str] = Field(
294
- ...,
295
- examples=[
296
- "Access",
297
- "Listed building and enforcement",
298
- "Roads and traffics",
299
- "Natural heritage",
300
- "Schedule 1",
301
- ],
290
+ ..., examples=[["Access", "Listed building and enforcement"], ["Schedule 1"]]
302
291
  )
303
292
  """
304
293
  A list of specialisms for allocation purposes
@@ -643,7 +632,9 @@ class AppealHasCase1(BaseModel):
643
632
  """
644
633
  Indicates if the appellant has advertised the appeal to the LPA decision
645
634
  """
646
- notificationMethod: list[NotificationMethodEnum]
635
+ notificationMethod: list[NotificationMethodEnum] = Field(
636
+ ..., examples=[["notice", "letter"], ["advert"]]
637
+ )
647
638
  """
648
639
  The methods used to notify relevant parties
649
640
  """
@@ -722,16 +713,6 @@ class AppealHasCase1(BaseModel):
722
713
  advertType: str | None = None
723
714
 
724
715
 
725
- class NotificationMethodEnum1EnumEnum(Enum):
726
- notice = "notice"
727
- letter = "letter"
728
- advert = "advert"
729
-
730
-
731
- class NotificationMethodEnum1(RootModel[NotificationMethodEnum1EnumEnum | None]):
732
- root: NotificationMethodEnum1EnumEnum | None = None
733
-
734
-
735
716
  class AppealHasCase2(BaseModel):
736
717
  """
737
718
  Group A - Schema defining the metadata for an appeal
@@ -787,14 +768,7 @@ class AppealHasCase2(BaseModel):
787
768
  A band used for allocation purposes
788
769
  """
789
770
  caseSpecialisms: list[str] = Field(
790
- ...,
791
- examples=[
792
- "Access",
793
- "Listed building and enforcement",
794
- "Roads and traffics",
795
- "Natural heritage",
796
- "Schedule 1",
797
- ],
771
+ ..., examples=[["Access", "Listed building and enforcement"], ["Schedule 1"]]
798
772
  )
799
773
  """
800
774
  A list of specialisms for allocation purposes
@@ -1139,7 +1113,9 @@ class AppealHasCase2(BaseModel):
1139
1113
  """
1140
1114
  Indicates if the appellant has advertised the appeal to the LPA decision
1141
1115
  """
1142
- notificationMethod: list[NotificationMethodEnum1]
1116
+ notificationMethod: list[NotificationMethodEnum] = Field(
1117
+ ..., examples=[["notice", "letter"], ["advert"]]
1118
+ )
1143
1119
  """
1144
1120
  The methods used to notify relevant parties
1145
1121
  """
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: appeal-s78.schema.json
3
- # timestamp: 2025-09-09T11:38:22+00:00
3
+ # timestamp: 2025-09-15T15:35:44+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -169,16 +169,12 @@ class KnowsAllOwners(Enum):
169
169
  NoneType_None = None
170
170
 
171
171
 
172
- class NotificationMethodEnumEnumEnum(Enum):
172
+ class NotificationMethodEnum(Enum):
173
173
  notice = "notice"
174
174
  letter = "letter"
175
175
  advert = "advert"
176
176
 
177
177
 
178
- class NotificationMethodEnum(RootModel[NotificationMethodEnumEnumEnum | None]):
179
- root: NotificationMethodEnumEnumEnum | None = None
180
-
181
-
182
178
  class NeighbouringSiteAddress(BaseModel):
183
179
  model_config = ConfigDict(
184
180
  extra="allow",
@@ -357,14 +353,7 @@ class AppealS78Case1(BaseModel):
357
353
  A band used for allocation purposes
358
354
  """
359
355
  caseSpecialisms: list[str] = Field(
360
- ...,
361
- examples=[
362
- "Access",
363
- "Listed building and enforcement",
364
- "Roads and traffics",
365
- "Natural heritage",
366
- "Schedule 1",
367
- ],
356
+ ..., examples=[["Access", "Listed building and enforcement"], ["Schedule 1"]]
368
357
  )
369
358
  """
370
359
  A list of specialisms for allocation purposes
@@ -611,7 +600,9 @@ class AppealS78Case1(BaseModel):
611
600
  """
612
601
  Indicates if the appellant has advertised the appeal to the LPA decision
613
602
  """
614
- notificationMethod: list[NotificationMethodEnum]
603
+ notificationMethod: list[NotificationMethodEnum] = Field(
604
+ ..., examples=[["notice", "letter"], ["advert"]]
605
+ )
615
606
  """
616
607
  The methods used to notify relevant parties
617
608
  """
@@ -875,16 +866,6 @@ class AppealS78Case1(BaseModel):
875
866
  )
876
867
 
877
868
 
878
- class NotificationMethodEnum1EnumEnum(Enum):
879
- notice = "notice"
880
- letter = "letter"
881
- advert = "advert"
882
-
883
-
884
- class NotificationMethodEnum1(RootModel[NotificationMethodEnum1EnumEnum | None]):
885
- root: NotificationMethodEnum1EnumEnum | None = None
886
-
887
-
888
869
  class AppealS78Case2(BaseModel):
889
870
  """
890
871
  Group B - Schema defining the metadata for an appeal
@@ -940,14 +921,7 @@ class AppealS78Case2(BaseModel):
940
921
  A band used for allocation purposes
941
922
  """
942
923
  caseSpecialisms: list[str] = Field(
943
- ...,
944
- examples=[
945
- "Access",
946
- "Listed building and enforcement",
947
- "Roads and traffics",
948
- "Natural heritage",
949
- "Schedule 1",
950
- ],
924
+ ..., examples=[["Access", "Listed building and enforcement"], ["Schedule 1"]]
951
925
  )
952
926
  """
953
927
  A list of specialisms for allocation purposes
@@ -1194,7 +1168,9 @@ class AppealS78Case2(BaseModel):
1194
1168
  """
1195
1169
  Indicates if the appellant has advertised the appeal to the LPA decision
1196
1170
  """
1197
- notificationMethod: list[NotificationMethodEnum1]
1171
+ notificationMethod: list[NotificationMethodEnum] = Field(
1172
+ ..., examples=[["notice", "letter"], ["advert"]]
1173
+ )
1198
1174
  """
1199
1175
  The methods used to notify relevant parties
1200
1176
  """
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: dart-response.schema.json
3
- # timestamp: 2025-08-29T10:40:44+00:00
3
+ # timestamp: 2025-09-15T15:35:43+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -78,7 +78,7 @@ class DartApiResponse(BaseModel):
78
78
  A band used for allocation purposes
79
79
  """
80
80
  caseSpecialisms: list[str] | None = Field(
81
- None, examples=["General allocation", "Housing orders", "Waste"]
81
+ None, examples=[["General allocation", "Housing orders"], ["Waste"]]
82
82
  )
83
83
  """
84
84
  A list of case specialisms for allocation purposes
@@ -167,9 +167,16 @@
167
167
  "caseSpecialisms": {
168
168
  "type": ["array", "null"],
169
169
  "items": {
170
- "type": "string"
170
+ "type": "string",
171
+ "examples": [
172
+ "Access",
173
+ "Listed building and enforcement",
174
+ "Roads and traffics",
175
+ "Natural heritage",
176
+ "Schedule 1"
177
+ ]
171
178
  },
172
- "examples": ["Access", "Listed building and enforcement", "Roads and traffics", "Natural heritage", "Schedule 1"],
179
+ "examples": [["Access", "Listed building and enforcement"], ["Schedule 1"]],
173
180
  "description": "A list of specialisms for allocation purposes"
174
181
  },
175
182
  "caseSubmittedDate": {
@@ -573,8 +580,9 @@
573
580
  "type": ["array", "null"],
574
581
  "items": {
575
582
  "type": "string",
576
- "enum": ["notice", "letter", "advert", null]
583
+ "enum": ["notice", "letter", "advert"]
577
584
  },
585
+ "examples": [["notice", "letter"], ["advert"]],
578
586
  "description": "The methods used to notify relevant parties"
579
587
  },
580
588
  "ownersInformed": {
@@ -236,9 +236,16 @@
236
236
  "caseSpecialisms": {
237
237
  "type": ["array", "null"],
238
238
  "items": {
239
- "type": "string"
239
+ "type": "string",
240
+ "examples": [
241
+ "Access",
242
+ "Listed building and enforcement",
243
+ "Roads and traffics",
244
+ "Natural heritage",
245
+ "Schedule 1"
246
+ ]
240
247
  },
241
- "examples": ["Access", "Listed building and enforcement", "Roads and traffics", "Natural heritage", "Schedule 1"],
248
+ "examples": [["Access", "Listed building and enforcement"], ["Schedule 1"]],
242
249
  "description": "A list of specialisms for allocation purposes",
243
250
  "$comment": "Also available on HAS cases"
244
251
  },
@@ -584,8 +591,9 @@
584
591
  "type": ["array", "null"],
585
592
  "items": {
586
593
  "type": "string",
587
- "enum": ["notice", "letter", "advert", null]
594
+ "enum": ["notice", "letter", "advert"]
588
595
  },
596
+ "examples": [["notice", "letter"], ["advert"]],
589
597
  "description": "The methods used to notify relevant parties",
590
598
  "$comment": "Also available on HAS cases"
591
599
  },
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "commands/appeal-advert.submission.schema.json",
4
+ "title": "Advert specific properties",
5
+ "description": "Schema defining any properties for advertisement appeals",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": ["isSiteOnHighwayLand", "isAdvertInPosition", "hasLandownersPermission"],
9
+ "properties": {
10
+ "hasLandownersPermission": {
11
+ "type": ["boolean", "null"],
12
+ "description": "Indicates if the appellant has land owners permission"
13
+ },
14
+ "isAdvertInPosition": {
15
+ "type": ["boolean", "null"],
16
+ "description": "Indicates if the advert is already in position"
17
+ },
18
+ "isSiteOnHighwayLand": {
19
+ "type": ["boolean", "null"],
20
+ "description": "Indicates if site is on highway land"
21
+ }
22
+ }
23
+ }
@@ -16,16 +16,28 @@
16
16
  "applicationDecision",
17
17
  "applicationDecisionDate",
18
18
  "caseSubmissionDueDate",
19
- "siteAddressLine1",
20
- "siteAddressLine2",
21
- "siteAddressTown",
22
- "siteAddressCounty",
23
- "siteAddressPostcode",
24
19
  "siteAccessDetails",
25
20
  "siteSafetyDetails",
26
21
  "neighbouringSiteAddresses",
27
22
  "nearbyCaseReferences"
28
23
  ],
24
+ "anyOf": [
25
+ {
26
+ "required": ["siteGridReferenceEasting", "siteGridReferenceNorthing"],
27
+ "properties": {
28
+ "siteGridReferenceEasting": { "not": { "type": "null" } },
29
+ "siteGridReferenceNorthing": { "not": { "type": "null" } }
30
+ }
31
+ },
32
+ {
33
+ "required": ["siteAddressLine1", "siteAddressTown", "siteAddressPostcode"],
34
+ "properties": {
35
+ "siteAddressLine1": { "not": { "type": "null" } },
36
+ "siteAddressTown": { "not": { "type": "null" } },
37
+ "siteAddressPostcode": { "not": { "type": "null" } }
38
+ }
39
+ }
40
+ ],
29
41
  "properties": {
30
42
  "submissionId": {
31
43
  "type": "string",
@@ -84,7 +96,7 @@
84
96
  "$comment": "Calculated from the applicationDecisionDate"
85
97
  },
86
98
  "siteAddressLine1": {
87
- "type": "string",
99
+ "type": ["string", "null"],
88
100
  "examples": ["96 The Avenue"],
89
101
  "description": "First line of address for the appeal site"
90
102
  },
@@ -93,7 +105,7 @@
93
105
  "description": "Second line of address for the appeal site"
94
106
  },
95
107
  "siteAddressTown": {
96
- "type": "string",
108
+ "type": ["string", "null"],
97
109
  "examples": ["Maidstone"],
98
110
  "description": "Town / City of the site address"
99
111
  },
@@ -103,10 +115,20 @@
103
115
  "description": "County of the site address"
104
116
  },
105
117
  "siteAddressPostcode": {
106
- "type": "string",
118
+ "type": ["string", "null"],
107
119
  "examples": ["MD21 5XY"],
108
120
  "description": "Postal code of the site address"
109
121
  },
122
+ "siteGridReferenceEasting": {
123
+ "type": ["string", "null"],
124
+ "pattern": "^\\d{6}$",
125
+ "examples": ["357144"]
126
+ },
127
+ "siteGridReferenceNorthing": {
128
+ "type": ["string", "null"],
129
+ "pattern": "^\\d{6}$",
130
+ "examples": ["400534"]
131
+ },
110
132
  "siteAccessDetails": {
111
133
  "type": ["array", "null"],
112
134
  "items": {
@@ -20,7 +20,6 @@
20
20
  "appellantCostsAppliedFor"
21
21
  ],
22
22
  "allOf": [
23
- { "$ref": "appeal-common-submission.schema.json" },
24
23
  {
25
24
  "properties": {
26
25
  "isGreenBelt": {
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "representationType": {
23
23
  "type": "string",
24
- "enum": ["statement", "comment", "final_comment", "proofs_evidence", null],
24
+ "enum": ["statement", "comment", "final_comment", "proofs_evidence"],
25
25
  "description": "The type of representation"
26
26
  },
27
27
  "representation": {
@@ -19,7 +19,6 @@
19
19
  "developmentType"
20
20
  ],
21
21
  "allOf": [
22
- { "$ref": "appeal-has-submission.schema.json" },
23
22
  {
24
23
  "properties": {
25
24
  "agriculturalHolding": {
@@ -14,19 +14,30 @@
14
14
  "required": ["caseType"],
15
15
  "oneOf": [
16
16
  {
17
- "allOf": [{ "properties": { "caseType": { "const": "D" } } }, { "$ref": "appeal-has-submission.schema.json" }]
18
- },
19
- {
17
+ "$comment": "Householder + CAS Planning",
20
18
  "allOf": [
21
- { "properties": { "caseType": { "const": "ZP" } } },
19
+ { "properties": { "caseType": { "enum": ["D", "ZP"] } } },
20
+ { "$ref": "appeal-common-submission.schema.json" },
22
21
  { "$ref": "appeal-has-submission.schema.json" }
23
22
  ]
24
23
  },
25
24
  {
26
- "allOf": [{ "properties": { "caseType": { "const": "W" } } }, { "$ref": "appeal-s78-submission.schema.json" }]
25
+ "$comment": "S78 + S20",
26
+ "allOf": [
27
+ { "properties": { "caseType": { "enum": ["W", "Y"] } } },
28
+ { "$ref": "appeal-common-submission.schema.json" },
29
+ { "$ref": "appeal-has-submission.schema.json" },
30
+ { "$ref": "appeal-s78-submission.schema.json" }
31
+ ]
27
32
  },
28
33
  {
29
- "allOf": [{ "properties": { "caseType": { "const": "Y" } } }, { "$ref": "appeal-s78-submission.schema.json" }]
34
+ "$comment": "Adverts + CAS Adverts",
35
+ "allOf": [
36
+ { "properties": { "caseType": { "enum": ["H", "ZA"] } } },
37
+ { "$ref": "appeal-common-submission.schema.json" },
38
+ { "$ref": "appeal-has-submission.schema.json" },
39
+ { "$ref": "appeal-advert.submission.schema.json" }
40
+ ]
30
41
  }
31
42
  ]
32
43
  },
@@ -16,7 +16,6 @@
16
16
  "lpaStatement"
17
17
  ],
18
18
  "allOf": [
19
- { "$ref": "lpa-questionnaire-common.schema.json" },
20
19
  {
21
20
  "properties": {
22
21
  "isCorrectAppealType": {
@@ -35,7 +35,6 @@
35
35
  "lpaProcedurePreferenceDuration"
36
36
  ],
37
37
  "allOf": [
38
- { "$ref": "lpa-questionnaire-has.schema.json" },
39
38
  {
40
39
  "properties": {
41
40
  "changedListedBuildingNumbers": {
@@ -11,27 +11,29 @@
11
11
  "casedata": {
12
12
  "type": "object",
13
13
  "additionalProperties": true,
14
- "anyOf": [
14
+ "oneOf": [
15
15
  {
16
+ "$comment": "Householder + CAS Planning",
16
17
  "allOf": [
17
- { "$comment": "backwards compatibility for no case type, when removed can update allOf to oneOf" },
18
- { "not": { "required": ["caseType"] } },
18
+ { "properties": { "caseType": { "enum": ["D", "ZP"] } } },
19
+ { "$ref": "lpa-questionnaire-common.schema.json" },
19
20
  { "$ref": "lpa-questionnaire-has.schema.json" }
20
21
  ]
21
22
  },
22
23
  {
23
- "allOf": [{ "properties": { "caseType": { "const": "W" } } }, { "$ref": "lpa-questionnaire-s78.schema.json" }]
24
- },
25
- {
26
- "allOf": [{ "properties": { "caseType": { "const": "Y" } } }, { "$ref": "lpa-questionnaire-s78.schema.json" }]
27
- },
28
- {
29
- "allOf": [{ "properties": { "caseType": { "const": "D" } } }, { "$ref": "lpa-questionnaire-has.schema.json" }]
24
+ "$comment": "S78 + S20",
25
+ "allOf": [
26
+ { "properties": { "caseType": { "enum": ["W", "Y"] } } },
27
+ { "$ref": "lpa-questionnaire-common.schema.json" },
28
+ { "$ref": "lpa-questionnaire-has.schema.json" },
29
+ { "$ref": "lpa-questionnaire-s78.schema.json" }
30
+ ]
30
31
  },
31
32
  {
33
+ "$comment": "Adverts + CAS Adverts - TBD - may need separate schemas",
32
34
  "allOf": [
33
- { "properties": { "caseType": { "const": "ZP" } } },
34
- { "$ref": "lpa-questionnaire-has.schema.json" }
35
+ { "properties": { "caseType": { "enum": ["H", "ZA"] } } },
36
+ { "$ref": "lpa-questionnaire-common.schema.json" }
35
37
  ]
36
38
  }
37
39
  ]
@@ -55,9 +55,10 @@
55
55
  "caseSpecialisms": {
56
56
  "type": ["array", "null"],
57
57
  "items": {
58
- "type": "string"
58
+ "type": "string",
59
+ "examples": ["General allocation", "Housing orders", "Waste"]
59
60
  },
60
- "examples": ["General allocation", "Housing orders", "Waste"],
61
+ "examples": [["General allocation", "Housing orders"], ["Waste"]],
61
62
  "description": "A list of case specialisms for allocation purposes"
62
63
  },
63
64
  "caseSubmittedDate": {