@planning-inspectorate/data-model 1.21.0 → 2.0.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.
Files changed (36) hide show
  1. package/.azure/ci.yml +1 -1
  2. package/.azure/release.yml +1 -1
  3. package/.releaserc +14 -0
  4. package/docs/README.md +4 -0
  5. package/docs/appeal-has.md +30 -49
  6. package/docs/appeal-s78.md +241 -144
  7. package/package.json +2 -1
  8. package/pins_data_model/models/model_appeal_has.py +72 -27
  9. package/pins_data_model/models/model_appeal_s78.py +95 -8
  10. package/schemas/appeal-has.schema.json +52 -21
  11. package/schemas/appeal-s78.schema.json +62 -7
  12. package/schemas/commands/appeals-components/appeal-advert.submission.schema.json +53 -0
  13. package/schemas/commands/{appeal-common-submission.schema.json → appeals-components/appeal-common-submission.schema.json} +8 -8
  14. package/schemas/commands/{appeal-has-submission.schema.json → appeals-components/appeal-has-submission.schema.json} +2 -2
  15. package/schemas/commands/{appeal-s78-submission.schema.json → appeals-components/appeal-s78-submission.schema.json} +2 -2
  16. package/schemas/commands/appeals-components/appellant-procedure-preference.schema.json +37 -0
  17. package/schemas/commands/appeals-components/changed-listed-building-number.schema.json +23 -0
  18. package/schemas/commands/appeals-components/lpa-procedure-preference.schema.json +28 -0
  19. package/schemas/commands/{lpa-questionnaire-cas-advert.schema.json → appeals-components/lpa-questionnaire-advert.schema.json} +8 -33
  20. package/schemas/commands/{lpa-questionnaire-common.schema.json → appeals-components/lpa-questionnaire-common.schema.json} +1 -1
  21. package/schemas/commands/{lpa-questionnaire-has.schema.json → appeals-components/lpa-questionnaire-has.schema.json} +1 -1
  22. package/schemas/commands/{lpa-questionnaire-s78.schema.json → appeals-components/lpa-questionnaire-s78.schema.json} +2 -21
  23. package/schemas/commands/appellant-submission.schema.json +21 -10
  24. package/schemas/commands/lpa-questionnaire.schema.json +24 -10
  25. package/src/index.cjs +6 -2
  26. package/src/index.d.ts +4 -0
  27. package/src/index.js +5 -2
  28. package/src/schemas.d.ts +326 -803
  29. package/tests/appeals/appeal-has.test.js +30 -5
  30. package/tests/appeals/appeal-s78.test.js +17 -3
  31. package/tests/appeals/commands/adverts-questionnaire.test.js +1 -0
  32. package/tests/appeals/commands/adverts-submission.test.js +13 -13
  33. package/tests/appeals/commands/cas-adverts-submission.test.js +184 -0
  34. package/tests/appeals/commands/has-submission.test.js +2 -2
  35. package/tests/appeals/commands/s78-submission.test.js +2 -2
  36. package/schemas/commands/appeal-advert.submission.schema.json +0 -23
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: appeal-has.schema.json
3
- # timestamp: 2025-11-04T12:33:59+00:00
3
+ # timestamp: 2025-11-07T15:19:29+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -232,6 +232,38 @@ class TypeOfPlanningApplication(Enum):
232
232
  NoneType_None = None
233
233
 
234
234
 
