From c5b5f9c61b2bead2e44a6abdde7fbf0822ffbfb0 Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Wed, 13 Mar 2024 19:22:06 +0100 Subject: [PATCH 1/3] wip --- examples/data/planningPermission.ts | 162 +-- examples/validPlanningPermission.json | 160 +-- schema/schema.json | 1328 +++++++------------------ types/enums/ApplicationTypes.ts | 2 + types/enums/VehicleParking.ts | 29 - types/schema/data/Application.ts | 18 +- types/schema/data/Property.ts | 17 + types/schema/data/Proposal.ts | 99 +- 8 files changed, 414 insertions(+), 1401 deletions(-) delete mode 100644 types/enums/VehicleParking.ts diff --git a/examples/data/planningPermission.ts b/examples/data/planningPermission.ts index 7b3873d1..f8263c58 100644 --- a/examples/data/planningPermission.ts +++ b/examples/data/planningPermission.ts @@ -216,6 +216,14 @@ export const validPlanningPermission: Schema = { value: 'residential.dwelling.house.terrace', description: 'Terrace', }, + parking: { + cars: { + count: 1, + }, + cycles: { + count: 2, + }, + }, }, proposal: { projectType: [ @@ -258,154 +266,14 @@ export const validPlanningPermission: Schema = { squareMetres: 45, }, }, - vehicleParking: { - type: [ - { - value: 'cars.offStreet.residents', - description: 'Off-street parking for residents only', - }, - { - value: 'bicycles.offStreet', - description: 'Off-street parking for bicycles', - }, - ], + parking: { cars: { - count: { - existing: 1, - proposed: 1, - }, - offStreet: { - count: { - existing: 0, - proposed: 0, - }, - club: { - count: { - existing: 0, - proposed: 0, - }, - }, - disabled: { - count: { - existing: 0, - proposed: 0, - }, - }, - other: { - count: { - existing: 0, - proposed: 0, - }, - }, - residents: { - count: { - existing: 1, - proposed: 1, - }, - }, - }, - onStreet: { - count: { - existing: 0, - proposed: 0, - }, - club: { - count: { - existing: 0, - proposed: 0, - }, - }, - disabled: { - count: { - existing: 0, - proposed: 0, - }, - }, - other: { - count: { - existing: 0, - proposed: 0, - }, - }, - residents: { - count: { - existing: 0, - proposed: 0, - }, - }, - }, - }, - vans: { - count: { - existing: 0, - proposed: 0, - }, - offStreet: { - count: { - existing: 0, - proposed: 0, - }, - }, - onStreet: { - count: { - existing: 0, - proposed: 0, - }, - }, - }, - motorcycles: { - count: { - existing: 0, - proposed: 0, - }, - offStreet: { - count: { - existing: 0, - proposed: 0, - }, - }, - onStreet: { - count: { - existing: 0, - proposed: 0, - }, - }, - }, - bicycles: { - count: { - existing: 2, - proposed: 2, - }, - offStreet: { - count: { - existing: 2, - proposed: 2, - }, - }, - onStreet: { - count: { - existing: 0, - proposed: 0, - }, - }, - }, - buses: { - count: { - existing: 0, - proposed: 0, - }, - offStreet: { - count: { - existing: 0, - proposed: 0, - }, - }, - onStreet: { - count: { - existing: 0, - proposed: 0, - }, - }, + count: 1, + difference: 0, + }, + cycles: { + count: 2, + difference: 0, }, }, }, diff --git a/examples/validPlanningPermission.json b/examples/validPlanningPermission.json index 9590b7a5..97db03b6 100644 --- a/examples/validPlanningPermission.json +++ b/examples/validPlanningPermission.json @@ -228,6 +228,14 @@ "type": { "value": "residential.dwelling.house.terrace", "description": "Terrace" + }, + "parking": { + "cars": { + "count": 1 + }, + "cycles": { + "count": 2 + } } }, "proposal": { @@ -285,154 +293,14 @@ "squareMetres": 45 } }, - "vehicleParking": { - "type": [ - { - "value": "cars.offStreet.residents", - "description": "Off-street parking for residents only" - }, - { - "value": "bicycles.offStreet", - "description": "Off-street parking for bicycles" - } - ], + "parking": { "cars": { - "count": { - "existing": 1, - "proposed": 1 - }, - "offStreet": { - "count": { - "existing": 0, - "proposed": 0 - }, - "club": { - "count": { - "existing": 0, - "proposed": 0 - } - }, - "disabled": { - "count": { - "existing": 0, - "proposed": 0 - } - }, - "other": { - "count": { - "existing": 0, - "proposed": 0 - } - }, - "residents": { - "count": { - "existing": 1, - "proposed": 1 - } - } - }, - "onStreet": { - "count": { - "existing": 0, - "proposed": 0 - }, - "club": { - "count": { - "existing": 0, - "proposed": 0 - } - }, - "disabled": { - "count": { - "existing": 0, - "proposed": 0 - } - }, - "other": { - "count": { - "existing": 0, - "proposed": 0 - } - }, - "residents": { - "count": { - "existing": 0, - "proposed": 0 - } - } - } - }, - "vans": { - "count": { - "existing": 0, - "proposed": 0 - }, - "offStreet": { - "count": { - "existing": 0, - "proposed": 0 - } - }, - "onStreet": { - "count": { - "existing": 0, - "proposed": 0 - } - } + "count": 1, + "difference": 0 }, - "motorcycles": { - "count": { - "existing": 0, - "proposed": 0 - }, - "offStreet": { - "count": { - "existing": 0, - "proposed": 0 - } - }, - "onStreet": { - "count": { - "existing": 0, - "proposed": 0 - } - } - }, - "bicycles": { - "count": { - "existing": 2, - "proposed": 2 - }, - "offStreet": { - "count": { - "existing": 2, - "proposed": 2 - } - }, - "onStreet": { - "count": { - "existing": 0, - "proposed": 0 - } - } - }, - "buses": { - "count": { - "existing": 0, - "proposed": 0 - }, - "offStreet": { - "count": { - "existing": 0, - "proposed": 0 - } - }, - "onStreet": { - "count": { - "existing": 0, - "proposed": 0 - } - } + "cycles": { + "count": 2, + "difference": 0 } } } diff --git a/schema/schema.json b/schema/schema.json index dbdac7e8..df1797c5 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -235,31 +235,15 @@ }, "Application": { "$id": "#Application", - "additionalProperties": false, - "description": "Information about this planning application", - "properties": { - "CIL": { - "$ref": "#/definitions/CommunityInfrastructureLevy" - }, - "declaration": { - "$ref": "#/definitions/ApplicationDeclaration" - }, - "fee": { - "$ref": "#/definitions/ApplicationFee" - }, - "preApp": { - "$ref": "#/definitions/PreApplication" + "anyOf": [ + { + "$ref": "#/definitions/BaseApplication" }, - "type": { - "$ref": "#/definitions/ApplicationType" + { + "$ref": "#/definitions/LondonApplication" } - }, - "required": [ - "type", - "fee", - "declaration" ], - "type": "object" + "description": "Information about this planning application" }, "ApplicationDeclaration": { "$id": "#ApplicationDeclaration", @@ -1198,6 +1182,24 @@ ], "type": "object" }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Full Planning Permission - Fast track for the purposes of Affordable Housing", + "type": "string" + }, + "value": { + "const": "pp.full.fastTrack.affordable", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, { "additionalProperties": false, "properties": { @@ -1563,6 +1565,32 @@ ], "type": "object" }, + "BaseApplication": { + "additionalProperties": false, + "properties": { + "CIL": { + "$ref": "#/definitions/CommunityInfrastructureLevy" + }, + "declaration": { + "$ref": "#/definitions/ApplicationDeclaration" + }, + "fee": { + "$ref": "#/definitions/ApplicationFee" + }, + "preApp": { + "$ref": "#/definitions/PreApplication" + }, + "type": { + "$ref": "#/definitions/ApplicationType" + } + }, + "required": [ + "type", + "fee", + "declaration" + ], + "type": "object" + }, "BaseDetails": { "additionalProperties": false, "properties": { @@ -3470,6 +3498,26 @@ ], "type": "object" }, + "LeadDeveloper": { + "additionalProperties": false, + "properties": { + "companyRegistrationNumber": { + "type": "string" + }, + "type": { + "enum": [ + "ukCompany", + "overseasCompany", + "none" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, "LineString": { "additionalProperties": false, "description": "LineString geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.4", @@ -3496,6 +3544,40 @@ ], "type": "object" }, + "LondonApplication": { + "$id": "#LondonApplication", + "additionalProperties": false, + "description": "Application details for project sites within the Greater London Authority (GLA) area", + "properties": { + "CIL": { + "$ref": "#/definitions/CommunityInfrastructureLevy" + }, + "declaration": { + "$ref": "#/definitions/ApplicationDeclaration" + }, + "fee": { + "$ref": "#/definitions/ApplicationFee" + }, + "leadDeveloper": { + "$ref": "#/definitions/LeadDeveloper" + }, + "preApp": { + "$ref": "#/definitions/PreApplication" + }, + "type": { + "$ref": "#/definitions/ApplicationType" + }, + "vacantBuildingCredit": { + "type": "boolean" + } + }, + "required": [ + "declaration", + "fee", + "type" + ], + "type": "object" + }, "LondonDetails": { "$id": "#LondonDetails", "additionalProperties": false, @@ -3543,600 +3625,167 @@ ], "type": "object" }, - "vehicleParking": { + "parking": { "additionalProperties": false, + "description": "Proposed parking spaces", "properties": { - "bicycles": { + "buses": { "additionalProperties": false, "properties": { "count": { - "additionalProperties": false, - "properties": { - "existing": { - "type": "number" - }, - "proposed": { - "type": "number" - } - }, - "required": [ - "existing", - "proposed" - ], - "type": "object" + "type": "number" }, - "offStreet": { - "additionalProperties": false, - "properties": { - "count": { - "additionalProperties": false, - "properties": { - "existing": { - "type": "number" - }, - "proposed": { - "type": "number" - } - }, - "required": [ - "existing", - "proposed" - ], - "type": "object" - } - }, - "required": [ - "count" - ], - "type": "object" + "difference": { + "type": "number" + } + }, + "required": [ + "count", + "difference" + ], + "type": "object" + }, + "carClub": { + "additionalProperties": false, + "properties": { + "count": { + "type": "number" }, - "onStreet": { - "additionalProperties": false, - "properties": { - "count": { - "additionalProperties": false, - "properties": { - "existing": { - "type": "number" - }, - "proposed": { - "type": "number" - } - }, - "required": [ - "existing", - "proposed" - ], - "type": "object" - } - }, - "required": [ - "count" - ], - "type": "object" + "difference": { + "type": "number" } }, "required": [ - "count" + "count", + "difference" ], "type": "object" }, - "buses": { + "cars": { "additionalProperties": false, "properties": { "count": { - "additionalProperties": false, - "properties": { - "existing": { - "type": "number" - }, - "proposed": { - "type": "number" - } - }, - "required": [ - "existing", - "proposed" - ], - "type": "object" + "type": "number" }, - "offStreet": { - "additionalProperties": false, - "properties": { - "count": { - "additionalProperties": false, - "properties": { - "existing": { - "type": "number" - }, - "proposed": { - "type": "number" - } - }, - "required": [ - "existing", - "proposed" - ], - "type": "object" - } - }, - "required": [ - "count" - ], - "type": "object" + "difference": { + "type": "number" + } + }, + "required": [ + "count", + "difference" + ], + "type": "object" + }, + "cycles": { + "additionalProperties": false, + "properties": { + "count": { + "type": "number" }, - "onStreet": { - "additionalProperties": false, - "properties": { - "count": { - "additionalProperties": false, - "properties": { - "existing": { - "type": "number" - }, - "proposed": { - "type": "number" - } - }, - "required": [ - "existing", - "proposed" - ], - "type": "object" - } - }, - "required": [ - "count" - ], - "type": "object" + "difference": { + "type": "number" } }, "required": [ - "count" + "count", + "difference" ], "type": "object" }, - "cars": { + "disabled": { + "additionalProperties": false, + "properties": { + "count": { + "type": "number" + }, + "difference": { + "type": "number" + } + }, + "required": [ + "count", + "difference" + ], + "type": "object" + }, + "motorcycles": { "additionalProperties": false, "properties": { "count": { + "type": "number" + }, + "difference": { + "type": "number" + } + }, + "required": [ + "count", + "difference" + ], + "type": "object" + }, + "offStreet": { + "additionalProperties": false, + "properties": { + "residential": { "additionalProperties": false, "properties": { - "existing": { + "count": { "type": "number" }, - "proposed": { + "difference": { "type": "number" } }, "required": [ - "existing", - "proposed" + "count", + "difference" ], "type": "object" + } + }, + "required": [ + "residential" + ], + "type": "object" + }, + "other": { + "additionalProperties": false, + "properties": { + "count": { + "type": "number" }, - "offStreet": { - "additionalProperties": false, - "properties": { - "club": { - "additionalProperties": false, - "properties": { - "count": { - "additionalProperties": false, - "properties": { - "existing": { - "type": "number" - }, - "proposed": { - "type": "number" - } - }, - "required": [ - "existing", - "proposed" - ], - "type": "object" - } - }, - "required": [ - "count" - ], - "type": "object" - }, - "count": { - "additionalProperties": false, - "properties": { - "existing": { - "type": "number" - }, - "proposed": { - "type": "number" - } - }, - "required": [ - "existing", - "proposed" - ], - "type": "object" - }, - "disabled": { - "additionalProperties": false, - "properties": { - "count": { - "additionalProperties": false, - "properties": { - "existing": { - "type": "number" - }, - "proposed": { - "type": "number" - } - }, - "required": [ - "existing", - "proposed" - ], - "type": "object" - } - }, - "required": [ - "count" - ], - "type": "object" - }, - "other": { - "additionalProperties": false, - "properties": { - "count": { - "additionalProperties": false, - "properties": { - "existing": { - "type": "number" - }, - "proposed": { - "type": "number" - } - }, - "required": [ - "existing", - "proposed" - ], - "type": "object" - } - }, - "required": [ - "count" - ], - "type": "object" - }, - "residents": { - "additionalProperties": false, - "properties": { - "count": { - "additionalProperties": false, - "properties": { - "existing": { - "type": "number" - }, - "proposed": { - "type": "number" - } - }, - "required": [ - "existing", - "proposed" - ], - "type": "object" - } - }, - "required": [ - "count" - ], - "type": "object" - } - }, - "required": [ - "count" - ], - "type": "object" - }, - "onStreet": { - "additionalProperties": false, - "properties": { - "club": { - "additionalProperties": false, - "properties": { - "count": { - "additionalProperties": false, - "properties": { - "existing": { - "type": "number" - }, - "proposed": { - "type": "number" - } - }, - "required": [ - "existing", - "proposed" - ], - "type": "object" - } - }, - "required": [ - "count" - ], - "type": "object" - }, - "count": { - "additionalProperties": false, - "properties": { - "existing": { - "type": "number" - }, - "proposed": { - "type": "number" - } - }, - "required": [ - "existing", - "proposed" - ], - "type": "object" - }, - "disabled": { - "additionalProperties": false, - "properties": { - "count": { - "additionalProperties": false, - "properties": { - "existing": { - "type": "number" - }, - "proposed": { - "type": "number" - } - }, - "required": [ - "existing", - "proposed" - ], - "type": "object" - } - }, - "required": [ - "count" - ], - "type": "object" - }, - "other": { - "additionalProperties": false, - "properties": { - "count": { - "additionalProperties": false, - "properties": { - "existing": { - "type": "number" - }, - "proposed": { - "type": "number" - } - }, - "required": [ - "existing", - "proposed" - ], - "type": "object" - } - }, - "required": [ - "count" - ], - "type": "object" - }, - "residents": { - "additionalProperties": false, - "properties": { - "count": { - "additionalProperties": false, - "properties": { - "existing": { - "type": "number" - }, - "proposed": { - "type": "number" - } - }, - "required": [ - "existing", - "proposed" - ], - "type": "object" - } - }, - "required": [ - "count" - ], - "type": "object" - } - }, - "required": [ - "count" - ], - "type": "object" - } - }, - "required": [ - "count" - ], - "type": "object" - }, - "motorcycles": { - "additionalProperties": false, - "properties": { - "count": { - "additionalProperties": false, - "properties": { - "existing": { - "type": "number" - }, - "proposed": { - "type": "number" - } - }, - "required": [ - "existing", - "proposed" - ], - "type": "object" - }, - "offStreet": { - "additionalProperties": false, - "properties": { - "count": { - "additionalProperties": false, - "properties": { - "existing": { - "type": "number" - }, - "proposed": { - "type": "number" - } - }, - "required": [ - "existing", - "proposed" - ], - "type": "object" - } - }, - "required": [ - "count" - ], - "type": "object" - }, - "onStreet": { - "additionalProperties": false, - "properties": { - "count": { - "additionalProperties": false, - "properties": { - "existing": { - "type": "number" - }, - "proposed": { - "type": "number" - } - }, - "required": [ - "existing", - "proposed" - ], - "type": "object" - } - }, - "required": [ - "count" - ], - "type": "object" + "difference": { + "type": "number" } }, "required": [ - "count" + "count", + "difference" ], "type": "object" }, - "type": { - "items": { - "$ref": "#/definitions/VehicleParking" - }, - "type": "array" - }, "vans": { "additionalProperties": false, "properties": { "count": { - "additionalProperties": false, - "properties": { - "existing": { - "type": "number" - }, - "proposed": { - "type": "number" - } - }, - "required": [ - "existing", - "proposed" - ], - "type": "object" - }, - "offStreet": { - "additionalProperties": false, - "properties": { - "count": { - "additionalProperties": false, - "properties": { - "existing": { - "type": "number" - }, - "proposed": { - "type": "number" - } - }, - "required": [ - "existing", - "proposed" - ], - "type": "object" - } - }, - "required": [ - "count" - ], - "type": "object" + "type": "number" }, - "onStreet": { - "additionalProperties": false, - "properties": { - "count": { - "additionalProperties": false, - "properties": { - "existing": { - "type": "number" - }, - "proposed": { - "type": "number" - } - }, - "required": [ - "existing", - "proposed" - ], - "type": "object" - } - }, - "required": [ - "count" - ], - "type": "object" + "difference": { + "type": "number" } }, "required": [ - "count" + "count", + "difference" ], "type": "object" } }, - "required": [ - "type" - ], "type": "object" } }, - "required": [ - "vehicleParking" - ], "type": "object" }, "LondonProperty": { @@ -4203,6 +3852,130 @@ }, "type": "array" }, + "parking": { + "additionalProperties": false, + "description": "Existing parking spaces", + "properties": { + "buses": { + "additionalProperties": false, + "properties": { + "count": { + "type": "number" + } + }, + "required": [ + "count" + ], + "type": "object" + }, + "carClub": { + "additionalProperties": false, + "properties": { + "count": { + "type": "number" + } + }, + "required": [ + "count" + ], + "type": "object" + }, + "cars": { + "additionalProperties": false, + "properties": { + "count": { + "type": "number" + } + }, + "required": [ + "count" + ], + "type": "object" + }, + "cycles": { + "additionalProperties": false, + "properties": { + "count": { + "type": "number" + } + }, + "required": [ + "count" + ], + "type": "object" + }, + "disabled": { + "additionalProperties": false, + "properties": { + "count": { + "type": "number" + } + }, + "required": [ + "count" + ], + "type": "object" + }, + "motorcycles": { + "additionalProperties": false, + "properties": { + "count": { + "type": "number" + } + }, + "required": [ + "count" + ], + "type": "object" + }, + "offStreet": { + "additionalProperties": false, + "properties": { + "residential": { + "additionalProperties": false, + "properties": { + "count": { + "type": "number" + } + }, + "required": [ + "count" + ], + "type": "object" + } + }, + "required": [ + "residential" + ], + "type": "object" + }, + "other": { + "additionalProperties": false, + "properties": { + "count": { + "type": "number" + } + }, + "required": [ + "count" + ], + "type": "object" + }, + "vans": { + "additionalProperties": false, + "properties": { + "count": { + "type": "number" + } + }, + "required": [ + "count" + ], + "type": "object" + } + }, + "type": "object" + }, "planning": { "additionalProperties": false, "description": "Planning constraints and policies that intersect with this site and may impact or restrict development", @@ -4264,6 +4037,9 @@ "const": "London", "type": "string" }, + "socialLandlord": { + "type": "boolean" + }, "titleNumber": { "additionalProperties": false, "properties": { @@ -22163,444 +21939,6 @@ "town" ], "type": "object" - }, - "VehicleParking": { - "$id": "#VehicleParking", - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "description": { - "const": "Cars", - "type": "string" - }, - "value": { - "const": "cars", - "type": "string" - } - }, - "required": [ - "value", - "description" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "description": { - "const": "Off-street parking for cars", - "type": "string" - }, - "value": { - "const": "cars.offStreet", - "type": "string" - } - }, - "required": [ - "value", - "description" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "description": { - "const": "Off-street parking for a car club", - "type": "string" - }, - "value": { - "const": "cars.offStreet.club", - "type": "string" - } - }, - "required": [ - "value", - "description" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "description": { - "const": "Off-street disabled parking", - "type": "string" - }, - "value": { - "const": "cars.offStreet.disabled", - "type": "string" - } - }, - "required": [ - "value", - "description" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "description": { - "const": "Off-street parking for non-residents", - "type": "string" - }, - "value": { - "const": "cars.offStreet.other", - "type": "string" - } - }, - "required": [ - "value", - "description" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "description": { - "const": "Off-street parking for residents only", - "type": "string" - }, - "value": { - "const": "cars.offStreet.residents", - "type": "string" - } - }, - "required": [ - "value", - "description" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "description": { - "const": "On-street parking for cars", - "type": "string" - }, - "value": { - "const": "cars.onStreet", - "type": "string" - } - }, - "required": [ - "value", - "description" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "description": { - "const": "On-street parking for a car club", - "type": "string" - }, - "value": { - "const": "cars.onStreet.club", - "type": "string" - } - }, - "required": [ - "value", - "description" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "description": { - "const": "On-street disabled parking", - "type": "string" - }, - "value": { - "const": "cars.onStreet.disabled", - "type": "string" - } - }, - "required": [ - "value", - "description" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "description": { - "const": "On-street parking for non-residents", - "type": "string" - }, - "value": { - "const": "cars.onStreet.other", - "type": "string" - } - }, - "required": [ - "value", - "description" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "description": { - "const": "On-street parking for residents only", - "type": "string" - }, - "value": { - "const": "cars.onStreet.residents", - "type": "string" - } - }, - "required": [ - "value", - "description" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "description": { - "const": "Vans", - "type": "string" - }, - "value": { - "const": "vans", - "type": "string" - } - }, - "required": [ - "value", - "description" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "description": { - "const": "Off-street parking for vans", - "type": "string" - }, - "value": { - "const": "vans.offStreet", - "type": "string" - } - }, - "required": [ - "value", - "description" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "description": { - "const": "On-street parking for vans", - "type": "string" - }, - "value": { - "const": "vans.onStreet", - "type": "string" - } - }, - "required": [ - "value", - "description" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "description": { - "const": "Motorcycles", - "type": "string" - }, - "value": { - "const": "motorcycles", - "type": "string" - } - }, - "required": [ - "value", - "description" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "description": { - "const": "Off-street parking for motorcycles", - "type": "string" - }, - "value": { - "const": "motorcycles.offStreet", - "type": "string" - } - }, - "required": [ - "value", - "description" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "description": { - "const": "On-street parking for motorcycles", - "type": "string" - }, - "value": { - "const": "motorcycles.onStreet", - "type": "string" - } - }, - "required": [ - "value", - "description" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "description": { - "const": "Bicycles", - "type": "string" - }, - "value": { - "const": "bicycles", - "type": "string" - } - }, - "required": [ - "value", - "description" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "description": { - "const": "Off-street parking for bicycles", - "type": "string" - }, - "value": { - "const": "bicycles.offStreet", - "type": "string" - } - }, - "required": [ - "value", - "description" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "description": { - "const": "On-street parking for bicycles", - "type": "string" - }, - "value": { - "const": "bicycles.onStreet", - "type": "string" - } - }, - "required": [ - "value", - "description" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "description": { - "const": "Buses", - "type": "string" - }, - "value": { - "const": "buses", - "type": "string" - } - }, - "required": [ - "value", - "description" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "description": { - "const": "Off-street parking for buses", - "type": "string" - }, - "value": { - "const": "buses.offStreet", - "type": "string" - } - }, - "required": [ - "value", - "description" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "description": { - "const": "On-street parking for buses", - "type": "string" - }, - "value": { - "const": "buses.onStreet", - "type": "string" - } - }, - "required": [ - "value", - "description" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "description": { - "const": "None", - "type": "string" - }, - "value": { - "const": "none", - "type": "string" - } - }, - "required": [ - "value", - "description" - ], - "type": "object" - } - ], - "description": "Vehicle parking types" } }, "description": "The root specification for a planning application in England generated by a digital planning service", diff --git a/types/enums/ApplicationTypes.ts b/types/enums/ApplicationTypes.ts index 9be05ade..60d27ee6 100644 --- a/types/enums/ApplicationTypes.ts +++ b/types/enums/ApplicationTypes.ts @@ -74,6 +74,8 @@ export const ApplicationTypes = { 'Full Planning Permission and consent to display an advert', 'pp.full.demolition': 'Full Planning Permission including demolition in a Conservation Area', + 'pp.full.fastTrack.affordable': + 'Full Planning Permission - Fast track for the purposes of Affordable Housing', 'pp.full.householder': 'Planning Permission - Full householder', 'pp.full.householder.listed': 'Planning Permission - Full householder with consent to do works to a Listed Building', diff --git a/types/enums/VehicleParking.ts b/types/enums/VehicleParking.ts deleted file mode 100644 index b934517f..00000000 --- a/types/enums/VehicleParking.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Values of `data.proposal.details.vehicleParking` - */ -export const VehicleParking = { - cars: 'Cars', - 'cars.offStreet': 'Off-street parking for cars', - 'cars.offStreet.club': 'Off-street parking for a car club', - 'cars.offStreet.disabled': 'Off-street disabled parking', - 'cars.offStreet.other': 'Off-street parking for non-residents', - 'cars.offStreet.residents': 'Off-street parking for residents only', - 'cars.onStreet': 'On-street parking for cars', - 'cars.onStreet.club': 'On-street parking for a car club', - 'cars.onStreet.disabled': 'On-street disabled parking', - 'cars.onStreet.other': 'On-street parking for non-residents', - 'cars.onStreet.residents': 'On-street parking for residents only', - vans: 'Vans', - 'vans.offStreet': 'Off-street parking for vans', - 'vans.onStreet': 'On-street parking for vans', - motorcycles: 'Motorcycles', - 'motorcycles.offStreet': 'Off-street parking for motorcycles', - 'motorcycles.onStreet': 'On-street parking for motorcycles', - bicycles: 'Bicycles', - 'bicycles.offStreet': 'Off-street parking for bicycles', - 'bicycles.onStreet': 'On-street parking for bicycles', - buses: 'Buses', - 'buses.offStreet': 'Off-street parking for buses', - 'buses.onStreet': 'On-street parking for buses', - none: 'None', -}; diff --git a/types/schema/data/Application.ts b/types/schema/data/Application.ts index eca1789e..f1b2aa9a 100644 --- a/types/schema/data/Application.ts +++ b/types/schema/data/Application.ts @@ -5,7 +5,9 @@ import {Date} from '../../utils'; * @id #Application * @description Information about this planning application */ -export interface Application { +export type Application = BaseApplication | LondonApplication; + +export interface BaseApplication { type: ApplicationType; fee: ApplicationFee; declaration: ApplicationDeclaration; @@ -13,6 +15,15 @@ export interface Application { CIL?: CommunityInfrastructureLevy; } +/** + * @id #LondonApplication + * @description Application details for project sites within the Greater London Authority (GLA) area + */ +export interface LondonApplication extends BaseApplication { + vacantBuildingCredit?: boolean; + leadDeveloper?: LeadDeveloper; +} + /** * @id #ApplicationFee * @description The costs associated with this application @@ -79,6 +90,11 @@ export interface CommunityInfrastructureLevy { | 'relief.socialHousing'; } +export interface LeadDeveloper { + type: 'ukCompany' | 'overseasCompany' | 'none'; + companyRegistrationNumber?: string; +} + type ApplicationTypeKeys = keyof typeof ApplicationTypes; type GenericApplicationType = { diff --git a/types/schema/data/Property.ts b/types/schema/data/Property.ts index 54bd9da3..12f2ff0c 100644 --- a/types/schema/data/Property.ts +++ b/types/schema/data/Property.ts @@ -92,8 +92,25 @@ export interface LondonProperty extends UKProperty { | 'No'; number?: string; }; + socialLandlord?: boolean; + /** + * @description Existing parking spaces + */ + parking?: { + cars?: ExistingCount; + vans?: ExistingCount; + motorcycles?: ExistingCount; + cycles?: ExistingCount; + buses?: ExistingCount; + disabled?: ExistingCount; + carClub?: ExistingCount; + offStreet?: {residential: ExistingCount}; + other?: ExistingCount; + }; } +type ExistingCount = {count: number}; + /** * @id #SiteAddress * @description Address information available for any site, whether existing or proposed diff --git a/types/schema/data/Proposal.ts b/types/schema/data/Proposal.ts index a99db644..7d3e740d 100644 --- a/types/schema/data/Proposal.ts +++ b/types/schema/data/Proposal.ts @@ -1,6 +1,5 @@ import {GeoJSON} from 'geojson'; import {ProjectTypes} from '../../enums/ProjectTypes'; -import {VehicleParking} from '../../enums/VehicleParking'; import {Area, Date} from '../../utils'; import {Materials} from './shared'; @@ -57,74 +56,25 @@ export interface BaseDetails { * @description Proposal details for project sites within the Greater London Authority (GLA) area */ export interface LondonDetails extends BaseDetails { - vehicleParking: { - type: VehicleParking[]; - cars?: { - count: { - existing: number; - proposed: number; - }; - onStreet?: { - count: { - existing: number; - proposed: number; - }; - club?: VehicleParkingCount; - disabled?: VehicleParkingCount; - other?: VehicleParkingCount; - residents?: VehicleParkingCount; - }; - offStreet?: { - count: { - existing: number; - proposed: number; - }; - club?: VehicleParkingCount; - disabled?: VehicleParkingCount; - other?: VehicleParkingCount; - residents?: VehicleParkingCount; - }; - }; - vans?: { - count: { - existing: number; - proposed: number; - }; - onStreet?: VehicleParkingCount; - offStreet?: VehicleParkingCount; - }; - motorcycles?: { - count: { - existing: number; - proposed: number; - }; - onStreet?: VehicleParkingCount; - offStreet?: VehicleParkingCount; - }; - bicycles?: { - count: { - existing: number; - proposed: number; - }; - onStreet?: VehicleParkingCount; - offStreet?: VehicleParkingCount; - }; - buses?: { - count: { - existing: number; - proposed: number; - }; - onStreet?: VehicleParkingCount; - offStreet?: VehicleParkingCount; - }; + /** + * @description Proposed parking spaces + */ + parking?: { + cars?: ProposedCount; + vans?: ProposedCount; + motorcycles?: ProposedCount; + cycles?: ProposedCount; + buses?: ProposedCount; + disabled?: ProposedCount; + carClub?: ProposedCount; + offStreet?: {residential: ProposedCount}; + other?: ProposedCount; }; } -type VehicleParkingCount = { - count: { - existing: number; - proposed: number; - }; +type ProposedCount = { + count: number; + difference: number; }; type ProjectTypeKeys = keyof typeof ProjectTypes; @@ -143,20 +93,3 @@ type ProjectTypeMap = { * @description Planning project types */ export type ProjectType = ProjectTypeMap[keyof ProjectTypeMap]; - -type VehicleParkingKeys = keyof typeof VehicleParking; - -type GenericVehicleParking = { - value: TKey; - description: (typeof VehicleParking)[TKey]; -}; - -type VehicleParkingMap = { - [K in VehicleParkingKeys]: GenericVehicleParking; -}; - -/** - * @id #VehicleParking - * @description Vehicle parking types - */ -export type VehicleParking = VehicleParkingMap[keyof VehicleParkingMap]; From e3a31d315f5d5e0f0cb07403ed5d1b93ee8d4b7e Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Thu, 14 Mar 2024 13:13:56 +0100 Subject: [PATCH 2/3] add london data hub types for full householder pp --- examples/data/ldcP.ts | 8 +- examples/data/planningPermission.ts | 32 +- ...dLawfulDevelopmentCertificateProposed.json | 8 +- examples/validPlanningPermission.json | 32 +- schema/schema.json | 758 ++++++++++++------ types/enums/Nature.ts | 42 + types/schema/data/Property.ts | 13 +- types/schema/data/Proposal.ts | 115 ++- 8 files changed, 682 insertions(+), 326 deletions(-) create mode 100644 types/enums/Nature.ts diff --git a/examples/data/ldcP.ts b/examples/data/ldcP.ts index 7d6079cb..00fa1a56 100644 --- a/examples/data/ldcP.ts +++ b/examples/data/ldcP.ts @@ -239,11 +239,9 @@ export const validLDCP: Schema = { }, }, date: {}, - details: { - extend: { - area: { - squareMetres: 24, - }, + extend: { + area: { + squareMetres: 24, }, }, }, diff --git a/examples/data/planningPermission.ts b/examples/data/planningPermission.ts index f8263c58..a3072736 100644 --- a/examples/data/planningPermission.ts +++ b/examples/data/planningPermission.ts @@ -216,6 +216,12 @@ export const validPlanningPermission: Schema = { value: 'residential.dwelling.house.terrace', description: 'Terrace', }, + titleNumber: { + known: 'No', + }, + EPC: { + known: 'No', + }, parking: { cars: { count: 1, @@ -260,21 +266,19 @@ export const validPlanningPermission: Schema = { start: '2024-05-01', completion: '2024-05-02', }, - details: { - extend: { - area: { - squareMetres: 45, - }, + extend: { + area: { + squareMetres: 45, }, - parking: { - cars: { - count: 1, - difference: 0, - }, - cycles: { - count: 2, - difference: 0, - }, + }, + parking: { + cars: { + count: 1, + difference: 0, + }, + cycles: { + count: 2, + difference: 0, }, }, }, diff --git a/examples/validLawfulDevelopmentCertificateProposed.json b/examples/validLawfulDevelopmentCertificateProposed.json index e6b3a742..7e012a41 100644 --- a/examples/validLawfulDevelopmentCertificateProposed.json +++ b/examples/validLawfulDevelopmentCertificateProposed.json @@ -304,11 +304,9 @@ } }, "date": {}, - "details": { - "extend": { - "area": { - "squareMetres": 24 - } + "extend": { + "area": { + "squareMetres": 24 } } } diff --git a/examples/validPlanningPermission.json b/examples/validPlanningPermission.json index 97db03b6..a2088844 100644 --- a/examples/validPlanningPermission.json +++ b/examples/validPlanningPermission.json @@ -229,6 +229,12 @@ "value": "residential.dwelling.house.terrace", "description": "Terrace" }, + "titleNumber": { + "known": "No" + }, + "EPC": { + "known": "No" + }, "parking": { "cars": { "count": 1 @@ -287,21 +293,19 @@ "start": "2024-05-01", "completion": "2024-05-02" }, - "details": { - "extend": { - "area": { - "squareMetres": 45 - } + "extend": { + "area": { + "squareMetres": 45 + } + }, + "parking": { + "cars": { + "count": 1, + "difference": 0 }, - "parking": { - "cars": { - "count": 1, - "difference": 0 - }, - "cycles": { - "count": 2, - "difference": 0 - } + "cycles": { + "count": 2, + "difference": 0 } } } diff --git a/schema/schema.json b/schema/schema.json index df1797c5..e7abfc4c 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -1591,9 +1591,32 @@ ], "type": "object" }, - "BaseDetails": { + "BaseProposal": { "additionalProperties": false, "properties": { + "boundary": { + "additionalProperties": false, + "description": "Location plan boundary proposed by the user, commonly referred to as the red line boundary", + "properties": { + "area": { + "$ref": "#/definitions/Area" + }, + "site": { + "$ref": "#/definitions/GeoJSON" + } + }, + "required": [ + "site", + "area" + ], + "type": "object" + }, + "date": { + "$ref": "#/definitions/ProposalDates" + }, + "description": { + "type": "string" + }, "extend": { "additionalProperties": false, "properties": { @@ -1607,7 +1630,8 @@ "type": "object" }, "materials": { - "$ref": "#/definitions/Materials" + "$ref": "#/definitions/Materials", + "description": "Proposed materials, if applicable to projectType" }, "new": { "additionalProperties": false, @@ -1635,8 +1659,18 @@ "area" ], "type": "object" + }, + "projectType": { + "items": { + "$ref": "#/definitions/ProjectType" + }, + "type": "array" } }, + "required": [ + "projectType", + "description" + ], "type": "object" }, "CalculateMetadata": { @@ -3578,70 +3612,82 @@ ], "type": "object" }, - "LondonDetails": { - "$id": "#LondonDetails", + "LondonProperty": { + "$id": "#LondonProperty", "additionalProperties": false, - "description": "Proposal details for project sites within the Greater London Authority (GLA) area", + "description": "Property details for sites within the Greater London Authority (GLA) area", "properties": { - "extend": { + "EPC": { "additionalProperties": false, "properties": { - "area": { - "$ref": "#/definitions/Area" + "known": { + "enum": [ + "Yes", + "Yes, but only some of the properties have one", + "The property does not have one", + "No" + ], + "type": "string" + }, + "number": { + "type": "string" } }, "required": [ - "area" + "known" ], + "title": "Energy Performance Certificate", "type": "object" }, - "materials": { - "$ref": "#/definitions/Materials" + "address": { + "anyOf": [ + { + "$ref": "#/definitions/ProposedAddress" + }, + { + "$ref": "#/definitions/OSAddress" + } + ] }, - "new": { + "boundary": { "additionalProperties": false, + "description": "HM Land Registry Index polygon for this property, commonly referred to as the blue line boundary, sourced from planning.data.gov.uk/dataset/title-boundary", "properties": { "area": { "$ref": "#/definitions/Area" }, - "count": { - "additionalProperties": false, - "properties": { - "bathrooms": { - "type": "number" - }, - "bedrooms": { - "type": "number" - }, - "dwellings": { - "type": "number" - } - }, - "type": "object" + "site": { + "$ref": "#/definitions/GeoJSON" } }, "required": [ + "site", "area" ], "type": "object" }, + "localAuthorityDistrict": { + "description": "Current and historic UK Local Authority Districts that contain this address sourced from planning.data.gov.uk/dataset/local-authority-district", + "items": { + "type": "string" + }, + "type": "array" + }, + "materials": { + "$ref": "#/definitions/Materials" + }, "parking": { "additionalProperties": false, - "description": "Proposed parking spaces", "properties": { "buses": { "additionalProperties": false, "properties": { "count": { "type": "number" - }, - "difference": { - "type": "number" } }, "required": [ - "count", - "difference" + "count" ], "type": "object" }, @@ -3650,14 +3696,10 @@ "properties": { "count": { "type": "number" - }, - "difference": { - "type": "number" } }, "required": [ - "count", - "difference" + "count" ], "type": "object" }, @@ -3666,14 +3708,10 @@ "properties": { "count": { "type": "number" - }, - "difference": { - "type": "number" } }, "required": [ - "count", - "difference" + "count" ], "type": "object" }, @@ -3682,14 +3720,10 @@ "properties": { "count": { "type": "number" - }, - "difference": { - "type": "number" } }, "required": [ - "count", - "difference" + "count" ], "type": "object" }, @@ -3698,14 +3732,10 @@ "properties": { "count": { "type": "number" - }, - "difference": { - "type": "number" } }, "required": [ - "count", - "difference" + "count" ], "type": "object" }, @@ -3714,14 +3744,10 @@ "properties": { "count": { "type": "number" - }, - "difference": { - "type": "number" } }, "required": [ - "count", - "difference" + "count" ], "type": "object" }, @@ -3733,14 +3759,10 @@ "properties": { "count": { "type": "number" - }, - "difference": { - "type": "number" } }, "required": [ - "count", - "difference" + "count" ], "type": "object" } @@ -3755,14 +3777,10 @@ "properties": { "count": { "type": "number" - }, - "difference": { - "type": "number" } }, "required": [ - "count", - "difference" + "count" ], "type": "object" }, @@ -3771,36 +3789,86 @@ "properties": { "count": { "type": "number" + } + }, + "required": [ + "count" + ], + "type": "object" + } + }, + "type": "object" + }, + "planning": { + "additionalProperties": false, + "description": "Planning constraints and policies that intersect with this site and may impact or restrict development", + "properties": { + "conditions": { + "items": { + "$ref": "#/definitions/PlanningConstraint" + }, + "type": "array" + }, + "designations": { + "items": { + "$ref": "#/definitions/PlanningDesignation" + }, + "type": "array" + }, + "guidance": { + "items": { + "$ref": "#/definitions/PlanningConstraint" + }, + "type": "array" + }, + "plans": { + "additionalProperties": false, + "properties": { + "local": { + "items": { + "$ref": "#/definitions/PlanningConstraint" + }, + "type": "array" }, - "difference": { - "type": "number" + "neighbourhood": { + "items": { + "$ref": "#/definitions/PlanningConstraint" + }, + "type": "array" } }, "required": [ - "count", - "difference" + "local", + "neighbourhood" ], "type": "object" + }, + "sources": { + "description": "A list of open data requests or websites that explain how these constraints were sourced", + "items": { + "$ref": "#/definitions/URL" + }, + "type": "array" } }, + "required": [ + "sources" + ], "type": "object" - } - }, - "type": "object" - }, - "LondonProperty": { - "$id": "#LondonProperty", - "additionalProperties": false, - "description": "Property details for sites within the Greater London Authority (GLA) area", - "properties": { - "EPC": { + }, + "region": { + "const": "London", + "type": "string" + }, + "socialLandlord": { + "type": "boolean" + }, + "titleNumber": { "additionalProperties": false, "properties": { "known": { "enum": [ "Yes", - "Yes, but only some of the properties have one", - "The property does not have one", "No" ], "type": "string" @@ -3812,59 +3880,272 @@ "required": [ "known" ], - "title": "Energy Performance Certificate", "type": "object" }, - "address": { - "anyOf": [ - { - "$ref": "#/definitions/ProposedAddress" + "type": { + "$ref": "#/definitions/PropertyType" + } + }, + "required": [ + "EPC", + "address", + "localAuthorityDistrict", + "region", + "titleNumber", + "type" + ], + "type": "object" + }, + "LondonProposal": { + "$id": "#LondonProposal", + "additionalProperties": false, + "description": "Proposal details for project sites within the Greater London Authority (GLA) area", + "properties": { + "boundary": { + "additionalProperties": false, + "description": "Location plan boundary proposed by the user, commonly referred to as the red line boundary", + "properties": { + "area": { + "$ref": "#/definitions/Area" }, - { - "$ref": "#/definitions/OSAddress" + "site": { + "$ref": "#/definitions/GeoJSON" + } + }, + "required": [ + "site", + "area" + ], + "type": "object" + }, + "charging": { + "additionalProperties": false, + "description": "Electric vehicle charing points", + "properties": { + "active": { + "additionalProperties": false, + "properties": { + "count": { + "type": "number" + } + }, + "required": [ + "count" + ], + "type": "object" + }, + "passive": { + "additionalProperties": false, + "properties": { + "count": { + "type": "number" + } + }, + "required": [ + "count" + ], + "type": "object" + } + }, + "required": [ + "active", + "passive" + ], + "type": "object" + }, + "cost": { + "additionalProperties": false, + "description": "Project cost", + "properties": { + "projected": { + "enum": [ + "2m", + "2mTo100m", + "100m" + ], + "type": "string" + } + }, + "required": [ + "projected" + ], + "type": "object" + }, + "date": { + "$ref": "#/definitions/ProposalDates" + }, + "description": { + "type": "string" + }, + "extend": { + "additionalProperties": false, + "properties": { + "area": { + "$ref": "#/definitions/Area" + } + }, + "required": [ + "area" + ], + "type": "object" + }, + "materials": { + "$ref": "#/definitions/Materials", + "description": "Proposed materials, if applicable to projectType" + }, + "nature": { + "additionalProperties": false, + "properties": { + "openSpaces": { + "items": { + "additionalProperties": false, + "properties": { + "access": { + "enum": [ + "restricted", + "unrestricted" + ], + "type": "string" + }, + "area": { + "additionalProperties": false, + "properties": { + "hectares": { + "type": "number" + } + }, + "required": [ + "hectares" + ], + "type": "object" + }, + "description": { + "type": "string" + }, + "impact": { + "enum": [ + "loss", + "gain", + "change" + ], + "type": "string" + }, + "swap": { + "description": "Whether the open space change involves a land swap", + "type": "boolean" + } + }, + "required": [ + "impact", + "description", + "access", + "area", + "swap" + ], + "type": "object" + }, + "type": "array" + }, + "protectedSpaces": { + "items": { + "additionalProperties": false, + "properties": { + "access": { + "enum": [ + "restricted", + "unrestricted" + ], + "type": "string" + }, + "area": { + "additionalProperties": false, + "properties": { + "hectares": { + "type": "number" + } + }, + "required": [ + "hectares" + ], + "type": "object" + }, + "description": { + "type": "string" + }, + "impact": { + "enum": [ + "loss", + "gain", + "change" + ], + "type": "string" + } + }, + "required": [ + "impact", + "description", + "access", + "area" + ], + "type": "object" + }, + "type": "array" } - ] + }, + "type": "object" }, - "boundary": { + "new": { "additionalProperties": false, - "description": "HM Land Registry Index polygon for this property, commonly referred to as the blue line boundary, sourced from planning.data.gov.uk/dataset/title-boundary", "properties": { "area": { "$ref": "#/definitions/Area" }, - "site": { - "$ref": "#/definitions/GeoJSON" + "count": { + "additionalProperties": false, + "properties": { + "bathrooms": { + "type": "number" + }, + "bedrooms": { + "type": "number" + }, + "dwellings": { + "type": "number" + } + }, + "type": "object" } }, "required": [ - "site", "area" ], "type": "object" }, - "details": { - "$ref": "#/definitions/PropertyDetails" + "newBuildings": { + "$ref": "#/definitions/NewBuildingsOrStoreys", + "description": "Creating new buildings" }, - "localAuthorityDistrict": { - "description": "Current and historic UK Local Authority Districts that contain this address sourced from planning.data.gov.uk/dataset/local-authority-district", - "items": { - "type": "string" - }, - "type": "array" + "newStoreys": { + "$ref": "#/definitions/NewBuildingsOrStoreys", + "description": "Increasing the height of existing buildings" }, "parking": { "additionalProperties": false, - "description": "Existing parking spaces", + "description": "Proposed parking spaces", "properties": { "buses": { "additionalProperties": false, "properties": { "count": { "type": "number" + }, + "difference": { + "type": "number" } }, "required": [ - "count" + "count", + "difference" ], "type": "object" }, @@ -3873,10 +4154,14 @@ "properties": { "count": { "type": "number" + }, + "difference": { + "type": "number" } }, "required": [ - "count" + "count", + "difference" ], "type": "object" }, @@ -3885,10 +4170,14 @@ "properties": { "count": { "type": "number" + }, + "difference": { + "type": "number" } }, "required": [ - "count" + "count", + "difference" ], "type": "object" }, @@ -3897,10 +4186,14 @@ "properties": { "count": { "type": "number" + }, + "difference": { + "type": "number" } }, "required": [ - "count" + "count", + "difference" ], "type": "object" }, @@ -3909,10 +4202,14 @@ "properties": { "count": { "type": "number" + }, + "difference": { + "type": "number" } }, "required": [ - "count" + "count", + "difference" ], "type": "object" }, @@ -3921,10 +4218,14 @@ "properties": { "count": { "type": "number" + }, + "difference": { + "type": "number" } }, "required": [ - "count" + "count", + "difference" ], "type": "object" }, @@ -3936,10 +4237,14 @@ "properties": { "count": { "type": "number" + }, + "difference": { + "type": "number" } }, "required": [ - "count" + "count", + "difference" ], "type": "object" } @@ -3954,10 +4259,14 @@ "properties": { "count": { "type": "number" + }, + "difference": { + "type": "number" } }, "required": [ - "count" + "count", + "difference" ], "type": "object" }, @@ -3966,110 +4275,66 @@ "properties": { "count": { "type": "number" + }, + "difference": { + "type": "number" } }, "required": [ - "count" + "count", + "difference" ], "type": "object" } }, "type": "object" }, - "planning": { + "projectType": { + "items": { + "$ref": "#/definitions/ProjectType" + }, + "type": "array" + }, + "schemeName": { + "type": "string" + }, + "water": { "additionalProperties": false, - "description": "Planning constraints and policies that intersect with this site and may impact or restrict development", + "description": "Water management", "properties": { - "conditions": { - "items": { - "$ref": "#/definitions/PlanningConstraint" - }, - "type": "array" - }, - "designations": { - "items": { - "$ref": "#/definitions/PlanningDesignation" - }, - "type": "array" + "grey": { + "description": "Whether the proposal includes grey water re-use", + "type": "boolean" }, - "guidance": { - "items": { - "$ref": "#/definitions/PlanningConstraint" - }, - "type": "array" + "rain": { + "description": "Whether the proposal includes rain water harvesting", + "type": "boolean" }, - "plans": { + "usage": { "additionalProperties": false, + "description": "Internal residential water usage", "properties": { - "local": { - "items": { - "$ref": "#/definitions/PlanningConstraint" - }, - "type": "array" - }, - "neighbourhood": { - "items": { - "$ref": "#/definitions/PlanningConstraint" - }, - "type": "array" + "litresPerPersonPerDay": { + "type": "number" } }, "required": [ - "local", - "neighbourhood" + "litresPerPersonPerDay" ], "type": "object" - }, - "sources": { - "description": "A list of open data requests or websites that explain how these constraints were sourced", - "items": { - "$ref": "#/definitions/URL" - }, - "type": "array" - } - }, - "required": [ - "sources" - ], - "type": "object" - }, - "region": { - "const": "London", - "type": "string" - }, - "socialLandlord": { - "type": "boolean" - }, - "titleNumber": { - "additionalProperties": false, - "properties": { - "known": { - "enum": [ - "Yes", - "No" - ], - "type": "string" - }, - "number": { - "type": "string" } }, "required": [ - "known" + "usage", + "rain", + "grey" ], "type": "object" - }, - "type": { - "$ref": "#/definitions/PropertyType" } }, "required": [ - "EPC", - "address", - "localAuthorityDistrict", - "region", - "titleNumber", - "type" + "description", + "projectType" ], "type": "object" }, @@ -4202,6 +4467,48 @@ ], "type": "object" }, + "NewBuildingsOrStoreys": { + "$id": "#NewBuildingsOrStoreys", + "additionalProperties": false, + "description": "Details about creating new buildings or increasing the height of existing buildings", + "properties": { + "buildings": { + "items": { + "additionalProperties": false, + "properties": { + "height": { + "additionalProperties": false, + "properties": { + "metres": { + "type": "number" + } + }, + "required": [ + "metres" + ], + "type": "object" + }, + "storeys": { + "type": "number" + } + }, + "required": [ + "height", + "storeys" + ], + "type": "object" + }, + "type": "array" + }, + "count": { + "type": "number" + } + }, + "required": [ + "count" + ], + "type": "object" + }, "OSAddress": { "$id": "#OSAddress", "additionalProperties": false, @@ -12506,17 +12813,6 @@ ], "description": "Information about the site where the works will happen" }, - "PropertyDetails": { - "$id": "#PropertyDetails", - "additionalProperties": false, - "description": "Details about the property as it currently exists", - "properties": { - "materials": { - "$ref": "#/definitions/Materials" - } - }, - "type": "object" - }, "PropertyType": { "$id": "#PropertyType", "anyOf": [ @@ -20877,47 +21173,15 @@ }, "Proposal": { "$id": "#Proposal", - "additionalProperties": false, - "description": "Information about the proposed works and any changes to the property", - "properties": { - "boundary": { - "additionalProperties": false, - "description": "Location plan boundary proposed by the user, commonly referred to as the red line boundary", - "properties": { - "area": { - "$ref": "#/definitions/Area" - }, - "site": { - "$ref": "#/definitions/GeoJSON" - } - }, - "required": [ - "site", - "area" - ], - "type": "object" - }, - "date": { - "$ref": "#/definitions/ProposalDates" - }, - "description": { - "type": "string" - }, - "details": { - "$ref": "#/definitions/ProposalDetails" + "anyOf": [ + { + "$ref": "#/definitions/BaseProposal" }, - "projectType": { - "items": { - "$ref": "#/definitions/ProjectType" - }, - "type": "array" + { + "$ref": "#/definitions/LondonProposal" } - }, - "required": [ - "projectType", - "description" ], - "type": "object" + "description": "Information about the proposed works and any changes to the property" }, "ProposalDates": { "$id": "#ProposalDates", @@ -20933,18 +21197,6 @@ }, "type": "object" }, - "ProposalDetails": { - "$id": "#ProposalDetails", - "anyOf": [ - { - "$ref": "#/definitions/BaseDetails" - }, - { - "$ref": "#/definitions/LondonDetails" - } - ], - "description": "Details about the changes being proposed" - }, "ProposedAddress": { "$id": "#ProposedAddress", "additionalProperties": false, @@ -21756,9 +22008,6 @@ ], "type": "object" }, - "details": { - "$ref": "#/definitions/PropertyDetails" - }, "localAuthorityDistrict": { "description": "Current and historic UK Local Authority Districts that contain this address sourced from planning.data.gov.uk/dataset/local-authority-district", "items": { @@ -21766,6 +22015,9 @@ }, "type": "array" }, + "materials": { + "$ref": "#/definitions/Materials" + }, "planning": { "additionalProperties": false, "description": "Planning constraints and policies that intersect with this site and may impact or restrict development", diff --git a/types/enums/Nature.ts b/types/enums/Nature.ts new file mode 100644 index 00000000..479c29af --- /dev/null +++ b/types/enums/Nature.ts @@ -0,0 +1,42 @@ +/** + * Values of data.proposal.nature.openSpace.type + */ +export const OpenSpaceTypes = { + park: 'Parks and gardens', + natural: 'Natural and semi-natural', + greenCorridor: 'Green corridors', + sport: 'Outdoor sports facilities', + amenity: 'Amenity', + children: 'Provision for children and young people', + allotment: 'Allotments, community gardens and city farms', + burial: 'Cemeteries, churchyards and other burial grounds', + fringe: 'Countryside in urban fringe areas', + civic: 'Civic spaces', + brownfield: 'Brownfield land', + nonResidential: 'Non-residential institution grounds or gardens', + residential: 'Residential gardens', +}; + +/** + * Values of data.proposal.nature.openSpace.designation + */ +export const OpenSpaceDesignations = { + greenBelt: 'Green Belt', + metropolitan: 'Metropolitan Open Land', + local: 'Local Open Spaces', + other: 'Other designation', + none: 'Not designated', +}; + +/** + * Values of data.proposal.nature.protectedSpace.designation + */ +export const ProtectedSpaceDesignations = { + SSSI: 'Sites of Special Scientific Interest', + localReserve: 'Local Nature Reserve', + metropolitan: 'Site of Metropolitan Importance', + boroughGradeOne: 'Site of Borough Grade 1 Importance', + boroughGradeTwo: 'Site of Borough Grade 2 Importance', + local: 'Site of Local Importance', + none: 'Not designated', +}; diff --git a/types/schema/data/Property.ts b/types/schema/data/Property.ts index 12f2ff0c..e5d109d7 100644 --- a/types/schema/data/Property.ts +++ b/types/schema/data/Property.ts @@ -60,16 +60,8 @@ export interface UKProperty { neighbourhood: PlanningConstraint[]; }; }; - details?: PropertyDetails; -} - -/** - * @id #PropertyDetails - * @description Details about the property as it currently exists - */ -export type PropertyDetails = { materials?: Materials; -}; +} /** * @id #LondonProperty @@ -93,9 +85,6 @@ export interface LondonProperty extends UKProperty { number?: string; }; socialLandlord?: boolean; - /** - * @description Existing parking spaces - */ parking?: { cars?: ExistingCount; vans?: ExistingCount; diff --git a/types/schema/data/Proposal.ts b/types/schema/data/Proposal.ts index 7d3e740d..7a3cb159 100644 --- a/types/schema/data/Proposal.ts +++ b/types/schema/data/Proposal.ts @@ -7,7 +7,9 @@ import {Materials} from './shared'; * @id #Proposal * @description Information about the proposed works and any changes to the property */ -export interface Proposal { +export type Proposal = BaseProposal | LondonProposal; + +export interface BaseProposal { projectType: ProjectType[]; description: string; /** @@ -18,25 +20,10 @@ export interface Proposal { area: Area; }; date?: ProposalDates; - details?: ProposalDetails; -} - -/** - * @id #ProposalDates - * @description When the proposed works will start and be completed by, not required for all application types - */ -export interface ProposalDates { - start?: Date; - completion?: Date; -} - -/** - * @id #ProposalDetails - * @description Details about the changes being proposed - */ -export type ProposalDetails = BaseDetails | LondonDetails; - -export interface BaseDetails { + /** + * @description Proposed materials, if applicable to projectType + */ + materials?: Materials; extend?: { area: Area; }; @@ -48,14 +35,14 @@ export interface BaseDetails { dwellings?: number; }; }; - materials?: Materials; } /** - * @id #LondonDetails + * @id #LondonProposal * @description Proposal details for project sites within the Greater London Authority (GLA) area */ -export interface LondonDetails extends BaseDetails { +export interface LondonProposal extends BaseProposal { + schemeName?: string; /** * @description Proposed parking spaces */ @@ -70,6 +57,67 @@ export interface LondonDetails extends BaseDetails { offStreet?: {residential: ProposedCount}; other?: ProposedCount; }; + /** + * @description Creating new buildings + */ + newBuildings?: NewBuildingsOrStoreys; + /** + * @description Increasing the height of existing buildings + */ + newStoreys?: NewBuildingsOrStoreys; + /** + * @description Project cost + */ + cost?: { + projected: '2m' | '2mTo100m' | '100m'; + }; + /** + * @description Electric vehicle charing points + */ + charging?: { + active: {count: number}; + passive: {count: number}; + }; + /** + * @descrption Changes that result in the loss, gain, or change of use of natural spaces + */ + nature?: { + openSpaces?: { + impact: 'loss' | 'gain' | 'change'; + description: string; + // @todo add type & designation from enums/Nature + access: 'restricted' | 'unrestricted'; + area: {hectares: number}; + /** + * @description Whether the open space change involves a land swap + */ + swap: boolean; + }[]; + protectedSpaces?: { + impact: 'loss' | 'gain' | 'change'; + description: string; + // @todo add designation from enums/Nature + access: 'restricted' | 'unrestricted'; + area: {hectares: number}; + }[]; + }; + /** + * @description Water management + */ + water?: { + /** + * @description Internal residential water usage + */ + usage: {litresPerPersonPerDay: number}; + /** + * @description Whether the proposal includes rain water harvesting + */ + rain: boolean; + /** + * @description Whether the proposal includes grey water re-use + */ + grey: boolean; + }; } type ProposedCount = { @@ -77,6 +125,27 @@ type ProposedCount = { difference: number; }; +/** + * @id #NewBuildingsOrStoreys + * @description Details about creating new buildings or increasing the height of existing buildings + */ +export interface NewBuildingsOrStoreys { + count: number; + buildings?: { + height: {metres: number}; + storeys: number; + }[]; +} + +/** + * @id #ProposalDates + * @description When the proposed works will start and be completed by, not required for all application types + */ +export interface ProposalDates { + start?: Date; + completion?: Date; +} + type ProjectTypeKeys = keyof typeof ProjectTypes; type GenericProjectType = { From 689225bf6e407000646ed329735892334c97ff4d Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Wed, 27 Mar 2024 10:22:33 +0100 Subject: [PATCH 3/3] add Nature enum types --- schema/schema.json | 481 +++++++++++++++++++++++++++++++++ types/schema/data/Applicant.ts | 4 +- types/schema/data/Proposal.ts | 67 ++++- 3 files changed, 547 insertions(+), 5 deletions(-) diff --git a/schema/schema.json b/schema/schema.json index e7abfc4c..890000f8 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -3995,6 +3995,7 @@ }, "nature": { "additionalProperties": false, + "description": "Changes that result in the loss, gain, or change of use of natural spaces", "properties": { "openSpaces": { "items": { @@ -4022,6 +4023,9 @@ "description": { "type": "string" }, + "designation": { + "$ref": "#/definitions/OpenSpaceDesignation" + }, "impact": { "enum": [ "loss", @@ -4033,11 +4037,16 @@ "swap": { "description": "Whether the open space change involves a land swap", "type": "boolean" + }, + "type": { + "$ref": "#/definitions/OpenSpaceType" } }, "required": [ "impact", "description", + "type", + "designation", "access", "area", "swap" @@ -4072,6 +4081,9 @@ "description": { "type": "string" }, + "designation": { + "$ref": "#/definitions/ProtectedSpaceDesgination" + }, "impact": { "enum": [ "loss", @@ -4084,6 +4096,7 @@ "required": [ "impact", "description", + "designation", "access", "area" ], @@ -4583,6 +4596,342 @@ ], "type": "object" }, + "OpenSpaceDesignation": { + "$id": "#OpenSpaceDesignation", + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Green Belt", + "type": "string" + }, + "value": { + "const": "greenBelt", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Metropolitan Open Land", + "type": "string" + }, + "value": { + "const": "metropolitan", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Local Open Spaces", + "type": "string" + }, + "value": { + "const": "local", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Other designation", + "type": "string" + }, + "value": { + "const": "other", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Not designated", + "type": "string" + }, + "value": { + "const": "none", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + } + ], + "description": "Designations of natural open spaces" + }, + "OpenSpaceType": { + "$id": "#OpenSpaceType", + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Parks and gardens", + "type": "string" + }, + "value": { + "const": "park", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Natural and semi-natural", + "type": "string" + }, + "value": { + "const": "natural", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Green corridors", + "type": "string" + }, + "value": { + "const": "greenCorridor", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Outdoor sports facilities", + "type": "string" + }, + "value": { + "const": "sport", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Amenity", + "type": "string" + }, + "value": { + "const": "amenity", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Provision for children and young people", + "type": "string" + }, + "value": { + "const": "children", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Allotments, community gardens and city farms", + "type": "string" + }, + "value": { + "const": "allotment", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Cemeteries, churchyards and other burial grounds", + "type": "string" + }, + "value": { + "const": "burial", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Countryside in urban fringe areas", + "type": "string" + }, + "value": { + "const": "fringe", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Civic spaces", + "type": "string" + }, + "value": { + "const": "civic", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Brownfield land", + "type": "string" + }, + "value": { + "const": "brownfield", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Non-residential institution grounds or gardens", + "type": "string" + }, + "value": { + "const": "nonResidential", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Residential gardens", + "type": "string" + }, + "value": { + "const": "residential", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + } + ], + "description": "Types of natural open spaces" + }, "Ownership": { "$id": "#Ownership", "additionalProperties": false, @@ -21236,6 +21585,138 @@ ], "type": "object" }, + "ProtectedSpaceDesgination": { + "$id": "#ProtectedSpaceDesignation", + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Sites of Special Scientific Interest", + "type": "string" + }, + "value": { + "const": "SSSI", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Local Nature Reserve", + "type": "string" + }, + "value": { + "const": "localReserve", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Site of Metropolitan Importance", + "type": "string" + }, + "value": { + "const": "metropolitan", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Site of Borough Grade 1 Importance", + "type": "string" + }, + "value": { + "const": "boroughGradeOne", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Site of Borough Grade 2 Importance", + "type": "string" + }, + "value": { + "const": "boroughGradeTwo", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Site of Local Importance", + "type": "string" + }, + "value": { + "const": "local", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Not designated", + "type": "string" + }, + "value": { + "const": "none", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + } + ], + "description": "Designations of natural protected spaces" + }, "QuestionAndResponses": { "additionalProperties": false, "properties": { diff --git a/types/schema/data/Applicant.ts b/types/schema/data/Applicant.ts index 052a3642..8838ce48 100644 --- a/types/schema/data/Applicant.ts +++ b/types/schema/data/Applicant.ts @@ -18,9 +18,9 @@ export interface BaseApplicant { first: string; last: string; }; - email: Email; // @todo only require for BaseApplicant OR Agent, not both + email: Email; phone: { - primary: string; // @todo only require for BaseApplicant OR Agent, not both + primary: string; }; company?: { name: string; diff --git a/types/schema/data/Proposal.ts b/types/schema/data/Proposal.ts index 7a3cb159..ee0e136c 100644 --- a/types/schema/data/Proposal.ts +++ b/types/schema/data/Proposal.ts @@ -1,4 +1,9 @@ import {GeoJSON} from 'geojson'; +import { + OpenSpaceTypes, + OpenSpaceDesignations, + ProtectedSpaceDesignations, +} from '../../enums/Nature'; import {ProjectTypes} from '../../enums/ProjectTypes'; import {Area, Date} from '../../utils'; import {Materials} from './shared'; @@ -79,13 +84,14 @@ export interface LondonProposal extends BaseProposal { passive: {count: number}; }; /** - * @descrption Changes that result in the loss, gain, or change of use of natural spaces + * @description Changes that result in the loss, gain, or change of use of natural spaces */ nature?: { openSpaces?: { impact: 'loss' | 'gain' | 'change'; description: string; - // @todo add type & designation from enums/Nature + type: OpenSpaceType; + designation: OpenSpaceDesignation; access: 'restricted' | 'unrestricted'; area: {hectares: number}; /** @@ -96,7 +102,7 @@ export interface LondonProposal extends BaseProposal { protectedSpaces?: { impact: 'loss' | 'gain' | 'change'; description: string; - // @todo add designation from enums/Nature + designation: ProtectedSpaceDesgination; access: 'restricted' | 'unrestricted'; area: {hectares: number}; }[]; @@ -162,3 +168,58 @@ type ProjectTypeMap = { * @description Planning project types */ export type ProjectType = ProjectTypeMap[keyof ProjectTypeMap]; + +type OpenSpaceTypeKeys = keyof typeof OpenSpaceTypes; + +type GenericOpenSpaceType = { + value: TKey; + description: (typeof OpenSpaceTypes)[TKey]; +}; + +type OpenSpaceTypeMap = { + [K in OpenSpaceTypeKeys]: GenericOpenSpaceType; +}; + +/** + * @id #OpenSpaceType + * @description Types of natural open spaces + */ +export type OpenSpaceType = OpenSpaceTypeMap[keyof OpenSpaceTypeMap]; + +type OpenSpaceDesignationKeys = keyof typeof OpenSpaceDesignations; + +type GenericOpenSpaceDesignation = { + value: TKey; + description: (typeof OpenSpaceDesignations)[TKey]; +}; + +type OpenSpaceDesignationMap = { + [K in OpenSpaceDesignationKeys]: GenericOpenSpaceDesignation; +}; + +/** + * @id #OpenSpaceDesignation + * @description Designations of natural open spaces + */ +export type OpenSpaceDesignation = + OpenSpaceDesignationMap[keyof OpenSpaceDesignationMap]; + +type ProtectedSpaceDesignationKeys = keyof typeof ProtectedSpaceDesignations; + +type GenericProtectedSpaceDesignation< + TKey extends ProtectedSpaceDesignationKeys, +> = { + value: TKey; + description: (typeof ProtectedSpaceDesignations)[TKey]; +}; + +type ProtectedSpaceDesignationMap = { + [K in ProtectedSpaceDesignationKeys]: GenericProtectedSpaceDesignation; +}; + +/** + * @id #ProtectedSpaceDesignation + * @description Designations of natural protected spaces + */ +export type ProtectedSpaceDesgination = + ProtectedSpaceDesignationMap[keyof ProtectedSpaceDesignationMap];