Skip to content

Commit

Permalink
feat: add breakdown by planning fee catogories to ApplicationFee & …
Browse files Browse the repository at this point in the history
…`FeeExplanation` (#157)
  • Loading branch information
jessicamcinchak authored May 1, 2024
1 parent 16f9476 commit 388d4ee
Show file tree
Hide file tree
Showing 3 changed files with 270 additions and 2 deletions.
210 changes: 209 additions & 1 deletion schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,85 @@
"description": "The costs associated with this application",
"properties": {
"calculated": {
"description": "Total calculated fee in GBP",
"type": "number"
},
"category": {
"additionalProperties": false,
"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": {
"type": "number"
},
"eleven": {
"additionalProperties": false,
"properties": {
"one": {
"type": "number"
}
},
"required": [
"one"
],
"type": "object"
},
"five": {
"type": "number"
},
"fiveToThirteen": {
"type": "number"
},
"four": {
"type": "number"
},
"fourteen": {
"type": "number"
},
"nine": {
"type": "number"
},
"one": {
"type": "number"
},
"oneToFour": {
"type": "number"
},
"oneToThirteen": {
"type": "number"
},
"sixAndSeven": {
"type": "number"
},
"ten": {
"type": "number"
},
"thirteen": {
"type": "number"
},
"three": {
"type": "number"
},
"twelve": {
"additionalProperties": false,
"properties": {
"one": {
"type": "number"
},
"two": {
"type": "number"
}
},
"type": "object"
},
"two": {
"type": "number"
},
"twoToFour": {
"type": "number"
}
},
"type": "object"
},
"exemption": {
"additionalProperties": false,
"properties": {
Expand All @@ -308,6 +385,7 @@
"type": "object"
},
"payable": {
"description": "Total payable fee after any exemptions or reductions in GBP",
"type": "number"
},
"reduction": {
Expand Down Expand Up @@ -2021,14 +2099,144 @@
"FeeExplanation": {
"$id": "#FeeExplanation",
"additionalProperties": false,
"description": "An explanation, including policy references, of the calculated and payable fees associated with this application",
"description": "An explanation, including policy references, of the fees associated with this application",
"properties": {
"calculated": {
"items": {
"$ref": "#/definitions/CalculateMetadata"
},
"type": "array"
},
"category": {
"additionalProperties": false,
"description": "Breakdown of calculated fee 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": {
"items": {
"$ref": "#/definitions/CalculateMetadata"
},
"type": "array"
},
"eleven": {
"additionalProperties": false,
"properties": {
"one": {
"items": {
"$ref": "#/definitions/CalculateMetadata"
},
"type": "array"
}
},
"required": [
"one"
],
"type": "object"
},
"five": {
"items": {
"$ref": "#/definitions/CalculateMetadata"
},
"type": "array"
},
"fiveToThirteen": {
"items": {
"$ref": "#/definitions/CalculateMetadata"
},
"type": "array"
},
"four": {
"items": {
"$ref": "#/definitions/CalculateMetadata"
},
"type": "array"
},
"fourteen": {
"items": {
"$ref": "#/definitions/CalculateMetadata"
},
"type": "array"
},
"nine": {
"items": {
"$ref": "#/definitions/CalculateMetadata"
},
"type": "array"
},
"one": {
"items": {
"$ref": "#/definitions/CalculateMetadata"
},
"type": "array"
},
"oneToFour": {
"items": {
"$ref": "#/definitions/CalculateMetadata"
},
"type": "array"
},
"oneToThirteen": {
"items": {
"$ref": "#/definitions/CalculateMetadata"
},
"type": "array"
},
"sixAndSeven": {
"items": {
"$ref": "#/definitions/CalculateMetadata"
},
"type": "array"
},
"ten": {
"items": {
"$ref": "#/definitions/CalculateMetadata"
},
"type": "array"
},
"thirteen": {
"items": {
"$ref": "#/definitions/CalculateMetadata"
},
"type": "array"
},
"three": {
"items": {
"$ref": "#/definitions/CalculateMetadata"
},
"type": "array"
},
"twelve": {
"additionalProperties": false,
"properties": {
"one": {
"items": {
"$ref": "#/definitions/CalculateMetadata"
},
"type": "array"
},
"two": {
"items": {
"$ref": "#/definitions/CalculateMetadata"
},
"type": "array"
}
},
"type": "object"
},
"two": {
"items": {
"$ref": "#/definitions/CalculateMetadata"
},
"type": "array"
},
"twoToFour": {
"items": {
"$ref": "#/definitions/CalculateMetadata"
},
"type": "array"
}
},
"type": "object"
},
"payable": {
"items": {
"$ref": "#/definitions/CalculateMetadata"
Expand Down
29 changes: 28 additions & 1 deletion types/schema/Metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,38 @@ export interface CalculateMetadata {

/**
* @id #FeeExplanation
* @description An explanation, including policy references, of the calculated and payable fees associated with this application
* @description An explanation, including policy references, of the fees associated with this application
*/
export interface FeeExplanation {
calculated: CalculateMetadata[];
payable: CalculateMetadata[];
/**
* @description Breakdown of calculated fee 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?: {
one?: CalculateMetadata[];
oneToFour?: CalculateMetadata[];
oneToThirteen?: CalculateMetadata[];
two?: CalculateMetadata[];
twoToFour?: CalculateMetadata[];
three?: CalculateMetadata[];
four?: CalculateMetadata[];
five?: CalculateMetadata[];
fiveToThirteen?: CalculateMetadata[];
sixAndSeven?: CalculateMetadata[];
eight?: CalculateMetadata[];
nine?: CalculateMetadata[];
ten?: CalculateMetadata[];
eleven?: {
one: CalculateMetadata[];
};
twelve?: {
one?: CalculateMetadata[];
two?: CalculateMetadata[];
};
thirteen?: CalculateMetadata[];
fourteen?: CalculateMetadata[];
};
}

/**
Expand Down
33 changes: 33 additions & 0 deletions types/schema/data/Application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,41 @@ export interface LondonApplication extends BaseApplication {
* @description The costs associated with this application
*/
export interface ApplicationFee {
/**
* @description Total calculated fee in GBP
*/
calculated: number;
/**
* @description Total payable fee after any exemptions or reductions in GBP
*/
payable: number;
/**
* @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?: {
one?: number;
oneToFour?: number;
oneToThirteen?: number;
two?: number;
twoToFour?: number;
three?: number;
four?: number;
five?: number;
fiveToThirteen?: number;
sixAndSeven?: number;
eight?: number;
nine?: number;
ten?: number;
eleven?: {
one: number;
};
twelve?: {
one?: number;
two?: number;
};
thirteen?: number;
fourteen?: number;
};
exemption: {
disability: boolean; // @todo add application.fee.exemption.disability.reason
resubmission: boolean; // @todo add application.resubmission.original.applicationReference & application.resubmission.originalReference.appeal
Expand Down

0 comments on commit 388d4ee

Please sign in to comment.