CCM-8579: Switch from util types to api client types#332
Merged
ClareJonesBJSS merged 15 commits intomainfrom Mar 13, 2025
Merged
CCM-8579: Switch from util types to api client types#332ClareJonesBJSS merged 15 commits intomainfrom
ClareJonesBJSS merged 15 commits intomainfrom
Conversation
8d68237 to
4fc6f88
Compare
Ian-Hodges
reviewed
Mar 6, 2025
frontend/src/components/forms/NhsAppTemplateForm/server-action.ts
Outdated
Show resolved
Hide resolved
a290c2d to
8ba4552
Compare
5f70ddc to
ce133f3
Compare
ce133f3 to
8cc9990
Compare
8cc9990 to
879c009
Compare
alexnuttall
reviewed
Mar 10, 2025
8bdd9da to
a24efaf
Compare
938e9e9 to
7dff2a9
Compare
7dff2a9 to
a727bdf
Compare
a727bdf to
9d4a431
Compare
alexnuttall
approved these changes
Mar 11, 2025
chris-elliott-nhsd
approved these changes
Mar 12, 2025
gparry333
approved these changes
Mar 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Rewrites the API spec to take advantage of anyOf/oneOf to avoid having all channel-specific properties as optional properties on a single object, and removes util types in favour of the generated ones.
Context
On creating the letter create/update pages, I went through a lot of silly mistakes and stray properties that TS could have caught, along with little discrepancies where the generated types and nhs-notify-web-template-management-utils types/validations had diverged. Consolidating on TemplateDto gives a lot more confidence that types actually reflect reality at runtime and will be accepted by the API
Testing
Manually tested SMS/email/NHS app template creation, editing, copying, deleting and submitting and all executed successfully with no visible regression. Letters seem to be working well so far for my follow on work and Alex's backend work at #340
Type of changes
Checklist
Sensitive Information Declaration
To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.