@planning-inspectorate/data-model 2.17.0 → 2.19.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planning-inspectorate/data-model",
3
- "version": "2.17.0",
3
+ "version": "2.19.0",
4
4
  "description": "JSON Schemas for the Planning Inspectorate's Data Model",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -0,0 +1,137 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "commands/appeals-components/appeal-enforcement-common-submission.schema.json",
4
+ "title": "Appellant enforcement common submission properties",
5
+ "description": "Schema defining any common properties for enforcement appeals",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": [
9
+ "submissionId",
10
+ "caseProcedure",
11
+ "lpaCode",
12
+ "caseSubmittedDate",
13
+ "enforcementNotice",
14
+ "enforcementReference",
15
+ "caseSubmissionDueDate",
16
+ "enforcementIssueDate",
17
+ "enforcementEffectiveDate"
18
+ ],
19
+ "properties": {
20
+ "submissionId": {
21
+ "type": "string",
22
+ "format": "uuid",
23
+ "examples": ["7f45748c-2342-4b59-b934-ad6183e8d834"],
24
+ "description": "Case submission id - link to draft submission created by appellant"
25
+ },
26
+ "descriptionOfAllegedBreach": {
27
+ "type": ["string", "null"],
28
+ "description": "A description of the alleged breach"
29
+ },
30
+ "caseProcedure": {
31
+ "type": "string",
32
+ "enum": ["written", "hearing", "inquiry"],
33
+ "description": "The type of procedure for the appeal"
34
+ },
35
+ "lpaCode": {
36
+ "type": "string",
37
+ "examples": ["Q9999"],
38
+ "description": "A unique identifier for the Local Planning Authority",
39
+ "$comment": "Uses the internal PINS code identifying LPAs"
40
+ },
41
+ "caseSubmittedDate": {
42
+ "type": "string",
43
+ "format": "date-time",
44
+ "examples": ["2023-07-27T20:30:00.000Z"],
45
+ "description": "The date the appeal was submitted by the appellant"
46
+ },
47
+ "enforcementNotice": {
48
+ "type": ["boolean", "null"],
49
+ "description": "Indicates if an enforcement notice is the reason for the appeal"
50
+ },
51
+ "enforcementReference": {
52
+ "type": "string",
53
+ "examples": ["123456"],
54
+ "description": "The unique identifier of the enforcement notice"
55
+ },
56
+ "enforcementIssueDate": {
57
+ "type": "string",
58
+ "format": "date-time",
59
+ "examples": ["2023-07-27T20:30:00.000Z"],
60
+ "description": "The date the enforcement notice was issued"
61
+ },
62
+ "enforcementEffectiveDate": {
63
+ "type": "string",
64
+ "format": "date-time",
65
+ "examples": ["2023-07-27T20:30:00.000Z"],
66
+ "description": "The date the enforcement notice took effect"
67
+ },
68
+ "contactPlanningInspectorateDate": {
69
+ "type": ["string", "null"],
70
+ "format": "date-time",
71
+ "examples": ["2023-07-27T20:30:00.000Z"],
72
+ "description": "The date the enforcement notice took effect"
73
+ },
74
+ "interestInLand": {
75
+ "type": ["string", "null"],
76
+ "examples": ["owner, tenant, mortgage holder, other"],
77
+ "description": "The individual's interest in the appeal land"
78
+ },
79
+ "caseSubmissionDueDate": {
80
+ "type": ["string", "null"],
81
+ "format": "date-time",
82
+ "examples": ["2023-07-27T20:30:00.000Z"],
83
+ "description": "The statutory deadline for submitting an appeal from the original LPA decision date",
84
+ "$comment": "Calculated from the applicationDecisionDate"
85
+ },
86
+ "siteAccessDetails": {
87
+ "type": ["array", "null"],
88
+ "items": {
89
+ "type": "string",
90
+ "examples": ["The site is accessible through the small gate on the left of the property"]
91
+ },
92
+ "description": "Provided information on site accessibility"
93
+ },
94
+ "siteSafetyDetails": {
95
+ "type": ["array", "null"],
96
+ "items": {
97
+ "type": "string",
98
+ "examples": ["There is an aggressive dog in the property"]
99
+ },
100
+ "description": "Provided information on site health and safety"
101
+ },
102
+ "appellantCostsAppliedFor": {
103
+ "type": ["boolean", "null"],
104
+ "description": "Indicates if the appellant has applied for costs",
105
+ "$comment": "Also available on HAS cases"
106
+ },
107
+ "appellantProcedurePreference": {
108
+ "type": ["string", "null"],
109
+ "enum": ["written", "hearing", "inquiry", null],
110
+ "description": "The procedure preference indicated by the appellant"
111
+ },
112
+ "appellantProcedurePreferenceDetails": {
113
+ "type": ["string", "null"],
114
+ "description": "The procedure details preference indicated by the appellant"
115
+ },
116
+ "appellantProcedurePreferenceDuration": {
117
+ "type": ["number", "null"],
118
+ "description": "The duration of the procedure indicated by the appellant"
119
+ },
120
+ "appellantProcedurePreferenceWitnessCount": {
121
+ "type": ["number", "null"],
122
+ "description": "The number of witnesses appellant has suggested for inquiries preference"
123
+ },
124
+ "statusPlanningObligation": {
125
+ "type": ["string", "null"],
126
+ "description": "The planning obligation information, if available"
127
+ },
128
+ "nearbyCaseReferences": {
129
+ "type": ["array", "null"],
130
+ "items": {
131
+ "type": "string",
132
+ "examples": ["6000456", "8004567"]
133
+ },
134
+ "description": "A list of related case references known to the appellant and the LPA"
135
+ }
136
+ }
137
+ }
@@ -0,0 +1,103 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "commands/appeals-components/appeal-enforcement-listed-submission.schema.json",
4
+ "title": "Appellant enforcement listed building submission properties",
5
+ "description": "Schema defining any properties for enforcement listed building appeals",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": [],
9
+ "properties": {
10
+ "namedIndividuals": {
11
+ "type": ["array", "null"],
12
+ "items": {
13
+ "type": "object",
14
+ "additionalProperties": true,
15
+ "properties": {
16
+ "firstName": {
17
+ "type": "string",
18
+ "description": "First name of the individual"
19
+ },
20
+ "lastName": {
21
+ "type": "string",
22
+ "description": "Last name of the individual"
23
+ },
24
+ "interestInLand": {
25
+ "type": "string",
26
+ "examples": ["owner, tenant, mortgage holder, other"],
27
+ "description": "Individual's interest in the appeal land"
28
+ }
29
+ },
30
+ "required": ["firstName", "lastName", "interestInLand"]
31
+ },
32
+ "description": "A list of individuals named on the enforcement notice"
33
+ },
34
+ "siteAddressLine1": {
35
+ "type": ["string", "null"],
36
+ "examples": ["96 The Avenue"],
37
+ "description": "First line of address for the appeal site"
38
+ },
39
+ "siteAddressLine2": {
40
+ "type": ["string", "null"],
41
+ "description": "Second line of address for the appeal site"
42
+ },
43
+ "siteAddressTown": {
44
+ "type": ["string", "null"],
45
+ "examples": ["Maidstone"],
46
+ "description": "Town / City of the site address"
47
+ },
48
+ "siteAddressCounty": {
49
+ "type": ["string", "null"],
50
+ "examples": ["Kent"],
51
+ "description": "County of the site address"
52
+ },
53
+ "siteAddressPostcode": {
54
+ "type": ["string", "null"],
55
+ "examples": ["MD21 5XY"],
56
+ "description": "Postal code of the site address"
57
+ },
58
+ "contactAddressLine1": {
59
+ "type": ["string", "null"],
60
+ "examples": ["96 The Avenue"],
61
+ "description": "First line of address for the appeal site"
62
+ },
63
+ "contactAddressLine2": {
64
+ "type": ["string", "null"],
65
+ "description": "Second line of address for the appeal site"
66
+ },
67
+ "contactAddressTown": {
68
+ "type": ["string", "null"],
69
+ "examples": ["Maidstone"],
70
+ "description": "Town / City of the site address"
71
+ },
72
+ "contactAddressCounty": {
73
+ "type": ["string", "null"],
74
+ "examples": ["Kent"],
75
+ "description": "County of the site address"
76
+ },
77
+ "contactAddressPostcode": {
78
+ "type": ["string", "null"],
79
+ "examples": ["MD21 5XY"],
80
+ "description": "Postal code of the site address"
81
+ },
82
+ "appealGrounds": {
83
+ "type": ["array", "null"],
84
+ "items": {
85
+ "type": "object",
86
+ "additionalProperties": true,
87
+ "properties": {
88
+ "groundRef": {
89
+ "type": "string",
90
+ "enum": ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k"],
91
+ "description": "Name of the appeal ground"
92
+ },
93
+ "factsForGround": {
94
+ "type": "string",
95
+ "description": "Facts supporting the appeal ground"
96
+ }
97
+ },
98
+ "required": ["groundRef", "factsForGround"]
99
+ },
100
+ "description": "A list of appeal grounds being pleaded"
101
+ }
102
+ }
103
+ }
@@ -5,17 +5,7 @@
5
5
  "description": "Schema defining any properties for enforcement appeals",
