generated from UK-Export-Finance/nestjs-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(APIM-608): gov notify - file upload/link support (#1083)
## Introduction ✏️ GOV Notify integration needs the ability to consume and send a file buffer, in order for users to be able to download a file stored securly by Notify. ## Resolution ✔️ - Update GOV Notify constants. - Update GOV Notify service to conditionally add a `linkToFile` property. - Update `PostEmailsRequestDto` module to include `FILE`. - Create new mock JSON response (for unit tests). ## Miscellaneous ➕ - Minor JSON indentation improvement. - Minor documentation improvment. - Updated GitHook lint staged commands. --------- Co-authored-by: Abhi Markan <amarkan@ukexportfinance.gov.uk>
- Loading branch information
1 parent
041124c
commit dddf3e6
Showing
8 changed files
with
113 additions
and
34 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/helper-modules/govuk-notify/examples/example-response-for-prepare-upload.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"id": "740e5834-3a29-46b4-9a6f-16142fde533a", | ||
"reference": "your_reference_here", | ||
"content": { | ||
"subject": "SUBJECT TEXT", | ||
"body": "MESSAGE TEXT", | ||
"from_email": "SENDER EMAIL" | ||
}, | ||
"uri": "https: //api.notifications.service.gov.uk/v2/notifications/740e5834-3a29-46b4-9a6f-16142fde533a", | ||
"template": { | ||
"id": "f33517ff-2a88-4f6e-b855-c550268ce08a", | ||
"version": "24", | ||
"uri": "https: //api.notifications.service.gov.uk/v2/template/f33517ff-2a88-4f6e-b855-c550268ce08a" | ||
} | ||
} |
14 changes: 7 additions & 7 deletions
14
src/helper-modules/govuk-notify/examples/example-response-for-send-emails.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
{ | ||
"content": { | ||
"body": "Dear John Smith,\r\n\r\nThe status of your MIA for EuroStar has been updated.\r\n\r\n* Your bank reference: EuroStar bridge\r\n* Current status: Acknowledged\r\n* Previous status: Submitted\r\n* Updated by: Joe Bloggs (Joe.Bloggs@example.com)\r\n\r\nSign in to our service for more information: \r\nhttps://www.test.service.gov.uk/\r\n\r\nWith regards,\r\n\r\nThe Digital Trade Finance Service team\r\n\r\nEmail: test@test.gov.uk\r\nPhone: +44 (0)202 123 4567\r\nOpening times: Monday to Friday, 9am to 5pm (excluding public holidays)", | ||
"from_email": "test@notifications.service.gov.uk", | ||
"subject": "Status update: EuroStar bridge", | ||
"unsubscribe_link": null | ||
"body": "Dear John Smith,\r\n\r\nThe status of your MIA for EuroStar has been updated.\r\n\r\n* Your bank reference: EuroStar bridge\r\n* Current status: Acknowledged\r\n* Previous status: Submitted\r\n* Updated by: Joe Bloggs (Joe.Bloggs@example.com)\r\n\r\nSign in to our service for more information: \r\nhttps://www.test.service.gov.uk/\r\n\r\nWith regards,\r\n\r\nThe Digital Trade Finance Service team\r\n\r\nEmail: test@test.gov.uk\r\nPhone: +44 (0)202 123 4567\r\nOpening times: Monday to Friday, 9am to 5pm (excluding public holidays)", | ||
"from_email": "test@notifications.service.gov.uk", | ||
"subject": "Status update: EuroStar bridge", | ||
"unsubscribe_link": null | ||
}, | ||
"id": "efd12345-1234-5678-9012-ee123456789f", | ||
"reference": "tmpl1234-1234-5678-9012-abcd12345678-1713346533467", | ||
"scheduled_for": null, | ||
"template": { | ||
"id": "tmpl1234-1234-5678-9012-abcd12345678", | ||
"uri": "https://api.notifications.service.gov.uk/services/abc12345-a123-4567-8901-123456789012/templates/tmpl1234-1234-5678-9012-abcd12345678", | ||
"version": 24 | ||
"id": "tmpl1234-1234-5678-9012-abcd12345678", | ||
"uri": "https://api.notifications.service.gov.uk/services/abc12345-a123-4567-8901-123456789012/templates/tmpl1234-1234-5678-9012-abcd12345678", | ||
"version": 24 | ||
}, | ||
"uri": "https://api.notifications.service.gov.uk/v2/notifications/efd12345-1234-5678-9012-ee123456789f" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters