Skip to content

Commit

Permalink
Merge branch 'main' of github.com:theopensystemslab/digital-planning-…
Browse files Browse the repository at this point in the history
…data-schemas into v0.7.0
  • Loading branch information
jessicamcinchak committed Jul 11, 2024
2 parents 2b9d6a1 + c67d415 commit 119ecfa
Show file tree
Hide file tree
Showing 11 changed files with 2,464 additions and 39 deletions.
717 changes: 717 additions & 0 deletions examples/data/landDrainageConsent.ts

Large diffs are not rendered by default.

1,143 changes: 1,143 additions & 0 deletions examples/landDrainageConsent.json

Large diffs are not rendered by default.

535 changes: 508 additions & 27 deletions schema/schema.json

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions scripts/build-json-examples.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as fs from 'fs';
import * as path from 'path';

import {landDrainageConsent} from '../examples/data/landDrainageConsent';
import {lawfulDevelopmentCertificateExisting} from '../examples/data/lawfulDevelopmentCertificate/existing';
import {lawfulDevelopmentCertificateProposed} from '../examples/data/lawfulDevelopmentCertificate/proposed';
import {listedBuildingConsent} from '../examples/data/listedBuildingConsent';
Expand Down Expand Up @@ -64,6 +65,10 @@ const examplesToConvert: Example[] = [
filename: 'listedBuildingConsent',
data: listedBuildingConsent,
},
{
filename: 'landDrainageConsent',
data: landDrainageConsent,
},
];

