CCM-14200 - Move models to reusable workspace#44
Merged
mjewildnhs merged 5 commits intomainfrom Mar 3, 2026
Merged
Conversation
eea12e6 to
f75e031
Compare
cf8c084 to
addcb89
Compare
cgitim
approved these changes
Mar 3, 2026
Contributor
There was a problem hiding this comment.
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/modelscontaining the shared model types and constants, with a barrelindex.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>
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
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
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.