235
+ class AdvertType(Enum):
236
+ field_4_6_Sheet_Non_Illuminated = "4-6 Sheet Non-Illuminated"
237
+ field_4_6_Sheet_Illuminated = "4-6 Sheet Illuminated"
238
+ field_12_16_32_Sheet_Non_Illuminated = "12/16/32 Sheet Non-Illuminated"
239
+ field_12_16_32_Sheet_Illuminated = "12/16/32 Sheet Illuminated"
240
+ field_48_64_96_Sheet_Non_Illuminated = "48/64/96 Sheet Non-Illuminated"
241
+ field_48_64_96_Sheet_Illuminated = "48/64/96 Sheet Illuminated"
242
+ Fascia_Projecting_Signs_Non_Illuminated = "Fascia Projecting Signs Non-Illuminated"
243
+ Fascia_Projecting_Signs_Illuminated = "Fascia Projecting Signs Illuminated"
244
+ Directional___Others_Non_Illuminated = "Directional & Others Non-Illuminated"
245
+ Directional___Others_Illuminated = "Directional & Others Illuminated"
246
+ Monolith_Totem_Signs_Non_Illuminated = "Monolith/Totem Signs Non-Illuminated"
247
+ Monolith_Totem_Signs_Illuminated = "Monolith/Totem Signs Illuminated"
248
+ Other = "Other"
249
+ NoneType_None = None
250
+
251
+
252
+ class AdvertDetail(BaseModel):
253
+ model_config = ConfigDict(
254
+ extra="allow",
255
+ )
256
+ advertType: AdvertType
257
+ isAdvertInPosition: bool | None = None
258
+ """
259
+ Is the advertisement in position?
260
+ """
261
+ isSiteOnHighwayLand: bool | None = None
262
+ """
263
+ Is the site on highway land?
264
+ """
265
+
266
+
235
267
  class AppealHasCase1(BaseModel):
236
268
  """
237
269
  Group A - Schema defining the metadata for an appeal
@@ -684,33 +716,47 @@ class AppealHasCase1(BaseModel):
684
716
  Indicates if the appellant has applied for costs
685
717
  """
686
718
  typeOfPlanningApplication: TypeOfPlanningApplication | None = None
