Skip to content

Conversation

@alexnuttall
Copy link
Contributor

@alexnuttall alexnuttall commented Jan 30, 2026

Description

This is intended to lay some groundworks for carbone letters by making letter templates a discriminated union type where the discriminator is letterVersion which is PDF or AUTHORING.

There are no functional changes at all, apart from saving the letterVersion field to the database on new letters, and adding it to API responses for letters.

If a database record doesn't have the field, it's added as a default at the zod parsing stage in the API.

It's not possible to create AUTHORING letters via the API so the frontend can assume that they won't be seen anywhere yet.

The type only includes the fields needed to implement the details pane (sidesCount, letterVariantId), not anything related to files or renders yet.

Context

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming
  • If I have used the 'skip-trivy-package' label I have done so responsibly and in the knowledge that this is being fixed as part of a separate ticket/PR.

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.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@alexnuttall alexnuttall requested review from a team as code owners January 30, 2026 10:02
bhansell1
bhansell1 previously approved these changes Feb 2, 2026
@alexnuttall alexnuttall added the skip-trivy-package Skip the Trivy Package Scan label Feb 2, 2026
@alexnuttall alexnuttall removed the skip-trivy-package Skip the Trivy Package Scan label Feb 2, 2026
@alexnuttall alexnuttall merged commit 3ef1d0a into main Feb 2, 2026
44 checks passed
@alexnuttall alexnuttall deleted the feature/CCM-13493-letter-details branch February 2, 2026 13:56
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.

4 participants