diff --git a/examples/data/ldcE.ts b/examples/data/ldcE.ts index 33367068..bcab3b2e 100644 --- a/examples/data/ldcE.ts +++ b/examples/data/ldcE.ts @@ -166,7 +166,10 @@ export const validLDCE: Schema = { name: 'Whole District excluding the Town of Chesham - Poultry production.', description: 'Bucks County Council Town and Country Planning Act 1947 Town and Country Planning General Development Order 1950. Re Whole District excluding the Town of Chesham. In relation to poultry production.', - source: 'https://www.planning.data.gov.uk/entity/7010002192', + source: { + text: 'Planning Data', + url: 'https://www.planning.data.gov.uk/entity/7010002192', + }, }, ], }, @@ -238,7 +241,10 @@ export const validLDCE: Schema = { entities: [ { name: 'Chilterns', - source: 'https://www.planning.data.gov.uk/entity/1000005', + source: { + text: 'Planning Data', + url: 'https://www.planning.data.gov.uk/entity/1000005', + }, }, ], }, diff --git a/examples/data/priorApproval.ts b/examples/data/priorApproval.ts index 4d4eb1bc..dc27c4db 100644 --- a/examples/data/priorApproval.ts +++ b/examples/data/priorApproval.ts @@ -113,31 +113,46 @@ export const validPriorApproval: Schema = { name: 'Central Activities Zone', description: 'Change of use from offices to dwelling houses is restricted', - source: 'https://www.planning.data.gov.uk/entity/7010000942', + source: { + text: 'Planning Data', + url: 'https://www.planning.data.gov.uk/entity/7010000942', + }, }, { name: 'Central Activities Zone', description: 'Demolition of commercial buildings and construction of new dwellinghouses is restricted', - source: 'https://www.planning.data.gov.uk/entity/7010000944', + source: { + text: 'Planning Data', + url: 'https://www.planning.data.gov.uk/entity/7010000944', + }, }, { name: 'Bankside and Borough District Town Centre', description: 'Demolition of commercial buildings and construction of new dwellinghouses is restricted', - source: 'https://www.planning.data.gov.uk/entity/7010001042', + source: { + text: 'Planning Data', + url: 'https://www.planning.data.gov.uk/entity/7010001042', + }, }, { name: 'Central Activities Zone', description: 'Change of use from Class E to residential is restricted', - source: 'https://www.planning.data.gov.uk/entity/7010001055', + source: { + text: 'Planning Data', + url: 'https://www.planning.data.gov.uk/entity/7010001055', + }, }, { name: 'Bankside and Borough District Town Centre', description: 'Change of use from Class E to residential is restricted', - source: 'https://www.planning.data.gov.uk/entity/7010001153', + source: { + text: 'Planning Data', + url: 'https://www.planning.data.gov.uk/entity/7010001153', + }, }, ], }, diff --git a/schema/schema.json b/schema/schema.json index f882f870..a41278c2 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -1563,6 +1563,72 @@ "BaseDetails": { "additionalProperties": false, "properties": { + "access": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "public": { + "description": "Is the property accessible from public land?", + "type": "boolean" + }, + "type": { + "items": { + "enum": [ + "vehicle", + "parking", + "newRoad", + "rightsOfWay.newPublic", + "rightsOfWay.changeOfUse" + ], + "type": "string" + }, + "maxItems": 1, + "minItems": 1, + "type": "array" + } + }, + "required": [ + "type", + "description" + ], + "type": "object" + }, + "demolish": { + "additionalProperties": false, + "properties": { + "asbestosAffected": { + "description": "Are materials containing asbestos affected by the demolition?", + "type": "boolean" + }, + "dangerousStructure": { + "description": "Is a dangerous structure being demolished?", + "type": "boolean" + }, + "reason": { + "type": "string" + }, + "remediationPlan": { + "type": "string" + } + }, + "type": "object" + }, + "ecology": { + "additionalProperties": false, + "properties": { + "livestock": { + "description": "Is the development housing livestock?", + "type": "boolean" + }, + "otherSpecies": { + "description": "Are known species inhabiting the site?", + "type": "boolean" + } + }, + "type": "object" + }, "extend": { "additionalProperties": false, "properties": { @@ -1575,6 +1641,40 @@ ], "type": "object" }, + "flood": { + "additionalProperties": false, + "properties": { + "surfaceWaterDisposal": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "type": { + "items": { + "enum": [ + "drainageSystem", + "soakaway", + "sewer", + "watercourse", + "pondOrLake" + ], + "type": "string" + }, + "maxItems": 1, + "minItems": 1, + "type": "array" + } + }, + "required": [ + "type", + "description" + ], + "type": "object" + } + }, + "type": "object" + }, "new": { "additionalProperties": false, "properties": { @@ -1601,6 +1701,53 @@ "area" ], "type": "object" + }, + "trees": { + "additionalProperties": false, + "properties": { + "affected": { + "description": "Are trees or hedges being cut down or pruned?", + "type": "boolean" + } + }, + "type": "object" + }, + "utilities": { + "additionalProperties": false, + "properties": { + "buildOver": { + "description": "Is the development building over existing utilities?", + "type": "boolean" + }, + "foulSewageDisposal": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "type": { + "items": { + "enum": [ + "sewer", + "tank", + "plant", + "pit" + ], + "type": "string" + }, + "maxItems": 1, + "minItems": 1, + "type": "array" + } + }, + "required": [ + "type", + "description" + ], + "type": "object" + } + }, + "type": "object" } }, "type": "object" @@ -3094,6 +3241,24 @@ ], "type": "object" }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Tree survey", + "type": "string" + }, + "value": { + "const": "treeSurvey", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, { "additionalProperties": false, "properties": { @@ -3384,6 +3549,72 @@ "additionalProperties": false, "description": "Proposal details for project sites within the Greater London Authority (GLA) area", "properties": { + "access": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "public": { + "description": "Is the property accessible from public land?", + "type": "boolean" + }, + "type": { + "items": { + "enum": [ + "vehicle", + "parking", + "newRoad", + "rightsOfWay.newPublic", + "rightsOfWay.changeOfUse" + ], + "type": "string" + }, + "maxItems": 1, + "minItems": 1, + "type": "array" + } + }, + "required": [ + "type", + "description" + ], + "type": "object" + }, + "demolish": { + "additionalProperties": false, + "properties": { + "asbestosAffected": { + "description": "Are materials containing asbestos affected by the demolition?", + "type": "boolean" + }, + "dangerousStructure": { + "description": "Is a dangerous structure being demolished?", + "type": "boolean" + }, + "reason": { + "type": "string" + }, + "remediationPlan": { + "type": "string" + } + }, + "type": "object" + }, + "ecology": { + "additionalProperties": false, + "properties": { + "livestock": { + "description": "Is the development housing livestock?", + "type": "boolean" + }, + "otherSpecies": { + "description": "Are known species inhabiting the site?", + "type": "boolean" + } + }, + "type": "object" + }, "extend": { "additionalProperties": false, "properties": { @@ -3396,6 +3627,40 @@ ], "type": "object" }, + "flood": { + "additionalProperties": false, + "properties": { + "surfaceWaterDisposal": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "type": { + "items": { + "enum": [ + "drainageSystem", + "soakaway", + "sewer", + "watercourse", + "pondOrLake" + ], + "type": "string" + }, + "maxItems": 1, + "minItems": 1, + "type": "array" + } + }, + "required": [ + "type", + "description" + ], + "type": "object" + } + }, + "type": "object" + }, "new": { "additionalProperties": false, "properties": { @@ -3423,6 +3688,53 @@ ], "type": "object" }, + "trees": { + "additionalProperties": false, + "properties": { + "affected": { + "description": "Are trees or hedges being cut down or pruned?", + "type": "boolean" + } + }, + "type": "object" + }, + "utilities": { + "additionalProperties": false, + "properties": { + "buildOver": { + "description": "Is the development building over existing utilities?", + "type": "boolean" + }, + "foulSewageDisposal": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "type": { + "items": { + "enum": [ + "sewer", + "tank", + "plant", + "pit" + ], + "type": "string" + }, + "maxItems": 1, + "minItems": 1, + "type": "array" + } + }, + "required": [ + "type", + "description" + ], + "type": "object" + } + }, + "type": "object" + }, "vehicleParking": { "additionalProperties": false, "properties": { @@ -4502,11 +4814,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -5212,11 +5556,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -5266,11 +5642,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -5320,11 +5728,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -5374,11 +5814,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -5428,11 +5900,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -5482,11 +5986,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -5536,11 +6072,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -5590,11 +6158,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -5644,11 +6244,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -5698,11 +6330,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -5752,11 +6416,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -5806,11 +6502,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -5860,11 +6588,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -5914,11 +6674,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -5968,11 +6760,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -6022,11 +6846,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -6076,11 +6932,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -6130,11 +7018,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -6184,11 +7104,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -6238,11 +7190,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -6292,11 +7276,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -6346,11 +7362,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -6400,11 +7448,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -6454,11 +7534,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -6508,11 +7620,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -6562,11 +7706,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -6616,11 +7792,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, @@ -6670,11 +7878,43 @@ "type": "string" }, "source": { - "$ref": "#/definitions/URL" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Planning Data", + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "text": { + "const": "Ordnance Survey MasterMap Highways", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + ] } }, "required": [ - "name" + "name", + "source" ], "type": "object" }, diff --git a/types/enums/FileTypes.ts b/types/enums/FileTypes.ts index d7cc1935..c823d10d 100644 --- a/types/enums/FileTypes.ts +++ b/types/enums/FileTypes.ts @@ -82,6 +82,7 @@ export const FileTypes = { treeCanopyCalculator: 'Tree canopy calculator', treeConditionReport: 'Tree condition report', treesReport: 'Trees report', + treeSurvey: 'Tree survey', 'unitPlan.existing': 'Unit plan - existing', 'unitPlan.proposed': 'Unit plan - proposed', 'usePlan.existing': 'Use plan - existing', diff --git a/types/schema/data/Property.ts b/types/schema/data/Property.ts index b88b24fe..9c236b14 100644 --- a/types/schema/data/Property.ts +++ b/types/schema/data/Property.ts @@ -225,5 +225,14 @@ export type PlanningConstraint = type Entity = { name: string; description?: string; - source?: URL; + source: PlanningDataSource | OSRoadsSource; +}; + +type PlanningDataSource = { + text: 'Planning Data'; + url: URL; +}; + +type OSRoadsSource = { + text: 'Ordnance Survey MasterMap Highways'; }; diff --git a/types/schema/data/Proposal.ts b/types/schema/data/Proposal.ts index 8e7cad24..f449240f 100644 --- a/types/schema/data/Proposal.ts +++ b/types/schema/data/Proposal.ts @@ -48,6 +48,66 @@ export interface BaseDetails { dwellings?: number; }; }; + demolish?: { + reason?: string; + remediationPlan?: string; + /** + * @description Is a dangerous structure being demolished? + */ + dangerousStructure?: boolean; + /** + * @description Are materials containing asbestos affected by the demolition? + */ + asbestosAffected?: boolean; + }; + access?: { + type: [ + | 'vehicle' + | 'parking' + | 'newRoad' + | 'rightsOfWay.newPublic' + | 'rightsOfWay.changeOfUse', + ]; + description: string; + /** + * @description Is the property accessible from public land? + */ + public?: boolean; + }; + trees?: { + /** + * @description Are trees or hedges being cut down or pruned? + */ + affected?: boolean; + }; + utilities?: { + /** + * @description Is the development building over existing utilities? + */ + buildOver?: boolean; + foulSewageDisposal?: { + type: ['sewer' | 'tank' | 'plant' | 'pit']; + description: string; + }; + }; + flood?: { + surfaceWaterDisposal?: { + type: [ + 'drainageSystem' | 'soakaway' | 'sewer' | 'watercourse' | 'pondOrLake', + ]; + description: string; + }; + }; + ecology?: { + /** + * @description Is the development housing livestock? + */ + livestock?: boolean; + /** + * @description Are known species inhabiting the site? + */ + otherSpecies?: boolean; + }; } /**