@planning-inspectorate/data-model 2.45.0 → 2.47.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.
@@ -13,14 +13,14 @@
13
13
  | [eventStatus](#eventstatus) | `string` | Required | cannot be null | [Appeal Event](appeal-event-properties-eventstatus.md "appeal-event.schema.json#/properties/eventStatus") |
14
14
  | [isUrgent](#isurgent) | `boolean` | Required | cannot be null | [Appeal Event](appeal-event-properties-isurgent.md "appeal-event.schema.json#/properties/isUrgent") |
15
15
  | [eventPublished](#eventpublished) | `boolean` | Required | can be null | [Appeal Event](appeal-event-properties-eventpublished.md "appeal-event.schema.json#/properties/eventPublished") |
16
- | [eventStartDateTime](#eventstartdatetime) | `string` | Required | cannot be null | [Appeal Event](appeal-event-properties-eventstartdatetime.md "appeal-event.schema.json#/properties/eventStartDateTime") |
17
- | [eventEndDateTime](#eventenddatetime) | `string` | Required | can be null | [Appeal Event](appeal-event-properties-eventenddatetime.md "appeal-event.schema.json#/properties/eventEndDateTime") |
18
- | [notificationOfSiteVisit](#notificationofsitevisit) | `string` | Required | can be null | [Appeal Event](appeal-event-properties-notificationofsitevisit.md "appeal-event.schema.json#/properties/notificationOfSiteVisit") |
19
- | [addressLine1](#addressline1) | `string` | Required | can be null | [Appeal Event](appeal-event-properties-addressline1.md "appeal-event.schema.json#/properties/addressLine1") |
20
- | [addressLine2](#addressline2) | `string` | Required | can be null | [Appeal Event](appeal-event-properties-addressline2.md "appeal-event.schema.json#/properties/addressLine2") |
21
- | [addressTown](#addresstown) | `string` | Required | can be null | [Appeal Event](appeal-event-properties-addresstown.md "appeal-event.schema.json#/properties/addressTown") |
22
- | [addressCounty](#addresscounty) | `string` | Required | can be null | [Appeal Event](appeal-event-properties-addresscounty.md "appeal-event.schema.json#/properties/addressCounty") |
23
- | [addressPostcode](#addresspostcode) | `string` | Required | can be null | [Appeal Event](appeal-event-properties-addresspostcode.md "appeal-event.schema.json#/properties/addressPostcode") |
16
+ | [eventStartDateTime](#eventstartdatetime) | `string` | Optional | can be null | [Appeal Event](appeal-event-properties-eventstartdatetime.md "appeal-event.schema.json#/properties/eventStartDateTime") |
17
+ | [eventEndDateTime](#eventenddatetime) | `string` | Optional | can be null | [Appeal Event](appeal-event-properties-eventenddatetime.md "appeal-event.schema.json#/properties/eventEndDateTime") |
18
+ | [notificationOfSiteVisit](#notificationofsitevisit) | `string` | Optional | can be null | [Appeal Event](appeal-event-properties-notificationofsitevisit.md "appeal-event.schema.json#/properties/notificationOfSiteVisit") |
19
+ | [addressLine1](#addressline1) | `string` | Optional | can be null | [Appeal Event](appeal-event-properties-addressline1.md "appeal-event.schema.json#/properties/addressLine1") |
20
+ | [addressLine2](#addressline2) | `string` | Optional | can be null | [Appeal Event](appeal-event-properties-addressline2.md "appeal-event.schema.json#/properties/addressLine2") |
21
+ | [addressTown](#addresstown) | `string` | Optional | can be null | [Appeal Event](appeal-event-properties-addresstown.md "appeal-event.schema.json#/properties/addressTown") |
22
+ | [addressCounty](#addresscounty) | `string` | Optional | can be null | [Appeal Event](appeal-event-properties-addresscounty.md "appeal-event.schema.json#/properties/addressCounty") |
23
+ | [addressPostcode](#addresspostcode) | `string` | Optional | can be null | [Appeal Event](appeal-event-properties-addresspostcode.md "appeal-event.schema.json#/properties/addressPostcode") |
24
24
  | Additional Properties | Any | Optional | can be null | |
25
25
 
26
26
  ## eventId
@@ -164,6 +164,7 @@ Status of the event
164
164
  | `"link_to_enforcement"` | |
165
165
  | `"offered"` | |
166
166
  | `"postponed"` | |
167
+ | `"pending"` | |
167
168
 
168
169
  ## isUrgent
169
170
 
@@ -207,11 +208,11 @@ Event start date and time
207
208
 
208
209
  `eventStartDateTime`
209
210
 
210
- * is required
211
+ * is optional
211
212
 
212
213
  * Type: `string`
213
214
 
214
- * cannot be null
215
+ * can be null
215
216
 
216
217
  * defined in: [Appeal Event](appeal-event-properties-eventstartdatetime.md "appeal-event.schema.json#/properties/eventStartDateTime")
217
218
 
@@ -235,7 +236,7 @@ Event end date and time
235
236
 
236
237
  `eventEndDateTime`
237
238
 
238
- * is required
239
+ * is optional
239
240
 
240
241
  * Type: `string`
241
242
 
@@ -263,7 +264,7 @@ The date third-parties were informed of the site visit event
263
264
 
264
265
  `notificationOfSiteVisit`
265
266
 
266
- * is required
267
+ * is optional
267
268
 
268
269
  * Type: `string`
269
270
 
@@ -291,7 +292,7 @@ First line of address for the event site
291
292
 
292
293
  `addressLine1`
293
294
 
294
- * is required
295
+ * is optional
295
296
 
296
297
  * Type: `string`
297
298
 
@@ -315,7 +316,7 @@ Second line of address for the event site
315
316
 
316
317
  `addressLine2`
317
318
 
318
- * is required
319
+ * is optional
319
320
 
320
321
  * Type: `string`
321
322
 
@@ -333,7 +334,7 @@ Town / City of the event address
333
334
 
334
335
  `addressTown`
335
336
 
336
- * is required
337
+ * is optional
337
338
 
338
339
  * Type: `string`
339
340
 
@@ -357,7 +358,7 @@ County of the event address
357
358
 
358
359
  `addressCounty`
359
360
 
360
- * is required
361
+ * is optional
361
362
 
362
363
  * Type: `string`
363
364
 
@@ -381,7 +382,7 @@ Postal code of the event address
381
382
 
382
383
  `addressPostcode`
383
384
 
384
- * is required
385
+ * is optional
385
386
 
386
387
  * Type: `string`
387
388
 
@@ -2514,6 +2514,7 @@ Indicates if the appellant has applied for costs
2514
2514
  | `"minor-commercial-development"` | |
2515
2515
  | `"advertisement"` | |
2516
2516
  | `"lawful-development-certificate"` | |
2517
+ | `"permission-in-principle"` | |
2517
2518
  | `null` | |
2518
2519
 
2519
2520
  ## siteGridReferenceEasting
@@ -3692,6 +3692,7 @@ The net gain in residences of the proposed development
3692
3692
  | `"advertisement"` | |
3693
3693
  | `"lawful-development-certificate"` | |
3694
3694
  | `"discontinuance-notice"` | |
3695
+ | `"permission-in-principle"` | |
3695
3696
  | `null` | |
3696
3697
 
3697
3698
  ## developmentType
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planning-inspectorate/data-model",
3
- "version": "2.45.0",
3
+ "version": "2.47.0",
4
4
  "description": "JSON Schemas for the Planning Inspectorate's Data Model",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -38,6 +38,7 @@ class EventStatus(Enum):
38
38
  link_to_enforcement = "link_to_enforcement"
39
39
  offered = "offered"
40
40
  postponed = "postponed"
41
+ pending = "pending"
41
42
 
42
43
 
43
44
  class AppealEvent(BaseModel):
@@ -76,25 +77,25 @@ class AppealEvent(BaseModel):
76
77
  """
77
78
  Indicates if the event has been published
78
79
  """
79
- eventStartDateTime: AwareDatetime = Field(
80
- ..., examples=["2023-07-27T20:30:00.000Z"]
80
+ eventStartDateTime: AwareDatetime | None = Field(
81
+ None, examples=["2023-07-27T20:30:00.000Z"]
81
82
  )
82
83
  """
83
84
  Event start date and time
84
85
  """
85
86
  eventEndDateTime: AwareDatetime | None = Field(
86
- ..., examples=["2023-07-27T20:30:00.000Z"]
87
+ None, examples=["2023-07-27T20:30:00.000Z"]
87
88
  )
88
89
  """
89
90
  Event end date and time
90
91
  """
91
92
  notificationOfSiteVisit: AwareDatetime | None = Field(
92
- ..., examples=["2023-07-27T20:30:00.000Z"]
93
+ None, examples=["2023-07-27T20:30:00.000Z"]
93
94
  )
94
95
  """
95
96
  The date third-parties were informed of the site visit event
96
97
  """
97
- addressLine1: str | None = Field(..., examples=["96 The Avenue"])
98
+ addressLine1: str | None = Field(None, examples=["96 The Avenue"])
98
99
  """
99
100
  First line of address for the event site
100
101
  """
@@ -102,15 +103,15 @@ class AppealEvent(BaseModel):
102
103
  """
103
104
  Second line of address for the event site
104
105
  """
105
- addressTown: str | None = Field(..., examples=["Maidstone"])
106
+ addressTown: str | None = Field(None, examples=["Maidstone"])
106
107
  """
107
108
  Town / City of the event address
108
109
  """
109
- addressCounty: str | None = Field(..., examples=["Kent"])
110
+ addressCounty: str | None = Field(None, examples=["Kent"])
110
111
  """
111
112
  County of the event address
112
113
  """
113
- addressPostcode: str | None = Field(..., examples=["MD21 5XY"])
114
+ addressPostcode: str | None = Field(None, examples=["MD21 5XY"])
114
115
  """
115
116
  Postal code of the event address
116
117
  """
@@ -230,6 +230,7 @@ class TypeOfPlanningApplication(Enum):
230
230
  minor_commercial_development = "minor-commercial-development"
231
231
  advertisement = "advertisement"
232
232
  lawful_development_certificate = "lawful-development-certificate"
233
+ permission_in_principle = "permission-in-principle"
233
234
  NoneType_None = None
234
235
 
235
236
 
@@ -285,6 +285,7 @@ class TypeOfPlanningApplication(Enum):
285
285
  advertisement = "advertisement"
286
286
  lawful_development_certificate = "lawful-development-certificate"
287
287
  discontinuance_notice = "discontinuance-notice"
288
+ permission_in_principle = "permission-in-principle"
288
289
  NoneType_None = None
289
290
 
290
291
 
@@ -5,23 +5,7 @@
5
5
  "description": "Schema defining the metadata for appeal events, such as site visits, inquiries, hearings",
6
6
  "type": "object",
7
7
  "additionalProperties": true,
8
- "required": [
9
- "eventId",
10
- "caseReference",
11
- "eventType",
12
- "eventName",
13
- "eventStatus",
14
- "isUrgent",
15
- "eventPublished",
16
- "eventStartDateTime",
17
- "eventEndDateTime",
18
- "notificationOfSiteVisit",
19
- "addressLine1",
20
- "addressLine2",
21
- "addressTown",
22
- "addressCounty",
23
- "addressPostcode"
24
- ],
8
+ "required": ["eventId", "caseReference", "eventType", "eventName", "eventStatus", "isUrgent", "eventPublished"],
25
9
  "properties": {
26
10
  "eventId": {
27
11
  "type": "string",
@@ -65,7 +49,8 @@
65
49
  "confirmed",
66
50
  "link_to_enforcement",
67
51
  "offered",
68
- "postponed"
52
+ "postponed",
53
+ "pending"
69
54
  ],
70
55
  "description": "Status of the event"
71
56
  },
@@ -78,7 +63,7 @@
78
63
  "description": "Indicates if the event has been published"
79
64
  },
80
65
  "eventStartDateTime": {
81
- "type": "string",
66
+ "type": ["string", "null"],
82
67
  "format": "date-time",
83
68
  "examples": ["2023-07-27T20:30:00.000Z"],
84
69
  "description": "Event start date and time"
@@ -709,6 +709,7 @@
709
709
  "minor-commercial-development",
710
710
  "advertisement",
711
711
  "lawful-development-certificate",
712
+ "permission-in-principle",
712
713
  null
713
714
  ]
714
715
  },
@@ -1046,6 +1046,7 @@
1046
1046
  "advertisement",
1047
1047
  "lawful-development-certificate",
1048
1048
  "discontinuance-notice",
1049
+ "permission-in-principle",
1049
1050
  null
1050
1051
  ]
1051
1052
  },
@@ -140,6 +140,7 @@
140
140
  "minor-commercial-development",
141
141
  "advertisement",
142
142
  "lawful-development-certificate",
143
+ "permission-in-principle",
143
144
  null
144
145
  ]
145
146
  },
package/src/enums.cjs CHANGED
@@ -37,6 +37,7 @@ const APPEAL_HAS_TYPE_OF_PLANNING_APPLICATION = Object.freeze({
37
37
  LISTED_BUILDING: 'listed-building',
38
38
  MINOR_COMMERCIAL_DEVELOPMENT: 'minor-commercial-development',
39
39
  OUTLINE_PLANNING: 'outline-planning',
40
+ PERMISSION_IN_PRINCIPLE: 'permission-in-principle',
40
41
  PRIOR_APPROVAL: 'prior-approval',
41
42
  REMOVAL_OR_VARIATION_OF_CONDITIONS: 'removal-or-variation-of-conditions',
42
43
  RESERVED_MATTERS: 'reserved-matters',
@@ -309,6 +310,7 @@ const APPEAL_EVENT_STATUS = Object.freeze({
309
310
  LINK_TO_ENFORCEMENT: 'link_to_enforcement',
310
311
  NEW_RESCHEDULED: 'new_rescheduled',
311
312
  OFFERED: 'offered',
313
+ PENDING: 'pending',
312
314
  POSTPONED: 'postponed',
313
315
  WITHDRAWN: 'withdrawn',
314
316
  });
@@ -425,6 +427,7 @@ const APPEAL_TYPE_OF_PLANNING_APPLICATION = Object.freeze({
425
427
  LISTED_BUILDING: 'listed-building',
426
428
  MINOR_COMMERCIAL_DEVELOPMENT: 'minor-commercial-development',
427
429
  OUTLINE_PLANNING: 'outline-planning',
430
+ PERMISSION_IN_PRINCIPLE: 'permission-in-principle',
428
431
  PRIOR_APPROVAL: 'prior-approval',
429
432
  REMOVAL_OR_VARIATION_OF_CONDITIONS: 'removal-or-variation-of-conditions',
430
433
  RESERVED_MATTERS: 'reserved-matters',
package/src/enums.d.ts CHANGED
@@ -35,6 +35,7 @@ export const APPEAL_HAS_TYPE_OF_PLANNING_APPLICATION = {
35
35
  LISTED_BUILDING: 'listed-building',
36
36
  MINOR_COMMERCIAL_DEVELOPMENT: 'minor-commercial-development',
37
37
  OUTLINE_PLANNING: 'outline-planning',
38
+ PERMISSION_IN_PRINCIPLE: 'permission-in-principle',
38
39
  PRIOR_APPROVAL: 'prior-approval',
39
40
  REMOVAL_OR_VARIATION_OF_CONDITIONS: 'removal-or-variation-of-conditions',
40
41
  RESERVED_MATTERS: 'reserved-matters',
@@ -307,6 +308,7 @@ export const APPEAL_EVENT_STATUS = {
307
308
  LINK_TO_ENFORCEMENT: 'link_to_enforcement',
308
309
  NEW_RESCHEDULED: 'new_rescheduled',
309
310
  OFFERED: 'offered',
311
+ PENDING: 'pending',
310
312
  POSTPONED: 'postponed',
311
313
  WITHDRAWN: 'withdrawn',
312
314
  } as const;
@@ -423,6 +425,7 @@ export const APPEAL_TYPE_OF_PLANNING_APPLICATION = {
423
425
  LISTED_BUILDING: 'listed-building',
424
426
  MINOR_COMMERCIAL_DEVELOPMENT: 'minor-commercial-development',
425
427
  OUTLINE_PLANNING: 'outline-planning',
428
+ PERMISSION_IN_PRINCIPLE: 'permission-in-principle',
426
429
  PRIOR_APPROVAL: 'prior-approval',
427
430
  REMOVAL_OR_VARIATION_OF_CONDITIONS: 'removal-or-variation-of-conditions',
428
431
  RESERVED_MATTERS: 'reserved-matters',
package/src/enums.js CHANGED
@@ -35,6 +35,7 @@ export const APPEAL_HAS_TYPE_OF_PLANNING_APPLICATION = Object.freeze({
35
35
  LISTED_BUILDING: 'listed-building',
36
36
  MINOR_COMMERCIAL_DEVELOPMENT: 'minor-commercial-development',
37
37
  OUTLINE_PLANNING: 'outline-planning',
38
+ PERMISSION_IN_PRINCIPLE: 'permission-in-principle',
38
39
  PRIOR_APPROVAL: 'prior-approval',
39
40
  REMOVAL_OR_VARIATION_OF_CONDITIONS: 'removal-or-variation-of-conditions',
40
41
  RESERVED_MATTERS: 'reserved-matters',
@@ -307,6 +308,7 @@ export const APPEAL_EVENT_STATUS = Object.freeze({
307
308
  LINK_TO_ENFORCEMENT: 'link_to_enforcement',
308
309
  NEW_RESCHEDULED: 'new_rescheduled',
309
310
  OFFERED: 'offered',
311
+ PENDING: 'pending',
310
312
  POSTPONED: 'postponed',
311
313
  WITHDRAWN: 'withdrawn',
312
314
  });
@@ -423,6 +425,7 @@ export const APPEAL_TYPE_OF_PLANNING_APPLICATION = Object.freeze({
423
425
  LISTED_BUILDING: 'listed-building',
424
426
  MINOR_COMMERCIAL_DEVELOPMENT: 'minor-commercial-development',
425
427
  OUTLINE_PLANNING: 'outline-planning',
428
+ PERMISSION_IN_PRINCIPLE: 'permission-in-principle',
426
429
  PRIOR_APPROVAL: 'prior-approval',
427
430
  REMOVAL_OR_VARIATION_OF_CONDITIONS: 'removal-or-variation-of-conditions',
428
431
  RESERVED_MATTERS: 'reserved-matters',
package/src/index.cjs CHANGED
@@ -118,6 +118,7 @@ const APPEAL_HAS_TYPE_OF_PLANNING_APPLICATION = Object.freeze({
118
118
  LISTED_BUILDING: 'listed-building',
119
119
  MINOR_COMMERCIAL_DEVELOPMENT: 'minor-commercial-development',
120
120
  OUTLINE_PLANNING: 'outline-planning',
121
+ PERMISSION_IN_PRINCIPLE: 'permission-in-principle',
121
122
  PRIOR_APPROVAL: 'prior-approval',
122
123
  REMOVAL_OR_VARIATION_OF_CONDITIONS: 'removal-or-variation-of-conditions',
123
124
  RESERVED_MATTERS: 'reserved-matters',
@@ -390,6 +391,7 @@ const APPEAL_EVENT_STATUS = Object.freeze({
390
391
  LINK_TO_ENFORCEMENT: 'link_to_enforcement',
391
392
  NEW_RESCHEDULED: 'new_rescheduled',
392
393
  OFFERED: 'offered',
394
+ PENDING: 'pending',
393
395
  POSTPONED: 'postponed',
394
396
  WITHDRAWN: 'withdrawn',
395
397
  });
@@ -506,6 +508,7 @@ const APPEAL_TYPE_OF_PLANNING_APPLICATION = Object.freeze({
506
508
  LISTED_BUILDING: 'listed-building',
507
509
  MINOR_COMMERCIAL_DEVELOPMENT: 'minor-commercial-development',
508
510
  OUTLINE_PLANNING: 'outline-planning',
511
+ PERMISSION_IN_PRINCIPLE: 'permission-in-principle',
509
512
  PRIOR_APPROVAL: 'prior-approval',
510
513
  REMOVAL_OR_VARIATION_OF_CONDITIONS: 'removal-or-variation-of-conditions',
511
514
  RESERVED_MATTERS: 'reserved-matters',
package/src/schemas.d.ts CHANGED
@@ -292,7 +292,8 @@ export interface AppealEvent {
292
292
  | 'confirmed'
293
293
  | 'link_to_enforcement'
294
294
  | 'offered'
295
- | 'postponed';
295
+ | 'postponed'
296
+ | 'pending';
296
297
  /**
297
298
  * Indicates if the event is urgent
298
299
  */
@@ -304,35 +305,35 @@ export interface AppealEvent {
304
305
  /**
305
306
  * Event start date and time
306
307
  */
307
- eventStartDateTime: string;
308
+ eventStartDateTime?: string | null;
308
309
  /**
309
310
  * Event end date and time
310
311
  */
311
- eventEndDateTime: string | null;
312
+ eventEndDateTime?: string | null;
312
313
  /**
313
314
  * The date third-parties were informed of the site visit event
314
315
  */
315
- notificationOfSiteVisit: string | null;
316
+ notificationOfSiteVisit?: string | null;
316
317
  /**
317
318
  * First line of address for the event site
318
319
  */
319
- addressLine1: string | null;
320
+ addressLine1?: string | null;
320
321
  /**
321
322
  * Second line of address for the event site
322
323
  */
323
- addressLine2: string | null;
324
+ addressLine2?: string | null;
324
325
  /**
325
326
  * Town / City of the event address
326
327
  */
327
- addressTown: string | null;
328
+ addressTown?: string | null;
328
329
  /**
329
330
  * County of the event address
330
331
  */
331
- addressCounty: string | null;
332
+ addressCounty?: string | null;
332
333
  /**
333
334
  * Postal code of the event address
334
335
  */
335
- addressPostcode: string | null;
336
+ addressPostcode?: string | null;
336
337
  [k: string]: unknown;
337
338
  }
338
339
 
@@ -784,6 +785,7 @@ export type AppealHASCase = (GridReference | SiteAddress) & {
784
785
  | 'minor-commercial-development'
785
786
  | 'advertisement'
786
787
  | 'lawful-development-certificate'
788
+ | 'permission-in-principle'
787
789
  | null;
788
790
  siteGridReferenceEasting?: string | null;
789
791
  siteGridReferenceNorthing?: string | null;
@@ -1527,6 +1529,7 @@ export type AppealS78Case = (GridReference | SiteAddress) & {
1527
1529
  | 'advertisement'
1528
1530
  | 'lawful-development-certificate'
1529
1531
  | 'discontinuance-notice'
1532
+ | 'permission-in-principle'
1530
1533
  | null;
1531
1534
  developmentType:
1532
1535
  | 'householder'
@@ -3732,6 +3735,7 @@ export type AppellantCommonSubmissionProperties = (
3732
3735
  | 'minor-commercial-development'
3733
3736
  | 'advertisement'
3734
3737
  | 'lawful-development-certificate'
3738
+ | 'permission-in-principle'
3735
3739
  | null;
3736
3740
  /**
3737
3741
  * Indicates if the appellant has applied for costs
@@ -53,6 +53,22 @@ describe(schema, () => {
53
53
  assert.strictEqual(validationResult, true);
54
54
  });
55
55
 
56
+ it('should allow eventStatus to be pending, eventStartDateTime to be null, and address fields to be omitted', () => {
57
+ const test = {
58
+ eventId: 'ipsum ut proident Ut',
59
+ caseReference: 'irure dolore in exercitation elit',
60
+ eventType: 'site_visit_accompanied',
61
+ eventName: 'minim anim',
62
+ eventStatus: 'pending',
63
+ isUrgent: true,
64
+ eventPublished: false,
65
+ eventStartDateTime: null
66
+ };
67
+
68
+ const validationResult = ajv.validate(schema, test);
69
+ assert.strictEqual(validationResult, true);
70
+ });
71
+
56
72
  it('should allow additional props', () => {
57
73
  const test = structuredClone(event);
58
74
  test.test = 1; // additional unknown prop allowed
@@ -322,4 +322,11 @@ describe(schema, () => {
322
322
  const validationResult = ajv.validate(schema, test);
323
323
  assert.strictEqual(validationResult, true);
324
324
  });
325
+
326
+ it('should allow permission-in-principle for typeOfPlanningApplication', () => {
327
+ const test = structuredClone(appealHas);
328
+ test.typeOfPlanningApplication = 'permission-in-principle';
329
+ const validationResult = ajv.validate(schema, test);
330
+ assert.strictEqual(validationResult, true);
331
+ });
325
332
  });
@@ -276,4 +276,11 @@ describe(schema, () => {
276
276
  assert.strictEqual(validationResult, true);
277
277
  });
278
278
  });
279
+
280
+ it('should allow permission-in-principle for typeOfPlanningApplication', () => {
281
+ const test = structuredClone(appealS78);
282
+ test.typeOfPlanningApplication = 'permission-in-principle';
283
+ const validationResult = ajv.validate(schema, test);
284
+ assert.strictEqual(validationResult, true);
285
+ });
279
286
  });
@@ -93,6 +93,15 @@ describe('HAS submission command schema', () => {
93
93
  assert.strictEqual(validationResult, true);
94
94
  });
95
95
 
96
+ it('should allow permission-in-principle for typeOfPlanningApplication', () => {
97
+ const test = structuredClone(exampleHasSubmissionSchema);
98
+ test.casedata.typeOfPlanningApplication = 'permission-in-principle';
99
+
100
+ const validationResult = ajv.validate(schema, test);
101
+
102
+ assert.strictEqual(validationResult, true);
103
+ });
104
+
96
105
  it('should enforce eastings-northings pattern', () => {
97
106
  const invalidPatterns = [
98
107
  { easting: 'abc123', northing: '400534', description: 'easting with letters' },
@@ -97,6 +97,13 @@ describe('S78 submission command schema', () => {
97
97
  assert.strictEqual(validationResult, true);
98
98
  });
99
99
 
100
+ it('should allow permission-in-principle for typeOfPlanningApplication', () => {
101
+ const test = structuredClone(exampleS78SubmissionSchema);
102
+ test.casedata.typeOfPlanningApplication = 'permission-in-principle';
103
+ const validationResult = ajv.validate(schema, test);
104
+ assert.strictEqual(validationResult, true);
105
+ });
106
+
100
107
  it('should enforce eastings-northings pattern', () => {
101
108
  const invalidPatterns = [
102
109
  { easting: 'abc123', northing: '400534', description: 'easting with letters' },