Skip to content

CCM-11327: Update client config schema for MVP#141

Open
m-houston wants to merge 14 commits intomainfrom
feature/CCM-11327-update-client-config-schema-for-MVP
Open

CCM-11327: Update client config schema for MVP#141
m-houston wants to merge 14 commits intomainfrom
feature/CCM-11327-update-client-config-schema-for-MVP

Conversation

@m-houston
Copy link
Copy Markdown
Contributor

@m-houston m-houston commented Apr 23, 2026

Description

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

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.

- replace top-level client/campaign environment with status-based config
  and move to status-targeted event contracts
- remove published/removed and standalone client-subscription event
  schemas in favour of aggregate client/campaign models
- fold client subscriptions into client config and replace free-form event
  names with explicit message/channel/supplier status sets
- add client globalQueues for non-campaign routing queues
- add required human-readable slug fields to client and campaign
- rename APIM config to messageRequestsApimApplications and split MESH
  config into message-request and digital-letters variants
- keep secrets as parameter store path references for callback tokens and
  GOV.UK Notify API keys
- inline queue throttling fields directly into Queue and add scheduled
  queue limits with day/time windows
- add campaign GOV.UK Notify environment-scoped config and queue/channel
  uniqueness validation
- remove unused base schema artefacts and Zod branding from shared IDs
  and versions
- regenerate JSON schemas/AsyncAPI examples and update fixtures/tests for
  the new aggregate contract

Validated with:
- npm run gen:jsonschema
- npm test -- --runInBand
- npm run lint
- npm run build
- pre-commit run --all-files --config scripts/config/pre-commit.yaml

AI-assisted change.
…ackaging workflows

- Add campaign-published-event schema (INT, PROD, DISABLED) mirroring
  the client event pattern with env-scoped config validation
- Rewrite buildClientEvent and buildCampaignEvent to return ClientEvent[]
  and CampaignEvent[]; PROD-status entities now produce an INT+PROD pair
  with environment-scoped collections filtered per target environment
- Replace CSV-based CLI (create-client, --csv-file) with JSON-based
  publish-clients command (--json-file) that accepts Client objects directly
- Remove csv-to-client-input.ts, input.ts, test-data, and csv-parse dep
- Add bundle:release script and scripts/bundle-release.mjs (esbuild, CJS)
- Add .github/actions/bundle-event-builder composite action
- Add .github/workflows/release-event-builder.yml release asset workflow
- Add ddb-publish-style event-builder-bundle job to stage-3-build.yaml
- Add actions/event-builder-publish public composite action
…event-builder.ts into a dedicated packages/event-builder/src/campaign-event-builder.ts, and extracted shared envelope/filter helpers into packages/event-builder/src/event-builder-common.ts. Kept the existing buildCampaignEvent named export available from src/event-builder.ts to preserve the current public API and avoid unnecessary follow-on changes, in line with the repo guidance to keep diffs small and focused.

Split the mixed event-builder tests so client assertions remain in src/__tests__/build-client-published-event.spec.ts and campaign assertions now live in src/__tests__/build-campaign-published-event.spec.ts.
Validated with npm run lint --workspace=@nhsdigital/nhs-notify-client-config-event-builder, npm run typecheck --workspace=@nhsdigital/nhs-notify-client-config-event-builder, npm run test:unit --workspace=@nhsdigital/nhs-notify-client-config-event-builder, and pre-commit run --config scripts/config/pre-commit.yaml --files .... AI assistance was used to prepare this change.
…he workspace now specialises only in building client-config events. Deleted src/cli/index.ts and src/send-event-to-queue.ts, removed the cli script and related AWS/yargs dependencies from packages/event-builder/package.json, and refreshed package-lock.json.

Updated packages/event-builder/README.md to document the package as a builder-only library, removing queue-publishing and command-line usage guidance. This keeps the change focused and aligned with the repo guidance to keep diffs small and behaviour-specific.
@m-houston m-houston marked this pull request as ready for review May 1, 2026 10:07
@m-houston m-houston requested review from a team as code owners May 1, 2026 10:07
@m-houston m-houston added the skip-schema-version-check Bypasses the CI check that the schema version number must increase if there are changes label May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-schema-version-check Bypasses the CI check that the schema version number must increase if there are changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant