Skip to content

Commit d639c7c

Browse files
CCM-12858: lint fixes
1 parent 0835816 commit d639c7c

File tree

5 files changed

+24
-20
lines changed

5 files changed

+24
-20
lines changed

lambdas/core-notifier-lambda/src/__tests__/apis/sqs-handler.test.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,25 @@ describe('createHandler', () => {
3434
const mockSender: Sender = {
3535
senderId,
3636
routingConfigId,
37-
displayName: 'Test Sender',
38-
clientId: 'client-123',
39-
campaignId: 'campaign-123',
37+
senderName: 'Test Sender',
38+
meshMailboxSenderId: 'meshMailBoxSender-123',
39+
meshMailboxReportsId: 'meshMailBoxReports-123',
40+
fallbackWaitTimeSeconds: 100,
4041
};
4142

4243
const mockPdmEvent: PDMResourceAvailable = {
4344
id: 'event-id-123',
4445
source: 'urn:nhs:names:services:notify:pdm',
4546
specversion: '1.0',
46-
type: 'uk.nhs.notify.pdm.resource.available',
47+
type: 'uk.nhs.notify.digital.letters.pdm.resource.available.v1',
4748
time: '2025-12-15T10:00:00Z',
4849
datacontenttype: 'application/json',
4950
data: {
5051
senderId,
5152
messageReference,
52-
resourceType: 'letter',
53-
resourceLocation: 's3://bucket/key',
53+
resourceId: 'ResourceId-123',
54+
nhsNumber: '9991234566',
55+
odsCode: 'A12345',
5456
},
5557
};
5658

lambdas/core-notifier-lambda/src/__tests__/app/parse-sqs-message.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ describe('parseSqsRecord', () => {
2020
id: 'event-id-123',
2121
source: 'urn:nhs:names:services:notify:pdm',
2222
specversion: '1.0',
23-
type: 'uk.nhs.notify.pdm.resource.available',
23+
type: 'uk.nhs.notify.digital.letters.pdm.resource.available.v1',
2424
time: '2025-12-15T10:00:00Z',
2525
datacontenttype: 'application/json',
2626
data: {
2727
senderId: 'sender-123',
2828
messageReference: 'ref-123',
29-
resourceType: 'letter',
30-
resourceLocation: 's3://bucket/key',
29+
resourceId: 'ResourceId-123',
30+
nhsNumber: '9991234566',
31+
odsCode: 'A12345',
3132
},
3233
};
3334

lambdas/core-notifier-lambda/src/__tests__/domain/mapper.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describe('mapper', () => {
4848

4949
beforeEach(() => {
5050
jest.clearAllMocks();
51-
mockRandomUUID.mockReturnValue('mock-uuid-123');
51+
mockRandomUUID.mockReturnValue('45e7d942-0d33-46d1-a678-ada01e5de9fe');
5252
});
5353

5454
describe('mapPdmEventToSingleMessageRequest', () => {
@@ -99,7 +99,7 @@ describe('mapper', () => {
9999

100100
expect(result).toEqual({
101101
...mockPdmEvent,
102-
id: 'mock-uuid-123',
102+
id: '45e7d942-0d33-46d1-a678-ada01e5de9fe',
103103
time: '2024-01-15T12:00:00.000Z',
104104
recordedtime: '2024-01-15T12:00:00.000Z',
105105
type: 'uk.nhs.notify.digital.letters.messages.request.submitted.v1',
@@ -130,7 +130,7 @@ describe('mapper', () => {
130130

131131
expect(result).toEqual({
132132
...mockPdmEvent,
133-
id: 'mock-uuid-123',
133+
id: '45e7d942-0d33-46d1-a678-ada01e5de9fe',
134134
time: '2024-01-15T12:00:00.000Z',
135135
recordedtime: '2024-01-15T12:00:00.000Z',
136136
type: 'uk.nhs.notify.digital.letters.messages.request.skipped.v1',
@@ -218,7 +218,7 @@ describe('mapper', () => {
218218

219219
expect(result).toEqual({
220220
...mockPdmEvent,
221-
id: 'mock-uuid-123',
221+
id: '45e7d942-0d33-46d1-a678-ada01e5de9fe',
222222
time: '2024-01-15T12:00:00.000Z',
223223
recordedtime: '2024-01-15T12:00:00.000Z',
224224
type: 'uk.nhs.notify.digital.letters.messages.request.rejected.v1',

lambdas/core-notifier-lambda/src/__tests__/infra/event-publisher-facade.test.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,14 @@ describe('EventPublisherFacade', () => {
3939
id: 'event-id-123',
4040
source: 'urn:nhs:names:services:notify:core-notifier',
4141
specversion: '1.0',
42-
type: 'uk.nhs.notify.message-request.submitted',
42+
type: 'uk.nhs.notify.digital.letters.messages.request.submitted.v1',
4343
time: '2025-12-15T10:00:00Z',
4444
datacontenttype: 'application/json',
4545
data: {
4646
senderId: 'sender-123',
4747
messageReference: 'msg-ref-123',
48-
notifyMessageId: 'notify-id-123',
48+
notifyId: 'notify-id-123',
49+
messageUri: 's3://dlbucket/document.pdf',
4950
},
5051
};
5152

@@ -66,13 +67,14 @@ describe('EventPublisherFacade', () => {
6667
id: 'event-id-456',
6768
source: 'urn:nhs:names:services:notify:core-notifier',
6869
specversion: '1.0',
69-
type: 'uk.nhs.notify.message-request.rejected',
70+
type: 'uk.nhs.notify.digital.letters.messages.request.rejected.v1',
7071
time: '2025-12-15T10:00:00Z',
7172
datacontenttype: 'application/json',
7273
data: {
7374
senderId: 'sender-456',
7475
messageReference: 'msg-ref-456',
75-
errorCode: 'VALIDATION_ERROR',
76+
failureCode: 'VALIDATION_ERROR',
77+
messageUri: 's3://dlbucket/document.pdf',
7678
},
7779
};
7880

@@ -93,13 +95,12 @@ describe('EventPublisherFacade', () => {
9395
id: 'event-id-789',
9496
source: 'urn:nhs:names:services:notify:core-notifier',
9597
specversion: '1.0',
96-
type: 'uk.nhs.notify.message-request.skipped',
98+
type: 'uk.nhs.notify.digital.letters.messages.request.skipped.v1',
9799
time: '2025-12-15T10:00:00Z',
98100
datacontenttype: 'application/json',
99101
data: {
100102
senderId: 'sender-789',
101103
messageReference: 'msg-ref-789',
102-
reason: 'No routing configuration',
103104
},
104105
};
105106

lambdas/core-notifier-lambda/src/apis/sqs-handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { RequestNotifyError } from 'domain/request-notify-error';
2222
export interface SqsHandlerDependencies {
2323
notifyMessageProcessor: NotifyMessageProcessor;
2424
logger: Logger;
25-
senderManagement: SenderManagement;
25+
senderManagement: typeof SenderManagement;
2626
eventPublisherFacade: EventPublisherFacade;
2727
}
2828

0 commit comments

Comments
 (0)