Skip to content

Commit fa37d52

Browse files
committed
CCM-13475: Added event schema for the following events:
- PrintLetterAnalysed - PrintLetterSafe - PrintLetterQuarantined
1 parent 4d96f41 commit fa37d52

11 files changed

+150
-28
lines changed

docs/collections/_events/print-letter-analysed.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ schema_envelope: https://notify.nhs.uk/cloudevents/schemas/digital-letters/2025
77
schema_data: https://notify.nhs.uk/cloudevents/schemas/digital-letters/2025-10-draft/data/digital-letters-print-letter-analysed-data.schema.json
88
---
99

10-
This event is published when a PDF letter has been analysed in preparation for sending to print. In addition to the standard metadata fields relating to the message request, the event payload also contains a count of the number of pages in the letter and a SHA256 has of the file. This information can be used by the Print Supplier API to verify the integrity of the letter before it is printed.
10+
This event is published when a PDF letter has been analysed in preparation for sending to print. In addition to the standard metadata fields relating to the message request, the event payload also contains a count of the number of pages in the letter and a SHA256 hash of the file. This information can be used by the Print Supplier API to verify the integrity of the letter before it is printed.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: print-letter-quarantined
3+
type: uk.nhs.notify.digital.letters.print.letter.quarantined.v1
4+
nice_name: PrintLetterQuarantined
5+
service: Print Supplier Services
6+
schema_envelope: https://notify.nhs.uk/cloudevents/schemas/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.letter.quarantined.v1.schema.json
7+
schema_data: https://notify.nhs.uk/cloudevents/schemas/digital-letters/2025-10-draft/data/digital-letters-print-letter-quarantined-data.schema.json
8+
---
9+
10+
This event is published when a PDF letter has been virus scanned and found to contain potentially harmful content, resulting in it being quarantined.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: print-letter-safe
3+
type: uk.nhs.notify.digital.letters.print.letter.safe.v1
4+
nice_name: PrintLetterSafe
5+
service: Print Supplier Services
6+
schema_envelope: https://notify.nhs.uk/cloudevents/schemas/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.letter.safe.v1.schema.json
7+
schema_data: https://notify.nhs.uk/cloudevents/schemas/digital-letters/2025-10-draft/data/digital-letters-print-letter-safe-data.schema.json
8+
---
9+
10+
This event is published when a PDF letter has been virus scanned and found to be free of harmful content, allowing it to be safely sent to print.

src/cloudevents/domains/digital-letters/2025-10-draft/data/digital-letters-print-letter-analysed-data.schema.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,18 @@ properties:
88
$ref: ../defs/requests.schema.yaml#/properties/messageReference
99
senderId:
1010
$ref: ../defs/requests.schema.yaml#/properties/senderId
11-
messageUri:
12-
$ref: ../defs/requests.schema.yaml#/properties/messageUri
11+
letterUri:
12+
$ref: ../defs/print.schema.yaml#/properties/letterUri
1313
pageCount:
1414
$ref: ../defs/print.schema.yaml#/properties/pageCount
1515
sha256Hash:
1616
$ref: ../defs/print.schema.yaml#/properties/sha256Hash
17+
createdAt:
18+
$ref: ../defs/print.schema.yaml#/properties/createdAt
1719
required:
1820
- messageReference
1921
- senderId
20-
- messageUri
22+
- letterUri
2123
- pageCount
2224
- sha256Hash
25+
- createdAt
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
$schema: https://json-schema.org/draft/2020-12/schema
2+
title: PrintLetterQuarantined Data
3+
description: Data payload of the PrintLetterQuarantined event
4+
type: object
5+
additionalProperties: false
6+
properties:
7+
messageReference:
8+
$ref: ../defs/requests.schema.yaml#/properties/messageReference
9+
senderId:
10+
$ref: ../defs/requests.schema.yaml#/properties/senderId
11+
letterUri:
12+
$ref: ../defs/print.schema.yaml#/properties/letterUri
13+
required:
14+
- messageReference
15+
- senderId
16+
- letterUri
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
$schema: https://json-schema.org/draft/2020-12/schema
2+
title: PrintLetterSafe Data
3+
description: Data payload of the PrintLetterSafe event
4+
type: object
5+
additionalProperties: false
6+
properties:
7+
messageReference:
8+
$ref: ../defs/requests.schema.yaml#/properties/messageReference
9+
senderId:
10+
$ref: ../defs/requests.schema.yaml#/properties/senderId
11+
letterUri:
12+
$ref: ../defs/print.schema.yaml#/properties/letterUri
13+
required:
14+
- messageReference
15+
- senderId
16+
- letterUri

src/cloudevents/domains/digital-letters/2025-10-draft/defs/print.schema.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,17 @@ properties:
3535
examples:
3636
- 3a7bd3e2360a3d80c4d4e8b1e3e5e6e7e8e9e0e1e2e3e4e5e6e7e8e9e0e1e2e3
3737
abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890
38+
letterUri:
39+
type: string
40+
format: uri
41+
description: Uri to the S3 storage location of the PDF letter relating to this message request
42+
examples:
43+
- "s3://my-bucket/path/to/my-object"
44+
createdAt:
45+
title: "Created At DateTime"
46+
description: "Timestamp when the letter was created (RFC 3339)."
47+
examples: [
48+
"2025-10-01T10:15:30.000Z"
49+
]
50+
type: "string"
51+
pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"

src/cloudevents/domains/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.letter.analysed.v1.schema.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ properties:
1212
type: string
1313
pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digitalletters/print
1414
description: Event source for digital letters.
15-
1615
dataschema:
1716
type: string
1817
const: ../data/digital-letters-print-letter-analysed-data.schema.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
$schema: https://json-schema.org/draft/2020-12/schema
2+
title: PrintLetterQuarantined
3+
type: object
4+
allOf:
5+
- $ref: ../digital-letters-print-profile.schema.yaml
6+
properties:
7+
type:
8+
type: string
9+
const: uk.nhs.notify.digital.letters.print.letter.quarantined.v1
10+
description: Concrete versioned event type string for this event (.vN suffix).
11+
source:
12+
type: string
13+
pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digitalletters/print
14+
description: Event source for digital letters.
15+
dataschema:
16+
type: string
17+
const: ../data/digital-letters-print-letter-quarantined-data.schema.yaml
18+
description: Canonical URI of the event's data schema.
19+
examples:
20+
- digital-letters-print-letter-quarantined-data.schema.yaml
21+
data:
22+
$ref: ../data/digital-letters-print-letter-quarantined-data.schema.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
$schema: https://json-schema.org/draft/2020-12/schema
2+
title: PrintLetterSafe
3+
type: object
4+
allOf:
5+
- $ref: ../digital-letters-print-profile.schema.yaml
6+
properties:
7+
type:
8+
type: string
9+
const: uk.nhs.notify.digital.letters.print.letter.safe.v1
10+
description: Concrete versioned event type string for this event (.vN suffix).
11+
source:
12+
type: string
13+
pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digitalletters/print
14+
description: Event source for digital letters.
15+
dataschema:
16+
type: string
17+
const: ../data/digital-letters-print-letter-safe-data.schema.yaml
18+
description: Canonical URI of the event's data schema.
19+
examples:
20+
- digital-letters-print-letter-safe-data.schema.yaml
21+
data:
22+
$ref: ../data/digital-letters-print-letter-safe-data.schema.yaml

0 commit comments

Comments
 (0)