From 93ccd19effdddad2581e6e732cf58597962ecbc9 Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Fri, 3 May 2024 09:31:37 +0100 Subject: [PATCH] chore: better document `ApplicationFee` categories and update existing examples (#167) --- examples/data/ldcE.ts | 21 ++++++- examples/data/ldcP.ts | 19 ++++++- examples/data/planningPermission.ts | 21 ++++++- ...dLawfulDevelopmentCertificateExisting.json | 20 ++++++- ...dLawfulDevelopmentCertificateProposed.json | 18 +++++- examples/validPlanningPermission.json | 20 ++++++- schema/schema.json | 57 ++++++------------- types/schema/Metadata.ts | 4 -- types/schema/data/Application.ts | 52 +++++++++++++++-- 9 files changed, 174 insertions(+), 58 deletions(-) diff --git a/examples/data/ldcE.ts b/examples/data/ldcE.ts index 619c6690..77ea2e26 100644 --- a/examples/data/ldcE.ts +++ b/examples/data/ldcE.ts @@ -12,6 +12,9 @@ export const validLDCE: Schema = { fee: { calculated: 258, payable: 258, + category: { + sixAndSeven: 258, + }, exemption: { disability: false, resubmission: false, @@ -1262,13 +1265,27 @@ export const validLDCE: Schema = { optional: [], }, fee: { + category: { + sixAndSeven: [ + { + 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 Statutory Instruments 2023 No. 1197', + url: 'https://www.legislation.gov.uk/uksi/2023/1197/made', + }, + ], + }, + ], + }, 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', + text: 'UK Statutory Instruments 2023 No. 1197', url: 'https://www.legislation.gov.uk/uksi/2023/1197/made', }, ], @@ -1280,7 +1297,7 @@ export const validLDCE: Schema = { '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', + text: 'UK Statutory Instruments 2023 No. 1197', url: 'https://www.legislation.gov.uk/uksi/2023/1197/made', }, ], diff --git a/examples/data/ldcP.ts b/examples/data/ldcP.ts index 1efc56e5..90cd9ce3 100644 --- a/examples/data/ldcP.ts +++ b/examples/data/ldcP.ts @@ -12,6 +12,9 @@ export const validLDCP: Schema = { fee: { calculated: 129, payable: 0, + category: { + sixAndSeven: 129, + }, exemption: { disability: true, resubmission: true, @@ -846,13 +849,27 @@ export const validLDCP: Schema = { optional: [], }, fee: { + category: { + sixAndSeven: [ + { + 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 Statutory Instruments 2023 No. 1197', + url: 'https://www.legislation.gov.uk/uksi/2023/1197/made', + }, + ], + }, + ], + }, 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', + text: 'UK Statutory Instruments 2023 No. 1197', url: 'https://www.legislation.gov.uk/uksi/2023/1197/made', }, ], diff --git a/examples/data/planningPermission.ts b/examples/data/planningPermission.ts index 829b9435..cc950232 100644 --- a/examples/data/planningPermission.ts +++ b/examples/data/planningPermission.ts @@ -12,6 +12,9 @@ export const validPlanningPermission: Schema = { fee: { calculated: 258, payable: 258, + category: { + sixAndSeven: 258, + }, exemption: { disability: false, resubmission: false, @@ -1169,13 +1172,27 @@ export const validPlanningPermission: Schema = { optional: [], }, fee: { + category: { + sixAndSeven: [ + { + description: + 'The fee to apply for planning permission to alter or extend a single home is £258.', + policyRefs: [ + { + text: 'UK Statutory Instruments 2023 No. 1197', + url: 'https://www.legislation.gov.uk/uksi/2023/1197/made', + }, + ], + }, + ], + }, 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', + text: 'UK Statutory Instruments 2023 No. 1197', url: 'https://www.legislation.gov.uk/uksi/2023/1197/made', }, ], @@ -1187,7 +1204,7 @@ export const validPlanningPermission: Schema = { 'The fee to apply for planning permission to alter or extend a single home is £258.', policyRefs: [ { - text: 'UK Stuatory Instruments 2023 No. 1197', + text: 'UK Statutory Instruments 2023 No. 1197', url: 'https://www.legislation.gov.uk/uksi/2023/1197/made', }, ], diff --git a/examples/validLawfulDevelopmentCertificateExisting.json b/examples/validLawfulDevelopmentCertificateExisting.json index 2bfa2582..50e9b8b1 100644 --- a/examples/validLawfulDevelopmentCertificateExisting.json +++ b/examples/validLawfulDevelopmentCertificateExisting.json @@ -8,6 +8,9 @@ "fee": { "calculated": 258, "payable": 258, + "category": { + "sixAndSeven": 258 + }, "exemption": { "disability": false, "resubmission": false @@ -1882,12 +1885,25 @@ "optional": [] }, "fee": { + "category": { + "sixAndSeven": [ + { + "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 Statutory Instruments 2023 No. 1197", + "url": "https://www.legislation.gov.uk/uksi/2023/1197/made" + } + ] + } + ] + }, "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", + "text": "UK Statutory Instruments 2023 No. 1197", "url": "https://www.legislation.gov.uk/uksi/2023/1197/made" } ] @@ -1898,7 +1914,7 @@ "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", + "text": "UK Statutory Instruments 2023 No. 1197", "url": "https://www.legislation.gov.uk/uksi/2023/1197/made" } ] diff --git a/examples/validLawfulDevelopmentCertificateProposed.json b/examples/validLawfulDevelopmentCertificateProposed.json index 7a2fc52c..6b447a7d 100644 --- a/examples/validLawfulDevelopmentCertificateProposed.json +++ b/examples/validLawfulDevelopmentCertificateProposed.json @@ -8,6 +8,9 @@ "fee": { "calculated": 129, "payable": 0, + "category": { + "sixAndSeven": 129 + }, "exemption": { "disability": true, "resubmission": true @@ -1224,12 +1227,25 @@ "optional": [] }, "fee": { + "category": { + "sixAndSeven": [ + { + "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 Statutory Instruments 2023 No. 1197", + "url": "https://www.legislation.gov.uk/uksi/2023/1197/made" + } + ] + } + ] + }, "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", + "text": "UK Statutory Instruments 2023 No. 1197", "url": "https://www.legislation.gov.uk/uksi/2023/1197/made" } ] diff --git a/examples/validPlanningPermission.json b/examples/validPlanningPermission.json index 58f47042..5aa42801 100644 --- a/examples/validPlanningPermission.json +++ b/examples/validPlanningPermission.json @@ -8,6 +8,9 @@ "fee": { "calculated": 258, "payable": 258, + "category": { + "sixAndSeven": 258 + }, "exemption": { "disability": false, "resubmission": false @@ -1678,12 +1681,25 @@ "optional": [] }, "fee": { + "category": { + "sixAndSeven": [ + { + "description": "The fee to apply for planning permission to alter or extend a single home is £258.", + "policyRefs": [ + { + "text": "UK Statutory Instruments 2023 No. 1197", + "url": "https://www.legislation.gov.uk/uksi/2023/1197/made" + } + ] + } + ] + }, "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", + "text": "UK Statutory Instruments 2023 No. 1197", "url": "https://www.legislation.gov.uk/uksi/2023/1197/made" } ] @@ -1694,7 +1710,7 @@ "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", + "text": "UK Statutory Instruments 2023 No. 1197", "url": "https://www.legislation.gov.uk/uksi/2023/1197/made" } ] diff --git a/schema/schema.json b/schema/schema.json index ae6f729e..90b55138 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -297,72 +297,75 @@ "description": "Breakdown of calculated fee in GBP by category of development, based on the scales defined in The Town and Country Planning Regulations https://www.legislation.gov.uk/uksi/2012/2920/schedule/1/part/2", "properties": { "eight": { + "description": "Category 8 - Car parks or access roads", "type": "number" }, "eleven": { "additionalProperties": false, "properties": { "one": { + "description": "Category 11(1) - Mining operations", + "type": "number" + }, + "two": { + "description": "Category 11(2) - Other operations", "type": "number" } }, - "required": [ - "one" - ], "type": "object" }, "five": { - "type": "number" - }, - "fiveToThirteen": { + "description": "Category 5 - Plant equipment or machinery", "type": "number" }, "four": { + "description": "Category 4 - Glasshouses on agricultural land", "type": "number" }, "fourteen": { + "description": "Category 14 - Other change of use", "type": "number" }, "nine": { + "description": "Category 9 - Exploratory drilling", "type": "number" }, "one": { - "type": "number" - }, - "oneToFour": { - "type": "number" - }, - "oneToThirteen": { + "description": "Category 1 - New homes", "type": "number" }, "sixAndSeven": { + "description": "Category 6 and 7 - Home or curtilage of home", "type": "number" }, "ten": { + "description": "Category 10 - Winning and working of oil or natural gas", "type": "number" }, "thirteen": { + "description": "Category 13 - Waste disposal", "type": "number" }, "three": { + "description": "Category 3 - Agricultural buildings", "type": "number" }, "twelve": { "additionalProperties": false, "properties": { "one": { + "description": "Category 12(1) - Change of use from single home to homes", "type": "number" }, "two": { + "description": "Category 12(2) - Change of use to home", "type": "number" } }, "type": "object" }, "two": { - "type": "number" - }, - "twoToFour": { + "description": "Category 2 - Other new buildings", "type": "number" } }, @@ -2160,12 +2163,6 @@ }, "type": "array" }, - "fiveToThirteen": { - "items": { - "$ref": "#/definitions/CalculateMetadata" - }, - "type": "array" - }, "four": { "items": { "$ref": "#/definitions/CalculateMetadata" @@ -2190,18 +2187,6 @@ }, "type": "array" }, - "oneToFour": { - "items": { - "$ref": "#/definitions/CalculateMetadata" - }, - "type": "array" - }, - "oneToThirteen": { - "items": { - "$ref": "#/definitions/CalculateMetadata" - }, - "type": "array" - }, "sixAndSeven": { "items": { "$ref": "#/definitions/CalculateMetadata" @@ -2249,12 +2234,6 @@ "$ref": "#/definitions/CalculateMetadata" }, "type": "array" - }, - "twoToFour": { - "items": { - "$ref": "#/definitions/CalculateMetadata" - }, - "type": "array" } }, "type": "object" diff --git a/types/schema/Metadata.ts b/types/schema/Metadata.ts index d8117faa..a7a434b0 100644 --- a/types/schema/Metadata.ts +++ b/types/schema/Metadata.ts @@ -73,14 +73,10 @@ export interface FeeExplanation { */ category?: { one?: CalculateMetadata[]; - oneToFour?: CalculateMetadata[]; - oneToThirteen?: CalculateMetadata[]; two?: CalculateMetadata[]; - twoToFour?: CalculateMetadata[]; three?: CalculateMetadata[]; four?: CalculateMetadata[]; five?: CalculateMetadata[]; - fiveToThirteen?: CalculateMetadata[]; sixAndSeven?: CalculateMetadata[]; eight?: CalculateMetadata[]; nine?: CalculateMetadata[]; diff --git a/types/schema/data/Application.ts b/types/schema/data/Application.ts index 6072b10d..ca21bc95 100644 --- a/types/schema/data/Application.ts +++ b/types/schema/data/Application.ts @@ -49,27 +49,69 @@ export interface ApplicationFee { * @description Breakdown of calculated fee in GBP by category of development, based on the scales defined in The Town and Country Planning Regulations https://www.legislation.gov.uk/uksi/2012/2920/schedule/1/part/2 */ category?: { + /** + * @description Category 1 - New homes + */ one?: number; - oneToFour?: number; - oneToThirteen?: number; + /** + * @description Category 2 - Other new buildings + */ two?: number; - twoToFour?: number; + /** + * @description Category 3 - Agricultural buildings + */ three?: number; + /** + * @description Category 4 - Glasshouses on agricultural land + */ four?: number; + /** + * @description Category 5 - Plant equipment or machinery + */ five?: number; - fiveToThirteen?: number; + /** + * @description Category 6 and 7 - Home or curtilage of home + */ sixAndSeven?: number; + /** + * @description Category 8 - Car parks or access roads + */ eight?: number; + /** + * @description Category 9 - Exploratory drilling + */ nine?: number; + /** + * @description Category 10 - Winning and working of oil or natural gas + */ ten?: number; eleven?: { - one: number; + /** + * @description Category 11(1) - Mining operations + */ + one?: number; + /** + * @description Category 11(2) - Other operations + */ + two?: number; }; twelve?: { + /** + * @description Category 12(1) - Change of use from single home to homes + */ one?: number; + /** + * @description Category 12(2) - Change of use to home + */ two?: number; }; + /** + * @description Category 13 - Waste disposal + */ thirteen?: number; + /** + * @description Category 14 - Other change of use + */ fourteen?: number; }; exemption: {