From 2f7315a70972fb5524fe1bc13b5c6706613139d4 Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Wed, 13 Mar 2024 16:25:23 +0000 Subject: [PATCH] feat: add type for `CommunityInfrastructureLevy` (#135) --- schema/schema.json | 25 +++++++++++++++++++++++++ types/schema/data/Application.ts | 15 +++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/schema/schema.json b/schema/schema.json index 2484f3ef..1a74e15f 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -238,6 +238,9 @@ "additionalProperties": false, "description": "Information about this planning application", "properties": { + "CIL": { + "$ref": "#/definitions/CommunityInfrastructureLevy" + }, "declaration": { "$ref": "#/definitions/ApplicationDeclaration" }, @@ -1634,6 +1637,28 @@ }, "type": "object" }, + "CommunityInfrastructureLevy": { + "$id": "#CommunityInfrastructureLevy", + "additionalProperties": false, + "description": "Details about the Community Infrastructure Levy planning charge, if applicable", + "properties": { + "result": { + "enum": [ + "exempt.annexe", + "exempt.extension", + "exempt.selfBuild", + "liable", + "relief.charity", + "relief.socialHousing" + ], + "type": "string" + } + }, + "required": [ + "result" + ], + "type": "object" + }, "Date": { "format": "date", "type": "string" diff --git a/types/schema/data/Application.ts b/types/schema/data/Application.ts index 167d25de..eca1789e 100644 --- a/types/schema/data/Application.ts +++ b/types/schema/data/Application.ts @@ -10,6 +10,7 @@ export interface Application { fee: ApplicationFee; declaration: ApplicationDeclaration; preApp?: PreApplication; + CIL?: CommunityInfrastructureLevy; } /** @@ -64,6 +65,20 @@ export interface PreApplication { summary: string; } +/** + * @id #CommunityInfrastructureLevy + * @description Details about the Community Infrastructure Levy planning charge, if applicable + */ +export interface CommunityInfrastructureLevy { + result: + | 'exempt.annexe' + | 'exempt.extension' + | 'exempt.selfBuild' + | 'liable' + | 'relief.charity' + | 'relief.socialHousing'; +} + type ApplicationTypeKeys = keyof typeof ApplicationTypes; type GenericApplicationType = {