@planning-inspectorate/data-model 2.18.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.18.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,82 +24,10 @@
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"
104
30
  },
105
- "retrospectiveApplication": {
106
- "type": ["boolean", "null"],
107
- "description": "Whether a retrospective planning application was made"
108
- },
109
- "groundAFeePaid": {
110
- "type": ["boolean", "null"],
111
- "description": "Whether a ground (a) fee has been paid"
112
- },
113
31
  "applicationDevelopmentAllOrPart": {
114
32
  "type": ["string", "null"],
115
33
  "enum": ["all-of-the-development", "part-of-the-development", null],
@@ -155,13 +73,6 @@
155
73
  "examples": ["2023-07-27T20:30:00.000Z"],
156
74
  "description": "The date of the appeal against the original LPA decision"
157
75
  },
158
- "caseSubmissionDueDate": {
159
- "type": ["string", "null"],
160
- "format": "date-time",
161
- "examples": ["2023-07-27T20:30:00.000Z"],
162
- "description": "The statutory deadline for submitting an appeal from the original LPA decision date",
163
- "$comment": "Calculated from the applicationDecisionDate"
164
- },
165
76
  "siteAddressLine1": {
166
77
  "type": ["string", "null"],
167
78
  "examples": ["96 The Avenue"],
@@ -186,16 +97,6 @@
186
97
  "examples": ["MD21 5XY"],
187
98
  "description": "Postal code of the site address"
188
99
  },
189
- "siteGridReferenceEasting": {
190
- "type": ["string", "null"],
191
- "pattern": "^\\d{6,7}$",
192
- "examples": ["357144"]
193
- },
194
- "siteGridReferenceNorthing": {
195
- "type": ["string", "null"],
196
- "pattern": "^\\d{6,7}$",
197
- "examples": ["400534"]
198
- },
199
100
  "contactAddressLine1": {
200
101
  "type": ["string", "null"],
201
102
  "examples": ["96 The Avenue"],
@@ -220,65 +121,38 @@
220
121
  "examples": ["MD21 5XY"],
221
122
  "description": "Postal code of the site address"
222
123
  },