687
- siteGridReferenceEasting: constr(pattern=r"^\d{6}$") | None = Field(
719
+ siteGridReferenceEasting: constr(pattern=r"^\d{6,7}$") = Field(
688
720
  ..., examples=["357144"]
689
721
  )
690
- siteGridReferenceNorthing: constr(pattern=r"^\d{6}$") | None = Field(
722
+ siteGridReferenceNorthing: constr(pattern=r"^\d{6,7}$") = Field(
691
723
  ..., examples=["400534"]
692
724
  )
693
725
  hasLandownersPermission: bool | None = None
694
726
  """
695
- Indicates if the appellant has land owners permission
727
+ Does the appellant have the landowners permission
696
728
  """
697
- isAdvertInPosition: bool | None = None
729
+ wasApplicationRefusedDueToHighwayOrTraffic: bool | None = None
730
+ """
731
+ Did the LPA refuse the application because of highway or traffic public safety?
732
+ """
733
+ didAppellantSubmitCompletePhotosAndPlans: bool | None = None
698
734
  """
699
- Indicates if the advert is already in position
735
+ Did the appellant submit complete photos and plans?
700
736
  """
701
737
  isSiteInAreaOfSpecialControlAdverts: bool | None = None
702
738
  """
703
- Indicates if the site is in an area of special control for adverts
739
+ Is the site in an area of special control of advertisements?
704
740
  """
705
- wasApplicationRefusedDueToHighwayOrTraffic: bool | None = None
741
+ advertDetails: list[AdvertDetail] | None = None
706
742
  """
707
- Indicates if the application was refused because of highway or traffic public safety?
743
+ A list of advertisements for the appeal
708
744
  """
709
- didAppellantSubmitCompletePhotosAndPlans: bool | None = None
745
+
746
+
747
+ class AdvertDetail1(BaseModel):
748
+ model_config = ConfigDict(
749
+ extra="allow",
750
+ )
751
+ advertType: AdvertType
752
+ isAdvertInPosition: bool | None = None
753
+ """
754
+ Is the advertisement in position?
710
755
  """
711
- Indicates if the appellant submitted complete and accurate photographs and plans
756
+ isSiteOnHighwayLand: bool | None = None
757
+ """
758
+ Is the site on highway land?
712
759
  """
713
- advertType: str | None = None
714
760
 
715
761
 
716
762
  class AppealHasCase2(BaseModel):
@@ -947,7 +993,7 @@ class AppealHasCase2(BaseModel):
947
993
  """
948
994
  The statutory deadline for submitting an appeal from the original LPA decision date
949
995
  """
950
- siteAddressLine1: str | None = Field(..., examples=["96 The Avenue"])
996
+ siteAddressLine1: str = Field(..., examples=["96 The Avenue"])
951
997
  """
952
998
  First line of address for the appeal site
953
999
  """
@@ -955,7 +1001,7 @@ class AppealHasCase2(BaseModel):
955
1001
  """
956
1002
  Second line of address for the appeal site
957
1003
  """
958
- siteAddressTown: str | None = Field(..., examples=["Maidstone"])
1004
+ siteAddressTown: str = Field(..., examples=["Maidstone"])
959
1005
  """
960
1006
  Town / City of the site address
961
1007
  """
@@ -963,7 +1009,7 @@ class AppealHasCase2(BaseModel):
963
1009
  """
964
1010
  County of the site address
965
1011
  """
966
- siteAddressPostcode: str | None = Field(..., examples=["MD21 5XY"])
1012
+ siteAddressPostcode: str = Field(..., examples=["MD21 5XY"])
967
1013
  """
968
1014
  Postal code of the site address
969
1015
  """
@@ -1165,33 +1211,32 @@ class AppealHasCase2(BaseModel):
1165
1211
  Indicates if the appellant has applied for costs
1166
1212
  """
1167
1213
  typeOfPlanningApplication: TypeOfPlanningApplication | None = None
1168
- siteGridReferenceEasting: constr(pattern=r"^\d{6}$") | None = Field(
1214
+ siteGridReferenceEasting: constr(pattern=r"^\d{6,7}$") | None = Field(
1169
1215
  None, examples=["357144"]
1170
1216
  )
1171
- siteGridReferenceNorthing: constr(pattern=r"^\d{6}$") | None = Field(
1217
+ siteGridReferenceNorthing: constr(pattern=r"^\d{6,7}$") | None = Field(
1172
1218
  None, examples=["400534"]
1173
1219
  )
1174
1220
  hasLandownersPermission: bool | None = None
1175
1221
  """
1176
- Indicates if the appellant has land owners permission
1222
+ Does the appellant have the landowners permission
1177
1223
  """
1178
- isAdvertInPosition: bool | None = None
1224
+ wasApplicationRefusedDueToHighwayOrTraffic: bool | None = None
1179
1225
  """
1180
- Indicates if the advert is already in position
1226
+ Did the LPA refuse the application because of highway or traffic public safety?
1181
1227
  """
1182
- isSiteInAreaOfSpecialControlAdverts: bool | None = None
1228
+ didAppellantSubmitCompletePhotosAndPlans: bool | None = None
1183
1229
  """
1184
- Indicates if the site is in an area of special control for adverts
1230
+ Did the appellant submit complete photos and plans?
1185
1231
  """
1186
- wasApplicationRefusedDueToHighwayOrTraffic: bool | None = None
1232
+ isSiteInAreaOfSpecialControlAdverts: bool | None = None
1187
1233
  """
1188
- Indicates if the application was refused because of highway or traffic public safety?
1234
+ Is the site in an area of special control of advertisements?
1189
1235
  """
1190
- didAppellantSubmitCompletePhotosAndPlans: bool | None = None
1236
+ advertDetails: list[AdvertDetail1] | None = None
1191
1237
  """
1192
- Indicates if the appellant submitted complete and accurate photographs and plans
1238
+ A list of advertisements for the appeal
1193
1239
  """
1194
- advertType: str | None = None
1195
1240
 
1196
1241
 
1197
1242
  class AppealHasCase(RootModel[AppealHasCase1 | AppealHasCase2]):
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: appeal-s78.schema.json
3
- # timestamp: 2025-11-04T12:34:00+00:00
3
+ # timestamp: 2025-11-07T15:19:29+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -298,6 +298,38 @@ class DevelopmentType(Enum):
298
298
  NoneType_None = None
299
299
 
300
300
 
301
+ class AdvertType(Enum):
302
+ field_4_6_Sheet_Non_Illuminated = "4-6 Sheet Non-Illuminated"
303
+ field_4_6_Sheet_Illuminated = "4-6 Sheet Illuminated"
304
+ field_12_16_32_Sheet_Non_Illuminated = "12/16/32 Sheet Non-Illuminated"
305
+ field_12_16_32_Sheet_Illuminated = "12/16/32 Sheet Illuminated"
306
+ field_48_64_96_Sheet_Non_Illuminated = "48/64/96 Sheet Non-Illuminated"
307
+ field_48_64_96_Sheet_Illuminated = "48/64/96 Sheet Illuminated"
308
+ Fascia_Projecting_Signs_Non_Illuminated = "Fascia Projecting Signs Non-Illuminated"
309
+ Fascia_Projecting_Signs_Illuminated = "Fascia Projecting Signs Illuminated"
310
+ Directional___Others_Non_Illuminated = "Directional & Others Non-Illuminated"
311
+ Directional___Others_Illuminated = "Directional & Others Illuminated"
312
+ Monolith_Totem_Signs_Non_Illuminated = "Monolith/Totem Signs Non-Illuminated"
313
+ Monolith_Totem_Signs_Illuminated = "Monolith/Totem Signs Illuminated"
314
+ Other = "Other"
315
+ NoneType_None = None
316
+
317
+
318
+ class AdvertDetail(BaseModel):
319
+ model_config = ConfigDict(
320
+ extra="allow",
321
+ )
322
+ advertType: AdvertType
323
+ isAdvertInPosition: bool | None = None
324
+ """
325
+ Is the advertisement in position?
326
+ """
327
+ isSiteOnHighwayLand: bool | None = None
328
+ """
329
+ Is the site on highway land?
330
+ """
331
+
332
+
301
333
  class AppealS78Case1(BaseModel):
302
334
  """
303
335
  Group B - Schema defining the metadata for an appeal
@@ -848,10 +880,10 @@ class AppealS78Case1(BaseModel):
848
880
  """
849
881
  The net gain in residences of the proposed development
850
882
  """
851
- siteGridReferenceEasting: constr(pattern=r"^\d{6}$") | None = Field(
883
+ siteGridReferenceEasting: constr(pattern=r"^\d{6,7}$") = Field(
852
884
  ..., examples=["357144"]
853
885
  )
854
- siteGridReferenceNorthing: constr(pattern=r"^\d{6}$") | None = Field(
886
+ siteGridReferenceNorthing: constr(pattern=r"^\d{6,7}$") = Field(
855
887
  ..., examples=["400534"]
856
888
  )
857
889
  siteViewableFromRoad: bool | None = None
@@ -864,6 +896,41 @@ class AppealS78Case1(BaseModel):
864
896
  planningObligationDueDate: AwareDatetime | None = Field(
865
897
  None, examples=["2023-07-27T20:30:00.000Z"]
866
898
  )
899
+ hasLandownersPermission: bool | None = None
900
+ """
901
+ Does the appellant have the landowners permission
902
+ """
903
+ wasApplicationRefusedDueToHighwayOrTraffic: bool | None = None
904
+ """
905
+ Did the LPA refuse the application because of highway or traffic public safety?
906
+ """
907
+ didAppellantSubmitCompletePhotosAndPlans: bool | None = None
908
+ """
909
+ Did the appellant submit complete photos and plans?
910
+ """
911
+ isSiteInAreaOfSpecialControlAdverts: bool | None = None
912
+ """
913
+ Is the site in an area of special control of advertisements?
914
+ """
915
+ advertDetails: list[AdvertDetail] | None = None
916
+ """
917
+ A list of advertisements for the appeal
918
+ """
919
+
920
+
921
+ class AdvertDetail1(BaseModel):
922
+ model_config = ConfigDict(
923
+ extra="allow",
924
+ )
925
+ advertType: AdvertType
926
+ isAdvertInPosition: bool | None = None
927
+ """
928
+ Is the advertisement in position?
929
+ """
930
+ isSiteOnHighwayLand: bool | None = None
931
+ """
932
+ Is the site on highway land?
933
+ """
867
934
 
868
935
 
869
936
  class AppealS78Case2(BaseModel):
@@ -1100,7 +1167,7 @@ class AppealS78Case2(BaseModel):
1100
1167
  """
1101
1168
  The statutory deadline for submitting an appeal from the original LPA decision date
1102
1169
  """
1103
- siteAddressLine1: str | None = Field(..., examples=["96 The Avenue"])
1170
+ siteAddressLine1: str = Field(..., examples=["96 The Avenue"])
1104
1171
  """
1105
1172
  First line of address for the appeal site
1106
1173
  """
@@ -1108,7 +1175,7 @@ class AppealS78Case2(BaseModel):
1108
1175
  """
1109
1176
  Second line of address for the appeal site
1110
1177
  """
1111
- siteAddressTown: str | None = Field(..., examples=["Maidstone"])
1178
+ siteAddressTown: str = Field(..., examples=["Maidstone"])
1112
1179
  """
1113
1180
  Town / City of the site address
1114
1181
  """
@@ -1116,7 +1183,7 @@ class AppealS78Case2(BaseModel):
1116
1183
  """
1117
1184
  County of the site address
1118
1185
  """
1119
- siteAddressPostcode: str | None = Field(..., examples=["MD21 5XY"])
1186
+ siteAddressPostcode: str = Field(..., examples=["MD21 5XY"])
1120
1187
  """
1121
1188
  Postal code of the site address
1122
1189
  """
@@ -1416,10 +1483,10 @@ class AppealS78Case2(BaseModel):
1416
1483
  """
1417
1484
  The net gain in residences of the proposed development
1418
1485
  """
1419
- siteGridReferenceEasting: constr(pattern=r"^\d{6}$") | None = Field(
1486
+ siteGridReferenceEasting: constr(pattern=r"^\d{6,7}$") | None = Field(
1420
1487
  None, examples=["357144"]
1421
1488
  )
1422
- siteGridReferenceNorthing: constr(pattern=r"^\d{6}$") | None = Field(
1489
+ siteGridReferenceNorthing: constr(pattern=r"^\d{6,7}$") | None = Field(
1423
1490
  None, examples=["400534"]
1424
1491
  )
1425
1492
  siteViewableFromRoad: bool | None = None
@@ -1432,6 +1499,26 @@ class AppealS78Case2(BaseModel):
1432
1499
  planningObligationDueDate: AwareDatetime | None = Field(
1433
1500
  None, examples=["2023-07-27T20:30:00.000Z"]
1434
1501
  )
1502
+ hasLandownersPermission: bool | None = None
1503
+ """
1504
+ Does the appellant have the landowners permission
1505
+ """
1506
+ wasApplicationRefusedDueToHighwayOrTraffic: bool | None = None
1507
+ """
1508
+ Did the LPA refuse the application because of highway or traffic public safety?
1509
+ """
1510
+ didAppellantSubmitCompletePhotosAndPlans: bool | None = None
1511
+ """
1512
+ Did the appellant submit complete photos and plans?
1513
+ """
1514
+ isSiteInAreaOfSpecialControlAdverts: bool | None = None
1515
+ """
1516
+ Is the site in an area of special control of advertisements?
1517
+ """
1518
+ advertDetails: list[AdvertDetail1] | None = None
1519
+ """
1520
+ A list of advertisements for the appeal
1521
+ """
1435
1522
 
1436
1523
 
1437
1524
  class AppealS78Case(RootModel[AppealS78Case1 | AppealS78Case2]):
@@ -78,16 +78,16 @@
78
78
  {
79
79
  "required": ["siteGridReferenceEasting", "siteGridReferenceNorthing"],
80
80
  "properties": {
81
- "siteGridReferenceEasting": { "not": { "type": "null" } },
82
- "siteGridReferenceNorthing": { "not": { "type": "null" } }
81
+ "siteGridReferenceEasting": { "type": "string" },
82
+ "siteGridReferenceNorthing": { "type": "string" }
83
83
  }
84
84
  },
85
85
  {
86
86
  "required": ["siteAddressLine1", "siteAddressTown", "siteAddressPostcode"],
87
87
  "properties": {
88
- "siteAddressLine1": { "not": { "type": "null" } },
89
- "siteAddressTown": { "not": { "type": "null" } },
90
- "siteAddressPostcode": { "not": { "type": "null" } }
88
+ "siteAddressLine1": { "type": "string" },
89
+ "siteAddressTown": { "type": "string" },
90
+ "siteAddressPostcode": { "type": "string" }
91
91
  }
92
92
  }
93
93
  ],
@@ -701,37 +701,68 @@
701
701
  },
702
702
  "siteGridReferenceEasting": {
703
703
  "type": ["string", "null"],
704
- "pattern": "^\\d{6}$",
704
+ "pattern": "^\\d{6,7}$",
705
705
  "examples": ["357144"]
706
706
  },
707
707
  "siteGridReferenceNorthing": {
708
708
  "type": ["string", "null"],
709
- "pattern": "^\\d{6}$",
709
+ "pattern": "^\\d{6,7}$",
710
710
  "examples": ["400534"]
711
711
  },
712
712
  "hasLandownersPermission": {
713
713
  "type": ["boolean", "null"],
714
- "description": "Indicates if the appellant has land owners permission"
715
- },
716
- "isAdvertInPosition": {
717
- "type": ["boolean", "null"],
718
- "description": "Indicates if the advert is already in position"
719
- },
720
- "isSiteInAreaOfSpecialControlAdverts": {
721
- "type": ["boolean", "null"],
722
- "description": "Indicates if the site is in an area of special control for adverts"
714
+ "description": "Does the appellant have the landowners permission"
723
715
  },
724
716
  "wasApplicationRefusedDueToHighwayOrTraffic": {
725
717
  "type": ["boolean", "null"],
726
- "description": "Indicates if the application was refused because of highway or traffic public safety?"
718
+ "description": "Did the LPA refuse the application because of highway or traffic public safety?"
727
719
  },
728
720
  "didAppellantSubmitCompletePhotosAndPlans": {
729
721
  "type": ["boolean", "null"],
730
- "description": "Indicates if the appellant submitted complete and accurate photographs and plans"
722
+ "description": "Did the appellant submit complete photos and plans?"
731
723
  },
732
- "advertType": {
733
- "type": ["string", "null"],
734
- "$comment": "Pick from a TBD list of reference data for advert type"
724
+ "isSiteInAreaOfSpecialControlAdverts": {
725
+ "type": ["boolean", "null"],
726
+ "description": "Is the site in an area of special control of advertisements?"
727
+ },
728
+ "advertDetails": {
729
+ "type": ["array", "null"],
730
+ "items": {
731
+ "type": "object",
732
+ "additionalProperties": true,
733
+ "properties": {
734
+ "advertType": {
735
+ "type": ["string", "null"],
736
+ "enum": [
737
+ "4-6 Sheet Non-Illuminated",
738
+ "4-6 Sheet Illuminated",
739
+ "12/16/32 Sheet Non-Illuminated",
740
+ "12/16/32 Sheet Illuminated",
741
+ "48/64/96 Sheet Non-Illuminated",
742
+ "48/64/96 Sheet Illuminated",
743
+ "Fascia Projecting Signs Non-Illuminated",
744
+ "Fascia Projecting Signs Illuminated",
745
+ "Directional & Others Non-Illuminated",
746
+ "Directional & Others Illuminated",
747
+ "Monolith/Totem Signs Non-Illuminated",
748
+ "Monolith/Totem Signs Illuminated",
749
+ "Other",
750
+ null
751
+ ]
752
+ },
753
+ "isAdvertInPosition": {
754
+ "type": ["boolean", "null"],
755
+ "description": "Is the advertisement in position?"
756
+ },
757
+ "isSiteOnHighwayLand": {
758
+ "type": ["boolean", "null"],
759
+ "description": "Is the site on highway land?"
760
+ }
761
+ },
762
+ "required": ["advertType", "isAdvertInPosition", "isSiteOnHighwayLand"]
763
+ },
764
+ "description": "A list of advertisements for the appeal",
765
+ "$comment": "Also available on CAS Adverts (ZA) cases"
735
766
  }
736
767
  }
737
768
  }
@@ -136,16 +136,16 @@
136
136
  {
137
137
  "required": ["siteGridReferenceEasting", "siteGridReferenceNorthing"],
138
138
  "properties": {
139
- "siteGridReferenceEasting": { "not": { "type": "null" } },
140
- "siteGridReferenceNorthing": { "not": { "type": "null" } }
139
+ "siteGridReferenceEasting": { "type": "string" },
140
+ "siteGridReferenceNorthing": { "type": "string" }
141
141
  }
142
142
  },
143
143
  {
144
144
  "required": ["siteAddressLine1", "siteAddressTown", "siteAddressPostcode"],
145
145
  "properties": {
146
- "siteAddressLine1": { "not": { "type": "null" } },
147
- "siteAddressTown": { "not": { "type": "null" } },
148
- "siteAddressPostcode": { "not": { "type": "null" } }
146
+ "siteAddressLine1": { "type": "string" },
147
+ "siteAddressTown": { "type": "string" },
148
+ "siteAddressPostcode": { "type": "string" }
149
149
  }
150
150
  }
151
151
  ],
@@ -973,12 +973,12 @@
973
973
  },
974
974
  "siteGridReferenceEasting": {
975
975
  "type": ["string", "null"],
976
- "pattern": "^\\d{6}$",
976
+ "pattern": "^\\d{6,7}$",
977
977
  "examples": ["357144"]
978
978
  },
979
979
  "siteGridReferenceNorthing": {
980
980
  "type": ["string", "null"],
981
- "pattern": "^\\d{6}$",
981
+ "pattern": "^\\d{6,7}$",
982
982
  "examples": ["400534"]
983
983
  },
984
984
  "siteViewableFromRoad": {
@@ -1032,6 +1032,61 @@
1032
1032
  "type": ["string", "null"],
1033
1033
  "format": "date-time",
1034
1034
  "examples": ["2023-07-27T20:30:00.000Z"]
1035
+ },
1036
+ "hasLandownersPermission": {
1037
+ "type": ["boolean", "null"],
1038
+ "description": "Does the appellant have the landowners permission"
1039
+ },
1040
+ "wasApplicationRefusedDueToHighwayOrTraffic": {
1041
+ "type": ["boolean", "null"],
1042
+ "description": "Did the LPA refuse the application because of highway or traffic public safety?"
1043
+ },
1044
+ "didAppellantSubmitCompletePhotosAndPlans": {
1045
+ "type": ["boolean", "null"],
1046
+ "description": "Did the appellant submit complete photos and plans?"
1047
+ },
1048
+ "isSiteInAreaOfSpecialControlAdverts": {
1049
+ "type": ["boolean", "null"],
1050
+ "description": "Is the site in an area of special control of advertisements?"
1051
+ },
1052
+ "advertDetails": {
1053
+ "type": ["array", "null"],
1054
+ "items": {
1055
+ "type": "object",
1056
+ "additionalProperties": true,
1057
+ "properties": {
1058
+ "advertType": {
1059
+ "type": ["string", "null"],
1060
+ "enum": [
1061
+ "4-6 Sheet Non-Illuminated",
1062
+ "4-6 Sheet Illuminated",
1063
+ "12/16/32 Sheet Non-Illuminated",
1064
+ "12/16/32 Sheet Illuminated",
1065
+ "48/64/96 Sheet Non-Illuminated",
1066
+ "48/64/96 Sheet Illuminated",
1067
+ "Fascia Projecting Signs Non-Illuminated",
1068
+ "Fascia Projecting Signs Illuminated",
1069
+ "Directional & Others Non-Illuminated",
1070
+ "Directional & Others Illuminated",
1071
+ "Monolith/Totem Signs Non-Illuminated",
1072
+ "Monolith/Totem Signs Illuminated",
1073
+ "Other",
1074
+ null
1075
+ ]
1076
+ },
1077
+ "isAdvertInPosition": {
1078
+ "type": ["boolean", "null"],
1079
+ "description": "Is the advertisement in position?"
1080
+ },
1081
+ "isSiteOnHighwayLand": {
1082
+ "type": ["boolean", "null"],
1083
+ "description": "Is the site on highway land?"
1084
+ }
1085
+ },
1086
+ "required": ["advertType", "isAdvertInPosition", "isSiteOnHighwayLand"]
1087
+ },
1088
+ "description": "A list of advertisements for the appeal",
1089
+ "$comment": "Also available on CAS Adverts (ZA) cases"
1035
1090
  }
1036
1091
  }
