Skip to content

Commit

Permalink
fix: better type for Responses policyRef (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak authored Nov 8, 2023
1 parent d29bb24 commit 05fe2df
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 20 deletions.
23 changes: 6 additions & 17 deletions schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2857,14 +2857,7 @@
"description": "Details of the digital planning service which sent the application",
"properties": {
"flowId": {
"anyOf": [
{
"$ref": "#/definitions/UUID"
},
{
"type": "string"
}
]
"$ref": "#/definitions/UUID"
},
"name": {
"type": "string"
Expand All @@ -2891,14 +2884,7 @@
"$ref": "#/definitions/DateTime"
},
"id": {
"anyOf": [
{
"$ref": "#/definitions/UUID"
},
{
"type": "string"
}
]
"$ref": "#/definitions/UUID"
},
"source": {
"const": "PlanX",
Expand Down Expand Up @@ -17515,9 +17501,12 @@
"type": "string"
},
"url": {
"type": "string"
"$ref": "#/definitions/URL"
}
},
"required": [
"text"
],
"type": "object"
},
"type": "array"
Expand Down
8 changes: 5 additions & 3 deletions types/schema/Responses.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {URL} from './../utils';

/**
* @id #Responses
* @description The ordered list of questions, answers, and their metadata for the application
Expand All @@ -7,14 +9,14 @@ export type Responses = QuestionAndResponses[];
export interface QuestionMetaData {
autoAnswered?: boolean;
policyRefs?: Array<{
url?: string;
text?: string;
text: string;
url?: URL;
}>;
sectionName?: string;
}

export interface ResponseMetaData {
flags?: Array<string>; // @todo connect to result/flags enum
flags?: Array<string>; // @todo connect to result/flags enum, is this actually a list?
options?: Array<string> | Array<Response>;
}

Expand Down

0 comments on commit 05fe2df

Please sign in to comment.