Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Responses type #29

Merged
merged 3 commits into from
Sep 18, 2023
Merged

feat: Responses type #29

merged 3 commits into from
Sep 18, 2023

Conversation

jessicamcinchak
Copy link
Member

@jessicamcinchak jessicamcinchak commented Sep 10, 2023

Matches BOPS proposal_details (docs) as a first go, but future direction should probably look a bit more like the new concept of an "enriched breadcrumb" (docs) in my opinion.

To get to that future, tweaks/enhancements I think we'd want to make to EnrichedBreadcrumb are:

  • sectionIdsectionName (do we need to enum these so they are version controlled values? do consumers care?)
  • add policy refs
  • carry over language/distinction of questionMetadata & answerMetadata - eg individual answers pick up flags, which isn't currently reflected in the enriched breadcrumb yet

@jessicamcinchak jessicamcinchak marked this pull request as ready for review September 18, 2023 09:41
@DafyddLlyr
Copy link
Contributor

Next steps all sound sensible to me - I think this is probably a good opportunity to return out an enriched crumb and hold this format where we can really. It probably does make a little more sense to approach this once PlanX is really generating it though?

Section Name as an enum or string is a tricky one. I think it should initially be a string but if BOPS require it be hardcoded, then in future when checking if a flow is valid we could easily check against the schema?

Comment on lines 8 to 15
auto_answered?: boolean;
policy_refs?: Array<{
url?: string;
text?: string;
}>;
section_name?: string;
feedback?: string;
notes?: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: We should probably stick to camelCase here and consumers can map to their desired format?

@jessicamcinchak jessicamcinchak merged commit 724d0d4 into main Sep 18, 2023
1 check passed
@jessicamcinchak jessicamcinchak deleted the jess/responses-type branch September 18, 2023 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants