Skip to content

Commit 42b0816

Browse files
authored
CCM-13188: update event examples (#364)
* init * update examples * whitespace fix * fmt fix * add spec id to PENDING
1 parent 256710a commit 42b0816

15 files changed

Lines changed: 279 additions & 16 deletions

internal/events/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,5 @@
5050
"typecheck": "tsc --noEmit"
5151
},
5252
"types": "dist/index.d.ts",
53-
"version": "1.0.9"
53+
"version": "1.0.10"
5454
}

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+
}

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,31 @@
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
"reasonCode": "RNIB",
1313
"reasonText": "RNIB",
1414
"specificationId": "1y3q9v1zzzz",
15-
"status": "FORWARDED"
15+
"status": "FORWARDED",
16+
"supplierId": "supplier-12345"
1617
},
1718
"datacontenttype": "application/json",
1819
"dataschema": "https://notify.nhs.uk/cloudevents/schemas/supplier-api/letter.FORWARDED.1.0.0.schema.json",
20+
"dataschemaversion": "1.0.0",
1921
"id": "23f1f09c-a555-4d9b-8405-0b33490bc920",
22+
"plane": "data",
2023
"recordedtime": "2025-08-28T08:45:00.000Z",
2124
"severitynumber": 2,
2225
"severitytext": "INFO",
2326
"source": "/data-plane/supplier-api/nhs-supplier-api-prod/main/update-status",
2427
"specversion": "1.0",
25-
"subject": "letter-origin/letter-rendering/letter/f47ac10b-58cc-4372-a567-0e02b2c3d479",
28+
"subject": "letter-origin/letter-rendering/letter/e9dc9ee9-b2f8-4ef2-8351-73a9a29f8e96_38U220Ghb1WXF8hCK6hL0LGya3Y_38U23YjtnKSZypvaCSb07adMOlq",
2629
"time": "2025-08-28T08:45:00.000Z",
2730
"traceparent": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01",
2831
"type": "uk.nhs.notify.supplier-api.letter.FORWARDED.v1"
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": "PENDING",
14+
"supplierId": "supplier-12345"
15+
},
16+
"datacontenttype": "application/json",
17+
"dataschema": "https://notify.nhs.uk/cloudevents/schemas/supplier-api/letter.PENDING.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.PENDING.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": "PRINTED",
14+
"supplierId": "supplier-12345"
15+
},
16+
"datacontenttype": "application/json",
17+
"dataschema": "https://notify.nhs.uk/cloudevents/schemas/supplier-api/letter.PRINTED.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.PRINTED.v1"
30+
}

0 commit comments

Comments
 (0)