Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

notifications-node-client

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

notifications-node-client - npm Package Compare versions

Comparing version 7.0.0 to 7.0.1

4

CHANGELOG.md

@@ -0,1 +1,5 @@

## 7.0.1 - 2023-07-13
* Fix a bug with default behaviour for `confirmEmailBeforeDownload`, which coalesced false to null.
## 7.0.0 - 2023-01-12

@@ -2,0 +6,0 @@

2

client/notification.js

@@ -371,3 +371,3 @@ var ApiClient = require('./api_client');

data.confirm_email_before_download = options.confirmEmailBeforeDownload || null;
data.confirm_email_before_download = options.confirmEmailBeforeDownload !== undefined ? options.confirmEmailBeforeDownload : null;
data.retention_period = options.retentionPeriod || null

@@ -374,0 +374,0 @@ }

@@ -294,3 +294,3 @@ # Node.js client documentation

Your file will be available to download for a default period of 78 weeks (18 months). From 29 March 2023 we will reduce this to 26 weeks (6 months) for all new files. Files sent before 29 March will not be affected.
Your file will be available to download for a default period of 26 weeks (6 months).

@@ -302,4 +302,2 @@ To help protect your files you can also:

To turn these features on or off, you will need version 5.2.0 of the Node.js client library or a more recent version.
#### Add contact details to the file download page

@@ -368,34 +366,9 @@

This new security feature is optional. You should use it if you send files that are sensitive - for example, because they contain personal information about your users.
When a recipient clicks the link in the email you’ve sent them, they have to enter their email address. Only someone who knows the recipient’s email address can download the file.
From 29 March 2023, we will turn this feature on by default for every file you send. Files sent before 29 March will not be affected.
This security feature is turned on by default.
##### Turn on email address check
To use this feature before 29 March 2023 you will need version 5.2.0 of the Node.js client library, or a more recent version.
To make the recipient confirm their email address before downloading the file, set the `confirmEmailBeforeDownload` option to `true`.
You will not need to do this after 29 March.
```javascript
var fs = require('fs')
fs.readFile('path/to/document.pdf', function (err, pdfFile) {
console.log(err)
notifyClient.sendEmail(templateId, emailAddress, {
personalisation: {
first_name: 'Amala',
application_date: '2018-01-01',
link_to_file: notifyClient.prepareUpload(pdfFile, { confirmEmailBeforeDownload: true })
}
}).then(response => console.log(response)).catch(err => console.error(err))
})
```
##### Turn off email address check (not recommended)
If you do not want to use this feature after 29 March 2023, you can turn it off on a file-by-file basis.
If you do not want to use this feature, you can turn it off on a file-by-file basis.

@@ -435,4 +408,6 @@ To do this you will need version 5.2.0 of the Node.js client library, or a more recent version.

If you do not choose a value, the file will be available for the default period of 78 weeks (18 months).
If you do not choose a value, the file will be available for the default period of 26 weeks (6 months).
Files sent before 12 April 2023 had a longer default period of 78 weeks (18 months).
```javascript

@@ -439,0 +414,0 @@ var fs = require('fs')

{
"name": "notifications-node-client",
"version": "7.0.0",
"version": "7.0.1",
"homepage": "https://docs.notifications.service.gov.uk/node.html",

@@ -5,0 +5,0 @@ "repository": {

@@ -231,2 +231,9 @@ const chai = require('chai');

it('should allow send a file email confirmation to be disabled', () => {
let file = Buffer.alloc(2*1024*1024)
expect(
notifyClient.prepareUpload(file, {confirmEmailBeforeDownload: false})
).contains({is_csv: false, confirm_email_before_download: false, retention_period: null})
});
it('should allow send a file email confirmation to be set', () => {

@@ -233,0 +240,0 @@ let file = Buffer.alloc(2*1024*1024)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc