Skip to content

Commit

Permalink
feat: add types for existing & proposed Materials (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak authored Mar 13, 2024
1 parent 2f7315a commit 7b8fd03
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 0 deletions.
53 changes: 53 additions & 0 deletions schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1578,6 +1578,9 @@
],
"type": "object"
},
"materials": {
"$ref": "#/definitions/Materials"
},
"new": {
"additionalProperties": false,
"properties": {
Expand Down Expand Up @@ -3510,6 +3513,9 @@
],
"type": "object"
},
"materials": {
"$ref": "#/definitions/Materials"
},
"new": {
"additionalProperties": false,
"properties": {
Expand Down Expand Up @@ -4187,6 +4193,9 @@
],
"type": "object"
},
"details": {
"$ref": "#/definitions/PropertyDetails"
},
"localAuthorityDistrict": {
"description": "Current and historic UK Local Authority Districts that contain this address sourced from planning.data.gov.uk/dataset/local-authority-district",
"items": {
Expand Down Expand Up @@ -4288,6 +4297,36 @@
],
"type": "object"
},
"Materials": {
"additionalProperties": false,
"properties": {
"boundary": {
"type": "string"
},
"door": {
"type": "string"
},
"lighting": {
"type": "string"
},
"other": {
"type": "string"
},
"roof": {
"type": "string"
},
"surface": {
"type": "string"
},
"wall": {
"type": "string"
},
"window": {
"type": "string"
}
},
"type": "object"
},
"Metadata": {
"$id": "#DigitalPlanningMetadata",
"anyOf": [
Expand Down Expand Up @@ -12691,6 +12730,17 @@
],
"description": "Information about the site where the works will happen"
},
"PropertyDetails": {
"$id": "#PropertyDetails",
"additionalProperties": false,
"description": "Details about the property as it currently exists",
"properties": {
"materials": {
"$ref": "#/definitions/Materials"
}
},
"type": "object"
},
"PropertyType": {
"$id": "#PropertyType",
"anyOf": [
Expand Down Expand Up @@ -21930,6 +21980,9 @@
],
"type": "object"
},
"details": {
"$ref": "#/definitions/PropertyDetails"
},
"localAuthorityDistrict": {
"description": "Current and historic UK Local Authority Districts that contain this address sourced from planning.data.gov.uk/dataset/local-authority-district",
"items": {
Expand Down
10 changes: 10 additions & 0 deletions types/schema/data/Property.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {GeoJSON} from 'geojson';
import {PlanningDesignations} from '../../enums/PlanningConstraints';
import {PropertyTypes} from '../../enums/PropertyTypes';
import {Area, URL} from '../../utils';
import {Materials} from './shared';

/**
* @id #Property
Expand Down Expand Up @@ -59,8 +60,17 @@ export interface UKProperty {
neighbourhood: PlanningConstraint[];
};
};
details?: PropertyDetails;
}

/**
* @id #PropertyDetails
* @description Details about the property as it currently exists
*/
export type PropertyDetails = {
materials?: Materials;
};

/**
* @id #LondonProperty
* @description Property details for sites within the Greater London Authority (GLA) area
Expand Down
2 changes: 2 additions & 0 deletions types/schema/data/Proposal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {GeoJSON} from 'geojson';
import {ProjectTypes} from '../../enums/ProjectTypes';
import {VehicleParking} from '../../enums/VehicleParking';
import {Area, Date} from '../../utils';
import {Materials} from './shared';

/**
* @id #Proposal
Expand Down Expand Up @@ -48,6 +49,7 @@ export interface BaseDetails {
dwellings?: number;
};
};
materials?: Materials;
}

/**
Expand Down
10 changes: 10 additions & 0 deletions types/schema/data/shared.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export type Materials = {
boundary?: string;
door?: string;
lighting?: string;
roof?: string;
surface?: string;
wall?: string;
window?: string;
other?: string;
};

0 comments on commit 7b8fd03

Please sign in to comment.