diff --git a/examples/data/Responses.ts b/examples/data/Responses.ts index 9a332f0f..8dcddd6e 100644 --- a/examples/data/Responses.ts +++ b/examples/data/Responses.ts @@ -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: [ @@ -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: [ diff --git a/examples/validExampleAgent.json b/examples/validExampleAgent.json index 58c63314..3ee9ce33 100644 --- a/examples/validExampleAgent.json +++ b/examples/validExampleAgent.json @@ -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", @@ -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", diff --git a/examples/validExampleApplicant.json b/examples/validExampleApplicant.json index 67bcb74f..f903106f 100644 --- a/examples/validExampleApplicant.json +++ b/examples/validExampleApplicant.json @@ -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", @@ -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", diff --git a/schema/schema.json b/schema/schema.json index 15c3f8c8..9a009f7b 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -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": { @@ -11724,7 +11718,7 @@ }, "type": "array" }, - "section_name": { + "sectionName": { "type": "string" } }, diff --git a/types/schema/Responses.ts b/types/schema/Responses.ts index 15e1bedb..5c2d1a45 100644 --- a/types/schema/Responses.ts +++ b/types/schema/Responses.ts @@ -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 {