From f7705f368e9a8a203d1f6c3a0acbf2fc06953901 Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Thu, 13 Jun 2024 10:58:48 +0200 Subject: [PATCH] feat: add types for Minor & Major Planning Permission `property` & `proposal` details (#179) --- schema/schema.json | 332 +++++++++++++++++++++++++++++++++- types/schema/data/Property.ts | 25 ++- types/schema/data/Proposal.ts | 49 ++++- 3 files changed, 400 insertions(+), 6 deletions(-) diff --git a/schema/schema.json b/schema/schema.json index 754c0184..f9978f0e 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -1875,6 +1875,22 @@ "BaseProposal": { "additionalProperties": false, "properties": { + "access": { + "additionalProperties": false, + "properties": { + "affected": { + "enum": [ + "vehicle", + "pedestrian", + "newRoad", + "rightsOfWay.newPublic", + "rightsOfWay.changes" + ], + "type": "string" + } + }, + "type": "object" + }, "boundary": { "$ref": "#/definitions/GeoBoundary", "description": "Location plan boundary proposed by the user, commonly referred to as the red line boundary" @@ -1885,6 +1901,37 @@ "description": { "type": "string" }, + "ecology": { + "additionalProperties": false, + "description": "Details of biodiversity and geological conservation, if applicable to application.type", + "properties": { + "conservationAffected": { + "enum": [ + "site", + "adjacent", + "none" + ], + "type": "string" + }, + "featuresAffected": { + "enum": [ + "site", + "adjacent", + "none" + ], + "type": "string" + }, + "speciesAffected": { + "enum": [ + "site", + "adjacent", + "none" + ], + "type": "string" + } + }, + "type": "object" + }, "extend": { "additionalProperties": false, "properties": { @@ -1897,6 +1944,30 @@ ], "type": "object" }, + "flood": { + "additionalProperties": false, + "description": "Assessment of flood risk, if applicable to application.type", + "properties": { + "20mFromWatercourse": { + "type": "boolean" + }, + "increasedRiskElsewhere": { + "type": "boolean" + }, + "surfaceWaterDisposal": { + "enum": [ + "drainageSystem", + "soakaway", + "sewer", + "watercourse", + "pondOrLake", + "other" + ], + "type": "string" + } + }, + "type": "object" + }, "materials": { "$ref": "#/definitions/Materials", "description": "Proposed materials, if applicable to projectType" @@ -1933,6 +2004,47 @@ "$ref": "#/definitions/ProjectType" }, "type": "array" + }, + "use": { + "additionalProperties": false, + "description": "Proposed land use, including storage of hazardous materials, if applicable to application.type", + "properties": { + "contamination": { + "enum": [ + "known", + "suspected", + "vulnerable" + ], + "type": "string" + }, + "description": { + "type": "string" + }, + "storage": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "utilities": { + "additionalProperties": false, + "description": "Proposed utilities, if applicable to application.type", + "properties": { + "foulSewageDisposal": { + "enum": [ + "sewer", + "tank", + "plant", + "pit", + "other" + ], + "type": "string" + } + }, + "type": "object" } }, "required": [ @@ -4268,7 +4380,26 @@ "type": "array" }, "materials": { - "$ref": "#/definitions/Materials" + "$ref": "#/definitions/Materials", + "description": "Existing materials, if applicable to proposal.projectType" + }, + "ownership": { + "additionalProperties": false, + "description": "Current ownership status of the land", + "properties": { + "status": { + "enum": [ + "public", + "private", + "mixed" + ], + "type": "string" + } + }, + "required": [ + "status" + ], + "type": "object" }, "parking": { "additionalProperties": false, @@ -4455,7 +4586,39 @@ "type": "string" }, "socialLandlord": { - "type": "boolean" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "status": { + "const": true, + "type": "boolean" + } + }, + "required": [ + "status", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "status": { + "const": false, + "type": "boolean" + } + }, + "required": [ + "status" + ], + "type": "object" + } + ], + "title": "Lead Registered Social Landlord" }, "titleNumber": { "additionalProperties": false, @@ -4478,6 +4641,31 @@ }, "type": { "$ref": "#/definitions/PropertyType" + }, + "use": { + "additionalProperties": false, + "description": "Existing land use, if applicable to application.type", + "properties": { + "description": { + "type": "string" + }, + "vacant": { + "additionalProperties": false, + "properties": { + "lastUseEndDate": { + "$ref": "#/definitions/Date" + } + }, + "required": [ + "lastUseEndDate" + ], + "type": "object" + } + }, + "required": [ + "description" + ], + "type": "object" } }, "required": [ @@ -4493,6 +4681,22 @@ "additionalProperties": false, "description": "Proposal details for project sites within the Greater London Authority (GLA) area", "properties": { + "access": { + "additionalProperties": false, + "properties": { + "affected": { + "enum": [ + "vehicle", + "pedestrian", + "newRoad", + "rightsOfWay.newPublic", + "rightsOfWay.changes" + ], + "type": "string" + } + }, + "type": "object" + }, "boundary": { "$ref": "#/definitions/GeoBoundary", "description": "Location plan boundary proposed by the user, commonly referred to as the red line boundary" @@ -4556,6 +4760,37 @@ "description": { "type": "string" }, + "ecology": { + "additionalProperties": false, + "description": "Details of biodiversity and geological conservation, if applicable to application.type", + "properties": { + "conservationAffected": { + "enum": [ + "site", + "adjacent", + "none" + ], + "type": "string" + }, + "featuresAffected": { + "enum": [ + "site", + "adjacent", + "none" + ], + "type": "string" + }, + "speciesAffected": { + "enum": [ + "site", + "adjacent", + "none" + ], + "type": "string" + } + }, + "type": "object" + }, "extend": { "additionalProperties": false, "properties": { @@ -4568,6 +4803,30 @@ ], "type": "object" }, + "flood": { + "additionalProperties": false, + "description": "Assessment of flood risk, if applicable to application.type", + "properties": { + "20mFromWatercourse": { + "type": "boolean" + }, + "increasedRiskElsewhere": { + "type": "boolean" + }, + "surfaceWaterDisposal": { + "enum": [ + "drainageSystem", + "soakaway", + "sewer", + "watercourse", + "pondOrLake", + "other" + ], + "type": "string" + } + }, + "type": "object" + }, "materials": { "$ref": "#/definitions/Materials", "description": "Proposed materials, if applicable to projectType" @@ -4890,6 +5149,47 @@ "schemeName": { "type": "string" }, + "use": { + "additionalProperties": false, + "description": "Proposed land use, including storage of hazardous materials, if applicable to application.type", + "properties": { + "contamination": { + "enum": [ + "known", + "suspected", + "vulnerable" + ], + "type": "string" + }, + "description": { + "type": "string" + }, + "storage": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "utilities": { + "additionalProperties": false, + "description": "Proposed utilities, if applicable to application.type", + "properties": { + "foulSewageDisposal": { + "enum": [ + "sewer", + "tank", + "plant", + "pit", + "other" + ], + "type": "string" + } + }, + "type": "object" + }, "water": { "additionalProperties": false, "description": "Water management", @@ -23696,7 +23996,8 @@ "type": "array" }, "materials": { - "$ref": "#/definitions/Materials" + "$ref": "#/definitions/Materials", + "description": "Existing materials, if applicable to proposal.projectType" }, "planning": { "additionalProperties": false, @@ -23760,6 +24061,31 @@ }, "type": { "$ref": "#/definitions/PropertyType" + }, + "use": { + "additionalProperties": false, + "description": "Existing land use, if applicable to application.type", + "properties": { + "description": { + "type": "string" + }, + "vacant": { + "additionalProperties": false, + "properties": { + "lastUseEndDate": { + "$ref": "#/definitions/Date" + } + }, + "required": [ + "lastUseEndDate" + ], + "type": "object" + } + }, + "required": [ + "description" + ], + "type": "object" } }, "required": [ diff --git a/types/schema/data/Property.ts b/types/schema/data/Property.ts index 7a2c187c..d125e44c 100644 --- a/types/schema/data/Property.ts +++ b/types/schema/data/Property.ts @@ -1,6 +1,6 @@ import {PlanningDesignations} from '../../enums/PlanningConstraints'; import {PropertyTypes} from '../../enums/PropertyTypes'; -import {URL} from '../../utils'; +import {Date, URL} from '../../utils'; import {GeoBoundary, Materials} from './shared'; /** @@ -56,7 +56,19 @@ export interface UKProperty { neighbourhood: PlanningConstraint[]; }; }; + /** + * @description Existing materials, if applicable to proposal.projectType + */ materials?: Materials; + /** + * @description Existing land use, if applicable to application.type + */ + use?: { + description: string; + vacant?: { + lastUseEndDate: Date; + }; + }; } /** @@ -80,7 +92,16 @@ export interface LondonProperty extends UKProperty { | 'No'; number?: string; }; - socialLandlord?: boolean; + /** + * @title Lead Registered Social Landlord + */ + socialLandlord?: {status: true; description: string} | {status: false}; + /** + * @description Current ownership status of the land + */ + ownership?: { + status: 'public' | 'private' | 'mixed'; + }; parking?: { cars?: ExistingCount; vans?: ExistingCount; diff --git a/types/schema/data/Proposal.ts b/types/schema/data/Proposal.ts index 36834b84..601d427b 100644 --- a/types/schema/data/Proposal.ts +++ b/types/schema/data/Proposal.ts @@ -16,15 +16,62 @@ export type Proposal = BaseProposal | LondonProposal; export interface BaseProposal { projectType: ProjectType[]; description: string; + date?: ProposalDates; /** * @description Location plan boundary proposed by the user, commonly referred to as the red line boundary */ boundary?: GeoBoundary; - date?: ProposalDates; /** * @description Proposed materials, if applicable to projectType */ materials?: Materials; + /** + * @desription Proposed pedestrian & vehicle access, roads and rights of way, if applicable to application.type + */ + access?: { + affected?: + | 'vehicle' + | 'pedestrian' + | 'newRoad' + | 'rightsOfWay.newPublic' + | 'rightsOfWay.changes'; + }; + /** + * @description Proposed utilities, if applicable to application.type + */ + utilities?: { + foulSewageDisposal?: 'sewer' | 'tank' | 'plant' | 'pit' | 'other'; + }; + /** + * @description Assessment of flood risk, if applicable to application.type + */ + flood?: { + '20mFromWatercourse'?: boolean; + increasedRiskElsewhere?: boolean; + surfaceWaterDisposal?: + | 'drainageSystem' + | 'soakaway' + | 'sewer' + | 'watercourse' + | 'pondOrLake' + | 'other'; + }; + /** + * @description Details of biodiversity and geological conservation, if applicable to application.type + */ + ecology?: { + speciesAffected?: 'site' | 'adjacent' | 'none'; + featuresAffected?: 'site' | 'adjacent' | 'none'; + conservationAffected?: 'site' | 'adjacent' | 'none'; + }; + /** + * @description Proposed land use, including storage of hazardous materials, if applicable to application.type + */ + use?: { + description?: string; + contamination?: 'known' | 'suspected' | 'vulnerable'; + storage?: string[]; + }; extend?: { area: Area; };