From 3c393fba8ab308618c0cd7f3a430be3f706be23f Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Fri, 29 Sep 2023 19:55:12 +0200 Subject: [PATCH 1/2] fixes --- examples/data/Applicant.ts | 3 +- examples/data/Application.ts | 4 +- examples/index.ts | 6 +- examples/validExampleAgent.json | 10 +- examples/validExampleApplicant.json | 15 +- schema/schema.json | 540 ++++++++++++++++++++++++++-- types/enums/ProjectTypes.ts | 41 ++- types/schema/Metadata.ts | 8 +- types/schema/data/Applicant.ts | 2 +- types/schema/data/Application.ts | 17 +- types/schema/data/Proposal.ts | 18 +- 11 files changed, 601 insertions(+), 63 deletions(-) diff --git a/examples/data/Applicant.ts b/examples/data/Applicant.ts index 7ff10249..2cdf6ae6 100644 --- a/examples/data/Applicant.ts +++ b/examples/data/Applicant.ts @@ -21,6 +21,7 @@ export const validApplicant: Schema['data']['applicant'] = { interest: 'owner.co', ownership: { certificate: 'a', + noticeGiven: true, owners: [ { name: 'Owner 1', @@ -29,13 +30,11 @@ export const validApplicant: Schema['data']['applicant'] = { town: 'Anywhere', postcode: 'SE5 0HU', }, - noticeGiven: true, noticeDate: '2023-10-01', }, { name: 'Owner 2', address: 'Same as Owner 1', - noticeGiven: false, }, ], }, diff --git a/examples/data/Application.ts b/examples/data/Application.ts index 393cbdf0..f96cfd3a 100644 --- a/examples/data/Application.ts +++ b/examples/data/Application.ts @@ -23,6 +23,8 @@ export const validApplication: Schema['data']['application'] = { }, declaration: { accurate: true, - connection: 'none', + connection: { + value: 'none', + }, }, }; diff --git a/examples/index.ts b/examples/index.ts index 65226c54..2a5341d2 100644 --- a/examples/index.ts +++ b/examples/index.ts @@ -7,7 +7,8 @@ import {validResponses} from './data/Responses'; const validMetadata: Schema['metadata'] = { service: { - publishedFlowId: 'b3320abe-f5bc-4185-b61f-40e9e65f07ad', + flowId: 'b3320abe-f5bc-4185-b61f-40e9e65f07ad', + publishedFlowId: 22, name: 'Test', owner: 'Test', url: 'https://www.planx.uk/', @@ -18,6 +19,9 @@ const validMetadata: Schema['metadata'] = { 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'] = [ diff --git a/examples/validExampleAgent.json b/examples/validExampleAgent.json index 4e3f529c..c699fa45 100644 --- a/examples/validExampleAgent.json +++ b/examples/validExampleAgent.json @@ -71,7 +71,9 @@ }, "declaration": { "accurate": true, - "connection": "none" + "connection": { + "value": "none" + } } }, "property": { @@ -222,7 +224,8 @@ ], "metadata": { "service": { - "publishedFlowId": "b3320abe-f5bc-4185-b61f-40e9e65f07ad", + "flowId": "b3320abe-f5bc-4185-b61f-40e9e65f07ad", + "publishedFlowId": 22, "name": "Test", "owner": "Test", "url": "https://www.planx.uk/" @@ -232,6 +235,9 @@ "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": [ diff --git a/examples/validExampleApplicant.json b/examples/validExampleApplicant.json index c637d513..a2bc4803 100644 --- a/examples/validExampleApplicant.json +++ b/examples/validExampleApplicant.json @@ -24,6 +24,7 @@ "interest": "owner.co", "ownership": { "certificate": "a", + "noticeGiven": true, "owners": [ { "name": "Owner 1", @@ -32,13 +33,11 @@ "town": "Anywhere", "postcode": "SE5 0HU" }, - "noticeGiven": true, "noticeDate": "2023-10-01" }, { "name": "Owner 2", - "address": "Same as Owner 1", - "noticeGiven": false + "address": "Same as Owner 1" } ] } @@ -66,7 +65,9 @@ }, "declaration": { "accurate": true, - "connection": "none" + "connection": { + "value": "none" + } } }, "property": { @@ -217,7 +218,8 @@ ], "metadata": { "service": { - "publishedFlowId": "b3320abe-f5bc-4185-b61f-40e9e65f07ad", + "flowId": "b3320abe-f5bc-4185-b61f-40e9e65f07ad", + "publishedFlowId": 22, "name": "Test", "owner": "Test", "url": "https://www.planx.uk/" @@ -227,6 +229,9 @@ "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": [ diff --git a/schema/schema.json b/schema/schema.json index a9a86548..6180af51 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -82,6 +82,9 @@ ], "type": "string" }, + "noticeGiven": { + "type": "boolean" + }, "owners": { "items": { "additionalProperties": false, @@ -101,15 +104,11 @@ }, "noticeDate": { "$ref": "#/definitions/Date" - }, - "noticeGiven": { - "type": "boolean" } }, "required": [ "name", - "address", - "noticeGiven" + "address" ], "type": "object" }, @@ -168,17 +167,26 @@ "type": "boolean" }, "connection": { - "enum": [ - "employee", - "relation.employee", - "electedMember", - "relation.electedMember", - "none" + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "value": { + "enum": [ + "employee", + "relation.employee", + "electedMember", + "relation.electedMember", + "none" + ], + "type": "string" + } + }, + "required": [ + "value" ], - "type": "string" - }, - "description": { - "type": "string" + "type": "object" } }, "required": [ @@ -920,6 +928,9 @@ ], "type": "string" }, + "noticeGiven": { + "type": "boolean" + }, "owners": { "items": { "additionalProperties": false, @@ -939,15 +950,11 @@ }, "noticeDate": { "$ref": "#/definitions/Date" - }, - "noticeGiven": { - "type": "boolean" } }, "required": [ "name", - "address", - "noticeGiven" + "address" ], "type": "object" }, @@ -1698,6 +1705,10 @@ ], "description": "Types of planning documents and drawings" }, + "GeoJSON": { + "$id": "#GeoJSON", + "type": "object" + }, "LondonDetails": { "additionalProperties": false, "properties": { @@ -1746,6 +1757,22 @@ "bicycles": { "additionalProperties": false, "properties": { + "count": { + "additionalProperties": false, + "properties": { + "existing": { + "type": "number" + }, + "proposed": { + "type": "number" + } + }, + "required": [ + "existing", + "proposed" + ], + "type": "object" + }, "offStreet": { "additionalProperties": false, "properties": { @@ -1797,11 +1824,30 @@ "type": "object" } }, + "required": [ + "count" + ], "type": "object" }, "buses": { "additionalProperties": false, "properties": { + "count": { + "additionalProperties": false, + "properties": { + "existing": { + "type": "number" + }, + "proposed": { + "type": "number" + } + }, + "required": [ + "existing", + "proposed" + ], + "type": "object" + }, "offStreet": { "additionalProperties": false, "properties": { @@ -1853,6 +1899,9 @@ "type": "object" } }, + "required": [ + "count" + ], "type": "object" }, "cars": { @@ -2095,6 +2144,22 @@ "motorcyles": { "additionalProperties": false, "properties": { + "count": { + "additionalProperties": false, + "properties": { + "existing": { + "type": "number" + }, + "proposed": { + "type": "number" + } + }, + "required": [ + "existing", + "proposed" + ], + "type": "object" + }, "offStreet": { "additionalProperties": false, "properties": { @@ -2146,6 +2211,9 @@ "type": "object" } }, + "required": [ + "count" + ], "type": "object" }, "type": { @@ -2157,6 +2225,22 @@ "vans": { "additionalProperties": false, "properties": { + "count": { + "additionalProperties": false, + "properties": { + "existing": { + "type": "number" + }, + "proposed": { + "type": "number" + } + }, + "required": [ + "existing", + "proposed" + ], + "type": "object" + }, "offStreet": { "additionalProperties": false, "properties": { @@ -2208,6 +2292,9 @@ "type": "object" } }, + "required": [ + "count" + ], "type": "object" } }, @@ -2265,7 +2352,7 @@ "$ref": "#/definitions/Area" }, "site": { - "type": "object" + "$ref": "#/definitions/GeoJSON" } }, "required": [ @@ -2334,10 +2421,32 @@ "Metadata": { "additionalProperties": false, "properties": { + "schema": { + "additionalProperties": false, + "properties": { + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "url" + ], + "type": "object" + }, "service": { "additionalProperties": false, "description": "Details of the digital planning service which generated this payload", "properties": { + "flowId": { + "anyOf": [ + { + "$ref": "#/definitions/UUID" + }, + { + "type": "string" + } + ] + }, "name": { "type": "string" }, @@ -2345,13 +2454,14 @@ "type": "string" }, "publishedFlowId": { - "$ref": "#/definitions/UUID" + "type": "number" }, "url": { "$ref": "#/definitions/URL" } }, "required": [ + "flowId", "publishedFlowId", "name", "owner", @@ -2366,7 +2476,14 @@ "$ref": "#/definitions/DateTime" }, "id": { - "$ref": "#/definitions/UUID" + "anyOf": [ + { + "$ref": "#/definitions/UUID" + }, + { + "type": "string" + } + ] }, "source": { "const": "PlanX", @@ -2388,7 +2505,8 @@ }, "required": [ "service", - "session" + "session", + "schema" ], "type": "object" }, @@ -2701,6 +2819,24 @@ ], "type": "object" }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Add a verandah or deck", + "type": "string" + }, + "value": { + "const": "alter.deck", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, { "additionalProperties": false, "properties": { @@ -3263,7 +3399,7 @@ "additionalProperties": false, "properties": { "description": { - "const": "Remove equipment", + "const": "Remove energy equipment", "type": "string" }, "value": { @@ -3731,7 +3867,7 @@ "additionalProperties": false, "properties": { "description": { - "const": "Convert an outbuilding (such as a shed, garage or barn)", + "const": "Convert or change the use of an outbuilding (such as a shed, garage or barn)", "type": "string" }, "value": { @@ -3749,7 +3885,7 @@ "additionalProperties": false, "properties": { "description": { - "const": "Convert part of a building", + "const": "Convert or change the use of part of a building", "type": "string" }, "value": { @@ -3979,6 +4115,330 @@ ], "type": "object" }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Add an outbuilding - animal enclosure, aviary or beehive", + "type": "string" + }, + "value": { + "const": "extend.outbuildings.animals", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Add an outbuilding - residential (or \"granny\") annexe", + "type": "string" + }, + "value": { + "const": "extend.outbuildings.annexe", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Add an outbuilding - bedroom or guest room", + "type": "string" + }, + "value": { + "const": "extend.outbuildings.bedroom", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Add an outbuilding - games room", + "type": "string" + }, + "value": { + "const": "extend.outbuildings.games", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Add an outbuilding - garage", + "type": "string" + }, + "value": { + "const": "extend.outbuildings.garage", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Add an outbuilding - greenhouse", + "type": "string" + }, + "value": { + "const": "extend.outbuildings.greenhouse", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Add an outbuilding - gym", + "type": "string" + }, + "value": { + "const": "extend.outbuildings.gym", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Add an outbuilding - office", + "type": "string" + }, + "value": { + "const": "extend.outbuildings.office", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Add an outbuilding - something else", + "type": "string" + }, + "value": { + "const": "extend.outbuildings.other", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Add an outbuilding - sauna", + "type": "string" + }, + "value": { + "const": "extend.outbuildings.sauna", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Add an outbuilding - shed", + "type": "string" + }, + "value": { + "const": "extend.outbuildings.shed", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Add an outbuilding - car parking or smoking shelter", + "type": "string" + }, + "value": { + "const": "extend.outbuildings.shelter", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Add an outbuilding - storage", + "type": "string" + }, + "value": { + "const": "extend.outbuildings.store", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Add an outbuilding - studio", + "type": "string" + }, + "value": { + "const": "extend.outbuildings.studio", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Add an outbuilding - summer house", + "type": "string" + }, + "value": { + "const": "extend.outbuildings.summerHouse", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Add an outbuilding - swimming pool", + "type": "string" + }, + "value": { + "const": "extend.outbuildings.swimmingPool", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Add an outbuilding - tank", + "type": "string" + }, + "value": { + "const": "extend.outbuildings.tank", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Add an outbuilding - workshop", + "type": "string" + }, + "value": { + "const": "extend.outbuildings.workshop", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, { "additionalProperties": false, "properties": { @@ -4055,7 +4515,7 @@ "additionalProperties": false, "properties": { "description": { - "const": "Change the internal layout", + "const": "Internal building works, such as change the internal layout", "type": "string" }, "value": { @@ -4159,6 +4619,24 @@ ], "type": "object" }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "New, self-contained dwelling", + "type": "string" + }, + "value": { + "const": "new.dwelling", + "type": "string" + } + }, + "required": [ + "value", + "description" + ], + "type": "object" + }, { "additionalProperties": false, "properties": { @@ -4343,7 +4821,7 @@ "additionalProperties": false, "properties": { "description": { - "const": "Convert part of a house into a flat", + "const": "Convert a home or part of a home into flats", "type": "string" }, "value": { @@ -12742,7 +13220,7 @@ "$ref": "#/definitions/Area" }, "site": { - "type": "object" + "$ref": "#/definitions/GeoJSON" } }, "required": [ @@ -13581,7 +14059,7 @@ "$ref": "#/definitions/Area" }, "site": { - "type": "object" + "$ref": "#/definitions/GeoJSON" } }, "required": [ diff --git a/types/enums/ProjectTypes.ts b/types/enums/ProjectTypes.ts index 9dbd91ab..33d191cc 100644 --- a/types/enums/ProjectTypes.ts +++ b/types/enums/ProjectTypes.ts @@ -11,6 +11,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.drains': 'Work on drains', 'alter.equipment.airConditioning': 'Install an air conditioning unit', 'alter.equipment.alarm': 'Install a security alarm', @@ -45,8 +46,8 @@ export const ProjectTypes = { 'alter.openings.alter.reduce.window': 'Reduce the size of a window opening', 'alter.openings.remove': 'Block up doorways or windows', 'alter.remove': 'Remove part of a building (such as a decorative feature)', - 'alter.remove.chimney': 'Remove a chimney', // Propose: alter.chimeys.remove ?? - 'alter.remove.equipment': 'Remove equipment', // Remove energy equipment + 'alter.remove.chimney': 'Remove a chimney', + 'alter.remove.equipment': 'Remove energy equipment', 'alter.repair': 'Repair windows or doors', 'alter.replace': 'Replace windows or doors', 'alter.replace.doorsToDoors': 'Replace door with door', @@ -74,9 +75,9 @@ export const ProjectTypes = { 'changeOfUse.let.part': 'Let a part of the property', 'changeOfUse.let.whole': 'Let the property', 'changeOfUse.outbuilding': - 'Convert an outbuilding (such as a shed, garage or barn)', // Change the use of an outbuilding (such as a shed, garage or barn) - 'changeOfUse.part': 'Convert part of a building', // Change the use of part of a building - 'changeOfUse.whole.homeToHMO': 'Convert a home to bedsits or a shared home', // Share a home + 'Convert or change the use of an outbuilding (such as a shed, garage or barn)', + 'changeOfUse.part': 'Convert or change the use of part of a building', + 'changeOfUse.whole.homeToHMO': 'Convert a home to bedsits or a shared home', 'changeOfUse.whole': 'Change the use of a property', 'changeOfUse.workFromHome': 'Work from home', demolish: 'Demolish a building', @@ -88,27 +89,49 @@ export const ProjectTypes = { 'extend.basement': 'Add a basement extension', 'extend.front': 'Add a front extension', 'extend.outbuildings': - 'Add an outbuilding (such as a shed, garage or garden office)', // Outbuildings (shed, car shelter or garden office) + 'Add an outbuilding (such as a shed, garage or garden office)', + 'extend.outbuildings.animals': + 'Add an outbuilding - animal enclosure, aviary or beehive', + 'extend.outbuildings.annexe': + 'Add an outbuilding - residential (or "granny") annexe', + 'extend.outbuildings.bedroom': 'Add an outbuilding - bedroom or guest room', + 'extend.outbuildings.games': 'Add an outbuilding - games room', + 'extend.outbuildings.garage': 'Add an outbuilding - garage', + 'extend.outbuildings.greenhouse': 'Add an outbuilding - greenhouse', + 'extend.outbuildings.gym': 'Add an outbuilding - gym', + 'extend.outbuildings.office': 'Add an outbuilding - office', + 'extend.outbuildings.other': 'Add an outbuilding - something else', + 'extend.outbuildings.sauna': 'Add an outbuilding - sauna', + 'extend.outbuildings.shed': 'Add an outbuilding - shed', + 'extend.outbuildings.shelter': + 'Add an outbuilding - car parking or smoking shelter', + 'extend.outbuildings.store': 'Add an outbuilding - storage', + 'extend.outbuildings.studio': 'Add an outbuilding - studio', + 'extend.outbuildings.summerHouse': 'Add an outbuilding - summer house', + 'extend.outbuildings.swimmingPool': 'Add an outbuilding - swimming pool', + 'extend.outbuildings.tank': 'Add an outbuilding - tank', + 'extend.outbuildings.workshop': 'Add an outbuilding - workshop', 'extend.porch': 'Add a porch', 'extend.rear': 'Add a rear or side extension (or conservatory)', 'extend.roof': 'Add a roof extension', 'extend.roof.dormer': 'Add roof dormers', - internal: 'Change the internal layout', // Internal building works + internal: 'Internal building works, such as change the internal layout', 'internal.loft': 'Convert a loft', 'internal.mezzanine': 'Add a mezzanine floor', new: 'Another type of building', 'new.agriculture': 'Agricultural buildings', 'new.clickCollect': 'Install click and collect facilities', + 'new.dwelling': 'New, self-contained dwelling', 'new.forestry': 'Build new forestry buildings', 'new.industrial': 'Industrial premises', 'new.leisure': 'Leisure premises', 'new.office': 'Offices', - 'new.residential.dwelling': 'Build new homes on a roof', // Homes + 'new.residential.dwelling': 'Build new homes on a roof', 'new.retail': 'Retail premises', 'new.telecoms': 'Install telecommunications equipment', 'new.temporaryStructure': 'Erect a temporary structure for historic visitor attractions and listed buildings', 'new.warehouse': 'Storage or distribution premises', 'unit.merge': 'Convert two or more properties into one', - 'unit.subdivide': 'Convert part of a house into a flat', // Convert a home into flats + 'unit.subdivide': 'Convert a home or part of a home into flats', }; diff --git a/types/schema/Metadata.ts b/types/schema/Metadata.ts index 3fd5c305..efac76e7 100644 --- a/types/schema/Metadata.ts +++ b/types/schema/Metadata.ts @@ -5,7 +5,8 @@ export interface Metadata { * @description Details of the digital planning service which generated this payload */ service: { - publishedFlowId: UUID; + flowId: UUID | string; // @todo temp fix for failing UUID validation, sort out and tighten + publishedFlowId: number; name: string; owner: string; url: URL; @@ -15,8 +16,11 @@ export interface Metadata { * @default PlanX */ source: 'PlanX'; - id: UUID; + id: UUID | string; createdAt: DateTime; submittedAt: DateTime; }; + schema: { + url: URL; + }; } diff --git a/types/schema/data/Applicant.ts b/types/schema/data/Applicant.ts index bfda41d3..01378cd0 100644 --- a/types/schema/data/Applicant.ts +++ b/types/schema/data/Applicant.ts @@ -16,10 +16,10 @@ export interface BaseApplicant { interest?: 'owner.sole' | 'owner.co' | 'tenant' | 'occupier'; ownership?: { certificate: 'a' | 'b' | 'c' | 'd'; + noticeGiven?: boolean; owners?: { name: string; address: AddressInput | string; - noticeGiven: boolean; noticeDate?: Date; }[]; }; diff --git a/types/schema/data/Application.ts b/types/schema/data/Application.ts index 96be3d40..3498e016 100644 --- a/types/schema/data/Application.ts +++ b/types/schema/data/Application.ts @@ -1,4 +1,3 @@ -import {DateTime} from '../../utils'; import {ApplicationTypes} from '../../enums/ApplicationTypes'; /** @@ -10,13 +9,15 @@ export interface Application { fee: ApplicationFee; declaration: { accurate: boolean; - connection: - | 'employee' - | 'relation.employee' - | 'electedMember' - | 'relation.electedMember' - | 'none'; - description?: string; // application.declaration.connection.description in content + connection: { + value: + | 'employee' + | 'relation.employee' + | 'electedMember' + | 'relation.electedMember' + | 'none'; + description?: string; + }; }; preApp?: PreApplication; } diff --git a/types/schema/data/Proposal.ts b/types/schema/data/Proposal.ts index 397bff9e..e056e794 100644 --- a/types/schema/data/Proposal.ts +++ b/types/schema/data/Proposal.ts @@ -1,6 +1,6 @@ import {ProjectTypes} from '../../enums/ProjectTypes'; import {VehicleParking} from '../../enums/VehicleParking'; -import {Area, DateTime, GeoJSON} from '../../utils'; +import {Area, GeoJSON} from '../../utils'; /** * @id #Proposal @@ -68,18 +68,34 @@ export interface LondonDetails extends BaseDetails { }; }; vans?: { + count: { + existing: number; + proposed: number; + }; onStreet?: VehicleParkingCount; offStreet?: VehicleParkingCount; }; motorcyles?: { + count: { + existing: number; + proposed: number; + }; onStreet?: VehicleParkingCount; offStreet?: VehicleParkingCount; }; bicycles?: { + count: { + existing: number; + proposed: number; + }; onStreet?: VehicleParkingCount; offStreet?: VehicleParkingCount; }; buses?: { + count: { + existing: number; + proposed: number; + }; onStreet?: VehicleParkingCount; offStreet?: VehicleParkingCount; }; From 10c07f4cf74c298da4671aa6c0ae6580d73ad9df Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Fri, 29 Sep 2023 19:58:35 +0200 Subject: [PATCH 2/2] make submittedAt optional while testing --- types/schema/Metadata.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/schema/Metadata.ts b/types/schema/Metadata.ts index efac76e7..784b115f 100644 --- a/types/schema/Metadata.ts +++ b/types/schema/Metadata.ts @@ -18,7 +18,7 @@ export interface Metadata { source: 'PlanX'; id: UUID | string; createdAt: DateTime; - submittedAt: DateTime; + submittedAt?: DateTime; }; schema: { url: URL;