diff --git a/lambdas/core-notifier-lambda/src/__tests__/constants.ts b/lambdas/core-notifier-lambda/src/__tests__/constants.ts index e81c888a0..c4edd3cca 100644 --- a/lambdas/core-notifier-lambda/src/__tests__/constants.ts +++ b/lambdas/core-notifier-lambda/src/__tests__/constants.ts @@ -60,8 +60,8 @@ export const mockResponse: SingleMessageResponse = { export const validPdmEvent: PDMResourceAvailable = { id: 'event-id-123', - source: - '/nhs/england/notify/development/dev-12345/data-plane/digitalletters/pdm', + plane: 'data', + source: '/nhs/england/notify/development/dev-12345/digitalletters/pdm', specversion: '1.0', type: 'uk.nhs.notify.digital.letters.pdm.resource.available.v1', time: '2025-12-15T10:00:00Z', diff --git a/lambdas/file-scanner-lambda/src/__tests__/apis/sqs-handler.test.ts b/lambdas/file-scanner-lambda/src/__tests__/apis/sqs-handler.test.ts index 0f961678e..4c7e22c9c 100644 --- a/lambdas/file-scanner-lambda/src/__tests__/apis/sqs-handler.test.ts +++ b/lambdas/file-scanner-lambda/src/__tests__/apis/sqs-handler.test.ts @@ -42,8 +42,8 @@ const createValidItemDequeuedBody = ( detail: { specversion: '1.0', id: `event-${messageReference}`, - source: - '/nhs/england/notify/development/primary/data-plane/digitalletters/queue', + plane: 'data', + source: '/nhs/england/notify/development/primary/digitalletters/queue', subject: `message/${messageReference}`, type: 'uk.nhs.notify.digital.letters.queue.item.dequeued.v1', time: '2026-01-19T12:00:00Z', @@ -319,7 +319,7 @@ describe('SQS Handler', () => { specversion: '1.0', id: 'event-001', source: - '/nhs/england/notify/development/primary/data-plane/digitalletters/queue', + '/nhs/england/notify/development/primary/digitalletters/queue', type: 'uk.nhs.notify.wrong.event.type.v1', time: '2026-01-19T12:00:00Z', data: { @@ -386,7 +386,7 @@ describe('SQS Handler', () => { specversion: '1.0', id: 'event-001', source: - '/nhs/england/notify/development/primary/data-plane/digitalletters/queue', + '/nhs/england/notify/development/primary/digitalletters/queue', type: 'uk.nhs.notify.digital.letters.queue.item.dequeued.v1', time: '2026-01-19T12:00:00Z', data: { diff --git a/lambdas/mesh-acknowledge/mesh_acknowledge/__tests__/fixtures.py b/lambdas/mesh-acknowledge/mesh_acknowledge/__tests__/fixtures.py index c21eb130f..96e7d10b0 100644 --- a/lambdas/mesh-acknowledge/mesh_acknowledge/__tests__/fixtures.py +++ b/lambdas/mesh-acknowledge/mesh_acknowledge/__tests__/fixtures.py @@ -9,7 +9,7 @@ def create_downloaded_event_dict(event_id: str) -> Dict[str, str | int | Dict[st "specversion": "1.0", "source": ( "/nhs/england/notify/production/primary/" - 'data-plane/digitalletters/mesh' + 'digitalletters/mesh' ), "subject": ( 'customer/920fca11-596a-4eca-9c47-99f624614658/' diff --git a/lambdas/mesh-acknowledge/mesh_acknowledge/__tests__/test_events.py b/lambdas/mesh-acknowledge/mesh_acknowledge/__tests__/test_events.py index cbfa2de87..ec1d50101 100644 --- a/lambdas/mesh-acknowledge/mesh_acknowledge/__tests__/test_events.py +++ b/lambdas/mesh-acknowledge/mesh_acknowledge/__tests__/test_events.py @@ -66,7 +66,7 @@ def create_invalid_sqs_record(event_id: str) -> Dict[str, str]: 'detail': { 'id': event_id, 'specversion': '1.0', - 'source': '/nhs/england/notify/production/primary/data-plane/digitalletters/mesh', + 'source': '/nhs/england/notify/production/primary/digitalletters/mesh', 'subject': ( 'customer/920fca11-596a-4eca-9c47-99f624614658/recipient/' '769acdd4-6a47-496f-999f-76a6fd2c3959' diff --git a/lambdas/mesh-download/mesh_download/__tests__/test_processor.py b/lambdas/mesh-download/mesh_download/__tests__/test_processor.py index ecfc997be..b7ff2089f 100644 --- a/lambdas/mesh-download/mesh_download/__tests__/test_processor.py +++ b/lambdas/mesh-download/mesh_download/__tests__/test_processor.py @@ -38,7 +38,7 @@ def create_valid_cloud_event(): return { 'id': str(uuid4()), 'specversion': '1.0', - 'source': '/nhs/england/notify/development/primary/data-plane/digitalletters/mesh', + 'source': '/nhs/england/notify/development/primary/digitalletters/mesh', 'subject': 'customer/00000000-0000-0000-0000-000000000000/recipient/00000000-0000-0000-0000-000000000000', 'type': 'uk.nhs.notify.digital.letters.mesh.inbox.message.received.v1', 'time': '2023-01-01T12:00:00Z', @@ -159,7 +159,7 @@ def test_process_sqs_message_success(self, mock_datetime): # Verify CloudEvent envelope fields assert published_event['type'] == 'uk.nhs.notify.digital.letters.mesh.inbox.message.downloaded.v1' - assert published_event['source'] == '/nhs/england/notify/development/primary/data-plane/digitalletters/mesh' + assert published_event['source'] == '/nhs/england/notify/development/primary/digitalletters/mesh' assert published_event['subject'] == 'customer/00000000-0000-0000-0000-000000000000/recipient/00000000-0000-0000-0000-000000000000' assert published_event['time'] == '2025-11-19T15:30:45+00:00' assert 'id' in published_event diff --git a/lambdas/mesh-poll/mesh_poll/processor.py b/lambdas/mesh-poll/mesh_poll/processor.py index 79ff65273..ccbf77053 100644 --- a/lambdas/mesh-poll/mesh_poll/processor.py +++ b/lambdas/mesh-poll/mesh_poll/processor.py @@ -30,9 +30,8 @@ def __init__(self, **kwargs): environment = 'development' deployment = 'primary' - plane = 'data-plane' self.__cloud_event_source = ( - f'/nhs/england/notify/{environment}/{deployment}/{plane}/' + f'/nhs/england/notify/{environment}/{deployment}/' 'digitalletters/mesh' ) diff --git a/lambdas/move-scanned-files-lambda/src/__tests__/domain/mapper.test.ts b/lambdas/move-scanned-files-lambda/src/__tests__/domain/mapper.test.ts index 40826e9f6..28cd3be0f 100644 --- a/lambdas/move-scanned-files-lambda/src/__tests__/domain/mapper.test.ts +++ b/lambdas/move-scanned-files-lambda/src/__tests__/domain/mapper.test.ts @@ -43,8 +43,8 @@ describe('mapper', () => { specversion: '1.0', id: 'mocked-uuid-12345', subject: `customer/${senderId}/recipient/${messageReference}`, - source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/print', + source: '/nhs/england/notify/production/primary/digitalletters/print', + plane: 'data', traceparent: '00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01', type: 'uk.nhs.notify.digital.letters.print.file.safe.v1', time: '2024-01-15T10:30:00.000Z', @@ -99,8 +99,8 @@ describe('mapper', () => { specversion: '1.0', id: 'mocked-uuid-12345', subject: `customer/${senderId}/recipient/${messageReference}`, - source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/print', + plane: 'data', + source: '/nhs/england/notify/production/primary/digitalletters/print', traceparent: '00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01', type: 'uk.nhs.notify.digital.letters.print.file.quarantined.v1', time: '2024-01-15T10:30:00.000Z', diff --git a/lambdas/move-scanned-files-lambda/src/domain/mapper.ts b/lambdas/move-scanned-files-lambda/src/domain/mapper.ts index c42208a04..0e9e66527 100644 --- a/lambdas/move-scanned-files-lambda/src/domain/mapper.ts +++ b/lambdas/move-scanned-files-lambda/src/domain/mapper.ts @@ -11,8 +11,8 @@ export function createFileSafeEvent( specversion: '1.0', id: randomUUID(), subject: `customer/${senderId}/recipient/${messageReference}`, - source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/print', // Note CCM-13892. + plane: 'data', + source: '/nhs/england/notify/production/primary/digitalletters/print', // Note CCM-13892. traceparent: '00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01', // Note CCM-14255. type: 'uk.nhs.notify.digital.letters.print.file.safe.v1', time: new Date().toISOString(), @@ -37,8 +37,8 @@ export function createFileQuarantinedEvent( specversion: '1.0', id: randomUUID(), subject: `customer/${senderId}/recipient/${messageReference}`, - source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/print', // Note CCM-13892. + plane: 'data', + source: '/nhs/england/notify/production/primary/digitalletters/print', // Note CCM-13892. traceparent: '00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01', // Note CCM-14255. type: 'uk.nhs.notify.digital.letters.print.file.quarantined.v1', time: new Date().toISOString(), diff --git a/lambdas/pdm-poll-lambda/src/__tests__/test-data.ts b/lambdas/pdm-poll-lambda/src/__tests__/test-data.ts index 72698e3e7..a6631eabc 100644 --- a/lambdas/pdm-poll-lambda/src/__tests__/test-data.ts +++ b/lambdas/pdm-poll-lambda/src/__tests__/test-data.ts @@ -7,10 +7,10 @@ import { const baseEvent = { id: '550e8400-e29b-41d4-a716-446655440001', specversion: '1.0', - source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/pdm', + source: '/nhs/england/notify/production/primary/digitalletters/pdm', subject: 'customer/920fca11-596a-4eca-9c47-99f624614658/recipient/769acdd4-6a47-496f-999f-76a6fd2c3959', + plane: 'data', type: 'uk.nhs.notify.digital.letters.pdm.resource.submitted.v1', time: '2023-06-20T12:00:00Z', recordedtime: '2023-06-20T12:00:00.250Z', diff --git a/lambdas/pdm-uploader-lambda/src/__tests__/data.ts b/lambdas/pdm-uploader-lambda/src/__tests__/data.ts index bc8bef9dc..0e1b41992 100644 --- a/lambdas/pdm-uploader-lambda/src/__tests__/data.ts +++ b/lambdas/pdm-uploader-lambda/src/__tests__/data.ts @@ -3,8 +3,8 @@ import { MESHInboxMessageDownloaded } from 'digital-letters-events'; export const mockEvent: MESHInboxMessageDownloaded = { id: 'a449d419-e683-4ab4-9291-a0451b5cef8e', specversion: '1.0', - source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/mesh', + source: '/nhs/england/notify/production/primary/digitalletters/mesh', + plane: 'data', subject: 'customer/920fca11-596a-4eca-9c47-99f624614658/recipient/769acdd4-6a47-496f-999f-76a6fd2c3959', type: 'uk.nhs.notify.digital.letters.mesh.inbox.message.downloaded.v1', diff --git a/lambdas/print-analyser/src/__tests__/apis/sqs-handler.test.ts b/lambdas/print-analyser/src/__tests__/apis/sqs-handler.test.ts index 800803e40..c90372cc7 100644 --- a/lambdas/print-analyser/src/__tests__/apis/sqs-handler.test.ts +++ b/lambdas/print-analyser/src/__tests__/apis/sqs-handler.test.ts @@ -58,7 +58,7 @@ describe('SQS Handler', () => { 'https://notify.nhs.uk/cloudevents/schemas/digital-letters/2025-10-draft/data/digital-letters-print-pdf-analysed-data.schema.json', type: 'uk.nhs.notify.digital.letters.print.pdf.analysed.v1', source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/print', + '/nhs/england/notify/production/primary/digitalletters/print', data: { senderId: fileSafeEvent.data.senderId, messageReference: fileSafeEvent.data.messageReference, diff --git a/lambdas/print-analyser/src/__tests__/test-data.ts b/lambdas/print-analyser/src/__tests__/test-data.ts index d03caaade..b5a05d363 100644 --- a/lambdas/print-analyser/src/__tests__/test-data.ts +++ b/lambdas/print-analyser/src/__tests__/test-data.ts @@ -6,8 +6,8 @@ import { FileSafe } from 'digital-letters-events'; export const fileSafeEvent: FileSafe = { id: '550e8400-e29b-41d4-a716-446655440001', specversion: '1.0', - source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/print', + source: '/nhs/england/notify/production/primary/digitalletters/print', + plane: 'data', subject: 'letter-origin/digital-letters/letter/f47ac10b-58cc-4372-a567-0e02b2c3d479', type: 'uk.nhs.notify.digital.letters.print.file.safe.v1', diff --git a/lambdas/print-analyser/src/apis/sqs-handler.ts b/lambdas/print-analyser/src/apis/sqs-handler.ts index 5299a2645..c1a06db82 100644 --- a/lambdas/print-analyser/src/apis/sqs-handler.ts +++ b/lambdas/print-analyser/src/apis/sqs-handler.ts @@ -69,8 +69,7 @@ function generateUpdatedEvent(event: FileSafe, pdfInfo: PdfInfo): PDFAnalysed { 'https://notify.nhs.uk/cloudevents/schemas/digital-letters/2025-10-draft/data/digital-letters-print-pdf-analysed-data.schema.json', type: 'uk.nhs.notify.digital.letters.print.pdf.analysed.v1', // NOTE: CCM-13892 Generate event digital letters source property from scratch - source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/print', + source: '/nhs/england/notify/production/primary/digitalletters/print', data: { senderId, messageReference, diff --git a/lambdas/print-sender-lambda/src/__tests__/apis/sqs-trigger-lambda.test.ts b/lambdas/print-sender-lambda/src/__tests__/apis/sqs-trigger-lambda.test.ts index c0d17cd8a..c4a55bad7 100644 --- a/lambdas/print-sender-lambda/src/__tests__/apis/sqs-trigger-lambda.test.ts +++ b/lambdas/print-sender-lambda/src/__tests__/apis/sqs-trigger-lambda.test.ts @@ -28,8 +28,8 @@ const createValidEvent = (overrides = {}): PDFAnalysed => ({ type: 'uk.nhs.notify.digital.letters.print.pdf.analysed.v1', dataschema: 'https://notify.nhs.uk/cloudevents/schemas/digital-letters/2025-10-draft/data/digital-letters-print-pdf-analysed-data.schema.json', - source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/print', + plane: 'data', + source: '/nhs/england/notify/production/primary/digitalletters/print', specversion: '1.0', traceparent: '00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01', severitynumber: 2, diff --git a/lambdas/print-status-handler/src/__tests__/apis/sqs-handler.test.ts b/lambdas/print-status-handler/src/__tests__/apis/sqs-handler.test.ts index bb6df0531..f0e02f45d 100644 --- a/lambdas/print-status-handler/src/__tests__/apis/sqs-handler.test.ts +++ b/lambdas/print-status-handler/src/__tests__/apis/sqs-handler.test.ts @@ -45,7 +45,7 @@ describe('SQS Handler', () => { 'https://notify.nhs.uk/cloudevents/schemas/digital-letters/2025-10-draft/data/digital-letters-print-letter-transitioned-data.schema.json', type: 'uk.nhs.notify.digital.letters.print.letter.transitioned.v1', source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/print', + '/nhs/england/notify/production/primary/digitalletters/print', data: { senderId: acceptedLetterEvent.data.origin.subject.split('/')[1], messageReference: @@ -82,7 +82,7 @@ describe('SQS Handler', () => { 'https://notify.nhs.uk/cloudevents/schemas/digital-letters/2025-10-draft/data/digital-letters-print-letter-transitioned-data.schema.json', type: 'uk.nhs.notify.digital.letters.print.letter.transitioned.v1', source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/print', + '/nhs/england/notify/production/primary/digitalletters/print', data: { senderId: failedLetterEvent.data.origin.subject.split('/')[1], messageReference: diff --git a/lambdas/print-status-handler/src/apis/sqs-handler.ts b/lambdas/print-status-handler/src/apis/sqs-handler.ts index d75d7a678..0600977e6 100644 --- a/lambdas/print-status-handler/src/apis/sqs-handler.ts +++ b/lambdas/print-status-handler/src/apis/sqs-handler.ts @@ -106,8 +106,7 @@ function generateUpdatedEvent(event: LetterEvent): PrintLetterTransitioned { 'https://notify.nhs.uk/cloudevents/schemas/digital-letters/2025-10-draft/data/digital-letters-print-letter-transitioned-data.schema.json', type: 'uk.nhs.notify.digital.letters.print.letter.transitioned.v1', // NOTE: CCM-13892 Generate event digital letters source property from scratch - source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/print', + source: '/nhs/england/notify/production/primary/digitalletters/print', data: { senderId, messageReference, diff --git a/lambdas/report-event-transformer/src/__tests__/test-data.ts b/lambdas/report-event-transformer/src/__tests__/test-data.ts index f017e165b..af2e66fba 100644 --- a/lambdas/report-event-transformer/src/__tests__/test-data.ts +++ b/lambdas/report-event-transformer/src/__tests__/test-data.ts @@ -4,8 +4,7 @@ import { DigitalLettersEvent } from 'types/events'; export const digitalLettersEvent = { id: '550e8400-e29b-41d4-a716-446655440001', specversion: '1.0', - source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/pdm', + source: '/nhs/england/notify/production/primary/digitalletters/pdm', subject: 'customer/920fca11-596a-4eca-9c47-99f624614658/recipient/769acdd4-6a47-496f-999f-76a6fd2c3959', type: 'uk.nhs.notify.digital.letters.pdm.resource.submitted.v1', diff --git a/lambdas/report-generator/src/__tests__/apis/sqs-trigger-lambda.test.ts b/lambdas/report-generator/src/__tests__/apis/sqs-trigger-lambda.test.ts index 7cb243548..5ec84bc4f 100644 --- a/lambdas/report-generator/src/__tests__/apis/sqs-trigger-lambda.test.ts +++ b/lambdas/report-generator/src/__tests__/apis/sqs-trigger-lambda.test.ts @@ -23,7 +23,8 @@ const createMockSQSRecord = ( id: event.id || mockUuid, source: event.source || - '/nhs/england/notify/development/primary/data-plane/digitalletters/reporting', + '/nhs/england/notify/development/primary/digitalletters/reporting', + plane: 'data', specversion: event.specversion || '1.0', type: event.type || diff --git a/lambdas/report-scheduler/src/__tests__/apis/scheduled-event-handler.test.ts b/lambdas/report-scheduler/src/__tests__/apis/scheduled-event-handler.test.ts index fe8cd4fa0..753bad75c 100644 --- a/lambdas/report-scheduler/src/__tests__/apis/scheduled-event-handler.test.ts +++ b/lambdas/report-scheduler/src/__tests__/apis/scheduled-event-handler.test.ts @@ -98,8 +98,9 @@ describe('scheduled-event-handler', () => { expect(event.data.reportDate).toBe('2024-01-14'); expect(event.specversion).toBe('1.0'); expect(event.id).toBeDefined(); + expect(event.plane).toBe('data'); expect(event.source).toBe( - '/nhs/england/notify/production/primary/data-plane/digitalletters/reporting', + '/nhs/england/notify/production/primary/digitalletters/reporting', ); expect(event.subject).toBe('customer/test-sender-123'); expect(event.type).toBe( diff --git a/lambdas/report-scheduler/src/apis/scheduled-event-handler.ts b/lambdas/report-scheduler/src/apis/scheduled-event-handler.ts index 6e85a0dc2..334ee6074 100644 --- a/lambdas/report-scheduler/src/apis/scheduled-event-handler.ts +++ b/lambdas/report-scheduler/src/apis/scheduled-event-handler.ts @@ -27,8 +27,9 @@ export const createHandler = ({ }, specversion: '1.0', id: randomUUID(), + plane: 'data', source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/reporting', // CCM-13892 + '/nhs/england/notify/production/primary/digitalletters/reporting', // CCM-13892 subject: `customer/${sender.senderId}`, type: 'uk.nhs.notify.digital.letters.reporting.generate.report.v1', time: new Date().toISOString(), diff --git a/lambdas/report-sender/report_sender/__tests__/test_report_sender_processor.py b/lambdas/report-sender/report_sender/__tests__/test_report_sender_processor.py index 339f72adb..ccbdbda57 100644 --- a/lambdas/report-sender/report_sender/__tests__/test_report_sender_processor.py +++ b/lambdas/report-sender/report_sender/__tests__/test_report_sender_processor.py @@ -92,7 +92,7 @@ def create_valid_sqs_record(sender_id=SENDER_ID, report_uri=REPORT_URI): 'detail': { 'id': '6f1c2a53-3d54-4a0a-9a0b-0e9ae2d4c111', 'specversion': '1.0', - 'source': '/nhs/england/notify/development/primary/data-plane/digitalletters/reporting', + 'source': '/nhs/england/notify/development/primary/digitalletters/reporting', 'subject': 'customer/920fca11-596a-4eca-9c47-99f624614658', 'type': 'uk.nhs.notify.digital.letters.reporting.report.generated.v1', 'time': '2026-02-03T10:00:00Z', diff --git a/lambdas/report-sender/report_sender/report_sender_processor.py b/lambdas/report-sender/report_sender/report_sender_processor.py index daddf28c2..68204e6c8 100644 --- a/lambdas/report-sender/report_sender/report_sender_processor.py +++ b/lambdas/report-sender/report_sender/report_sender_processor.py @@ -24,8 +24,7 @@ def __init__(self, **kwargs): environment = 'development' deployment = 'primary' - plane = 'data-plane' - self.__cloud_event_source = f'/nhs/england/notify/{environment}/{deployment}/{plane}/digitalletters/reporting' + self.__cloud_event_source = f'/nhs/england/notify/{environment}/{deployment}/digitalletters/reporting' def _parse_and_validate_event(self, sqs_record) -> ReportGenerated: """Extract report generated data from SQS record""" diff --git a/lambdas/ttl-create-lambda/src/__tests__/apis/sqs-trigger-lambda.test.ts b/lambdas/ttl-create-lambda/src/__tests__/apis/sqs-trigger-lambda.test.ts index f31d41cc2..c795001dd 100644 --- a/lambdas/ttl-create-lambda/src/__tests__/apis/sqs-trigger-lambda.test.ts +++ b/lambdas/ttl-create-lambda/src/__tests__/apis/sqs-trigger-lambda.test.ts @@ -26,8 +26,7 @@ describe('createHandler', () => { const itemEnqueuedEvent: ItemEnqueued = { ...messageDownloadedEvent, id: '550e8400-e29b-41d4-a716-446655440001', - source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/queue', + source: '/nhs/england/notify/production/primary/digitalletters/queue', type: 'uk.nhs.notify.digital.letters.queue.item.enqueued.v1', time: '2023-06-20T12:00:00.250Z', recordedtime: '2023-06-20T12:00:00.250Z', diff --git a/lambdas/ttl-create-lambda/src/__tests__/data.ts b/lambdas/ttl-create-lambda/src/__tests__/data.ts index b0c36fa18..5ebc7c47f 100644 --- a/lambdas/ttl-create-lambda/src/__tests__/data.ts +++ b/lambdas/ttl-create-lambda/src/__tests__/data.ts @@ -3,10 +3,10 @@ import { MESHInboxMessageDownloaded } from 'digital-letters-events'; export const messageDownloadedEvent: MESHInboxMessageDownloaded = { id: '550e8400-e29b-41d4-a716-446655440001', specversion: '1.0', - source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/mesh', + source: '/nhs/england/notify/production/primary/digitalletters/mesh', subject: 'customer/920fca11-596a-4eca-9c47-99f624614658/recipient/769acdd4-6a47-496f-999f-76a6fd2c3959', + plane: 'data', type: 'uk.nhs.notify.digital.letters.mesh.inbox.message.downloaded.v1', time: '2023-06-20T12:00:00Z', recordedtime: '2023-06-20T12:00:00.250Z', diff --git a/lambdas/ttl-handle-expiry-lambda/src/__tests__/apis/dynamodb-stream-handler.test.ts b/lambdas/ttl-handle-expiry-lambda/src/__tests__/apis/dynamodb-stream-handler.test.ts index ef3bee90b..b0b033f4a 100644 --- a/lambdas/ttl-handle-expiry-lambda/src/__tests__/apis/dynamodb-stream-handler.test.ts +++ b/lambdas/ttl-handle-expiry-lambda/src/__tests__/apis/dynamodb-stream-handler.test.ts @@ -33,11 +33,12 @@ const mockEvent: DynamoDBStreamEvent = { id: { S: '550e8400-e29b-41d4-a716-446655440001' }, specversion: { S: '1.0' }, source: { - S: '/nhs/england/notify/production/primary/data-plane/digitalletters/mesh', + S: '/nhs/england/notify/production/primary/digitalletters/mesh', }, subject: { S: 'customer/920fca11-596a-4eca-9c47-99f624614658/recipient/769acdd4-6a47-496f-999f-76a6fd2c3959', }, + plane: { S: 'data' }, type: { S: 'uk.nhs.notify.digital.letters.mesh.inbox.message.downloaded.v1', }, @@ -108,8 +109,7 @@ describe('createHandler', () => { [ expect.objectContaining({ specversion: '1.0', - source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/queue', + source: '/nhs/england/notify/production/primary/digitalletters/queue', subject: 'customer/920fca11-596a-4eca-9c47-99f624614658/recipient/769acdd4-6a47-496f-999f-76a6fd2c3959', type: 'uk.nhs.notify.digital.letters.queue.item.dequeued.v1', diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-event-bus-profile.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-event-bus-profile.schema.yaml index 94d77a7f7..c59f54cb0 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-event-bus-profile.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-event-bus-profile.schema.yaml @@ -14,6 +14,6 @@ properties: pattern: ^uk\.nhs\.notify\.digital\.letters\.eventbus\.[a-z0-9]+(?:\.[a-z0-9]+)*\.v[0-9]+$ source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/(data-plane|control-plane)/digitalletters/eventbus + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/eventbus minLength: 40 format: uri-reference diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-fhir-profile.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-fhir-profile.schema.yaml index dc0000d3e..ccb4cd715 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-fhir-profile.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-fhir-profile.schema.yaml @@ -14,6 +14,6 @@ properties: pattern: ^uk\.nhs\.notify\.digital\.letters\.fhir\.[a-z0-9]+(?:\.[a-z0-9]+)*\.v[0-9]+$ source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/(data-plane|control-plane)/digitalletters/fhir + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/fhir minLength: 40 format: uri-reference diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-letter-profile.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-letter-profile.schema.yaml index 8b6471279..b23440751 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-letter-profile.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-letter-profile.schema.yaml @@ -14,6 +14,6 @@ properties: pattern: ^uk\.nhs\.notify\.digital\.letters\.letter\.[a-z0-9]+(?:\.[a-z0-9]+)*\.v[0-9]+$ source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/(data-plane|control-plane)/digitalletters/letter + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/letter minLength: 40 format: uri-reference diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-mesh-profile.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-mesh-profile.schema.yaml index e778f4aba..18e33d731 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-mesh-profile.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-mesh-profile.schema.yaml @@ -14,6 +14,6 @@ properties: pattern: ^uk\.nhs\.notify\.digital\.letters\.mesh\.[a-z0-9]+(?:\.[a-z0-9]+)*\.v[0-9]+$ source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/(data-plane|control-plane)/digitalletters/mesh + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/mesh minLength: 40 format: uri-reference diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-messages-profile.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-messages-profile.schema.yaml index 694f3b694..03751d157 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-messages-profile.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-messages-profile.schema.yaml @@ -14,6 +14,6 @@ properties: pattern: ^uk\.nhs\.notify\.digital\.letters\.messages\.[a-z0-9]+(?:\.[a-z0-9]+)*\.v[0-9]+$ source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/(data-plane|control-plane)/digitalletters/messages + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/messages minLength: 40 format: uri-reference diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-pdm-profile.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-pdm-profile.schema.yaml index e3ad7e1a5..09405d0c3 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-pdm-profile.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-pdm-profile.schema.yaml @@ -14,6 +14,6 @@ properties: pattern: ^uk\.nhs\.notify\.digital\.letters\.pdm\.[a-z0-9]+(?:\.[a-z0-9]+)*\.v[0-9]+$ source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/(data-plane|control-plane)/digitalletters/pdm + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/pdm minLength: 40 format: uri-reference diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-print-profile.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-print-profile.schema.yaml index 2023a9bc0..972775549 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-print-profile.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-print-profile.schema.yaml @@ -14,6 +14,6 @@ properties: pattern: ^uk\.nhs\.notify\.digital\.letters\.print\.[a-z0-9]+(?:\.[a-z0-9]+)*\.v[0-9]+$ source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/(data-plane|control-plane)/digitalletters/print + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/print minLength: 40 format: uri-reference diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-profile.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-profile.schema.yaml index b4a26e68c..a2aaab67d 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-profile.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-profile.schema.yaml @@ -14,6 +14,10 @@ properties: pattern: ^uk\.nhs\.notify\.digital\.letters\.[a-z0-9]+(?:\.[a-z0-9]+)*\.v[0-9]+$ source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/(data-plane|control-plane)/digitalletters + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters minLength: 40 format: uri-reference + plane: + type: string + description: "The plane on which the event is emitted." + const: "data" diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-queue-profile.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-queue-profile.schema.yaml index 430c44d2e..e5c9c94ad 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-queue-profile.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-queue-profile.schema.yaml @@ -14,6 +14,6 @@ properties: pattern: ^uk\.nhs\.notify\.digital\.letters\.queue\.[a-z0-9]+(?:\.[a-z0-9]+)*\.v[0-9]+$ source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/(data-plane|control-plane)/digitalletters/queue + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/queue minLength: 40 format: uri-reference diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-reporting-profile.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-reporting-profile.schema.yaml index d3dc20767..53d6995d0 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-reporting-profile.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-reporting-profile.schema.yaml @@ -14,6 +14,6 @@ properties: pattern: ^uk\.nhs\.notify\.digital\.letters\.reporting\.[a-z0-9]+(?:\.[a-z0-9]+)*\.v[0-9]+$ source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/(data-plane|control-plane)/digitalletters/reporting + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/reporting minLength: 40 format: uri-reference diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-viewer-profile.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-viewer-profile.schema.yaml index d77365de1..5b38a0b9b 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-viewer-profile.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/digital-letters-viewer-profile.schema.yaml @@ -14,6 +14,6 @@ properties: pattern: ^uk\.nhs\.notify\.digital\.letters\.viewer\.[a-z0-9]+(?:\.[a-z0-9]+)*\.v[0-9]+$ source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/(data-plane|control-plane)/digitalletters/viewer + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/viewer minLength: 40 format: uri-reference diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.letter.available.v1.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.letter.available.v1.schema.yaml index 9e22ed8f6..aab869498 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.letter.available.v1.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.letter.available.v1.schema.yaml @@ -10,7 +10,7 @@ properties: description: Concrete versioned event type string for this example event (.vN suffix). source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digitalletters/letter + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/letter description: Event source for digital letters examples. dataschema: diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.mesh.inbox.message.acknowledged.v1.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.mesh.inbox.message.acknowledged.v1.schema.yaml index d008704a9..b254640c1 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.mesh.inbox.message.acknowledged.v1.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.mesh.inbox.message.acknowledged.v1.schema.yaml @@ -10,7 +10,7 @@ properties: description: Concrete versioned event type string for this event (.vN suffix). source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digitalletters/mesh + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/mesh description: Event source for digital letters. dataschema: diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.mesh.inbox.message.downloaded.v1.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.mesh.inbox.message.downloaded.v1.schema.yaml index ffb6d8168..bee428575 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.mesh.inbox.message.downloaded.v1.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.mesh.inbox.message.downloaded.v1.schema.yaml @@ -10,7 +10,7 @@ properties: description: Concrete versioned event type string for this event (.vN suffix). source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digitalletters/mesh + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/mesh description: Event source for digital letters. dataschema: diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.mesh.inbox.message.invalid.v1.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.mesh.inbox.message.invalid.v1.schema.yaml index 70e9907c0..8fc828ec1 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.mesh.inbox.message.invalid.v1.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.mesh.inbox.message.invalid.v1.schema.yaml @@ -10,7 +10,7 @@ properties: description: Concrete versioned event type string for this event (.vN suffix). source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digitalletters/mesh + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/mesh description: Event source for digital letters. dataschema: diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.mesh.inbox.message.received.v1.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.mesh.inbox.message.received.v1.schema.yaml index b41128d40..c48d298c6 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.mesh.inbox.message.received.v1.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.mesh.inbox.message.received.v1.schema.yaml @@ -10,7 +10,7 @@ properties: description: Concrete versioned event type string for this event (.vN suffix). source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digitalletters/mesh + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/mesh description: Event source for digital letters. dataschema: diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.messages.request.rejected.v1.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.messages.request.rejected.v1.schema.yaml index d1984c0af..ae9570c21 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.messages.request.rejected.v1.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.messages.request.rejected.v1.schema.yaml @@ -10,7 +10,7 @@ properties: description: Concrete versioned event type string for this event (.vN suffix). source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digitalletters/messages + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/messages description: Event source for digital letters. dataschema: diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.messages.request.skipped.v1.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.messages.request.skipped.v1.schema.yaml index fb86ac3c9..dd5d958af 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.messages.request.skipped.v1.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.messages.request.skipped.v1.schema.yaml @@ -10,7 +10,7 @@ properties: description: Concrete versioned event type string for this event (.vN suffix). source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digitalletters/messages + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/messages description: Event source for digital letters. dataschema: diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.messages.request.submitted.v1.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.messages.request.submitted.v1.schema.yaml index 8b2167105..68edf4510 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.messages.request.submitted.v1.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.messages.request.submitted.v1.schema.yaml @@ -10,7 +10,7 @@ properties: description: Concrete versioned event type string for this event (.vN suffix). source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digitalletters/messages + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/messages description: Event source for digital letters. dataschema: diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.pdm.resource.available.v1.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.pdm.resource.available.v1.schema.yaml index 9ff20626d..15253dd4e 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.pdm.resource.available.v1.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.pdm.resource.available.v1.schema.yaml @@ -10,7 +10,7 @@ properties: description: Concrete versioned event type string for this event (.vN suffix). source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digitalletters/pdm + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/pdm description: Event source for digital letters. dataschema: diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.pdm.resource.retries.exceeded.v1.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.pdm.resource.retries.exceeded.v1.schema.yaml index ccbeb08b4..46b9f2402 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.pdm.resource.retries.exceeded.v1.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.pdm.resource.retries.exceeded.v1.schema.yaml @@ -10,7 +10,7 @@ properties: description: Concrete versioned event type string for this event (.vN suffix). source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digitalletters/pdm + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/pdm description: Event source for digital letters. dataschema: diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.pdm.resource.submission.rejected.v1.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.pdm.resource.submission.rejected.v1.schema.yaml index 8d8410d90..8e749904b 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.pdm.resource.submission.rejected.v1.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.pdm.resource.submission.rejected.v1.schema.yaml @@ -11,7 +11,7 @@ properties: description: Concrete versioned event type string for this event (.vN suffix). source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digitalletters/pdm + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/pdm description: Event source for digital letters. dataschema: diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.pdm.resource.submitted.v1.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.pdm.resource.submitted.v1.schema.yaml index 8f882c2bb..4e6c647e3 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.pdm.resource.submitted.v1.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.pdm.resource.submitted.v1.schema.yaml @@ -11,7 +11,7 @@ properties: description: Concrete versioned event type string for this event (.vN suffix). source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digitalletters/pdm + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/pdm description: Event source for digital letters. dataschema: diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.pdm.resource.unavailable.v1.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.pdm.resource.unavailable.v1.schema.yaml index 6417bba0d..7d10ab842 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.pdm.resource.unavailable.v1.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.pdm.resource.unavailable.v1.schema.yaml @@ -10,7 +10,7 @@ properties: description: Concrete versioned event type string for this event (.vN suffix). source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digitalletters/pdm + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/pdm description: Event source for digital letters. dataschema: diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.file.quarantined.v1.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.file.quarantined.v1.schema.yaml index 1d9e8b492..637cb8b67 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.file.quarantined.v1.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.file.quarantined.v1.schema.yaml @@ -10,7 +10,7 @@ properties: description: Concrete versioned event type string for this event (.vN suffix). source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digitalletters/print + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/print description: Event source for digital letters. dataschema: type: string diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.file.safe.v1.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.file.safe.v1.schema.yaml index 86811464d..e7851e4b1 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.file.safe.v1.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.file.safe.v1.schema.yaml @@ -10,7 +10,7 @@ properties: description: Concrete versioned event type string for this event (.vN suffix). source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digitalletters/print + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/print description: Event source for digital letters. dataschema: type: string diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.letter.transitioned.v1.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.letter.transitioned.v1.schema.yaml index 73780c95f..a455bc1c8 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.letter.transitioned.v1.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.letter.transitioned.v1.schema.yaml @@ -11,7 +11,7 @@ properties: description: Concrete versioned event type string for this event (.vN suffix). source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digitalletters/print + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/print description: Event source for digital letters. dataschema: diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.pdf.analysed.v1.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.pdf.analysed.v1.schema.yaml index 54f1829ff..5e95700f4 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.pdf.analysed.v1.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.pdf.analysed.v1.schema.yaml @@ -10,7 +10,7 @@ properties: description: Concrete versioned event type string for this event (.vN suffix). source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digitalletters/print + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/print description: Event source for digital letters. dataschema: type: string diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.digital.letter.read.v1.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.digital.letter.read.v1.schema.yaml index 533823937..d0555e9c2 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.digital.letter.read.v1.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.digital.letter.read.v1.schema.yaml @@ -10,7 +10,7 @@ properties: description: Concrete versioned event type string for this event (.vN suffix). source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digitalletters/queue + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/queue description: Event source for digital letters. dataschema: diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.item.dequeued.v1.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.item.dequeued.v1.schema.yaml index fcf71cff8..53b2fd811 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.item.dequeued.v1.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.item.dequeued.v1.schema.yaml @@ -10,7 +10,7 @@ properties: description: Concrete versioned event type string for this event (.vN suffix). source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digitalletters/queue + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/queue description: Event source for digital letters. dataschema: diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.item.enqueued.v1.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.item.enqueued.v1.schema.yaml index 9ced7d09a..4d37b17c6 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.item.enqueued.v1.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.queue.item.enqueued.v1.schema.yaml @@ -10,7 +10,7 @@ properties: description: Concrete versioned event type string for this event (.vN suffix). source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digitalletters/queue + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/queue description: Event source for digital letters. dataschema: diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.generate.report.v1.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.generate.report.v1.schema.yaml index 60781d491..478d34f98 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.generate.report.v1.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.generate.report.v1.schema.yaml @@ -10,7 +10,7 @@ properties: description: Concrete versioned event type string for this event (.vN suffix). source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digitalletters/reporting + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/reporting description: Event source for digital letters. dataschema: diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.report.generated.v1.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.report.generated.v1.schema.yaml index 92ee9a949..33972180b 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.report.generated.v1.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.report.generated.v1.schema.yaml @@ -10,7 +10,7 @@ properties: description: Concrete versioned event type string for this event (.vN suffix). source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digitalletters/reporting + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/reporting description: Event source for digital letters. dataschema: diff --git a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.report.sent.v1.schema.yaml b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.report.sent.v1.schema.yaml index eeef261ad..0c0175599 100644 --- a/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.report.sent.v1.schema.yaml +++ b/src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.reporting.report.sent.v1.schema.yaml @@ -10,7 +10,7 @@ properties: description: Concrete versioned event type string for this event (.vN suffix). source: type: string - pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digitalletters/reporting + pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/digitalletters/reporting description: Event source for digital letters. dataschema: diff --git a/src/digital-letters-events/README.md b/src/digital-letters-events/README.md index 4bec683b4..0017a0cb1 100644 --- a/src/digital-letters-events/README.md +++ b/src/digital-letters-events/README.md @@ -29,8 +29,9 @@ import { PDMResourceSubmitted } from 'digital-letters-events'; const pdmResourceSubmittedEvent: PDMResourceSubmitted = { type: 'uk.nhs.notify.digital.letters.pdm.resource.submitted.v1', + plane : 'data', source: - '/nhs/england/notify/staging/dev-647563337/data-plane/digitalletters/pdm', + '/nhs/england/notify/staging/dev-647563337/digitalletters/pdm', dataschema: 'https://notify.nhs.uk/cloudevents/schemas/digital-letters/2025-10-draft/data/digital-letters-pdm-resource-submitted-data.schema.json', specversion: '1.0', @@ -96,7 +97,8 @@ try: # Validate and parse an event event_data = { "type": "uk.nhs.notify.digital.letters.pdm.resource.submitted.v1", - "source": "/nhs/england/notify/staging/dev-647563337/data-plane/digitalletters/pdm", + "plane": "data", + "source": "/nhs/england/notify/staging/dev-647563337/digitalletters/pdm", "dataschema": "https://notify.nhs.uk/cloudevents/schemas/digital-letters/2025-10-draft/data/digital-letters-pdm-resource-submitted-data.schema.json", "specversion": "1.0", "id": "0249e529-f947-4012-819e-b634eb71be79", diff --git a/src/typescript-schema-generator/PLAN.md b/src/typescript-schema-generator/PLAN.md index 69af34637..385638ce1 100644 --- a/src/typescript-schema-generator/PLAN.md +++ b/src/typescript-schema-generator/PLAN.md @@ -491,7 +491,7 @@ describe('LetterAvailable', () => { it('should create instance with valid data', () => { const event = new LetterAvailableBuilder() .withType('uk.nhs.notify.digital.letters.letter.available.v1') - .withSource('/nhs/england/notify/development/primary/data-plane/digitalletters/letter') + .withSource('/nhs/england/notify/development/primary/digitalletters/letter') .withData(/* ... */) .build(); @@ -551,7 +551,7 @@ const client = new CloudEventClient({ const event = new LetterAvailable({ type: 'uk.nhs.notify.digital.letters.letter.available.v1', - source: '/nhs/england/notify/development/primary/data-plane/digitalletters/letter', + source: '/nhs/england/notify/development/primary/digitalletters/letter', data: { /* ... */ } }); diff --git a/tests/playwright/digital-letters-component-tests/core-notify.component.spec.ts b/tests/playwright/digital-letters-component-tests/core-notify.component.spec.ts index de9e137fd..9b94f70a9 100644 --- a/tests/playwright/digital-letters-component-tests/core-notify.component.spec.ts +++ b/tests/playwright/digital-letters-component-tests/core-notify.component.spec.ts @@ -21,8 +21,8 @@ import { v4 as uuidv4 } from 'uuid'; const baseEvent: Omit = { specversion: '1.0', - source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/pdm', + plane: 'data', + source: '/nhs/england/notify/production/primary/digitalletters/pdm', subject: 'customer/920fca11-596a-4eca-9c47-99f624614658/recipient/769acdd4-6a47-496f-999f-76a6fd2c3959', type: 'uk.nhs.notify.digital.letters.pdm.resource.available.v1', diff --git a/tests/playwright/digital-letters-component-tests/file-scanner.component.spec.ts b/tests/playwright/digital-letters-component-tests/file-scanner.component.spec.ts index a1c7e5836..aa904277f 100644 --- a/tests/playwright/digital-letters-component-tests/file-scanner.component.spec.ts +++ b/tests/playwright/digital-letters-component-tests/file-scanner.component.spec.ts @@ -58,8 +58,9 @@ test('should extract PDF from DocumentReference and store in unscanned bucket wi [ { id: eventId, + plane: 'data', specversion: '1.0', - source: `/nhs/england/notify/development/dev-1/data-plane/digitalletters/queue`, + source: `/nhs/england/notify/development/dev-1/digitalletters/queue`, subject: `message/${messageReference}`, type: 'uk.nhs.notify.digital.letters.queue.item.dequeued.v1', time: eventTime, @@ -125,7 +126,8 @@ test('should handle validation errors by sending messages to DLQ', async () => { { id: eventId, specversion: '1.0', - source: `/nhs/england/notify/development/dev-1/data-plane/digitalletters/queue`, + plane: 'data', + source: `/nhs/england/notify/development/dev-1/digitalletters/queue`, subject: `message/${messageReference}`, type: 'uk.nhs.notify.digital.letters.queue.item.dequeued.v1', time: eventTime, diff --git a/tests/playwright/digital-letters-component-tests/mesh-acknowledge.component.spec.ts b/tests/playwright/digital-letters-component-tests/mesh-acknowledge.component.spec.ts index a55e148bb..10b11b3e2 100644 --- a/tests/playwright/digital-letters-component-tests/mesh-acknowledge.component.spec.ts +++ b/tests/playwright/digital-letters-component-tests/mesh-acknowledge.component.spec.ts @@ -24,8 +24,8 @@ test.describe('Digital Letters - Mesh Acknowledger', () => { const validMessageDownloadedEvent: MESHInboxMessageDownloaded = { id: uuidv4(), specversion: '1.0', - source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/mesh', + plane: 'data', + source: '/nhs/england/notify/production/primary/digitalletters/mesh', subject: 'customer/920fca11-596a-4eca-9c47-99f624614658/recipient/769acdd4-6a47-496f-999f-76a6fd2c3959', type: 'uk.nhs.notify.digital.letters.mesh.inbox.message.downloaded.v1', diff --git a/tests/playwright/digital-letters-component-tests/mesh-poll-download.component.spec.ts b/tests/playwright/digital-letters-component-tests/mesh-poll-download.component.spec.ts index 7fde42e51..e57408762 100644 --- a/tests/playwright/digital-letters-component-tests/mesh-poll-download.component.spec.ts +++ b/tests/playwright/digital-letters-component-tests/mesh-poll-download.component.spec.ts @@ -122,8 +122,8 @@ test.describe('Digital Letters - MESH Poll and Download', () => { { id: uuidv4(), specversion: '1.0', - source: - '/nhs/england/notify/development/primary/data-plane/digitalletters/mesh', + plane: 'data', + source: '/nhs/england/notify/development/primary/digitalletters/mesh', subject: 'customer/00000000-0000-0000-0000-000000000000/recipient/00000000-0000-0000-0000-000000000000', type: 'uk.nhs.notify.digital.letters.mesh.inbox.message.received.v1', diff --git a/tests/playwright/digital-letters-component-tests/pdm-poll.component.spec.ts b/tests/playwright/digital-letters-component-tests/pdm-poll.component.spec.ts index 8d31cfb8d..d55cd9f66 100644 --- a/tests/playwright/digital-letters-component-tests/pdm-poll.component.spec.ts +++ b/tests/playwright/digital-letters-component-tests/pdm-poll.component.spec.ts @@ -16,8 +16,8 @@ import { v4 as uuidv4 } from 'uuid'; const baseEvent = { specversion: '1.0', - source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/pdm', + plane: 'data', + source: '/nhs/england/notify/production/primary/digitalletters/pdm', subject: 'customer/920fca11-596a-4eca-9c47-99f624614658/recipient/769acdd4-6a47-496f-999f-76a6fd2c3959', time: '2023-06-20T12:00:00Z', diff --git a/tests/playwright/digital-letters-component-tests/pdm-uploader.component.spec.ts b/tests/playwright/digital-letters-component-tests/pdm-uploader.component.spec.ts index 5b2993eb2..4d42a172b 100644 --- a/tests/playwright/digital-letters-component-tests/pdm-uploader.component.spec.ts +++ b/tests/playwright/digital-letters-component-tests/pdm-uploader.component.spec.ts @@ -36,8 +36,8 @@ const pdmRequest = { const baseEvent = { specversion: '1.0', - source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/mesh', + plane: 'data', + source: '/nhs/england/notify/production/primary/digitalletters/mesh', subject: 'customer/920fca11-596a-4eca-9c47-99f624614658/recipient/769acdd4-6a47-496f-999f-76a6fd2c3959', type: 'uk.nhs.notify.digital.letters.mesh.inbox.message.downloaded.v1', diff --git a/tests/playwright/digital-letters-component-tests/print-analyser.component.spec.ts b/tests/playwright/digital-letters-component-tests/print-analyser.component.spec.ts index 46720477c..a83db30a0 100644 --- a/tests/playwright/digital-letters-component-tests/print-analyser.component.spec.ts +++ b/tests/playwright/digital-letters-component-tests/print-analyser.component.spec.ts @@ -17,8 +17,8 @@ import { putFileS3 } from 'utils'; export const fileSafeEvent: FileSafe = { id: '550e8400-e29b-41d4-a716-446655440001', specversion: '1.0', - source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/print', + plane: 'data', + source: '/nhs/england/notify/production/primary/digitalletters/print', subject: 'letter-origin/digital-letters/letter/f47ac10b-58cc-4372-a567-0e02b2c3d479', type: 'uk.nhs.notify.digital.letters.print.file.safe.v1', diff --git a/tests/playwright/digital-letters-component-tests/print-sender.component.spec.ts b/tests/playwright/digital-letters-component-tests/print-sender.component.spec.ts index b761c54ab..ea66b38f2 100644 --- a/tests/playwright/digital-letters-component-tests/print-sender.component.spec.ts +++ b/tests/playwright/digital-letters-component-tests/print-sender.component.spec.ts @@ -27,8 +27,8 @@ test.describe('Digital Letters - Print Sender', () => { { id: letterId, specversion: '1.0', - source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/print', + plane: 'data', + source: '/nhs/england/notify/production/primary/digitalletters/print', subject: 'customer/920fca11-596a-4eca-9c47-99f624614658/recipient/769acdd4-6a47-496f-999f-76a6fd2c3959', type: 'uk.nhs.notify.digital.letters.print.pdf.analysed.v1', @@ -76,8 +76,8 @@ test.describe('Digital Letters - Print Sender', () => { const event = { id: uuidv4(), specversion: '1.0', - source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/print', + plane: 'data', + source: '/nhs/england/notify/production/primary/digitalletters/print', subject: 'customer/920fca11-596a-4eca-9c47-99f624614658/recipient/769acdd4-6a47-496f-999f-76a6fd2c3959', type: 'uk.nhs.notify.digital.letters.print.pdf.analysed.v1', diff --git a/tests/playwright/digital-letters-component-tests/send-reports-trust.component.spec.ts b/tests/playwright/digital-letters-component-tests/send-reports-trust.component.spec.ts index 2a8311680..96ee04f3f 100644 --- a/tests/playwright/digital-letters-component-tests/send-reports-trust.component.spec.ts +++ b/tests/playwright/digital-letters-component-tests/send-reports-trust.component.spec.ts @@ -25,8 +25,9 @@ test.describe('Digital Letters - Send reports to Trust', () => { { id: uuidv4(), specversion: '1.0', + plane: 'data', source: - '/nhs/england/notify/development/dev-12345/data-plane/digitalletters/reporting', + '/nhs/england/notify/development/dev-12345/digitalletters/reporting', subject: `report/${uuidv4()}`, type: 'uk.nhs.notify.digital.letters.reporting.report.generated.v1', time: new Date().toISOString(), diff --git a/tests/playwright/digital-letters-component-tests/ttl-create.component.spec.ts b/tests/playwright/digital-letters-component-tests/ttl-create.component.spec.ts index 6a5d35fa2..c595d9e69 100644 --- a/tests/playwright/digital-letters-component-tests/ttl-create.component.spec.ts +++ b/tests/playwright/digital-letters-component-tests/ttl-create.component.spec.ts @@ -27,8 +27,8 @@ test.describe('Digital Letters - Create TTL', () => { const baseEvent: MESHInboxMessageDownloaded = { id: 'id', specversion: '1.0', - source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/mesh', + plane: 'data', + source: '/nhs/england/notify/production/primary/digitalletters/mesh', subject: 'customer/920fca11-596a-4eca-9c47-99f624614658/recipient/769acdd4-6a47-496f-999f-76a6fd2c3959', type: 'uk.nhs.notify.digital.letters.mesh.inbox.message.downloaded.v1', diff --git a/tests/playwright/digital-letters-component-tests/ttl-handle.component.spec.ts b/tests/playwright/digital-letters-component-tests/ttl-handle.component.spec.ts index b726abe00..b01ce3381 100644 --- a/tests/playwright/digital-letters-component-tests/ttl-handle.component.spec.ts +++ b/tests/playwright/digital-letters-component-tests/ttl-handle.component.spec.ts @@ -15,8 +15,8 @@ test.describe('Digital Letters - Handle TTL', () => { const baseEvent: MESHInboxMessageDownloaded = { id: 'sample-id', specversion: '1.0', - source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/mesh', + plane: 'data', + source: '/nhs/england/notify/production/primary/digitalletters/mesh', subject: 'customer/920fca11-596a-4eca-9c47-99f624614658/recipient/769acdd4-6a47-496f-999f-76a6fd2c3959', type: 'uk.nhs.notify.digital.letters.mesh.inbox.message.downloaded.v1', diff --git a/tests/playwright/helpers/event-builders.ts b/tests/playwright/helpers/event-builders.ts index 6383a37fe..ee6d09723 100644 --- a/tests/playwright/helpers/event-builders.ts +++ b/tests/playwright/helpers/event-builders.ts @@ -11,7 +11,8 @@ import { function buildBaseEvent(sourceComponent: string, time: string) { return { specversion: '1.0', - source: `/nhs/england/notify/production/primary/data-plane/digitalletters/${sourceComponent}`, + plane: 'data', + source: `/nhs/england/notify/production/primary/digitalletters/${sourceComponent}`, subject: 'customer/920fca11-596a-4eca-9c47-99f624614658/recipient/769acdd4-6a47-496f-999f-76a6fd2c3959', time, diff --git a/tests/playwright/helpers/report-helpers.ts b/tests/playwright/helpers/report-helpers.ts index 6e02b8b29..a337654d6 100644 --- a/tests/playwright/helpers/report-helpers.ts +++ b/tests/playwright/helpers/report-helpers.ts @@ -257,8 +257,9 @@ export async function publishGenerateReport( { id: generateReportEventId, specversion: '1.0', + plane: 'data', source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/reporting', + '/nhs/england/notify/production/primary/digitalletters/reporting', subject: 'customer/920fca11-596a-4eca-9c47-99f624614658/recipient/769acdd4-6a47-496f-999f-76a6fd2c3959', type: 'uk.nhs.notify.digital.letters.reporting.generate.report.v1', @@ -291,8 +292,9 @@ export async function publishEventNotInReports(senderId: string) { { id: skippedEventId, specversion: '1.0', + plane: 'data', source: - '/nhs/england/notify/production/primary/data-plane/digitalletters/messages', + '/nhs/england/notify/production/primary/digitalletters/messages', subject: 'customer/920fca11-596a-4eca-9c47-99f624614658/recipient/769acdd4-6a47-496f-999f-76a6fd2c3959', type: 'uk.nhs.notify.digital.letters.messages.request.skipped.v1', diff --git a/utils/py-utils/dl_utils/__tests__/test_event_publisher.py b/utils/py-utils/dl_utils/__tests__/test_event_publisher.py index 9cdd3bfca..9c922fb95 100644 --- a/utils/py-utils/dl_utils/__tests__/test_event_publisher.py +++ b/utils/py-utils/dl_utils/__tests__/test_event_publisher.py @@ -44,7 +44,8 @@ def valid_cloud_event(): 'profilepublished': '2025-10', 'id': '550e8400-e29b-41d4-a716-446655440001', 'specversion': '1.0', - 'source': '/nhs/england/notify/production/primary/data-plane/digitalletters/mesh', + 'plane': 'data', + 'source': '/nhs/england/notify/production/primary/digitalletters/mesh', 'subject': 'customer/920fca11-596a-4eca-9c47-99f624614658/recipient/769acdd4-6a47-496f-999f-76a6fd2c3959', 'type': 'uk.nhs.notify.digital.letters.mesh.inbox.message.received.v1', 'time': '2023-06-20T12:00:00Z', @@ -69,7 +70,8 @@ def valid_cloud_event2(): 'profilepublished': '2025-10', 'id': '550e8400-e29b-41d4-a716-446655440002', 'specversion': '1.0', - 'source': '/nhs/england/notify/development/primary/data-plane/digitalletters/mesh', + 'plane': 'data', + 'source': '/nhs/england/notify/development/primary/digitalletters/mesh', 'subject': 'customer/920fca11-596a-4eca-9c47-99f624614658/recipient/769acdd4-6a47-496f-999f-76a6fd2c3959', 'type': 'uk.nhs.notify.digital.letters.mesh.inbox.message.received.v1', 'time': '2023-06-20T12:00:00Z', diff --git a/utils/utils/src/__tests__/event-publisher/event-publisher.test.ts b/utils/utils/src/__tests__/event-publisher/event-publisher.test.ts index 34b081e82..83bd09538 100644 --- a/utils/utils/src/__tests__/event-publisher/event-publisher.test.ts +++ b/utils/utils/src/__tests__/event-publisher/event-publisher.test.ts @@ -31,13 +31,13 @@ const testConfig: EventPublisherDependencies = { const event: TestEvent = { id: '550e8400-e29b-41d4-a716-446655440001', - source: '/nhs/england/notify/production/primary/data-plane/digital-letters', + source: '/nhs/england/notify/production/primary/digital-letters', type: 'uk.nhs.notify.digital.letters.sent.v1', }; const event2: TestEvent = { id: '550e8400-e29b-41d4-a716-446655440002', - source: '/nhs/england/notify/development/primary/data-plane/digital-letters', + source: '/nhs/england/notify/development/primary/digital-letters', type: 'uk.nhs.notify.digital.letters.sent.v2', };