6
6
  "type": "object",
7
7
  "additionalProperties": true,
8
- "required": [
9
- "submissionId",
10
- "caseProcedure",
11
- "lpaCode",
12
- "caseSubmittedDate",
13
- "enforcementNotice",
14
- "enforcementReference",
15
- "caseSubmissionDueDate",
16
- "enforcementIssueDate",
17
- "enforcementEffectiveDate"
18
- ],
8
+ "required": [],
19
9
  "anyOf": [
20
10
  {
21
11
  "required": ["siteGridReferenceEasting", "siteGridReferenceNorthing"],
@@ -34,70 +24,6 @@
34
24
  }
35
25
  ],
36
26
  "properties": {
37
- "submissionId": {
38
- "type": "string",
39
- "format": "uuid",
40
- "examples": ["7f45748c-2342-4b59-b934-ad6183e8d834"],
41
- "description": "Case submission id - link to draft submission created by appellant"
42
- },
43
- "caseProcedure": {
44
- "type": "string",
45
- "enum": ["written", "hearing", "inquiry"],
46
- "description": "The type of procedure for the appeal"
47
- },
48
- "lpaCode": {
49
- "type": "string",
50
- "examples": ["Q9999"],
51
- "description": "A unique identifier for the Local Planning Authority",
52
- "$comment": "Uses the internal PINS code identifying LPAs"
53
- },
54
- "caseSubmittedDate": {
55
- "type": "string",
56
- "format": "date-time",
57
- "examples": ["2023-07-27T20:30:00.000Z"],
58
- "description": "The date the appeal was submitted by the appellant"
59
- },
60
- "enforcementNotice": {
61
- "type": ["boolean", "null"],
62
- "description": "Indicates if an enforcement notice is the reason for the appeal"
63
- },
64
- "enforcementReference": {
65
- "type": "string",
66
- "examples": ["123456"],
67
- "description": "The unique identifier of the enforcement notice"
68
- },
69
- "enforcementIssueDate": {
70
- "type": "string",
71
- "format": "date-time",
72
- "examples": ["2023-07-27T20:30:00.000Z"],
73
- "description": "The date the enforcement notice was issued"
74
- },
75
- "enforcementEffectiveDate": {
76
- "type": "string",
77
- "format": "date-time",
78
- "examples": ["2023-07-27T20:30:00.000Z"],
79
- "description": "The date the enforcement notice took effect"
80
- },
81
- "contactPlanningInspectorateDate": {
82
- "type": ["string", "null"],
83
- "format": "date-time",
84
- "examples": ["2023-07-27T20:30:00.000Z"],
85
- "description": "The date the enforcement notice took effect"
86
- },
87
- "interestInLand": {
88
- "type": ["string", "null"],
89
- "examples": ["owner, tenant, mortgage holder, other"],
90
- "description": "The individual's interest in the appeal land"
91
- },
92
- "writtenOrVerbalPermission": {
93
- "type": ["string", "null"],
94
- "examples": ["yes, no"],
95
- "description": "If required, whether the individual has permission to use the appeal land"
96
- },
97
- "descriptionOfAllegedBreach": {
98
- "type": ["string", "null"],
99
- "description": "A description of the alleged breach"
100
- },
101
27
  "applicationMadeAndFeePaid": {
102
28
  "type": ["boolean", "null"],
103
29
  "description": "Whether a planning application was made"
@@ -147,13 +73,6 @@
147
73
  "examples": ["2023-07-27T20:30:00.000Z"],
148
74
  "description": "The date of the appeal against the original LPA decision"
149
75
  },
150
- "caseSubmissionDueDate": {
151
- "type": ["string", "null"],
152
- "format": "date-time",
153
- "examples": ["2023-07-27T20:30:00.000Z"],
154
- "description": "The statutory deadline for submitting an appeal from the original LPA decision date",
155
- "$comment": "Calculated from the applicationDecisionDate"
156
- },
157
76
  "siteAddressLine1": {
158
77
  "type": ["string", "null"],
159
78
  "examples": ["96 The Avenue"],
@@ -178,16 +97,6 @@
178
97
  "examples": ["MD21 5XY"],
179
98
  "description": "Postal code of the site address"
180
99
  },
181
- "siteGridReferenceEasting": {
182
- "type": ["string", "null"],
183
- "pattern": "^\\d{6,7}$",
184
- "examples": ["357144"]
185
- },
186
- "siteGridReferenceNorthing": {
187
- "type": ["string", "null"],
188
- "pattern": "^\\d{6,7}$",
189
- "examples": ["400534"]
190
- },
191
100
  "contactAddressLine1": {
192
101
  "type": ["string", "null"],
193
102
  "examples": ["96 The Avenue"],
@@ -212,65 +121,38 @@
212
121
  "examples": ["MD21 5XY"],
213
122
  "description": "Postal code of the site address"
214
123
  },
215
- "contactGridReferenceEasting": {
124
+ "siteGridReferenceEasting": {
216
125
  "type": ["string", "null"],
217
126
  "pattern": "^\\d{6,7}$",
218
127
  "examples": ["357144"]
219
128
  },
220
- "contactGridReferenceNorthing": {
129
+ "siteGridReferenceNorthing": {
221
130
  "type": ["string", "null"],
222
131
  "pattern": "^\\d{6,7}$",
223
132
  "examples": ["400534"]
224
133
  },
225
- "siteAccessDetails": {
226
- "type": ["array", "null"],
227
- "items": {
228
- "type": "string",
229
- "examples": ["The site is accessible through the small gate on the left of the property"]
230
- },
231
- "description": "Provided information on site accessibility"
232
- },
233
- "siteSafetyDetails": {
234
- "type": ["array", "null"],
235
- "items": {
236
- "type": "string",
237
- "examples": ["There is an aggressive dog in the property"]
238
- },
239
- "description": "Provided information on site health and safety"
240
- },
241
- "appellantCostsAppliedFor": {
134
+ "retrospectiveApplication": {
242
135
  "type": ["boolean", "null"],
243
- "description": "Indicates if the appellant has applied for costs",
244
- "$comment": "Also available on HAS cases"
136
+ "description": "Whether a retrospective planning application was made"
245
137
  },
246
- "appellantProcedurePreference": {
138
+ "contactGridReferenceEasting": {
247
139
  "type": ["string", "null"],
248
- "enum": ["written", "hearing", "inquiry", null],
249
- "description": "The procedure preference indicated by the appellant"
140
+ "pattern": "^\\d{6,7}$",
141
+ "examples": ["357144"]
250
142
  },
251
- "appellantProcedurePreferenceDetails": {
143
+ "contactGridReferenceNorthing": {
252
144
  "type": ["string", "null"],
253
- "description": "The procedure details preference indicated by the appellant"
254
- },
255
- "appellantProcedurePreferenceDuration": {
256
- "type": ["number", "null"],
257
- "description": "The duration of the procedure indicated by the appellant"
145
+ "pattern": "^\\d{6,7}$",
146
+ "examples": ["400534"]
258
147
  },
259
- "appellantProcedurePreferenceWitnessCount": {
260
- "type": ["number", "null"],
261
- "description": "The number of witnesses appellant has suggested for inquiries preference"
148
+ "groundAFeePaid": {
149
+ "type": ["boolean", "null"],
150
+ "description": "Whether a ground (a) fee has been paid"
262
151
  },
263
- "statusPlanningObligation": {
152
+ "writtenOrVerbalPermission": {
264
153
  "type": ["string", "null"],
265
- "description": "The planning obligation information, if available"
266
- },
267
- "nearbyCaseReferences": {
268
- "type": ["array", "null"],
269
- "items": {
270
- "type": "string",
271
- "examples": ["6000456", "8004567"]
272
- },
273
- "description": "A list of related case references known to the appellant and the LPA"
154
+ "examples": ["yes, no"],
155
+ "description": "If required, whether the individual has permission to use the appeal land"
274
156
  },
275
157
  "namedIndividuals": {
276
158
  "type": ["array", "null"],
@@ -293,8 +175,8 @@
293
175
  },
294
176
  "writtenOrVerbalPermission": {
295
177
  "type": ["string", "null"],
296
- "examples": ["yes"],
297
- "description": "Whether the individual has permission to use the land"
178
+ "examples": ["yes, no"],
179
+ "description": "If required, whether the individual has permission to use the appeal land"
298
180
  }
299
181
  },
300
182
  "required": ["firstName", "lastName", "interestInLand", "writtenOrVerbalPermission"]
@@ -61,6 +61,7 @@
61
61
  "allOf": [
62
62
  { "properties": { "caseType": { "enum": ["C"] } } },
63
63
  { "$ref": "appeals-components/appeal-enforcement-submission.schema.json" },
64
+ { "$ref": "appeals-components/appeal-enforcement-common-submission.schema.json" },
64
65
  { "$ref": "appeals-components/appellant-procedure-preference.schema.json" }
65
66
  ]
66
67
  },
@@ -78,7 +79,8 @@
78
79
  "$comment": "Enforcement listed building",
79
80
  "allOf": [
80
81
  { "properties": { "caseType": { "enum": ["F"] } } },
81
- { "$ref": "appeals-components/appeal-enforcement-submission.schema.json" },
82
+ { "$ref": "appeals-components/appeal-enforcement-common-submission.schema.json" },
83
+ { "$ref": "appeals-components/appeal-enforcement-listed-submission.schema.json" },
82
84
  { "$ref": "appeals-components/appellant-procedure-preference.schema.json" }
83
85
  ]
84
86
  }
package/src/schemas.d.ts CHANGED
@@ -3745,54 +3745,6 @@ export type AppellantEnforcementSubmissionProperties = (
3745
3745
  siteAddressPostcode: string;
3746
3746
  }
3747
3747
  ) & {
3748
- /**
3749
- * Case submission id - link to draft submission created by appellant
3750
- */
3751
- submissionId: string;
3752
- /**
3753
- * The type of procedure for the appeal
3754
- */
3755
- caseProcedure: 'written' | 'hearing' | 'inquiry';
3756
- /**
3757
- * A unique identifier for the Local Planning Authority
3758
- */
3759
- lpaCode: string;
3760
- /**
3761
- * The date the appeal was submitted by the appellant
3762
- */
3763
- caseSubmittedDate: string;
3764
- /**
3765
- * Indicates if an enforcement notice is the reason for the appeal
3766
- */
3767
- enforcementNotice: boolean | null;
3768
- /**
3769
- * The unique identifier of the enforcement notice
3770
- */
3771
- enforcementReference: string;
3772
- /**
3773
- * The date the enforcement notice was issued
3774
- */
3775
- enforcementIssueDate: string;
3776
- /**
3777
- * The date the enforcement notice took effect
3778
- */
3779
- enforcementEffectiveDate: string;
3780
- /**
3781
- * The date the enforcement notice took effect
3782
- */
3783
- contactPlanningInspectorateDate?: string | null;
3784
- /**
3785
- * The individual's interest in the appeal land
3786
- */
3787
- interestInLand?: string | null;
3788
- /**
3789
- * If required, whether the individual has permission to use the appeal land
3790
- */
3791
- writtenOrVerbalPermission?: string | null;
3792
- /**
3793
- * A description of the alleged breach
3794
- */
3795
- descriptionOfAllegedBreach?: string | null;
3796
3748
  /**
3797
3749
  * Whether a planning application was made
3798
3750
  */
@@ -3833,10 +3785,6 @@ export type AppellantEnforcementSubmissionProperties = (
3833
3785
  * The date of the appeal against the original LPA decision
3834
3786
  */
3835
3787
  appealDecisionDate?: string | null;
3836
- /**
3837
- * The statutory deadline for submitting an appeal from the original LPA decision date
3838
- */
3839
- caseSubmissionDueDate: string | null;
3840
3788
  /**
3841
3789
  * First line of address for the appeal site
3842
3790
  */
@@ -3857,8 +3805,6 @@ export type AppellantEnforcementSubmissionProperties = (
3857
3805
  * Postal code of the site address
3858
3806
  */
3859
3807
  siteAddressPostcode?: string | null;
3860
- siteGridReferenceEasting?: string | null;
3861
- siteGridReferenceNorthing?: string | null;
3862
3808
  /**
3863
3809
  * First line of address for the appeal site
3864
3810
  */
@@ -3879,44 +3825,22 @@ export type AppellantEnforcementSubmissionProperties = (
3879
3825
  * Postal code of the site address
3880
3826
  */
3881
3827
  contactAddressPostcode?: string | null;
3882
- contactGridReferenceEasting?: string | null;
3883
- contactGridReferenceNorthing?: string | null;
3884
- /**
3885
- * Provided information on site accessibility
3886
- */
3887
- siteAccessDetails?: string[] | null;
3888
- /**
3889
- * Provided information on site health and safety
3890
- */
3891
- siteSafetyDetails?: string[] | null;
3892
- /**
3893
- * Indicates if the appellant has applied for costs
3894
- */
3895
- appellantCostsAppliedFor?: boolean | null;
3896
- /**
3897
- * The procedure preference indicated by the appellant
3898
- */
3899
- appellantProcedurePreference?: 'written' | 'hearing' | 'inquiry' | null;
3900
- /**
3901
- * The procedure details preference indicated by the appellant
3902
- */
3903
- appellantProcedurePreferenceDetails?: string | null;
3828
+ siteGridReferenceEasting?: string | null;
3829
+ siteGridReferenceNorthing?: string | null;
3904
3830
  /**
3905
- * The duration of the procedure indicated by the appellant
3831
+ * Whether a retrospective planning application was made
3906
3832
  */
3907
- appellantProcedurePreferenceDuration?: number | null;
3908
- /**
3909
- * The number of witnesses appellant has suggested for inquiries preference
3910
- */
3911
- appellantProcedurePreferenceWitnessCount?: number | null;
3833
+ retrospectiveApplication?: boolean | null;
3834
+ contactGridReferenceEasting?: string | null;
3835
+ contactGridReferenceNorthing?: string | null;
3912
3836
  /**
3913
- * The planning obligation information, if available
3837
+ * Whether a ground (a) fee has been paid
3914
3838
  */
3915
- statusPlanningObligation?: string | null;
3839
+ groundAFeePaid?: boolean | null;
3916
3840
  /**
3917
- * A list of related case references known to the appellant and the LPA
3841
+ * If required, whether the individual has permission to use the appeal land
3918
3842
  */
3919
- nearbyCaseReferences?: string[] | null;
3843
+ writtenOrVerbalPermission?: string | null;
3920
3844
  /**
3921
3845
  * A list of individuals named on the enforcement notice
3922
3846
  */
@@ -3935,7 +3859,7 @@ export type AppellantEnforcementSubmissionProperties = (
3935
3859
  */
3936
3860
  interestInLand: string;
3937
3861
  /**
3938
- * Whether the individual has permission to use the land
3862
+ * If required, whether the individual has permission to use the appeal land
3939
3863
  */
3940
3864
  writtenOrVerbalPermission: string | null;
3941
3865
  [k: string]: unknown;
@@ -3995,6 +3919,7 @@ export interface AppellantSubmissionCommand {
3995
3919
  | ({
3996
3920
  caseType?: 'C';
3997
3921
  } & AppellantEnforcementSubmissionProperties &
3922
+ AppellantEnforcementCommonSubmissionProperties &
3998
3923
  AppellantProcedurePreferenceProperties)
3999
3924
  | ({
4000
3925
  caseType?: 'X';
@@ -4004,7 +3929,8 @@ export interface AppellantSubmissionCommand {
4004
3929
  LDCSpecificProperties)
4005
3930
  | ({
4006
3931
  caseType?: 'F';
4007
- } & AppellantEnforcementSubmissionProperties &
3932
+ } & AppellantEnforcementCommonSubmissionProperties &
3933
+ AppellantEnforcementListedBuildingSubmissionProperties &
4008
3934
  AppellantProcedurePreferenceProperties);
4009
3935
  documents: {
4010
3936
  /**
@@ -4232,6 +4158,96 @@ export interface AdvertSpecificProperties {
4232
4158
  | null;
4233
4159
  [k: string]: unknown;
4234
4160
  }
4161
+ /**
4162
+ * Schema defining any common properties for enforcement appeals
4163
+ */
4164
+ export interface AppellantEnforcementCommonSubmissionProperties {
4165
+ /**
4166
+ * Case submission id - link to draft submission created by appellant
4167
+ */
4168
+ submissionId: string;
4169
+ /**
4170
+ * A description of the alleged breach
4171
+ */
4172
+ descriptionOfAllegedBreach?: string | null;
4173
+ /**
4174
+ * The type of procedure for the appeal
4175
+ */
4176
+ caseProcedure: 'written' | 'hearing' | 'inquiry';
4177
+ /**
4178
+ * A unique identifier for the Local Planning Authority
4179
+ */
4180
+ lpaCode: string;
4181
+ /**
4182
+ * The date the appeal was submitted by the appellant
4183
+ */
4184
+ caseSubmittedDate: string;
4185
+ /**
4186
+ * Indicates if an enforcement notice is the reason for the appeal
4187
+ */
4188
+ enforcementNotice: boolean | null;
4189
+ /**
4190
+ * The unique identifier of the enforcement notice
4191
+ */
4192
+ enforcementReference: string;
4193
+ /**
4194
+ * The date the enforcement notice was issued
4195
+ */
4196
+ enforcementIssueDate: string;
4197
+ /**
4198
+ * The date the enforcement notice took effect
4199
+ */
4200
+ enforcementEffectiveDate: string;
4201
+ /**
4202
+ * The date the enforcement notice took effect
4203
+ */
4204
+ contactPlanningInspectorateDate?: string | null;
4205
+ /**
4206
+ * The individual's interest in the appeal land
4207
+ */
4208
+ interestInLand?: string | null;
4209
+ /**
4210
+ * The statutory deadline for submitting an appeal from the original LPA decision date
4211
+ */
4212
+ caseSubmissionDueDate: string | null;
4213
+ /**
4214
+ * Provided information on site accessibility
4215
+ */
4216
+ siteAccessDetails?: string[] | null;
4217
+ /**
4218
+ * Provided information on site health and safety
4219
+ */
4220
+ siteSafetyDetails?: string[] | null;
4221
+ /**
4222
+ * Indicates if the appellant has applied for costs
4223
+ */
4224
+ appellantCostsAppliedFor?: boolean | null;
4225
+ /**
4226
+ * The procedure preference indicated by the appellant
4227
+ */
4228
+ appellantProcedurePreference?: 'written' | 'hearing' | 'inquiry' | null;
4229
+ /**
4230
+ * The procedure details preference indicated by the appellant
4231
+ */
4232
+ appellantProcedurePreferenceDetails?: string | null;
4233
+ /**
4234
+ * The duration of the procedure indicated by the appellant
4235
+ */
4236
+ appellantProcedurePreferenceDuration?: number | null;
4237
+ /**
4238
+ * The number of witnesses appellant has suggested for inquiries preference
4239
+ */
4240
+ appellantProcedurePreferenceWitnessCount?: number | null;
4241
+ /**
4242
+ * The planning obligation information, if available
4243
+ */
4244
+ statusPlanningObligation?: string | null;
4245
+ /**
4246
+ * A list of related case references known to the appellant and the LPA
4247
+ */
4248
+ nearbyCaseReferences?: string[] | null;
4249
+ [k: string]: unknown;
4250
+ }
4235
4251
  /**
4236
4252
  * Schema defining any properties for ldc appeals
4237
4253
  */
@@ -4247,6 +4263,88 @@ export interface LDCSpecificProperties {
4247
4263
  | null;
4248
4264
  [k: string]: unknown;
4249
4265
  }
4266
+ /**
4267
+ * Schema defining any properties for enforcement listed building appeals
4268
+ */
4269
+ export interface AppellantEnforcementListedBuildingSubmissionProperties {
4270
+ /**
4271
+ * A list of individuals named on the enforcement notice
4272
+ */
4273
+ namedIndividuals?:
4274
+ | {
4275
+ /**
4276
+ * First name of the individual
4277
+ */
4278
+ firstName: string;
4279
+ /**
4280
+ * Last name of the individual
4281
+ */
4282
+ lastName: string;
4283
+ /**
4284
+ * Individual's interest in the appeal land
4285
+ */
4286
+ interestInLand: string;
4287
+ [k: string]: unknown;
4288
+ }[]
4289
+ | null;
4290
+ /**
4291
+ * First line of address for the appeal site
4292
+ */
4293
+ siteAddressLine1?: string | null;
4294
+ /**
4295
+ * Second line of address for the appeal site
4296
+ */
4297
+ siteAddressLine2?: string | null;
4298
+ /**
4299
+ * Town / City of the site address
4300
+ */
4301
+ siteAddressTown?: string | null;
4302
+ /**
4303
+ * County of the site address
4304
+ */
4305
+ siteAddressCounty?: string | null;
4306
+ /**
4307
+ * Postal code of the site address
4308
+ */
4309
+ siteAddressPostcode?: string | null;
4310
+ /**
4311
+ * First line of address for the appeal site
4312
+ */
4313
+ contactAddressLine1?: string | null;
4314
+ /**
4315
+ * Second line of address for the appeal site
4316
+ */
4317
+ contactAddressLine2?: string | null;
4318
+ /**
4319
+ * Town / City of the site address
4320
+ */
4321
+ contactAddressTown?: string | null;
4322
+ /**
4323
+ * County of the site address
4324
+ */
4325
+ contactAddressCounty?: string | null;
4326
+ /**
4327
+ * Postal code of the site address
4328
+ */
4329
+ contactAddressPostcode?: string | null;
4330
+ /**
4331
+ * A list of appeal grounds being pleaded
4332
+ */
4333
+ appealGrounds?:
4334
+ | {
4335
+ /**
4336
+ * Name of the appeal ground
4337
+ */
4338
+ groundRef: 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k';
4339
+ /**
4340
+ * Facts supporting the appeal ground
4341
+ */
4342
+ factsForGround: string;
4343
+ [k: string]: unknown;
4344
+ }[]
4345
+ | null;
4346
+ [k: string]: unknown;
4347
+ }
4250
4348
 
4251
4349
  export type Name = string;
4252
4350
 
@@ -40,18 +40,6 @@ const exampleEnforcementListedSubmissionSchema = {
40
40
  enforcementEffectiveDate: '1890-12-28T22:49:47.0Z',
41
41
  contactPlanningInspectorateDate: null,
42
42
  interestInLand: 'owner',
43
- writtenOrVerbalPermission: null,
44
- descriptionOfAllegedBreach: 'a new chimney',
45
- applicationMadeAndFeePaid: true,
46
- applicationDevelopmentAllOrPart: 'all-of-the-development',
47
- originalDevelopmentDescription: 'in amet',
48
- changedDevelopmentDescription: true,
49
- applicationReference: '43010/APP/1/290572',
50
- applicationDate: '1890-12-28T22:49:47.0Z',
51
- applicationDecision: 'granted',
52
- applicationDecisionAppealed: false,
53
- applicationDecisionDate: '1890-12-28T22:49:47.0Z',
54
- appealDecisionDate: null,
55
43
  caseSubmissionDueDate: null,
56
44
  siteAddressLine1: 'occaecat aliquip non pariatur consequat',
57
45
  siteAddressLine2: null,
@@ -65,8 +53,6 @@ const exampleEnforcementListedSubmissionSchema = {
65
53
  contactAddressTown: null,
66
54
  contactAddressCounty: null,
67
55
  contactAddressPostcode: null,
68
- contactGridReferenceEasting: null,
69
- contactGridReferenceNorthing: null,
70
56
  siteAccessDetails: ['laborum', 'aute velit quis', 'dolor'],
71
57
  siteSafetyDetails: ['velit aliqua', 'qui', 'tempor Duis ut dolore', 'anim Ut in ea', 'eiusmod laborum'],
72
58
  appellantCostsAppliedFor: false,
@@ -80,8 +66,7 @@ const exampleEnforcementListedSubmissionSchema = {
80
66
  {
81
67
  firstName: 'Bob',
82
68
  lastName: 'Bobberson',
83
- interestInLand: 'owner',
84
- writtenOrVerbalPermission: 'yes'
69
+ interestInLand: 'owner'
85
70
  }
86
71
  ],
87
72
  appealGrounds: [
@@ -106,56 +91,12 @@ describe(' listed building submission command schema', () => {
106
91
  assert.strictEqual(validationResult, true);
107
92
  });
108
93
 
109
- it('should enforce eastings-northings pattern', () => {
110
- const invalidPatterns = [
111
- { easting: 'abc123', northing: '400534', description: 'easting with letters' },
112
- { easting: '1234567*', northing: '400534', description: 'easting too long' },
113
- { easting: '12345', northing: '400534', description: 'easting too short' },
114
- { easting: '357144', northing: 'xyz123', description: 'northing with letters' },
115
- { easting: '357144', northing: '12345678', description: 'northing too long' },
116
- { easting: '357144', northing: '12345', description: 'northing too short' },
117
- { easting: '', northing: '400534', description: 'empty easting' },
118
- { easting: '357144', northing: '', description: 'empty northing' }
119
- ];
120
-
121
- for (const pattern of invalidPatterns) {
122
- const test = structuredClone(exampleEnforcementListedSubmissionSchema);
123
- test.casedata.siteGridReferenceEasting = pattern.easting;
124
- test.casedata.siteGridReferenceNorthing = pattern.northing;
125
-
126
- const validationResult = ajv.validate(schema, test);
127
- assert.strictEqual(validationResult, false, `Expected validation to fail for ${pattern.description}`);
128
- }
129
- });
130
-
131
- it('should allow only eastings-northings', () => {
132
- const test = structuredClone(exampleEnforcementListedSubmissionSchema);
133
- test.casedata.siteAddressPostcode = undefined;
134
- test.casedata.siteAddressLine1 = null;
135
- test.casedata.siteAddressTown = null;
136
- const validationResult = ajv.validate(schema, test);
137
- assert.strictEqual(validationResult, true);
138
- });
139
-
140
94
  it('should allow only site address', () => {
141
95
  const test = structuredClone(exampleEnforcementListedSubmissionSchema);
142
- test.casedata.siteGridReferenceEasting = undefined;
143
- test.casedata.siteGridReferenceNorthing = null;
144
96
  const validationResult = ajv.validate(schema, test);
145
97
  assert.strictEqual(validationResult, true);
146
98
  });
147
99
 
148
- it('should enforce either site address or easting-northing', () => {
149
- const test = structuredClone(exampleEnforcementListedSubmissionSchema);
150
- test.casedata.siteAddressPostcode = undefined;
151
- test.casedata.siteAddressLine1 = null;
152
- test.casedata.siteAddressTown = null;
153
- test.casedata.siteGridReferenceEasting = undefined;
154
- test.casedata.siteGridReferenceNorthing = null;
155
- const validationResult = ajv.validate(schema, test);
156
- assert.strictEqual(validationResult, false);
157
- });
158
-
159
100
  it('should reject missing root property', () => {
160
101
  const test = structuredClone(exampleEnforcementListedSubmissionSchema);
161
102
  delete test.casedata.caseType;
@@ -43,6 +43,8 @@ const exampleEnforcementSubmissionSchema = {
43
43
  writtenOrVerbalPermission: null,
44
44
  descriptionOfAllegedBreach: 'a new chimney',
45
45
  applicationMadeAndFeePaid: true,
46
+ retrospectiveApplication: true,
47
+ groundAFeePaid: true,
46
48
  applicationDevelopmentAllOrPart: 'all-of-the-development',
47
49
  originalDevelopmentDescription: 'in amet',
48
50
  changedDevelopmentDescription: true,