Skip to content

Commit e5b9274

Browse files
authored
Merge branch 'main' into feature/CCM-12951-Maintain-Letter-Status
2 parents 966f6eb + cb1488f commit e5b9274

27 files changed

+549
-77
lines changed

.github/actions/acceptance-tests/action.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ runs:
3737
- name: "Repo setup"
3838
uses: ./.github/actions/node-install
3939
with:
40-
node-version: ${{ steps.nodejs_version.outputs.nodejs_version }}
4140
GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }}
4241

4342
- name: "Set PR NUMBER"

.github/actions/node-install/action.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ name: 'npm install and setup'
22
description: 'Setup node, authenticate github package repository and perform clean npm install'
33

44
inputs:
5-
node-version:
6-
description: 'Node.js version'
7-
required: true
85
GITHUB_TOKEN:
96
description: "Token for access to github package registry"
107
required: true
@@ -15,7 +12,7 @@ runs:
1512
- name: 'Use Node.js'
1613
uses: actions/setup-node@v6
1714
with:
18-
node-version: '${{ inputs.node-version }}'
15+
node-version-file: '.tool-versions'
1916
registry-url: 'https://npm.pkg.github.com'
2017
scope: '@nhsdigital'
2118

.github/workflows/pr_closed.yaml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
- name: Setup NodeJS
8181
uses: actions/setup-node@v4
8282
with:
83-
node-version: ${{ inputs.nodejs_version }}
83+
node-version-file: '.tool-versions'
8484
registry-url: 'https://npm.pkg.github.com'
8585

8686
- name: check if local version differs from latest published version
@@ -113,19 +113,14 @@ jobs:
113113
steps:
114114
- name: "Checkout code"
115115
uses: actions/checkout@v5.0.0
116-
- name: Setup NodeJS
117-
uses: actions/setup-node@v4
116+
- name: "Repo setup"
117+
uses: ./.github/actions/node-install
118118
with:
119-
node-version: ${{ inputs.nodejs_version }}
120-
registry-url: 'https://npm.pkg.github.com'
121-
- name: "Install dependencies"
122-
env:
123-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
124-
run: npm ci
119+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
125120
- name: "Run provider contract tests"
126121
run: make test-contract
127122
env:
128-
GITHUB_PACKAGES_TOKEN: ${{ secrets.GITHUB_TOKEN }}
123+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
129124

130125
publish-event-schemas:
131126
name: Publish event schemas package to GitHub package registry
@@ -145,7 +140,7 @@ jobs:
145140
- name: Setup NodeJS
146141
uses: actions/setup-node@v4
147142
with:
148-
node-version: ${{ inputs.nodejs_version }}
143+
node-version-file: '.tool-versions'
149144
registry-url: 'https://npm.pkg.github.com'
150145

151146
- name: Install dependencies

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ test-component:
106106
test-performance:
107107
(cd tests && npm install && npm run test:performance)
108108

109+
test-contract: # Run provider contract tests @Testing
110+
npm run test:contracts --workspace tests/contracts/provider
111+
109112
version:
110113
rm -f .version
111114
make version-create-effective-file dir=.

