From 105725812bd2eae3a530860c7019775f654b29b6 Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Tue, 3 Oct 2023 18:18:37 +0200 Subject: [PATCH 1/6] update examples to reflect real app types --- examples/data/Applicant.ts | 87 - examples/data/Application.ts | 30 - examples/data/Property.ts | 68 - examples/data/Proposal.ts | 37 - examples/data/Responses.ts | 32 - examples/data/ldcE.ts | 2433 +++++++++++++++ examples/data/ldcP.ts | 1126 +++++++ examples/data/planningPermission.ts | 1565 ++++++++++ examples/data/priorApproval.ts | 1056 +++++++ examples/index.ts | 95 - examples/validExampleAgent.json | 298 -- examples/validExampleApplicant.json | 292 -- ...dLawfulDevelopmentCertificateExisting.json | 2627 +++++++++++++++++ ...dLawfulDevelopmentCertificateProposed.json | 1188 ++++++++ examples/validPlanningPermission.json | 1586 ++++++++++ examples/validPriorApproval.json | 1104 +++++++ schema/schema.json | 3 +- scripts/build-json-examples.ts | 23 +- tests/usage.test.ts | 40 +- types/Schema.ts | 4 +- 20 files changed, 12732 insertions(+), 962 deletions(-) delete mode 100644 examples/data/Applicant.ts delete mode 100644 examples/data/Application.ts delete mode 100644 examples/data/Property.ts delete mode 100644 examples/data/Proposal.ts delete mode 100644 examples/data/Responses.ts create mode 100644 examples/data/ldcE.ts create mode 100644 examples/data/ldcP.ts create mode 100644 examples/data/planningPermission.ts create mode 100644 examples/data/priorApproval.ts delete mode 100644 examples/index.ts delete mode 100644 examples/validExampleAgent.json delete mode 100644 examples/validExampleApplicant.json create mode 100644 examples/validLawfulDevelopmentCertificateExisting.json create mode 100644 examples/validLawfulDevelopmentCertificateProposed.json create mode 100644 examples/validPlanningPermission.json create mode 100644 examples/validPriorApproval.json diff --git a/examples/data/Applicant.ts b/examples/data/Applicant.ts deleted file mode 100644 index 2cdf6ae6..00000000 --- a/examples/data/Applicant.ts +++ /dev/null @@ -1,87 +0,0 @@ -import {Schema} from '../../types/Schema'; - -export const validApplicant: Schema['data']['applicant'] = { - type: 'individual', - contact: { - name: { - first: 'Test', - last: 'Test', - }, - email: 'test@test.com', - phone: { - primary: '123', - }, - }, - address: { - sameAsSiteAddress: true, - }, - siteContact: { - role: 'applicant', - }, - interest: 'owner.co', - ownership: { - certificate: 'a', - noticeGiven: true, - owners: [ - { - name: 'Owner 1', - address: { - line1: '123 Main Street', - town: 'Anywhere', - postcode: 'SE5 0HU', - }, - noticeDate: '2023-10-01', - }, - { - name: 'Owner 2', - address: 'Same as Owner 1', - }, - ], - }, -}; - -export const validAgent: Schema['data']['applicant'] = { - type: 'charity', - contact: { - name: { - first: 'Test', - last: 'Test', - }, - email: 'test@test.com', - phone: { - primary: '123', - }, - company: { - name: 'Test Charity Ltd', - }, - }, - address: { - sameAsSiteAddress: false, - line1: '123 Test', - town: 'Test', - postcode: 'TES T12', - }, - agent: { - contact: { - name: { - first: 'Agent', - last: 'Agent', - }, - email: 'agent@test.com', - phone: { - primary: '123', - }, - }, - address: { - line1: '456 Test', - town: 'Test', - postcode: 'TES T34', - }, - }, - siteContact: { - role: 'other', - name: 'Neighbor', - email: 'neighbor@test.com', - phone: '567', - }, -}; diff --git a/examples/data/Application.ts b/examples/data/Application.ts deleted file mode 100644 index f96cfd3a..00000000 --- a/examples/data/Application.ts +++ /dev/null @@ -1,30 +0,0 @@ -import {Schema} from '../../types/Schema'; - -export const validApplication: Schema['data']['application'] = { - type: { - value: 'ldc.proposed', - description: 'Lawful Development Certificate - Proposed', - }, - fee: { - calculated: 103, - payable: 103, - exemption: { - disability: false, - resubmission: false, - }, - reduction: { - alternative: false, - parishCouncil: false, - sports: false, - }, - reference: { - govPay: 'abc123', - }, - }, - declaration: { - accurate: true, - connection: { - value: 'none', - }, - }, -}; diff --git a/examples/data/Property.ts b/examples/data/Property.ts deleted file mode 100644 index a1acea3c..00000000 --- a/examples/data/Property.ts +++ /dev/null @@ -1,68 +0,0 @@ -import {Schema} from '../../types/Schema'; - -export const validProperty: Schema['data']['property'] = { - address: { - uprn: '200003453480', - usrn: '22500531', - latitude: 51.4859056, - longitude: -0.0760466, - pao: '47', - street: 'COBOURG ROAD', - town: 'LONDON', - postcode: 'SE5 0HU', - x: 533683, - y: 178083, - title: '47, COBOURG ROAD, LONDON', - source: 'Ordnance Survey', - }, - region: 'London', - localAuthorityDistrict: ['Southwark'], - type: { - value: 'residential.HMO.parent', - description: 'HMO Parent', - }, - boundary: { - site: { - type: 'Feature', - geometry: { - type: 'Polygon', - coordinates: [ - [ - [-0.1186569035053321, 51.465703531871384], - [-0.1185938715934822, 51.465724418998775], - [-0.1184195280075143, 51.46552473766957], - [-0.11848390102387167, 51.4655038504508], - [-0.1186569035053321, 51.465703531871384], - ], - ], - }, - properties: null, - }, - area: { - squareMetres: 10000, - hectares: 1, - }, - }, - constraints: { - planning: [ - { - value: 'listed', - description: 'Listed Building', - overlaps: false, - }, - { - value: 'designated.conservationArea', - description: 'Conservation Area', - overlaps: true, - entities: ['Cobourg Road Nature Preserve'], - }, - ], - }, - titleNumber: { - known: 'Yes', - number: '123', - }, - EPC: { - known: 'The property does not have one', - }, -}; diff --git a/examples/data/Proposal.ts b/examples/data/Proposal.ts deleted file mode 100644 index 4846a087..00000000 --- a/examples/data/Proposal.ts +++ /dev/null @@ -1,37 +0,0 @@ -import {Schema} from '../../types/Schema'; - -export const validProposal: Schema['data']['proposal'] = { - projectType: [ - { - value: 'alter.equipment.solar', - description: 'Install solar panels', - }, - { - value: 'new.leisure', - description: 'Leisure premises', - }, - ], - description: 'This is a test application', - boundary: { - site: { - type: 'Feature', - geometry: { - type: 'Polygon', - coordinates: [ - [ - [-0.1186569035053321, 51.465703531871384], - [-0.1185938715934822, 51.465724418998775], - [-0.1184195280075143, 51.46552473766957], - [-0.11848390102387167, 51.4655038504508], - [-0.1186569035053321, 51.465703531871384], - ], - ], - }, - properties: null, - }, - area: { - squareMetres: 10000, - hectares: 1, - }, - }, -}; diff --git a/examples/data/Responses.ts b/examples/data/Responses.ts deleted file mode 100644 index 8dcddd6e..00000000 --- a/examples/data/Responses.ts +++ /dev/null @@ -1,32 +0,0 @@ -import {Schema} from '../../types/Schema'; - -export const validResponses: Schema['responses'] = [ - { - metadata: { - sectionName: 'The property', - autoAnswered: true, - }, - question: 'Is the property in London Borough of Southwark?', - responses: [ - { - value: 'Yes', - }, - ], - }, - { - metadata: { - policyRefs: [ - { - text: 'Town and Country Planning Act 1990, Part 7, Section 191 & Section 192', - }, - ], - sectionName: 'About the project', - }, - question: 'What are you applying about?', - responses: [ - { - value: 'Proposed changes I want to make in the future', - }, - ], - }, -]; diff --git a/examples/data/ldcE.ts b/examples/data/ldcE.ts new file mode 100644 index 00000000..04d7d9f9 --- /dev/null +++ b/examples/data/ldcE.ts @@ -0,0 +1,2433 @@ +import {Schema} from '../../types/Schema'; + +export const validLDCE: Schema = { + data: { + application: { + type: { + value: 'ldc.existing', + description: 'Lawful Development Certificate - Existing', + }, + fee: { + calculated: 206, + payable: 206, + exemption: { + disability: true, + resubmission: true, + }, + reduction: { + sports: true, + parishCouncil: true, + alternative: true, + }, + }, + declaration: { + accurate: true, + connection: { + value: 'none', + }, + }, + }, + user: { + role: 'agent', + }, + applicant: { + type: 'individual', + contact: { + name: { + first: 'Roald', + last: 'Dahl', + }, + email: 'f.fox@boggischickenshed.com', + phone: { + primary: 'Not provided by agent', + }, + company: {}, + }, + address: { + sameAsSiteAddress: true, + }, + siteContact: { + role: 'applicant', + }, + interest: 'owner.co', + ownership: { + certificate: 'b', + noticeGiven: true, + owners: [ + { + name: 'Matilda Wormwood', + address: { + town: 'Reading', + line1: '9, Library Way', + line2: '', + county: '', + country: '', + postcode: 'L1T3R8Y', + }, + noticeDate: '1988-04-01', + }, + ], + }, + agent: { + contact: { + name: { + first: 'F', + last: 'Fox', + }, + email: 'f.fox@boggischickenshed.com', + phone: { + primary: '0234 567 8910', + }, + company: {}, + }, + address: { + line1: 'The Tree', + line2: 'One Tree Hill', + town: 'Great Tunnelling', + county: '', + postcode: 'F0XH0L3', + country: '', + }, + }, + }, + property: { + address: { + latitude: 51.6994957, + longitude: -0.708966, + x: 489320, + y: 200872, + title: 'GIPSY HOUSE, WHITEFIELD LANE, GREAT MISSENDEN', + source: 'Ordnance Survey', + uprn: '100081174436', + usrn: '07300709', + pao: '', + street: 'WHITEFIELD LANE', + town: 'GREAT MISSENDEN', + postcode: 'HP16 0BP', + }, + boundary: { + site: { + type: 'Feature', + geometry: { + type: 'Polygon', + coordinates: [ + [ + [-0.7085376977920632, 51.699564621757816], + [-0.7086127996444802, 51.69965605327502], + [-0.708982944488535, 51.699654390885456], + [-0.7089909911155797, 51.699673508361855], + [-0.7089319825172521, 51.699683482694184], + [-0.7089520990848638, 51.69973002954916], + [-0.7091867923736667, 51.69968930105364], + [-0.7092216610908603, 51.699688469859495], + [-0.709239095449457, 51.69968514508267], + [-0.709253847599039, 51.6997134056779], + [-0.7093128561973666, 51.69970176896433], + [-0.7092699408531282, 51.699610337539525], + [-0.7096253335476013, 51.699648572521454], + [-0.7098613679409116, 51.69958457046823], + [-0.7098962366581053, 51.69955049141595], + [-0.7098090648651213, 51.6994216557425], + [-0.7099243998527616, 51.699390070166544], + [-0.7098264992237182, 51.699238791576136], + [-0.7097460329532714, 51.699236297968724], + [-0.7095716893673034, 51.69927536446852], + [-0.7095421850681398, 51.69927619567025], + [-0.7092954218387698, 51.69931941814053], + [-0.7090929150581455, 51.69937427737031], + [-0.709021836519251, 51.69938923896689], + [-0.7089574635028936, 51.6994008757608], + [-0.7088904082775213, 51.69942082454341], + [-0.7086691260337761, 51.699501450783515], + [-0.7086181640624932, 51.699517243535354], + [-0.7085457444191079, 51.699541348251245], + [-0.7085350155830483, 51.69954799782576], + [-0.7085376977920632, 51.699564621757816], + ], + ], + }, + properties: null, + }, + area: { + hectares: 0.299367, + squareMetres: 2993.67, + }, + }, + constraints: { + planning: [ + { + value: 'tpo', + description: 'Tree Preservation Order (TPO) or zone', + overlaps: false, + }, + { + value: 'listed', + description: 'Listed Building', + overlaps: false, + }, + { + value: 'article4', + description: 'Article 4 Direction area', + overlaps: true, + entities: [ + 'Whole District excluding the Town of Chesham - Poultry production. - 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.', + ], + }, + { + value: 'monument', + description: 'Site of a Scheduled Monument', + overlaps: false, + }, + { + value: 'designated', + description: 'Designated land', + overlaps: true, + entities: [], + }, + { + value: 'nature.SAC', + description: 'Special Area of Conservation (SAC)', + overlaps: false, + }, + { + value: 'nature.ASNW', + description: 'Ancient Semi-Natural Woodland (ASNW)', + overlaps: false, + }, + { + value: 'nature.SSSI', + description: 'Site of Special Scientific Interest (SSSI)', + overlaps: false, + }, + { + value: 'locallyListed', + description: 'Locally Listed Building', + overlaps: false, + }, + { + value: 'designated.SPA', + description: 'Special Protection Area (SPA)', + overlaps: false, + }, + { + value: 'designated.WHS', + description: 'UNESCO World Heritage Site or buffer zone', + overlaps: false, + }, + { + value: 'registeredPark', + description: 'Historic Park or Garden', + overlaps: false, + }, + { + value: 'designated.AONB', + description: 'Area of Outstanding Natural Beauty (AONB)', + overlaps: true, + entities: ['Chilterns'], + }, + { + value: 'designated.nationalPark', + description: 'National Park', + overlaps: false, + }, + { + value: 'designated.conservationArea', + description: 'Conservation Area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.caz', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.os262', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'designated.nationalPark.broads', + description: 'National Park - Broads', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.fulmer', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.os1178', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.os3100', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.os4729', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.os5200', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.os6961', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.os8050', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.os8349', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.ivylane', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.piggery', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.poultry', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.millfarm', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.os3313.a', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.os3313.b', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.pennroad', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.pennwood', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.bourneend', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.deanfield', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.ferrylane', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.fourwinds', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.lodgelane', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.manorfarm', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.northA404', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.northpark', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.rockylane', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.southA413', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.wigginton', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.DO10fulmer', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.bakerswood', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.botleyroad', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.churchlane', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.commonwood', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.greenacres', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.purtonlane', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.saunderton', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.sedgesfarm', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.valleyroad', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.widmerfarm', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.wiltonlane', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.wyburnwood', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.burtonslane', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.cheshamroad', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.collumgreen', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.georgegreen', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.gravellyway', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.hampdenroad', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.lakeendroad', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.rearuplands', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.turnerswood', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.wellcottage', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.winslowroad', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.amershamroad', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.boismoorroad', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.boundaryroad', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.bridgestreet', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.eastvaleroad', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.johnsonsfarm', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.officetoresi', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.ruralwycombe', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.stokenchurch', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.wooburngreen', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.asheridgeroad', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.ballingerroad', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.coneybankwood', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.ferrylaneagri', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.lodgelaneagri', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.ministrywharf', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.northlongpark', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.shepherdsfold', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.southkilnlane', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.southsidekiln', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.threeoaksfarm', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.twyfordgrange', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.beamondendfarm', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.chartridgelane', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.commonwoodagri', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.cryershillroad', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.dorneywoodroad', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.eastjasonshill', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.eastmarishlane', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.littlekingsash', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.parkspringwood', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.pednorhighroad', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.piddingtonroad', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.ruralaylesbury', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.sibleyscoppice', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.turvillevalley', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.wyburnwoodagri', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.blackthornelane', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.eastjordanslane', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.fulmerplacefarm', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.hollybushcorner', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.mansionlanewest', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.parslowshillock', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.southchartridge', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.southswanbottom', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.woodlandsmeadow', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.amershamroadeast', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.bangorsroadnorth', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.broadviewchesham', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.mansionlanesouth', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.northjordansfarm', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.northorbitalroad', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.northwelderslane', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.potterrowcaravan', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.robertswooddrive', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.westwexhamstreet', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.wycombeheathfarm', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.collegeplantation', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.eastlodgelaneagri', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.greenstreetfarm.a', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.greenstreetfarm.b', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.pednorroadcaravan', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.sheepcotedellroad', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.skimmersorchard.a', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.skimmersorchard.b', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.skimmersorchard.c', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.weststhubertslane', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.ballingerroadnorth', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.bovingdonheights.a', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.bovingdonheights.b', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.commonwoodpennroad', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.eastlatimervillage', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.lodgelaneenclosure', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.phillipshillfarm.a', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.phillipshillfarm.b', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.potterrowenclosure', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.southeastfinchlane', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.southpenfoldlane.a', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.southpenfoldlane.b', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.southsheepcoteroad', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.wyburnwoodforestry', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.bryantsbottomroad.a', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.bryantsbottomroad.b', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.commonwoodenclosure', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.greenstreetfarmagri', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.northsidesevenhills', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.pednorroadenclosure', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.bakerswoodbrokengate', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.eastlodgelanecaravan', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.southlittlemissenden', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.westledgelanecaravan', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.wholedistrictpoultry', + description: 'Article 4 Direction area', + overlaps: true, + entities: [], + }, + { + value: 'article4.buckinghamshire.chalklaneanhydehealth', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.commonwoodandpennroad', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.copperkinslanecaravan', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.junctionhughendenroad', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.nightingaleslanestrip', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.pednorroaddrydelllane', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.southpenfoldlaneOS262', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.eastamershamroadOS0006', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.eastamershamroadOS9269', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.lodgelanewestenclosure', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.northandsouthhollowway', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.chessfieldparkenclosure', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.cooperkinslaneenclosure', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.wycombeheathfarmcaravan', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.coppicesouthheathcaravan', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.pednorroadanddrydelllane', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.northballingerroadvaravan', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.potkilnlaneandlaytersgreen', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.wycombehealthfarmnortheast', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.wycombehealthfarmspurlands', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'road.classified', + description: 'Classified Road', + overlaps: false, + }, + ], + }, + localAuthorityDistrict: ['Buckinghamshire', 'Chiltern'], + region: 'South East', + type: { + value: 'residential.dwelling.house.detached', + description: 'Detached', + }, + }, + proposal: { + projectType: [ + { + value: 'extend.outbuildings.studio', + description: 'Add an outbuilding - studio', + }, + ], + description: + 'Construction of a small outbuilding for use as a writing studio.', + boundary: { + site: { + type: 'Feature', + geometry: { + type: 'Polygon', + coordinates: [ + [ + [-0.7085376977920632, 51.699564621757816], + [-0.7086127996444802, 51.69965605327502], + [-0.708982944488535, 51.699654390885456], + [-0.7089909911155797, 51.699673508361855], + [-0.7089319825172521, 51.699683482694184], + [-0.7089520990848638, 51.69973002954916], + [-0.7091867923736667, 51.69968930105364], + [-0.7092216610908603, 51.699688469859495], + [-0.709239095449457, 51.69968514508267], + [-0.709253847599039, 51.6997134056779], + [-0.7093128561973666, 51.69970176896433], + [-0.7092699408531282, 51.699610337539525], + [-0.7096253335476013, 51.699648572521454], + [-0.7098613679409116, 51.69958457046823], + [-0.7098962366581053, 51.69955049141595], + [-0.7098090648651213, 51.6994216557425], + [-0.7099243998527616, 51.699390070166544], + [-0.7098264992237182, 51.699238791576136], + [-0.7097460329532714, 51.699236297968724], + [-0.7095716893673034, 51.69927536446852], + [-0.7095421850681398, 51.69927619567025], + [-0.7092954218387698, 51.69931941814053], + [-0.7090929150581455, 51.69937427737031], + [-0.709021836519251, 51.69938923896689], + [-0.7089574635028936, 51.6994008757608], + [-0.7088904082775213, 51.69942082454341], + [-0.7086691260337761, 51.699501450783515], + [-0.7086181640624932, 51.699517243535354], + [-0.7085457444191079, 51.699541348251245], + [-0.7085350155830483, 51.69954799782576], + [-0.7085376977920632, 51.699564621757816], + ], + ], + }, + properties: null, + }, + area: { + hectares: 0.299367, + squareMetres: 2993.67, + }, + }, + }, + }, + result: [ + { + value: 'Planning permission / Immune', + description: + 'It looks like the changes may now be beyond the time limit for enforcement action. This does not apply if the changes have been deliberately concealed.', + }, + ], + responses: [ + { + question: 'List the changes involved in the project', + responses: [ + { + value: 'Outbuildings (such as sheds, garages or garden offices)', + }, + ], + metadata: {}, + }, + { + question: 'What type of changes were they?', + responses: [ + { + value: 'Extension', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Were the works carried out more than 4 years ago?', + responses: [ + { + value: 'Yes', + metadata: { + flags: ['Planning permission / Immune'], + }, + }, + ], + metadata: { + policyRefs: [ + { + text: 'Town and Country Planning Act 1990 Section 171B', + }, + ], + }, + }, + { + question: 'Have the works been completed?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: { + policyRefs: [ + { + text: 'Town and Country Planning Act 1990 Section 171B', + }, + ], + }, + }, + { + question: 'When were the works completed?', + responses: [ + { + value: '1959-01-01', + }, + ], + metadata: { + policyRefs: [ + { + text: 'Town and Country Planning Act 1990 Section 171B', + }, + ], + }, + }, + { + question: 'Has anyone ever attempted to conceal the changes?', + responses: [ + { + value: 'No', + metadata: { + flags: ['Planning permission / Immune'], + }, + }, + ], + metadata: { + policyRefs: [ + { + text: 'Secretary of State for Communities and Local Government and another v Welwyn Hatfield Borough Council and Bonsall / Jackson v Secretary of State for Communities and Local Government', + }, + ], + }, + }, + { + question: 'Has enforcement action been taken about these changes?', + responses: [ + { + value: 'No', + metadata: { + flags: ['Planning permission / Immune'], + }, + }, + ], + metadata: { + policyRefs: [ + { + text: "Enforcement action is defined in the Town and Country Planning Act 1990 Section 171A.\n'Lawful development' is defined in the Town and Country Planning Act 1990 Section 191.", + }, + ], + }, + }, + { + question: 'List the changes involved in the project', + responses: [ + { + value: 'Add an outbuilding (such as a shed, garage or garden office)', + }, + { + value: 'Outbuildings (such as a shed, garage or garden office)', + }, + ], + metadata: { + autoAnswered: true, + policyRefs: [ + { + text: 'Town and Country Planning Act 1990 (Section 55), The Town and Country Planning (General Permitted Development) (England) Order 2015', + }, + ], + }, + }, + { + question: 'What type of house is it?', + responses: [ + { + value: 'Detached', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'What type of property is it?', + responses: [ + { + value: 'House', + }, + ], + metadata: { + autoAnswered: true, + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Development Order 2015.\nSection 336 of the Town and Country Planning Act.', + }, + ], + }, + }, + { + question: 'Is any part of the property listed?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + policyRefs: [ + { + text: 'The Town The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class E.', + }, + ], + }, + }, + { + question: 'Was the house originally built as a house?', + responses: [ + { + value: 'Yes, it was built as a house', + }, + ], + metadata: {}, + }, + { + question: 'Was the house built before 2020?', + responses: [ + { + value: 'Yes, it was built before 2020', + }, + ], + metadata: {}, + }, + { + question: 'What is the new outbuilding used for?', + responses: [ + { + value: 'Studio', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class E', + }, + ], + }, + }, + { + question: 'How will the studio be used?', + responses: [ + { + value: 'Personal use', + metadata: { + flags: ['Planning permission / Permitted development'], + }, + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Section 2, Part 1. Class E', + }, + ], + }, + }, + { + question: 'How many storeys does the new outbuilding have?', + responses: [ + { + value: '1 storey', + metadata: { + flags: ['Planning permission / Permitted development'], + }, + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Section 2, Part 1. Class E.1 (d) (h)', + }, + ], + }, + }, + { + question: + 'Does the outbuilding include any balconies, decks, verandahs or platforms that are more than 30cm above ground level?', + responses: [ + { + value: 'No', + metadata: { + flags: ['Planning permission / Permitted development'], + }, + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Section 2, Part 1. Class E.1 (d)(h)', + }, + ], + }, + }, + { + question: + 'Is any part of the new outbuilding in front of the original house?', + responses: [ + { + value: 'No', + metadata: { + flags: ['Planning permission / Permitted development'], + }, + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class E.1 (c)', + }, + ], + }, + }, + { + question: 'Is the property on designated land?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: + 'Is any part of the new outbuilding between a side wall of the original house and the boundary?', + responses: [ + { + value: 'No', + metadata: { + flags: ['Planning permission / Permitted development'], + }, + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class E.3', + }, + ], + }, + }, + { + question: 'Is any part of the new structure within 2m of the boundary?', + responses: [ + { + value: 'No, it is 2m or more from the boundary', + }, + ], + metadata: {}, + }, + { + question: 'What type of roof does the new outbuilding have?', + responses: [ + { + value: 'Dual pitch roof', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class E', + }, + ], + }, + }, + { + question: 'How high is the new outbuilding?', + responses: [ + { + value: '4m or lower', + metadata: { + flags: ['Planning permission / Permitted development'], + }, + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class E.1 (e)(ii)', + }, + ], + }, + }, + { + question: 'Is the property on designated land?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Is the property in any of the following?', + responses: [ + { + value: 'An area of outstanding natural beauty', + metadata: { + flags: ['Planning permission / Permission needed'], + }, + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'How far from the house is the new outbuilding?', + responses: [ + { + value: 'More than 20m from the house', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class E', + }, + ], + }, + }, + { + question: + 'What is the total footprint of all outbuildings more than 20m from the house?', + responses: [ + { + value: '10m² or less', + metadata: { + flags: ['Planning permission / Permitted development'], + }, + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class E.2', + }, + ], + }, + }, + { + question: + 'How much of the property is covered by extensions and outbuildings?', + responses: [ + { + value: '50% or less of the available area around the original house', + metadata: { + flags: ['Planning permission / Permitted development'], + }, + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class E.1 (b)', + }, + ], + }, + }, + { + question: + 'Does the new outbuilding have a satellite dish or antenna on it?', + responses: [ + { + value: 'No', + metadata: { + flags: ['Planning permission / Permitted development'], + }, + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class E.1 (i)', + }, + ], + }, + }, + { + question: 'Is the new outbuilding air conditioned?', + responses: [ + { + value: 'No', + metadata: { + flags: ['Planning permission / Not development'], + }, + }, + ], + metadata: {}, + }, + { + question: 'What types of changes does the project involve?', + responses: [ + { + value: 'Extension', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: + 'Have you already told us that you are doing works to a tree or hedge?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Are there any protected trees on the property?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Is the site in a conservation area?', + responses: [ + { + value: 'No', + metadata: { + flags: ['Works to trees & hedges / Not required'], + }, + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'What are you applying about?', + responses: [ + { + value: 'Existing changes I have made in the past', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'What do the works involve?', + responses: [ + { + value: 'Works to extend a property', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'What does the project involve?', + responses: [ + { + value: + 'Add an outbuilding (such as sheds, shelters or garden offices)', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Is it a residential property?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Do the changes involve the creation of any new homes?', + responses: [ + { + value: 'No', + }, + ], + metadata: {}, + }, + { + question: + 'Do the changes involve creating any new bedrooms or bathrooms?', + responses: [ + { + value: 'No', + }, + ], + metadata: {}, + }, + { + question: 'What is the internal floor area of the new outbuilding?', + responses: [ + { + value: '9', + }, + ], + metadata: {}, + }, + { + question: 'Do the changes involve the creation of any new homes?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Is the property in the Greater London Authority area?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + policyRefs: [ + { + text: 'Greater London Authority Act 1999', + }, + ], + }, + }, + { + question: 'Your contact details', + responses: [ + { + value: 'Mr F Fox 0234 567 8910 f.fox@boggischickenshed.com', + }, + ], + metadata: {}, + }, + { + question: "Did you already provide the applicant's email address?", + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: "Applicant's email address", + responses: [ + { + value: 'r.dahl@example.com', + }, + ], + metadata: {}, + }, + { + question: "Did you already provide the applicant's telephone number?", + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: "Applicant's telephone number", + responses: [ + { + value: '01098 765 432', + }, + ], + metadata: {}, + }, + { + question: 'Which of these best describes you?', + responses: [ + { + value: "Agent acting on the applicant's behalf", + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Have you notified the other owners?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: {}, + }, + { + question: + "Which of these best describes the applicant's interest in the land?", + responses: [ + { + value: 'Co-owner', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (Development Management Procedure) (England) Order 2015', + }, + ], + }, + }, + { + question: 'How many other owners are there?', + responses: [ + { + value: 'Two or more other owners', + }, + ], + metadata: {}, + }, + { + question: 'Do you know who the other owners of the site are?', + responses: [ + { + value: 'Yes, all of them', + }, + ], + metadata: {}, + }, + { + question: 'How many owners are there in total?', + responses: [ + { + value: '3', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Full name of Owner 2', + responses: [ + { + value: 'William Wonka', + }, + ], + metadata: {}, + }, + { + question: 'Address of Owner 2', + responses: [ + { + value: + 'The Factory, 10, Scrumdiddlyumptious Avenue, Oomaph upon Ouse, CH0C0L8', + }, + ], + metadata: {}, + }, + { + question: 'Have you already notified the other owners?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Date on which notice was given to Owner 2', + responses: [ + { + value: '1964-04-01', + }, + ], + metadata: {}, + }, + { + question: 'Full name of Owner 3', + responses: [ + { + value: 'Matilda Wormwood', + }, + ], + metadata: {}, + }, + { + question: 'Address of Owner 3', + responses: [ + { + value: '9, Library Way, Reading, L1T3R8Y', + }, + ], + metadata: {}, + }, + { + question: 'Have you already notified the other owners?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Date on which notice was given to Owner 3', + responses: [ + { + value: '1988-04-01', + }, + ], + metadata: {}, + }, + { + question: 'What types of changes did the project involve?', + responses: [ + { + value: 'Extension', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: + 'Would you like to upload any photographs of the property as it is today?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: {}, + }, + { + question: 'What type of extension have you added?', + responses: [ + { + value: 'Outbuilding', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: + 'Is the roof of the outbuilding shown on a drawing you have already uploaded?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: {}, + }, + { + question: 'Did the works involve any alterations to ground levels?', + responses: [ + { + value: 'No', + }, + ], + metadata: {}, + }, + { + question: + 'Would you like to upload any photographs of the property before the changes?', + responses: [ + { + value: 'No', + }, + ], + metadata: {}, + }, + { + question: + 'Would you like to upload any other additional drawings or documents?', + responses: [ + { + value: 'No', + }, + ], + metadata: {}, + }, + { + question: 'Provide evidence of completion date', + responses: [ + { + value: 'Construction invoices', + }, + { + value: 'Other documents or correspondence', + }, + ], + metadata: {}, + }, + { + question: 'What do these construction invoices show?', + responses: [ + { + value: "Nothing, it's a test document. ", + }, + ], + metadata: {}, + }, + { + question: 'What do these documents show?', + responses: [ + { + value: 'Nothing really, this is just a test. ', + }, + ], + metadata: {}, + }, + { + question: 'What type of planning application are you making?', + responses: [ + { + value: 'Lawful Development Certificate', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'What type of changes are you applying for?', + responses: [ + { + value: 'Existing changes', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Is the property a home?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'What types of changes does the application relate to?', + responses: [ + { + value: 'Extension', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'How many homes does this application relate to?', + responses: [ + { + value: '1', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012 Schedule 1, Part 2', + }, + ], + }, + }, + { + question: 'What type of extension did you build?', + responses: [ + { + value: 'Outbuilding (such as shed, shelter or garden office', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Is the property a home?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'What works does the project involve?', + responses: [ + { + value: 'Extension', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: + 'Is the sole purpose of the project to support the needs of a disabled resident?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012, Regulation 14UK Statutory Instruments 2012 No. 2920 Regulation 4, Equalities Act 2010, Section 6 Children Act 1989, Part 3', + }, + ], + }, + }, + { + question: 'Is this application a resubmission?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012, Regulation 9', + }, + ], + }, + }, + { + question: 'Does the application qualify for a disability exemption?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Does the application qualify for a resubmission exemption?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Is the site a sports field?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + policyRefs: [ + { + text: 'The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012 Chapter 2, Paragraph 3', + }, + ], + }, + }, + { + question: + 'Is the application being made by (or on behalf of) a parish or community council?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + policyRefs: [ + { + text: 'The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012 - Regulation 11', + }, + ], + }, + }, + { + question: + 'Are you also submitting another proposal for the same site today?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012 Chapter 2, Paragraph 10', + }, + ], + }, + }, + { + question: + 'Does the application qualify for the sports club fee reduction?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: + 'Does the application qualify for the parish council reduction?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + policyRefs: [ + { + text: 'The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012 - Regulation 11', + }, + ], + }, + }, + { + question: + 'Does the application qualify for the alternative application reduction?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: + 'Did you get any pre-application advice before making this application?', + responses: [ + { + value: 'No', + }, + ], + metadata: {}, + }, + { + question: + 'What local planning authority is this application being sent to?', + responses: [ + { + value: 'Chiltern', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'What type of application is it?', + responses: [ + { + value: 'Lawful Development Certificate', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'What type of works are you applying about?', + responses: [ + { + value: 'Existing', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: "What is the applicant's interest in the land?", + responses: [ + { + value: 'Owner', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: "What is the user's role?", + responses: [ + { + value: 'Other', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: "What is the applicant's declared connections?", + responses: [ + { + value: 'None', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + ], + files: [ + { + name: 'https://api.editor.planx.dev/file/private/r34zxe3x/RoaldDahlHut.jpg', + type: [ + { + value: 'proposal.photograph', + description: 'Photographs', + }, + ], + }, + { + name: 'https://api.editor.planx.dev/file/private/kopklkj9/Site%20plan.pdf', + type: [ + { + value: 'proposal.drawing.sitePlan', + description: 'Site plan - proposed', + }, + ], + }, + { + name: 'https://api.editor.planx.dev/file/private/u2vjw69h/Elevations.pdf', + type: [ + { + value: 'proposal.drawing.elevation', + description: 'Elevation plan - proposed', + }, + ], + }, + { + name: 'https://api.editor.planx.dev/file/private/gbaur05c/Plan.pdf', + type: [ + { + value: 'proposal.drawing.floorPlan', + description: 'Floor plan - proposed', + }, + ], + }, + { + name: 'https://api.editor.planx.dev/file/private/4vhzu4c5/Roald-Dahl-letter-one-use.pdf', + type: [ + { + value: 'proposal.document.other.evidence', + description: 'Other - correspondence', + }, + ], + description: 'Nothing really, this is just a test. ', + }, + { + name: 'https://api.editor.planx.dev/file/private/uz72iu40/Test%20document.pdf', + type: [ + { + value: 'proposal.document.construction.invoice', + description: 'Construction invoice', + }, + ], + description: "Nothing, it's a test document. ", + }, + ], + metadata: { + service: { + flowId: 'c06eebb7-6201-4bc0-9fe7-ec5d7a1c0797', + publishedFlowId: 1, + name: 'Apply for a test service', + owner: 'opensystemslab', + url: 'https://www.editor.planx.uk/opensystemslab/apply-for-a-test-service/preview', + }, + session: { + source: 'PlanX', + id: 'session123', + createdAt: '2023-01-01 00:00:00', + submittedAt: '2023-01-02 00:00:00', + }, + schema: { + url: 'https://theopensystemslab.github.io/digital-planning-data-schemas/v0.0.1/schema.json', + }, + }, +}; diff --git a/examples/data/ldcP.ts b/examples/data/ldcP.ts new file mode 100644 index 00000000..6bef73bd --- /dev/null +++ b/examples/data/ldcP.ts @@ -0,0 +1,1126 @@ +import {Schema} from '../../types/Schema'; + +export const validLDCP: Schema = { + data: { + application: { + type: { + value: 'ldc.proposed', + description: 'Lawful Development Certificate - Proposed', + }, + fee: { + calculated: 103, + payable: 0, + exemption: { + disability: true, + resubmission: true, + }, + reduction: { + sports: false, + parishCouncil: false, + alternative: false, + }, + }, + declaration: { + accurate: true, + connection: { + value: 'none', + }, + }, + }, + user: { + role: 'applicant', + }, + applicant: { + type: 'individual', + contact: { + name: { + first: 'Enid', + last: 'Blyton', + }, + email: 'famousfive@example.com', + phone: { + primary: '05555 555 555', + }, + company: {}, + }, + address: { + sameAsSiteAddress: true, + }, + siteContact: { + role: 'applicant', + }, + interest: 'owner.sole', + ownership: { + certificate: 'a', + }, + }, + property: { + address: { + latitude: 51.6154458, + longitude: -0.6463271, + x: 493822, + y: 191603, + title: '7, BLYTON CLOSE, BEACONSFIELD', + source: 'Ordnance Survey', + uprn: '100080482163', + usrn: '35200844', + pao: '7', + street: 'BLYTON CLOSE', + town: 'BEACONSFIELD', + postcode: 'HP9 2LX', + }, + boundary: { + site: { + type: 'Feature', + geometry: { + type: 'Polygon', + coordinates: [ + [ + [-0.646633654832832, 51.61556919642334], + [-0.6466296315193095, 51.61554504700152], + [-0.6465049088001171, 51.61551173743314], + [-0.6464512646198194, 51.61522027766699], + [-0.6463131308555524, 51.61522943785954], + [-0.6463037431240002, 51.61520695374722], + [-0.6462487578391951, 51.615222775901515], + [-0.6462393701076429, 51.61520861923739], + [-0.6459456682205124, 51.615292726412235], + [-0.6460489332675857, 51.61561499701554], + [-0.646633654832832, 51.61556919642334], + ], + ], + }, + properties: null, + }, + area: { + hectares: 0.141826, + squareMetres: 1418.26, + }, + }, + constraints: { + planning: [ + { + value: 'tpo', + description: 'Tree Preservation Order (TPO) or zone', + overlaps: false, + }, + { + value: 'listed', + description: 'Listed Building', + overlaps: false, + }, + { + value: 'article4', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'monument', + description: 'Site of a Scheduled Monument', + overlaps: false, + }, + { + value: 'designated', + description: 'Designated land', + overlaps: false, + }, + { + value: 'nature.SAC', + description: 'Special Area of Conservation (SAC)', + overlaps: false, + }, + { + value: 'nature.ASNW', + description: 'Ancient Semi-Natural Woodland (ASNW)', + overlaps: false, + }, + { + value: 'nature.SSSI', + description: 'Site of Special Scientific Interest (SSSI)', + overlaps: false, + }, + { + value: 'locallyListed', + description: 'Locally Listed Building', + overlaps: false, + }, + { + value: 'designated.SPA', + description: 'Special Protection Area (SPA)', + overlaps: false, + }, + { + value: 'designated.WHS', + description: 'UNESCO World Heritage Site or buffer zone', + overlaps: false, + }, + { + value: 'registeredPark', + description: 'Historic Park or Garden', + overlaps: false, + }, + { + value: 'designated.AONB', + description: 'Area of Outstanding Natural Beauty (AONB)', + overlaps: false, + }, + { + value: 'designated.nationalPark', + description: 'National Park', + overlaps: false, + }, + { + value: 'designated.conservationArea', + description: 'Conservation Area', + overlaps: false, + }, + { + value: 'article4.buckinghamshire.caz', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'designated.nationalPark.broads', + description: 'National Park - Broads', + overlaps: false, + }, + { + value: 'road.classified', + description: 'Classified Road', + overlaps: false, + }, + ], + }, + localAuthorityDistrict: ['Buckinghamshire', 'South Bucks'], + region: 'South East', + type: { + value: 'residential.dwelling.house.detached', + description: 'Detached', + }, + }, + proposal: { + projectType: [ + { + value: 'extend.rear', + description: 'Add a rear or side extension (or conservatory)', + }, + ], + description: 'Rear extension of a home', + boundary: { + site: { + type: 'Feature', + geometry: { + type: 'Polygon', + coordinates: [ + [ + [-0.646633654832832, 51.61556919642334], + [-0.6466296315193095, 51.61554504700152], + [-0.6465049088001171, 51.61551173743314], + [-0.6464512646198194, 51.61522027766699], + [-0.6463131308555524, 51.61522943785954], + [-0.6463037431240002, 51.61520695374722], + [-0.6462487578391951, 51.615222775901515], + [-0.6462393701076429, 51.61520861923739], + [-0.6459456682205124, 51.615292726412235], + [-0.6460489332675857, 51.61561499701554], + [-0.646633654832832, 51.61556919642334], + ], + ], + }, + properties: null, + }, + area: { + hectares: 0.141826, + squareMetres: 1418.26, + }, + }, + }, + }, + result: [ + { + value: 'Planning permission / Permitted development', + description: + 'It looks like the proposed changes may fall within the rules for Permitted Development and therefore would not need planning permission.', + }, + ], + responses: [ + { + question: 'List the changes involved in the project', + responses: [ + { + value: 'Add a rear or side extension (or conservatory)', + }, + ], + metadata: { + policyRefs: [ + { + text: 'Town and Country Planning Act 1990 (Section 55), The Town and Country Planning (General Permitted Development) (England) Order 2015', + }, + ], + }, + }, + { + question: 'What type of property is it?', + responses: [ + { + value: 'House', + }, + ], + metadata: { + autoAnswered: true, + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015', + }, + ], + }, + }, + { + question: 'What type of house is it?', + responses: [ + { + value: 'Detached', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'How many storeys does the original house have?', + responses: [ + { + value: '2 or more', + }, + ], + metadata: {}, + }, + { + question: 'Does the original house have a projection to the rear?', + responses: [ + { + value: 'No', + }, + ], + metadata: {}, + }, + { + question: 'Was the house always a house?', + responses: [ + { + value: 'Yes, it was built as a house', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015, Schedule 2, Part 1, Class A', + }, + ], + }, + }, + { + question: 'Was the house built before 2020?', + responses: [ + { + value: 'Yes, it was built before 2020', + metadata: { + flags: ['Planning permission / Permitted development'], + }, + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class 1 A.', + }, + ], + }, + }, + { + question: 'How many storeys does the extension have?', + responses: [ + { + value: '1 storey', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Section 2, Part 1, Class A', + }, + ], + }, + }, + { + question: 'Does the original house have a projection to the rear?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Which of these best describes your project?', + responses: [ + { + value: 'Rear only', + }, + ], + metadata: { + policyRefs: [ + { + text: 'General Permitted Development Order 2015, Technical guidance (PDF)', + }, + ], + }, + }, + { + question: 'Is the property on designated land?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Is the property a site of special scientific interest?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'What type of house is it?', + responses: [ + { + value: 'Detached', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: + 'How far does the new addition extend beyond the back wall of the original house?', + responses: [ + { + value: 'Less than 4m', + metadata: { + flags: ['Planning permission / Permitted development'], + }, + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class A.1 (f)(i)', + }, + ], + }, + }, + { + question: 'What is the shortest distance to the property boundary?', + responses: [ + { + value: '2m or more', + }, + ], + metadata: {}, + }, + { + question: + 'Are the materials of the extension similar to the original house?', + responses: [ + { + value: 'Yes', + metadata: { + flags: ['Planning permission / Permitted development'], + }, + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class A', + }, + ], + }, + }, + { + question: 'Is the property on designated land?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: + 'How much of the property is covered by extensions and outbuildings?', + responses: [ + { + value: '50% or less of the available area around the original house', + metadata: { + flags: ['Planning permission / Permitted development'], + }, + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class A', + }, + ], + }, + }, + { + question: 'What types of changes does the project involve?', + responses: [ + { + value: 'Extension', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: + 'Have you already told us that you are doing works to a tree or hedge?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Are there any protected trees on the property?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Is the site in a conservation area?', + responses: [ + { + value: 'No', + metadata: { + flags: ['Works to trees & hedges / Not required'], + }, + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'What are you applying about?', + responses: [ + { + value: 'Proposed changes I want to make in the future', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'What do the works involve?', + responses: [ + { + value: 'Works to extend a property', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'What does the project involve?', + responses: [ + { + value: 'Add a rear or side extension (or conservatory)', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: + 'How much is the internal floor area of the property increasing by?', + responses: [ + { + value: '24', + }, + ], + metadata: {}, + }, + { + question: 'Is it a residential property?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Do the changes involve the creation of any new homes?', + responses: [ + { + value: 'No', + }, + ], + metadata: {}, + }, + { + question: + 'Do the changes involve creating any new bedrooms or bathrooms?', + responses: [ + { + value: 'No', + }, + ], + metadata: {}, + }, + { + question: 'Do the changes involve the creation of any new homes?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Is the property in the Greater London Authority area?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + policyRefs: [ + { + text: 'Greater London Authority Act 1999', + }, + ], + }, + }, + { + question: 'Which of these best describes you?', + responses: [ + { + value: 'Applicant', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Which of these best describes your interest in the land?', + responses: [ + { + value: 'Sole owner', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (Development Management Procedure) (England) Order 2015', + }, + ], + }, + }, + { + question: 'What types of changes does the project involve?', + responses: [ + { + value: 'Extension', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: + 'Does the work involve any alterations to ground or floor levels?', + responses: [ + { + value: 'No', + }, + ], + metadata: {}, + }, + { + question: 'Would you like to upload any photographs?', + responses: [ + { + value: 'No', + }, + ], + metadata: {}, + }, + { + question: 'What types of extension are being added?', + responses: [ + { + value: 'Rear or side', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Do you also want to add existing internal floor plans?', + responses: [ + { + value: 'No', + }, + ], + metadata: {}, + }, + { + question: + 'Is the roof of the extension already shown on another set of drawings?', + responses: [ + { + value: 'No', + }, + ], + metadata: {}, + }, + { + question: + 'Would you like to upload any additional drawings, documents or images?', + responses: [ + { + value: 'No', + }, + ], + metadata: {}, + }, + { + question: 'What type of planning application are you making?', + responses: [ + { + value: 'Lawful Development Certificate', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'What type of changes are you applying for?', + responses: [ + { + value: 'Proposed changes', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Is the property a home?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'What types of changes does the application relate to?', + responses: [ + { + value: 'Extension', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'How many homes does this application relate to?', + responses: [ + { + value: '1', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012 Schedule 1, Part 2', + }, + ], + }, + }, + { + question: 'What type of extension is it?', + responses: [ + { + value: 'Rear or side extension', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Is the property a home?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'What works does the project involve?', + responses: [ + { + value: 'Extension', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: + 'Is the sole purpose of the project to support the needs of a disabled resident?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012, Regulation 14UK Statutory Instruments 2012 No. 2920 Regulation 4, Equalities Act 2010, Section 6 Children Act 1989, Part 3', + }, + ], + }, + }, + { + question: 'Is this application a resubmission?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012, Regulation 9', + }, + ], + }, + }, + { + question: + 'Is this the first time you have resubmitted an application for this site?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012, Regulation 8', + }, + ], + }, + }, + { + question: 'What type of application is this?', + responses: [ + { + value: 'Lawful Development Certificate', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: "What was the original application's reference number?", + responses: [ + { + value: 'M8AG1C F4R4WAY TR33', + }, + ], + metadata: {}, + }, + { + question: + 'To qualify for a fee exemption, the proposed works must be of a similar description to the original application', + responses: [ + { + value: 'I understand', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012, Regulation 14', + }, + ], + }, + }, + { + question: 'What was the result of the original application?', + responses: [ + { + value: 'Withdrawn', + }, + ], + metadata: {}, + }, + { + question: 'When did you submit the original application?', + responses: [ + { + value: 'Within the last 12 months', + }, + ], + metadata: { + policyRefs: [ + { + text: 'UK Statutory Instruments 2012 No. 2920 Regulation 8', + }, + ], + }, + }, + { + question: 'Does the application qualify for a disability exemption?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'Does the application qualify for a resubmission exemption?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: + 'Did you get any pre-application advice before making this application?', + responses: [ + { + value: 'No', + }, + ], + metadata: {}, + }, + { + question: + 'What local planning authority is this application being sent to?', + responses: [ + { + value: 'South Buckinghamshire', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'What type of application is it?', + responses: [ + { + value: 'Lawful Development Certificate', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: 'What type of works are you applying about?', + responses: [ + { + value: 'Proposed', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: "What is the applicant's interest in the land?", + responses: [ + { + value: 'Owner', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: "What is the user's role?", + responses: [ + { + value: 'Applicant', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + { + question: "What is the applicant's declared connections?", + responses: [ + { + value: 'None', + }, + ], + metadata: { + autoAnswered: true, + }, + }, + ], + files: [ + { + name: 'https://api.editor.planx.dev/file/private/ha2qdn2z/RoofPlan.pdf', + type: [ + { + value: 'property.drawing.roofPlan', + description: 'Roof plan - existing', + }, + ], + }, + { + name: 'https://api.editor.planx.dev/file/private/3u00rjyw/Site%20plan.pdf', + type: [ + { + value: 'property.drawing.sitePlan', + description: 'Site plan - existing', + }, + ], + }, + { + name: 'https://api.editor.planx.dev/file/private/g92g9w65/RoofPlan.pdf', + type: [ + { + value: 'proposal.drawing.roofPlan', + description: 'Roof plan - proposed', + }, + ], + }, + { + name: 'https://api.editor.planx.dev/file/private/i7tag96k/Site%20plan.pdf', + type: [ + { + value: 'proposal.drawing.sitePlan', + description: 'Site plan - proposed', + }, + ], + }, + { + name: 'https://api.editor.planx.dev/file/private/tw50m88n/Elevations.pdf', + type: [ + { + value: 'property.drawing.elevation', + description: 'Elevation plan - existing', + }, + ], + }, + { + name: 'https://api.editor.planx.dev/file/private/diahn9ft/Plan.pdf', + type: [ + { + value: 'property.drawing.floorPlan', + description: 'Floor plan - existing', + }, + ], + }, + { + name: 'https://api.editor.planx.dev/file/private/0rpf43jj/Elevations.pdf', + type: [ + { + value: 'proposal.drawing.elevation', + description: 'Elevation plan - proposed', + }, + ], + }, + { + name: 'https://api.editor.planx.dev/file/private/iio7ok5g/Plan.pdf', + type: [ + { + value: 'proposal.drawing.floorPlan', + description: 'Floor plan - proposed', + }, + ], + }, + ], + metadata: { + service: { + flowId: 'c06eebb7-6201-4bc0-9fe7-ec5d7a1c0797', + publishedFlowId: 1, + name: 'Apply for a lawful development certificate', + owner: 'Buckinghamshire', + url: 'https://www.editor.planx.uk/buckinghamshire/apply-for-a-lawful-development-certificate/preview', + }, + session: { + source: 'PlanX', + id: 'session123', + createdAt: '2023-01-01 00:00:00', + submittedAt: '2023-01-02 00:00:00', + }, + schema: { + url: 'https://theopensystemslab.github.io/digital-planning-data-schemas/v0.0.1/schema.json', + }, + }, +}; diff --git a/examples/data/planningPermission.ts b/examples/data/planningPermission.ts new file mode 100644 index 00000000..5c0833b4 --- /dev/null +++ b/examples/data/planningPermission.ts @@ -0,0 +1,1565 @@ +import {Schema} from '../../types/Schema'; + +export const validPlanningPermission: Schema = { + data: { + application: { + type: { + value: 'pp.full.householder', + description: 'Planning Permission', + }, + fee: { + calculated: 206, + payable: 206, + exemption: { + disability: true, + resubmission: true, + }, + reduction: { + sports: true, + parishCouncil: true, + alternative: true, + }, + }, + declaration: { + accurate: true, + connection: { + value: 'none', + }, + }, + }, + user: { + role: 'proxy', + }, + applicant: { + type: 'individual', + contact: { + name: { + first: 'David', + last: 'Bowie', + }, + email: 'ziggy@example.com', + phone: { + primary: 'Not provided by agent', + }, + company: {}, + }, + address: { + sameAsSiteAddress: true, + }, + siteContact: { + role: 'proxy', + }, + interest: 'owner.sole', + ownership: { + certificate: 'a', + }, + agent: { + contact: { + name: { + first: 'Ziggy', + last: 'Stardust', + }, + email: 'ziggy@example.com', + phone: { + primary: '01100 0110 0011', + }, + company: {}, + }, + address: { + line1: '40 Stansfield Road', + line2: 'Brixton', + town: 'London', + county: 'Greater London', + postcode: 'SW9 9RZ', + country: 'UK', + }, + }, + }, + property: { + address: { + latitude: 51.4656522, + longitude: -0.1185926, + x: 530787, + y: 175754, + title: '40, STANSFIELD ROAD, LONDON', + source: 'Ordnance Survey', + uprn: '100021892955', + usrn: '21901294', + pao: '40', + street: 'STANSFIELD ROAD', + town: 'LONDON', + postcode: 'SW9 9RZ', + }, + boundary: { + site: { + type: 'Feature', + geometry: { + type: 'Polygon', + coordinates: [ + [ + [-0.1186569035053321, 51.465703531871384], + [-0.1185938715934822, 51.465724418998775], + [-0.1184195280075143, 51.46552473766957], + [-0.11848390102387167, 51.4655038504508], + [-0.1186569035053321, 51.465703531871384], + ], + ], + }, + properties: null, + }, + area: { + hectares: 0.012592, + squareMetres: 125.92, + }, + }, + constraints: { + planning: [ + { + value: 'tpo', + description: 'Tree Preservation Order (TPO) or zone', + overlaps: false, + }, + { + value: 'listed', + description: 'Listed Building', + overlaps: false, + }, + { + value: 'article4', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'monument', + description: 'Site of a Scheduled Monument', + overlaps: false, + }, + { + value: 'designated', + description: 'Designated land', + overlaps: false, + }, + { + value: 'nature.SAC', + description: 'Special Area of Conservation (SAC)', + overlaps: false, + }, + { + value: 'nature.ASNW', + description: 'Ancient Semi-Natural Woodland (ASNW)', + overlaps: false, + }, + { + value: 'nature.SSSI', + description: 'Site of Special Scientific Interest (SSSI)', + overlaps: false, + }, + { + value: 'locallyListed', + description: 'Locally Listed Building', + overlaps: false, + }, + { + value: 'designated.SPA', + description: 'Special Protection Area (SPA)', + overlaps: false, + }, + { + value: 'designated.WHS', + description: 'UNESCO World Heritage Site or buffer zone', + overlaps: false, + }, + { + value: 'registeredPark', + description: 'Historic Park or Garden', + overlaps: false, + }, + { + value: 'designated.AONB', + description: 'Area of Outstanding Natural Beauty (AONB)', + overlaps: false, + }, + { + value: 'article4.lambeth.caz', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'designated.nationalPark', + description: 'National Park', + overlaps: false, + }, + { + value: 'designated.conservationArea', + description: 'Conservation Area', + overlaps: false, + }, + { + value: 'designated.nationalPark.broads', + description: 'National Park - Broads', + overlaps: false, + }, + { + value: 'road.classified', + description: 'Classified Road', + overlaps: false, + }, + ], + }, + localAuthorityDistrict: ['Lambeth'], + region: 'London', + type: { + value: 'residential.dwelling.house.terrace', + description: 'Terrace', + }, + }, + proposal: { + projectType: [ + { + value: 'extend.roof.dormer', + description: 'Add roof dormers', + }, + ], + description: + 'Roof extension to the rear of the property, incorporating starship launchpad.', + boundary: { + site: { + type: 'Feature', + geometry: { + type: 'Polygon', + coordinates: [ + [ + [-0.1186569035053321, 51.465703531871384], + [-0.1185938715934822, 51.465724418998775], + [-0.1184195280075143, 51.46552473766957], + [-0.11848390102387167, 51.4655038504508], + [-0.1186569035053321, 51.465703531871384], + ], + ], + }, + properties: null, + }, + area: { + hectares: 0.012592, + squareMetres: 125.92, + }, + }, + details: { + vehicleParking: { + type: [ + { + value: 'cars.offStreet.residents', + description: 'Off-street parking for residents only', + }, + { + value: 'bicycles.offStreet', + description: 'Off-street parking for bicycles', + }, + ], + }, + }, + }, + }, + result: [], + responses: [ + { + question: 'Is the property in Lambeth?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'The property', + }, + }, + { + question: 'What type of property is it?', + responses: [ + { + value: 'House', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'The property', + }, + }, + { + question: 'What type of house it is?', + responses: [ + { + value: 'Terrace', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'The property', + }, + }, + { + question: 'Is the property in a flood zone?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + sectionName: 'The property', + }, + }, + { + question: 'What type of property is it?', + responses: [ + { + value: 'House', + metadata: { + flags: ['Listed building consent / Not required'], + }, + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About the project', + }, + }, + { + question: 'List the changes involved in the project', + responses: [ + { + value: 'Add a roof extension', + metadata: { + flags: ['Listed building consent / Not required'], + }, + }, + ], + metadata: { + sectionName: 'About the project', + }, + }, + { + question: 'Have works already started?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + sectionName: 'About the project', + }, + }, + { + question: 'Is the property in a flood zone?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About the project', + }, + }, + { + question: 'What type of changes does the project involve?', + responses: [ + { + value: 'Extension', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About the project', + }, + }, + { + question: 'Is the project to add an outbuilding?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About the project', + }, + }, + { + question: 'How much new floor area is being added to the house?', + responses: [ + { + value: 'Less than 100m²', + }, + ], + metadata: { + sectionName: 'About the project', + }, + }, + { + question: + 'How much exactly is the internal floor area of the property increasing by?', + responses: [ + { + value: '45', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (Development Management Procedure) (England) 2015 (as amended)', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: + 'Does the project involve creating any new bedrooms or bathrooms?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (Development Management Procedure) (England) 2015 (as amended)', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'Describe the wall materials of the existing house', + responses: [ + { + value: 'London stock brick', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (Development Management Procedure) (England) 2015 (as amended)', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'Describe the wall materials of the new extension', + responses: [ + { + value: 'Metallic cladding, reflective. Multiple colours.', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (Development Management Procedure) (England) 2015 (as amended)', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'Describe the material of the roof of the existing house', + responses: [ + { + value: 'Grey slate', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (Development Management Procedure) (England) 2015 (as amended)', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'Describe the material for the new roof of the extension', + responses: [ + { + value: 'Zinc panels', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (Development Management Procedure) (England) 2015 (as amended)', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'Describe the window materials of the existing house', + responses: [ + { + value: 'Wooden sash windows, painted white', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (Development Management Procedure) (England) 2015 (as amended)', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'Describe the window materials of the extension', + responses: [ + { + value: 'Brushed steel.', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (Development Management Procedure) (England) 2015 (as amended)', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'Describe the door materials of the existing house', + responses: [ + { + value: 'Wood, painted.', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (Development Management Procedure) (England) 2015 (as amended)', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'Describe the door materials of the extension', + responses: [ + { + value: 'No door present', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (Development Management Procedure) (England) 2015 (as amended)', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: + 'Are there any trees that could fall within the property or the areas affected by the project (the previously drawn outline)?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + sectionName: 'About the project', + }, + }, + { + question: 'Does the project involve any of these?', + responses: [ + { + value: 'No, none of these', + }, + ], + metadata: { + sectionName: 'About the project', + }, + }, + { + question: 'Is the property in Greater London?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About the project', + }, + }, + { + question: 'Does the site include more than one property?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + policyRefs: [ + { + text: 'Greater London Authority Act 1999', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'Do you know the title number of the property?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + sectionName: 'About the project', + }, + }, + { + question: + 'Does the property have an Energy Performance Certificate (EPC)?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + policyRefs: [ + { + text: 'Greater London Authority Act 1999', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'What type of application is this?', + responses: [ + { + value: 'Planning permission for a home', + }, + ], + metadata: { + autoAnswered: true, + policyRefs: [ + { + text: 'Greater London Authority Act 1999', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'When will the works start?', + responses: [ + { + value: '2024-05-01', + }, + ], + metadata: { + policyRefs: [ + { + text: 'Greater London Authority Act 1999', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'When will the works be completed?', + responses: [ + { + value: '2024-05-02', + }, + ], + metadata: { + policyRefs: [ + { + text: 'Greater London Authority Act 1999', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'Does the site include parking spaces for any of these?', + responses: [ + { + value: 'Cars', + }, + { + value: 'Bicycles', + }, + ], + metadata: { + policyRefs: [ + { + text: 'Greater London Authority Act 1999', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'Total number of car parking spaces before', + responses: [ + { + value: '1', + }, + ], + metadata: { + sectionName: 'About the project', + }, + }, + { + question: 'Total number of car parking spaces after', + responses: [ + { + value: '1', + }, + ], + metadata: { + sectionName: 'About the project', + }, + }, + { + question: 'What types of car parking space are present?', + responses: [ + { + value: 'Off-street parking for residents only', + }, + ], + metadata: { + policyRefs: [ + { + text: 'Greater London Authority Act 1999', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'Off-street, residents-only car spaces before', + responses: [ + { + value: '1', + }, + ], + metadata: { + policyRefs: [ + { + text: 'Greater London Authority Act 1999', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'Off-street, residents-only car spaces after', + responses: [ + { + value: '1', + }, + ], + metadata: { + policyRefs: [ + { + text: 'Greater London Authority Act 1999', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'What type of bicycle parking is there?', + responses: [ + { + value: 'Off-street cycle parking', + }, + ], + metadata: { + policyRefs: [ + { + text: 'Greater London Authority Act 1999', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'Off-street bicycle spaces before', + responses: [ + { + value: '2', + }, + ], + metadata: { + policyRefs: [ + { + text: 'Greater London Authority Act 1999', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'Off-street bicycle spaces after', + responses: [ + { + value: '2', + }, + ], + metadata: { + policyRefs: [ + { + text: 'Greater London Authority Act 1999', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'Is the property on designated land?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About the project', + }, + }, + { + question: 'Does the property include any of these?', + responses: [ + { + value: 'None of these', + }, + ], + metadata: { + autoAnswered: true, + policyRefs: [ + { + text: 'The Town and Country Planning (Development Management Procedure) (England) 2015 (as amended)', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'Heritage Statement needed?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About the project', + }, + }, + { + question: 'Is the property in a flood zone?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About the project', + }, + }, + { + question: 'What type of application is it?', + responses: [ + { + value: 'Apply for planning permission', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About you', + }, + }, + { + question: 'Your contact details', + responses: [ + { + value: 'Mx Ziggy Stardust 01100 0110 0011 ziggy@example.com', + }, + ], + metadata: { + sectionName: 'About you', + }, + }, + { + question: 'Is this a test?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + sectionName: 'About you', + }, + }, + { + question: 'Are you applying on behalf of someone else?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: { + sectionName: 'About you', + }, + }, + { + question: 'Which of these best describes you?', + responses: [ + { + value: 'Friend or relative', + }, + ], + metadata: { + sectionName: 'About you', + }, + }, + { + question: 'Your contact address', + responses: [ + { + value: + '40 Stansfield Road, Brixton, London, Greater London, SW9 9RZ, UK', + }, + ], + metadata: { + sectionName: 'About you', + }, + }, + { + question: 'Which of these best describes the applicant?', + responses: [ + { + value: 'Private individual', + }, + ], + metadata: { + sectionName: 'About you', + }, + }, + { + question: "Applicant's title", + responses: [ + { + value: 'Mr', + }, + ], + metadata: { + sectionName: 'About you', + }, + }, + { + question: 'Do you want to provide an email address for the applicant?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + sectionName: 'About you', + }, + }, + { + question: 'Do you want to provide a telephone number for the applicant?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + sectionName: 'About you', + }, + }, + { + question: + "Is the applicant's contact address the same as the property address?", + responses: [ + { + value: 'Yes', + }, + ], + metadata: { + sectionName: 'About you', + }, + }, + { + question: 'Which of these best describes you?', + responses: [ + { + value: 'Friend or relative', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About you', + }, + }, + { + question: + 'We may need to visit your site to assess your application. If we do, who should we contact to arrange the visit?', + responses: [ + { + value: 'Me', + }, + ], + metadata: { + sectionName: 'About you', + }, + }, + { + question: 'Which of these best describes you?', + responses: [ + { + value: "Friend or relative acting on the applicant's behalf", + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About you', + }, + }, + { + question: + "Which of these best describes the applicant's interest in the land?", + responses: [ + { + value: 'Sole owner', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (Development Management Procedure) (England) Order 2015', + }, + ], + sectionName: 'About you', + }, + }, + { + question: + 'Did you get any pre-application advice from the council before making this application?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + sectionName: 'About this application', + }, + }, + { + question: 'What type of planning application are you making?', + responses: [ + { + value: 'Full planning permission', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About this application', + }, + }, + { + question: 'Is the property a home?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About this application', + }, + }, + { + question: 'What types of changes does the application relate to?', + responses: [ + { + value: 'Extension', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About this application', + }, + }, + { + question: 'What type of extension is it?', + responses: [ + { + value: 'Roof extension', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About this application', + }, + }, + { + question: 'List the changes involved in the roof extension', + responses: [ + { + value: 'Add dormer', + }, + ], + metadata: { + sectionName: 'About this application', + }, + }, + { + question: + 'Is the purpose of the project to support the needs of a disabled resident?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012, Regulation 14UK Statutory Instruments 2012 No. 2920 Regulation 4, Equalities Act 2010, Section 6 Children Act 1989, Part 3', + }, + ], + sectionName: 'About this application', + }, + }, + { + question: 'Is it a prior approval application?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About this application', + }, + }, + { + question: 'Is the property a home?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About this application', + }, + }, + { + question: 'What works does the project involve?', + responses: [ + { + value: 'Extension', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About this application', + }, + }, + { + question: 'Is this application a resubmission?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012, Regulation 9', + }, + ], + sectionName: 'About this application', + }, + }, + { + question: 'Does the application qualify for a disability exemption?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About this application', + }, + }, + { + question: 'Does the application qualify for a resubmission exemption?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About this application', + }, + }, + { + question: 'Is the site a sports field?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + policyRefs: [ + { + text: 'The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012 Chapter 2, Paragraph 3', + }, + ], + sectionName: 'About this application', + }, + }, + { + question: + 'Is the application being made by (or on behalf of) a parish or community council?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + policyRefs: [ + { + text: 'The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012 - Regulation 11', + }, + ], + sectionName: 'About this application', + }, + }, + { + question: + 'Are you also submitting another proposal for the same site today?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012 Chapter 2, Paragraph 10', + }, + ], + sectionName: 'About this application', + }, + }, + { + question: + 'Does the application qualify for the sports club fee reduction?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About this application', + }, + }, + { + question: + 'Does the application qualify for the parish council reduction?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + policyRefs: [ + { + text: 'The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012 - Regulation 11', + }, + ], + sectionName: 'About this application', + }, + }, + { + question: + 'Does the application qualify for the alternative application reduction?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + policyRefs: [ + { + text: 'The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012 Chapter 2, Paragraph 10', + }, + ], + sectionName: 'About this application', + }, + }, + { + question: 'What type of application is it?', + responses: [ + { + value: 'Full planning permission', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About this application', + }, + }, + { + question: 'What does the project involve?', + responses: [ + { + value: 'Extension', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About this application', + }, + }, + { + question: 'How much new floor area is being created?', + responses: [ + { + value: 'Less than 100m²', + metadata: { + flags: ['Community infrastructure levy / Not liable'], + }, + }, + ], + metadata: { + autoAnswered: true, + policyRefs: [ + { + text: 'The Community Infrastructure Levy Regulations 2010, Regulation 42', + }, + ], + sectionName: 'About this application', + }, + }, + { + question: 'Is this a householder planning application?', + responses: [ + { + value: 'Yes', + metadata: { + flags: ['Community infrastructure levy / Not liable'], + }, + }, + ], + metadata: { + autoAnswered: true, + policyRefs: [ + { + text: 'The Community Infrastructure Levy Regulations 2010, Regulation 42', + }, + ], + sectionName: 'About this application', + }, + }, + { + question: 'Have the works already started?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'Upload drawings', + }, + }, + { + question: 'What changes does the project involve?', + responses: [ + { + value: 'Extension', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'Upload drawings', + }, + }, + { + question: 'Is the project to add an outbuilding?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'Upload drawings', + }, + }, + { + question: 'Which Local Planning authority is it?', + responses: [ + { + value: 'Lambeth', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'Check', + }, + }, + { + question: 'Connections with London Borough of Lambeth', + responses: [ + { + value: 'None of the above apply to me', + }, + ], + metadata: { + sectionName: 'Check', + }, + }, + { + question: 'I confirm that:', + responses: [ + { + value: + 'The information contained in this application is truthful, accurate and complete, to the best of my knowledge', + }, + ], + metadata: { + sectionName: 'Check', + }, + }, + { + question: 'Does the application qualify for a disability exemption?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'Pay and send', + }, + }, + { + question: 'Does the application qualify for a resubmission exemption?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'Pay and send', + }, + }, + { + question: 'Which Local Planning authority is it?', + responses: [ + { + value: 'Lambeth', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'Pay and send', + }, + }, + ], + files: [ + { + name: 'https://api.editor.planx.dev/file/private/vg0av01p/RoofPlan.pdf', + type: [ + { + value: 'property.drawing.roofPlan', + description: 'Roof plan - existing', + }, + { + value: 'proposal.drawing.roofPlan', + description: 'Roof plan - proposed', + }, + ], + }, + { + name: 'https://api.editor.planx.dev/file/private/ka97yl2c/Site%20plan.pdf', + type: [ + { + value: 'property.drawing.sitePlan', + description: 'Site plan - existing', + }, + { + value: 'proposal.drawing.sitePlan', + description: 'Site plan - proposed', + }, + ], + }, + { + name: 'https://api.editor.planx.dev/file/private/osprppqo/Elevations.pdf', + type: [ + { + value: 'property.drawing.elevation', + description: 'Elevation plan - existing', + }, + { + value: 'proposal.drawing.elevation', + description: 'Elevation plan - proposed', + }, + ], + }, + { + name: 'https://api.editor.planx.dev/file/private/cri3ziaj/Plan.pdf', + type: [ + { + value: 'property.drawing.floorPlan', + description: 'Floor plan - existing', + }, + { + value: 'proposal.drawing.floorPlan', + description: 'Floor plan - proposed', + }, + ], + }, + ], + metadata: { + service: { + flowId: 'c06eebb7-6201-4bc0-9fe7-ec5d7a1c0797', + publishedFlowId: 1, + name: 'Apply for a test service', + owner: 'opensystemslab', + url: 'https://www.editor.planx.uk/opensystemslab/apply-for-a-test-service/preview', + }, + session: { + source: 'PlanX', + id: 'session123', + createdAt: '2023-01-01 00:00:00', + submittedAt: '2023-01-02 00:00:00', + }, + schema: { + url: 'https://theopensystemslab.github.io/digital-planning-data-schemas/v0.0.1/schema.json', + }, + }, +}; diff --git a/examples/data/priorApproval.ts b/examples/data/priorApproval.ts new file mode 100644 index 00000000..f7d6dea8 --- /dev/null +++ b/examples/data/priorApproval.ts @@ -0,0 +1,1056 @@ +import {Schema} from '../../types/Schema'; + +export const validPriorApproval: Schema = { + data: { + application: { + type: { + value: 'pa.part14.classJ', + description: 'Prior Approval - Install or change solar panels', + }, + fee: { + calculated: 96, + payable: 96, + exemption: { + disability: true, + resubmission: true, + }, + reduction: { + sports: false, + parishCouncil: false, + alternative: false, + }, + }, + declaration: { + accurate: true, + connection: { + value: 'relation.electedMember', + description: + 'I think the King is but a man, as I am. The violet smells to him as it doth to me. The element shows to him as it doth to me. All his senses have but human conditions. His ceremonies laid by, in his nakedness he appears but a man.', + }, + }, + }, + user: { + role: 'applicant', + }, + applicant: { + type: 'company', + contact: { + name: { + first: 'William', + last: 'Shakespeare', + }, + email: 'thebard@example.com', + phone: { + primary: '2830407283', + }, + company: { + name: "Lord Chamberlain's Men", + }, + }, + address: { + sameAsSiteAddress: true, + }, + siteContact: { + role: 'applicant', + }, + }, + property: { + address: { + latitude: 51.5081109, + longitude: -0.0965974, + x: 532192, + y: 180515, + title: + 'INTERNATIONAL SHAKESPEARE GLOBE CENTRE LTD, SHAKESPEARE GLOBE THEATRE, 21, NEW GLOBE WALK, LONDON', + source: 'Ordnance Survey', + uprn: '200003377200', + usrn: '22503078', + pao: '21', + street: 'NEW GLOBE WALK', + town: 'LONDON', + postcode: 'SE1 9DT', + }, + boundary: { + site: { + type: 'Feature', + geometry: { + type: 'Polygon', + coordinates: [ + [ + [-0.0967472791671659, 51.50830340605074], + [-0.09676337242125525, 51.50830507546084], + [-0.09689748287199977, 51.50831926544436], + [-0.09693503379820824, 51.50790775412855], + [-0.09666681289671919, 51.50789439872946], + [-0.09645719784644384, 51.507889747624404], + [-0.09639290535660058, 51.50828278342658], + [-0.0967472791671659, 51.50830340605074], + ], + ], + }, + properties: null, + }, + area: { + hectares: 0.152757, + squareMetres: 1527.57, + }, + }, + constraints: { + planning: [ + { + value: 'tpo', + description: 'Tree Preservation Order (TPO) or zone', + overlaps: false, + }, + { + value: 'listed', + description: 'Listed Building', + overlaps: false, + }, + { + value: 'article4', + description: 'Article 4 Direction area', + overlaps: true, + entities: [ + 'Central Activities Zone - Change of use from offices to dwelling houses is restricted', + 'Central Activities Zone - Demolition of commercial buildings and construction of new dwellinghouses is restricted', + 'Bankside and Borough District Town Centre - Demolition of commercial buildings and construction of new dwellinghouses is restricted', + 'Central Activities Zone - Change of use from Class E to residential is restricted', + 'Bankside and Borough District Town Centre - Change of use from Class E to residential is restricted', + ], + }, + { + value: 'monument', + description: 'Site of a Scheduled Monument', + overlaps: false, + }, + { + value: 'designated', + description: 'Designated land', + overlaps: false, + }, + { + value: 'nature.SAC', + description: 'Special Area of Conservation (SAC)', + overlaps: false, + }, + { + value: 'nature.ASNW', + description: 'Ancient Semi-Natural Woodland (ASNW)', + overlaps: false, + }, + { + value: 'nature.SSSI', + description: 'Site of Special Scientific Interest (SSSI)', + overlaps: false, + }, + { + value: 'locallyListed', + description: 'Locally Listed Building', + overlaps: false, + }, + { + value: 'designated.SPA', + description: 'Special Protection Area (SPA)', + overlaps: false, + }, + { + value: 'designated.WHS', + description: 'UNESCO World Heritage Site or buffer zone', + overlaps: false, + }, + { + value: 'registeredPark', + description: 'Historic Park or Garden', + overlaps: false, + }, + { + value: 'designated.AONB', + description: 'Area of Outstanding Natural Beauty (AONB)', + overlaps: false, + }, + { + value: 'article4.southwark.MA', + description: 'Article 4 Direction area', + overlaps: true, + entities: [], + }, + { + value: 'article4.southwark.caz', + description: 'Article 4 Direction area', + overlaps: true, + entities: [''], + }, + { + value: 'article4.southwark.hmo', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'designated.nationalPark', + description: 'National Park', + overlaps: false, + }, + { + value: 'article4.southwark.sunray', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'article4.southwark.railway', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'designated.conservationArea', + description: 'Conservation Area', + overlaps: false, + }, + { + value: 'article4.southwark.publichouse', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'designated.nationalPark.broads', + description: 'National Park - Broads', + overlaps: false, + }, + { + value: 'article4.southwark.southernrail', + description: 'Article 4 Direction area', + overlaps: false, + }, + { + value: 'road.classified', + description: 'Classified Road', + overlaps: false, + }, + ], + }, + localAuthorityDistrict: ['Southwark'], + region: 'London', + type: { + value: 'commercial.leisure.entertainment', + description: + 'Bingo Hall / Cinema / Conference / Exhibition Centre / Theatre / Concert Hall', + }, + }, + proposal: { + projectType: [ + { + value: 'alter.equipment.solar', + description: 'Install solar panels', + }, + ], + description: '@todo not provided in Prior Approval', + boundary: { + site: { + type: 'Feature', + geometry: { + type: 'Polygon', + coordinates: [ + [ + [-0.0967472791671659, 51.50830340605074], + [-0.09676337242125525, 51.50830507546084], + [-0.09689748287199977, 51.50831926544436], + [-0.09693503379820824, 51.50790775412855], + [-0.09666681289671919, 51.50789439872946], + [-0.09645719784644384, 51.507889747624404], + [-0.09639290535660058, 51.50828278342658], + [-0.0967472791671659, 51.50830340605074], + ], + ], + }, + properties: null, + }, + area: { + hectares: 0.152757, + squareMetres: 1527.57, + }, + }, + }, + }, + result: [ + { + value: 'Planning permission / Prior approval', + description: + 'It looks like the proposed changes do not require planning permission, however the applicant must apply for Prior Approval before proceeding.', + }, + ], + responses: [ + { + question: 'Is the property in Southwark?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'The property', + }, + }, + { + question: 'What type of property is it?', + responses: [ + { + value: 'Something else', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'The property', + }, + }, + { + question: 'Which of these best describes the use of the property?', + responses: [ + { + value: 'Leisure and sport', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'The property', + }, + }, + { + question: 'What type of leisure property is it?', + responses: [ + { + value: 'Entertainment', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'The property', + }, + }, + { + question: 'Have the works already started?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + sectionName: 'About the project', + }, + }, + { + question: 'Describe the project.', + responses: [ + { + value: + 'Addition of solar panels in order to power the globe with green energy.', + }, + ], + metadata: { + sectionName: 'About the project', + }, + }, + { + question: 'What type of property is it?', + responses: [ + { + value: 'Commercial building', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About the project', + }, + }, + { + question: 'What type of property is it?', + responses: [ + { + value: 'Neither a house nor a flat', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About the project', + }, + }, + { + question: 'What do you want to install?', + responses: [ + { + value: 'Solar photovoltaics (PV)', + }, + ], + metadata: { + sectionName: 'About the project', + }, + }, + { + question: + 'Are there any other locations where the equipment could be installed?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 14, Class A\nThe Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 14, Class K', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: + 'Would the solar panels would be less visible from the highway in these other locations?', + responses: [ + { + value: 'No', + metadata: { + flags: ['Planning permission / Permitted development'], + }, + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 14, Class A', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'Is the building listed?', + responses: [ + { + value: 'No', + metadata: { + flags: ['Planning permission / Permitted development'], + }, + }, + ], + metadata: { + autoAnswered: true, + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 14, Class J', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'Is the property a scheduled monument?', + responses: [ + { + value: 'No', + metadata: { + flags: ['Planning permission / Permitted development'], + }, + }, + ], + metadata: { + autoAnswered: true, + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 14, Class J', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'Where are the new solar panels?', + responses: [ + { + value: 'On roofs', + }, + ], + metadata: { + sectionName: 'About the project', + }, + }, + { + question: 'What type of roofs are they?', + responses: [ + { + value: 'Both pitched and flat', + }, + ], + metadata: { + sectionName: 'About the project', + }, + }, + { + question: 'Is the property in a conservation area?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + policyRefs: [ + { + text: '[The Town and Country Planning (General Permitted Development) (England) Order 2015 S.2.P.14. .A.1 (c)](https://www.legislation.gov.uk/uksi/2015/596/schedule/2/part/14)', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'Is the property in a world heritage site?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 14, Class A.1 (c)', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: + 'How far do the new solar panels stick out from the pitched roofs?', + responses: [ + { + value: '0.2m or less', + metadata: { + flags: ['Planning permission / Permitted development'], + }, + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 14, Class J', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'How high are the new solar panels compared to the flat roofs?', + responses: [ + { + value: '1m or less higher than the roof', + metadata: { + flags: ['Planning permission / Permitted development'], + }, + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 14, Class A', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'How far are the new solar panels from the edge of the roof?', + responses: [ + { + value: '1m or more from the edge of the roof', + metadata: { + flags: ['Planning permission / Permitted development'], + }, + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 14, Class J', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'What do you want to install?', + responses: [ + { + value: 'Solar photovoltaics (PV)', + }, + ], + metadata: { + sectionName: 'About the project', + }, + }, + { + question: 'What is the total capacity of all solar photovoltaics (PV)?', + responses: [ + { + value: 'Between 50kW and 1,000kW (1 MW)', + metadata: { + flags: ['Planning permission / Prior approval'], + }, + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 14, Class J.3', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'The solar panels must be removed when no longer needed.', + responses: [ + { + value: 'OK', + metadata: { + flags: ['Planning permission / Permitted development'], + }, + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 14, Class AThe Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 14, Class K', + }, + ], + sectionName: 'About the project', + }, + }, + { + question: 'What type of property is it?', + responses: [ + { + value: 'Another use', + }, + ], + metadata: { + sectionName: 'About the project', + }, + }, + { + question: 'Select your project', + responses: [ + { + value: 'Install solar panels', + }, + ], + metadata: { + sectionName: 'About the project', + }, + }, + { + question: 'What type of application is being applied for?', + responses: [ + { + value: 'Part 14 Class J', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About the project', + }, + }, + { + question: 'Is the property subject to any Article 4 directions?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About the project', + }, + }, + { + question: 'List all the changes involved in the project', + responses: [ + { + value: 'Install solar panels', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About the project', + }, + }, + { + question: 'What type of prior approval application is it?', + responses: [ + { + value: 'Install or change solar panels', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'About the project', + }, + }, + { + question: 'Are you applying on behalf of someone else?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + sectionName: 'About you', + }, + }, + { + question: 'Which of these best describes you?', + responses: [ + { + value: 'Company', + }, + ], + metadata: { + sectionName: 'About you', + }, + }, + { + question: 'Your contact details', + responses: [ + { + value: + "Mr William Shakespeare Lord Chamberlain's Men 2830407283 thebard@example.com", + }, + ], + metadata: { + sectionName: 'About you', + }, + }, + { + question: 'Is your contact address the same as the property address?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: { + sectionName: 'About you', + }, + }, + { + question: + 'We may need to visit the site to assess your application. If we do, who should we contact to arrange the visit?', + responses: [ + { + value: 'Me, the applicant', + }, + ], + metadata: { + sectionName: 'About you', + }, + }, + { + question: 'What type of prior approval application is it?', + responses: [ + { + value: 'Install or change solar panels', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'Upload drawings', + }, + }, + { + question: 'Where will the solar panels be installed?', + responses: [ + { + value: 'On roofs', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'Upload drawings', + }, + }, + { + question: + 'Your planning officer will need to check how far the solar panels stick out beyond the surface of the roof. What do you have that shows this?', + responses: [ + { + value: "Manufacturer's specification document", + }, + ], + metadata: { + sectionName: 'Upload drawings', + }, + }, + { + question: 'Do you want to upload any photographs?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + sectionName: 'Upload drawings', + }, + }, + { + question: + 'Would you like to upload any additional drawings, documents or images?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + sectionName: 'Upload drawings', + }, + }, + { + question: 'What type of planning application are you making?', + responses: [ + { + value: 'Prior approval', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'Check your application', + }, + }, + { + question: 'What type of prior approval application is it?', + responses: [ + { + value: 'Install or change solar panels', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'Check your application', + }, + }, + { + question: 'Is the property a home?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'Check your application', + }, + }, + { + question: 'What type of changes does the project involve?', + responses: [ + { + value: 'Alteration', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'Check your application', + }, + }, + { + question: 'Are the public allowed to access the building?', + responses: [ + { + value: 'Yes', + }, + ], + metadata: { + sectionName: 'Check your application', + }, + }, + { + question: + 'Is the sole purpose of the project to provide disabled access to (or within) the building?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + policyRefs: [ + { + text: 'The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012, Regulation 14 & Regulation 4 (1)(b)', + }, + ], + sectionName: 'Check your application', + }, + }, + { + question: 'What type of prior approval application is it?', + responses: [ + { + value: 'Install or change solar panels', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'Check your application', + }, + }, + { + question: 'Does the application qualify for a disability exemption?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'Check your application', + }, + }, + { + question: 'Does the application qualify for a resubmission exemption?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'Check your application', + }, + }, + { + question: + 'Does the application qualify to the same-day-planning-application exemption?', + responses: [ + { + value: 'No', + }, + ], + metadata: { + autoAnswered: true, + policyRefs: [ + { + text: 'The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012, Regulation 14', + }, + ], + sectionName: 'Check your application', + }, + }, + { + question: 'Which Local Planning authority is it?', + responses: [ + { + value: 'Southwark', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'Check your application', + }, + }, + { + question: 'Describe your connection', + responses: [ + { + value: + 'I think the King is but a man, as I am. The violet smells to him as it doth to me. The element shows to him as it doth to me. All his senses have but human conditions. His ceremonies laid by, in his nakedness he appears but a man.', + }, + ], + metadata: { + sectionName: 'Check your application', + }, + }, + { + question: 'Connections with Southwark Council', + responses: [ + { + value: + 'I am related to, or partnered with, an elected member for Southwark Council', + }, + ], + metadata: { + sectionName: 'Check your application', + }, + }, + { + question: 'I confirm that:', + responses: [ + { + value: + 'The information contained in this application is truthful, accurate and complete, to the best of my knowledge', + }, + ], + metadata: { + sectionName: 'Check your application', + }, + }, + { + question: 'Which Local Planning authority is it?', + responses: [ + { + value: 'Southwark', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'Pay and submit', + }, + }, + { + question: + 'What type of prior approval application is it?application.type', + responses: [ + { + value: 'Install or change solar panels', + }, + ], + metadata: { + autoAnswered: true, + sectionName: 'Pay and submit', + }, + }, + ], + files: [ + { + name: 'https://api.editor.planx.dev/file/private/vab4d0k6/Test%20document.pdf', + type: [ + { + value: 'proposal.drawing.other', + description: 'Other - drawing', + }, + ], + }, + { + name: 'https://api.editor.planx.dev/file/private/es3w6dgi/Elevations.pdf', + type: [ + { + value: 'proposal.drawing.sitePlan', + description: 'Site plan - proposed', + }, + ], + }, + ], + metadata: { + service: { + flowId: 'c06eebb7-6201-4bc0-9fe7-ec5d7a1c0797', + publishedFlowId: 1, + name: 'Apply for a test service', + owner: 'opensystemslab', + url: 'https://www.editor.planx.uk/opensystemslab/apply-for-a-test-service/preview', + }, + session: { + source: 'PlanX', + id: 'session123', + createdAt: '2023-01-01 00:00:00', + submittedAt: '2023-01-02 00:00:00', + }, + schema: { + url: 'https://theopensystemslab.github.io/digital-planning-data-schemas/v0.0.1/schema.json', + }, + }, +}; diff --git a/examples/index.ts b/examples/index.ts deleted file mode 100644 index 2a5341d2..00000000 --- a/examples/index.ts +++ /dev/null @@ -1,95 +0,0 @@ -import {Schema} from '../types/Schema'; -import {validAgent, validApplicant} from './data/Applicant'; -import {validApplication} from './data/Application'; -import {validProperty} from './data/Property'; -import {validProposal} from './data/Proposal'; -import {validResponses} from './data/Responses'; - -const validMetadata: Schema['metadata'] = { - service: { - flowId: 'b3320abe-f5bc-4185-b61f-40e9e65f07ad', - publishedFlowId: 22, - name: 'Test', - owner: 'Test', - url: 'https://www.planx.uk/', - }, - session: { - source: 'PlanX', - id: 'b3320abe-f5bc-4185-b61f-40e9e65f07ad', - createdAt: '2018-11-13T20:20:39+00:00', - submittedAt: '2018-11-13T20:20:39+00:00', - }, - schema: { - url: 'https://theopensystemslab.github.io/digital-planning-data-schemas/v0.0.1/schema.json', - }, -}; - -const validFiles: Schema['files'] = [ - { - name: 'https://api.editor.planx.uk/file/private/folderId/file1.pdf', - type: [ - { - value: 'proposal.drawing.roofPlan', - description: 'Roof plan - proposed', - }, - { - value: 'property.drawing.roofPlan', - description: 'Roof plan - existing', - }, - ], - }, - { - name: 'https://api.editor.planx.uk/file/private/folderId/file2.pdf', - description: 'Evidence of my project start date', - type: [ - { - value: 'proposal.document.construction.invoice', - description: 'Construction invoice', - }, - ], - }, -]; - -const validResult: Schema['result'] = [ - { - value: 'Planning permission / Permitted development', - description: - 'It looks like the proposed changes may fall within the rules for Permitted Development and therefore would not need planning permission.', - }, - { - value: 'Listed building consent / Not required', - description: '', - }, -]; - -export const validExampleApplicant: Schema = { - data: { - user: { - role: 'applicant', - }, - applicant: validApplicant, - application: validApplication, - property: validProperty, - proposal: validProposal, - }, - result: validResult, - metadata: validMetadata, - responses: validResponses, - files: validFiles, -}; - -export const validExampleAgent: Schema = { - data: { - user: { - role: 'agent', - }, - applicant: validAgent, - application: validApplication, - property: validProperty, - proposal: validProposal, - }, - result: validResult, - metadata: validMetadata, - responses: validResponses, - files: validFiles, -}; diff --git a/examples/validExampleAgent.json b/examples/validExampleAgent.json deleted file mode 100644 index c699fa45..00000000 --- a/examples/validExampleAgent.json +++ /dev/null @@ -1,298 +0,0 @@ -{ - "data": { - "user": { - "role": "agent" - }, - "applicant": { - "type": "charity", - "contact": { - "name": { - "first": "Test", - "last": "Test" - }, - "email": "test@test.com", - "phone": { - "primary": "123" - }, - "company": { - "name": "Test Charity Ltd" - } - }, - "address": { - "sameAsSiteAddress": false, - "line1": "123 Test", - "town": "Test", - "postcode": "TES T12" - }, - "agent": { - "contact": { - "name": { - "first": "Agent", - "last": "Agent" - }, - "email": "agent@test.com", - "phone": { - "primary": "123" - } - }, - "address": { - "line1": "456 Test", - "town": "Test", - "postcode": "TES T34" - } - }, - "siteContact": { - "role": "other", - "name": "Neighbor", - "email": "neighbor@test.com", - "phone": "567" - } - }, - "application": { - "type": { - "value": "ldc.proposed", - "description": "Lawful Development Certificate - Proposed" - }, - "fee": { - "calculated": 103, - "payable": 103, - "exemption": { - "disability": false, - "resubmission": false - }, - "reduction": { - "alternative": false, - "parishCouncil": false, - "sports": false - }, - "reference": { - "govPay": "abc123" - } - }, - "declaration": { - "accurate": true, - "connection": { - "value": "none" - } - } - }, - "property": { - "address": { - "uprn": "200003453480", - "usrn": "22500531", - "latitude": 51.4859056, - "longitude": -0.0760466, - "pao": "47", - "street": "COBOURG ROAD", - "town": "LONDON", - "postcode": "SE5 0HU", - "x": 533683, - "y": 178083, - "title": "47, COBOURG ROAD, LONDON", - "source": "Ordnance Survey" - }, - "region": "London", - "localAuthorityDistrict": [ - "Southwark" - ], - "type": { - "value": "residential.HMO.parent", - "description": "HMO Parent" - }, - "boundary": { - "site": { - "type": "Feature", - "geometry": { - "type": "Polygon", - "coordinates": [ - [ - [ - -0.1186569035053321, - 51.465703531871384 - ], - [ - -0.1185938715934822, - 51.465724418998775 - ], - [ - -0.1184195280075143, - 51.46552473766957 - ], - [ - -0.11848390102387167, - 51.4655038504508 - ], - [ - -0.1186569035053321, - 51.465703531871384 - ] - ] - ] - }, - "properties": null - }, - "area": { - "squareMetres": 10000, - "hectares": 1 - } - }, - "constraints": { - "planning": [ - { - "value": "listed", - "description": "Listed Building", - "overlaps": false - }, - { - "value": "designated.conservationArea", - "description": "Conservation Area", - "overlaps": true, - "entities": [ - "Cobourg Road Nature Preserve" - ] - } - ] - }, - "titleNumber": { - "known": "Yes", - "number": "123" - }, - "EPC": { - "known": "The property does not have one" - } - }, - "proposal": { - "projectType": [ - { - "value": "alter.equipment.solar", - "description": "Install solar panels" - }, - { - "value": "new.leisure", - "description": "Leisure premises" - } - ], - "description": "This is a test application", - "boundary": { - "site": { - "type": "Feature", - "geometry": { - "type": "Polygon", - "coordinates": [ - [ - [ - -0.1186569035053321, - 51.465703531871384 - ], - [ - -0.1185938715934822, - 51.465724418998775 - ], - [ - -0.1184195280075143, - 51.46552473766957 - ], - [ - -0.11848390102387167, - 51.4655038504508 - ], - [ - -0.1186569035053321, - 51.465703531871384 - ] - ] - ] - }, - "properties": null - }, - "area": { - "squareMetres": 10000, - "hectares": 1 - } - } - } - }, - "result": [ - { - "value": "Planning permission / Permitted development", - "description": "It looks like the proposed changes may fall within the rules for Permitted Development and therefore would not need planning permission." - }, - { - "value": "Listed building consent / Not required", - "description": "" - } - ], - "metadata": { - "service": { - "flowId": "b3320abe-f5bc-4185-b61f-40e9e65f07ad", - "publishedFlowId": 22, - "name": "Test", - "owner": "Test", - "url": "https://www.planx.uk/" - }, - "session": { - "source": "PlanX", - "id": "b3320abe-f5bc-4185-b61f-40e9e65f07ad", - "createdAt": "2018-11-13T20:20:39+00:00", - "submittedAt": "2018-11-13T20:20:39+00:00" - }, - "schema": { - "url": "https://theopensystemslab.github.io/digital-planning-data-schemas/v0.0.1/schema.json" - } - }, - "responses": [ - { - "metadata": { - "sectionName": "The property", - "autoAnswered": true - }, - "question": "Is the property in London Borough of Southwark?", - "responses": [ - { - "value": "Yes" - } - ] - }, - { - "metadata": { - "policyRefs": [ - { - "text": "Town and Country Planning Act 1990, Part 7, Section 191 & Section 192" - } - ], - "sectionName": "About the project" - }, - "question": "What are you applying about?", - "responses": [ - { - "value": "Proposed changes I want to make in the future" - } - ] - } - ], - "files": [ - { - "name": "https://api.editor.planx.uk/file/private/folderId/file1.pdf", - "type": [ - { - "value": "proposal.drawing.roofPlan", - "description": "Roof plan - proposed" - }, - { - "value": "property.drawing.roofPlan", - "description": "Roof plan - existing" - } - ] - }, - { - "name": "https://api.editor.planx.uk/file/private/folderId/file2.pdf", - "description": "Evidence of my project start date", - "type": [ - { - "value": "proposal.document.construction.invoice", - "description": "Construction invoice" - } - ] - } - ] -} \ No newline at end of file diff --git a/examples/validExampleApplicant.json b/examples/validExampleApplicant.json deleted file mode 100644 index a2bc4803..00000000 --- a/examples/validExampleApplicant.json +++ /dev/null @@ -1,292 +0,0 @@ -{ - "data": { - "user": { - "role": "applicant" - }, - "applicant": { - "type": "individual", - "contact": { - "name": { - "first": "Test", - "last": "Test" - }, - "email": "test@test.com", - "phone": { - "primary": "123" - } - }, - "address": { - "sameAsSiteAddress": true - }, - "siteContact": { - "role": "applicant" - }, - "interest": "owner.co", - "ownership": { - "certificate": "a", - "noticeGiven": true, - "owners": [ - { - "name": "Owner 1", - "address": { - "line1": "123 Main Street", - "town": "Anywhere", - "postcode": "SE5 0HU" - }, - "noticeDate": "2023-10-01" - }, - { - "name": "Owner 2", - "address": "Same as Owner 1" - } - ] - } - }, - "application": { - "type": { - "value": "ldc.proposed", - "description": "Lawful Development Certificate - Proposed" - }, - "fee": { - "calculated": 103, - "payable": 103, - "exemption": { - "disability": false, - "resubmission": false - }, - "reduction": { - "alternative": false, - "parishCouncil": false, - "sports": false - }, - "reference": { - "govPay": "abc123" - } - }, - "declaration": { - "accurate": true, - "connection": { - "value": "none" - } - } - }, - "property": { - "address": { - "uprn": "200003453480", - "usrn": "22500531", - "latitude": 51.4859056, - "longitude": -0.0760466, - "pao": "47", - "street": "COBOURG ROAD", - "town": "LONDON", - "postcode": "SE5 0HU", - "x": 533683, - "y": 178083, - "title": "47, COBOURG ROAD, LONDON", - "source": "Ordnance Survey" - }, - "region": "London", - "localAuthorityDistrict": [ - "Southwark" - ], - "type": { - "value": "residential.HMO.parent", - "description": "HMO Parent" - }, - "boundary": { - "site": { - "type": "Feature", - "geometry": { - "type": "Polygon", - "coordinates": [ - [ - [ - -0.1186569035053321, - 51.465703531871384 - ], - [ - -0.1185938715934822, - 51.465724418998775 - ], - [ - -0.1184195280075143, - 51.46552473766957 - ], - [ - -0.11848390102387167, - 51.4655038504508 - ], - [ - -0.1186569035053321, - 51.465703531871384 - ] - ] - ] - }, - "properties": null - }, - "area": { - "squareMetres": 10000, - "hectares": 1 - } - }, - "constraints": { - "planning": [ - { - "value": "listed", - "description": "Listed Building", - "overlaps": false - }, - { - "value": "designated.conservationArea", - "description": "Conservation Area", - "overlaps": true, - "entities": [ - "Cobourg Road Nature Preserve" - ] - } - ] - }, - "titleNumber": { - "known": "Yes", - "number": "123" - }, - "EPC": { - "known": "The property does not have one" - } - }, - "proposal": { - "projectType": [ - { - "value": "alter.equipment.solar", - "description": "Install solar panels" - }, - { - "value": "new.leisure", - "description": "Leisure premises" - } - ], - "description": "This is a test application", - "boundary": { - "site": { - "type": "Feature", - "geometry": { - "type": "Polygon", - "coordinates": [ - [ - [ - -0.1186569035053321, - 51.465703531871384 - ], - [ - -0.1185938715934822, - 51.465724418998775 - ], - [ - -0.1184195280075143, - 51.46552473766957 - ], - [ - -0.11848390102387167, - 51.4655038504508 - ], - [ - -0.1186569035053321, - 51.465703531871384 - ] - ] - ] - }, - "properties": null - }, - "area": { - "squareMetres": 10000, - "hectares": 1 - } - } - } - }, - "result": [ - { - "value": "Planning permission / Permitted development", - "description": "It looks like the proposed changes may fall within the rules for Permitted Development and therefore would not need planning permission." - }, - { - "value": "Listed building consent / Not required", - "description": "" - } - ], - "metadata": { - "service": { - "flowId": "b3320abe-f5bc-4185-b61f-40e9e65f07ad", - "publishedFlowId": 22, - "name": "Test", - "owner": "Test", - "url": "https://www.planx.uk/" - }, - "session": { - "source": "PlanX", - "id": "b3320abe-f5bc-4185-b61f-40e9e65f07ad", - "createdAt": "2018-11-13T20:20:39+00:00", - "submittedAt": "2018-11-13T20:20:39+00:00" - }, - "schema": { - "url": "https://theopensystemslab.github.io/digital-planning-data-schemas/v0.0.1/schema.json" - } - }, - "responses": [ - { - "metadata": { - "sectionName": "The property", - "autoAnswered": true - }, - "question": "Is the property in London Borough of Southwark?", - "responses": [ - { - "value": "Yes" - } - ] - }, - { - "metadata": { - "policyRefs": [ - { - "text": "Town and Country Planning Act 1990, Part 7, Section 191 & Section 192" - } - ], - "sectionName": "About the project" - }, - "question": "What are you applying about?", - "responses": [ - { - "value": "Proposed changes I want to make in the future" - } - ] - } - ], - "files": [ - { - "name": "https://api.editor.planx.uk/file/private/folderId/file1.pdf", - "type": [ - { - "value": "proposal.drawing.roofPlan", - "description": "Roof plan - proposed" - }, - { - "value": "property.drawing.roofPlan", - "description": "Roof plan - existing" - } - ] - }, - { - "name": "https://api.editor.planx.uk/file/private/folderId/file2.pdf", - "description": "Evidence of my project start date", - "type": [ - { - "value": "proposal.document.construction.invoice", - "description": "Construction invoice" - } - ] - } - ] -} \ No newline at end of file diff --git a/examples/validLawfulDevelopmentCertificateExisting.json b/examples/validLawfulDevelopmentCertificateExisting.json new file mode 100644 index 00000000..2f1d3323 --- /dev/null +++ b/examples/validLawfulDevelopmentCertificateExisting.json @@ -0,0 +1,2627 @@ +{ + "data": { + "application": { + "type": { + "value": "ldc.existing", + "description": "Lawful Development Certificate - Existing" + }, + "fee": { + "calculated": 206, + "payable": 206, + "exemption": { + "disability": true, + "resubmission": true + }, + "reduction": { + "sports": true, + "parishCouncil": true, + "alternative": true + } + }, + "declaration": { + "accurate": true, + "connection": { + "value": "none" + } + } + }, + "user": { + "role": "agent" + }, + "applicant": { + "type": "individual", + "contact": { + "name": { + "first": "Roald", + "last": "Dahl" + }, + "email": "f.fox@boggischickenshed.com", + "phone": { + "primary": "Not provided by agent" + }, + "company": {} + }, + "address": { + "sameAsSiteAddress": true + }, + "siteContact": { + "role": "applicant" + }, + "interest": "owner.co", + "ownership": { + "certificate": "b", + "noticeGiven": true, + "owners": [ + { + "name": "Matilda Wormwood", + "address": { + "town": "Reading", + "line1": "9, Library Way", + "line2": "", + "county": "", + "country": "", + "postcode": "L1T3R8Y" + }, + "noticeDate": "1988-04-01" + } + ] + }, + "agent": { + "contact": { + "name": { + "first": "F", + "last": "Fox" + }, + "email": "f.fox@boggischickenshed.com", + "phone": { + "primary": "0234 567 8910" + }, + "company": {} + }, + "address": { + "line1": "The Tree", + "line2": "One Tree Hill", + "town": "Great Tunnelling", + "county": "", + "postcode": "F0XH0L3", + "country": "" + } + } + }, + "property": { + "address": { + "latitude": 51.6994957, + "longitude": -0.708966, + "x": 489320, + "y": 200872, + "title": "GIPSY HOUSE, WHITEFIELD LANE, GREAT MISSENDEN", + "source": "Ordnance Survey", + "uprn": "100081174436", + "usrn": "07300709", + "pao": "", + "street": "WHITEFIELD LANE", + "town": "GREAT MISSENDEN", + "postcode": "HP16 0BP" + }, + "boundary": { + "site": { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.7085376977920632, + 51.699564621757816 + ], + [ + -0.7086127996444802, + 51.69965605327502 + ], + [ + -0.708982944488535, + 51.699654390885456 + ], + [ + -0.7089909911155797, + 51.699673508361855 + ], + [ + -0.7089319825172521, + 51.699683482694184 + ], + [ + -0.7089520990848638, + 51.69973002954916 + ], + [ + -0.7091867923736667, + 51.69968930105364 + ], + [ + -0.7092216610908603, + 51.699688469859495 + ], + [ + -0.709239095449457, + 51.69968514508267 + ], + [ + -0.709253847599039, + 51.6997134056779 + ], + [ + -0.7093128561973666, + 51.69970176896433 + ], + [ + -0.7092699408531282, + 51.699610337539525 + ], + [ + -0.7096253335476013, + 51.699648572521454 + ], + [ + -0.7098613679409116, + 51.69958457046823 + ], + [ + -0.7098962366581053, + 51.69955049141595 + ], + [ + -0.7098090648651213, + 51.6994216557425 + ], + [ + -0.7099243998527616, + 51.699390070166544 + ], + [ + -0.7098264992237182, + 51.699238791576136 + ], + [ + -0.7097460329532714, + 51.699236297968724 + ], + [ + -0.7095716893673034, + 51.69927536446852 + ], + [ + -0.7095421850681398, + 51.69927619567025 + ], + [ + -0.7092954218387698, + 51.69931941814053 + ], + [ + -0.7090929150581455, + 51.69937427737031 + ], + [ + -0.709021836519251, + 51.69938923896689 + ], + [ + -0.7089574635028936, + 51.6994008757608 + ], + [ + -0.7088904082775213, + 51.69942082454341 + ], + [ + -0.7086691260337761, + 51.699501450783515 + ], + [ + -0.7086181640624932, + 51.699517243535354 + ], + [ + -0.7085457444191079, + 51.699541348251245 + ], + [ + -0.7085350155830483, + 51.69954799782576 + ], + [ + -0.7085376977920632, + 51.699564621757816 + ] + ] + ] + }, + "properties": null + }, + "area": { + "hectares": 0.299367, + "squareMetres": 2993.67 + } + }, + "constraints": { + "planning": [ + { + "value": "tpo", + "description": "Tree Preservation Order (TPO) or zone", + "overlaps": false + }, + { + "value": "listed", + "description": "Listed Building", + "overlaps": false + }, + { + "value": "article4", + "description": "Article 4 Direction area", + "overlaps": true, + "entities": [ + "Whole District excluding the Town of Chesham - Poultry production. - 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." + ] + }, + { + "value": "monument", + "description": "Site of a Scheduled Monument", + "overlaps": false + }, + { + "value": "designated", + "description": "Designated land", + "overlaps": true, + "entities": [] + }, + { + "value": "nature.SAC", + "description": "Special Area of Conservation (SAC)", + "overlaps": false + }, + { + "value": "nature.ASNW", + "description": "Ancient Semi-Natural Woodland (ASNW)", + "overlaps": false + }, + { + "value": "nature.SSSI", + "description": "Site of Special Scientific Interest (SSSI)", + "overlaps": false + }, + { + "value": "locallyListed", + "description": "Locally Listed Building", + "overlaps": false + }, + { + "value": "designated.SPA", + "description": "Special Protection Area (SPA)", + "overlaps": false + }, + { + "value": "designated.WHS", + "description": "UNESCO World Heritage Site or buffer zone", + "overlaps": false + }, + { + "value": "registeredPark", + "description": "Historic Park or Garden", + "overlaps": false + }, + { + "value": "designated.AONB", + "description": "Area of Outstanding Natural Beauty (AONB)", + "overlaps": true, + "entities": [ + "Chilterns" + ] + }, + { + "value": "designated.nationalPark", + "description": "National Park", + "overlaps": false + }, + { + "value": "designated.conservationArea", + "description": "Conservation Area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.caz", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.os262", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "designated.nationalPark.broads", + "description": "National Park - Broads", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.fulmer", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.os1178", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.os3100", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.os4729", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.os5200", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.os6961", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.os8050", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.os8349", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.ivylane", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.piggery", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.poultry", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.millfarm", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.os3313.a", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.os3313.b", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.pennroad", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.pennwood", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.bourneend", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.deanfield", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.ferrylane", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.fourwinds", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.lodgelane", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.manorfarm", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.northA404", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.northpark", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.rockylane", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.southA413", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.wigginton", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.DO10fulmer", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.bakerswood", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.botleyroad", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.churchlane", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.commonwood", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.greenacres", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.purtonlane", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.saunderton", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.sedgesfarm", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.valleyroad", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.widmerfarm", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.wiltonlane", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.wyburnwood", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.burtonslane", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.cheshamroad", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.collumgreen", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.georgegreen", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.gravellyway", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.hampdenroad", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.lakeendroad", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.rearuplands", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.turnerswood", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.wellcottage", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.winslowroad", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.amershamroad", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.boismoorroad", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.boundaryroad", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.bridgestreet", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.eastvaleroad", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.johnsonsfarm", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.officetoresi", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.ruralwycombe", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.stokenchurch", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.wooburngreen", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.asheridgeroad", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.ballingerroad", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.coneybankwood", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.ferrylaneagri", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.lodgelaneagri", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.ministrywharf", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.northlongpark", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.shepherdsfold", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.southkilnlane", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.southsidekiln", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.threeoaksfarm", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.twyfordgrange", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.beamondendfarm", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.chartridgelane", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.commonwoodagri", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.cryershillroad", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.dorneywoodroad", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.eastjasonshill", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.eastmarishlane", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.littlekingsash", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.parkspringwood", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.pednorhighroad", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.piddingtonroad", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.ruralaylesbury", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.sibleyscoppice", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.turvillevalley", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.wyburnwoodagri", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.blackthornelane", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.eastjordanslane", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.fulmerplacefarm", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.hollybushcorner", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.mansionlanewest", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.parslowshillock", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.southchartridge", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.southswanbottom", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.woodlandsmeadow", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.amershamroadeast", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.bangorsroadnorth", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.broadviewchesham", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.mansionlanesouth", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.northjordansfarm", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.northorbitalroad", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.northwelderslane", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.potterrowcaravan", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.robertswooddrive", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.westwexhamstreet", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.wycombeheathfarm", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.collegeplantation", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.eastlodgelaneagri", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.greenstreetfarm.a", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.greenstreetfarm.b", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.pednorroadcaravan", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.sheepcotedellroad", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.skimmersorchard.a", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.skimmersorchard.b", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.skimmersorchard.c", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.weststhubertslane", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.ballingerroadnorth", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.bovingdonheights.a", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.bovingdonheights.b", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.commonwoodpennroad", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.eastlatimervillage", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.lodgelaneenclosure", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.phillipshillfarm.a", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.phillipshillfarm.b", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.potterrowenclosure", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.southeastfinchlane", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.southpenfoldlane.a", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.southpenfoldlane.b", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.southsheepcoteroad", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.wyburnwoodforestry", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.bryantsbottomroad.a", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.bryantsbottomroad.b", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.commonwoodenclosure", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.greenstreetfarmagri", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.northsidesevenhills", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.pednorroadenclosure", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.bakerswoodbrokengate", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.eastlodgelanecaravan", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.southlittlemissenden", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.westledgelanecaravan", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.wholedistrictpoultry", + "description": "Article 4 Direction area", + "overlaps": true, + "entities": [] + }, + { + "value": "article4.buckinghamshire.chalklaneanhydehealth", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.commonwoodandpennroad", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.copperkinslanecaravan", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.junctionhughendenroad", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.nightingaleslanestrip", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.pednorroaddrydelllane", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.southpenfoldlaneOS262", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.eastamershamroadOS0006", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.eastamershamroadOS9269", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.lodgelanewestenclosure", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.northandsouthhollowway", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.chessfieldparkenclosure", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.cooperkinslaneenclosure", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.wycombeheathfarmcaravan", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.coppicesouthheathcaravan", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.pednorroadanddrydelllane", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.northballingerroadvaravan", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.potkilnlaneandlaytersgreen", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.wycombehealthfarmnortheast", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.wycombehealthfarmspurlands", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "road.classified", + "description": "Classified Road", + "overlaps": false + } + ] + }, + "localAuthorityDistrict": [ + "Buckinghamshire", + "Chiltern" + ], + "region": "South East", + "type": { + "value": "residential.dwelling.house.detached", + "description": "Detached" + } + }, + "proposal": { + "projectType": [ + { + "value": "extend.outbuildings.studio", + "description": "Add an outbuilding - studio" + } + ], + "description": "Construction of a small outbuilding for use as a writing studio.", + "boundary": { + "site": { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.7085376977920632, + 51.699564621757816 + ], + [ + -0.7086127996444802, + 51.69965605327502 + ], + [ + -0.708982944488535, + 51.699654390885456 + ], + [ + -0.7089909911155797, + 51.699673508361855 + ], + [ + -0.7089319825172521, + 51.699683482694184 + ], + [ + -0.7089520990848638, + 51.69973002954916 + ], + [ + -0.7091867923736667, + 51.69968930105364 + ], + [ + -0.7092216610908603, + 51.699688469859495 + ], + [ + -0.709239095449457, + 51.69968514508267 + ], + [ + -0.709253847599039, + 51.6997134056779 + ], + [ + -0.7093128561973666, + 51.69970176896433 + ], + [ + -0.7092699408531282, + 51.699610337539525 + ], + [ + -0.7096253335476013, + 51.699648572521454 + ], + [ + -0.7098613679409116, + 51.69958457046823 + ], + [ + -0.7098962366581053, + 51.69955049141595 + ], + [ + -0.7098090648651213, + 51.6994216557425 + ], + [ + -0.7099243998527616, + 51.699390070166544 + ], + [ + -0.7098264992237182, + 51.699238791576136 + ], + [ + -0.7097460329532714, + 51.699236297968724 + ], + [ + -0.7095716893673034, + 51.69927536446852 + ], + [ + -0.7095421850681398, + 51.69927619567025 + ], + [ + -0.7092954218387698, + 51.69931941814053 + ], + [ + -0.7090929150581455, + 51.69937427737031 + ], + [ + -0.709021836519251, + 51.69938923896689 + ], + [ + -0.7089574635028936, + 51.6994008757608 + ], + [ + -0.7088904082775213, + 51.69942082454341 + ], + [ + -0.7086691260337761, + 51.699501450783515 + ], + [ + -0.7086181640624932, + 51.699517243535354 + ], + [ + -0.7085457444191079, + 51.699541348251245 + ], + [ + -0.7085350155830483, + 51.69954799782576 + ], + [ + -0.7085376977920632, + 51.699564621757816 + ] + ] + ] + }, + "properties": null + }, + "area": { + "hectares": 0.299367, + "squareMetres": 2993.67 + } + } + } + }, + "result": [ + { + "value": "Planning permission / Immune", + "description": "It looks like the changes may now be beyond the time limit for enforcement action. This does not apply if the changes have been deliberately concealed." + } + ], + "responses": [ + { + "question": "List the changes involved in the project", + "responses": [ + { + "value": "Outbuildings (such as sheds, garages or garden offices)" + } + ], + "metadata": {} + }, + { + "question": "What type of changes were they?", + "responses": [ + { + "value": "Extension" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Were the works carried out more than 4 years ago?", + "responses": [ + { + "value": "Yes", + "metadata": { + "flags": [ + "Planning permission / Immune" + ] + } + } + ], + "metadata": { + "policyRefs": [ + { + "text": "Town and Country Planning Act 1990 Section 171B" + } + ] + } + }, + { + "question": "Have the works been completed?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "Town and Country Planning Act 1990 Section 171B" + } + ] + } + }, + { + "question": "When were the works completed?", + "responses": [ + { + "value": "1959-01-01" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "Town and Country Planning Act 1990 Section 171B" + } + ] + } + }, + { + "question": "Has anyone ever attempted to conceal the changes?", + "responses": [ + { + "value": "No", + "metadata": { + "flags": [ + "Planning permission / Immune" + ] + } + } + ], + "metadata": { + "policyRefs": [ + { + "text": "Secretary of State for Communities and Local Government and another v Welwyn Hatfield Borough Council and Bonsall / Jackson v Secretary of State for Communities and Local Government" + } + ] + } + }, + { + "question": "Has enforcement action been taken about these changes?", + "responses": [ + { + "value": "No", + "metadata": { + "flags": [ + "Planning permission / Immune" + ] + } + } + ], + "metadata": { + "policyRefs": [ + { + "text": "Enforcement action is defined in the Town and Country Planning Act 1990 Section 171A.\n'Lawful development' is defined in the Town and Country Planning Act 1990 Section 191." + } + ] + } + }, + { + "question": "List the changes involved in the project", + "responses": [ + { + "value": "Add an outbuilding (such as a shed, garage or garden office)" + }, + { + "value": "Outbuildings (such as a shed, garage or garden office)" + } + ], + "metadata": { + "autoAnswered": true, + "policyRefs": [ + { + "text": "Town and Country Planning Act 1990 (Section 55), The Town and Country Planning (General Permitted Development) (England) Order 2015" + } + ] + } + }, + { + "question": "What type of house is it?", + "responses": [ + { + "value": "Detached" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "What type of property is it?", + "responses": [ + { + "value": "House" + } + ], + "metadata": { + "autoAnswered": true, + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Development Order 2015.\nSection 336 of the Town and Country Planning Act." + } + ] + } + }, + { + "question": "Is any part of the property listed?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "policyRefs": [ + { + "text": "The Town The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class E." + } + ] + } + }, + { + "question": "Was the house originally built as a house?", + "responses": [ + { + "value": "Yes, it was built as a house" + } + ], + "metadata": {} + }, + { + "question": "Was the house built before 2020?", + "responses": [ + { + "value": "Yes, it was built before 2020" + } + ], + "metadata": {} + }, + { + "question": "What is the new outbuilding used for?", + "responses": [ + { + "value": "Studio" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class E" + } + ] + } + }, + { + "question": "How will the studio be used?", + "responses": [ + { + "value": "Personal use", + "metadata": { + "flags": [ + "Planning permission / Permitted development" + ] + } + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Section 2, Part 1. Class E" + } + ] + } + }, + { + "question": "How many storeys does the new outbuilding have?", + "responses": [ + { + "value": "1 storey", + "metadata": { + "flags": [ + "Planning permission / Permitted development" + ] + } + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Section 2, Part 1. Class E.1 (d) (h)" + } + ] + } + }, + { + "question": "Does the outbuilding include any balconies, decks, verandahs or platforms that are more than 30cm above ground level?", + "responses": [ + { + "value": "No", + "metadata": { + "flags": [ + "Planning permission / Permitted development" + ] + } + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Section 2, Part 1. Class E.1 (d)(h)" + } + ] + } + }, + { + "question": "Is any part of the new outbuilding in front of the original house?", + "responses": [ + { + "value": "No", + "metadata": { + "flags": [ + "Planning permission / Permitted development" + ] + } + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class E.1 (c)" + } + ] + } + }, + { + "question": "Is the property on designated land?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Is any part of the new outbuilding between a side wall of the original house and the boundary?", + "responses": [ + { + "value": "No", + "metadata": { + "flags": [ + "Planning permission / Permitted development" + ] + } + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class E.3" + } + ] + } + }, + { + "question": "Is any part of the new structure within 2m of the boundary?", + "responses": [ + { + "value": "No, it is 2m or more from the boundary" + } + ], + "metadata": {} + }, + { + "question": "What type of roof does the new outbuilding have?", + "responses": [ + { + "value": "Dual pitch roof" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class E" + } + ] + } + }, + { + "question": "How high is the new outbuilding?", + "responses": [ + { + "value": "4m or lower", + "metadata": { + "flags": [ + "Planning permission / Permitted development" + ] + } + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class E.1 (e)(ii)" + } + ] + } + }, + { + "question": "Is the property on designated land?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Is the property in any of the following?", + "responses": [ + { + "value": "An area of outstanding natural beauty", + "metadata": { + "flags": [ + "Planning permission / Permission needed" + ] + } + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "How far from the house is the new outbuilding?", + "responses": [ + { + "value": "More than 20m from the house" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class E" + } + ] + } + }, + { + "question": "What is the total footprint of all outbuildings more than 20m from the house?", + "responses": [ + { + "value": "10m² or less", + "metadata": { + "flags": [ + "Planning permission / Permitted development" + ] + } + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class E.2" + } + ] + } + }, + { + "question": "How much of the property is covered by extensions and outbuildings?", + "responses": [ + { + "value": "50% or less of the available area around the original house", + "metadata": { + "flags": [ + "Planning permission / Permitted development" + ] + } + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class E.1 (b)" + } + ] + } + }, + { + "question": "Does the new outbuilding have a satellite dish or antenna on it?", + "responses": [ + { + "value": "No", + "metadata": { + "flags": [ + "Planning permission / Permitted development" + ] + } + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class E.1 (i)" + } + ] + } + }, + { + "question": "Is the new outbuilding air conditioned?", + "responses": [ + { + "value": "No", + "metadata": { + "flags": [ + "Planning permission / Not development" + ] + } + } + ], + "metadata": {} + }, + { + "question": "What types of changes does the project involve?", + "responses": [ + { + "value": "Extension" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Have you already told us that you are doing works to a tree or hedge?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Are there any protected trees on the property?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Is the site in a conservation area?", + "responses": [ + { + "value": "No", + "metadata": { + "flags": [ + "Works to trees & hedges / Not required" + ] + } + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "What are you applying about?", + "responses": [ + { + "value": "Existing changes I have made in the past" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "What do the works involve?", + "responses": [ + { + "value": "Works to extend a property" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "What does the project involve?", + "responses": [ + { + "value": "Add an outbuilding (such as sheds, shelters or garden offices)" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Is it a residential property?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Do the changes involve the creation of any new homes?", + "responses": [ + { + "value": "No" + } + ], + "metadata": {} + }, + { + "question": "Do the changes involve creating any new bedrooms or bathrooms?", + "responses": [ + { + "value": "No" + } + ], + "metadata": {} + }, + { + "question": "What is the internal floor area of the new outbuilding?", + "responses": [ + { + "value": "9" + } + ], + "metadata": {} + }, + { + "question": "Do the changes involve the creation of any new homes?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Is the property in the Greater London Authority area?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "policyRefs": [ + { + "text": "Greater London Authority Act 1999" + } + ] + } + }, + { + "question": "Your contact details", + "responses": [ + { + "value": "Mr F Fox 0234 567 8910 f.fox@boggischickenshed.com" + } + ], + "metadata": {} + }, + { + "question": "Did you already provide the applicant's email address?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Applicant's email address", + "responses": [ + { + "value": "r.dahl@example.com" + } + ], + "metadata": {} + }, + { + "question": "Did you already provide the applicant's telephone number?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Applicant's telephone number", + "responses": [ + { + "value": "01098 765 432" + } + ], + "metadata": {} + }, + { + "question": "Which of these best describes you?", + "responses": [ + { + "value": "Agent acting on the applicant's behalf" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Have you notified the other owners?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": {} + }, + { + "question": "Which of these best describes the applicant's interest in the land?", + "responses": [ + { + "value": "Co-owner" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (Development Management Procedure) (England) Order 2015" + } + ] + } + }, + { + "question": "How many other owners are there?", + "responses": [ + { + "value": "Two or more other owners" + } + ], + "metadata": {} + }, + { + "question": "Do you know who the other owners of the site are?", + "responses": [ + { + "value": "Yes, all of them" + } + ], + "metadata": {} + }, + { + "question": "How many owners are there in total?", + "responses": [ + { + "value": "3" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Full name of Owner 2", + "responses": [ + { + "value": "William Wonka" + } + ], + "metadata": {} + }, + { + "question": "Address of Owner 2", + "responses": [ + { + "value": "The Factory, 10, Scrumdiddlyumptious Avenue, Oomaph upon Ouse, CH0C0L8" + } + ], + "metadata": {} + }, + { + "question": "Have you already notified the other owners?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Date on which notice was given to Owner 2", + "responses": [ + { + "value": "1964-04-01" + } + ], + "metadata": {} + }, + { + "question": "Full name of Owner 3", + "responses": [ + { + "value": "Matilda Wormwood" + } + ], + "metadata": {} + }, + { + "question": "Address of Owner 3", + "responses": [ + { + "value": "9, Library Way, Reading, L1T3R8Y" + } + ], + "metadata": {} + }, + { + "question": "Have you already notified the other owners?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Date on which notice was given to Owner 3", + "responses": [ + { + "value": "1988-04-01" + } + ], + "metadata": {} + }, + { + "question": "What types of changes did the project involve?", + "responses": [ + { + "value": "Extension" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Would you like to upload any photographs of the property as it is today?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": {} + }, + { + "question": "What type of extension have you added?", + "responses": [ + { + "value": "Outbuilding" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Is the roof of the outbuilding shown on a drawing you have already uploaded?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": {} + }, + { + "question": "Did the works involve any alterations to ground levels?", + "responses": [ + { + "value": "No" + } + ], + "metadata": {} + }, + { + "question": "Would you like to upload any photographs of the property before the changes?", + "responses": [ + { + "value": "No" + } + ], + "metadata": {} + }, + { + "question": "Would you like to upload any other additional drawings or documents?", + "responses": [ + { + "value": "No" + } + ], + "metadata": {} + }, + { + "question": "Provide evidence of completion date", + "responses": [ + { + "value": "Construction invoices" + }, + { + "value": "Other documents or correspondence" + } + ], + "metadata": {} + }, + { + "question": "What do these construction invoices show?", + "responses": [ + { + "value": "Nothing, it's a test document. " + } + ], + "metadata": {} + }, + { + "question": "What do these documents show?", + "responses": [ + { + "value": "Nothing really, this is just a test. " + } + ], + "metadata": {} + }, + { + "question": "What type of planning application are you making?", + "responses": [ + { + "value": "Lawful Development Certificate" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "What type of changes are you applying for?", + "responses": [ + { + "value": "Existing changes" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Is the property a home?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "What types of changes does the application relate to?", + "responses": [ + { + "value": "Extension" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "How many homes does this application relate to?", + "responses": [ + { + "value": "1" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012 Schedule 1, Part 2" + } + ] + } + }, + { + "question": "What type of extension did you build?", + "responses": [ + { + "value": "Outbuilding (such as shed, shelter or garden office" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Is the property a home?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "What works does the project involve?", + "responses": [ + { + "value": "Extension" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Is the sole purpose of the project to support the needs of a disabled resident?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012, Regulation 14UK Statutory Instruments 2012 No. 2920 Regulation 4, Equalities Act 2010, Section 6 Children Act 1989, Part 3" + } + ] + } + }, + { + "question": "Is this application a resubmission?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012, Regulation 9" + } + ] + } + }, + { + "question": "Does the application qualify for a disability exemption?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Does the application qualify for a resubmission exemption?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Is the site a sports field?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "policyRefs": [ + { + "text": "The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012 Chapter 2, Paragraph 3" + } + ] + } + }, + { + "question": "Is the application being made by (or on behalf of) a parish or community council?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "policyRefs": [ + { + "text": "The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012 - Regulation 11" + } + ] + } + }, + { + "question": "Are you also submitting another proposal for the same site today?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012 Chapter 2, Paragraph 10" + } + ] + } + }, + { + "question": "Does the application qualify for the sports club fee reduction?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Does the application qualify for the parish council reduction?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "policyRefs": [ + { + "text": "The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012 - Regulation 11" + } + ] + } + }, + { + "question": "Does the application qualify for the alternative application reduction?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Did you get any pre-application advice before making this application?", + "responses": [ + { + "value": "No" + } + ], + "metadata": {} + }, + { + "question": "What local planning authority is this application being sent to?", + "responses": [ + { + "value": "Chiltern" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "What type of application is it?", + "responses": [ + { + "value": "Lawful Development Certificate" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "What type of works are you applying about?", + "responses": [ + { + "value": "Existing" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "What is the applicant's interest in the land?", + "responses": [ + { + "value": "Owner" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "What is the user's role?", + "responses": [ + { + "value": "Other" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "What is the applicant's declared connections?", + "responses": [ + { + "value": "None" + } + ], + "metadata": { + "autoAnswered": true + } + } + ], + "files": [ + { + "name": "https://api.editor.planx.dev/file/private/r34zxe3x/RoaldDahlHut.jpg", + "type": [ + { + "value": "proposal.photograph", + "description": "Photographs" + } + ] + }, + { + "name": "https://api.editor.planx.dev/file/private/kopklkj9/Site%20plan.pdf", + "type": [ + { + "value": "proposal.drawing.sitePlan", + "description": "Site plan - proposed" + } + ] + }, + { + "name": "https://api.editor.planx.dev/file/private/u2vjw69h/Elevations.pdf", + "type": [ + { + "value": "proposal.drawing.elevation", + "description": "Elevation plan - proposed" + } + ] + }, + { + "name": "https://api.editor.planx.dev/file/private/gbaur05c/Plan.pdf", + "type": [ + { + "value": "proposal.drawing.floorPlan", + "description": "Floor plan - proposed" + } + ] + }, + { + "name": "https://api.editor.planx.dev/file/private/4vhzu4c5/Roald-Dahl-letter-one-use.pdf", + "type": [ + { + "value": "proposal.document.other.evidence", + "description": "Other - correspondence" + } + ], + "description": "Nothing really, this is just a test. " + }, + { + "name": "https://api.editor.planx.dev/file/private/uz72iu40/Test%20document.pdf", + "type": [ + { + "value": "proposal.document.construction.invoice", + "description": "Construction invoice" + } + ], + "description": "Nothing, it's a test document. " + } + ], + "metadata": { + "service": { + "flowId": "c06eebb7-6201-4bc0-9fe7-ec5d7a1c0797", + "publishedFlowId": 1, + "name": "Apply for a test service", + "owner": "opensystemslab", + "url": "https://www.editor.planx.uk/opensystemslab/apply-for-a-test-service/preview" + }, + "session": { + "source": "PlanX", + "id": "session123", + "createdAt": "2023-01-01 00:00:00", + "submittedAt": "2023-01-02 00:00:00" + }, + "schema": { + "url": "https://theopensystemslab.github.io/digital-planning-data-schemas/v0.0.1/schema.json" + } + } +} \ No newline at end of file diff --git a/examples/validLawfulDevelopmentCertificateProposed.json b/examples/validLawfulDevelopmentCertificateProposed.json new file mode 100644 index 00000000..add7e87a --- /dev/null +++ b/examples/validLawfulDevelopmentCertificateProposed.json @@ -0,0 +1,1188 @@ +{ + "data": { + "application": { + "type": { + "value": "ldc.proposed", + "description": "Lawful Development Certificate - Proposed" + }, + "fee": { + "calculated": 103, + "payable": 0, + "exemption": { + "disability": true, + "resubmission": true + }, + "reduction": { + "sports": false, + "parishCouncil": false, + "alternative": false + } + }, + "declaration": { + "accurate": true, + "connection": { + "value": "none" + } + } + }, + "user": { + "role": "applicant" + }, + "applicant": { + "type": "individual", + "contact": { + "name": { + "first": "Enid", + "last": "Blyton" + }, + "email": "famousfive@example.com", + "phone": { + "primary": "05555 555 555" + }, + "company": {} + }, + "address": { + "sameAsSiteAddress": true + }, + "siteContact": { + "role": "applicant" + }, + "interest": "owner.sole", + "ownership": { + "certificate": "a" + } + }, + "property": { + "address": { + "latitude": 51.6154458, + "longitude": -0.6463271, + "x": 493822, + "y": 191603, + "title": "7, BLYTON CLOSE, BEACONSFIELD", + "source": "Ordnance Survey", + "uprn": "100080482163", + "usrn": "35200844", + "pao": "7", + "street": "BLYTON CLOSE", + "town": "BEACONSFIELD", + "postcode": "HP9 2LX" + }, + "boundary": { + "site": { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.646633654832832, + 51.61556919642334 + ], + [ + -0.6466296315193095, + 51.61554504700152 + ], + [ + -0.6465049088001171, + 51.61551173743314 + ], + [ + -0.6464512646198194, + 51.61522027766699 + ], + [ + -0.6463131308555524, + 51.61522943785954 + ], + [ + -0.6463037431240002, + 51.61520695374722 + ], + [ + -0.6462487578391951, + 51.615222775901515 + ], + [ + -0.6462393701076429, + 51.61520861923739 + ], + [ + -0.6459456682205124, + 51.615292726412235 + ], + [ + -0.6460489332675857, + 51.61561499701554 + ], + [ + -0.646633654832832, + 51.61556919642334 + ] + ] + ] + }, + "properties": null + }, + "area": { + "hectares": 0.141826, + "squareMetres": 1418.26 + } + }, + "constraints": { + "planning": [ + { + "value": "tpo", + "description": "Tree Preservation Order (TPO) or zone", + "overlaps": false + }, + { + "value": "listed", + "description": "Listed Building", + "overlaps": false + }, + { + "value": "article4", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "monument", + "description": "Site of a Scheduled Monument", + "overlaps": false + }, + { + "value": "designated", + "description": "Designated land", + "overlaps": false + }, + { + "value": "nature.SAC", + "description": "Special Area of Conservation (SAC)", + "overlaps": false + }, + { + "value": "nature.ASNW", + "description": "Ancient Semi-Natural Woodland (ASNW)", + "overlaps": false + }, + { + "value": "nature.SSSI", + "description": "Site of Special Scientific Interest (SSSI)", + "overlaps": false + }, + { + "value": "locallyListed", + "description": "Locally Listed Building", + "overlaps": false + }, + { + "value": "designated.SPA", + "description": "Special Protection Area (SPA)", + "overlaps": false + }, + { + "value": "designated.WHS", + "description": "UNESCO World Heritage Site or buffer zone", + "overlaps": false + }, + { + "value": "registeredPark", + "description": "Historic Park or Garden", + "overlaps": false + }, + { + "value": "designated.AONB", + "description": "Area of Outstanding Natural Beauty (AONB)", + "overlaps": false + }, + { + "value": "designated.nationalPark", + "description": "National Park", + "overlaps": false + }, + { + "value": "designated.conservationArea", + "description": "Conservation Area", + "overlaps": false + }, + { + "value": "article4.buckinghamshire.caz", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "designated.nationalPark.broads", + "description": "National Park - Broads", + "overlaps": false + }, + { + "value": "road.classified", + "description": "Classified Road", + "overlaps": false + } + ] + }, + "localAuthorityDistrict": [ + "Buckinghamshire", + "South Bucks" + ], + "region": "South East", + "type": { + "value": "residential.dwelling.house.detached", + "description": "Detached" + } + }, + "proposal": { + "projectType": [ + { + "value": "extend.rear", + "description": "Add a rear or side extension (or conservatory)" + } + ], + "description": "Rear extension of a home", + "boundary": { + "site": { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.646633654832832, + 51.61556919642334 + ], + [ + -0.6466296315193095, + 51.61554504700152 + ], + [ + -0.6465049088001171, + 51.61551173743314 + ], + [ + -0.6464512646198194, + 51.61522027766699 + ], + [ + -0.6463131308555524, + 51.61522943785954 + ], + [ + -0.6463037431240002, + 51.61520695374722 + ], + [ + -0.6462487578391951, + 51.615222775901515 + ], + [ + -0.6462393701076429, + 51.61520861923739 + ], + [ + -0.6459456682205124, + 51.615292726412235 + ], + [ + -0.6460489332675857, + 51.61561499701554 + ], + [ + -0.646633654832832, + 51.61556919642334 + ] + ] + ] + }, + "properties": null + }, + "area": { + "hectares": 0.141826, + "squareMetres": 1418.26 + } + } + } + }, + "result": [ + { + "value": "Planning permission / Permitted development", + "description": "It looks like the proposed changes may fall within the rules for Permitted Development and therefore would not need planning permission." + } + ], + "responses": [ + { + "question": "List the changes involved in the project", + "responses": [ + { + "value": "Add a rear or side extension (or conservatory)" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "Town and Country Planning Act 1990 (Section 55), The Town and Country Planning (General Permitted Development) (England) Order 2015" + } + ] + } + }, + { + "question": "What type of property is it?", + "responses": [ + { + "value": "House" + } + ], + "metadata": { + "autoAnswered": true, + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015" + } + ] + } + }, + { + "question": "What type of house is it?", + "responses": [ + { + "value": "Detached" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "How many storeys does the original house have?", + "responses": [ + { + "value": "2 or more" + } + ], + "metadata": {} + }, + { + "question": "Does the original house have a projection to the rear?", + "responses": [ + { + "value": "No" + } + ], + "metadata": {} + }, + { + "question": "Was the house always a house?", + "responses": [ + { + "value": "Yes, it was built as a house" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015, Schedule 2, Part 1, Class A" + } + ] + } + }, + { + "question": "Was the house built before 2020?", + "responses": [ + { + "value": "Yes, it was built before 2020", + "metadata": { + "flags": [ + "Planning permission / Permitted development" + ] + } + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class 1 A." + } + ] + } + }, + { + "question": "How many storeys does the extension have?", + "responses": [ + { + "value": "1 storey" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Section 2, Part 1, Class A" + } + ] + } + }, + { + "question": "Does the original house have a projection to the rear?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Which of these best describes your project?", + "responses": [ + { + "value": "Rear only" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "General Permitted Development Order 2015, Technical guidance (PDF)" + } + ] + } + }, + { + "question": "Is the property on designated land?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Is the property a site of special scientific interest?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "What type of house is it?", + "responses": [ + { + "value": "Detached" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "How far does the new addition extend beyond the back wall of the original house?", + "responses": [ + { + "value": "Less than 4m", + "metadata": { + "flags": [ + "Planning permission / Permitted development" + ] + } + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class A.1 (f)(i)" + } + ] + } + }, + { + "question": "What is the shortest distance to the property boundary?", + "responses": [ + { + "value": "2m or more" + } + ], + "metadata": {} + }, + { + "question": "Are the materials of the extension similar to the original house?", + "responses": [ + { + "value": "Yes", + "metadata": { + "flags": [ + "Planning permission / Permitted development" + ] + } + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class A" + } + ] + } + }, + { + "question": "Is the property on designated land?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "How much of the property is covered by extensions and outbuildings?", + "responses": [ + { + "value": "50% or less of the available area around the original house", + "metadata": { + "flags": [ + "Planning permission / Permitted development" + ] + } + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 1, Class A" + } + ] + } + }, + { + "question": "What types of changes does the project involve?", + "responses": [ + { + "value": "Extension" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Have you already told us that you are doing works to a tree or hedge?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Are there any protected trees on the property?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Is the site in a conservation area?", + "responses": [ + { + "value": "No", + "metadata": { + "flags": [ + "Works to trees & hedges / Not required" + ] + } + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "What are you applying about?", + "responses": [ + { + "value": "Proposed changes I want to make in the future" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "What do the works involve?", + "responses": [ + { + "value": "Works to extend a property" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "What does the project involve?", + "responses": [ + { + "value": "Add a rear or side extension (or conservatory)" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "How much is the internal floor area of the property increasing by?", + "responses": [ + { + "value": "24" + } + ], + "metadata": {} + }, + { + "question": "Is it a residential property?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Do the changes involve the creation of any new homes?", + "responses": [ + { + "value": "No" + } + ], + "metadata": {} + }, + { + "question": "Do the changes involve creating any new bedrooms or bathrooms?", + "responses": [ + { + "value": "No" + } + ], + "metadata": {} + }, + { + "question": "Do the changes involve the creation of any new homes?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Is the property in the Greater London Authority area?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "policyRefs": [ + { + "text": "Greater London Authority Act 1999" + } + ] + } + }, + { + "question": "Which of these best describes you?", + "responses": [ + { + "value": "Applicant" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Which of these best describes your interest in the land?", + "responses": [ + { + "value": "Sole owner" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (Development Management Procedure) (England) Order 2015" + } + ] + } + }, + { + "question": "What types of changes does the project involve?", + "responses": [ + { + "value": "Extension" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Does the work involve any alterations to ground or floor levels?", + "responses": [ + { + "value": "No" + } + ], + "metadata": {} + }, + { + "question": "Would you like to upload any photographs?", + "responses": [ + { + "value": "No" + } + ], + "metadata": {} + }, + { + "question": "What types of extension are being added?", + "responses": [ + { + "value": "Rear or side" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Do you also want to add existing internal floor plans?", + "responses": [ + { + "value": "No" + } + ], + "metadata": {} + }, + { + "question": "Is the roof of the extension already shown on another set of drawings?", + "responses": [ + { + "value": "No" + } + ], + "metadata": {} + }, + { + "question": "Would you like to upload any additional drawings, documents or images?", + "responses": [ + { + "value": "No" + } + ], + "metadata": {} + }, + { + "question": "What type of planning application are you making?", + "responses": [ + { + "value": "Lawful Development Certificate" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "What type of changes are you applying for?", + "responses": [ + { + "value": "Proposed changes" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Is the property a home?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "What types of changes does the application relate to?", + "responses": [ + { + "value": "Extension" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "How many homes does this application relate to?", + "responses": [ + { + "value": "1" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012 Schedule 1, Part 2" + } + ] + } + }, + { + "question": "What type of extension is it?", + "responses": [ + { + "value": "Rear or side extension" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Is the property a home?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "What works does the project involve?", + "responses": [ + { + "value": "Extension" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Is the sole purpose of the project to support the needs of a disabled resident?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012, Regulation 14UK Statutory Instruments 2012 No. 2920 Regulation 4, Equalities Act 2010, Section 6 Children Act 1989, Part 3" + } + ] + } + }, + { + "question": "Is this application a resubmission?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012, Regulation 9" + } + ] + } + }, + { + "question": "Is this the first time you have resubmitted an application for this site?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012, Regulation 8" + } + ] + } + }, + { + "question": "What type of application is this?", + "responses": [ + { + "value": "Lawful Development Certificate" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "What was the original application's reference number?", + "responses": [ + { + "value": "M8AG1C F4R4WAY TR33" + } + ], + "metadata": {} + }, + { + "question": "To qualify for a fee exemption, the proposed works must be of a similar description to the original application", + "responses": [ + { + "value": "I understand" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012, Regulation 14" + } + ] + } + }, + { + "question": "What was the result of the original application?", + "responses": [ + { + "value": "Withdrawn" + } + ], + "metadata": {} + }, + { + "question": "When did you submit the original application?", + "responses": [ + { + "value": "Within the last 12 months" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "UK Statutory Instruments 2012 No. 2920 Regulation 8" + } + ] + } + }, + { + "question": "Does the application qualify for a disability exemption?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Does the application qualify for a resubmission exemption?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "Did you get any pre-application advice before making this application?", + "responses": [ + { + "value": "No" + } + ], + "metadata": {} + }, + { + "question": "What local planning authority is this application being sent to?", + "responses": [ + { + "value": "South Buckinghamshire" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "What type of application is it?", + "responses": [ + { + "value": "Lawful Development Certificate" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "What type of works are you applying about?", + "responses": [ + { + "value": "Proposed" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "What is the applicant's interest in the land?", + "responses": [ + { + "value": "Owner" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "What is the user's role?", + "responses": [ + { + "value": "Applicant" + } + ], + "metadata": { + "autoAnswered": true + } + }, + { + "question": "What is the applicant's declared connections?", + "responses": [ + { + "value": "None" + } + ], + "metadata": { + "autoAnswered": true + } + } + ], + "files": [ + { + "name": "https://api.editor.planx.dev/file/private/ha2qdn2z/RoofPlan.pdf", + "type": [ + { + "value": "property.drawing.roofPlan", + "description": "Roof plan - existing" + } + ] + }, + { + "name": "https://api.editor.planx.dev/file/private/3u00rjyw/Site%20plan.pdf", + "type": [ + { + "value": "property.drawing.sitePlan", + "description": "Site plan - existing" + } + ] + }, + { + "name": "https://api.editor.planx.dev/file/private/g92g9w65/RoofPlan.pdf", + "type": [ + { + "value": "proposal.drawing.roofPlan", + "description": "Roof plan - proposed" + } + ] + }, + { + "name": "https://api.editor.planx.dev/file/private/i7tag96k/Site%20plan.pdf", + "type": [ + { + "value": "proposal.drawing.sitePlan", + "description": "Site plan - proposed" + } + ] + }, + { + "name": "https://api.editor.planx.dev/file/private/tw50m88n/Elevations.pdf", + "type": [ + { + "value": "property.drawing.elevation", + "description": "Elevation plan - existing" + } + ] + }, + { + "name": "https://api.editor.planx.dev/file/private/diahn9ft/Plan.pdf", + "type": [ + { + "value": "property.drawing.floorPlan", + "description": "Floor plan - existing" + } + ] + }, + { + "name": "https://api.editor.planx.dev/file/private/0rpf43jj/Elevations.pdf", + "type": [ + { + "value": "proposal.drawing.elevation", + "description": "Elevation plan - proposed" + } + ] + }, + { + "name": "https://api.editor.planx.dev/file/private/iio7ok5g/Plan.pdf", + "type": [ + { + "value": "proposal.drawing.floorPlan", + "description": "Floor plan - proposed" + } + ] + } + ], + "metadata": { + "service": { + "flowId": "c06eebb7-6201-4bc0-9fe7-ec5d7a1c0797", + "publishedFlowId": 1, + "name": "Apply for a lawful development certificate", + "owner": "Buckinghamshire", + "url": "https://www.editor.planx.uk/buckinghamshire/apply-for-a-lawful-development-certificate/preview" + }, + "session": { + "source": "PlanX", + "id": "session123", + "createdAt": "2023-01-01 00:00:00", + "submittedAt": "2023-01-02 00:00:00" + }, + "schema": { + "url": "https://theopensystemslab.github.io/digital-planning-data-schemas/v0.0.1/schema.json" + } + } +} \ No newline at end of file diff --git a/examples/validPlanningPermission.json b/examples/validPlanningPermission.json new file mode 100644 index 00000000..d4cddd22 --- /dev/null +++ b/examples/validPlanningPermission.json @@ -0,0 +1,1586 @@ +{ + "data": { + "application": { + "type": { + "value": "pp.full.householder", + "description": "Planning Permission" + }, + "fee": { + "calculated": 206, + "payable": 206, + "exemption": { + "disability": true, + "resubmission": true + }, + "reduction": { + "sports": true, + "parishCouncil": true, + "alternative": true + } + }, + "declaration": { + "accurate": true, + "connection": { + "value": "none" + } + } + }, + "user": { + "role": "proxy" + }, + "applicant": { + "type": "individual", + "contact": { + "name": { + "first": "David", + "last": "Bowie" + }, + "email": "ziggy@example.com", + "phone": { + "primary": "Not provided by agent" + }, + "company": {} + }, + "address": { + "sameAsSiteAddress": true + }, + "siteContact": { + "role": "proxy" + }, + "interest": "owner.sole", + "ownership": { + "certificate": "a" + }, + "agent": { + "contact": { + "name": { + "first": "Ziggy", + "last": "Stardust" + }, + "email": "ziggy@example.com", + "phone": { + "primary": "01100 0110 0011" + }, + "company": {} + }, + "address": { + "line1": "40 Stansfield Road", + "line2": "Brixton", + "town": "London", + "county": "Greater London", + "postcode": "SW9 9RZ", + "country": "UK" + } + } + }, + "property": { + "address": { + "latitude": 51.4656522, + "longitude": -0.1185926, + "x": 530787, + "y": 175754, + "title": "40, STANSFIELD ROAD, LONDON", + "source": "Ordnance Survey", + "uprn": "100021892955", + "usrn": "21901294", + "pao": "40", + "street": "STANSFIELD ROAD", + "town": "LONDON", + "postcode": "SW9 9RZ" + }, + "boundary": { + "site": { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.1186569035053321, + 51.465703531871384 + ], + [ + -0.1185938715934822, + 51.465724418998775 + ], + [ + -0.1184195280075143, + 51.46552473766957 + ], + [ + -0.11848390102387167, + 51.4655038504508 + ], + [ + -0.1186569035053321, + 51.465703531871384 + ] + ] + ] + }, + "properties": null + }, + "area": { + "hectares": 0.012592, + "squareMetres": 125.92 + } + }, + "constraints": { + "planning": [ + { + "value": "tpo", + "description": "Tree Preservation Order (TPO) or zone", + "overlaps": false + }, + { + "value": "listed", + "description": "Listed Building", + "overlaps": false + }, + { + "value": "article4", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "monument", + "description": "Site of a Scheduled Monument", + "overlaps": false + }, + { + "value": "designated", + "description": "Designated land", + "overlaps": false + }, + { + "value": "nature.SAC", + "description": "Special Area of Conservation (SAC)", + "overlaps": false + }, + { + "value": "nature.ASNW", + "description": "Ancient Semi-Natural Woodland (ASNW)", + "overlaps": false + }, + { + "value": "nature.SSSI", + "description": "Site of Special Scientific Interest (SSSI)", + "overlaps": false + }, + { + "value": "locallyListed", + "description": "Locally Listed Building", + "overlaps": false + }, + { + "value": "designated.SPA", + "description": "Special Protection Area (SPA)", + "overlaps": false + }, + { + "value": "designated.WHS", + "description": "UNESCO World Heritage Site or buffer zone", + "overlaps": false + }, + { + "value": "registeredPark", + "description": "Historic Park or Garden", + "overlaps": false + }, + { + "value": "designated.AONB", + "description": "Area of Outstanding Natural Beauty (AONB)", + "overlaps": false + }, + { + "value": "article4.lambeth.caz", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "designated.nationalPark", + "description": "National Park", + "overlaps": false + }, + { + "value": "designated.conservationArea", + "description": "Conservation Area", + "overlaps": false + }, + { + "value": "designated.nationalPark.broads", + "description": "National Park - Broads", + "overlaps": false + }, + { + "value": "road.classified", + "description": "Classified Road", + "overlaps": false + } + ] + }, + "localAuthorityDistrict": [ + "Lambeth" + ], + "region": "London", + "type": { + "value": "residential.dwelling.house.terrace", + "description": "Terrace" + } + }, + "proposal": { + "projectType": [ + { + "value": "extend.roof.dormer", + "description": "Add roof dormers" + } + ], + "description": "Roof extension to the rear of the property, incorporating starship launchpad.", + "boundary": { + "site": { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.1186569035053321, + 51.465703531871384 + ], + [ + -0.1185938715934822, + 51.465724418998775 + ], + [ + -0.1184195280075143, + 51.46552473766957 + ], + [ + -0.11848390102387167, + 51.4655038504508 + ], + [ + -0.1186569035053321, + 51.465703531871384 + ] + ] + ] + }, + "properties": null + }, + "area": { + "hectares": 0.012592, + "squareMetres": 125.92 + } + }, + "details": { + "vehicleParking": { + "type": [ + { + "value": "cars.offStreet.residents", + "description": "Off-street parking for residents only" + }, + { + "value": "bicycles.offStreet", + "description": "Off-street parking for bicycles" + } + ] + } + } + } + }, + "result": [], + "responses": [ + { + "question": "Is the property in Lambeth?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "The property" + } + }, + { + "question": "What type of property is it?", + "responses": [ + { + "value": "House" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "The property" + } + }, + { + "question": "What type of house it is?", + "responses": [ + { + "value": "Terrace" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "The property" + } + }, + { + "question": "Is the property in a flood zone?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "sectionName": "The property" + } + }, + { + "question": "What type of property is it?", + "responses": [ + { + "value": "House", + "metadata": { + "flags": [ + "Listed building consent / Not required" + ] + } + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About the project" + } + }, + { + "question": "List the changes involved in the project", + "responses": [ + { + "value": "Add a roof extension", + "metadata": { + "flags": [ + "Listed building consent / Not required" + ] + } + } + ], + "metadata": { + "sectionName": "About the project" + } + }, + { + "question": "Have works already started?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "sectionName": "About the project" + } + }, + { + "question": "Is the property in a flood zone?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About the project" + } + }, + { + "question": "What type of changes does the project involve?", + "responses": [ + { + "value": "Extension" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About the project" + } + }, + { + "question": "Is the project to add an outbuilding?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About the project" + } + }, + { + "question": "How much new floor area is being added to the house?", + "responses": [ + { + "value": "Less than 100m²" + } + ], + "metadata": { + "sectionName": "About the project" + } + }, + { + "question": "How much exactly is the internal floor area of the property increasing by?", + "responses": [ + { + "value": "45" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (Development Management Procedure) (England) 2015 (as amended)" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "Does the project involve creating any new bedrooms or bathrooms?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (Development Management Procedure) (England) 2015 (as amended)" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "Describe the wall materials of the existing house", + "responses": [ + { + "value": "London stock brick" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (Development Management Procedure) (England) 2015 (as amended)" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "Describe the wall materials of the new extension", + "responses": [ + { + "value": "Metallic cladding, reflective. Multiple colours." + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (Development Management Procedure) (England) 2015 (as amended)" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "Describe the material of the roof of the existing house", + "responses": [ + { + "value": "Grey slate" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (Development Management Procedure) (England) 2015 (as amended)" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "Describe the material for the new roof of the extension", + "responses": [ + { + "value": "Zinc panels" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (Development Management Procedure) (England) 2015 (as amended)" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "Describe the window materials of the existing house", + "responses": [ + { + "value": "Wooden sash windows, painted white" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (Development Management Procedure) (England) 2015 (as amended)" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "Describe the window materials of the extension", + "responses": [ + { + "value": "Brushed steel." + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (Development Management Procedure) (England) 2015 (as amended)" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "Describe the door materials of the existing house", + "responses": [ + { + "value": "Wood, painted." + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (Development Management Procedure) (England) 2015 (as amended)" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "Describe the door materials of the extension", + "responses": [ + { + "value": "No door present" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (Development Management Procedure) (England) 2015 (as amended)" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "Are there any trees that could fall within the property or the areas affected by the project (the previously drawn outline)?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "sectionName": "About the project" + } + }, + { + "question": "Does the project involve any of these?", + "responses": [ + { + "value": "No, none of these" + } + ], + "metadata": { + "sectionName": "About the project" + } + }, + { + "question": "Is the property in Greater London?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About the project" + } + }, + { + "question": "Does the site include more than one property?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "Greater London Authority Act 1999" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "Do you know the title number of the property?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "sectionName": "About the project" + } + }, + { + "question": "Does the property have an Energy Performance Certificate (EPC)?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "Greater London Authority Act 1999" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "What type of application is this?", + "responses": [ + { + "value": "Planning permission for a home" + } + ], + "metadata": { + "autoAnswered": true, + "policyRefs": [ + { + "text": "Greater London Authority Act 1999" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "When will the works start?", + "responses": [ + { + "value": "2024-05-01" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "Greater London Authority Act 1999" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "When will the works be completed?", + "responses": [ + { + "value": "2024-05-02" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "Greater London Authority Act 1999" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "Does the site include parking spaces for any of these?", + "responses": [ + { + "value": "Cars" + }, + { + "value": "Bicycles" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "Greater London Authority Act 1999" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "Total number of car parking spaces before", + "responses": [ + { + "value": "1" + } + ], + "metadata": { + "sectionName": "About the project" + } + }, + { + "question": "Total number of car parking spaces after", + "responses": [ + { + "value": "1" + } + ], + "metadata": { + "sectionName": "About the project" + } + }, + { + "question": "What types of car parking space are present?", + "responses": [ + { + "value": "Off-street parking for residents only" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "Greater London Authority Act 1999" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "Off-street, residents-only car spaces before", + "responses": [ + { + "value": "1" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "Greater London Authority Act 1999" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "Off-street, residents-only car spaces after", + "responses": [ + { + "value": "1" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "Greater London Authority Act 1999" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "What type of bicycle parking is there?", + "responses": [ + { + "value": "Off-street cycle parking" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "Greater London Authority Act 1999" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "Off-street bicycle spaces before", + "responses": [ + { + "value": "2" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "Greater London Authority Act 1999" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "Off-street bicycle spaces after", + "responses": [ + { + "value": "2" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "Greater London Authority Act 1999" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "Is the property on designated land?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About the project" + } + }, + { + "question": "Does the property include any of these?", + "responses": [ + { + "value": "None of these" + } + ], + "metadata": { + "autoAnswered": true, + "policyRefs": [ + { + "text": "The Town and Country Planning (Development Management Procedure) (England) 2015 (as amended)" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "Heritage Statement needed?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About the project" + } + }, + { + "question": "Is the property in a flood zone?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About the project" + } + }, + { + "question": "What type of application is it?", + "responses": [ + { + "value": "Apply for planning permission" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About you" + } + }, + { + "question": "Your contact details", + "responses": [ + { + "value": "Mx Ziggy Stardust 01100 0110 0011 ziggy@example.com" + } + ], + "metadata": { + "sectionName": "About you" + } + }, + { + "question": "Is this a test?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "sectionName": "About you" + } + }, + { + "question": "Are you applying on behalf of someone else?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": { + "sectionName": "About you" + } + }, + { + "question": "Which of these best describes you?", + "responses": [ + { + "value": "Friend or relative" + } + ], + "metadata": { + "sectionName": "About you" + } + }, + { + "question": "Your contact address", + "responses": [ + { + "value": "40 Stansfield Road, Brixton, London, Greater London, SW9 9RZ, UK" + } + ], + "metadata": { + "sectionName": "About you" + } + }, + { + "question": "Which of these best describes the applicant?", + "responses": [ + { + "value": "Private individual" + } + ], + "metadata": { + "sectionName": "About you" + } + }, + { + "question": "Applicant's title", + "responses": [ + { + "value": "Mr" + } + ], + "metadata": { + "sectionName": "About you" + } + }, + { + "question": "Do you want to provide an email address for the applicant?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "sectionName": "About you" + } + }, + { + "question": "Do you want to provide a telephone number for the applicant?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "sectionName": "About you" + } + }, + { + "question": "Is the applicant's contact address the same as the property address?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": { + "sectionName": "About you" + } + }, + { + "question": "Which of these best describes you?", + "responses": [ + { + "value": "Friend or relative" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About you" + } + }, + { + "question": "We may need to visit your site to assess your application. If we do, who should we contact to arrange the visit?", + "responses": [ + { + "value": "Me" + } + ], + "metadata": { + "sectionName": "About you" + } + }, + { + "question": "Which of these best describes you?", + "responses": [ + { + "value": "Friend or relative acting on the applicant's behalf" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About you" + } + }, + { + "question": "Which of these best describes the applicant's interest in the land?", + "responses": [ + { + "value": "Sole owner" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (Development Management Procedure) (England) Order 2015" + } + ], + "sectionName": "About you" + } + }, + { + "question": "Did you get any pre-application advice from the council before making this application?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "sectionName": "About this application" + } + }, + { + "question": "What type of planning application are you making?", + "responses": [ + { + "value": "Full planning permission" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About this application" + } + }, + { + "question": "Is the property a home?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About this application" + } + }, + { + "question": "What types of changes does the application relate to?", + "responses": [ + { + "value": "Extension" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About this application" + } + }, + { + "question": "What type of extension is it?", + "responses": [ + { + "value": "Roof extension" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About this application" + } + }, + { + "question": "List the changes involved in the roof extension", + "responses": [ + { + "value": "Add dormer" + } + ], + "metadata": { + "sectionName": "About this application" + } + }, + { + "question": "Is the purpose of the project to support the needs of a disabled resident?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012, Regulation 14UK Statutory Instruments 2012 No. 2920 Regulation 4, Equalities Act 2010, Section 6 Children Act 1989, Part 3" + } + ], + "sectionName": "About this application" + } + }, + { + "question": "Is it a prior approval application?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About this application" + } + }, + { + "question": "Is the property a home?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About this application" + } + }, + { + "question": "What works does the project involve?", + "responses": [ + { + "value": "Extension" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About this application" + } + }, + { + "question": "Is this application a resubmission?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012, Regulation 9" + } + ], + "sectionName": "About this application" + } + }, + { + "question": "Does the application qualify for a disability exemption?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About this application" + } + }, + { + "question": "Does the application qualify for a resubmission exemption?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About this application" + } + }, + { + "question": "Is the site a sports field?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "policyRefs": [ + { + "text": "The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012 Chapter 2, Paragraph 3" + } + ], + "sectionName": "About this application" + } + }, + { + "question": "Is the application being made by (or on behalf of) a parish or community council?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "policyRefs": [ + { + "text": "The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012 - Regulation 11" + } + ], + "sectionName": "About this application" + } + }, + { + "question": "Are you also submitting another proposal for the same site today?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012 Chapter 2, Paragraph 10" + } + ], + "sectionName": "About this application" + } + }, + { + "question": "Does the application qualify for the sports club fee reduction?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About this application" + } + }, + { + "question": "Does the application qualify for the parish council reduction?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "policyRefs": [ + { + "text": "The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012 - Regulation 11" + } + ], + "sectionName": "About this application" + } + }, + { + "question": "Does the application qualify for the alternative application reduction?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "policyRefs": [ + { + "text": "The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012 Chapter 2, Paragraph 10" + } + ], + "sectionName": "About this application" + } + }, + { + "question": "What type of application is it?", + "responses": [ + { + "value": "Full planning permission" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About this application" + } + }, + { + "question": "What does the project involve?", + "responses": [ + { + "value": "Extension" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About this application" + } + }, + { + "question": "How much new floor area is being created?", + "responses": [ + { + "value": "Less than 100m²", + "metadata": { + "flags": [ + "Community infrastructure levy / Not liable" + ] + } + } + ], + "metadata": { + "autoAnswered": true, + "policyRefs": [ + { + "text": "The Community Infrastructure Levy Regulations 2010, Regulation 42" + } + ], + "sectionName": "About this application" + } + }, + { + "question": "Is this a householder planning application?", + "responses": [ + { + "value": "Yes", + "metadata": { + "flags": [ + "Community infrastructure levy / Not liable" + ] + } + } + ], + "metadata": { + "autoAnswered": true, + "policyRefs": [ + { + "text": "The Community Infrastructure Levy Regulations 2010, Regulation 42" + } + ], + "sectionName": "About this application" + } + }, + { + "question": "Have the works already started?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "Upload drawings" + } + }, + { + "question": "What changes does the project involve?", + "responses": [ + { + "value": "Extension" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "Upload drawings" + } + }, + { + "question": "Is the project to add an outbuilding?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "Upload drawings" + } + }, + { + "question": "Which Local Planning authority is it?", + "responses": [ + { + "value": "Lambeth" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "Check" + } + }, + { + "question": "Connections with London Borough of Lambeth", + "responses": [ + { + "value": "None of the above apply to me" + } + ], + "metadata": { + "sectionName": "Check" + } + }, + { + "question": "I confirm that:", + "responses": [ + { + "value": "The information contained in this application is truthful, accurate and complete, to the best of my knowledge" + } + ], + "metadata": { + "sectionName": "Check" + } + }, + { + "question": "Does the application qualify for a disability exemption?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "Pay and send" + } + }, + { + "question": "Does the application qualify for a resubmission exemption?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "Pay and send" + } + }, + { + "question": "Which Local Planning authority is it?", + "responses": [ + { + "value": "Lambeth" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "Pay and send" + } + } + ], + "files": [ + { + "name": "https://api.editor.planx.dev/file/private/vg0av01p/RoofPlan.pdf", + "type": [ + { + "value": "property.drawing.roofPlan", + "description": "Roof plan - existing" + }, + { + "value": "proposal.drawing.roofPlan", + "description": "Roof plan - proposed" + } + ] + }, + { + "name": "https://api.editor.planx.dev/file/private/ka97yl2c/Site%20plan.pdf", + "type": [ + { + "value": "property.drawing.sitePlan", + "description": "Site plan - existing" + }, + { + "value": "proposal.drawing.sitePlan", + "description": "Site plan - proposed" + } + ] + }, + { + "name": "https://api.editor.planx.dev/file/private/osprppqo/Elevations.pdf", + "type": [ + { + "value": "property.drawing.elevation", + "description": "Elevation plan - existing" + }, + { + "value": "proposal.drawing.elevation", + "description": "Elevation plan - proposed" + } + ] + }, + { + "name": "https://api.editor.planx.dev/file/private/cri3ziaj/Plan.pdf", + "type": [ + { + "value": "property.drawing.floorPlan", + "description": "Floor plan - existing" + }, + { + "value": "proposal.drawing.floorPlan", + "description": "Floor plan - proposed" + } + ] + } + ], + "metadata": { + "service": { + "flowId": "c06eebb7-6201-4bc0-9fe7-ec5d7a1c0797", + "publishedFlowId": 1, + "name": "Apply for a test service", + "owner": "opensystemslab", + "url": "https://www.editor.planx.uk/opensystemslab/apply-for-a-test-service/preview" + }, + "session": { + "source": "PlanX", + "id": "session123", + "createdAt": "2023-01-01 00:00:00", + "submittedAt": "2023-01-02 00:00:00" + }, + "schema": { + "url": "https://theopensystemslab.github.io/digital-planning-data-schemas/v0.0.1/schema.json" + } + } +} \ No newline at end of file diff --git a/examples/validPriorApproval.json b/examples/validPriorApproval.json new file mode 100644 index 00000000..34092561 --- /dev/null +++ b/examples/validPriorApproval.json @@ -0,0 +1,1104 @@ +{ + "data": { + "application": { + "type": { + "value": "pa.part14.classJ", + "description": "Prior Approval - Install or change solar panels" + }, + "fee": { + "calculated": 96, + "payable": 96, + "exemption": { + "disability": true, + "resubmission": true + }, + "reduction": { + "sports": false, + "parishCouncil": false, + "alternative": false + } + }, + "declaration": { + "accurate": true, + "connection": { + "value": "relation.electedMember", + "description": "I think the King is but a man, as I am. The violet smells to him as it doth to me. The element shows to him as it doth to me. All his senses have but human conditions. His ceremonies laid by, in his nakedness he appears but a man." + } + } + }, + "user": { + "role": "applicant" + }, + "applicant": { + "type": "company", + "contact": { + "name": { + "first": "William", + "last": "Shakespeare" + }, + "email": "thebard@example.com", + "phone": { + "primary": "2830407283" + }, + "company": { + "name": "Lord Chamberlain's Men" + } + }, + "address": { + "sameAsSiteAddress": true + }, + "siteContact": { + "role": "applicant" + } + }, + "property": { + "address": { + "latitude": 51.5081109, + "longitude": -0.0965974, + "x": 532192, + "y": 180515, + "title": "INTERNATIONAL SHAKESPEARE GLOBE CENTRE LTD, SHAKESPEARE GLOBE THEATRE, 21, NEW GLOBE WALK, LONDON", + "source": "Ordnance Survey", + "uprn": "200003377200", + "usrn": "22503078", + "pao": "21", + "street": "NEW GLOBE WALK", + "town": "LONDON", + "postcode": "SE1 9DT" + }, + "boundary": { + "site": { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0967472791671659, + 51.50830340605074 + ], + [ + -0.09676337242125525, + 51.50830507546084 + ], + [ + -0.09689748287199977, + 51.50831926544436 + ], + [ + -0.09693503379820824, + 51.50790775412855 + ], + [ + -0.09666681289671919, + 51.50789439872946 + ], + [ + -0.09645719784644384, + 51.507889747624404 + ], + [ + -0.09639290535660058, + 51.50828278342658 + ], + [ + -0.0967472791671659, + 51.50830340605074 + ] + ] + ] + }, + "properties": null + }, + "area": { + "hectares": 0.152757, + "squareMetres": 1527.57 + } + }, + "constraints": { + "planning": [ + { + "value": "tpo", + "description": "Tree Preservation Order (TPO) or zone", + "overlaps": false + }, + { + "value": "listed", + "description": "Listed Building", + "overlaps": false + }, + { + "value": "article4", + "description": "Article 4 Direction area", + "overlaps": true, + "entities": [ + "Central Activities Zone - Change of use from offices to dwelling houses is restricted", + "Central Activities Zone - Demolition of commercial buildings and construction of new dwellinghouses is restricted", + "Bankside and Borough District Town Centre - Demolition of commercial buildings and construction of new dwellinghouses is restricted", + "Central Activities Zone - Change of use from Class E to residential is restricted", + "Bankside and Borough District Town Centre - Change of use from Class E to residential is restricted" + ] + }, + { + "value": "monument", + "description": "Site of a Scheduled Monument", + "overlaps": false + }, + { + "value": "designated", + "description": "Designated land", + "overlaps": false + }, + { + "value": "nature.SAC", + "description": "Special Area of Conservation (SAC)", + "overlaps": false + }, + { + "value": "nature.ASNW", + "description": "Ancient Semi-Natural Woodland (ASNW)", + "overlaps": false + }, + { + "value": "nature.SSSI", + "description": "Site of Special Scientific Interest (SSSI)", + "overlaps": false + }, + { + "value": "locallyListed", + "description": "Locally Listed Building", + "overlaps": false + }, + { + "value": "designated.SPA", + "description": "Special Protection Area (SPA)", + "overlaps": false + }, + { + "value": "designated.WHS", + "description": "UNESCO World Heritage Site or buffer zone", + "overlaps": false + }, + { + "value": "registeredPark", + "description": "Historic Park or Garden", + "overlaps": false + }, + { + "value": "designated.AONB", + "description": "Area of Outstanding Natural Beauty (AONB)", + "overlaps": false + }, + { + "value": "article4.southwark.MA", + "description": "Article 4 Direction area", + "overlaps": true, + "entities": [] + }, + { + "value": "article4.southwark.caz", + "description": "Article 4 Direction area", + "overlaps": true, + "entities": [ + "" + ] + }, + { + "value": "article4.southwark.hmo", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "designated.nationalPark", + "description": "National Park", + "overlaps": false + }, + { + "value": "article4.southwark.sunray", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "article4.southwark.railway", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "designated.conservationArea", + "description": "Conservation Area", + "overlaps": false + }, + { + "value": "article4.southwark.publichouse", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "designated.nationalPark.broads", + "description": "National Park - Broads", + "overlaps": false + }, + { + "value": "article4.southwark.southernrail", + "description": "Article 4 Direction area", + "overlaps": false + }, + { + "value": "road.classified", + "description": "Classified Road", + "overlaps": false + } + ] + }, + "localAuthorityDistrict": [ + "Southwark" + ], + "region": "London", + "type": { + "value": "commercial.leisure.entertainment", + "description": "Bingo Hall / Cinema / Conference / Exhibition Centre / Theatre / Concert Hall" + } + }, + "proposal": { + "projectType": [ + { + "value": "alter.equipment.solar", + "description": "Install solar panels" + } + ], + "description": "@todo not provided in Prior Approval", + "boundary": { + "site": { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0967472791671659, + 51.50830340605074 + ], + [ + -0.09676337242125525, + 51.50830507546084 + ], + [ + -0.09689748287199977, + 51.50831926544436 + ], + [ + -0.09693503379820824, + 51.50790775412855 + ], + [ + -0.09666681289671919, + 51.50789439872946 + ], + [ + -0.09645719784644384, + 51.507889747624404 + ], + [ + -0.09639290535660058, + 51.50828278342658 + ], + [ + -0.0967472791671659, + 51.50830340605074 + ] + ] + ] + }, + "properties": null + }, + "area": { + "hectares": 0.152757, + "squareMetres": 1527.57 + } + } + } + }, + "result": [ + { + "value": "Planning permission / Prior approval", + "description": "It looks like the proposed changes do not require planning permission, however the applicant must apply for Prior Approval before proceeding." + } + ], + "responses": [ + { + "question": "Is the property in Southwark?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "The property" + } + }, + { + "question": "What type of property is it?", + "responses": [ + { + "value": "Something else" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "The property" + } + }, + { + "question": "Which of these best describes the use of the property?", + "responses": [ + { + "value": "Leisure and sport" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "The property" + } + }, + { + "question": "What type of leisure property is it?", + "responses": [ + { + "value": "Entertainment" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "The property" + } + }, + { + "question": "Have the works already started?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "sectionName": "About the project" + } + }, + { + "question": "Describe the project.", + "responses": [ + { + "value": "Addition of solar panels in order to power the globe with green energy." + } + ], + "metadata": { + "sectionName": "About the project" + } + }, + { + "question": "What type of property is it?", + "responses": [ + { + "value": "Commercial building" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About the project" + } + }, + { + "question": "What type of property is it?", + "responses": [ + { + "value": "Neither a house nor a flat" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About the project" + } + }, + { + "question": "What do you want to install?", + "responses": [ + { + "value": "Solar photovoltaics (PV)" + } + ], + "metadata": { + "sectionName": "About the project" + } + }, + { + "question": "Are there any other locations where the equipment could be installed?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 14, Class A\nThe Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 14, Class K" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "Would the solar panels would be less visible from the highway in these other locations?", + "responses": [ + { + "value": "No", + "metadata": { + "flags": [ + "Planning permission / Permitted development" + ] + } + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 14, Class A" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "Is the building listed?", + "responses": [ + { + "value": "No", + "metadata": { + "flags": [ + "Planning permission / Permitted development" + ] + } + } + ], + "metadata": { + "autoAnswered": true, + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 14, Class J" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "Is the property a scheduled monument?", + "responses": [ + { + "value": "No", + "metadata": { + "flags": [ + "Planning permission / Permitted development" + ] + } + } + ], + "metadata": { + "autoAnswered": true, + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 14, Class J" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "Where are the new solar panels?", + "responses": [ + { + "value": "On roofs" + } + ], + "metadata": { + "sectionName": "About the project" + } + }, + { + "question": "What type of roofs are they?", + "responses": [ + { + "value": "Both pitched and flat" + } + ], + "metadata": { + "sectionName": "About the project" + } + }, + { + "question": "Is the property in a conservation area?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "policyRefs": [ + { + "text": "[The Town and Country Planning (General Permitted Development) (England) Order 2015 S.2.P.14. .A.1 (c)](https://www.legislation.gov.uk/uksi/2015/596/schedule/2/part/14)" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "Is the property in a world heritage site?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 14, Class A.1 (c)" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "How far do the new solar panels stick out from the pitched roofs?", + "responses": [ + { + "value": "0.2m or less", + "metadata": { + "flags": [ + "Planning permission / Permitted development" + ] + } + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 14, Class J" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "How high are the new solar panels compared to the flat roofs?", + "responses": [ + { + "value": "1m or less higher than the roof", + "metadata": { + "flags": [ + "Planning permission / Permitted development" + ] + } + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 14, Class A" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "How far are the new solar panels from the edge of the roof?", + "responses": [ + { + "value": "1m or more from the edge of the roof", + "metadata": { + "flags": [ + "Planning permission / Permitted development" + ] + } + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 14, Class J" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "What do you want to install?", + "responses": [ + { + "value": "Solar photovoltaics (PV)" + } + ], + "metadata": { + "sectionName": "About the project" + } + }, + { + "question": "What is the total capacity of all solar photovoltaics (PV)?", + "responses": [ + { + "value": "Between 50kW and 1,000kW (1 MW)", + "metadata": { + "flags": [ + "Planning permission / Prior approval" + ] + } + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 14, Class J.3" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "The solar panels must be removed when no longer needed.", + "responses": [ + { + "value": "OK", + "metadata": { + "flags": [ + "Planning permission / Permitted development" + ] + } + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 14, Class AThe Town and Country Planning (General Permitted Development) (England) Order 2015 Schedule 2, Part 14, Class K" + } + ], + "sectionName": "About the project" + } + }, + { + "question": "What type of property is it?", + "responses": [ + { + "value": "Another use" + } + ], + "metadata": { + "sectionName": "About the project" + } + }, + { + "question": "Select your project", + "responses": [ + { + "value": "Install solar panels" + } + ], + "metadata": { + "sectionName": "About the project" + } + }, + { + "question": "What type of application is being applied for?", + "responses": [ + { + "value": "Part 14 Class J" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About the project" + } + }, + { + "question": "Is the property subject to any Article 4 directions?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About the project" + } + }, + { + "question": "List all the changes involved in the project", + "responses": [ + { + "value": "Install solar panels" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About the project" + } + }, + { + "question": "What type of prior approval application is it?", + "responses": [ + { + "value": "Install or change solar panels" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "About the project" + } + }, + { + "question": "Are you applying on behalf of someone else?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "sectionName": "About you" + } + }, + { + "question": "Which of these best describes you?", + "responses": [ + { + "value": "Company" + } + ], + "metadata": { + "sectionName": "About you" + } + }, + { + "question": "Your contact details", + "responses": [ + { + "value": "Mr William Shakespeare Lord Chamberlain's Men 2830407283 thebard@example.com" + } + ], + "metadata": { + "sectionName": "About you" + } + }, + { + "question": "Is your contact address the same as the property address?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": { + "sectionName": "About you" + } + }, + { + "question": "We may need to visit the site to assess your application. If we do, who should we contact to arrange the visit?", + "responses": [ + { + "value": "Me, the applicant" + } + ], + "metadata": { + "sectionName": "About you" + } + }, + { + "question": "What type of prior approval application is it?", + "responses": [ + { + "value": "Install or change solar panels" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "Upload drawings" + } + }, + { + "question": "Where will the solar panels be installed?", + "responses": [ + { + "value": "On roofs" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "Upload drawings" + } + }, + { + "question": "Your planning officer will need to check how far the solar panels stick out beyond the surface of the roof. What do you have that shows this?", + "responses": [ + { + "value": "Manufacturer's specification document" + } + ], + "metadata": { + "sectionName": "Upload drawings" + } + }, + { + "question": "Do you want to upload any photographs?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "sectionName": "Upload drawings" + } + }, + { + "question": "Would you like to upload any additional drawings, documents or images?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "sectionName": "Upload drawings" + } + }, + { + "question": "What type of planning application are you making?", + "responses": [ + { + "value": "Prior approval" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "Check your application" + } + }, + { + "question": "What type of prior approval application is it?", + "responses": [ + { + "value": "Install or change solar panels" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "Check your application" + } + }, + { + "question": "Is the property a home?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "Check your application" + } + }, + { + "question": "What type of changes does the project involve?", + "responses": [ + { + "value": "Alteration" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "Check your application" + } + }, + { + "question": "Are the public allowed to access the building?", + "responses": [ + { + "value": "Yes" + } + ], + "metadata": { + "sectionName": "Check your application" + } + }, + { + "question": "Is the sole purpose of the project to provide disabled access to (or within) the building?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "policyRefs": [ + { + "text": "The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012, Regulation 14 & Regulation 4 (1)(b)" + } + ], + "sectionName": "Check your application" + } + }, + { + "question": "What type of prior approval application is it?", + "responses": [ + { + "value": "Install or change solar panels" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "Check your application" + } + }, + { + "question": "Does the application qualify for a disability exemption?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "Check your application" + } + }, + { + "question": "Does the application qualify for a resubmission exemption?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "Check your application" + } + }, + { + "question": "Does the application qualify to the same-day-planning-application exemption?", + "responses": [ + { + "value": "No" + } + ], + "metadata": { + "autoAnswered": true, + "policyRefs": [ + { + "text": "The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) Regulations 2012, Regulation 14" + } + ], + "sectionName": "Check your application" + } + }, + { + "question": "Which Local Planning authority is it?", + "responses": [ + { + "value": "Southwark" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "Check your application" + } + }, + { + "question": "Describe your connection", + "responses": [ + { + "value": "I think the King is but a man, as I am. The violet smells to him as it doth to me. The element shows to him as it doth to me. All his senses have but human conditions. His ceremonies laid by, in his nakedness he appears but a man." + } + ], + "metadata": { + "sectionName": "Check your application" + } + }, + { + "question": "Connections with Southwark Council", + "responses": [ + { + "value": "I am related to, or partnered with, an elected member for Southwark Council" + } + ], + "metadata": { + "sectionName": "Check your application" + } + }, + { + "question": "I confirm that:", + "responses": [ + { + "value": "The information contained in this application is truthful, accurate and complete, to the best of my knowledge" + } + ], + "metadata": { + "sectionName": "Check your application" + } + }, + { + "question": "Which Local Planning authority is it?", + "responses": [ + { + "value": "Southwark" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "Pay and submit" + } + }, + { + "question": "What type of prior approval application is it?application.type", + "responses": [ + { + "value": "Install or change solar panels" + } + ], + "metadata": { + "autoAnswered": true, + "sectionName": "Pay and submit" + } + } + ], + "files": [ + { + "name": "https://api.editor.planx.dev/file/private/vab4d0k6/Test%20document.pdf", + "type": [ + { + "value": "proposal.drawing.other", + "description": "Other - drawing" + } + ] + }, + { + "name": "https://api.editor.planx.dev/file/private/es3w6dgi/Elevations.pdf", + "type": [ + { + "value": "proposal.drawing.sitePlan", + "description": "Site plan - proposed" + } + ] + } + ], + "metadata": { + "service": { + "flowId": "c06eebb7-6201-4bc0-9fe7-ec5d7a1c0797", + "publishedFlowId": 1, + "name": "Apply for a test service", + "owner": "opensystemslab", + "url": "https://www.editor.planx.uk/opensystemslab/apply-for-a-test-service/preview" + }, + "session": { + "source": "PlanX", + "id": "session123", + "createdAt": "2023-01-01 00:00:00", + "submittedAt": "2023-01-02 00:00:00" + }, + "schema": { + "url": "https://theopensystemslab.github.io/digital-planning-data-schemas/v0.0.1/schema.json" + } + } +} \ No newline at end of file diff --git a/schema/schema.json b/schema/schema.json index 6180af51..0c4b0e62 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -2497,8 +2497,7 @@ "required": [ "source", "id", - "createdAt", - "submittedAt" + "createdAt" ], "type": "object" } diff --git a/scripts/build-json-examples.ts b/scripts/build-json-examples.ts index 3d4d14fd..85050712 100644 --- a/scripts/build-json-examples.ts +++ b/scripts/build-json-examples.ts @@ -1,6 +1,9 @@ -import * as path from 'path'; -import {validExampleApplicant, validExampleAgent} from '../examples'; import * as fs from 'fs'; +import * as path from 'path'; +import {validLDCE} from '../examples/data/ldcE'; +import {validLDCP} from '../examples/data/ldcP'; +import {validPlanningPermission} from '../examples/data/planningPermission'; +import {validPriorApproval} from '../examples/data/priorApproval'; import {Schema} from '../types/Schema'; interface Example { @@ -10,12 +13,20 @@ interface Example { const examplesToConvert: Example[] = [ { - filename: 'validExampleApplicant', - data: validExampleApplicant, + filename: 'validLawfulDevelopmentCertificateExisting', + data: validLDCE, + }, + { + filename: 'validLawfulDevelopmentCertificateProposed', + data: validLDCP, + }, + { + filename: 'validPriorApproval', + data: validPriorApproval, }, { - filename: 'validExampleAgent', - data: validExampleAgent, + filename: 'validPlanningPermission', + data: validPlanningPermission, }, ]; diff --git a/tests/usage.test.ts b/tests/usage.test.ts index e58af0fb..63e3eb5f 100644 --- a/tests/usage.test.ts +++ b/tests/usage.test.ts @@ -1,33 +1,47 @@ -import {expect, test} from 'vitest'; -import {Validator} from 'jsonschema'; -import addFormats from 'ajv-formats'; import Ajv from 'ajv'; +import addFormats from 'ajv-formats'; +import {Validator} from 'jsonschema'; +import {describe, expect, test} from 'vitest'; + +import {validLDCE} from '../examples/data/ldcE'; +import {validLDCP} from '../examples/data/ldcP'; +import {validPlanningPermission} from '../examples/data/planningPermission'; +import {validPriorApproval} from '../examples/data/priorApproval'; import generatedSchema from '../schema/schema.json'; -import {validExampleAgent, validExampleApplicant} from '../examples/'; -import {describe} from 'vitest'; + +const examples = [ + validLDCE, + validLDCP, + validPriorApproval, + validPlanningPermission, +]; describe("parsing using the 'jsonschema' library", () => { - [validExampleAgent, validExampleApplicant].forEach(example => { - test(`the schema accepts a valid example: ${example.data.user.role}`, () => { + examples.forEach(example => { + test(`accepts a valid example: ${example.data.application.type.description}`, () => { const validator = new Validator(); - const result = validator.validate(example, generatedSchema); + const result = validator.validate(example, generatedSchema, { + disableFormat: true, + }); expect(result.errors).toHaveLength(0); }); }); - test('the schema rejects an invalid example', () => { + test('rejects an invalid example', () => { const validator = new Validator(); const invalidExample = {foo: 'bar'}; - const result = validator.validate(invalidExample, generatedSchema); + const result = validator.validate(invalidExample, generatedSchema, { + disableFormat: true, + }); expect(result.errors).not.toHaveLength(0); }); }); describe("parsing using the 'ajv' library", () => { - [validExampleAgent, validExampleApplicant].forEach(example => { - test(`the schema accepts a valid example: ${example.data.user.role}`, () => { + examples.forEach(example => { + test(`accepts a valid example: ${example.data.application.type.description}`, () => { // addFormats() is required for types UUID, email, datetime etc const ajv = addFormats(new Ajv()); const validate = ajv.compile(generatedSchema); @@ -38,7 +52,7 @@ describe("parsing using the 'ajv' library", () => { }); }); - test('the schema rejects an invalid example', () => { + test('rejects an invalid example', () => { const invalidExample = {foo: 'bar'}; const ajv = addFormats(new Ajv()); diff --git a/types/Schema.ts b/types/Schema.ts index ce0feaab..be1a7f83 100644 --- a/types/Schema.ts +++ b/types/Schema.ts @@ -14,11 +14,11 @@ import {File} from './schema/File'; */ export interface Schema { data: { + application: Application; + user: User; applicant: Applicant; property: Property; - application: Application; proposal: Proposal; - user: User; }; result: Result; metadata: Metadata; From 8ff48fa7c9b48707f3f38564c846225ad22936aa Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Tue, 3 Oct 2023 18:34:40 +0200 Subject: [PATCH 2/6] use real staging metadata --- examples/data/ldcE.ts | 14 +++++++------- examples/data/ldcP.ts | 10 +++++----- examples/data/planningPermission.ts | 14 +++++++------- examples/data/priorApproval.ts | 14 +++++++------- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/examples/data/ldcE.ts b/examples/data/ldcE.ts index 04d7d9f9..4f2c4cab 100644 --- a/examples/data/ldcE.ts +++ b/examples/data/ldcE.ts @@ -2414,17 +2414,17 @@ export const validLDCE: Schema = { ], metadata: { service: { - flowId: 'c06eebb7-6201-4bc0-9fe7-ec5d7a1c0797', + flowId: '824628b2-deeb-48b0-92b1-2ca7f3b17163', publishedFlowId: 1, - name: 'Apply for a test service', - owner: 'opensystemslab', - url: 'https://www.editor.planx.uk/opensystemslab/apply-for-a-test-service/preview', + name: 'Apply for a lawful development certificate', + owner: 'Buckinghamshire', + url: 'https://www.editor.planx.dev/buckinghamshire/apply-for-a-lawful-development-certificate/preview', }, session: { source: 'PlanX', - id: 'session123', - createdAt: '2023-01-01 00:00:00', - submittedAt: '2023-01-02 00:00:00', + id: '95f90e21-93f5-4761-90b3-815c673e041f', + createdAt: '2023-10-01 00:00:00', + submittedAt: '2023-10-02 00:00:00', }, schema: { url: 'https://theopensystemslab.github.io/digital-planning-data-schemas/v0.0.1/schema.json', diff --git a/examples/data/ldcP.ts b/examples/data/ldcP.ts index 6bef73bd..3668b724 100644 --- a/examples/data/ldcP.ts +++ b/examples/data/ldcP.ts @@ -1107,17 +1107,17 @@ export const validLDCP: Schema = { ], metadata: { service: { - flowId: 'c06eebb7-6201-4bc0-9fe7-ec5d7a1c0797', + flowId: '824628b2-deeb-48b0-92b1-2ca7f3b17163', publishedFlowId: 1, name: 'Apply for a lawful development certificate', owner: 'Buckinghamshire', - url: 'https://www.editor.planx.uk/buckinghamshire/apply-for-a-lawful-development-certificate/preview', + url: 'https://www.editor.planx.dev/buckinghamshire/apply-for-a-lawful-development-certificate/preview', }, session: { source: 'PlanX', - id: 'session123', - createdAt: '2023-01-01 00:00:00', - submittedAt: '2023-01-02 00:00:00', + id: '8da51c5b-a2a0-4386-a15d-29d66f9c121c', + createdAt: '2023-10-01 00:00:00', + submittedAt: '2023-10-02 00:00:00', }, schema: { url: 'https://theopensystemslab.github.io/digital-planning-data-schemas/v0.0.1/schema.json', diff --git a/examples/data/planningPermission.ts b/examples/data/planningPermission.ts index 5c0833b4..789c7871 100644 --- a/examples/data/planningPermission.ts +++ b/examples/data/planningPermission.ts @@ -1546,17 +1546,17 @@ export const validPlanningPermission: Schema = { ], metadata: { service: { - flowId: 'c06eebb7-6201-4bc0-9fe7-ec5d7a1c0797', + flowId: '01e38c5d-e701-4e44-acdc-4d6b5cc3b854', publishedFlowId: 1, - name: 'Apply for a test service', - owner: 'opensystemslab', - url: 'https://www.editor.planx.uk/opensystemslab/apply-for-a-test-service/preview', + name: 'Apply for planning permission', + owner: 'Lambeth', + url: 'https://www.editor.planx.dev/lambeth/apply-for-planning-permission/preview', }, session: { source: 'PlanX', - id: 'session123', - createdAt: '2023-01-01 00:00:00', - submittedAt: '2023-01-02 00:00:00', + id: '81bcaa0f-baf5-4573-ba0a-ea868c573faf', + createdAt: '2023-10-01 00:00:00', + submittedAt: '2023-10-02 00:00:00', }, schema: { url: 'https://theopensystemslab.github.io/digital-planning-data-schemas/v0.0.1/schema.json', diff --git a/examples/data/priorApproval.ts b/examples/data/priorApproval.ts index f7d6dea8..7d0058ff 100644 --- a/examples/data/priorApproval.ts +++ b/examples/data/priorApproval.ts @@ -1037,17 +1037,17 @@ export const validPriorApproval: Schema = { ], metadata: { service: { - flowId: 'c06eebb7-6201-4bc0-9fe7-ec5d7a1c0797', + flowId: 'c6628103-c648-4663-81e1-bfa0a1a18340', publishedFlowId: 1, - name: 'Apply for a test service', - owner: 'opensystemslab', - url: 'https://www.editor.planx.uk/opensystemslab/apply-for-a-test-service/preview', + name: 'Apply for prior approval', + owner: 'Southwark', + url: 'https://www.editor.planx.dev/southwark/apply-for-prior-approval/preview', }, session: { source: 'PlanX', - id: 'session123', - createdAt: '2023-01-01 00:00:00', - submittedAt: '2023-01-02 00:00:00', + id: 'b18c301b-9d44-4c6c-8d27-5b5bf33c570b', + createdAt: '2023-10-01 00:00:00', + submittedAt: '2023-10-02 00:00:00', }, schema: { url: 'https://theopensystemslab.github.io/digital-planning-data-schemas/v0.0.1/schema.json', From 8e0265cf39e2640a8de0a2f6ff1494c6503e9720 Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Tue, 3 Oct 2023 21:22:59 +0200 Subject: [PATCH 3/6] update README --- README.md | 73 ++++++++++++++++++++----------------------------------- 1 file changed, 26 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index 89d80953..84dcfc09 100644 --- a/README.md +++ b/README.md @@ -1,74 +1,53 @@ -# Digital Planning Data Schemas -Welcome to the Digital Planning Data Schemas repository! Here, we are creating and maintaining comprehensive JSON schemas that define the structure and format of Digital Planning services. Our goal is to provide a standardized and consistent way of representing data in the realm of digital planning, enabling seamless integration, efficient data exchange, and improved collaboration among various tools and platforms. +# Digital Planning Data schemas +This repository contains [JSON schemas](https://json-schema.org/) to describe Digital Planning services developed by [Open Digital Planning](https://opendigitalplanning.org/). -## Installation -```shell -npm install -g pnpm@8.6.6 -pnpm i -``` - -## Repository Structure -Here's an overview of the main directories: +Our initial schema defines planning application types - including Lawful Development Certificates, Prior Approval, and Householder Planning Permission - that are being designed and submitted via [PlanX](https://www.planx.uk/). -`/schema`: This directory contains the JSON schema files for different aspects of Digital Planning. Each schema is documented and versioned to ensure consistency and traceability. +Digital Planning Data schemas aim to encourage more interoperability and consistency between systems by offering a central, version controlled standard for documenting and validating planning data. Going forward, we hope that this repository will expand to further describe planning reference numbers, site notices, consultations, and more. -`/examples`: Here, you'll find real-world examples illustrating how to use the schemas in various scenarios. These examples provide practical guidance on implementing the schemas in your projects. (TODO) +## Usage +There's two main options for integrating with Digital Planning Data schemas: -`/types`: This directory holds the TypeScript interfaces which are used to generate the JSON schema. +1. Reference a hosted schema file directly, like `http://theopensystemslab.github.io/digital-planning-data-schemas//schema.json` -`/tests`: This houses test suites and cases to ensure that the schemas are valid, accurate, and capable of handling a variety of scenarios. +2. Clone this repository and reference the local schema files programmatically in your own code through tools that support JSON schema validation -## Usage -Integrating our Digital Planning data schemas into your projects is straightforward. You can either directly reference the schema files from this repository or integrate them programmatically using tools that support JSON schema validation. +For more detailed info on integrating and validating schemas, please refer to the examples and tests in this repo. -To reference a schema directly, you can use URLs like the following: +## Repository structure -`http://theopensystemslab.github.io/digital-planning-data-schemas//schema.json` +`/examples`: Examples of valid payloads for each application type supported by the JSON schema -Alternatively, you can clone the repository to your local environment and use the schema files programmatically in your code. +`/schema`: The main JSON schema file. The `main` branch of this repo will reflect the `@next` version, while historic versions are documented and released on the `dist` branch. -For more detailed information on integrating and validating schemas, please refer to our examples. +`/types`: TypeScript interfaces used to generate the JSON schema. -## Developing -The JSON schema is defined using TypeScript interfaces and then generated using the `ts-json-schema-generator` library. +`/tests`: Test suites to ensure that the generated schemas and example payloads are valid, accurate, and capable of handling different scenarios. -To make changes, update source types and then run `pnpm build` to generate the output JSON file. +## Installation -We use JSDocs to annotate our types, which is also used as part of the schema generation. At a minimum, please try to add the following annotation to all types - +Assumes [PNPM](https://pnpm.io/) is available globally. -```ts -/** - * @id Unique identifier - * @title A helpful title - usually the interface name - * @description A helpful description of this interface - */ +```shell +pnpm i ``` -Many additional properties can be provided, such as +## Developing +The JSON schema is defined using TypeScript interfaces and then generated using the `ts-json-schema-generator` library. -```ts -/** - * @format e.g. "email", "uuid" - see https://json-schema.org/understanding-json-schema/reference/string.html#built-in-formats - * @minmum Min length - * @maximum Max length - * @pattern Regex - see https://json-schema.org/understanding-json-schema/reference/regular_expressions.html#regular-expressions - */ -``` +To make changes, update `/types` and then run `pnpm build` to automatically generate the output JSON file under `/schema`. + +We use JSDocs to annotate our types, which is also used as part of the schema generation. Please see the [JSON schema docs](https://json-schema.org/understanding-json-schema/reference/) for a full list of references for various types ## Publishing -To publish a new version, commit a change to `main` which increments `package.json` version. +To publish a new version, open a pull request against `main` which increments the `package.json` version. -GitHub actions will then checkout the `dist` branch and commit your change, and they'll be published via GitHub pages at `http://theopensystemslab.github.io/digital-planning-data-schemas//schema.json` - -For more details, take a look at [publish.yml](https://github.com/theopensystemslab/digital-planning-data-schemas/blob/main/.github/workflows/publish.yml) +On merge, the [publish.yml](https://github.com/theopensystemslab/digital-planning-data-schemas/blob/main/.github/workflows/publish.yml) GitHub Action will update the `dist` branch, create a release, and publish the new version via GitHub pages at `http://theopensystemslab.github.io/digital-planning-data-schemas//schema.json` ## Contributing -We welcome contributions from the community to help us improve and expand our Digital Planning data schemas. Whether you find a bug, want to propose an enhancement, or have created a new schema that you believe would benefit others, we encourage you to get involved by opening an issue. +We welcome feedback, bug reports, and contributions to help improve and grow the Digital Planning Data schemas via GitHub Issues and Pull Requests. ## License Distributed under the Mozilla Public License Version 2.0. See `LICENSE.txt` for more information. - -## Feedback -If you have any suggestions, questions, or concerns related to our Digital Planning data schemas or the repository itself, please open an Issue on GitHub. \ No newline at end of file From 69db25ed7a499e725552a86afbb6b5ca0db24a14 Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Tue, 3 Oct 2023 21:30:08 +0200 Subject: [PATCH 4/6] last tweaks --- README.md | 2 +- examples/data/ldcE.ts | 3 +++ examples/data/planningPermission.ts | 3 +++ examples/data/priorApproval.ts | 3 +++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 84dcfc09..418212ac 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ There's two main options for integrating with Digital Planning Data schemas: 1. Reference a hosted schema file directly, like `http://theopensystemslab.github.io/digital-planning-data-schemas//schema.json` -2. Clone this repository and reference the local schema files programmatically in your own code through tools that support JSON schema validation +2. Clone this repository and reference the local schema files programmatically in your own code using tools that support JSON schema validation For more detailed info on integrating and validating schemas, please refer to the examples and tests in this repo. diff --git a/examples/data/ldcE.ts b/examples/data/ldcE.ts index 4f2c4cab..ad4985c3 100644 --- a/examples/data/ldcE.ts +++ b/examples/data/ldcE.ts @@ -19,6 +19,9 @@ export const validLDCE: Schema = { parishCouncil: true, alternative: true, }, + reference: { + govPay: 'sandbox-ref-123', + }, }, declaration: { accurate: true, diff --git a/examples/data/planningPermission.ts b/examples/data/planningPermission.ts index 789c7871..b22c37cf 100644 --- a/examples/data/planningPermission.ts +++ b/examples/data/planningPermission.ts @@ -19,6 +19,9 @@ export const validPlanningPermission: Schema = { parishCouncil: true, alternative: true, }, + reference: { + govPay: 'sandbox-ref-456', + }, }, declaration: { accurate: true, diff --git a/examples/data/priorApproval.ts b/examples/data/priorApproval.ts index 7d0058ff..16b98f96 100644 --- a/examples/data/priorApproval.ts +++ b/examples/data/priorApproval.ts @@ -19,6 +19,9 @@ export const validPriorApproval: Schema = { parishCouncil: false, alternative: false, }, + reference: { + govPay: 'sandbox-ref-789', + }, }, declaration: { accurate: true, From 93434ed36ece7cf05907cbb04605574eb5718328 Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Tue, 3 Oct 2023 21:41:40 +0200 Subject: [PATCH 5/6] example and test instructions in readme --- README.md | 14 ++++++++++++-- tests/usage.test.ts | 6 +++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 418212ac..d14b1d90 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,19 @@ The JSON schema is defined using TypeScript interfaces and then generated using To make changes, update `/types` and then run `pnpm build` to automatically generate the output JSON file under `/schema`. -We use JSDocs to annotate our types, which is also used as part of the schema generation. +Types should be annotated using JSDocs, which will then be read during schema generation. -Please see the [JSON schema docs](https://json-schema.org/understanding-json-schema/reference/) for a full list of references for various types +Please see the [JSON schema docs](https://json-schema.org/understanding-json-schema/reference/) for a full list of references for various types. + +## Adding examples and tests + +Add a TypeScript file to `/examples/data` with at least one exported variable representing an example payload definition. + +Add each exported payload to `examplesToConvert` in `/scripts/build-json-examples` and `examplesToTest` in `/tests/usage.test.ts`. + +Run `pnpm build-json-examples` to automatically generate a corresponding JSON file per example payload in the root of `/examples`. + +Run `pnpm test` to confirm your example payload can be successfully validated against the Digital Planning Data schema. ## Publishing To publish a new version, open a pull request against `main` which increments the `package.json` version. diff --git a/tests/usage.test.ts b/tests/usage.test.ts index 63e3eb5f..a509abff 100644 --- a/tests/usage.test.ts +++ b/tests/usage.test.ts @@ -9,7 +9,7 @@ import {validPlanningPermission} from '../examples/data/planningPermission'; import {validPriorApproval} from '../examples/data/priorApproval'; import generatedSchema from '../schema/schema.json'; -const examples = [ +const examplesToTest = [ validLDCE, validLDCP, validPriorApproval, @@ -17,7 +17,7 @@ const examples = [ ]; describe("parsing using the 'jsonschema' library", () => { - examples.forEach(example => { + examplesToTest.forEach(example => { test(`accepts a valid example: ${example.data.application.type.description}`, () => { const validator = new Validator(); const result = validator.validate(example, generatedSchema, { @@ -40,7 +40,7 @@ describe("parsing using the 'jsonschema' library", () => { }); describe("parsing using the 'ajv' library", () => { - examples.forEach(example => { + examplesToTest.forEach(example => { test(`accepts a valid example: ${example.data.application.type.description}`, () => { // addFormats() is required for types UUID, email, datetime etc const ajv = addFormats(new Ajv()); From 897a6aecff0fd7816ba494a6b2f56610550e3897 Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Wed, 4 Oct 2023 09:15:46 +0200 Subject: [PATCH 6/6] tidy JSDocs --- README.md | 4 +- ...dLawfulDevelopmentCertificateExisting.json | 17 ++++--- ...dLawfulDevelopmentCertificateProposed.json | 10 ++-- examples/validPlanningPermission.json | 17 ++++--- examples/validPriorApproval.json | 17 ++++--- schema/schema.json | 51 ++++++++++++------- types/Schema.ts | 4 +- types/enums/ApplicationTypes.ts | 4 +- types/enums/FileTypes.ts | 2 +- types/enums/Flags.ts | 2 +- types/enums/PlanningConstraints.ts | 2 +- types/enums/ProjectTypes.ts | 2 +- types/enums/PropertyTypes.ts | 2 +- types/enums/VehicleParking.ts | 2 +- types/schema/File.ts | 2 +- types/schema/Metadata.ts | 3 +- types/schema/Responses.ts | 3 +- types/schema/Result.ts | 4 +- types/schema/data/Applicant.ts | 4 +- types/schema/data/Application.ts | 2 +- types/schema/data/Property.ts | 4 +- types/schema/data/Proposal.ts | 2 +- 22 files changed, 94 insertions(+), 66 deletions(-) diff --git a/README.md b/README.md index d14b1d90..4643dda7 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # Digital Planning Data schemas This repository contains [JSON schemas](https://json-schema.org/) to describe Digital Planning services developed by [Open Digital Planning](https://opendigitalplanning.org/). -Our initial schema defines planning application types - including Lawful Development Certificates, Prior Approval, and Householder Planning Permission - that are being designed and submitted via [PlanX](https://www.planx.uk/). +Our initial schema defines data structures, rules, and validation logic for planning applications - including Lawful Development Certificates, Prior Approval, and Householder Planning Permission - that are being designed and submitted via [PlanX](https://www.planx.uk/). -Digital Planning Data schemas aim to encourage more interoperability and consistency between systems by offering a central, version controlled standard for documenting and validating planning data. Going forward, we hope that this repository will expand to further describe planning reference numbers, site notices, consultations, and more. +Digital Planning Data schemas aim to encourage more interoperability and consistency between systems by offering a central, version controlled standard for documenting and validating planning data. Going forward, we hope that this repository will expand beyond applications to further describe planning reference numbers, site notices, consultations, and more. ## Usage There's two main options for integrating with Digital Planning Data schemas: diff --git a/examples/validLawfulDevelopmentCertificateExisting.json b/examples/validLawfulDevelopmentCertificateExisting.json index 2f1d3323..574d9522 100644 --- a/examples/validLawfulDevelopmentCertificateExisting.json +++ b/examples/validLawfulDevelopmentCertificateExisting.json @@ -16,6 +16,9 @@ "sports": true, "parishCouncil": true, "alternative": true + }, + "reference": { + "govPay": "sandbox-ref-123" } }, "declaration": { @@ -2608,17 +2611,17 @@ ], "metadata": { "service": { - "flowId": "c06eebb7-6201-4bc0-9fe7-ec5d7a1c0797", + "flowId": "824628b2-deeb-48b0-92b1-2ca7f3b17163", "publishedFlowId": 1, - "name": "Apply for a test service", - "owner": "opensystemslab", - "url": "https://www.editor.planx.uk/opensystemslab/apply-for-a-test-service/preview" + "name": "Apply for a lawful development certificate", + "owner": "Buckinghamshire", + "url": "https://www.editor.planx.dev/buckinghamshire/apply-for-a-lawful-development-certificate/preview" }, "session": { "source": "PlanX", - "id": "session123", - "createdAt": "2023-01-01 00:00:00", - "submittedAt": "2023-01-02 00:00:00" + "id": "95f90e21-93f5-4761-90b3-815c673e041f", + "createdAt": "2023-10-01 00:00:00", + "submittedAt": "2023-10-02 00:00:00" }, "schema": { "url": "https://theopensystemslab.github.io/digital-planning-data-schemas/v0.0.1/schema.json" diff --git a/examples/validLawfulDevelopmentCertificateProposed.json b/examples/validLawfulDevelopmentCertificateProposed.json index add7e87a..9bed2a00 100644 --- a/examples/validLawfulDevelopmentCertificateProposed.json +++ b/examples/validLawfulDevelopmentCertificateProposed.json @@ -1169,17 +1169,17 @@ ], "metadata": { "service": { - "flowId": "c06eebb7-6201-4bc0-9fe7-ec5d7a1c0797", + "flowId": "824628b2-deeb-48b0-92b1-2ca7f3b17163", "publishedFlowId": 1, "name": "Apply for a lawful development certificate", "owner": "Buckinghamshire", - "url": "https://www.editor.planx.uk/buckinghamshire/apply-for-a-lawful-development-certificate/preview" + "url": "https://www.editor.planx.dev/buckinghamshire/apply-for-a-lawful-development-certificate/preview" }, "session": { "source": "PlanX", - "id": "session123", - "createdAt": "2023-01-01 00:00:00", - "submittedAt": "2023-01-02 00:00:00" + "id": "8da51c5b-a2a0-4386-a15d-29d66f9c121c", + "createdAt": "2023-10-01 00:00:00", + "submittedAt": "2023-10-02 00:00:00" }, "schema": { "url": "https://theopensystemslab.github.io/digital-planning-data-schemas/v0.0.1/schema.json" diff --git a/examples/validPlanningPermission.json b/examples/validPlanningPermission.json index d4cddd22..5e08440f 100644 --- a/examples/validPlanningPermission.json +++ b/examples/validPlanningPermission.json @@ -16,6 +16,9 @@ "sports": true, "parishCouncil": true, "alternative": true + }, + "reference": { + "govPay": "sandbox-ref-456" } }, "declaration": { @@ -1567,17 +1570,17 @@ ], "metadata": { "service": { - "flowId": "c06eebb7-6201-4bc0-9fe7-ec5d7a1c0797", + "flowId": "01e38c5d-e701-4e44-acdc-4d6b5cc3b854", "publishedFlowId": 1, - "name": "Apply for a test service", - "owner": "opensystemslab", - "url": "https://www.editor.planx.uk/opensystemslab/apply-for-a-test-service/preview" + "name": "Apply for planning permission", + "owner": "Lambeth", + "url": "https://www.editor.planx.dev/lambeth/apply-for-planning-permission/preview" }, "session": { "source": "PlanX", - "id": "session123", - "createdAt": "2023-01-01 00:00:00", - "submittedAt": "2023-01-02 00:00:00" + "id": "81bcaa0f-baf5-4573-ba0a-ea868c573faf", + "createdAt": "2023-10-01 00:00:00", + "submittedAt": "2023-10-02 00:00:00" }, "schema": { "url": "https://theopensystemslab.github.io/digital-planning-data-schemas/v0.0.1/schema.json" diff --git a/examples/validPriorApproval.json b/examples/validPriorApproval.json index 34092561..d8de3097 100644 --- a/examples/validPriorApproval.json +++ b/examples/validPriorApproval.json @@ -16,6 +16,9 @@ "sports": false, "parishCouncil": false, "alternative": false + }, + "reference": { + "govPay": "sandbox-ref-789" } }, "declaration": { @@ -1085,17 +1088,17 @@ ], "metadata": { "service": { - "flowId": "c06eebb7-6201-4bc0-9fe7-ec5d7a1c0797", + "flowId": "c6628103-c648-4663-81e1-bfa0a1a18340", "publishedFlowId": 1, - "name": "Apply for a test service", - "owner": "opensystemslab", - "url": "https://www.editor.planx.uk/opensystemslab/apply-for-a-test-service/preview" + "name": "Apply for prior approval", + "owner": "Southwark", + "url": "https://www.editor.planx.dev/southwark/apply-for-prior-approval/preview" }, "session": { "source": "PlanX", - "id": "session123", - "createdAt": "2023-01-01 00:00:00", - "submittedAt": "2023-01-02 00:00:00" + "id": "b18c301b-9d44-4c6c-8d27-5b5bf33c570b", + "createdAt": "2023-10-01 00:00:00", + "submittedAt": "2023-10-02 00:00:00" }, "schema": { "url": "https://theopensystemslab.github.io/digital-planning-data-schemas/v0.0.1/schema.json" diff --git a/schema/schema.json b/schema/schema.json index 0c4b0e62..8d35502f 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -6,7 +6,7 @@ "AddressInput": { "$id": "#AddressInput", "additionalProperties": false, - "description": "Address information for an applicant contact rather than site", + "description": "Address information for a personal contact not necessarily associated with the site", "properties": { "country": { "type": "string" @@ -863,7 +863,7 @@ "additionalProperties": false, "properties": { "description": { - "const": "Planning Permission", + "const": "Planning Permission - Retrospective", "type": "string" }, "value": { @@ -878,7 +878,7 @@ "type": "object" } ], - "description": "Planning application types supported by this schema" + "description": "Planning application types" }, "Area": { "$id": "#Area", @@ -899,7 +899,7 @@ "BaseApplicant": { "$id": "#BaseApplicant", "additionalProperties": false, - "description": "Information about the user who completed the application for themself, or information about the resident who the user applied on behalf of", + "description": "Information about the user who completed the application for themself, or information about the person who the user applied on behalf of", "properties": { "address": { "$ref": "#/definitions/UserAddress" @@ -1048,7 +1048,7 @@ "File": { "$id": "#File", "additionalProperties": false, - "description": "Files uploaded by the user to support this application", + "description": "File uploaded and labeled by the user to support the application", "properties": { "description": { "type": "string" @@ -2434,8 +2434,9 @@ "type": "object" }, "service": { + "$id": "#DigitalPlanningMetadata", "additionalProperties": false, - "description": "Details of the digital planning service which generated this payload", + "description": "Details of the digital planning service which sent the application", "properties": { "flowId": { "anyOf": [ @@ -2624,7 +2625,7 @@ "type": "object" } ], - "description": "Planning constraints that overlap with the proposed site boundary determined by spatial queries against Planning Data (planning.data.gov.uk) and Ordnance Survey" + "description": "Planning constraints that overlap with the property site boundary determined by spatial queries against Planning Data (planning.data.gov.uk) and Ordnance Survey" }, "PreApplication": { "$id": "#PreApplication", @@ -4847,7 +4848,7 @@ "$ref": "#/definitions/LondonProperty" } ], - "description": "The site where the works will happen" + "description": "Information about the site where the works will happen" }, "PropertyType": { "$id": "#PropertyType", @@ -13210,7 +13211,7 @@ "Proposal": { "$id": "#Proposal", "additionalProperties": false, - "description": "Information about the project", + "description": "Information about the proposed works and any changes to the property", "properties": { "boundary": { "additionalProperties": false, @@ -13417,13 +13418,29 @@ "type": "string" }, "type": "array" + }, + "options": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "items": { + "$ref": "#/definitions/Response" + }, + "type": "array" + } + ] } }, "type": "object" }, "Responses": { "$id": "#Responses", - "description": "The ordered list of questions, answers, and their metadata for this application", + "description": "The ordered list of questions, answers, and their metadata for the application", "items": { "$ref": "#/definitions/QuestionAndResponses" }, @@ -13431,7 +13448,7 @@ }, "Result": { "$id": "#Result", - "description": "The result of this application. Results are determined by flags corresponding to responses; each application can have up to one result per flagset", + "description": "The result of the application. Results are determined by flags corresponding to responses; each application can have up to one result per flagset", "items": { "$ref": "#/definitions/ResultFlag" }, @@ -13981,7 +13998,7 @@ "type": "object" } ], - "description": "An individual result of this application" + "description": "The result of a single flagset" }, "SiteContact": { "$id": "#SiteContact", @@ -14684,7 +14701,7 @@ "description": "Vehicle parking types" } }, - "description": "Root of PlanX's Digital Planning Schema", + "description": "The root schema for an application generated by a digital planning service", "properties": { "data": { "additionalProperties": false, @@ -14706,11 +14723,11 @@ } }, "required": [ + "application", + "user", "applicant", "property", - "application", - "proposal", - "user" + "proposal" ], "type": "object" }, @@ -14737,6 +14754,6 @@ "responses", "files" ], - "title": "Digital Planning Data Schema", + "title": "Digital Planning Application", "type": "object" } \ No newline at end of file diff --git a/types/Schema.ts b/types/Schema.ts index be1a7f83..222070e5 100644 --- a/types/Schema.ts +++ b/types/Schema.ts @@ -9,8 +9,8 @@ import {User} from './schema/data/User'; import {File} from './schema/File'; /** - * @title Digital Planning Data Schema - * @description Root of PlanX's Digital Planning Schema + * @title Digital Planning Application + * @description The root schema for an application generated by a digital planning service */ export interface Schema { data: { diff --git a/types/enums/ApplicationTypes.ts b/types/enums/ApplicationTypes.ts index 346d1c15..977e824a 100644 --- a/types/enums/ApplicationTypes.ts +++ b/types/enums/ApplicationTypes.ts @@ -1,5 +1,5 @@ /** - * Values of `application.type` + * Values of `data.application.type` */ export const ApplicationTypes = { ldc: 'Lawful Development Certificate', @@ -49,5 +49,5 @@ export const ApplicationTypes = { 'Prior Approval - Demolish buildings and build homes in their place', pp: 'Planning Permission', 'pp.full.householder': 'Planning Permission', - 'pp.full.householder.retro': 'Planning Permission', + 'pp.full.householder.retro': 'Planning Permission - Retrospective', }; diff --git a/types/enums/FileTypes.ts b/types/enums/FileTypes.ts index 123f1371..95744212 100644 --- a/types/enums/FileTypes.ts +++ b/types/enums/FileTypes.ts @@ -1,5 +1,5 @@ /** - * File types + * Values of `file.type` */ export const FileTypes = { 'property.drawing.elevation': 'Elevation plan - existing', diff --git a/types/enums/Flags.ts b/types/enums/Flags.ts index 506da97c..3b1c6aa5 100644 --- a/types/enums/Flags.ts +++ b/types/enums/Flags.ts @@ -1,5 +1,5 @@ /** - * Flags + * Flags and their flagset that make up a result */ export const Flags = { 'Planning permission / Immune': diff --git a/types/enums/PlanningConstraints.ts b/types/enums/PlanningConstraints.ts index 7716de63..914d4da5 100644 --- a/types/enums/PlanningConstraints.ts +++ b/types/enums/PlanningConstraints.ts @@ -1,5 +1,5 @@ /** - * Minimum set of values for `property.constraints.planning` + * Minimum set of values for `data.property.constraints.planning` * actual values will also include council-specific variables like `article4.{councilName}.hmo` */ export const PlanningConstraints = { diff --git a/types/enums/ProjectTypes.ts b/types/enums/ProjectTypes.ts index 33d191cc..dad48ad1 100644 --- a/types/enums/ProjectTypes.ts +++ b/types/enums/ProjectTypes.ts @@ -1,5 +1,5 @@ /** - * Values of proposal.projectType + * Values of `data.proposal.projectType` */ export const ProjectTypes = { 'alter.balcony': 'Add or alter a balcony', diff --git a/types/enums/PropertyTypes.ts b/types/enums/PropertyTypes.ts index b903708d..b3169405 100644 --- a/types/enums/PropertyTypes.ts +++ b/types/enums/PropertyTypes.ts @@ -1,5 +1,5 @@ /** - * Values of `property.type` + * Values of `data.property.type` */ export const PropertyTypes = { commercial: 'Commercial', diff --git a/types/enums/VehicleParking.ts b/types/enums/VehicleParking.ts index 4227ac93..b934517f 100644 --- a/types/enums/VehicleParking.ts +++ b/types/enums/VehicleParking.ts @@ -1,5 +1,5 @@ /** - * Values of proposal.details.vehicleParking + * Values of `data.proposal.details.vehicleParking` */ export const VehicleParking = { cars: 'Cars', diff --git a/types/schema/File.ts b/types/schema/File.ts index c04ebd04..0b744e42 100644 --- a/types/schema/File.ts +++ b/types/schema/File.ts @@ -2,7 +2,7 @@ import {FileTypes} from '../enums/FileTypes'; /** * @id #File - * @description Files uploaded by the user to support this application + * @description File uploaded and labeled by the user to support the application */ export interface File { name: string; diff --git a/types/schema/Metadata.ts b/types/schema/Metadata.ts index 784b115f..318332b5 100644 --- a/types/schema/Metadata.ts +++ b/types/schema/Metadata.ts @@ -2,7 +2,8 @@ import {DateTime, URL, UUID} from './../utils'; export interface Metadata { /** - * @description Details of the digital planning service which generated this payload + * @id #DigitalPlanningMetadata + * @description Details of the digital planning service which sent the application */ service: { flowId: UUID | string; // @todo temp fix for failing UUID validation, sort out and tighten diff --git a/types/schema/Responses.ts b/types/schema/Responses.ts index 5c2d1a45..604f74e7 100644 --- a/types/schema/Responses.ts +++ b/types/schema/Responses.ts @@ -1,6 +1,6 @@ /** * @id #Responses - * @description The ordered list of questions, answers, and their metadata for this application + * @description The ordered list of questions, answers, and their metadata for the application */ export type Responses = QuestionAndResponses[]; @@ -15,6 +15,7 @@ export interface QuestionMetaData { export interface ResponseMetaData { flags?: Array; // @todo connect to result/flags enum + options?: Array | Array; } export interface Response { diff --git a/types/schema/Result.ts b/types/schema/Result.ts index ffd4c46b..05ad18de 100644 --- a/types/schema/Result.ts +++ b/types/schema/Result.ts @@ -2,7 +2,7 @@ import {Flags} from '../enums/Flags'; /** * @id #Result - * @description The result of this application. Results are determined by flags corresponding to responses; each application can have up to one result per flagset + * @description The result of the application. Results are determined by flags corresponding to responses; each application can have up to one result per flagset */ export type Result = ResultFlag[]; // @todo validate/restrict array to one result per flagset @@ -19,6 +19,6 @@ type FlagMap = { /** * @id #ResultFlag - * @description An individual result of this application + * @description The result of a single flagset */ export type ResultFlag = FlagMap[keyof FlagMap]; diff --git a/types/schema/data/Applicant.ts b/types/schema/data/Applicant.ts index 01378cd0..3ffa769b 100644 --- a/types/schema/data/Applicant.ts +++ b/types/schema/data/Applicant.ts @@ -9,7 +9,7 @@ export type Applicant = BaseApplicant | Agent; /** * @id #BaseApplicant - * @description Information about the user who completed the application for themself, or information about the resident who the user applied on behalf of + * @description Information about the user who completed the application for themself, or information about the person who the user applied on behalf of */ export interface BaseApplicant { type: 'individual' | 'company' | 'charity' | 'public' | 'parishCouncil'; @@ -60,7 +60,7 @@ export interface UserContact { /** * @id #AddressInput - * @description Address information for an applicant contact rather than site + * @description Address information for a personal contact not necessarily associated with the site */ export interface AddressInput { line1: string; diff --git a/types/schema/data/Application.ts b/types/schema/data/Application.ts index 3498e016..45015518 100644 --- a/types/schema/data/Application.ts +++ b/types/schema/data/Application.ts @@ -68,6 +68,6 @@ type ApplicationTypeMap = { /** * @id #ApplicationType - * @description Planning application types supported by this schema + * @description Planning application types */ export type ApplicationType = ApplicationTypeMap[keyof ApplicationTypeMap]; diff --git a/types/schema/data/Property.ts b/types/schema/data/Property.ts index 1be5c18e..a746af21 100644 --- a/types/schema/data/Property.ts +++ b/types/schema/data/Property.ts @@ -3,7 +3,7 @@ import {Area, GeoJSON} from '../../utils'; /** * @id #Property - * @description The site where the works will happen + * @description Information about the site where the works will happen */ export type Property = UKProperty | LondonProperty; @@ -113,7 +113,7 @@ interface OverlappingPlanningConstraint extends BasePlanningConstraint { /** * @id #PlanningConstraint - * @description Planning constraints that overlap with the proposed site boundary determined by spatial queries against Planning Data (planning.data.gov.uk) and Ordnance Survey + * @description Planning constraints that overlap with the property site boundary determined by spatial queries against Planning Data (planning.data.gov.uk) and Ordnance Survey */ export type PlanningConstraint = | NonOverlappingPlanningConstraint diff --git a/types/schema/data/Proposal.ts b/types/schema/data/Proposal.ts index e056e794..d3464028 100644 --- a/types/schema/data/Proposal.ts +++ b/types/schema/data/Proposal.ts @@ -4,7 +4,7 @@ import {Area, GeoJSON} from '../../utils'; /** * @id #Proposal - * @description Information about the project + * @description Information about the proposed works and any changes to the property */ export interface Proposal { projectType: ProjectType[];