1037
1092
  }
@@ -0,0 +1,53 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "commands/appeals-components/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": ["hasLandownersPermission", "advertDetails"],
9
+ "properties": {
10
+ "hasLandownersPermission": {
11
+ "type": ["boolean", "null"],
12
+ "description": "Indicates if the appellant has land owners permission"
13
+ },
14
+ "advertDetails": {
15
+ "type": ["array", "null"],
16
+ "items": {
17
+ "type": "object",
18
+ "additionalProperties": true,
19
+ "required": ["advertType", "isAdvertInPosition", "isSiteOnHighwayLand"],
20
+ "properties": {
21
+ "advertType": {
22
+ "type": ["string", "null"],
23
+ "enum": [
24
+ "4-6 Sheet Non-Illuminated",
25
+ "4-6 Sheet Illuminated",
26
+ "12/16/32 Sheet Non-Illuminated",
27
+ "12/16/32 Sheet Illuminated",
28
+ "48/64/96 Sheet Non-Illuminated",
29
+ "48/64/96 Sheet Illuminated",
30
+ "Fascia Projecting Signs Non-Illuminated",
31
+ "Fascia Projecting Signs Illuminated",
32
+ "Directional & Others Non-Illuminated",
33
+ "Directional & Others Illuminated",
34
+ "Monolith/Totem Signs Non-Illuminated",
35
+ "Monolith/Totem Signs Illuminated",
36
+ "Other",
37
+ null
38
+ ]
39
+ },
40
+ "isAdvertInPosition": {
41
+ "type": ["boolean", "null"],
42
+ "description": "Is the advertisement in position?"
43
+ },
44
+ "isSiteOnHighwayLand": {
45
+ "type": ["boolean", "null"],
46
+ "description": "Is the site on highway land?"
47
+ }
48
+ }
49
+ },
50
+ "description": "A list of advertisements for the appeal"
51
+ }
52
+ }
53
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "commands/appeal-common-submission.schema.json",
3
+ "$id": "commands/appeals-components/appeal-common-submission.schema.json",
4
4
  "title": "Appellant common submission properties",