223
- "contactGridReferenceEasting": {
124
+ "siteGridReferenceEasting": {
224
125
  "type": ["string", "null"],
225
126
  "pattern": "^\\d{6,7}$",
226
127
  "examples": ["357144"]
227
128
  },
228
- "contactGridReferenceNorthing": {
129
+ "siteGridReferenceNorthing": {
229
130
  "type": ["string", "null"],
230
131
  "pattern": "^\\d{6,7}$",
231
132
  "examples": ["400534"]
232
133
  },
233
- "siteAccessDetails": {
234
- "type": ["array", "null"],
235
- "items": {
236
- "type": "string",
237
- "examples": ["The site is accessible through the small gate on the left of the property"]
238
- },
239
- "description": "Provided information on site accessibility"
240
- },
241
- "siteSafetyDetails": {
242
- "type": ["array", "null"],
243
- "items": {
244
- "type": "string",
245
- "examples": ["There is an aggressive dog in the property"]
246
- },
247
- "description": "Provided information on site health and safety"
248
- },
249
- "appellantCostsAppliedFor": {
134
+ "retrospectiveApplication": {
250
135
  "type": ["boolean", "null"],
251
- "description": "Indicates if the appellant has applied for costs",
252
- "$comment": "Also available on HAS cases"
136
+ "description": "Whether a retrospective planning application was made"
253
137
  },
254
- "appellantProcedurePreference": {
138
+ "contactGridReferenceEasting": {
255
139
  "type": ["string", "null"],
256
- "enum": ["written", "hearing", "inquiry", null],
257
- "description": "The procedure preference indicated by the appellant"
140
+ "pattern": "^\\d{6,7}$",
141
+ "examples": ["357144"]
258
142
  },
259
- "appellantProcedurePreferenceDetails": {
143
+ "contactGridReferenceNorthing": {
260
144
  "type": ["string", "null"],
261
- "description": "The procedure details preference indicated by the appellant"
262
- },
263
- "appellantProcedurePreferenceDuration": {
264
- "type": ["number", "null"],
265
- "description": "The duration of the procedure indicated by the appellant"
145
+ "pattern": "^\\d{6,7}$",
146
+ "examples": ["400534"]
266
147
  },
267
- "appellantProcedurePreferenceWitnessCount": {
268
- "type": ["number", "null"],
269
- "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"
270
151
  },
271
- "statusPlanningObligation": {
152
+ "writtenOrVerbalPermission": {
272
153
  "type": ["string", "null"],
273
- "description": "The planning obligation information, if available"
274
- },
275
- "nearbyCaseReferences": {
276
- "type": ["array", "null"],
277
- "items": {
278
- "type": "string",
279
- "examples": ["6000456", "8004567"]
280
- },
281
- "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"
282
156
  },
283
157
  "namedIndividuals": {
284
158
  "type": ["array", "null"],
@@ -301,8 +175,8 @@
301
175
  },
302
176
  "writtenOrVerbalPermission": {
303
177
  "type": ["string", "null"],
304
- "examples": ["yes"],
305
- "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"
306
180
  }
307
181
  },
308
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,66 +3745,10 @@ 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
  */
3799
3751
  applicationMadeAndFeePaid?: boolean | null;
3800
- /**
3801
- * Whether a retrospective planning application was made
3802
- */
3803
- retrospectiveApplication?: boolean | null;
3804
- /**
3805
- * Whether a ground (a) fee has been paid
3806
- */
3807
- groundAFeePaid?: boolean | null;
3808
3752
  /**
3809
3753
  * Did the application relate to all or part of the development
3810
3754
  */
@@ -3841,10 +3785,6 @@ export type AppellantEnforcementSubmissionProperties = (
3841
3785
  * The date of the appeal against the original LPA decision
3842
3786
  */
3843
3787
  appealDecisionDate?: string | null;
3844
- /**
3845
- * The statutory deadline for submitting an appeal from the original LPA decision date
3846
- */
3847
- caseSubmissionDueDate: string | null;
3848
3788
  /**
3849
3789
  * First line of address for the appeal site
3850
3790
  */
@@ -3865,8 +3805,6 @@ export type AppellantEnforcementSubmissionProperties = (
3865
3805
  * Postal code of the site address
3866
3806
  */
3867
3807
  siteAddressPostcode?: string | null;
3868
- siteGridReferenceEasting?: string | null;
3869
- siteGridReferenceNorthing?: string | null;
3870
3808
  /**
3871
3809
  * First line of address for the appeal site
3872
3810
  */
@@ -3887,44 +3825,22 @@ export type AppellantEnforcementSubmissionProperties = (
3887
3825
  * Postal code of the site address
3888
3826
  */
3889
3827
  contactAddressPostcode?: string | null;
3890
- contactGridReferenceEasting?: string | null;
3891
- contactGridReferenceNorthing?: string | null;
3892
- /**
3893
- * Provided information on site accessibility
3894
- */
3895
- siteAccessDetails?: string[] | null;
3896
- /**
3897
- * Provided information on site health and safety
3898
- */
3899
- siteSafetyDetails?: string[] | null;
3900
- /**
3901
- * Indicates if the appellant has applied for costs
3902
- */
3903
- appellantCostsAppliedFor?: boolean | null;
3904
- /**
3905
- * The procedure preference indicated by the appellant
3906
- */
3907
- appellantProcedurePreference?: 'written' | 'hearing' | 'inquiry' | null;
3908
- /**
3909
- * The procedure details preference indicated by the appellant
3910
- */
3911
- appellantProcedurePreferenceDetails?: string | null;
3912
- /**
3913
- * The duration of the procedure indicated by the appellant
3914
- */
3915
- appellantProcedurePreferenceDuration?: number | null;
3828
+ siteGridReferenceEasting?: string | null;
3829
+ siteGridReferenceNorthing?: string | null;
3916
3830
  /**
3917
- * The number of witnesses appellant has suggested for inquiries preference
3831
+ * Whether a retrospective planning application was made
3918
3832
  */
3919
- appellantProcedurePreferenceWitnessCount?: number | null;
3833
+ retrospectiveApplication?: boolean | null;
3834
+ contactGridReferenceEasting?: string | null;
3835
+ contactGridReferenceNorthing?: string | null;
3920
3836
  /**
3921
- * The planning obligation information, if available
3837
+ * Whether a ground (a) fee has been paid
3922
3838
  */
3923
- statusPlanningObligation?: string | null;
3839
+ groundAFeePaid?: boolean | null;
3924
3840
  /**
3925
- * 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
3926
3842
  */
3927
- nearbyCaseReferences?: string[] | null;
3843
+ writtenOrVerbalPermission?: string | null;
3928
3844
  /**
3929
3845
  * A list of individuals named on the enforcement notice
3930
3846
  */
@@ -3943,7 +3859,7 @@ export type AppellantEnforcementSubmissionProperties = (
3943
3859
  */
3944
3860
  interestInLand: string;
3945
3861
  /**
3946
- * Whether the individual has permission to use the land
3862
+ * If required, whether the individual has permission to use the appeal land
3947
3863
  */
3948
3864
  writtenOrVerbalPermission: string | null;
3949
3865
  [k: string]: unknown;
@@ -4003,6 +3919,7 @@ export interface AppellantSubmissionCommand {
4003
3919
  | ({
4004
3920
  caseType?: 'C';
4005
3921
  } & AppellantEnforcementSubmissionProperties &
3922
+ AppellantEnforcementCommonSubmissionProperties &
4006
3923
  AppellantProcedurePreferenceProperties)
4007
3924
  | ({
4008
3925
  caseType?: 'X';
@@ -4012,7 +3929,8 @@ export interface AppellantSubmissionCommand {
4012
3929
  LDCSpecificProperties)
4013
3930
  | ({
4014
3931
  caseType?: 'F';
4015
- } & AppellantEnforcementSubmissionProperties &
3932
+ } & AppellantEnforcementCommonSubmissionProperties &
3933
+ AppellantEnforcementListedBuildingSubmissionProperties &
4016
3934
  AppellantProcedurePreferenceProperties);
4017
3935
  documents: {
4018
3936
  /**
@@ -4240,6 +4158,96 @@ export interface AdvertSpecificProperties {
4240
4158
  | null;
4241
4159
  [k: string]: unknown;
4242
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
+ }
4243
4251
  /**
4244
4252
  * Schema defining any properties for ldc appeals
4245
4253
  */
@@ -4255,6 +4263,88 @@ export interface LDCSpecificProperties {
4255
4263
  | null;
4256
4264
  [k: string]: unknown;
4257
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
+ }
4258
4348
 
4259
4349
  export type Name = string;
4260
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;