notifications-node-client 7.0.3 → 7.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/DOCUMENTATION.md +11 -5
- package/package.json +3 -2
- package/spec/api_client.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
## 7.0.3 - 2023-07-21
|
|
2
2
|
|
|
3
|
+
* Bump axios to the 1.x branch to address CVE-2023-45857. Due to underlying changes in Axios you may have to explicitly set the `protocol` property when constructing your `proxyConfig` object, if using a proxy.
|
|
4
|
+
|
|
5
|
+
## 7.0.3 - 2023-07-21
|
|
6
|
+
|
|
3
7
|
* Bump word-wrap from 1.2.3 to 1.2.4 to address CVE-2023-26115.
|
|
4
8
|
|
|
5
9
|
## 7.0.2 - 2023-07-13
|
package/DOCUMENTATION.md
CHANGED
|
@@ -316,7 +316,7 @@ Your email should also tell recipients how long the file will be available to do
|
|
|
316
316
|
|
|
317
317
|
#### Upload your file
|
|
318
318
|
|
|
319
|
-
You can upload PDF, CSV, .odt, .txt, .rtf, .xlsx and MS Word Document files. Your file must be smaller than 2MB. [Contact the GOV.UK Notify team](https://www.notifications.service.gov.uk/support/ask-question-give-feedback) if you need to send other file types.
|
|
319
|
+
You can upload PDF, CSV, JSON, .odt, .txt, .rtf, .xlsx and MS Word Document files. Your file must be smaller than 2MB. [Contact the GOV.UK Notify team](https://www.notifications.service.gov.uk/support/ask-question-give-feedback) if you need to send other file types.
|
|
320
320
|
|
|
321
321
|
Pass the file object as a value into the `personalisation` argument. For example:
|
|
322
322
|
|
|
@@ -398,10 +398,13 @@ fs.readFile('path/to/document.pdf', function (err, pdfFile) {
|
|
|
398
398
|
|
|
399
399
|
Set the number of weeks you want the file to be available using the `retentionPeriod` option.
|
|
400
400
|
|
|
401
|
-
You can choose any value between 1 week and 78 weeks.
|
|
402
|
-
|
|
403
401
|
To use this feature will need version 5.2.0 of the Node.js client library, or a more recent version.
|
|
404
402
|
|
|
403
|
+
You can choose any value between 1 week and 78 weeks. When deciding this, you should consider:
|
|
404
|
+
|
|
405
|
+
* the need to protect the recipient’s personal information
|
|
406
|
+
* whether the recipient will need to download the file again later
|
|
407
|
+
|
|
405
408
|
If you do not choose a value, the file will be available for the default period of 26 weeks (6 months).
|
|
406
409
|
|
|
407
410
|
Files sent before 12 April 2023 had a longer default period of 78 weeks (18 months).
|
|
@@ -872,7 +875,7 @@ If the request is not successful, the promise fails with an `err`.
|
|
|
872
875
|
|#`sending`|GOV.UK Notify has sent the message to the provider. The provider will try to deliver the message to the recipient for up to 72 hours. GOV.UK Notify is waiting for delivery information.|
|
|
873
876
|
|#`pending`|GOV.UK Notify is waiting for more delivery information.<br>GOV.UK Notify received a callback from the provider but the recipient’s device has not yet responded. Another callback from the provider determines the final status of the text message.|
|
|
874
877
|
|#`sent`|The message was sent to an international number. The mobile networks in some countries do not provide any more delivery information. The GOV.UK Notify website displays this status as 'Sent to an international number'.|
|
|
875
|
-
|#`delivered`|The message was successfully delivered.|
|
|
878
|
+
|#`delivered`|The message was successfully delivered. If a recipient blocks your sender name or mobile number, your message will still show as delivered.|
|
|
876
879
|
|#`permanent-failure`|The provider could not deliver the message. This can happen if the phone number was wrong or if the network operator rejects the message. If you’re sure that these phone numbers are correct, you should [contact GOV.UK Notify support](https://www.notifications.service.gov.uk/support). If not, you should remove them from your database. You’ll still be charged for text messages that cannot be delivered.
|
|
877
880
|
|#`temporary-failure`|The provider could not deliver the message. This can happen when the recipient’s phone is off, has no signal, or their text message inbox is full. You can try to send the message again. You’ll still be charged for text messages to phones that are not accepting messages.|
|
|
878
881
|
|#`technical-failure`|Your message was not sent because there was a problem between Notify and the provider.<br>You’ll have to try sending your messages again. You will not be charged for text messages that are affected by a technical failure.|
|
|
@@ -1207,7 +1210,10 @@ You can also set up [callbacks](#callbacks) for received text messages.
|
|
|
1207
1210
|
|
|
1208
1211
|
### Enable received text messages
|
|
1209
1212
|
|
|
1210
|
-
|
|
1213
|
+
To receive text messages:
|
|
1214
|
+
|
|
1215
|
+
1. Go to the **Text message settings** section of the **Settings** page.
|
|
1216
|
+
1. Select **Change** on the **Receive text messages** row.
|
|
1211
1217
|
|
|
1212
1218
|
### Get a page of received text messages
|
|
1213
1219
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "notifications-node-client",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.4",
|
|
4
4
|
"homepage": "https://docs.notifications.service.gov.uk/node.html",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"jsonwebtoken": "^9.0.0",
|
|
24
|
-
"axios": "^
|
|
24
|
+
"axios": "^1.2.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"chai": "4.1.2",
|
|
@@ -36,3 +36,4 @@
|
|
|
36
36
|
"standard-markdown": "5.0.1"
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
+
|
package/spec/api_client.js
CHANGED
|
@@ -82,7 +82,7 @@ describe('api client', function () {
|
|
|
82
82
|
|
|
83
83
|
it('should direct get requests through the proxy when set', function (done) {
|
|
84
84
|
var urlBase = 'https://api.notifications.service.gov.uk',
|
|
85
|
-
proxyConfig = { host: 'addressofmyproxy.test'},
|
|
85
|
+
proxyConfig = { host: 'addressofmyproxy.test', protocol: 'http'},
|
|
86
86
|
path = '/email',
|
|
87
87
|
apiClient = new ApiClient(urlBase, 'apiKey');
|
|
88
88
|
|
|
@@ -101,7 +101,7 @@ describe('api client', function () {
|
|
|
101
101
|
|
|
102
102
|
it('should direct post requests through the proxy when set', function (done) {
|
|
103
103
|
var urlBase = 'https://api.notifications.service.gov.uk',
|
|
104
|
-
proxyConfig = { host: 'addressofmyproxy.test'},
|
|
104
|
+
proxyConfig = { host: 'addressofmyproxy.test', protocol: 'http'},
|
|
105
105
|
path = '/email',
|
|
106
106
|
apiClient = new ApiClient(urlBase, 'apiKey');
|
|
107
107
|
|