5
5
  "description": "Schema defining any properties common across all appeal types for appeal submissions",
6
6
  "type": "object",
@@ -25,16 +25,16 @@
25
25
  {
26
26
  "required": ["siteGridReferenceEasting", "siteGridReferenceNorthing"],
27
27
  "properties": {
28
- "siteGridReferenceEasting": { "not": { "type": "null" } },
29
- "siteGridReferenceNorthing": { "not": { "type": "null" } }
28
+ "siteGridReferenceEasting": { "type": "string" },
29
+ "siteGridReferenceNorthing": { "type": "string" }
30
30
  }
31
31
  },
32
32
  {
33
33
  "required": ["siteAddressLine1", "siteAddressTown", "siteAddressPostcode"],
34
34
  "properties": {
35
- "siteAddressLine1": { "not": { "type": "null" } },
36
- "siteAddressTown": { "not": { "type": "null" } },
37
- "siteAddressPostcode": { "not": { "type": "null" } }
35
+ "siteAddressLine1": { "type": "string" },
36
+ "siteAddressTown": { "type": "string" },
37
+ "siteAddressPostcode": { "type": "string" }
38
38
  }
39
39
  }
40
40
  ],
@@ -121,12 +121,12 @@
121
121
  },
122
122
  "siteGridReferenceEasting": {
123
123
  "type": ["string", "null"],
124
- "pattern": "^\\d{6}$",
124
+ "pattern": "^\\d{6,7}$",
125
125
  "examples": ["357144"]
126
126
  },
127
127
  "siteGridReferenceNorthing": {
128
128
  "type": ["string", "null"],
129
- "pattern": "^\\d{6}$",
129
+ "pattern": "^\\d{6,7}$",
130
130
  "examples": ["400534"]
131
131
  },
132
132
  "siteAccessDetails": {
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "commands/appeal-has-submission.schema.json",
3
+ "$id": "commands/appeals-components/appeal-has-submission.schema.json",
4
4
  "title": "Appellant HAS submission properties",
5
- "description": "Schema defining any HAS specific properties for submissions",
5
+ "description": "Schema defining any HAS specific properties for appeal submissions",
6
6
  "type": "object",
7
7
  "additionalProperties": true,
8
8
  "required": [