Skip to content

CCM-14200 - Move models to reusable workspace#44

Merged
mjewildnhs merged 5 commits intomainfrom
feature/CCM-14200-package-models
Mar 3, 2026
Merged

CCM-14200 - Move models to reusable workspace#44
mjewildnhs merged 5 commits intomainfrom
feature/CCM-14200-package-models

Conversation

@mjewildnhs
Copy link
Copy Markdown
Contributor

@mjewildnhs mjewildnhs commented Mar 2, 2026

Description

Move models (under client-transform-lambda) out to standalone private node package.

Context

Paving way for reuse by mock-client lambda and integration tests.

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.

@mjewildnhs mjewildnhs force-pushed the feature/CCM-14200-package-models branch from eea12e6 to f75e031 Compare March 2, 2026 13:57
@mjewildnhs mjewildnhs force-pushed the feature/CCM-14200-package-models branch from cf8c084 to addcb89 Compare March 2, 2026 17:06
@mjewildnhs mjewildnhs marked this pull request as ready for review March 2, 2026 17:12
@mjewildnhs mjewildnhs requested a review from a team as a code owner March 2, 2026 17:12
Copy link
Copy Markdown
Contributor

@rhyscoxnhs rhyscoxnhs left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refactors the codebase to extract shared “models” (types/constants for client callbacks) into a standalone private npm workspace package to enable reuse by other lambdas/tests.

Changes:

  • Adds a new workspace package at src/models containing the shared model types and constants, with a barrel index.ts.
  • Updates model source files to use relative imports and adjusts ESLint rules to permit them within src/models/src/**.
  • Updates repo/workspace configuration (root workspaces, Sonar exclusions) and adjusts README wording around event namespaces.

Reviewed changes

Copilot reviewed 15 out of 18 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
tsconfig.json Removes the root tsconfig (repo now relies on per-workspace tsconfigs).
src/models/tsconfig.json Adds a dedicated TS config for the new models workspace.
src/models/src/status-types.ts Moves/maintains shared status union types in the models package.
src/models/src/status-publish-event.ts Converts imports/exports to relative paths within the models package.
src/models/src/routing-plan.ts Introduces a shared RoutingPlan interface.
src/models/src/message-status-data.ts Converts imports to relative paths within the models package.
src/models/src/index.ts Adds a barrel export surface for the models package.
src/models/src/client-config.ts Moves/maintains subscription configuration types in the models package.
src/models/src/client-callback-payload.ts Converts imports to relative paths within the models package.
src/models/src/channel-types.ts Moves/maintains shared channel union type in the models package.
src/models/src/channel-status-data.ts Converts imports to relative paths within the models package.
src/models/package.json Defines the new private workspace package metadata/scripts/exports.
scripts/config/sonar-scanner.properties Excludes src/models/** from Sonar coverage/CPD.
package.json Adds src/models to npm workspaces.
package-lock.json Updates lockfile for the added workspace package.
lambdas/client-transform-filter-lambda/src/tests/models/status-publish-event.test.ts Removes a unit test that asserted EventTypes constant values.
eslint.config.mjs Disables the no-relative-import-paths rule for src/models/src/**.
README.md Replaces specific event namespace text with uk.nhs.notify... placeholders.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mjewildnhs mjewildnhs merged commit d059f7d into main Mar 3, 2026
34 checks passed
@mjewildnhs mjewildnhs deleted the feature/CCM-14200-package-models branch March 3, 2026 10:02
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