Skip to content

Commit

Permalink
fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak committed Sep 18, 2023
1 parent 1a11d5e commit 90ad8e2
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 59 deletions.
38 changes: 19 additions & 19 deletions examples/data/Responses.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
import { Schema } from '../../types/Schema';
import {Schema} from '../../types/Schema';

export const validResponses: Schema['responses'] = [
{
"metadata": {
"section_name": "The property",
"auto_answered": true
metadata: {
section_name: 'The property',
auto_answered: true,
},
"question": "Is the property in London Borough of Southwark?",
"responses": [
question: 'Is the property in London Borough of Southwark?',
responses: [
{
"value": "Yes"
}
]
value: 'Yes',
},
],
},
{
"metadata": {
"policy_refs": [
metadata: {
policy_refs: [
{
"text": "Town and Country Planning Act 1990, Part 7, Section 191 & Section 192"
}
text: 'Town and Country Planning Act 1990, Part 7, Section 191 & Section 192',
},
],
"section_name": "About the project"
section_name: 'About the project',
},
"question": "What are you applying about?",
"responses": [
question: 'What are you applying about?',
responses: [
{
"value": "Proposed changes I want to make in the future"
}
]
value: 'Proposed changes I want to make in the future',
},
],
},
];
17 changes: 9 additions & 8 deletions examples/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {validAgent, validApplicant} from './data/Applicant';
import {validApplication} from './data/Application';
import {validProperty} from './data/Property';
import {validProposal} from './data/Proposal';
import { validResponses } from './data/Responses';
import {validResponses} from './data/Responses';

const validMetadata: Schema['metadata'] = {
service: {
Expand Down Expand Up @@ -46,14 +46,15 @@ const validFiles: Schema['files'] = [
},
];

const validResult = [
const validResult: Schema['result'] = [
{
value: "Planning permission / Permitted development",
description: "It looks like the proposed changes may fall within the rules for Permitted Development and therefore would not need planning permission."
value: 'Planning permission / Permitted development',
description:
'It looks like the proposed changes may fall within the rules for Permitted Development and therefore would not need planning permission.',
},
{
value: "Listed building consent / Not required",
description: "",
value: 'Listed building consent / Not required',
description: '',
},
];

Expand All @@ -69,7 +70,7 @@ export const validExampleApplicant: Schema = {
},
result: validResult,
metadata: validMetadata,
repsonses: validResponses,
responses: validResponses,
files: validFiles,
};

Expand All @@ -85,6 +86,6 @@ export const validExampleAgent: Schema = {
},
result: validResult,
metadata: validMetadata,
repsonses: validResponses,
responses: validResponses,
files: validFiles,
};
67 changes: 37 additions & 30 deletions types/enums/Flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,41 @@
* Flags
*/
export const Flags = {
"Planning permission / Immune": "It looks like the changes may now be beyond the time limit for enforcement action. This does not apply if the changes have been deliberately concealed.",
"Planning permission / Missing information": "There is some key information missing that will be needed to assess this application.",
"Planning permission / Permission needed": "It looks like the proposed changes may require planning permission.",
"Planning permission / Prior approval": "It looks like the proposed changes do not require planning permission, however the applicant must apply for Prior Approval before proceeding.",
"Planning permission / Notice": "It looks like the proposed changes may not require planning permission, however the applicant must provide notice to the planning authority before proceeding.",
"Planning permission / Permitted development": "It looks like the proposed changes may fall within the rules for Permitted Development and therefore would not need planning permission.",
"Planning permission / Not development": "It looks like the proposed changes may not fall within the legal definition of 'development', and therefore would not require planning permission.",
"Listed building consent / Missing information": "",
"Listed building consent / Required": "",
"Listed building consent / De minimis": "",
"Listed building consent / Not required": "",
"Works to trees & hedges / Missing information": "",
"Works to trees & hedges / Required": "",
"Works to trees & hedges / De minimis": "",
"Works to trees & hedges / Not required": "",
"Demolition in a conservation area / Missing information": "",
"Demolition in a conservation area / Required": "",
"Demolition in a conservation area / De minimis": "",
"Demolition in a conservation area / Not required": "",
"Planning policy / Missing information": "",
"Planning policy / Fails to meet policy": "",
"Planning policy / Edge case": "",
"Planning policy / Meets policy": "",
"Community infrastructure levy / Missing information": "",
"Community infrastructure levy / Exemption void": "",
"Community infrastructure levy / Exempt": "",
"Community infrastructure levy / Relief void": "",
"Community infrastructure levy / Relief": "",
"Community infrastructure levy / Liable": "",
"Community infrastructure levy / Not liable": "",
'Planning permission / Immune':
'It looks like the changes may now be beyond the time limit for enforcement action. This does not apply if the changes have been deliberately concealed.',
'Planning permission / Missing information':
'There is some key information missing that will be needed to assess this application.',
'Planning permission / Permission needed':
'It looks like the proposed changes may require planning permission.',
'Planning permission / Prior approval':
'It looks like the proposed changes do not require planning permission, however the applicant must apply for Prior Approval before proceeding.',
'Planning permission / Notice':
'It looks like the proposed changes may not require planning permission, however the applicant must provide notice to the planning authority before proceeding.',
'Planning permission / Permitted development':
'It looks like the proposed changes may fall within the rules for Permitted Development and therefore would not need planning permission.',
'Planning permission / Not development':
"It looks like the proposed changes may not fall within the legal definition of 'development', and therefore would not require planning permission.",
'Listed building consent / Missing information': '',
'Listed building consent / Required': '',
'Listed building consent / De minimis': '',
'Listed building consent / Not required': '',
'Works to trees & hedges / Missing information': '',
'Works to trees & hedges / Required': '',
'Works to trees & hedges / De minimis': '',
'Works to trees & hedges / Not required': '',
'Demolition in a conservation area / Missing information': '',
'Demolition in a conservation area / Required': '',
'Demolition in a conservation area / De minimis': '',
'Demolition in a conservation area / Not required': '',
'Planning policy / Missing information': '',
'Planning policy / Fails to meet policy': '',
'Planning policy / Edge case': '',
'Planning policy / Meets policy': '',
'Community infrastructure levy / Missing information': '',
'Community infrastructure levy / Exemption void': '',
'Community infrastructure levy / Exempt': '',
'Community infrastructure levy / Relief void': '',
'Community infrastructure levy / Relief': '',
'Community infrastructure levy / Liable': '',
'Community infrastructure levy / Not liable': '',
};
2 changes: 1 addition & 1 deletion types/schema/Responses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ export interface QuestionAndResponses {
question: string;
responses: Array<Response> | string;
metadata?: QuestionMetaData;
};
}
2 changes: 1 addition & 1 deletion types/schema/Result.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Flags} from "../enums/Flags";
import {Flags} from '../enums/Flags';

/**
* @id #Result
Expand Down

0 comments on commit 90ad8e2

Please sign in to comment.