@planning-inspectorate/data-model 2.46.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.
- package/docs/appeal-has.md +1 -0
- package/docs/appeal-s78.md +1 -0
- package/package.json +1 -1
- package/pins_data_model/models/model_appeal_has.py +1 -0
- package/pins_data_model/models/model_appeal_s78.py +1 -0
- package/schemas/appeal-has.schema.json +1 -0
- package/schemas/appeal-s78.schema.json +1 -0
- package/schemas/commands/appeals-components/appeal-common-submission.schema.json +1 -0
- package/src/enums.cjs +2 -0
- package/src/enums.d.ts +2 -0
- package/src/enums.js +2 -0
- package/src/index.cjs +2 -0
- package/src/schemas.d.ts +3 -0
- package/tests/appeals/appeal-has.test.js +7 -0
- package/tests/appeals/appeal-s78.test.js +7 -0
- package/tests/appeals/commands/has-submission.test.js +9 -0
- package/tests/appeals/commands/s78-submission.test.js +7 -0
package/docs/appeal-has.md
CHANGED
|
@@ -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
|
package/docs/appeal-s78.md
CHANGED
|
@@ -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
|
@@ -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
|
|
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',
|
|
@@ -426,6 +427,7 @@ const APPEAL_TYPE_OF_PLANNING_APPLICATION = Object.freeze({
|
|
|
426
427
|
LISTED_BUILDING: 'listed-building',
|
|
427
428
|
MINOR_COMMERCIAL_DEVELOPMENT: 'minor-commercial-development',
|
|
428
429
|
OUTLINE_PLANNING: 'outline-planning',
|
|
430
|
+
PERMISSION_IN_PRINCIPLE: 'permission-in-principle',
|
|
429
431
|
PRIOR_APPROVAL: 'prior-approval',
|
|
430
432
|
REMOVAL_OR_VARIATION_OF_CONDITIONS: 'removal-or-variation-of-conditions',
|
|
431
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',
|
|
@@ -424,6 +425,7 @@ export const APPEAL_TYPE_OF_PLANNING_APPLICATION = {
|
|
|
424
425
|
LISTED_BUILDING: 'listed-building',
|
|
425
426
|
MINOR_COMMERCIAL_DEVELOPMENT: 'minor-commercial-development',
|
|
426
427
|
OUTLINE_PLANNING: 'outline-planning',
|
|
428
|
+
PERMISSION_IN_PRINCIPLE: 'permission-in-principle',
|
|
427
429
|
PRIOR_APPROVAL: 'prior-approval',
|
|
428
430
|
REMOVAL_OR_VARIATION_OF_CONDITIONS: 'removal-or-variation-of-conditions',
|
|
429
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',
|
|
@@ -424,6 +425,7 @@ export const APPEAL_TYPE_OF_PLANNING_APPLICATION = Object.freeze({
|
|
|
424
425
|
LISTED_BUILDING: 'listed-building',
|
|
425
426
|
MINOR_COMMERCIAL_DEVELOPMENT: 'minor-commercial-development',
|
|
426
427
|
OUTLINE_PLANNING: 'outline-planning',
|
|
428
|
+
PERMISSION_IN_PRINCIPLE: 'permission-in-principle',
|
|
427
429
|
PRIOR_APPROVAL: 'prior-approval',
|
|
428
430
|
REMOVAL_OR_VARIATION_OF_CONDITIONS: 'removal-or-variation-of-conditions',
|
|
429
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',
|
|
@@ -507,6 +508,7 @@ const APPEAL_TYPE_OF_PLANNING_APPLICATION = Object.freeze({
|
|
|
507
508
|
LISTED_BUILDING: 'listed-building',
|
|
508
509
|
MINOR_COMMERCIAL_DEVELOPMENT: 'minor-commercial-development',
|
|
509
510
|
OUTLINE_PLANNING: 'outline-planning',
|
|
511
|
+
PERMISSION_IN_PRINCIPLE: 'permission-in-principle',
|
|
510
512
|
PRIOR_APPROVAL: 'prior-approval',
|
|
511
513
|
REMOVAL_OR_VARIATION_OF_CONDITIONS: 'removal-or-variation-of-conditions',
|
|
512
514
|
RESERVED_MATTERS: 'reserved-matters',
|
package/src/schemas.d.ts
CHANGED
|
@@ -785,6 +785,7 @@ export type AppealHASCase = (GridReference | SiteAddress) & {
|
|
|
785
785
|
| 'minor-commercial-development'
|
|
786
786
|
| 'advertisement'
|
|
787
787
|
| 'lawful-development-certificate'
|
|
788
|
+
| 'permission-in-principle'
|
|
788
789
|
| null;
|
|
789
790
|
siteGridReferenceEasting?: string | null;
|
|
790
791
|
siteGridReferenceNorthing?: string | null;
|
|
@@ -1528,6 +1529,7 @@ export type AppealS78Case = (GridReference | SiteAddress) & {
|
|
|
1528
1529
|
| 'advertisement'
|
|
1529
1530
|
| 'lawful-development-certificate'
|
|
1530
1531
|
| 'discontinuance-notice'
|
|
1532
|
+
| 'permission-in-principle'
|
|
1531
1533
|
| null;
|
|
1532
1534
|
developmentType:
|
|
1533
1535
|
| 'householder'
|
|
@@ -3733,6 +3735,7 @@ export type AppellantCommonSubmissionProperties = (
|
|
|
3733
3735
|
| 'minor-commercial-development'
|
|
3734
3736
|
| 'advertisement'
|
|
3735
3737
|
| 'lawful-development-certificate'
|
|
3738
|
+
| 'permission-in-principle'
|
|
3736
3739
|
| null;
|
|
3737
3740
|
/**
|
|
3738
3741
|
* Indicates if the appellant has applied for costs
|
|
@@ -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' },
|