Skip to content

Commit

Permalink
add maintenanceContact and planningApp types
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak committed Jul 11, 2024
1 parent c8c87e0 commit 574b143
Show file tree
Hide file tree
Showing 6 changed files with 244 additions and 6 deletions.
47 changes: 47 additions & 0 deletions examples/data/landDrainageConsent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,48 @@ export const landDrainageConsent: Schema = {
siteContact: {
role: 'applicant',
},
ownership: {
interest: 'other',
},
maintenanceContact: [
{
when: 'duringConstruction',
address: {
line1: 'Pevensey Castle',
town: 'Pevensey',
postcode: 'PE737SY',
},
contact: {
name: {
title: 'Count',
first: 'Robert',
last: 'of Mortain',
},
email: '[email protected]',
phone: '012345678901',
},
},
{
when: 'afterConstruction',
address: {
line1: 'Dover Castle',
town: 'Dover',
postcode: 'DO737CA',
},
contact: {
name: {
title: 'Baron',
first: 'Roger',
last: 'De Leybourne',
},
email: '[email protected]',
phone: '098765432109',
company: {
name: "The Barons' Revolt",
},
},
},
],
},
property: {
address: {
Expand Down Expand Up @@ -377,6 +419,11 @@ export const landDrainageConsent: Schema = {
officer: 'Unknown',
summary: 'Not provided',
},
planningApp: {
reference: '24/12345/FUL',
date: '2024-06-28',
localPlanningAuthority: 'Medway',
},
},
proposal: {
projectType: [
Expand Down
49 changes: 48 additions & 1 deletion examples/landDrainageConsent.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,49 @@
},
"siteContact": {
"role": "applicant"
}
},
"ownership": {
"interest": "other"
},
"maintenanceContact": [
{
"when": "duringConstruction",
"address": {
"line1": "Pevensey Castle",
"town": "Pevensey",
"postcode": "PE737SY"
},
"contact": {
"name": {
"title": "Count",
"first": "Robert",
"last": "of Mortain"
},
"email": "[email protected]",
"phone": "012345678901"
}
},
{
"when": "afterConstruction",
"address": {
"line1": "Dover Castle",
"town": "Dover",
"postcode": "DO737CA"
},
"contact": {
"name": {
"title": "Baron",
"first": "Roger",
"last": "De Leybourne"
},
"email": "[email protected]",
"phone": "098765432109",
"company": {
"name": "The Barons' Revolt"
}
}
}
]
},
"property": {
"address": {
Expand Down Expand Up @@ -591,6 +633,11 @@
"date": "2024-06-08",
"officer": "Unknown",
"summary": "Not provided"
},
"planningApp": {
"reference": "24/12345/FUL",
"date": "2024-06-28",
"localPlanningAuthority": "Medway"
}
},
"proposal": {
Expand Down
113 changes: 111 additions & 2 deletions schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@
"email": {
"$ref": "#/definitions/Email"
},
"maintenanceContact": {
"$ref": "#/definitions/MaintenanceContact"
},
"name": {
"additionalProperties": false,
"properties": {
Expand Down Expand Up @@ -2231,6 +2234,9 @@
"email": {
"$ref": "#/definitions/Email"
},
"maintenanceContact": {
"$ref": "#/definitions/MaintenanceContact"
},
"name": {
"additionalProperties": false,
"properties": {
Expand Down Expand Up @@ -2308,6 +2314,9 @@
}
]
},
"planningApp": {
"$ref": "#/definitions/PlanningApplication"
},
"preApp": {
"$ref": "#/definitions/PreApplication"
},
Expand Down Expand Up @@ -5997,6 +6006,9 @@
"leadDeveloper": {
"$ref": "#/definitions/LeadDeveloper"
},
"planningApp": {
"$ref": "#/definitions/PlanningApplication"
},
"preApp": {
"$ref": "#/definitions/PreApplication"
},
Expand Down Expand Up @@ -7498,6 +7510,81 @@
],
"type": "object"
},
"MaintenanceContact": {
"$id": "#MaintenanceContact",
"description": "Contact information for the person(s) responsible for maintenance while the works are carried out",
"items": {
"additionalProperties": false,
"properties": {
"address": {
"$ref": "#/definitions/Address"
},
"contact": {
"additionalProperties": false,
"properties": {
"company": {
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"email": {
"type": "string"
},
"name": {
"additionalProperties": false,
"properties": {
"first": {
"type": "string"
},
"last": {
"type": "string"
},
"title": {
"type": "string"
}
},
"required": [
"first",
"last"
],
"type": "object"
},
"phone": {
"type": "string"
}
},
"required": [
"name",
"email",
"phone"
],
"type": "object"
},
"when": {
"enum": [
"duringConstruction",
"afterConstruction",
"duringAndAfterConstruction"
],
"type": "string"
}
},
"required": [
"when",
"address",
"contact"
],
"type": "object"
},
"type": "array"
},
"Materials": {
"additionalProperties": false,
"properties": {
Expand Down Expand Up @@ -8358,6 +8445,28 @@
],
"type": "object"
},
"PlanningApplication": {
"$id": "#PlanningApplication",
"additionalProperties": false,
"description": "Details of the planning application linked to this application, if applicable",
"properties": {
"date": {
"$ref": "#/definitions/Date"
},
"localPlanningAuthority": {
"type": "string"
},
"reference": {
"type": "string"
}
},
"required": [
"reference",
"date",
"localPlanningAuthority"
],
"type": "object"
},
"PlanningConstraint": {
"$id": "#PlanningConstraint",
"anyOf": [
Expand Down Expand Up @@ -9949,7 +10058,7 @@
"PreApplication": {
"$id": "#PreApplication",
"additionalProperties": false,
"description": "Details of the pre-application, if applicable",
"description": "Details of the pre-application preceeding this application, if applicable",
"properties": {
"date": {
"$ref": "#/definitions/Date"
Expand Down Expand Up @@ -15117,7 +15226,7 @@
"additionalProperties": false,
"properties": {
"description": {
"const": "Erect a temporary structure for historic visitor attractions and listed buildings",
"const": "Build a temporary structure",
"type": "string"
},
"value": {
Expand Down
3 changes: 1 addition & 2 deletions types/enums/ProjectTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,7 @@ export const ProjectTypes = {
'new.residential.dwelling': 'Build new homes',
'new.retail': 'New retail premises',
'new.telecoms': 'Install telecommunications equipment',
'new.temporaryStructure':
'Erect a temporary structure for historic visitor attractions and listed buildings',
'new.temporaryStructure': 'Build a temporary structure',
'new.warehouse': 'New storage or distribution premises',
not: 'Negate a project type',
'not.alter.replace': 'Do not add or change windows or doors',
Expand Down
25 changes: 25 additions & 0 deletions types/schema/data/Applicant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export interface BaseApplicant {
address: UserAddress;
ownership?: Ownership;
siteContact: SiteContact;
maintenanceContact?: MaintenanceContact;
}

/**
Expand Down Expand Up @@ -164,3 +165,27 @@ export interface SiteContactOther {
email: string;
phone: string;
}

/**
* @id #MaintenanceContact
* @description Contact information for the person(s) responsible for maintenance while the works are carried out
*/
export type MaintenanceContact = {
when:
| 'duringConstruction'
| 'afterConstruction'
| 'duringAndAfterConstruction';
address: Address;
contact: {
name: {
title?: string;
first: string;
last: string;
};
email: string;
phone: string;
company?: {
name: string;
};
};
}[];
13 changes: 12 additions & 1 deletion types/schema/data/Application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export interface BaseApplication {
fee: ApplicationFee | ApplicationFeeNotApplicable;
declaration: ApplicationDeclaration;
preApp?: PreApplication;
planningApp?: PlanningApplication;
CIL?: CommunityInfrastructureLevy;
}

Expand Down Expand Up @@ -150,7 +151,7 @@ export interface ApplicationDeclaration {

/**
* @id #PreApplication
* @description Details of the pre-application, if applicable
* @description Details of the pre-application preceeding this application, if applicable
*/
export interface PreApplication {
reference: string;
Expand All @@ -159,6 +160,16 @@ export interface PreApplication {
summary: string;
}

/**
* @id #PlanningApplication
* @description Details of the planning application linked to this application, if applicable
*/
export interface PlanningApplication {
reference: string;
date: Date;
localPlanningAuthority: string;
}

/**
* @id #CommunityInfrastructureLevy
* @description Details about the Community Infrastructure Levy planning charge, if applicable
Expand Down

0 comments on commit 574b143

Please sign in to comment.