const convertTypeScriptObjectsToJSONFiles = (objects: Example[]) => {
Expand Down
4 changes: 3 additions & 1 deletion tests/usage.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {priorApprovalLargerExtension} from './../examples/data/priorApproval/largerExtension';
import Ajv from 'ajv';
import addFormats from 'ajv-formats';
import {Validator} from 'jsonschema';
import {describe, expect, test} from 'vitest';

import {landDrainageConsent} from '../examples/data/landDrainageConsent';
import {lawfulDevelopmentCertificateExisting} from '../examples/data/lawfulDevelopmentCertificate/existing';
import {lawfulDevelopmentCertificateProposed} from '../examples/data/lawfulDevelopmentCertificate/proposed';
import {listedBuildingConsent} from '../examples/data/listedBuildingConsent';
Expand All @@ -13,6 +13,7 @@ import {planningPermissionMinor} from '../examples/data/planningPermission/minor
import {priorApprovalBuildHomes} from '../examples/data/priorApproval/buildHomes';
import {priorApprovalConvertCommercialToHome} from '../examples/data/priorApproval/convertCommercialToHome';
import {priorApprovalExtendUniversity} from '../examples/data/priorApproval/extendUniversity';
import {priorApprovalLargerExtension} from './../examples/data/priorApproval/largerExtension';
import {priorApprovalSolarPanels} from '../examples/data/priorApproval/solarPanels';
import generatedSchema from '../schema/schema.json';

Expand All @@ -28,6 +29,7 @@ const examplesToTest = [
priorApprovalBuildHomes,
priorApprovalConvertCommercialToHome,
priorApprovalLargerExtension,
landDrainageConsent,
];

describe("parsing using the 'jsonschema' library", () => {
Expand Down
21 changes: 15 additions & 6 deletions types/enums/ApplicationTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ export const ApplicationTypes = {
'Prior Approval - Convert a commercial building into a home or homes',
'pa.part3.classN':
'Prior Approval - Convert a casino or amusement arcade into a home or homes',
'pa.part3.classPA':
'Prior Approval - Convert a light industrial building into a home',
'pa.part3.classQ':
'Prior Approval - Convert an agricultural building into a home',
'pa.part3.classR':
Expand All @@ -54,7 +52,8 @@ export const ApplicationTypes = {
'Prior Approval - Convert an agricultural building to a school',
'pa.part3.classT':
'Prior Approval - Convert a commercial building to a school',
'pa.part3.classV': 'Prior Approval - Part 3 Class V',
'pa.part3.classV':
'Prior Approval - Changes of use permitted under a permission granted on an application',
'pa.part4.classBB': 'Prior Approval - Put up a temporary structure',
'pa.part4.classBC': 'Prior Approval - Develop a temporary campsite',
'pa.part4.classCA':
Expand All @@ -72,12 +71,22 @@ export const ApplicationTypes = {
'Prior Approval - Extend a school, college, university, prison or hospital',
'pa.part9.classD': 'Prior Approval - Development of toll facilities',
'pa.part11.classB': 'Prior Approval - Demolish a building',
'pa.part14.classA':
'Prior Approval - Install or change solar equipment on domestic premises',
'pa.part14.classB':
'Prior Approval - Install or change stand-alone solar equipment on domestic premises',
'pa.part14.classJ': 'Prior Approval - Install or change solar panels',
'pa.part14.classK':
'Prior Approval - Install or change stand-alone solar equipment on non-domestic premises',
'pa.part14.classOA':
'Prior Approval - Installation of a solar canopy on non-domestic, off-street parking',
'pa.part16.classA': 'Prior Approval - Install telecommunications equipment',
'pa.part17': 'Prior Approval - Coal mining',
'pa.part17.classB': 'Prior Approval - Part 17 Class B',
'pa.part17.classC': 'Prior Approval - Part 17 Class C',
'pa.part17.classG': 'Prior Approval - Part 17 Class G',
'pa.part17.classB':
'Prior Approval - Other developments ancillary to mining operations',
'pa.part17.classC': 'Prior Approval - Developments for maintenance or safety',
'pa.part17.classG':
'Prior Approval - Coal mining development by the Coal Authority for maintence or safety',
'pa.part18.classA':
'Prior Approval - Development under private acts or orders',
'pa.part19.classTA': 'Prior Approval - Development on a closed defence site',
Expand Down
6 changes: 6 additions & 0 deletions types/enums/FileTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export const FileTypes = {
litterVerminAndBirdControlDetails:
'Details of litter, vermin and bird control',
locationPlan: 'Location plan',
methodStatement: 'Method statement',
mineralsAndWasteAssessment: 'Minerals and waste assessment',
necessaryInformation:
'Information the authority considers necessary for the application',
Expand All @@ -66,8 +67,10 @@ export const FileTypes = {
'photographs.existing': 'Photographs - existing',
'photographs.proposed': 'Photographs - proposed',
planningStatement: 'Planning statement',
recycleWasteStorageDetails: 'Recyclable waste storage details',
relevantInformation:
'Information the applicant considers relevant to the application',
residentialUnitsDetails: 'Residential units details',
'roofPlan.existing': 'Roof plan - existing',
'roofPlan.proposed': 'Roof plan - proposed',
'sections.existing': 'Sections - existing',
Expand All @@ -84,6 +87,7 @@ export const FileTypes = {
sunlightAndDaylightReport: 'Sunlight and daylight report',
sustainabilityStatement: 'Sustainability statement',
technicalEvidence: 'Technical evidence',
technicalSpecification: 'Technical specification',
tenancyAgreement: 'Tenancy agreement',
tenancyInvoice: 'Tenancy invoice',
townCentreImpactAssessment: 'Town centre uses - Impact assessment',
Expand All @@ -94,6 +98,7 @@ export const FileTypes = {
treeAndHedgeRemovedOrPruned: 'Removed or pruned trees and hedges',
treeCanopyCalculator: 'Tree canopy calculator',
treeConditionReport: 'Tree condition report',
treePlan: 'Tree plan',
treesReport: 'Trees report',
'unitPlan.existing': 'Unit plan - existing',
'unitPlan.proposed': 'Unit plan - proposed',
Expand All @@ -105,6 +110,7 @@ export const FileTypes = {
viabilityAppraisal: 'Viability Appraisal',
visualisations: 'Visualisations',
wasteAndRecyclingStrategy: 'Waste and recycling strategy',
wasteStorageDetails: 'Waste storage details',
waterEnvironmentAssessment: 'Water environment assessment',
};

Expand Down
10 changes: 6 additions & 4 deletions types/enums/ProjectTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const ProjectTypes = {
'alter.chimneys': 'Change chimneys',
'alter.chimneys.add': 'Add a chimney',
'alter.chimneys.replace': 'Replace a chimney',
'alter.deck': 'Add a verandah or deck',
'alter.decks': 'Add a verandah or deck',
'alter.decksHigh': 'Add a high verandah or deck',
'alter.drains': 'Work on drains',
'alter.equipment': 'Install equipment',
Expand All @@ -66,10 +66,12 @@ export const ProjectTypes = {
'alter.equipment.heatPump.water': 'Install a water heat pump',
'alter.equipment.industrial': 'Install industrial equipment',
'alter.equipment.lighting': 'Install outdoor lights',
'alter.equipment.machinery': 'Install machinery',
'alter.equipment.solar': 'Install solar panels',
'alter.equipment.solar.pv': 'Install solar photovoltaics (PV)',
'alter.equipment.solar.thermal': 'Install solar thermal equipment',
'alter.equipment.tank': 'Install an outdoor tank (for example a water tank)',
'alter.equipment.ventilation': 'Install ventilation',
'alter.equipment.wifi': 'Install internet equipment',
'alter.equipment.wind': 'Install a wind turbine',
'alter.facades': 'Change the material or colour of the external walls',
Expand Down Expand Up @@ -311,9 +313,10 @@ export const ProjectTypes = {
'internal.staircases': 'Alter internal staircases',
'internal.walls': 'Alter internal walls',
'internal.windows.openings': 'Alter internal window openings',
maintain: 'Maintenance of an existing structure',
new: 'Add a new separate building or self-contained units',
'new.agriculture': 'New agricultural buildings',
'new.agriculture.glassHouse': 'New agricultural buildings - glass house',
'new.agriculture.glasshouse': 'New agricultural buildings - glasshouse',
'new.agriculture.mining': 'New agricultural buildings - mining',
'new.agriculture.pigs': 'New agricultural buildings - pigs',
'new agriculture.poultry': 'New agricultural buildings - poultry',
Expand All @@ -330,8 +333,7 @@ export const ProjectTypes = {
'new.residential.dwelling': 'Build new homes',
'new.retail': 'New retail premises',
'new.telecoms': 'Install telecommunications equipment',
'new.temporaryStructure':
'Erect a temporary structure for historic visitor attractions and listed buildings',
'new.temporaryStructure': 'Build a temporary structure',
'new.warehouse': 'New storage or distribution premises',
not: 'Negate a project type',
'not.alter.replace': 'Do not add or change windows or doors',
Expand Down
25 changes: 25 additions & 0 deletions types/schema/data/Applicant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export interface BaseApplicant {
address: UserAddress;
ownership?: Ownership;
siteContact: SiteContact;
maintenanceContact?: MaintenanceContact;
}

/**
Expand Down Expand Up @@ -164,3 +165,27 @@ export interface SiteContactOther {
email: string;
phone: string;
}

/**
* @id #MaintenanceContact
* @description Contact information for the person(s) responsible for maintenance while the works are carried out
*/
export type MaintenanceContact = {
when:
| 'duringConstruction'
| 'afterConstruction'
| 'duringAndAfterConstruction';
address: Address;
contact: {
name: {
title?: string;
first: string;
last: string;
};
email: string;
phone: string;
company?: {
name: string;
};
};
}[];
13 changes: 12 additions & 1 deletion types/schema/data/Application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export interface BaseApplication {
fee: ApplicationFee | ApplicationFeeNotApplicable;
declaration: ApplicationDeclaration;
preApp?: PreApplication;
planningApp?: PlanningApplication;
CIL?: CommunityInfrastructureLevy;
}

Expand Down Expand Up @@ -150,7 +151,7 @@ export interface ApplicationDeclaration {

/**
* @id #PreApplication
* @description Details of the pre-application, if applicable
* @description Details of the pre-application preceeding this application, if applicable
*/
export interface PreApplication {
reference: string;
Expand All @@ -159,6 +160,16 @@ export interface PreApplication {
summary: string;
}

/**
* @id #PlanningApplication
* @description Details of the planning application linked to this application, if applicable
*/
export interface PlanningApplication {
reference: string;
date: Date;
localPlanningAuthority: string;
}

/**
* @id #CommunityInfrastructureLevy
* @description Details about the Community Infrastructure Levy planning charge, if applicable
Expand Down
24 changes: 24 additions & 0 deletions types/schema/data/Proposal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,30 @@ export interface BaseProposal {
newBuild?: {count: number};
};
units?: ResidentialUnits;
watercourse?: {
name: string;
type: 'ditch' | 'millStream' | 'pond' | 'river' | 'streamOrBrook' | 'other';
};
structures?: {
type:
| 'bridge'
| 'catchpit'
| 'culvert'
| 'pipe'
| 'gully'
| 'headwall'
| 'manhole'
| 'weir'
| 'other';
total: number;
permanent?: {
count: number;
};
temporary?: {
count: number;
};
};
environmentalImpactDescription?: string;
}

/**
Expand Down

0 comments on commit 119ecfa

Please sign in to comment.