Skip to content

Commit

Permalink
fix: more granular Applicant, Proposal & Property types (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak authored Sep 29, 2023
1 parent 2f5aa4e commit 297e217
Show file tree
Hide file tree
Showing 14 changed files with 3,892 additions and 1,712 deletions.
22 changes: 21 additions & 1 deletion examples/data/Applicant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,27 @@ export const validApplicant: Schema['data']['applicant'] = {
siteContact: {
role: 'applicant',
},
interest: 'owner.co',
ownership: {
certificate: 'a',
owners: [
{
name: 'Owner 1',
address: {
line1: '123 Main Street',
town: 'Anywhere',
postcode: 'SE5 0HU',
},
noticeGiven: true,
noticeDate: '2023-10-01',
},
{
name: 'Owner 2',
address: 'Same as Owner 1',
noticeGiven: false,
},
],
},
};

export const validAgent: Schema['data']['applicant'] = {
Expand Down Expand Up @@ -53,7 +74,6 @@ export const validAgent: Schema['data']['applicant'] = {
},
},
address: {
sameAsSiteAddress: false,
line1: '456 Test',
town: 'Test',
postcode: 'TES T34',
Expand Down
35 changes: 29 additions & 6 deletions examples/data/Property.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,33 @@ export const validProperty: Schema['data']['property'] = {
x: 533683,
y: 178083,
title: '47, COBOURG ROAD, LONDON',
region: 'London',
localAuthorityDistrict: ['Southwark'],
source: 'Ordnance Survey',
},
region: 'London',
localAuthorityDistrict: ['Southwark'],
type: {
value: 'residential.HMO.parent',
description: 'HMO Parent',
},
boundary: {
site: 'GeoJSON TBD',
site: {
type: 'Feature',
geometry: {
type: 'Polygon',
coordinates: [
[
[-0.1186569035053321, 51.465703531871384],
[-0.1185938715934822, 51.465724418998775],
[-0.1184195280075143, 51.46552473766957],
[-0.11848390102387167, 51.4655038504508],
[-0.1186569035053321, 51.465703531871384],
],
],
},
properties: null,
},
area: {
squareMeters: 10000,
squareMetres: 10000,
hectares: 1,
},
},
Expand All @@ -33,13 +48,21 @@ export const validProperty: Schema['data']['property'] = {
{
value: 'listed',
description: 'Listed Building',
intersects: false,
overlaps: false,
},
{
value: 'designated.conservationArea',
description: 'Conservation Area',
intersects: true,
overlaps: true,
entities: ['Cobourg Road Nature Preserve'],
},
],
},
titleNumber: {
known: 'Yes',
number: '123',
},
EPC: {
known: 'The property does not have one',
},
};
22 changes: 22 additions & 0 deletions examples/data/Proposal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,26 @@ export const validProposal: Schema['data']['proposal'] = {
},
],
description: 'This is a test application',
boundary: {
site: {
type: 'Feature',
geometry: {
type: 'Polygon',
coordinates: [
[
[-0.1186569035053321, 51.465703531871384],
[-0.1185938715934822, 51.465724418998775],
[-0.1184195280075143, 51.46552473766957],
[-0.11848390102387167, 51.4655038504508],
[-0.1186569035053321, 51.465703531871384],
],
],
},
properties: null,
},
area: {
squareMetres: 10000,
hectares: 1,
},
},
};
96 changes: 86 additions & 10 deletions examples/validExampleAgent.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
}
},
"address": {
"sameAsSiteAddress": false,
"line1": "456 Test",
"town": "Test",
"postcode": "TES T34"
Expand Down Expand Up @@ -88,20 +87,50 @@
"x": 533683,
"y": 178083,
"title": "47, COBOURG ROAD, LONDON",
"region": "London",
"localAuthorityDistrict": [
"Southwark"
],
"source": "Ordnance Survey"
},
"region": "London",
"localAuthorityDistrict": [
"Southwark"
],
"type": {
"value": "residential.HMO.parent",
"description": "HMO Parent"
},
"boundary": {
"site": "GeoJSON TBD",
"site": {
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-0.1186569035053321,
51.465703531871384
],
[
-0.1185938715934822,
51.465724418998775
],
[
-0.1184195280075143,
51.46552473766957
],
[
-0.11848390102387167,
51.4655038504508
],
[
-0.1186569035053321,
51.465703531871384
]
]
]
},
"properties": null
},
"area": {
"squareMeters": 10000,
"squareMetres": 10000,
"hectares": 1
}
},
Expand All @@ -110,14 +139,24 @@
{
"value": "listed",
"description": "Listed Building",
"intersects": false
"overlaps": false
},
{
"value": "designated.conservationArea",
"description": "Conservation Area",
"intersects": true
"overlaps": true,
"entities": [
"Cobourg Road Nature Preserve"
]
}
]
},
"titleNumber": {
"known": "Yes",
"number": "123"
},
"EPC": {
"known": "The property does not have one"
}
},
"proposal": {
Expand All @@ -131,7 +170,44 @@
"description": "Leisure premises"
}
],
"description": "This is a test application"
"description": "This is a test application",
"boundary": {
"site": {
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-0.1186569035053321,
51.465703531871384
],
[
-0.1185938715934822,
51.465724418998775
],
[
-0.1184195280075143,
51.46552473766957
],
[
-0.11848390102387167,
51.4655038504508
],
[
-0.1186569035053321,
51.465703531871384
]
]
]
},
"properties": null
},
"area": {
"squareMetres": 10000,
"hectares": 1
}
}
}
},
"result": [
Expand Down
Loading

0 comments on commit 297e217

Please sign in to comment.