Skip to content

Commit 1ac2457

Browse files
committed
remove node-pushnotifications
remove all push providers
1 parent 6e007fc commit 1ac2457

10 files changed

+6
-438
lines changed

README.md

+2-116
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
## Features
3333

34-
* **Easy channel integration** — Want to start sending `emails` | `SMS` | `pushes` | `webpushes` | `slack`? Do so in no time!
34+
* **Easy channel integration** — Want to start sending `emails` | `SMS` | `webpushes` | `slack`? Do so in no time!
3535

3636
* **Unique documentation** — Don't look everywhere for the parameters you need to pass, just do it once. **Switching provider becomes a no-brainer**.
3737

@@ -113,7 +113,7 @@ new NotifmeSdk({
113113

114114
| Option name | Required | Type | Description |
115115
| --- | --- | --- | --- |
116-
| `channels` | `false` | `Object` | Define `providers` (`Array`) and `multiProviderStrategy` (`string`) for each channel (email, sms, push, webpush, slack).<br><br>See all details below: [2. Providers](#2-providers). |
116+
| `channels` | `false` | `Object` | Define `providers` (`Array`) and `multiProviderStrategy` (`string`) for each channel (email, sms, webpush, slack).<br><br>See all details below: [2. Providers](#2-providers). |
117117
| `useNotificationCatcher` | `false` | `boolean` | If true, all your notifications are sent to the catcher running on localhost:1025 (channels option will be completely ignored!) |
118118

119119
#### Complete examples
@@ -567,120 +567,6 @@ new NotifmeSdk({
567567

568568
See all options: [Voice provider options](https://github.com/notifme/notifme-sdk/blob/master/src/models/provider-voice.js)
569569

570-
#### Push providers
571-
572-
<details><summary>Logger <i>(for development)</i></summary><p>
573-
574-
```javascript
575-
new NotifmeSdk({
576-
channels: {
577-
push: {
578-
providers: [{
579-
type: 'logger'
580-
}]
581-
}
582-
}
583-
})
584-
```
585-
586-
</p></details>
587-
<details><summary>APN (Apple Push Notification)</summary><p>
588-
589-
```javascript
590-
new NotifmeSdk({
591-
channels: {
592-
push: {
593-
providers: [{
594-
type: 'apn',
595-
token: {
596-
key: './certs/key.p8',
597-
keyId: 'xxxxx',
598-
teamId: 'xxxxx'
599-
}
600-
}]
601-
}
602-
}
603-
})
604-
```
605-
606-
</p></details>
607-
<details><summary>FCM (Firebase Cloud Messaging, previously called GCM, Google Cloud Messaging)</summary><p>
608-
609-
```javascript
610-
new NotifmeSdk({
611-
channels: {
612-
push: {
613-
providers: [{
614-
type: 'fcm',
615-
id: 'xxxxx'
616-
}]
617-
}
618-
}
619-
})
620-
```
621-
622-
</p></details>
623-
<details><summary>WNS (Windows Push Notification)</summary><p>
624-
625-
```javascript
626-
new NotifmeSdk({
627-
channels: {
628-
push: {
629-
providers: [{
630-
type: 'wns',
631-
clientId: 'xxxxx',
632-
clientSecret: 'xxxxx',
633-
notificationMethod: 'sendTileSquareBlock'
634-
}]
635-
}
636-
}
637-
})
638-
```
639-
640-
</p></details>
641-
<details><summary>ADM (Amazon Device Messaging)</summary><p>
642-
643-
```javascript
644-
new NotifmeSdk({
645-
channels: {
646-
push: {
647-
providers: [{
648-
type: 'adm',
649-
clientId: 'xxxxx',
650-
clientSecret: 'xxxxx'
651-
}]
652-
}
653-
}
654-
})
655-
```
656-
657-
</p></details>
658-
<details><summary>Custom <i>(define your own)</i></summary><p>
659-
660-
```javascript
661-
new NotifmeSdk({
662-
channels: {
663-
push: {
664-
providers: [{
665-
type: 'custom',
666-
id: 'my-custom-push-provider...',
667-
send: async (request) => {
668-
// Send push
669-
return 'id...'
670-
}
671-
}]
672-
}
673-
}
674-
})
675-
```
676-
677-
`request` being of [the following type](https://github.com/notifme/notifme-sdk/blob/master/src/models/notification-request.js#L33-L74).
678-
679-
</p></details>
680-
<br>
681-
682-
See all options: [Push provider options](https://github.com/notifme/notifme-sdk/blob/master/src/models/provider-push.js)
683-
684570
#### Webpush providers
685571

686572
<details><summary>Logger <i>(for development)</i></summary><p>

package.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "arkime-notifme-sdk",
3-
"version": "1.11.1",
4-
"description": "Unified notification SDK (emails, SMS, pushes, webpushes...) for Node.js",
3+
"version": "1.11.2",
4+
"description": "Unified notification SDK (emails, SMS, webpushes...) for Node.js",
55
"main": "lib/index.js",
66
"repository": "https://github.com/arkime/notifme-sdk",
77
"author": "Notif.me",
@@ -25,7 +25,6 @@
2525
"form-data": "4.0.0",
2626
"https-proxy-agent": "5.0.0",
2727
"node-fetch": "2.6.7",
28-
"node-pushnotifications": "2.0.3",
2928
"nodemailer": "6.6.2",
3029
"web-push": "3.4.5",
3130
"winston": "3.3.3"
@@ -68,7 +67,6 @@
6867
],
6968
"collectCoverageFrom": [
7069
"**/src/**/*.js",
71-
"!**/src/providers/push/**",
7270
"!**/src/util/**"
7371
],
7472
"coverageThreshold": {

src/providers/index.js

-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/* @flow */
22
import emailFactory from './email'
3-
import pushFactory from './push'
43
import smsFactory from './sms'
54
import voiceFactory from './voice'
65
import webpushFactory from './webpush'
@@ -31,9 +30,6 @@ export default function factory (channels: ChannelOptionsType): ProvidersType {
3130
case 'voice':
3231
return voiceFactory(config)
3332

34-
case 'push':
35-
return pushFactory(config)
36-
3733
case 'webpush':
3834
return webpushFactory(config)
3935

src/providers/push/adm.js

-30
This file was deleted.

src/providers/push/apn.js

-24
This file was deleted.

src/providers/push/fcm.js

-24
This file was deleted.

src/providers/push/index.js

-45
This file was deleted.

src/providers/push/notificationCatcher.js

-21
This file was deleted.

src/providers/push/wns.js

-30
This file was deleted.

0 commit comments

Comments
 (0)