From 425f83b9057817bf6cd2fb975a62bff790252150 Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Tue, 12 Mar 2024 12:08:57 +0000 Subject: [PATCH] feat: explain how application fees are calculated in `PlanXMetadata` (#124) --- examples/data/ldcE.ts | 40 +++++++++--- examples/data/ldcP.ts | 38 +++++++++++- examples/data/planningPermission.ts | 40 +++++++++--- examples/data/priorApproval.ts | 30 +++++++-- ...dLawfulDevelopmentCertificateExisting.json | 38 +++++++++--- ...dLawfulDevelopmentCertificateProposed.json | 35 ++++++++++- examples/validPlanningPermission.json | 38 +++++++++--- examples/validPriorApproval.json | 30 +++++++-- schema/schema.json | 61 ++++++++++++++++++- types/schema/Metadata.ts | 22 ++++++- 10 files changed, 331 insertions(+), 41 deletions(-) diff --git a/examples/data/ldcE.ts b/examples/data/ldcE.ts index 855084db..7dcefd48 100644 --- a/examples/data/ldcE.ts +++ b/examples/data/ldcE.ts @@ -10,16 +10,16 @@ export const validLDCE: Schema = { description: 'Lawful Development Certificate - Existing use', }, fee: { - calculated: 206, - payable: 206, + calculated: 258, + payable: 258, exemption: { - disability: true, - resubmission: true, + disability: false, + resubmission: false, }, reduction: { - sports: true, - parishCouncil: true, - alternative: true, + sports: false, + parishCouncil: false, + alternative: false, }, reference: { govPay: 'sandbox-ref-123', @@ -1276,6 +1276,32 @@ export const validLDCE: Schema = { ], optional: [], }, + fee: { + calculated: [ + { + description: + 'The planning fee for an application for a Certificate of Lawfulness relating to existing alterations or extensions of a single home is £258.', + policyRefs: [ + { + text: 'UK Stuatory Instruments 2023 No. 1197', + url: 'https://www.legislation.gov.uk/uksi/2023/1197/made', + }, + ], + }, + ], + payable: [ + { + description: + 'The planning fee for an application for a Certificate of Lawfulness relating to existing alterations or extensions of a single home is £258.', + policyRefs: [ + { + text: 'UK Stuatory Instruments 2023 No. 1197', + url: 'https://www.legislation.gov.uk/uksi/2023/1197/made', + }, + ], + }, + ], + }, }, submittedAt: '2023-10-02t00:00:00z', schema: `https://theopensystemslab.github.io/digital-planning-data-schemas/${version}/schema.json`, diff --git a/examples/data/ldcP.ts b/examples/data/ldcP.ts index 544cd16c..7d6079cb 100644 --- a/examples/data/ldcP.ts +++ b/examples/data/ldcP.ts @@ -10,7 +10,7 @@ export const validLDCP: Schema = { description: 'Lawful Development Certificate - Proposed use', }, fee: { - calculated: 103, + calculated: 129, payable: 0, exemption: { disability: true, @@ -877,6 +877,42 @@ export const validLDCP: Schema = { recommended: [], optional: [], }, + fee: { + calculated: [ + { + description: + 'The plannning fee for an application for a Certificate of Lawfulness relating to the proposed alteration or extension of a single home is £129', + policyRefs: [ + { + text: 'UK Stuatory Instruments 2023 No. 1197', + url: 'https://www.legislation.gov.uk/uksi/2023/1197/made', + }, + ], + }, + ], + payable: [ + { + description: + 'If the proposed works (to either a home or within the curtilage of a home) is for the sole purpose of - providing either a means of access to (or within) the dwellinghouse for a disabled resident (current or future); providing facilities that are designed to ensure the disabled persons safety, health or comfort; or providing disabled access to a public building - then no planning fee will be payable for this application.', + policyRefs: [ + { + text: 'UK Statutory Instruments 2012 No. 2920 Regulation 4', + url: 'https://www.legislation.gov.uk/uksi/2012/2920/regulation/4/made', + }, + ], + }, + { + description: + 'In the case of an application that is the first resubmission of an application on the same site that is similar in character and description, no planning fee is payable.', + policyRefs: [ + { + text: 'UK Statutory Instruments 2012 No. 2920 Regulation 8', + url: 'https://www.legislation.gov.uk/uksi/2012/2920/regulation/8/made', + }, + ], + }, + ], + }, }, submittedAt: '2023-10-02T00:00:00+01:00', schema: `https://theopensystemslab.github.io/digital-planning-data-schemas/${version}/schema.json`, diff --git a/examples/data/planningPermission.ts b/examples/data/planningPermission.ts index af9e2205..7b3873d1 100644 --- a/examples/data/planningPermission.ts +++ b/examples/data/planningPermission.ts @@ -10,16 +10,16 @@ export const validPlanningPermission: Schema = { description: 'Planning Permission - Full householder', }, fee: { - calculated: 206, - payable: 206, + calculated: 258, + payable: 258, exemption: { - disability: true, - resubmission: true, + disability: false, + resubmission: false, }, reduction: { - sports: true, - parishCouncil: true, - alternative: true, + sports: false, + parishCouncil: false, + alternative: false, }, reference: { govPay: 'sandbox-ref-456', @@ -1296,6 +1296,32 @@ export const validPlanningPermission: Schema = { ], optional: [], }, + fee: { + calculated: [ + { + description: + 'The fee to apply for planning permission to alter or extend a single home is £258.', + policyRefs: [ + { + text: 'UK Stuatory Instruments 2023 No. 1197', + url: 'https://www.legislation.gov.uk/uksi/2023/1197/made', + }, + ], + }, + ], + payable: [ + { + description: + 'The fee to apply for planning permission to alter or extend a single home is £258.', + policyRefs: [ + { + text: 'UK Stuatory Instruments 2023 No. 1197', + url: 'https://www.legislation.gov.uk/uksi/2023/1197/made', + }, + ], + }, + ], + }, }, submittedAt: '2023-10-02T00:00:00.00Z', schema: `https://theopensystemslab.github.io/digital-planning-data-schemas/${version}/schema.json`, diff --git a/examples/data/priorApproval.ts b/examples/data/priorApproval.ts index 9ad4cb12..d278a0bf 100644 --- a/examples/data/priorApproval.ts +++ b/examples/data/priorApproval.ts @@ -10,11 +10,11 @@ export const validPriorApproval: Schema = { description: 'Prior Approval - Install or change solar panels', }, fee: { - calculated: 96, - payable: 96, + calculated: 120, + payable: 120, exemption: { - disability: true, - resubmission: true, + disability: false, + resubmission: false, }, reduction: { sports: false, @@ -804,6 +804,28 @@ export const validPriorApproval: Schema = { ], optional: [], }, + fee: { + calculated: [ + { + policyRefs: [ + { + text: 'The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) (Amendment) Regulations 2023', + url: 'https://www.legislation.gov.uk/uksi/2023/1197/made', + }, + ], + }, + ], + payable: [ + { + policyRefs: [ + { + text: 'The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) (Amendment) Regulations 2023', + url: 'https://www.legislation.gov.uk/uksi/2023/1197/made', + }, + ], + }, + ], + }, }, submittedAt: '2023-10-02T00:00:00Z', schema: `https://theopensystemslab.github.io/digital-planning-data-schemas/${version}/schema.json`, diff --git a/examples/validLawfulDevelopmentCertificateExisting.json b/examples/validLawfulDevelopmentCertificateExisting.json index c29e3ecf..3e3725a6 100644 --- a/examples/validLawfulDevelopmentCertificateExisting.json +++ b/examples/validLawfulDevelopmentCertificateExisting.json @@ -6,16 +6,16 @@ "description": "Lawful Development Certificate - Existing use" }, "fee": { - "calculated": 206, - "payable": 206, + "calculated": 258, + "payable": 258, "exemption": { - "disability": true, - "resubmission": true + "disability": false, + "resubmission": false }, "reduction": { - "sports": true, - "parishCouncil": true, - "alternative": true + "sports": false, + "parishCouncil": false, + "alternative": false }, "reference": { "govPay": "sandbox-ref-123" @@ -1895,6 +1895,30 @@ } ], "optional": [] + }, + "fee": { + "calculated": [ + { + "description": "The planning fee for an application for a Certificate of Lawfulness relating to existing alterations or extensions of a single home is £258.", + "policyRefs": [ + { + "text": "UK Stuatory Instruments 2023 No. 1197", + "url": "https://www.legislation.gov.uk/uksi/2023/1197/made" + } + ] + } + ], + "payable": [ + { + "description": "The planning fee for an application for a Certificate of Lawfulness relating to existing alterations or extensions of a single home is £258.", + "policyRefs": [ + { + "text": "UK Stuatory Instruments 2023 No. 1197", + "url": "https://www.legislation.gov.uk/uksi/2023/1197/made" + } + ] + } + ] } }, "submittedAt": "2023-10-02t00:00:00z", diff --git a/examples/validLawfulDevelopmentCertificateProposed.json b/examples/validLawfulDevelopmentCertificateProposed.json index 2179f321..e6b3a742 100644 --- a/examples/validLawfulDevelopmentCertificateProposed.json +++ b/examples/validLawfulDevelopmentCertificateProposed.json @@ -6,7 +6,7 @@ "description": "Lawful Development Certificate - Proposed use" }, "fee": { - "calculated": 103, + "calculated": 129, "payable": 0, "exemption": { "disability": true, @@ -1254,6 +1254,39 @@ ], "recommended": [], "optional": [] + }, + "fee": { + "calculated": [ + { + "description": "The plannning fee for an application for a Certificate of Lawfulness relating to the proposed alteration or extension of a single home is £129", + "policyRefs": [ + { + "text": "UK Stuatory Instruments 2023 No. 1197", + "url": "https://www.legislation.gov.uk/uksi/2023/1197/made" + } + ] + } + ], + "payable": [ + { + "description": "If the proposed works (to either a home or within the curtilage of a home) is for the sole purpose of - providing either a means of access to (or within) the dwellinghouse for a disabled resident (current or future); providing facilities that are designed to ensure the disabled persons safety, health or comfort; or providing disabled access to a public building - then no planning fee will be payable for this application.", + "policyRefs": [ + { + "text": "UK Statutory Instruments 2012 No. 2920 Regulation 4", + "url": "https://www.legislation.gov.uk/uksi/2012/2920/regulation/4/made" + } + ] + }, + { + "description": "In the case of an application that is the first resubmission of an application on the same site that is similar in character and description, no planning fee is payable.", + "policyRefs": [ + { + "text": "UK Statutory Instruments 2012 No. 2920 Regulation 8", + "url": "https://www.legislation.gov.uk/uksi/2012/2920/regulation/8/made" + } + ] + } + ] } }, "submittedAt": "2023-10-02T00:00:00+01:00", diff --git a/examples/validPlanningPermission.json b/examples/validPlanningPermission.json index 0f67c1a2..9590b7a5 100644 --- a/examples/validPlanningPermission.json +++ b/examples/validPlanningPermission.json @@ -6,16 +6,16 @@ "description": "Planning Permission - Full householder" }, "fee": { - "calculated": 206, - "payable": 206, + "calculated": 258, + "payable": 258, "exemption": { - "disability": true, - "resubmission": true + "disability": false, + "resubmission": false }, "reduction": { - "sports": true, - "parishCouncil": true, - "alternative": true + "sports": false, + "parishCouncil": false, + "alternative": false }, "reference": { "govPay": "sandbox-ref-456" @@ -1804,6 +1804,30 @@ } ], "optional": [] + }, + "fee": { + "calculated": [ + { + "description": "The fee to apply for planning permission to alter or extend a single home is £258.", + "policyRefs": [ + { + "text": "UK Stuatory Instruments 2023 No. 1197", + "url": "https://www.legislation.gov.uk/uksi/2023/1197/made" + } + ] + } + ], + "payable": [ + { + "description": "The fee to apply for planning permission to alter or extend a single home is £258.", + "policyRefs": [ + { + "text": "UK Stuatory Instruments 2023 No. 1197", + "url": "https://www.legislation.gov.uk/uksi/2023/1197/made" + } + ] + } + ] } }, "submittedAt": "2023-10-02T00:00:00.00Z", diff --git a/examples/validPriorApproval.json b/examples/validPriorApproval.json index 6266f0a6..77c84e3a 100644 --- a/examples/validPriorApproval.json +++ b/examples/validPriorApproval.json @@ -6,11 +6,11 @@ "description": "Prior Approval - Install or change solar panels" }, "fee": { - "calculated": 96, - "payable": 96, + "calculated": 120, + "payable": 120, "exemption": { - "disability": true, - "resubmission": true + "disability": false, + "resubmission": false }, "reduction": { "sports": false, @@ -1132,6 +1132,28 @@ } ], "optional": [] + }, + "fee": { + "calculated": [ + { + "policyRefs": [ + { + "text": "The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) (Amendment) Regulations 2023", + "url": "https://www.legislation.gov.uk/uksi/2023/1197/made" + } + ] + } + ], + "payable": [ + { + "policyRefs": [ + { + "text": "The Town and Country Planning (Fees for Applications, Deemed Applications, Requests and Site Visits) (England) (Amendment) Regulations 2023", + "url": "https://www.legislation.gov.uk/uksi/2023/1197/made" + } + ] + } + ] } }, "submittedAt": "2023-10-02T00:00:00Z", diff --git a/schema/schema.json b/schema/schema.json index 85a59def..473bfd45 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -1605,6 +1605,35 @@ }, "type": "object" }, + "CalculateMetadata": { + "$id": "#CalculateMetadata", + "additionalProperties": false, + "description": "Metadata associated with PlanX Calculate components used to determine fees throughout a service", + "properties": { + "description": { + "type": "string" + }, + "policyRefs": { + "items": { + "additionalProperties": false, + "properties": { + "text": { + "type": "string" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "text" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, "Date": { "format": "date", "type": "string" @@ -1717,6 +1746,30 @@ ], "type": "object" }, + "FeeExplanation": { + "$id": "#FeeExplanation", + "additionalProperties": false, + "description": "An explanation, including policy references, of the calculated and payable fees associated with this application", + "properties": { + "calculated": { + "items": { + "$ref": "#/definitions/CalculateMetadata" + }, + "type": "array" + }, + "payable": { + "items": { + "$ref": "#/definitions/CalculateMetadata" + }, + "type": "array" + } + }, + "required": [ + "calculated", + "payable" + ], + "type": "object" + }, "File": { "$id": "#File", "additionalProperties": false, @@ -4440,6 +4493,9 @@ "service": { "additionalProperties": false, "properties": { + "fee": { + "$ref": "#/definitions/FeeExplanation" + }, "files": { "$ref": "#/definitions/RequestedFiles" }, @@ -4453,7 +4509,8 @@ "required": [ "flowId", "url", - "files" + "files", + "fee" ], "type": "object" }, @@ -21120,7 +21177,7 @@ "RequestedFiles": { "$id": "#RequestedFiles", "additionalProperties": false, - "description": "File types requested by this service. Schema[\"files\"] will be a subset of this list based on the user's journey through the service.", + "description": "File types requested by this service. Schema[\"files\"] will be a subset of this list based on the user's journey through the service", "properties": { "optional": { "items": { diff --git a/types/schema/Metadata.ts b/types/schema/Metadata.ts index aeb33919..b3f8d313 100644 --- a/types/schema/Metadata.ts +++ b/types/schema/Metadata.ts @@ -1,5 +1,6 @@ import {DateTime, URL, UUID} from './../utils'; import {FileType} from './File'; +import {QuestionMetaData} from './Responses'; /** * @id #DigitalPlanningMetadata @@ -35,7 +36,7 @@ export interface AnyProviderMetadata extends BaseMetadata { /** * @id #RequestedFiles - * @description File types requested by this service. Schema["files"] will be a subset of this list based on the user's journey through the service. + * @description File types requested by this service. Schema["files"] will be a subset of this list based on the user's journey through the service */ export interface RequestedFiles { required: FileType[]; @@ -43,6 +44,24 @@ export interface RequestedFiles { optional: FileType[]; } +/** + * @id #CalculateMetadata + * @description Metadata associated with PlanX Calculate components used to determine fees throughout a service + */ +export interface CalculateMetadata { + description?: string; + policyRefs?: QuestionMetaData['policyRefs']; +} + +/** + * @id #FeeExplanation + * @description An explanation, including policy references, of the calculated and payable fees associated with this application + */ +export interface FeeExplanation { + calculated: CalculateMetadata[]; + payable: CalculateMetadata[]; +} + /** * @id #PlanXMetadata * @description Additional metadata associated with applications submitted via PlanX @@ -53,5 +72,6 @@ export interface PlanXMetadata extends BaseMetadata { flowId: UUID; url: URL; files: RequestedFiles; + fee: FeeExplanation; }; }