Files
kami-parse-server/src/Adapters/Push/PushAdapter.js
Florent Vilmart d83a0b6808 Use Prettier JS (#5017)
* Adds prettier

* Run lint before tests
2018-09-01 13:58:06 -04:00

39 lines
831 B
JavaScript

// @flow
/*eslint no-unused-vars: "off"*/
// Push Adapter
//
// Allows you to change the push notification mechanism.
//
// Adapter classes must implement the following functions:
// * getValidPushTypes()
// * send(devices, installations, pushStatus)
//
// Default is ParsePushAdapter, which uses GCM for
// android push and APNS for ios push.
/**
* @module Adapters
*/
/**
* @interface PushAdapter
*/
export class PushAdapter {
/**
* @param {any} body
* @param {Parse.Installation[]} installations
* @param {any} pushStatus
* @returns {Promise}
*/
send(body: any, installations: any[], pushStatus: any): ?Promise<*> {}
/**
* Get an array of valid push types.
* @returns {Array} An array of valid push types
*/
getValidPushTypes(): string[] {
return [];
}
}
export default PushAdapter;