-
Notifications
You must be signed in to change notification settings - Fork 151
/
Copy pathprovider-push.js
42 lines (41 loc) · 1.1 KB
/
provider-push.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* @flow */
import type { PushRequestType } from './notification-request'
export type PushProviderType = {
type: 'logger'
} | {
type: 'custom',
id: string,
send: (PushRequestType) => Promise<string>
} | {
// Doc: https://github.com/node-apn/node-apn/blob/master/doc/provider.markdown
type: 'apn', // Apple Push Notification
token?: {
key: string,
keyId: string,
teamId: string
},
cert?: string,
key?: string,
ca?: {filename: string}[],
pfx?: string,
passphrase?: string,
production?: boolean,
rejectUnauthorized?: boolean,
connectionRetryLimit?: number
} | {
// Doc: https://github.com/ToothlessGear/node-gcm
type: 'fcm', // Firebase Cloud Messaging (previously called GCM, Google Cloud Messaging)
id: string,
phonegap?: boolean
} | {
// Doc: https://github.com/tjanczuk/wns
type: 'wns', // Windows Push Notification
clientId: string,
clientSecret: string,
notificationMethod: string // sendTileSquareBlock, sendTileSquareImage...
} | {
// Doc: https://github.com/umano/node-adm
type: 'adm', // Amazon Device Messaging
clientId: string,
clientSecret: string
}