2017-01-13 19:34:04 -05:00
|
|
|
// @flow
|
2016-11-24 15:47:41 -05:00
|
|
|
/*eslint no-unused-vars: "off"*/
|
2016-02-08 12:02:07 -08:00
|
|
|
// Push Adapter
|
|
|
|
|
//
|
|
|
|
|
// Allows you to change the push notification mechanism.
|
|
|
|
|
//
|
|
|
|
|
// Adapter classes must implement the following functions:
|
2016-02-10 12:03:02 -08:00
|
|
|
// * getValidPushTypes()
|
2016-03-12 14:32:39 -05:00
|
|
|
// * send(devices, installations, pushStatus)
|
2016-02-08 12:02:07 -08:00
|
|
|
//
|
|
|
|
|
// Default is ParsePushAdapter, which uses GCM for
|
|
|
|
|
// android push and APNS for ios push.
|
2016-02-21 12:02:18 -05:00
|
|
|
|
2016-02-10 12:03:02 -08:00
|
|
|
export class PushAdapter {
|
2017-01-13 19:34:04 -05:00
|
|
|
send(body: any, installations: any[], pushStatus: any): ?Promise<*> {}
|
2016-02-08 12:02:07 -08:00
|
|
|
|
2016-02-21 12:02:18 -05:00
|
|
|
/**
|
|
|
|
|
* Get an array of valid push types.
|
|
|
|
|
* @returns {Array} An array of valid push types
|
|
|
|
|
*/
|
2017-01-13 19:34:04 -05:00
|
|
|
getValidPushTypes(): string[] {
|
|
|
|
|
return []
|
|
|
|
|
}
|
2016-02-08 12:02:07 -08:00
|
|
|
}
|
|
|
|
|
|
2016-02-10 12:03:02 -08:00
|
|
|
export default PushAdapter;
|