Skip to content

Commit

Permalink
full res unit types, refactor enum definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak committed Jul 2, 2024
1 parent 04c0bb9 commit 0d6d690
Show file tree
Hide file tree
Showing 12 changed files with 1,236 additions and 1,451 deletions.
2,614 changes: 1,198 additions & 1,416 deletions schema/schema.json

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions types/enums/BuildingRegulations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
* Values of `data.proposal.units.residential`
*/
export const BuildingRegulations = {
m42: "Part M4(2) of the Building Regulations 2010",
m432a: "Part M4(3)(2a) of the Building Regulations 2010",
m432b: "Part M4(3)(2b) of the Building Regulations 2010",
none: "None of these",
m42: 'Part M4(2) of the Building Regulations 2010',
m432a: 'Part M4(3)(2a) of the Building Regulations 2010',
m432b: 'Part M4(3)(2b) of the Building Regulations 2010',
none: 'None of these',
};

type BuildingRegulationKeys = keyof typeof BuildingRegulations;
Expand All @@ -23,4 +23,5 @@ type BuildingRegulationMap = {
* @id #BuildingRegulation
* @description Building regulations
*/
export type BuildingRegulation = BuildingRegulationMap[keyof BuildingRegulationMap];
export type BuildingRegulation =
BuildingRegulationMap[keyof BuildingRegulationMap];
3 changes: 2 additions & 1 deletion types/enums/HousingProviders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ type GLAHousingProviderMap = {
* @id #GLAHousingProvider
* @description Housing provider categories tracked by the Greater London Authority (GLA)
*/
export type GLAHousingProvider = GLAHousingProviderMap[keyof GLAHousingProviderMap];
export type GLAHousingProvider =
GLAHousingProviderMap[keyof GLAHousingProviderMap];
1 change: 0 additions & 1 deletion types/enums/OpenSpaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,3 @@ type OpenSpaceDesignationMap = {
*/
export type OpenSpaceDesignation =
OpenSpaceDesignationMap[keyof OpenSpaceDesignationMap];

2 changes: 1 addition & 1 deletion types/enums/PlanningConstraints.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Entity } from "../schema/data/shared";
import {Entity} from '../schema/data/shared';

/**
* Values for `data.property.planning.designations`
Expand Down
6 changes: 4 additions & 2 deletions types/enums/ResidentialUnitTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ type UKResidentialUnitTypeMap = {
* @id #UKResidentialUnitType
* @description Residential unit types tracked throughout the UK
*/
export type UKResidentialUnitType = UKResidentialUnitTypeMap[keyof UKResidentialUnitTypeMap];
export type UKResidentialUnitType =
UKResidentialUnitTypeMap[keyof UKResidentialUnitTypeMap];

type GLAResidentialUnitTypeKeys = keyof typeof GLAResidentialUnitTypes;

Expand All @@ -59,4 +60,5 @@ type GLAResidentialUnitTypeMap = {
* @id #GLAResidentialUnitType
* @description Residential unit types tracked by the Greater London Authority (GLA)
*/
export type GLAResidentialUnitType = GLAResidentialUnitTypeMap[keyof GLAResidentialUnitTypeMap];
export type GLAResidentialUnitType =
GLAResidentialUnitTypeMap[keyof GLAResidentialUnitTypeMap];
2 changes: 1 addition & 1 deletion types/enums/UseClasses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ type GLAUseClassMap = {
* @id #GLAUseClass
* @description Use classes tracked by the Greater London Authority (GLA)
*/
export type GLAUseClass = GLAUseClassMap[keyof GLAUseClassMap];
export type GLAUseClass = GLAUseClassMap[keyof GLAUseClassMap];
6 changes: 3 additions & 3 deletions types/schema/Metadata.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FileType } from '../enums/FileTypes';
import { DateTime, URL, UUID } from './../utils';
import { QuestionMetaData } from './Responses';
import {FileType} from '../enums/FileTypes';
import {DateTime, URL, UUID} from './../utils';
import {QuestionMetaData} from './Responses';

/**
* @id #DigitalPlanningMetadata
Expand Down
2 changes: 1 addition & 1 deletion types/schema/data/Application.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ApplicationType } from '../../enums/ApplicationTypes';
import {ApplicationType} from '../../enums/ApplicationTypes';
import {Date} from '../../utils';

/**
Expand Down
12 changes: 6 additions & 6 deletions types/schema/data/Property.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { PlanningDesignation } from '../../enums/PlanningConstraints';
import { PropertyType } from '../../enums/PropertyTypes';
import { UKResidentialUnitType } from "../../enums/ResidentialUnitTypes";
import { UKTenureType } from "../../enums/TenureTypes";
import { Date, URL } from '../../utils';
import { Entity, GeoBoundary, Materials } from './shared';
import {PlanningDesignation} from '../../enums/PlanningConstraints';
import {PropertyType} from '../../enums/PropertyTypes';
import {UKResidentialUnitType} from '../../enums/ResidentialUnitTypes';
import {UKTenureType} from '../../enums/TenureTypes';
import {Date, URL} from '../../utils';
import {Entity, GeoBoundary, Materials} from './shared';

/**
* @id #Property
Expand Down
24 changes: 12 additions & 12 deletions types/schema/data/Proposal.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { BuildingRegulation } from '../../enums/BuildingRegulations';
import { DevelopmentType } from '../../enums/DevelopmentTypes';
import { GLAHousingProvider } from "../../enums/HousingProviders";
import {BuildingRegulation} from '../../enums/BuildingRegulations';
import {DevelopmentType} from '../../enums/DevelopmentTypes';
import {GLAHousingProvider} from '../../enums/HousingProviders';
import {OpenSpaceDesignation, OpenSpaceType} from '../../enums/OpenSpaces';
import {ProjectType} from '../../enums/ProjectTypes';
import {ProtectedSpaceDesignation} from '../../enums/ProtectedSpaces';
import {
OpenSpaceDesignation,
OpenSpaceType
} from '../../enums/OpenSpaces';
import { ProjectType } from '../../enums/ProjectTypes';
import { ProtectedSpaceDesignation } from '../../enums/ProtectedSpaces';
import { GLAResidentialUnitType, UKResidentialUnitType } from '../../enums/ResidentialUnitTypes';
import { GLATenureType } from '../../enums/TenureTypes';
import { Area, Date } from '../../utils';
import { GeoBoundary, Materials } from './shared';
GLAResidentialUnitType,
UKResidentialUnitType,
} from '../../enums/ResidentialUnitTypes';
import {GLATenureType} from '../../enums/TenureTypes';
import {Area, Date} from '../../utils';
import {GeoBoundary, Materials} from './shared';

/**
* @id #Proposal
Expand Down
4 changes: 2 additions & 2 deletions types/schema/data/shared.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {GeoJSON} from 'geojson';
import {Area} from '../../utils';
import {Area, URL} from '../../utils';

export type Materials = {
boundary?: string;
Expand Down Expand Up @@ -30,4 +30,4 @@ type PlanningDataSource = {

type OSRoadsSource = {
text: 'Ordnance Survey MasterMap Highways';
};
};

0 comments on commit 0d6d690

Please sign in to comment.