docs(firebase-messaging): update docs to support requestPermission forceShow and getToken tokenType options (#3047)

This commit is contained in:
Adam Duren 2019-06-02 21:56:00 -07:00 committed by Daniel Sogl
parent b79c8b1ea0
commit 312c126cc8

View File

@ -31,6 +31,12 @@ export interface IFirebaseAPSMessage {
export type IFirebaseMessage = IFirebaseAPSMessage | IFirebaseGCMMessage;
export interface IRequestPermissionOptions {
forceShow?: boolean;
}
export type FirebaseMessagingTokenType = 'apns-buffer' | 'apns-string';
/**
* @beta
* @name Firebase Messaging
@ -85,22 +91,27 @@ export class FirebaseMessaging extends IonicNativePlugin {
}
/**
* Grant permission to recieve push notifications (will trigger prompt on iOS).
* Grant permission to receive push notifications (will trigger prompt on iOS).
*
* @param {IRequestPermissionOptions} [options]
* @returns {Promise<string>}
*/
@Cordova({ sync: true })
requestPermission(): Promise<string> {
requestPermission(options?: { forceShow?: boolean }): Promise<string> {
return;
}
/**
* Returns a promise that fulfills with the current FCM token
*
* This method also accepts optional argument type.
* Currently iOS implementation supports values "apns-buffer" and "apns-string" that defines presentation of resolved APNS token.
*
* @param {FirebaseMessagingTokenType} [type] iOS only. Defines presentation of resolved APNS token
* @returns {Promise<string>}
*/
@Cordova({ sync: true })
getToken(): Promise<string> {
getToken(type?: FirebaseMessagingTokenType): Promise<string> {
return;
}