From 4ac0ba7512686a05523b50136f3d99c7bf6d6184 Mon Sep 17 00:00:00 2001 From: "scott.fullerton1" Date: Mon, 11 May 2026 10:25:13 +0100 Subject: [PATCH 1/5] CCM-17639: Updated event to include reasonCode and text --- README.md | 4 +++- ...gital-letter-unsuccessful-data.schema.yaml | 12 +++++------ src/cloudevents/readme-index.yaml | 21 +++++++++++++------ 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 557127960..9fd89fcf3 100644 --- a/README.md +++ b/README.md @@ -128,6 +128,7 @@ _No common schemas defined yet._ | **Digital Letters Print Letter Transitioned Data** | [`src/digital-letters/2025-10-draft/data/digital-letters-print-letter-transitioned-data.schema.yaml`](src/digital-letters/2025-10-draft/data/digital-letters-print-letter-transitioned-data.schema.yaml) | [`schemas/digital-letters/2025-10-draft/data/digital-letters-print-letter-transitioned-data.schema.json`](schemas/digital-letters/2025-10-draft/data/digital-letters-print-letter-transitioned-data.schema.json) | [`../../docs/cloudevents/digital-letters/2025-10-draft/data/digital-letters-print-letter-transitioned-data.schema.md`](../../docs/cloudevents/digital-letters/2025-10-draft/data/digital-letters-print-letter-transitioned-data.schema.md) | | **Digital Letters Print Pdf Analysed Data** | [`src/digital-letters/2025-10-draft/data/digital-letters-print-pdf-analysed-data.schema.yaml`](src/digital-letters/2025-10-draft/data/digital-letters-print-pdf-analysed-data.schema.yaml) | [`schemas/digital-letters/2025-10-draft/data/digital-letters-print-pdf-analysed-data.schema.json`](schemas/digital-letters/2025-10-draft/data/digital-letters-print-pdf-analysed-data.schema.json) | [`../../docs/cloudevents/digital-letters/2025-10-draft/data/digital-letters-print-pdf-analysed-data.schema.md`](../../docs/cloudevents/digital-letters/2025-10-draft/data/digital-letters-print-pdf-analysed-data.schema.md) | | **Digital Letters Queue Digital Letter Read Data** | [`src/digital-letters/2025-10-draft/data/digital-letters-queue-digital-letter-read-data.schema.yaml`](src/digital-letters/2025-10-draft/data/digital-letters-queue-digital-letter-read-data.schema.yaml) | [`schemas/digital-letters/2025-10-draft/data/digital-letters-queue-digital-letter-read-data.schema.json`](schemas/digital-letters/2025-10-draft/data/digital-letters-queue-digital-letter-read-data.schema.json) | [`../../docs/cloudevents/digital-letters/2025-10-draft/data/digital-letters-queue-digital-letter-read-data.schema.md`](../../docs/cloudevents/digital-letters/2025-10-draft/data/digital-letters-queue-digital-letter-read-data.schema.md) | +| **Digital Letters Queue Digital Letter Unsuccessful Data** | [`src/digital-letters/2025-10-draft/data/digital-letters-queue-digital-letter-unsuccessful-data.schema.yaml`](src/digital-letters/2025-10-draft/data/digital-letters-queue-digital-letter-unsuccessful-data.schema.yaml) | [`schemas/digital-letters/2025-10-draft/data/digital-letters-queue-digital-letter-unsuccessful-data.schema.json`](schemas/digital-letters/2025-10-draft/data/digital-letters-queue-digital-letter-unsuccessful-data.schema.json) | [`../../docs/cloudevents/digital-letters/2025-10-draft/data/digital-letters-queue-digital-letter-unsuccessful-data.schema.md`](../../docs/cloudevents/digital-letters/2025-10-draft/data/digital-letters-queue-digital-letter-unsuccessful-data.schema.md) | | **Digital Letters Queue Item Dequeued Data** | [`src/digital-letters/2025-10-draft/data/digital-letters-queue-item-dequeued-data.schema.yaml`](src/digital-letters/2025-10-draft/data/digital-letters-queue-item-dequeued-data.schema.yaml) | [`schemas/digital-letters/2025-10-draft/data/digital-letters-queue-item-dequeued-data.schema.json`](schemas/digital-letters/2025-10-draft/data/digital-letters-queue-item-dequeued-data.schema.json) | [`../../docs/cloudevents/digital-letters/2025-10-draft/data/digital-letters-queue-item-dequeued-data.schema.md`](../../docs/cloudevents/digital-letters/2025-10-draft/data/digital-letters-queue-item-dequeued-data.schema.md) | | **Digital Letters Queue Item Enqueued Data** | [`src/digital-letters/2025-10-draft/data/digital-letters-queue-item-enqueued-data.schema.yaml`](src/digital-letters/2025-10-draft/data/digital-letters-queue-item-enqueued-data.schema.yaml) | [`schemas/digital-letters/2025-10-draft/data/digital-letters-queue-item-enqueued-data.schema.json`](schemas/digital-letters/2025-10-draft/data/digital-letters-queue-item-enqueued-data.schema.json) | [`../../docs/cloudevents/digital-letters/2025-10-draft/data/digital-letters-queue-item-enqueued-data.schema.md`](../../docs/cloudevents/digital-letters/2025-10-draft/data/digital-letters-queue-item-enqueued-data.schema.md) | | **Digital Letters Reporting Generate Report Data** | [`src/digital-letters/2025-10-draft/data/digital-letters-reporting-generate-report-data.schema.yaml`](src/digital-letters/2025-10-draft/data/digital-letters-reporting-generate-report-data.schema.yaml) | [`schemas/digital-letters/2025-10-draft/data/digital-letters-reporting-generate-report-data.schema.json`](schemas/digital-letters/2025-10-draft/data/digital-letters-reporting-generate-report-data.schema.json) | [`../../docs/cloudevents/digital-letters/2025-10-draft/data/digital-letters-reporting-generate-report-data.schema.md`](../../docs/cloudevents/digital-letters/2025-10-draft/data/digital-letters-reporting-generate-report-data.schema.md) | @@ -171,13 +172,13 @@ _No common schemas defined yet._ | **uk.nhs.notify.digital.letters.print.letter.transitioned.v1** | [`src/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.letter.transitioned.v1.schema.yaml`](src/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.letter.transitioned.v1.schema.yaml) | [`schemas/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.letter.transitioned.v1.schema.json`](schemas/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.letter.transitioned.v1.schema.json) | [`../../docs/cloudevents/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.letter.transitioned.v1.schema.md`](../../docs/cloudevents/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.letter.transitioned.v1.schema.md) | | **uk.nhs.notify.digital.letters.print.pdf.analysed.v1** | [`src/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.pdf.analysed.v1.schema.yaml`](src/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.pdf.analysed.v1.schema.yaml) | [`schemas/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.pdf.analysed.v1.schema.json`](schemas/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.pdf.analysed.v1.schema.json) | [`../../docs/cloudevents/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.pdf.analysed.v1.schema.md`](../../docs/cloudevents/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.pdf.analysed.v1.schema.md) | | **uk.nhs.notify.digital.letters.queue.digital.letter.read.v1** | [`src/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.digital.letter.read.v1.schema.yaml`](src/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.digital.letter.read.v1.schema.yaml) | [`schemas/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.digital.letter.read.v1.schema.json`](schemas/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.digital.letter.read.v1.schema.json) | [`../../docs/cloudevents/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.digital.letter.read.v1.schema.md`](../../docs/cloudevents/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.digital.letter.read.v1.schema.md) | +| **uk.nhs.notify.digital.letters.queue.digital.letter.unsuccessful.v1** | [`src/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.digital.letter.unsuccessful.v1.schema.yaml`](src/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.digital.letter.unsuccessful.v1.schema.yaml) | [`schemas/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.digital.letter.unsuccessful.v1.schema.json`](schemas/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.digital.letter.unsuccessful.v1.schema.json) | [`../../docs/cloudevents/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.digital.letter.unsuccessful.v1.schema.md`](../../docs/cloudevents/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.digital.letter.unsuccessful.v1.schema.md) | | **uk.nhs.notify.digital.letters.queue.item.dequeued.v1** | [`src/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.item.dequeued.v1.schema.yaml`](src/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.item.dequeued.v1.schema.yaml) | [`schemas/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.item.dequeued.v1.schema.json`](schemas/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.item.dequeued.v1.schema.json) | [`../../docs/cloudevents/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.item.dequeued.v1.schema.md`](../../docs/cloudevents/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.item.dequeued.v1.schema.md) | | **uk.nhs.notify.digital.letters.queue.item.enqueued.v1** | [`src/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.item.enqueued.v1.schema.yaml`](src/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.item.enqueued.v1.schema.yaml) | [`schemas/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.item.enqueued.v1.schema.json`](schemas/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.item.enqueued.v1.schema.json) | [`../../docs/cloudevents/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.item.enqueued.v1.schema.md`](../../docs/cloudevents/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.item.enqueued.v1.schema.md) | | **uk.nhs.notify.digital.letters.reporting.generate.report.v1** | [`src/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.generate.report.v1.schema.yaml`](src/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.generate.report.v1.schema.yaml) | [`schemas/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.generate.report.v1.schema.json`](schemas/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.generate.report.v1.schema.json) | [`../../docs/cloudevents/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.generate.report.v1.schema.md`](../../docs/cloudevents/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.generate.report.v1.schema.md) | | **uk.nhs.notify.digital.letters.reporting.report.generated.v1** | [`src/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.report.generated.v1.schema.yaml`](src/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.report.generated.v1.schema.yaml) | [`schemas/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.report.generated.v1.schema.json`](schemas/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.report.generated.v1.schema.json) | [`../../docs/cloudevents/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.report.generated.v1.schema.md`](../../docs/cloudevents/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.report.generated.v1.schema.md) | | **uk.nhs.notify.digital.letters.reporting.report.sent.v1** | [`src/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.report.sent.v1.schema.yaml`](src/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.report.sent.v1.schema.yaml) | [`schemas/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.report.sent.v1.schema.json`](schemas/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.report.sent.v1.schema.json) | [`../../docs/cloudevents/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.report.sent.v1.schema.md`](../../docs/cloudevents/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.report.sent.v1.schema.md) | | **Nhs Notify Document Reference** | [`src/digital-letters/2025-10-draft/nhs-notify-document-reference.schema.yaml`](src/digital-letters/2025-10-draft/nhs-notify-document-reference.schema.yaml) | [`schemas/digital-letters/2025-10-draft/nhs-notify-document-reference.schema.json`](schemas/digital-letters/2025-10-draft/nhs-notify-document-reference.schema.json) | [`../../docs/cloudevents/digital-letters/2025-10-draft/nhs-notify-document-reference.schema.md`](../../docs/cloudevents/digital-letters/2025-10-draft/nhs-notify-document-reference.schema.md) | -| **Profile** | [`src/digital-letters/2025-10-draft/supplierapi-profile.schema.yaml`](src/digital-letters/2025-10-draft/supplierapi-profile.schema.yaml) | [`schemas/digital-letters/2025-10-draft/supplierapi-profile.schema.json`](schemas/digital-letters/2025-10-draft/supplierapi-profile.schema.json) | [`../../docs/cloudevents/digital-letters/2025-10-draft/supplierapi-profile.schema.md`](../../docs/cloudevents/digital-letters/2025-10-draft/supplierapi-profile.schema.md) | #### Example Events @@ -202,6 +203,7 @@ _No common schemas defined yet._ | **Uk.nhs.notify.digital.letters.print.letter.transitioned.v1** | [`../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.print.letter.transitioned.v1-event.json`](../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.print.letter.transitioned.v1-event.json) | [`../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.print.letter.transitioned.v1-event.md`](../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.print.letter.transitioned.v1-event.md) | | **Uk.nhs.notify.digital.letters.print.pdf.analysed.v1** | [`../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.print.pdf.analysed.v1-event.json`](../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.print.pdf.analysed.v1-event.json) | [`../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.print.pdf.analysed.v1-event.md`](../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.print.pdf.analysed.v1-event.md) | | **Uk.nhs.notify.digital.letters.queue.digital.letter.read.v1** | [`../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.digital.letter.read.v1-event.json`](../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.digital.letter.read.v1-event.json) | [`../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.digital.letter.read.v1-event.md`](../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.digital.letter.read.v1-event.md) | +| **Uk.nhs.notify.digital.letters.queue.digital.letter.unsuccessful.v1** | [`../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.digital.letter.unsuccessful.v1-event.json`](../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.digital.letter.unsuccessful.v1-event.json) | [`../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.digital.letter.unsuccessful.v1-event.md`](../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.digital.letter.unsuccessful.v1-event.md) | | **Uk.nhs.notify.digital.letters.queue.item.dequeued.v1** | [`../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.item.dequeued.v1-event.json`](../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.item.dequeued.v1-event.json) | [`../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.item.dequeued.v1-event.md`](../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.item.dequeued.v1-event.md) | | **Uk.nhs.notify.digital.letters.queue.item.enqueued.v1** | [`../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.item.enqueued.v1-event.json`](../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.item.enqueued.v1-event.json) | [`../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.item.enqueued.v1-event.md`](../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.item.enqueued.v1-event.md) | | **Uk.nhs.notify.digital.letters.reporting.generate.report.v1** | [`../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.reporting.generate.report.v1-event.json`](../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.reporting.generate.report.v1-event.json) | [`../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.reporting.generate.report.v1-event.md`](../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.reporting.generate.report.v1-event.md) | diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/data/digital-letters-queue-digital-letter-unsuccessful-data.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/data/digital-letters-queue-digital-letter-unsuccessful-data.schema.yaml index d8e30a06c..525b6349e 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/data/digital-letters-queue-digital-letter-unsuccessful-data.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/data/digital-letters-queue-digital-letter-unsuccessful-data.schema.yaml @@ -8,12 +8,12 @@ properties: $ref: ../defs/requests.schema.yaml#/properties/messageReference senderId: $ref: ../defs/requests.schema.yaml#/properties/senderId - failureCode: - $ref: ../defs/core.schema.yaml#/properties/failureCode - failureReason: - $ref: ../defs/core.schema.yaml#/properties/failureReason + reasonCode: + $ref: ../defs/print.schema.yaml#/properties/reasonCode + reasonText: + $ref: ../defs/print.schema.yaml#/properties/reasonText required: - messageReference - senderId - - failureCode - - failureReason + - reasonCode + - reasonText diff --git a/src/cloudevents/readme-index.yaml b/src/cloudevents/readme-index.yaml index 4643324c0..dca43983e 100644 --- a/src/cloudevents/readme-index.yaml +++ b/src/cloudevents/readme-index.yaml @@ -3,7 +3,7 @@ # To regenerate, run: make update-readme # To customize labels and purposes, edit: readme-metadata.yaml -generated: '2026-04-09T13:48:22.150Z' +generated: '2026-05-11T09:16:35.071Z' common: null domains: - name: digital-letters @@ -112,6 +112,11 @@ domains: source: src/digital-letters/2025-10-draft/data/digital-letters-queue-digital-letter-read-data.schema.yaml published: schemas/digital-letters/2025-10-draft/data/digital-letters-queue-digital-letter-read-data.schema.json docs: ../../docs/cloudevents/digital-letters/2025-10-draft/data/digital-letters-queue-digital-letter-read-data.schema.md + - type: Digital Letters Queue Digital Letter Unsuccessful Data + category: data + source: src/digital-letters/2025-10-draft/data/digital-letters-queue-digital-letter-unsuccessful-data.schema.yaml + published: schemas/digital-letters/2025-10-draft/data/digital-letters-queue-digital-letter-unsuccessful-data.schema.json + docs: ../../docs/cloudevents/digital-letters/2025-10-draft/data/digital-letters-queue-digital-letter-unsuccessful-data.schema.md - type: Digital Letters Queue Item Dequeued Data category: data source: src/digital-letters/2025-10-draft/data/digital-letters-queue-item-dequeued-data.schema.yaml @@ -327,6 +332,11 @@ domains: source: src/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.digital.letter.read.v1.schema.yaml published: schemas/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.digital.letter.read.v1.schema.json docs: ../../docs/cloudevents/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.digital.letter.read.v1.schema.md + - type: uk.nhs.notify.digital.letters.queue.digital.letter.unsuccessful.v1 + category: events + source: src/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.digital.letter.unsuccessful.v1.schema.yaml + published: schemas/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.digital.letter.unsuccessful.v1.schema.json + docs: ../../docs/cloudevents/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.digital.letter.unsuccessful.v1.schema.md - type: uk.nhs.notify.digital.letters.queue.item.dequeued.v1 category: events source: src/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.item.dequeued.v1.schema.yaml @@ -357,11 +367,6 @@ domains: source: src/digital-letters/2025-10-draft/nhs-notify-document-reference.schema.yaml published: schemas/digital-letters/2025-10-draft/nhs-notify-document-reference.schema.json docs: ../../docs/cloudevents/digital-letters/2025-10-draft/nhs-notify-document-reference.schema.md - - type: Profile - category: profile - source: src/digital-letters/2025-10-draft/supplierapi-profile.schema.yaml - published: schemas/digital-letters/2025-10-draft/supplierapi-profile.schema.json - docs: ../../docs/cloudevents/digital-letters/2025-10-draft/supplierapi-profile.schema.md exampleEvents: - name: Uk.nhs.notify.digital.letters.letter.available.v1 filename: uk.nhs.notify.digital.letters.letter.available.v1-event @@ -439,6 +444,10 @@ domains: filename: uk.nhs.notify.digital.letters.queue.digital.letter.read.v1-event json: ../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.digital.letter.read.v1-event.json markdown: ../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.digital.letter.read.v1-event.md + - name: Uk.nhs.notify.digital.letters.queue.digital.letter.unsuccessful.v1 + filename: uk.nhs.notify.digital.letters.queue.digital.letter.unsuccessful.v1-event + json: ../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.digital.letter.unsuccessful.v1-event.json + markdown: ../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.digital.letter.unsuccessful.v1-event.md - name: Uk.nhs.notify.digital.letters.queue.item.dequeued.v1 filename: uk.nhs.notify.digital.letters.queue.item.dequeued.v1-event json: ../../docs/cloudevents/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.item.dequeued.v1-event.json From 3d35b0333ff17a35d1a00540e5c2232d108141b8 Mon Sep 17 00:00:00 2001 From: Angel Pastor Date: Fri, 8 May 2026 15:35:46 +0100 Subject: [PATCH 2/5] CCM-17641: Handle the event DigitalLetterUnsuccessful in the reports for trusts --- .../dl/scripts/sql/reports/daily_report.sql | 8 +++++-- .../report-generator.component.spec.ts | 18 +++++++++++++++ tests/playwright/helpers/event-builders.ts | 23 +++++++++++++++++++ tests/playwright/helpers/report-helpers.ts | 18 +++++++++++++++ 4 files changed, 65 insertions(+), 2 deletions(-) diff --git a/infrastructure/terraform/components/dl/scripts/sql/reports/daily_report.sql b/infrastructure/terraform/components/dl/scripts/sql/reports/daily_report.sql index d9ccb57de..b0ea46845 100644 --- a/infrastructure/terraform/components/dl/scripts/sql/reports/daily_report.sql +++ b/infrastructure/terraform/components/dl/scripts/sql/reports/daily_report.sql @@ -10,7 +10,8 @@ WITH vars AS ( OR e.type LIKE '%.queue.digital.letter.read.%' OR e.type LIKE '%.pdm.resource.submission.rejected.%' OR e.type LIKE '%.pdm.resource.retries.exceeded.%' - OR e.type LIKE '%.messages.request.rejected.%' THEN 'Digital' + OR e.type LIKE '%.messages.request.rejected.%' + OR e.type LIKE '%.queue.digital.letter.unsuccessful.%' THEN 'Digital' WHEN e.type LIKE '%.print.letter.transitioned.%' OR e.type LIKE '%.print.file.quarantined.%' OR e.type LIKE '%.print.invalid.attachment.received.%' THEN 'Print' ELSE NULL @@ -23,6 +24,7 @@ WITH vars AS ( WHEN e.type LIKE '%.messages.request.rejected.%' THEN 'Failed' WHEN e.type LIKE '%.print.file.quarantined.%' THEN 'Failed' WHEN e.type LIKE '%.print.invalid.attachment.received.%' THEN 'Failed' + WHEN e.type LIKE '%.queue.digital.letter.unsuccessful.%' THEN 'Failed' WHEN e.letterstatus = 'RETURNED' THEN 'Returned' WHEN e.letterstatus = 'FAILED' THEN 'Failed' WHEN e.letterstatus = 'DELIVERED' THEN 'Delivered' @@ -30,7 +32,9 @@ WITH vars AS ( END as status, e.reasoncode, COALESCE( - CASE WHEN e.type LIKE '%.messages.request.rejected.%' THEN e.reasontext END, + CASE + WHEN e.type LIKE '%.messages.request.rejected.%' + OR e.type LIKE '%.queue.digital.letter.unsuccessful.%' THEN e.reasontext END, fcl.description, e.reasontext, e.reasoncode diff --git a/tests/playwright/digital-letters-component-tests/report-generator.component.spec.ts b/tests/playwright/digital-letters-component-tests/report-generator.component.spec.ts index b58753e25..ab35f89c7 100644 --- a/tests/playwright/digital-letters-component-tests/report-generator.component.spec.ts +++ b/tests/playwright/digital-letters-component-tests/report-generator.component.spec.ts @@ -36,6 +36,24 @@ const scenarios = [ 'Unread', senderId, ), + new ReportScenario( + 'component-test-digitalLetterUnsuccessful', + CommunicationType.Digital, + [EventStatus.DigitalLetterNhsAppUnsuccessful], + 'Failed', + senderId, + 'DL_INTE_001', + 'Failed enrichment', + ), + new ReportScenario( + 'component-test-itemDequeued-digitalLetterUnsuccessful', + CommunicationType.Digital, + [EventStatus.Unread, EventStatus.DigitalLetterNhsAppUnsuccessful], + 'Failed', + senderId, + 'DL_INTE_001', + 'Failed enrichment', + ), new ReportScenario( 'component-test-itemDequeued-digitalLetterRead', CommunicationType.Digital, diff --git a/tests/playwright/helpers/event-builders.ts b/tests/playwright/helpers/event-builders.ts index f407e0c5c..db33521d0 100644 --- a/tests/playwright/helpers/event-builders.ts +++ b/tests/playwright/helpers/event-builders.ts @@ -1,5 +1,6 @@ import { DigitalLetterRead, + DigitalLetterUnsuccessful, FileQuarantined, InvalidAttachmentReceived, ItemDequeued, @@ -163,6 +164,28 @@ export function buildMessageRequestRejectedEvent( } as MessageRequestRejected; } +export function buildDigitalLetterUnsuccessfulEvent( + eventId: string, + time: string, + messageReference: string, + senderId: string, +): DigitalLetterUnsuccessful { + const baseEvent = buildBaseEvent('queue', time); + return { + ...baseEvent, + id: eventId, + type: 'uk.nhs.notify.digital.letters.queue.digital.letter.unsuccessful.v1', + dataschema: + 'https://notify.nhs.uk/cloudevents/schemas/digital-letters/2025-10-draft/data/digital-letters-queue-digital-letter-unsuccessful-data.schema.json', + data: { + messageReference, + senderId, + reasonCode: 'DL_INTE_001', + reasonText: 'Failed enrichment', + }, + } as DigitalLetterUnsuccessful; +} + export function buildFileQuarantinedEvent( eventId: string, time: string, diff --git a/tests/playwright/helpers/report-helpers.ts b/tests/playwright/helpers/report-helpers.ts index 544eb1aa9..721c85e89 100644 --- a/tests/playwright/helpers/report-helpers.ts +++ b/tests/playwright/helpers/report-helpers.ts @@ -11,6 +11,7 @@ import { v4 as uuidv4 } from 'uuid'; import { DigitalLetterRead, + DigitalLetterUnsuccessful, FileQuarantined, GenerateReport, InvalidAttachmentReceived, @@ -21,6 +22,7 @@ import { PDMResourceSubmissionRejected, PrintLetterTransitioned, validateDigitalLetterRead, + validateDigitalLetterUnsuccessful, validateFileQuarantined, validateGenerateReport, validateInvalidAttachmentReceived, @@ -41,6 +43,7 @@ import eventPublisher from 'helpers/event-bus-helpers'; import expectToPassEventually from 'helpers/expectations'; import { buildDigitalLetterReadEvent, + buildDigitalLetterUnsuccessfulEvent, buildFileQuarantinedEvent, buildInvalidAttachmentReceivedEvent, buildItemDequeuedEvent, @@ -72,6 +75,7 @@ export enum EventStatus { DigitalMessageRequestRejected = 'MessageRequestRejected', PrintFileQuarantined = 'FileQuarantined', PrintInvalidAttachmentReceived = 'InvalidAttachmentReceived', + DigitalLetterNhsAppUnsuccessful = 'DigitalLetterNhsAppUnsuccessful', } /** * Utility class to proof the SQL logic to determine which status should be reported for a given message reference, @@ -207,6 +211,20 @@ export function publishEventForScenario(scenario: ReportScenario) { ); break; } + case EventStatus.DigitalLetterNhsAppUnsuccessful: { + eventPublisher.sendEvents( + [ + buildDigitalLetterUnsuccessfulEvent( + uuidv4(), + scenario.time, + scenario.messageReference, + scenario.senderId, + ), + ], + validateDigitalLetterUnsuccessful, + ); + break; + } default: } break; From e450b8dd86d23a020346c5efc553a138b195e41b Mon Sep 17 00:00:00 2001 From: Angel Pastor Date: Tue, 12 May 2026 14:24:54 +0100 Subject: [PATCH 3/5] version update --- .github/workflows/stage-3-build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stage-3-build.yaml b/.github/workflows/stage-3-build.yaml index c83d9c4e7..bb174ce29 100644 --- a/.github/workflows/stage-3-build.yaml +++ b/.github/workflows/stage-3-build.yaml @@ -75,6 +75,6 @@ jobs: - name: "Checkout code" uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 - name: "Build docs" - uses: NHSDigital/nhs-notify-shared-modules/.github/actions/build-docs@3.0.0 + uses: NHSDigital/nhs-notify-shared-modules/.github/actions/build-docs@3.1.6 with: version: "${{ inputs.version }}" From 146b50b07be843a535b40d199650543fed9d11e2 Mon Sep 17 00:00:00 2001 From: Angel Pastor Date: Wed, 13 May 2026 09:50:23 +0100 Subject: [PATCH 4/5] fix for sharding --- .github/actions/acceptance-tests/action.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/actions/acceptance-tests/action.yaml b/.github/actions/acceptance-tests/action.yaml index d6735f77a..e063dab6b 100644 --- a/.github/actions/acceptance-tests/action.yaml +++ b/.github/actions/acceptance-tests/action.yaml @@ -77,9 +77,16 @@ runs: TEST_TYPE: ${{ inputs.testType }} ENVIRONMENT: ${{ inputs.targetEnvironment }} PLAYWRIGHT_SHARD: ${{ inputs.shard }} + - name: Sanitise shard for artifact name + id: shard_label + if: ${{ inputs.testType == 'integration' && inputs.shard != '' }} + shell: bash + run: echo "value=${SHARD//\// of }" >> $GITHUB_OUTPUT + env: + SHARD: ${{ inputs.shard }} - name: Archive integration test results if: ${{ inputs.testType == 'integration' }} uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6 with: - name: Integration test report + name: Integration test report${{ inputs.shard != '' && format(' ({0})', steps.shard_label.outputs.value) || '' }} path: "tests/playwright/playwright-report" From b1a99c8d8fc18730b1873b33e477950e3b357b9c Mon Sep 17 00:00:00 2001 From: Angel Pastor Date: Wed, 13 May 2026 15:57:13 +0100 Subject: [PATCH 5/5] Fix for The provider schema package (@nhsdigital/nhs-notify-event-schemas-status-published) is outdated --- package-lock.json | 10 +++++----- scripts/package.json | 2 +- tests/pact-tests/package.json | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index e08f8d92d..3f689a5db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9839,9 +9839,9 @@ } }, "node_modules/@nhsdigital/nhs-notify-event-schemas-status-published": { - "version": "1.0.1", - "resolved": "https://npm.pkg.github.com/download/@nhsdigital/nhs-notify-event-schemas-status-published/1.0.1/1a813f0cb6281d0e0b94faa8591d654ef693e946", - "integrity": "sha512-zBeZ3L/p5faz24UuU6yxoQor1U2TObSnyemZ8iTQpFCMPx0YzUSJ4FztCOwKXXePKadAH5YmV+6ChyB7Qe7vUg==", + "version": "1.0.2", + "resolved": "https://npm.pkg.github.com/download/@nhsdigital/nhs-notify-event-schemas-status-published/1.0.2/e652e2c14b9f748ded5569176b5ad1092633201e", + "integrity": "sha512-E0UH9iX0nwZwowNe6u3pNcycmP0IfoKm1FA1N1kmONXXExeZ1nV6L2nP7FnwRjYlHcNegvmi8bCj17RufsRQCg==", "license": "MIT", "dependencies": { "zod": "^4.0.17" @@ -26508,7 +26508,7 @@ "version": "0.0.1", "dependencies": { "@aws-sdk/client-eventbridge": "^3.914.0", - "@nhsdigital/nhs-notify-event-schemas-status-published": "^1.0.1", + "@nhsdigital/nhs-notify-event-schemas-status-published": "^1.0.2", "@nhsdigital/nhs-notify-event-schemas-supplier-api": "^1.0.18", "csv-parse": "^6.1.0", "tsx": "^4.20.6", @@ -27529,7 +27529,7 @@ "name": "nhs-notify-digital-letters-pact-tests", "version": "0.0.1", "devDependencies": { - "@nhsdigital/nhs-notify-event-schemas-status-published": "^1.0.1", + "@nhsdigital/nhs-notify-event-schemas-status-published": "^1.0.2", "@nhsdigital/nhs-notify-event-schemas-supplier-api": "^1.0.18", "@pact-foundation/pact": "^16.3.0", "@types/jest": "^29.5.14", diff --git a/scripts/package.json b/scripts/package.json index cfd38d34a..4101d3061 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -1,7 +1,7 @@ { "dependencies": { "@aws-sdk/client-eventbridge": "^3.914.0", - "@nhsdigital/nhs-notify-event-schemas-status-published": "^1.0.1", + "@nhsdigital/nhs-notify-event-schemas-status-published": "^1.0.2", "@nhsdigital/nhs-notify-event-schemas-supplier-api": "^1.0.18", "csv-parse": "^6.1.0", "tsx": "^4.20.6", diff --git a/tests/pact-tests/package.json b/tests/pact-tests/package.json index 02bf54c41..154bce361 100644 --- a/tests/pact-tests/package.json +++ b/tests/pact-tests/package.json @@ -1,6 +1,6 @@ { "devDependencies": { - "@nhsdigital/nhs-notify-event-schemas-status-published": "^1.0.1", + "@nhsdigital/nhs-notify-event-schemas-status-published": "^1.0.2", "@nhsdigital/nhs-notify-event-schemas-supplier-api": "^1.0.18", "@pact-foundation/pact": "^16.3.0", "@types/jest": "^29.5.14",