- Added an optional postage argument to
sendPrecompiledLetter
- Moved documentation to https://docs.notifications.service.gov.uk/node.html (generated from DOCUMENTATION.md)
- Made formatting consistent across documentation.
- Added a function to send precompiled letter through the client.
- the new function uses a helper function to check if the file size is within the 5MB limit and to encode the file using base64. Then a POST request to our API is made with the file data and user reference.
- instructions for the new functionality added to the documentation.
- Added instructions for uploading a document to be linked to from an email notification.
- Created a helper function
prepareUpload
as a part of this development. This function encodes the document that is to be uploaded with base64 and returns a dictionary with prepared document as a value (the way our API is prepared to receive it). It also checks if the provided file is not larger than 2MB. The function throws an error if the file is too big.
- Created a helper function
- Added
name
to the response forgetTemplateById()
andgetTemplateByIdAndVersion()
- These functions now return the name of the template as set in Notify
- Added
created_by_name
to the response for.getNotificationById()
and.getNotifications()
:- If the notification was sent manually this will be the name of the sender. If the notification was sent through the API this will be
null
.
- If the notification was sent manually this will be the name of the sender. If the notification was sent through the API this will be
- Added new method:
getReceivedTexts
- get one page of text messages (250) per call
- Updated
sendSms
,sendEmail
andsendLetter
to take anoptions
object as a parameter.personalisation
,reference
,smsSenderId
andemailReplyToId
now need to be passed to these functions insideoptions
.
- Removed the unused
Crypto
dependency
- Updated
sendSms
method with optional argument:smsSenderId
- specify the identifier of the sms sender (optional)
- Added new method:
sendLetter
- send a letter
- Updated
sendEmail
method with optional argument:emailReplyToId
- specify the identifier of the email reply-to address (optional)
- Added new method:
setProxy(proxyUrl)
- specify the URL of a proxy for the client to use (optional)
-
Added new methods for managing templates:
getTemplateById
- retrieve a single templategetTemplateByIdAndVersion
- retrieve a specific version for a desired templategetAllTemplates
- retrieve all templates (can filter by type)previewTemplateById
- preview a template with personalisation applied
-
Update README to describe how to catch errors
-
Using v2 of the notification-api.
-
Update to
notifyClient.sendSms()
:- Added
reference
: an optional identifier you generate if you don’t want to use Notify’sid
. It can be used to identify a single notification or a batch of notifications. - Updated method signature:
- Added
notifyClient.sendSms(templateId, phoneNumber, personalisation, reference);
* Where `personalisation` and `reference` can be `undefined`.
- Update to
notifyClient.sendEmail()
:- Added
reference
: an optional identifier you generate if you don’t want to use Notify’sid
. It can be used to identify a single notification or a batch of notifications. - Updated method signature:
- Added
notifyClient.sendEmail(templateId, emailAddress, personalisation, reference);
* Where `personalisation` and `reference` can be `undefined`.
NotificationClient.getAllNotifications()
- Notifications can now be filtered by
reference
andolderThanId
, see the README for details. - Updated method signature:
- Notifications can now be filtered by
notifyClient.getNotifications(templateType, status, reference, olderThanId);
* Each one of these parameters can be `undefined`
Changelog not recorded - please see pull requests on github.