Skip to content

Commit

Permalink
pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak committed Sep 18, 2023
1 parent 90ad8e2 commit c029827
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 30 deletions.
8 changes: 4 additions & 4 deletions examples/data/Responses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import {Schema} from '../../types/Schema';
export const validResponses: Schema['responses'] = [
{
metadata: {
section_name: 'The property',
auto_answered: true,
sectionName: 'The property',
autoAnswered: true,
},
question: 'Is the property in London Borough of Southwark?',
responses: [
Expand All @@ -15,12 +15,12 @@ export const validResponses: Schema['responses'] = [
},
{
metadata: {
policy_refs: [
policyRefs: [
{
text: 'Town and Country Planning Act 1990, Part 7, Section 191 & Section 192',
},
],
section_name: 'About the project',
sectionName: 'About the project',
},
question: 'What are you applying about?',
responses: [
Expand Down
46 changes: 40 additions & 6 deletions examples/validExampleAgent.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,16 @@
"description": "This is a test application"
}
},
"result": {
"name": "Test"
},
"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": "Listed building consent / Not required",
"description": ""
}
],
"metadata": {
"service": {
"publishedFlowId": "b3320abe-f5bc-4185-b61f-40e9e65f07ad",
Expand All @@ -151,9 +158,36 @@
"submittedAt": "2018-11-13T20:20:39+00:00"
}
},
"responses": {
"name": "Test"
},
"responses": [
{
"metadata": {
"sectionName": "The property",
"autoAnswered": true
},
"question": "Is the property in London Borough of Southwark?",
"responses": [
{
"value": "Yes"
}
]
},
{
"metadata": {
"policyRefs": [
{
"text": "Town and Country Planning Act 1990, Part 7, Section 191 & Section 192"
}
],
"sectionName": "About the project"
},
"question": "What are you applying about?",
"responses": [
{
"value": "Proposed changes I want to make in the future"
}
]
}
],
"files": [
{
"name": "https://api.editor.planx.uk/file/private/folderId/file1.pdf",
Expand Down
46 changes: 40 additions & 6 deletions examples/validExampleApplicant.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,16 @@
"description": "This is a test application"
}
},
"result": {
"name": "Test"
},
"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": "Listed building consent / Not required",
"description": ""
}
],
"metadata": {
"service": {
"publishedFlowId": "b3320abe-f5bc-4185-b61f-40e9e65f07ad",
Expand All @@ -124,9 +131,36 @@
"submittedAt": "2018-11-13T20:20:39+00:00"
}
},
"responses": {
"name": "Test"
},
"responses": [
{
"metadata": {
"sectionName": "The property",
"autoAnswered": true
},
"question": "Is the property in London Borough of Southwark?",
"responses": [
{
"value": "Yes"
}
]
},
{
"metadata": {
"policyRefs": [
{
"text": "Town and Country Planning Act 1990, Part 7, Section 191 & Section 192"
}
],
"sectionName": "About the project"
},
"question": "What are you applying about?",
"responses": [
{
"value": "Proposed changes I want to make in the future"
}
]
}
],
"files": [
{
"name": "https://api.editor.planx.uk/file/private/folderId/file1.pdf",
Expand Down
12 changes: 3 additions & 9 deletions schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -11700,16 +11700,10 @@
"QuestionMetaData": {
"additionalProperties": false,
"properties": {
"auto_answered": {
"autoAnswered": {
"type": "boolean"
},
"feedback": {
"type": "string"
},
"notes": {
"type": "string"
},
"policy_refs": {
"policyRefs": {
"items": {
"additionalProperties": false,
"properties": {
Expand All @@ -11724,7 +11718,7 @@
},
"type": "array"
},
"section_name": {
"sectionName": {
"type": "string"
}
},
Expand Down
8 changes: 3 additions & 5 deletions types/schema/Responses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@
export type Responses = QuestionAndResponses[];

export interface QuestionMetaData {
auto_answered?: boolean;
policy_refs?: Array<{
autoAnswered?: boolean;
policyRefs?: Array<{
url?: string;
text?: string;
}>;
section_name?: string;
feedback?: string;
notes?: string;
sectionName?: string;
}

export interface ResponseMetaData {
Expand Down

0 comments on commit c029827

Please sign in to comment.