Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add types for existing & proposed Materials #134

Merged
merged 3 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1575,6 +1575,9 @@
],
"type": "object"
},
"materials": {
"$ref": "#/definitions/Materials"
},
"new": {
"additionalProperties": false,
"properties": {
Expand Down Expand Up @@ -3414,6 +3417,9 @@
],
"type": "object"
},
"materials": {
"$ref": "#/definitions/Materials"
},
"new": {
"additionalProperties": false,
"properties": {
Expand Down Expand Up @@ -4091,6 +4097,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 @@ -4192,6 +4201,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 @@ -12591,6 +12630,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 @@ -21830,6 +21880,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;
};
Loading