Skip to content

Commit

Permalink
first draft
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak committed Feb 21, 2024
1 parent 40c834c commit 324e235
Show file tree
Hide file tree
Showing 6 changed files with 131 additions and 3 deletions.
4 changes: 4 additions & 0 deletions examples/data/ldcE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1274,6 +1274,10 @@ export const validLDCE: Schema = {
],
optional: [],
},
fees: {
calculated: [],
payable: [],
},
},
submittedAt: '2023-10-02t00:00:00z',
schema:
Expand Down
36 changes: 36 additions & 0 deletions examples/data/ldcP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,42 @@ export const validLDCP: Schema = {
recommended: [],
optional: [],
},
fees: {
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:
Expand Down
4 changes: 4 additions & 0 deletions examples/data/planningPermission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1294,6 +1294,10 @@ export const validPlanningPermission: Schema = {
],
optional: [],
},
fees: {
calculated: [],
payable: [],
},
},
submittedAt: '2023-10-02T00:00:00.00Z',
schema:
Expand Down
4 changes: 4 additions & 0 deletions examples/data/priorApproval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,10 @@ export const validPriorApproval: Schema = {
],
optional: [],
},
fees: {
calculated: [],
payable: [],
},
},
submittedAt: '2023-10-02T00:00:00Z',
schema:
Expand Down
64 changes: 62 additions & 2 deletions schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1605,6 +1605,38 @@
},
"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"
}
},
"required": [
"description"
],
"type": "object"
},
"Date": {
"format": "date",
"type": "string"
Expand Down Expand Up @@ -1717,6 +1749,30 @@
],
"type": "object"
},
"FeesExplanation": {
"$id": "#FeesExplanation",
"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,
Expand Down Expand Up @@ -4422,6 +4478,9 @@
"service": {
"additionalProperties": false,
"properties": {
"fees": {
"$ref": "#/definitions/FeesExplanation"
},
"files": {
"$ref": "#/definitions/RequestedFiles"
},
Expand All @@ -4435,7 +4494,8 @@
"required": [
"flowId",
"url",
"files"
"files",
"fees"
],
"type": "object"
},
Expand Down Expand Up @@ -21102,7 +21162,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": {
Expand Down
22 changes: 21 additions & 1 deletion types/schema/Metadata.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {DateTime, URL, UUID} from './../utils';
import {FileType} from './File';
import {QuestionMetaData} from './Responses';

/**
* @id #DigitalPlanningMetadata
Expand Down Expand Up @@ -35,14 +36,32 @@ 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[];
recommended: FileType[];
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 #FeesExplanation
* @description An explanation, including policy references, of the calculated and payable fees associated with this application
*/
export interface FeesExplanation {
calculated: CalculateMetadata[];
payable: CalculateMetadata[];
}

/**
* @id #PlanXMetadata
* @description Additional metadata associated with applications submitted via PlanX
Expand All @@ -53,5 +72,6 @@ export interface PlanXMetadata extends BaseMetadata {
flowId: UUID;
url: URL;
files: RequestedFiles;
fees: FeesExplanation;
};
}

0 comments on commit 324e235

Please sign in to comment.