internal/events/schemas/examples/letter.ACCEPTED.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
{
22
"data": {
33
"billingRef": "1y3q9v1zzzz",
4-
"domainId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
4+
"domainId": "e9dc9ee9-b2f8-4ef2-8351-73a9a29f8e96_38U220Ghb1WXF8hCK6hL0LGya3Y_38U23YjtnKSZypvaCSb07adMOlq",
55
"groupId": "client_template",
66
"origin": {
77
"domain": "letter-rendering",
88
"event": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
9-
"source": "/data-plane/letter-rendering/prod/render-pdf",
10-
"subject": "client/00f3b388-bbe9-41c9-9e76-052d37ee8988/letter-request/0o5Fs0EELR0fUjHjbCnEtdUwQe4_0o5Fs0EELR0fUjHjbCnEtdUwQe5"
9+
"source": "/data-plane/letter-rendering/comms-mgr-prod/prod",
10+
"subject": "client/e9dc9ee9-b2f8-4ef2-8351-73a9a29f8e96/letter-request/38U220Ghb1WXF8hCK6hL0LGya3Y_38U23YjtnKSZypvaCSb07adMOlq"
1111
},
1212
"specificationId": "1y3q9v1zzzz",
13-
"status": "ACCEPTED"
13+
"status": "ACCEPTED",
14+
"supplierId": "supplier-12345"
1415
},
1516
"datacontenttype": "application/json",
1617
"dataschema": "https://notify.nhs.uk/cloudevents/schemas/supplier-api/letter.ACCEPTED.1.0.0.schema.json",
18+
"dataschemaversion": "1.0.0",
1719
"id": "23f1f09c-a555-4d9b-8405-0b33490bc920",
20+
"plane": "data",
1821
"recordedtime": "2025-08-28T08:45:00.000Z",
1922
"severitynumber": 2,
2023
"severitytext": "INFO",
2124
"source": "/data-plane/supplier-api/nhs-supplier-api-prod/main/update-status",
2225
"specversion": "1.0",
23-
"subject": "letter-origin/letter-rendering/letter/f47ac10b-58cc-4372-a567-0e02b2c3d479",
26+
"subject": "letter-origin/letter-rendering/letter/e9dc9ee9-b2f8-4ef2-8351-73a9a29f8e96_38U220Ghb1WXF8hCK6hL0LGya3Y_38U23YjtnKSZypvaCSb07adMOlq",
2427
"time": "2025-08-28T08:45:00.000Z",
2528
"traceparent": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01",
2629
"type": "uk.nhs.notify.supplier-api.letter.ACCEPTED.v1"
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"data": {
3+
"billingRef": "1y3q9v1zzzz",
4+
"domainId": "e9dc9ee9-b2f8-4ef2-8351-73a9a29f8e96_38U220Ghb1WXF8hCK6hL0LGya3Y_38U23YjtnKSZypvaCSb07adMOlq",
5+
"groupId": "client_template",
6+
"origin": {
7+
"domain": "letter-rendering",
8+
"event": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
9+
"source": "/data-plane/letter-rendering/comms-mgr-prod/prod",
10+
"subject": "client/e9dc9ee9-b2f8-4ef2-8351-73a9a29f8e96/letter-request/38U220Ghb1WXF8hCK6hL0LGya3Y_38U23YjtnKSZypvaCSb07adMOlq"
11+
},
12+
"reasonCode": "CANCELLATION_CODE",
13+
"reasonText": "Cancellation reason",
14+
"specificationId": "1y3q9v1zzzz",
15+
"status": "CANCELLED",
16+
"supplierId": "supplier-12345"
17+
},
18+
"datacontenttype": "application/json",
19+
"dataschema": "https://notify.nhs.uk/cloudevents/schemas/supplier-api/letter.CANCELLED.1.0.0.schema.json",
20+
"dataschemaversion": "1.0.0",
21+
"id": "23f1f09c-a555-4d9b-8405-0b33490bc920",
22+
"plane": "data",
23+
"recordedtime": "2025-08-28T08:45:00.000Z",
24+
"severitynumber": 2,
25+
"severitytext": "INFO",
26+
"source": "/data-plane/supplier-api/nhs-supplier-api-prod/main/update-status",
27+
"specversion": "1.0",
28+
"subject": "letter-origin/letter-rendering/letter/e9dc9ee9-b2f8-4ef2-8351-73a9a29f8e96_38U220Ghb1WXF8hCK6hL0LGya3Y_38U23YjtnKSZypvaCSb07adMOlq",
29+
"time": "2025-08-28T08:45:00.000Z",
30+
"traceparent": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01",
31+
"type": "uk.nhs.notify.supplier-api.letter.CANCELLED.v1"
32+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"data": {
3+
"billingRef": "1y3q9v1zzzz",
4+
"domainId": "e9dc9ee9-b2f8-4ef2-8351-73a9a29f8e96_38U220Ghb1WXF8hCK6hL0LGya3Y_38U23YjtnKSZypvaCSb07adMOlq",
5+
"groupId": "client_template",
6+
"origin": {
7+
"domain": "letter-rendering",
8+
"event": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
9+
"source": "/data-plane/letter-rendering/comms-mgr-prod/prod",
10+
"subject": "client/e9dc9ee9-b2f8-4ef2-8351-73a9a29f8e96/letter-request/38U220Ghb1WXF8hCK6hL0LGya3Y_38U23YjtnKSZypvaCSb07adMOlq"
11+
},
12+
"specificationId": "1y3q9v1zzzz",
13+
"status": "DELIVERED",
14+
"supplierId": "supplier-12345"
15+
},
16+
"datacontenttype": "application/json",
17+
"dataschema": "https://notify.nhs.uk/cloudevents/schemas/supplier-api/letter.DELIVERED.1.0.0.schema.json",
18+
"dataschemaversion": "1.0.0",
19+
"id": "23f1f09c-a555-4d9b-8405-0b33490bc920",
20+
"plane": "data",
21+
"recordedtime": "2025-08-28T08:45:00.000Z",
22+
"severitynumber": 2,
23+
"severitytext": "INFO",
24+
"source": "/data-plane/supplier-api/nhs-supplier-api-prod/main/update-status",
25+
"specversion": "1.0",
26+
"subject": "letter-origin/letter-rendering/letter/e9dc9ee9-b2f8-4ef2-8351-73a9a29f8e96_38U220Ghb1WXF8hCK6hL0LGya3Y_38U23YjtnKSZypvaCSb07adMOlq",
27+
"time": "2025-08-28T08:45:00.000Z",
28+
"traceparent": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01",
29+
"type": "uk.nhs.notify.supplier-api.letter.DELIVERED.v1"
30+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"data": {
3+
"billingRef": "1y3q9v1zzzz",
4+
"domainId": "e9dc9ee9-b2f8-4ef2-8351-73a9a29f8e96_38U220Ghb1WXF8hCK6hL0LGya3Y_38U23YjtnKSZypvaCSb07adMOlq",
5+
"groupId": "client_template",
6+
"origin": {
7+
"domain": "letter-rendering",
8+
"event": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
9+
"source": "/data-plane/letter-rendering/comms-mgr-prod/prod",
10+
"subject": "client/e9dc9ee9-b2f8-4ef2-8351-73a9a29f8e96/letter-request/38U220Ghb1WXF8hCK6hL0LGya3Y_38U23YjtnKSZypvaCSb07adMOlq"
11+
},
12+
"specificationId": "1y3q9v1zzzz",
13+
"status": "DISPATCHED",
14+
"supplierId": "supplier-12345"
15+
},
16+
"datacontenttype": "application/json",
17+
"dataschema": "https://notify.nhs.uk/cloudevents/schemas/supplier-api/letter.DISPATCHED.1.0.0.schema.json",
18+
"dataschemaversion": "1.0.0",
19+
"id": "23f1f09c-a555-4d9b-8405-0b33490bc920",
20+
"plane": "data",
21+
"recordedtime": "2025-08-28T08:45:00.000Z",
22+
"severitynumber": 2,
23+
"severitytext": "INFO",
24+
"source": "/data-plane/supplier-api/nhs-supplier-api-prod/main/update-status",
25+
"specversion": "1.0",
26+
"subject": "letter-origin/letter-rendering/letter/e9dc9ee9-b2f8-4ef2-8351-73a9a29f8e96_38U220Ghb1WXF8hCK6hL0LGya3Y_38U23YjtnKSZypvaCSb07adMOlq",
27+
"time": "2025-08-28T08:45:00.000Z",
28+
"traceparent": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01",
29+
"type": "uk.nhs.notify.supplier-api.letter.DISPATCHED.v1"
30+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"data": {
3+
"billingRef": "1y3q9v1zzzz",
4+
"domainId": "e9dc9ee9-b2f8-4ef2-8351-73a9a29f8e96_38U220Ghb1WXF8hCK6hL0LGya3Y_38U23YjtnKSZypvaCSb07adMOlq",
5+
"groupId": "client_template",
6+
"origin": {
7+
"domain": "letter-rendering",
8+
"event": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
9+
"source": "/data-plane/letter-rendering/comms-mgr-prod/prod",
10+
"subject": "client/e9dc9ee9-b2f8-4ef2-8351-73a9a29f8e96/letter-request/38U220Ghb1WXF8hCK6hL0LGya3Y_38U23YjtnKSZypvaCSb07adMOlq"
11+
},
12+
"specificationId": "1y3q9v1zzzz",
13+
"status": "ENCLOSED",
14+
"supplierId": "supplier-12345"
15+
},
16+
"datacontenttype": "application/json",
17+
"dataschema": "https://notify.nhs.uk/cloudevents/schemas/supplier-api/letter.ENCLOSED.1.0.0.schema.json",
18+
"dataschemaversion": "1.0.0",
19+
"id": "23f1f09c-a555-4d9b-8405-0b33490bc920",
20+
"plane": "data",
21+
"recordedtime": "2025-08-28T08:45:00.000Z",
22+
"severitynumber": 2,
23+
"severitytext": "INFO",
24+
"source": "/data-plane/supplier-api/nhs-supplier-api-prod/main/update-status",
25+
"specversion": "1.0",
26+
"subject": "letter-origin/letter-rendering/letter/e9dc9ee9-b2f8-4ef2-8351-73a9a29f8e96_38U220Ghb1WXF8hCK6hL0LGya3Y_38U23YjtnKSZypvaCSb07adMOlq",
27+
"time": "2025-08-28T08:45:00.000Z",
28+
"traceparent": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01",
29+
"type": "uk.nhs.notify.supplier-api.letter.ENCLOSED.v1"
30+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"data": {
3+
"billingRef": "1y3q9v1zzzz",
4+
"domainId": "e9dc9ee9-b2f8-4ef2-8351-73a9a29f8e96_38U220Ghb1WXF8hCK6hL0LGya3Y_38U23YjtnKSZypvaCSb07adMOlq",
5+
"groupId": "client_template",
6+
"origin": {
7+
"domain": "letter-rendering",
8+
"event": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
9+
"source": "/data-plane/letter-rendering/comms-mgr-prod/prod",
10+
"subject": "client/e9dc9ee9-b2f8-4ef2-8351-73a9a29f8e96/letter-request/38U220Ghb1WXF8hCK6hL0LGya3Y_38U23YjtnKSZypvaCSb07adMOlq"
11+
},
12+
"reasonCode": "FAILURE_CODE",
13+
"reasonText": "Failure reason",
14+
"specificationId": "1y3q9v1zzzz",
15+
"status": "FAILED",
16+
"supplierId": "supplier-12345"
17+
},
18+
"datacontenttype": "application/json",
19+
"dataschema": "https://notify.nhs.uk/cloudevents/schemas/supplier-api/letter.FAILED.1.0.0.schema.json",
20+
"dataschemaversion": "1.0.0",
21+
"id": "23f1f09c-a555-4d9b-8405-0b33490bc920",
22+
"plane": "data",
23+
"recordedtime": "2025-08-28T08:45:00.000Z",
24+
"severitynumber": 2,
25+
"severitytext": "INFO",
26+
"source": "/data-plane/supplier-api/nhs-supplier-api-prod/main/update-status",
27+
"specversion": "1.0",
28+
"subject": "letter-origin/letter-rendering/letter/e9dc9ee9-b2f8-4ef2-8351-73a9a29f8e96_38U220Ghb1WXF8hCK6hL0LGya3Y_38U23YjtnKSZypvaCSb07adMOlq",
29+
"time": "2025-08-28T08:45:00.000Z",
30+
"traceparent": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01",
31+
"type": "uk.nhs.notify.supplier-api.letter.FAILED.v1"
32+
}

0 commit comments

Comments
 (0)