diff --git a/examples/data/landDrainageConsent.ts b/examples/data/landDrainageConsent.ts new file mode 100644 index 00000000..ff32964b --- /dev/null +++ b/examples/data/landDrainageConsent.ts @@ -0,0 +1,717 @@ +import {Schema} from '../../types/Schema'; +import {BaseProposal} from '../../types/schema/data/Proposal'; + +const version = process.env['VERSION'] || '@next'; + +export const landDrainageConsent: Schema = { + data: { + user: { + role: 'applicant', + }, + applicant: { + type: 'company', + name: { + title: 'Bishop', + first: 'Gundulf', + last: 'of Rochester', + }, + email: 'Gundulf1066@email.org', + phone: { + primary: '012345678900', + }, + company: { + name: 'The Normans', + }, + address: { + sameAsSiteAddress: true, + }, + siteContact: { + role: 'applicant', + }, + ownership: { + interest: 'other', + }, + maintenanceContact: [ + { + when: 'duringConstruction', + address: { + line1: 'Pevensey Castle', + town: 'Pevensey', + postcode: 'PE737SY', + }, + contact: { + name: { + title: 'Count', + first: 'Robert', + last: 'of Mortain', + }, + email: 'countbobby@email.org', + phone: '012345678901', + }, + }, + { + when: 'afterConstruction', + address: { + line1: 'Dover Castle', + town: 'Dover', + postcode: 'DO737CA', + }, + contact: { + name: { + title: 'Baron', + first: 'Roger', + last: 'De Leybourne', + }, + email: 'baronsarerevolting@email.org', + phone: '098765432109', + company: { + name: "The Barons' Revolt", + }, + }, + }, + ], + }, + property: { + address: { + latitude: 51.3893641, + longitude: 0.5014056, + x: 574136.97, + y: 168560.23, + title: 'ROCHESTER CASTLE, CASTLE HILL, ROCHESTER', + source: 'Ordnance Survey', + uprn: '000044026089', + usrn: '32100321', + pao: 'ROCHESTER CASTLE', + street: 'CASTLE HILL', + town: 'ROCHESTER', + postcode: 'ME1 1SW', + singleLine: 'ROCHESTER CASTLE, CASTLE HILL, ROCHESTER, MEDWAY, ME1 1SW', + }, + localAuthorityDistrict: ['Medway'], + region: 'South East', + type: { + value: 'object.monument.ruin', + description: 'Castle / Historic Ruin', + }, + planning: { + sources: [ + 'https://api.editor.planx.dev/gis/medway?geom=MULTIPOLYGON+%28%28%280.501333+51.389204%2C+0.501327+51.389199%2C+0.501346+51.38919%2C+0.501352+51.389196%2C+0.5014+51.389172%2C+0.501397+51.389144%2C+0.501411+51.389132%2C+0.501444+51.389121%2C+0.501496+51.389119%2C+0.501434+51.389032%2C+0.501347+51.388881%2C+0.501359+51.388874%2C+0.501334+51.388851%2C+0.501338+51.388839%2C+0.501489+51.388798%2C+0.501726+51.388796%2C+0.502053+51.389053%2C+0.50167+51.389267%2C+0.501967+51.38942%2C+0.501988+51.389411%2C+0.50202+51.389429%2C+0.502181+51.389535%2C+0.502302+51.389655%2C+0.502374+51.38964%2C+0.502416+51.389716%2C+0.502369+51.389725%2C+0.502368+51.389734%2C+0.502346+51.389744%2C+0.502395+51.389854%2C+0.502762+51.389814%2C+0.502818+51.389814%2C+0.50282+51.389997%2C+0.5028+51.390009%2C+0.502456+51.390001%2C+0.502391+51.390006%2C+0.502379+51.390081%2C+0.502361+51.390118%2C+0.50232+51.390174%2C+0.502262+51.390227%2C+0.502188+51.390267%2C+0.502061+51.390275%2C+0.502009+51.390294%2C+0.501308+51.390767%2C+0.501288+51.390844%2C+0.501277+51.390848%2C+0.501089+51.390825%2C+0.501085+51.390821%2C+0.501112+51.390769%2C+0.501038+51.390767%2C+0.501053+51.390696%2C+0.501025+51.390664%2C+0.501099+51.390638%2C+0.501106+51.390622%2C+0.501062+51.390559%2C+0.501022+51.390527%2C+0.50097+51.390464%2C+0.50088+51.390319%2C+0.500776+51.390202%2C+0.500592+51.389857%2C+0.500495+51.389655%2C+0.500548+51.38964%2C+0.500614+51.389683%2C+0.500618+51.389621%2C+0.500633+51.38958%2C+0.500721+51.389489%2C+0.500771+51.389459%2C+0.501262+51.389242%2C+0.501258+51.389238%2C+0.501285+51.389225%2C+0.501279+51.389219%2C+0.501296+51.389212%2C+0.501302+51.389218%2C+0.501333+51.389204%29%29%29&analytics=false&sessionId=8e372199-30e8-4b01-aef0-0745195b0e14', + 'https://api.editor.planx.dev/roads?usrn=32100321', + ], + designations: [ + { + value: 'tpo', + description: 'Tree Preservation Order (TPO) or zone', + intersects: false, + }, + { + value: 'flood', + description: 'Flood Risk Zone', + intersects: true, + entities: [ + { + name: 'Tidal Models - Risk level 3', + source: { + text: 'Planning Data', + url: 'https://www.planning.data.gov.uk/entity/65104983', + }, + }, + { + name: 'Tidal Models - Risk level 2', + source: { + text: 'Planning Data', + url: 'https://www.planning.data.gov.uk/entity/65230121', + }, + }, + ], + }, + { + value: 'listed', + description: 'Listed Building', + intersects: true, + entities: [ + { + name: 'ROCHESTER CASTLE', + source: { + text: 'Planning Data', + url: 'https://www.planning.data.gov.uk/entity/31792007', + }, + }, + { + name: 'Rochester Castle', + source: { + text: 'Planning Data', + url: 'https://www.planning.data.gov.uk/entity/42127185', + }, + }, + ], + }, + { + value: 'article4', + description: 'Article 4 Direction area', + intersects: false, + }, + { + value: 'monument', + description: 'Site of a Scheduled Monument', + intersects: true, + entities: [ + { + name: 'Rochester Castle', + source: { + text: 'Planning Data', + url: 'https://www.planning.data.gov.uk/entity/13909855', + }, + }, + ], + }, + { + value: 'greenBelt', + description: 'Green Belt', + intersects: false, + }, + { + value: 'designated', + description: 'Designated land', + intersects: true, + }, + { + value: 'nature.SAC', + description: 'Special Area of Conservation (SAC)', + intersects: false, + }, + { + value: 'nature.SPA', + description: 'Special Protection Area (SPA)', + intersects: false, + }, + { + value: 'nature.ASNW', + description: 'Ancient Semi-Natural Woodland (ASNW)', + intersects: false, + }, + { + value: 'nature.SSSI', + description: 'Site of Special Scientific Interest (SSSI)', + intersects: false, + }, + { + value: 'flood.zone.1', + description: 'Flood Risk Zone 1 - Low risk', + intersects: false, + }, + { + value: 'flood.zone.2', + description: 'Flood Risk Zone 2 - Medium risk', + intersects: true, + }, + { + value: 'flood.zone.3', + description: 'Flood Risk Zone 3 - High risk', + intersects: true, + }, + { + value: 'brownfieldSite', + description: 'Brownfield site', + intersects: false, + }, + { + value: 'designated.WHS', + description: 'UNESCO World Heritage Site or buffer zone', + intersects: false, + }, + { + value: 'listed.grade.I', + description: 'Listed Building - Grade I', + intersects: true, + }, + { + value: 'registeredPark', + description: 'Historic Park or Garden', + intersects: false, + }, + { + value: 'designated.AONB', + description: 'Area of Outstanding Natural Beauty (AONB)', + intersects: false, + }, + { + value: 'listed.grade.II', + description: 'Listed Building - Grade II', + intersects: false, + }, + { + value: 'listed.grade.II*', + description: 'Listed Building - Grade II*', + intersects: false, + }, + { + value: 'nature.ramsarSite', + description: 'Ramsar site', + intersects: false, + }, + { + value: 'designated.nationalPark', + description: 'National Park', + intersects: false, + }, + { + value: 'designated.conservationArea', + description: 'Conservation Area', + intersects: true, + entities: [ + { + name: 'Polygon', + source: { + text: 'Planning Data', + url: 'https://www.planning.data.gov.uk/entity/44009809', + }, + }, + ], + }, + { + value: 'designated.nationalPark.broads', + description: 'National Park - Broads', + intersects: false, + }, + { + value: 'road.classified', + description: 'Classified Road', + intersects: false, + }, + ], + }, + boundary: { + site: { + type: 'Feature', + geometry: { + type: 'MultiPolygon', + coordinates: [ + [ + [ + [0.501333, 51.389204], + [0.501327, 51.389199], + [0.501346, 51.38919], + [0.501352, 51.389196], + [0.5014, 51.389172], + [0.501397, 51.389144], + [0.501411, 51.389132], + [0.501444, 51.389121], + [0.501496, 51.389119], + [0.501434, 51.389032], + [0.501347, 51.388881], + [0.501359, 51.388874], + [0.501334, 51.388851], + [0.501338, 51.388839], + [0.501489, 51.388798], + [0.501726, 51.388796], + [0.502053, 51.389053], + [0.50167, 51.389267], + [0.501967, 51.38942], + [0.501988, 51.389411], + [0.50202, 51.389429], + [0.502181, 51.389535], + [0.502302, 51.389655], + [0.502374, 51.38964], + [0.502416, 51.389716], + [0.502369, 51.389725], + [0.502368, 51.389734], + [0.502346, 51.389744], + [0.502395, 51.389854], + [0.502762, 51.389814], + [0.502818, 51.389814], + [0.50282, 51.389997], + [0.5028, 51.390009], + [0.502456, 51.390001], + [0.502391, 51.390006], + [0.502379, 51.390081], + [0.502361, 51.390118], + [0.50232, 51.390174], + [0.502262, 51.390227], + [0.502188, 51.390267], + [0.502061, 51.390275], + [0.502009, 51.390294], + [0.501308, 51.390767], + [0.501288, 51.390844], + [0.501277, 51.390848], + [0.501089, 51.390825], + [0.501085, 51.390821], + [0.501112, 51.390769], + [0.501038, 51.390767], + [0.501053, 51.390696], + [0.501025, 51.390664], + [0.501099, 51.390638], + [0.501106, 51.390622], + [0.501062, 51.390559], + [0.501022, 51.390527], + [0.50097, 51.390464], + [0.50088, 51.390319], + [0.500776, 51.390202], + [0.500592, 51.389857], + [0.500495, 51.389655], + [0.500548, 51.38964], + [0.500614, 51.389683], + [0.500618, 51.389621], + [0.500633, 51.38958], + [0.500721, 51.389489], + [0.500771, 51.389459], + [0.501262, 51.389242], + [0.501258, 51.389238], + [0.501285, 51.389225], + [0.501279, 51.389219], + [0.501296, 51.389212], + [0.501302, 51.389218], + [0.501333, 51.389204], + ], + ], + ], + }, + properties: { + name: '', + entity: 12000665421, + prefix: 'title-boundary', + dataset: 'title-boundary', + 'end-date': '', + typology: 'geography', + reference: '45856207', + 'entry-date': '2024-05-06', + 'start-date': '2010-06-08', + 'organisation-entity': '13', + }, + }, + area: { + hectares: 1.684864, + squareMetres: 16848.64, + }, + }, + }, + application: { + type: { + value: 'landDrainageConsent', + description: + 'Consent to do works affecting ordinary watercourses or land drainage', + }, + fee: { + calculated: 0, + payable: 200, + exemption: { + disability: false, + resubmission: false, + }, + reduction: { + sports: false, + parishCouncil: false, + alternative: false, + }, + reference: { + govPay: 'cmuultqffhn6e0co3hb5c0hv2r', + }, + }, + declaration: { + accurate: true, + connection: { + value: 'none', + }, + }, + preApp: { + reference: '24/12345/PRE', + date: '2024-06-08', + officer: 'Unknown', + summary: 'Not provided', + }, + planningApp: { + reference: '24/12345/FUL', + date: '2024-06-28', + localPlanningAuthority: 'Medway', + }, + }, + proposal: { + projectType: [ + { + value: 'alter', + description: 'Alter a building', + }, + ], + description: + 'Upgrading of our drawbridge as it needs a bit of work - retarring, sharpen the spikes, derust the chains etc. We will need to access the lifting gear which is situated in the moat so will need to temporarily divert the water ', + date: { + start: '2024-07-08', + completion: '2024-08-08', + }, + boundary: { + site: { + type: 'Feature', + geometry: { + type: 'MultiPolygon', + coordinates: [ + [ + [ + [0.501333, 51.389204], + [0.501327, 51.389199], + [0.501346, 51.38919], + [0.501352, 51.389196], + [0.5014, 51.389172], + [0.501397, 51.389144], + [0.501411, 51.389132], + [0.501444, 51.389121], + [0.501496, 51.389119], + [0.501434, 51.389032], + [0.501347, 51.388881], + [0.501359, 51.388874], + [0.501334, 51.388851], + [0.501338, 51.388839], + [0.501489, 51.388798], + [0.501726, 51.388796], + [0.502053, 51.389053], + [0.50167, 51.389267], + [0.501967, 51.38942], + [0.501988, 51.389411], + [0.50202, 51.389429], + [0.502181, 51.389535], + [0.502302, 51.389655], + [0.502374, 51.38964], + [0.502416, 51.389716], + [0.502369, 51.389725], + [0.502368, 51.389734], + [0.502346, 51.389744], + [0.502395, 51.389854], + [0.502762, 51.389814], + [0.502818, 51.389814], + [0.50282, 51.389997], + [0.5028, 51.390009], + [0.502456, 51.390001], + [0.502391, 51.390006], + [0.502379, 51.390081], + [0.502361, 51.390118], + [0.50232, 51.390174], + [0.502262, 51.390227], + [0.502188, 51.390267], + [0.502061, 51.390275], + [0.502009, 51.390294], + [0.501308, 51.390767], + [0.501288, 51.390844], + [0.501277, 51.390848], + [0.501089, 51.390825], + [0.501085, 51.390821], + [0.501112, 51.390769], + [0.501038, 51.390767], + [0.501053, 51.390696], + [0.501025, 51.390664], + [0.501099, 51.390638], + [0.501106, 51.390622], + [0.501062, 51.390559], + [0.501022, 51.390527], + [0.50097, 51.390464], + [0.50088, 51.390319], + [0.500776, 51.390202], + [0.500592, 51.389857], + [0.500495, 51.389655], + [0.500548, 51.38964], + [0.500614, 51.389683], + [0.500618, 51.389621], + [0.500633, 51.38958], + [0.500721, 51.389489], + [0.500771, 51.389459], + [0.501262, 51.389242], + [0.501258, 51.389238], + [0.501285, 51.389225], + [0.501279, 51.389219], + [0.501296, 51.389212], + [0.501302, 51.389218], + [0.501333, 51.389204], + ], + ], + ], + }, + properties: { + name: '', + entity: 12000665421, + prefix: 'title-boundary', + dataset: 'title-boundary', + 'end-date': '', + typology: 'geography', + reference: '45856207', + 'entry-date': '2024-05-06', + 'start-date': '2010-06-08', + 'organisation-entity': '13', + planx_user_action: 'Accepted the title boundary', + }, + }, + area: { + hectares: 1.684864, + squareMetres: 16848.64, + }, + }, + watercourse: { + name: 'Rochester Castle Moat', + type: 'ditch', + }, + structures: { + type: 'bridge', + total: 4, + permanent: { + count: 1, + }, + temporary: { + count: 3, + }, + }, + environmentalImpactDescription: + 'These are the environmental impact of the works to be undertaken: A, B, C. And this is how we are mitigating them: 1, 2, 3', + } as BaseProposal, + }, + responses: [ + { + question: 'What type of property is it?', + responses: [ + { + value: 'Something else', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Which of these best describes the use of the property?', + responses: [ + { + value: 'Other', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'What type of property is it?', + responses: [ + { + value: 'Historic site', + }, + ], + metadata: {}, + }, + { + question: + 'Did you get any pre-application advice from the council before making this application?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: {}, + }, + { + question: 'What was the name of the planning officer you spoke to?', + responses: [ + { + value: 'unknown', + }, + ], + metadata: {}, + }, + { + question: 'What was your reference?', + responses: [ + { + value: '24/12345/PRE', + }, + ], + metadata: {}, + }, + { + question: 'What date was the pre-application advice given on?', + responses: [ + { + value: '2024-06-08', + }, + ], + metadata: {}, + }, + { + question: 'What was the pre-application advice you have received?', + responses: [ + { + value: + 'this is the advice received. this is the advice received.this is the advice received.this is the advice received.this is the advice received.', + }, + ], + metadata: {}, + }, + { + question: 'Which Local Planning authority is it?', + responses: [ + { + value: 'Medway', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Connections with Medway Council', + responses: [ + { + value: 'None of the above apply to me', + }, + ], + metadata: {}, + }, + { + question: 'I confirm that:', + responses: [ + { + value: + 'The information contained in this application is truthful, accurate and complete, to the best of my knowledge', + }, + ], + metadata: {}, + }, + ], + files: [ + { + name: 'https://api.editor.planx.dev/file/private/40z9r39r/test%20document.pdf', + type: [ + { + value: 'relevantInformation', + description: + 'Information the applicant considers relevant to the application', + }, + ], + }, + ], + metadata: { + id: '8e372199-30e8-4b01-aef0-0745195b0e14', + organisation: 'MDW', + submittedAt: '2024-07-11T08:28:22.493Z', + source: 'PlanX', + service: { + flowId: '5aab3466-8fb0-4e73-b51d-347d61ad5547', + url: 'https://editor.planx.dev/medway/apply-for-land-drainage-consent-copy/published', + files: { + required: [ + { + value: 'necessaryInformation', + description: + 'Information the authority considers necessary for the application', + }, + ], + recommended: [ + { + value: 'relevantInformation', + description: + 'Information the applicant considers relevant to the application', + }, + ], + optional: [], + }, + fee: { + calculated: [], + payable: [], + }, + }, + schema: `https://theopensystemslab.github.io/digital-planning-data-schemas/${version}/schema.json`, + }, +}; diff --git a/examples/landDrainageConsent.json b/examples/landDrainageConsent.json new file mode 100644 index 00000000..4b6cdfb8 --- /dev/null +++ b/examples/landDrainageConsent.json @@ -0,0 +1,1143 @@ +{ + "data": { + "user": { + "role": "applicant" + }, + "applicant": { + "type": "company", + "name": { + "title": "Bishop", + "first": "Gundulf", + "last": "of Rochester" + }, + "email": "Gundulf1066@email.org", + "phone": { + "primary": "012345678900" + }, + "company": { + "name": "The Normans" + }, + "address": { + "sameAsSiteAddress": true + }, + "siteContact": { + "role": "applicant" + }, + "ownership": { + "interest": "other" + }, + "maintenanceContact": [ + { + "when": "duringConstruction", + "address": { + "line1": "Pevensey Castle", + "town": "Pevensey", + "postcode": "PE737SY" + }, + "contact": { + "name": { + "title": "Count", + "first": "Robert", + "last": "of Mortain" + }, + "email": "countbobby@email.org", + "phone": "012345678901" + } + }, + { + "when": "afterConstruction", + "address": { + "line1": "Dover Castle", + "town": "Dover", + "postcode": "DO737CA" + }, + "contact": { + "name": { + "title": "Baron", + "first": "Roger", + "last": "De Leybourne" + }, + "email": "baronsarerevolting@email.org", + "phone": "098765432109", + "company": { + "name": "The Barons' Revolt" + } + } + } + ] + }, + "property": { + "address": { + "latitude": 51.3893641, + "longitude": 0.5014056, + "x": 574136.97, + "y": 168560.23, + "title": "ROCHESTER CASTLE, CASTLE HILL, ROCHESTER", + "source": "Ordnance Survey", + "uprn": "000044026089", + "usrn": "32100321", + "pao": "ROCHESTER CASTLE", + "street": "CASTLE HILL", + "town": "ROCHESTER", + "postcode": "ME1 1SW", + "singleLine": "ROCHESTER CASTLE, CASTLE HILL, ROCHESTER, MEDWAY, ME1 1SW" + }, + "localAuthorityDistrict": [ + "Medway" + ], + "region": "South East", + "type": { + "value": "object.monument.ruin", + "description": "Castle / Historic Ruin" + }, + "planning": { + "sources": [ + "https://api.editor.planx.dev/gis/medway?geom=MULTIPOLYGON+%28%28%280.501333+51.389204%2C+0.501327+51.389199%2C+0.501346+51.38919%2C+0.501352+51.389196%2C+0.5014+51.389172%2C+0.501397+51.389144%2C+0.501411+51.389132%2C+0.501444+51.389121%2C+0.501496+51.389119%2C+0.501434+51.389032%2C+0.501347+51.388881%2C+0.501359+51.388874%2C+0.501334+51.388851%2C+0.501338+51.388839%2C+0.501489+51.388798%2C+0.501726+51.388796%2C+0.502053+51.389053%2C+0.50167+51.389267%2C+0.501967+51.38942%2C+0.501988+51.389411%2C+0.50202+51.389429%2C+0.502181+51.389535%2C+0.502302+51.389655%2C+0.502374+51.38964%2C+0.502416+51.389716%2C+0.502369+51.389725%2C+0.502368+51.389734%2C+0.502346+51.389744%2C+0.502395+51.389854%2C+0.502762+51.389814%2C+0.502818+51.389814%2C+0.50282+51.389997%2C+0.5028+51.390009%2C+0.502456+51.390001%2C+0.502391+51.390006%2C+0.502379+51.390081%2C+0.502361+51.390118%2C+0.50232+51.390174%2C+0.502262+51.390227%2C+0.502188+51.390267%2C+0.502061+51.390275%2C+0.502009+51.390294%2C+0.501308+51.390767%2C+0.501288+51.390844%2C+0.501277+51.390848%2C+0.501089+51.390825%2C+0.501085+51.390821%2C+0.501112+51.390769%2C+0.501038+51.390767%2C+0.501053+51.390696%2C+0.501025+51.390664%2C+0.501099+51.390638%2C+0.501106+51.390622%2C+0.501062+51.390559%2C+0.501022+51.390527%2C+0.50097+51.390464%2C+0.50088+51.390319%2C+0.500776+51.390202%2C+0.500592+51.389857%2C+0.500495+51.389655%2C+0.500548+51.38964%2C+0.500614+51.389683%2C+0.500618+51.389621%2C+0.500633+51.38958%2C+0.500721+51.389489%2C+0.500771+51.389459%2C+0.501262+51.389242%2C+0.501258+51.389238%2C+0.501285+51.389225%2C+0.501279+51.389219%2C+0.501296+51.389212%2C+0.501302+51.389218%2C+0.501333+51.389204%29%29%29&analytics=false&sessionId=8e372199-30e8-4b01-aef0-0745195b0e14", + "https://api.editor.planx.dev/roads?usrn=32100321" + ], + "designations": [ + { + "value": "tpo", + "description": "Tree Preservation Order (TPO) or zone", + "intersects": false + }, + { + "value": "flood", + "description": "Flood Risk Zone", + "intersects": true, + "entities": [ + { + "name": "Tidal Models - Risk level 3", + "source": { + "text": "Planning Data", + "url": "https://www.planning.data.gov.uk/entity/65104983" + } + }, + { + "name": "Tidal Models - Risk level 2", + "source": { + "text": "Planning Data", + "url": "https://www.planning.data.gov.uk/entity/65230121" + } + } + ] + }, + { + "value": "listed", + "description": "Listed Building", + "intersects": true, + "entities": [ + { + "name": "ROCHESTER CASTLE", + "source": { + "text": "Planning Data", + "url": "https://www.planning.data.gov.uk/entity/31792007" + } + }, + { + "name": "Rochester Castle", + "source": { + "text": "Planning Data", + "url": "https://www.planning.data.gov.uk/entity/42127185" + } + } + ] + }, + { + "value": "article4", + "description": "Article 4 Direction area", + "intersects": false + }, + { + "value": "monument", + "description": "Site of a Scheduled Monument", + "intersects": true, + "entities": [ + { + "name": "Rochester Castle", + "source": { + "text": "Planning Data", + "url": "https://www.planning.data.gov.uk/entity/13909855" + } + } + ] + }, + { + "value": "greenBelt", + "description": "Green Belt", + "intersects": false + }, + { + "value": "designated", + "description": "Designated land", + "intersects": true + }, + { + "value": "nature.SAC", + "description": "Special Area of Conservation (SAC)", + "intersects": false + }, + { + "value": "nature.SPA", + "description": "Special Protection Area (SPA)", + "intersects": false + }, + { + "value": "nature.ASNW", + "description": "Ancient Semi-Natural Woodland (ASNW)", + "intersects": false + }, + { + "value": "nature.SSSI", + "description": "Site of Special Scientific Interest (SSSI)", + "intersects": false + }, + { + "value": "flood.zone.1", + "description": "Flood Risk Zone 1 - Low risk", + "intersects": false + }, + { + "value": "flood.zone.2", + "description": "Flood Risk Zone 2 - Medium risk", + "intersects": true + }, + { + "value": "flood.zone.3", + "description": "Flood Risk Zone 3 - High risk", + "intersects": true + }, + { + "value": "brownfieldSite", + "description": "Brownfield site", + "intersects": false + }, + { + "value": "designated.WHS", + "description": "UNESCO World Heritage Site or buffer zone", + "intersects": false + }, + { + "value": "listed.grade.I", + "description": "Listed Building - Grade I", + "intersects": true + }, + { + "value": "registeredPark", + "description": "Historic Park or Garden", + "intersects": false + }, + { + "value": "designated.AONB", + "description": "Area of Outstanding Natural Beauty (AONB)", + "intersects": false + }, + { + "value": "listed.grade.II", + "description": "Listed Building - Grade II", + "intersects": false + }, + { + "value": "listed.grade.II*", + "description": "Listed Building - Grade II*", + "intersects": false + }, + { + "value": "nature.ramsarSite", + "description": "Ramsar site", + "intersects": false + }, + { + "value": "designated.nationalPark", + "description": "National Park", + "intersects": false + }, + { + "value": "designated.conservationArea", + "description": "Conservation Area", + "intersects": true, + "entities": [ + { + "name": "Polygon", + "source": { + "text": "Planning Data", + "url": "https://www.planning.data.gov.uk/entity/44009809" + } + } + ] + }, + { + "value": "designated.nationalPark.broads", + "description": "National Park - Broads", + "intersects": false + }, + { + "value": "road.classified", + "description": "Classified Road", + "intersects": false + } + ] + }, + "boundary": { + "site": { + "type": "Feature", + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + [ + [ + [ + 0.501333, + 51.389204 + ], + [ + 0.501327, + 51.389199 + ], + [ + 0.501346, + 51.38919 + ], + [ + 0.501352, + 51.389196 + ], + [ + 0.5014, + 51.389172 + ], + [ + 0.501397, + 51.389144 + ], + [ + 0.501411, + 51.389132 + ], + [ + 0.501444, + 51.389121 + ], + [ + 0.501496, + 51.389119 + ], + [ + 0.501434, + 51.389032 + ], + [ + 0.501347, + 51.388881 + ], + [ + 0.501359, + 51.388874 + ], + [ + 0.501334, + 51.388851 + ], + [ + 0.501338, + 51.388839 + ], + [ + 0.501489, + 51.388798 + ], + [ + 0.501726, + 51.388796 + ], + [ + 0.502053, + 51.389053 + ], + [ + 0.50167, + 51.389267 + ], + [ + 0.501967, + 51.38942 + ], + [ + 0.501988, + 51.389411 + ], + [ + 0.50202, + 51.389429 + ], + [ + 0.502181, + 51.389535 + ], + [ + 0.502302, + 51.389655 + ], + [ + 0.502374, + 51.38964 + ], + [ + 0.502416, + 51.389716 + ], + [ + 0.502369, + 51.389725 + ], + [ + 0.502368, + 51.389734 + ], + [ + 0.502346, + 51.389744 + ], + [ + 0.502395, + 51.389854 + ], + [ + 0.502762, + 51.389814 + ], + [ + 0.502818, + 51.389814 + ], + [ + 0.50282, + 51.389997 + ], + [ + 0.5028, + 51.390009 + ], + [ + 0.502456, + 51.390001 + ], + [ + 0.502391, + 51.390006 + ], + [ + 0.502379, + 51.390081 + ], + [ + 0.502361, + 51.390118 + ], + [ + 0.50232, + 51.390174 + ], + [ + 0.502262, + 51.390227 + ], + [ + 0.502188, + 51.390267 + ], + [ + 0.502061, + 51.390275 + ], + [ + 0.502009, + 51.390294 + ], + [ + 0.501308, + 51.390767 + ], + [ + 0.501288, + 51.390844 + ], + [ + 0.501277, + 51.390848 + ], + [ + 0.501089, + 51.390825 + ], + [ + 0.501085, + 51.390821 + ], + [ + 0.501112, + 51.390769 + ], + [ + 0.501038, + 51.390767 + ], + [ + 0.501053, + 51.390696 + ], + [ + 0.501025, + 51.390664 + ], + [ + 0.501099, + 51.390638 + ], + [ + 0.501106, + 51.390622 + ], + [ + 0.501062, + 51.390559 + ], + [ + 0.501022, + 51.390527 + ], + [ + 0.50097, + 51.390464 + ], + [ + 0.50088, + 51.390319 + ], + [ + 0.500776, + 51.390202 + ], + [ + 0.500592, + 51.389857 + ], + [ + 0.500495, + 51.389655 + ], + [ + 0.500548, + 51.38964 + ], + [ + 0.500614, + 51.389683 + ], + [ + 0.500618, + 51.389621 + ], + [ + 0.500633, + 51.38958 + ], + [ + 0.500721, + 51.389489 + ], + [ + 0.500771, + 51.389459 + ], + [ + 0.501262, + 51.389242 + ], + [ + 0.501258, + 51.389238 + ], + [ + 0.501285, + 51.389225 + ], + [ + 0.501279, + 51.389219 + ], + [ + 0.501296, + 51.389212 + ], + [ + 0.501302, + 51.389218 + ], + [ + 0.501333, + 51.389204 + ] + ] + ] + ] + }, + "properties": { + "name": "", + "entity": 12000665421, + "prefix": "title-boundary", + "dataset": "title-boundary", + "end-date": "", + "typology": "geography", + "reference": "45856207", + "entry-date": "2024-05-06", + "start-date": "2010-06-08", + "organisation-entity": "13" + } + }, + "area": { + "hectares": 1.684864, + "squareMetres": 16848.64 + } + } + }, + "application": { + "type": { + "value": "landDrainageConsent", + "description": "Consent to do works affecting ordinary watercourses or land drainage" + }, + "fee": { + "calculated": 0, + "payable": 200, + "exemption": { + "disability": false, + "resubmission": false + }, + "reduction": { + "sports": false, + "parishCouncil": false, + "alternative": false + }, + "reference": { + "govPay": "cmuultqffhn6e0co3hb5c0hv2r" + } + }, + "declaration": { + "accurate": true, + "connection": { + "value": "none" + } + }, + "preApp": { + "reference": "24/12345/PRE", + "date": "2024-06-08", + "officer": "Unknown", + "summary": "Not provided" + }, + "planningApp": { + "reference": "24/12345/FUL", + "date": "2024-06-28", + "localPlanningAuthority": "Medway" + } + }, + "proposal": { + "projectType": [ + { + "value": "alter", + "description": "Alter a building" + } + ], + "description": "Upgrading of our drawbridge as it needs a bit of work - retarring, sharpen the spikes, derust the chains etc. We will need to access the lifting gear which is situated in the moat so will need to temporarily divert the water ", + "date": { + "start": "2024-07-08", + "completion": "2024-08-08" + }, + "boundary": { + "site": { + "type": "Feature", + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + [ + [ + [ + 0.501333, + 51.389204 + ], + [ + 0.501327, + 51.389199 + ], + [ + 0.501346, + 51.38919 + ], + [ + 0.501352, + 51.389196 + ], + [ + 0.5014, + 51.389172 + ], + [ + 0.501397, + 51.389144 + ], + [ + 0.501411, + 51.389132 + ], + [ + 0.501444, + 51.389121 + ], + [ + 0.501496, + 51.389119 + ], + [ + 0.501434, + 51.389032 + ], + [ + 0.501347, + 51.388881 + ], + [ + 0.501359, + 51.388874 + ], + [ + 0.501334, + 51.388851 + ], + [ + 0.501338, + 51.388839 + ], + [ + 0.501489, + 51.388798 + ], + [ + 0.501726, + 51.388796 + ], + [ + 0.502053, + 51.389053 + ], + [ + 0.50167, + 51.389267 + ], + [ + 0.501967, + 51.38942 + ], + [ + 0.501988, + 51.389411 + ], + [ + 0.50202, + 51.389429 + ], + [ + 0.502181, + 51.389535 + ], + [ + 0.502302, + 51.389655 + ], + [ + 0.502374, + 51.38964 + ], + [ + 0.502416, + 51.389716 + ], + [ + 0.502369, + 51.389725 + ], + [ + 0.502368, + 51.389734 + ], + [ + 0.502346, + 51.389744 + ], + [ + 0.502395, + 51.389854 + ], + [ + 0.502762, + 51.389814 + ], + [ + 0.502818, + 51.389814 + ], + [ + 0.50282, + 51.389997 + ], + [ + 0.5028, + 51.390009 + ], + [ + 0.502456, + 51.390001 + ], + [ + 0.502391, + 51.390006 + ], + [ + 0.502379, + 51.390081 + ], + [ + 0.502361, + 51.390118 + ], + [ + 0.50232, + 51.390174 + ], + [ + 0.502262, + 51.390227 + ], + [ + 0.502188, + 51.390267 + ], + [ + 0.502061, + 51.390275 + ], + [ + 0.502009, + 51.390294 + ], + [ + 0.501308, + 51.390767 + ], + [ + 0.501288, + 51.390844 + ], + [ + 0.501277, + 51.390848 + ], + [ + 0.501089, + 51.390825 + ], + [ + 0.501085, + 51.390821 + ], + [ + 0.501112, + 51.390769 + ], + [ + 0.501038, + 51.390767 + ], + [ + 0.501053, + 51.390696 + ], + [ + 0.501025, + 51.390664 + ], + [ + 0.501099, + 51.390638 + ], + [ + 0.501106, + 51.390622 + ], + [ + 0.501062, + 51.390559 + ], + [ + 0.501022, + 51.390527 + ], + [ + 0.50097, + 51.390464 + ], + [ + 0.50088, + 51.390319 + ], + [ + 0.500776, + 51.390202 + ], + [ + 0.500592, + 51.389857 + ], + [ + 0.500495, + 51.389655 + ], + [ + 0.500548, + 51.38964 + ], + [ + 0.500614, + 51.389683 + ], + [ + 0.500618, + 51.389621 + ], + [ + 0.500633, + 51.38958 + ], + [ + 0.500721, + 51.389489 + ], + [ + 0.500771, + 51.389459 + ], + [ + 0.501262, + 51.389242 + ], + [ + 0.501258, + 51.389238 + ], + [ + 0.501285, + 51.389225 + ], + [ + 0.501279, + 51.389219 + ], + [ + 0.501296, + 51.389212 + ], + [ + 0.501302, + 51.389218 + ], + [ + 0.501333, + 51.389204 + ] + ] + ] + ] + }, + "properties": { + "name": "", + "entity": 12000665421, + "prefix": "title-boundary", + "dataset": "title-boundary", + "end-date": "", + "typology": "geography", + "reference": "45856207", + "entry-date": "2024-05-06", + "start-date": "2010-06-08", + "organisation-entity": "13", + "planx_user_action": "Accepted the title boundary" + } + }, + "area": { + "hectares": 1.684864, + "squareMetres": 16848.64 + } + }, + "watercourse": { + "name": "Rochester Castle Moat", + "type": "ditch" + }, + "structures": { + "type": "bridge", + "total": 4, + "permanent": { + "count": 1 + }, + "temporary": { + "count": 3 + } + }, + "environmentalImpactDescription": "These are the environmental impact of the works to be undertaken: A, B, C. And this is how we are mitigating them: 1, 2, 3" + } + }, + "responses": [ + { + "question": "What type of property is it?", + "responses": [ + { + "value": "Something else" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Which of these best describes the use of the property?", + "responses": [ + { + "value": "Other" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "What type of property is it?", + "responses": [ + { + "value": "Historic site" + } + ], + "metadata": {} + }, + { + "question": "Did you get any pre-application advice from the council before making this application?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": {} + }, + { + "question": "What was the name of the planning officer you spoke to?", + "responses": [ + { + "value": "unknown" + } + ], + "metadata": {} + }, + { + "question": "What was your reference?", + "responses": [ + { + "value": "24/12345/PRE" + } + ], + "metadata": {} + }, + { + "question": "What date was the pre-application advice given on?", + "responses": [ + { + "value": "2024-06-08" + } + ], + "metadata": {} + }, + { + "question": "What was the pre-application advice you have received?", + "responses": [ + { + "value": "this is the advice received. this is the advice received.this is the advice received.this is the advice received.this is the advice received." + } + ], + "metadata": {} + }, + { + "question": "Which Local Planning authority is it?", + "responses": [ + { + "value": "Medway" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Connections with Medway Council", + "responses": [ + { + "value": "None of the above apply to me" + } + ], + "metadata": {} + }, + { + "question": "I confirm that:", + "responses": [ + { + "value": "The information contained in this application is truthful, accurate and complete, to the best of my knowledge" + } + ], + "metadata": {} + } + ], + "files": [ + { + "name": "https://api.editor.planx.dev/file/private/40z9r39r/test%20document.pdf", + "type": [ + { + "value": "relevantInformation", + "description": "Information the applicant considers relevant to the application" + } + ] + } + ], + "metadata": { + "id": "8e372199-30e8-4b01-aef0-0745195b0e14", + "organisation": "MDW", + "submittedAt": "2024-07-11T08:28:22.493Z", + "source": "PlanX", + "service": { + "flowId": "5aab3466-8fb0-4e73-b51d-347d61ad5547", + "url": "https://editor.planx.dev/medway/apply-for-land-drainage-consent-copy/published", + "files": { + "required": [ + { + "value": "necessaryInformation", + "description": "Information the authority considers necessary for the application" + } + ], + "recommended": [ + { + "value": "relevantInformation", + "description": "Information the applicant considers relevant to the application" + } + ], + "optional": [] + }, + "fee": { + "calculated": [], + "payable": [] + } + }, + "schema": "https://theopensystemslab.github.io/digital-planning-data-schemas/@next/schema.json" + } +} \ No newline at end of file diff --git a/schema/schema.json b/schema/schema.json index c7ac2220..c199fa02 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -118,6 +118,9 @@ "email": { "$ref": "#/definitions/Email" }, + "maintenanceContact": { + "$ref": "#/definitions/MaintenanceContact" + }, "name": { "additionalProperties": false, "properties": { @@ -2231,6 +2234,9 @@ "email": { "$ref": "#/definitions/Email" }, + "maintenanceContact": { + "$ref": "#/definitions/MaintenanceContact" + }, "name": { "additionalProperties": false, "properties": { @@ -2308,6 +2314,9 @@ } ] }, + "planningApp": { + "$ref": "#/definitions/PlanningApplication" + }, "preApp": { "$ref": "#/definitions/PreApplication" }, @@ -2382,6 +2391,9 @@ }, "type": "object" }, + "environmentalImpactDescription": { + "type": "string" + }, "extend": { "additionalProperties": false, "properties": { @@ -2467,6 +2479,57 @@ }, "type": "array" }, + "structures": { + "additionalProperties": false, + "properties": { + "permanent": { + "additionalProperties": false, + "properties": { + "count": { + "type": "number" + } + }, + "required": [ + "count" + ], + "type": "object" + }, + "temporary": { + "additionalProperties": false, + "properties": { + "count": { + "type": "number" + } + }, + "required": [ + "count" + ], + "type": "object" + }, + "total": { + "type": "number" + }, + "type": { + "enum": [ + "bridge", + "catchpit", + "culvert", + "pipe", + "gully", + "headwall", + "manhole", + "weir", + "other" + ], + "type": "string" + } + }, + "required": [ + "type", + "total" + ], + "type": "object" + }, "units": { "$ref": "#/definitions/ResidentialUnits" }, @@ -2603,6 +2666,30 @@ } }, "type": "object" + }, + "watercourse": { + "additionalProperties": false, + "properties": { + "name": { + "type": "string" + }, + "type": { + "enum": [ + "ditch", + "millStream", + "pond", + "river", + "streamOrBrook", + "other" + ], + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "type": "object" } }, "required": [ @@ -5919,6 +6006,9 @@ "leadDeveloper": { "$ref": "#/definitions/LeadDeveloper" }, + "planningApp": { + "$ref": "#/definitions/PlanningApplication" + }, "preApp": { "$ref": "#/definitions/PreApplication" }, @@ -6530,6 +6620,9 @@ ], "type": "object" }, + "environmentalImpactDescription": { + "type": "string" + }, "extend": { "additionalProperties": false, "properties": { @@ -6913,6 +7006,57 @@ "schemeName": { "type": "string" }, + "structures": { + "additionalProperties": false, + "properties": { + "permanent": { + "additionalProperties": false, + "properties": { + "count": { + "type": "number" + } + }, + "required": [ + "count" + ], + "type": "object" + }, + "temporary": { + "additionalProperties": false, + "properties": { + "count": { + "type": "number" + } + }, + "required": [ + "count" + ], + "type": "object" + }, + "total": { + "type": "number" + }, + "type": { + "enum": [ + "bridge", + "catchpit", + "culvert", + "pipe", + "gully", + "headwall", + "manhole", + "weir", + "other" + ], + "type": "string" + } + }, + "required": [ + "type", + "total" + ], + "type": "object" + }, "units": { "additionalProperties": false, "properties": { @@ -7334,6 +7478,30 @@ "grey" ], "type": "object" + }, + "watercourse": { + "additionalProperties": false, + "properties": { + "name": { + "type": "string" + }, + "type": { + "enum": [ + "ditch", + "millStream", + "pond", + "river", + "streamOrBrook", + "other" + ], + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "type": "object" } }, "required": [ @@ -7342,6 +7510,81 @@ ], "type": "object" }, + "MaintenanceContact": { + "$id": "#MaintenanceContact", + "description": "Contact information for the person(s) responsible for maintenance while the works are carried out", + "items": { + "additionalProperties": false, + "properties": { + "address": { + "$ref": "#/definitions/Address" + }, + "contact": { + "additionalProperties": false, + "properties": { + "company": { + "additionalProperties": false, + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "email": { + "type": "string" + }, + "name": { + "additionalProperties": false, + "properties": { + "first": { + "type": "string" + }, + "last": { + "type": "string" + }, + "title": { + "type": "string" + } + }, + "required": [ + "first", + "last" + ], + "type": "object" + }, + "phone": { + "type": "string" + } + }, + "required": [ + "name", + "email", + "phone" + ], + "type": "object" + }, + "when": { + "enum": [ + "duringConstruction", + "afterConstruction", + "duringAndAfterConstruction" + ], + "type": "string" + } + }, + "required": [ + "when", + "address", + "contact" + ], + "type": "object" + }, + "type": "array" + }, "Materials": { "additionalProperties": false, "properties": { @@ -8202,6 +8445,28 @@ ], "type": "object" }, + "PlanningApplication": { + "$id": "#PlanningApplication", + "additionalProperties": false, + "description": "Details of the planning application linked to this application, if applicable", + "properties": { + "date": { + "$ref": "#/definitions/Date" + }, + "localPlanningAuthority": { + "type": "string" + }, + "reference": { + "type": "string" + } + }, + "required": [ + "reference", + "date", + "localPlanningAuthority" + ], + "type": "object" + }, "PlanningConstraint": { "$id": "#PlanningConstraint", "anyOf": [ @@ -9793,7 +10058,7 @@ "PreApplication": { "$id": "#PreApplication", "additionalProperties": false, - "description": "Details of the pre-application, if applicable", + "description": "Details of the pre-application preceeding this application, if applicable", "properties": { "date": { "$ref": "#/definitions/Date" @@ -14597,6 +14862,24 @@ ], "type": "object" }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Maintenance of an existing structure", + "type": "string" + }, + "value": { + "const": "maintain", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, { "additionalProperties": false, "properties": { @@ -14943,7 +15226,7 @@ "additionalProperties": false, "properties": { "description": { - "const": "Erect a temporary structure for historic visitor attractions and listed buildings", + "const": "Build a temporary structure", "type": "string" }, "value": { diff --git a/scripts/build-json-examples.ts b/scripts/build-json-examples.ts index 3bf2fab4..434a9289 100644 --- a/scripts/build-json-examples.ts +++ b/scripts/build-json-examples.ts @@ -1,6 +1,7 @@ import * as fs from 'fs'; import * as path from 'path'; +import {landDrainageConsent} from '../examples/data/landDrainageConsent'; import {lawfulDevelopmentCertificateExisting} from '../examples/data/lawfulDevelopmentCertificate/existing'; import {lawfulDevelopmentCertificateProposed} from '../examples/data/lawfulDevelopmentCertificate/proposed'; import {listedBuildingConsent} from '../examples/data/listedBuildingConsent'; @@ -64,6 +65,10 @@ const examplesToConvert: Example[] = [ filename: 'listedBuildingConsent', data: listedBuildingConsent, }, + { + filename: 'landDrainageConsent', + data: landDrainageConsent, + }, ]; const convertTypeScriptObjectsToJSONFiles = (objects: Example[]) => { diff --git a/tests/usage.test.ts b/tests/usage.test.ts index 316c9597..47b60793 100644 --- a/tests/usage.test.ts +++ b/tests/usage.test.ts @@ -1,9 +1,9 @@ -import {priorApprovalLargerExtension} from './../examples/data/priorApproval/largerExtension'; import Ajv from 'ajv'; import addFormats from 'ajv-formats'; import {Validator} from 'jsonschema'; import {describe, expect, test} from 'vitest'; +import {landDrainageConsent} from '../examples/data/landDrainageConsent'; import {lawfulDevelopmentCertificateExisting} from '../examples/data/lawfulDevelopmentCertificate/existing'; import {lawfulDevelopmentCertificateProposed} from '../examples/data/lawfulDevelopmentCertificate/proposed'; import {listedBuildingConsent} from '../examples/data/listedBuildingConsent'; @@ -13,6 +13,7 @@ import {planningPermissionMinor} from '../examples/data/planningPermission/minor import {priorApprovalBuildHomes} from '../examples/data/priorApproval/buildHomes'; import {priorApprovalConvertCommercialToHome} from '../examples/data/priorApproval/convertCommercialToHome'; import {priorApprovalExtendUniversity} from '../examples/data/priorApproval/extendUniversity'; +import {priorApprovalLargerExtension} from './../examples/data/priorApproval/largerExtension'; import {priorApprovalSolarPanels} from '../examples/data/priorApproval/solarPanels'; import generatedSchema from '../schema/schema.json'; @@ -28,6 +29,7 @@ const examplesToTest = [ priorApprovalBuildHomes, priorApprovalConvertCommercialToHome, priorApprovalLargerExtension, + landDrainageConsent, ]; describe("parsing using the 'jsonschema' library", () => { diff --git a/types/enums/ProjectTypes.ts b/types/enums/ProjectTypes.ts index 6373e463..ef5bebc8 100644 --- a/types/enums/ProjectTypes.ts +++ b/types/enums/ProjectTypes.ts @@ -313,6 +313,7 @@ export const ProjectTypes = { 'internal.staircases': 'Alter internal staircases', 'internal.walls': 'Alter internal walls', 'internal.windows.openings': 'Alter internal window openings', + maintain: 'Maintenance of an existing structure', new: 'Add a new separate building or self-contained units', 'new.agriculture': 'New agricultural buildings', 'new.agriculture.glasshouse': 'New agricultural buildings - glasshouse', @@ -332,8 +333,7 @@ export const ProjectTypes = { 'new.residential.dwelling': 'Build new homes', 'new.retail': 'New retail premises', 'new.telecoms': 'Install telecommunications equipment', - 'new.temporaryStructure': - 'Erect a temporary structure for historic visitor attractions and listed buildings', + 'new.temporaryStructure': 'Build a temporary structure', 'new.warehouse': 'New storage or distribution premises', not: 'Negate a project type', 'not.alter.replace': 'Do not add or change windows or doors', diff --git a/types/schema/data/Applicant.ts b/types/schema/data/Applicant.ts index 1977230e..598b5a0f 100644 --- a/types/schema/data/Applicant.ts +++ b/types/schema/data/Applicant.ts @@ -28,6 +28,7 @@ export interface BaseApplicant { address: UserAddress; ownership?: Ownership; siteContact: SiteContact; + maintenanceContact?: MaintenanceContact; } /** @@ -164,3 +165,27 @@ export interface SiteContactOther { email: string; phone: string; } + +/** + * @id #MaintenanceContact + * @description Contact information for the person(s) responsible for maintenance while the works are carried out + */ +export type MaintenanceContact = { + when: + | 'duringConstruction' + | 'afterConstruction' + | 'duringAndAfterConstruction'; + address: Address; + contact: { + name: { + title?: string; + first: string; + last: string; + }; + email: string; + phone: string; + company?: { + name: string; + }; + }; +}[]; diff --git a/types/schema/data/Application.ts b/types/schema/data/Application.ts index 1264341c..2e4761ed 100644 --- a/types/schema/data/Application.ts +++ b/types/schema/data/Application.ts @@ -12,6 +12,7 @@ export interface BaseApplication { fee: ApplicationFee | ApplicationFeeNotApplicable; declaration: ApplicationDeclaration; preApp?: PreApplication; + planningApp?: PlanningApplication; CIL?: CommunityInfrastructureLevy; } @@ -150,7 +151,7 @@ export interface ApplicationDeclaration { /** * @id #PreApplication - * @description Details of the pre-application, if applicable + * @description Details of the pre-application preceeding this application, if applicable */ export interface PreApplication { reference: string; @@ -159,6 +160,16 @@ export interface PreApplication { summary: string; } +/** + * @id #PlanningApplication + * @description Details of the planning application linked to this application, if applicable + */ +export interface PlanningApplication { + reference: string; + date: Date; + localPlanningAuthority: string; +} + /** * @id #CommunityInfrastructureLevy * @description Details about the Community Infrastructure Levy planning charge, if applicable diff --git a/types/schema/data/Proposal.ts b/types/schema/data/Proposal.ts index 00c668b0..7d076599 100644 --- a/types/schema/data/Proposal.ts +++ b/types/schema/data/Proposal.ts @@ -105,6 +105,30 @@ export interface BaseProposal { newBuild?: {count: number}; }; units?: ResidentialUnits; + watercourse?: { + name: string; + type: 'ditch' | 'millStream' | 'pond' | 'river' | 'streamOrBrook' | 'other'; + }; + structures?: { + type: + | 'bridge' + | 'catchpit' + | 'culvert' + | 'pipe' + | 'gully' + | 'headwall' + | 'manhole' + | 'weir' + | 'other'; + total: number; + permanent?: { + count: number; + }; + temporary?: { + count: number; + }; + }; + environmentalImpactDescription?: string; } /**