Merge in v5 code

This commit is contained in:
Ibby Hadeed
2017-12-28 07:28:44 -05:00
parent d43fe72f7b
commit 0f9c21ab42
255 changed files with 11473 additions and 6501 deletions
+42 -17
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, CordovaInstance, checkAvailability, IonicNativePlugin } from '@ionic-native/core';
import { checkAvailability, Cordova, CordovaInstance, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
declare const window: any;
@@ -49,8 +49,6 @@ export interface NotificationEventResponse {
* so that he could specify any custom code without having to use array notation (map['prop']) for all of them.
*/
export interface NotificationEventAdditionalData {
[name: string]: any;
/**
* Whether the notification was received while the app was in the foreground
*/
@@ -59,6 +57,8 @@ export interface NotificationEventAdditionalData {
coldstart?: boolean;
from?: string;
notId?: string;
[name: string]: any;
}
export interface IOSPushOptions {
@@ -200,7 +200,7 @@ export interface BrowserPushOptions {
/**
* URL for the push server you want to use.
* Default: http://push.api.phonegap.com/v1/push Optional.
* Default: http://push.api.phonegap.com/v1/push Optional.
*/
pushServiceURL?: string;
@@ -280,7 +280,7 @@ export type PushEvent = string;
* browser: {
* pushServiceURL: 'http://push.api.phonegap.com/v1/push'
* }
* };
* }
*
* const pushObject: PushObject = this.push.init(options);
*
@@ -328,28 +328,36 @@ export class Push extends IonicNativePlugin {
* @return {Promise<{isEnabled: boolean}>} Returns a Promise that resolves with an object with one property: isEnabled, a boolean that indicates if permission has been granted.
*/
@Cordova()
hasPermission(): Promise<{ isEnabled: boolean }> { return; }
hasPermission(): Promise<{ isEnabled: boolean }> {
return;
}
/**
* Create a new notification channel for Android O and above.
* @param channel {Channel}
*/
@Cordova()
createChannel(channel: Channel): Promise<any> { return; }
createChannel(channel: Channel): Promise<any> {
return;
}
/**
* Delete a notification channel for Android O and above.
* @param id
*/
@Cordova()
deleteChannel(id: string): Promise<any> { return; }
deleteChannel(id: string): Promise<any> {
return;
}
/**
* Returns a list of currently configured channels.
* @return {Promise<Channel[]>}
*/
@Cordova()
listChannels(): Promise<Channel[]> { return; }
listChannels(): Promise<Channel[]> {
return;
}
}
@@ -381,7 +389,9 @@ export class PushObject {
clearFunction: 'off',
clearWithArgs: true
})
on(event: PushEvent): Observable<EventResponse> { return; }
on(event: PushEvent): Observable<EventResponse> {
return;
}
/**
* The unregister method is used when the application no longer wants to receive push notifications.
@@ -389,7 +399,9 @@ export class PushObject {
* so you will need to re-register them if you want them to function again without an application reload.
*/
@CordovaInstance()
unregister(): Promise<any> { return; }
unregister(): Promise<any> {
return;
}
/**
* Set the badge count visible when the app is not running
@@ -402,13 +414,18 @@ export class PushObject {
@CordovaInstance({
callbackOrder: 'reverse'
})
setApplicationIconBadgeNumber(count?: number): Promise<any> { return; };
setApplicationIconBadgeNumber(count?: number): Promise<any> {
return;
}
/**
* Get the current badge count visible when the app is not running
* successHandler gets called with an integer which is the current badge count
*/
@CordovaInstance()
getApplicationIconBadgeNumber(): Promise<number> { return; }
getApplicationIconBadgeNumber(): Promise<number> {
return;
}
/**
* iOS only
@@ -417,13 +434,17 @@ export class PushObject {
* @param id
*/
@CordovaInstance()
finish(id?: string): Promise<any> { return; }
finish(id?: string): Promise<any> {
return;
}
/**
* Tells the OS to clear all notifications from the Notification Center
*/
@CordovaInstance()
clearAllNotifications(): Promise<any> { return; }
clearAllNotifications(): Promise<any> {
return;
}
/**
* The subscribe method is used when the application wants to subscribe a new topic to receive push notifications.
@@ -431,7 +452,9 @@ export class PushObject {
* @return {Promise<any>}
*/
@CordovaInstance()
subscribe(topic: string): Promise<any> { return; }
subscribe(topic: string): Promise<any> {
return;
}
/**
* The unsubscribe method is used when the application no longer wants to receive push notifications from a specific topic but continue to receive other push messages.
@@ -439,6 +462,8 @@ export class PushObject {
* @return {Promise<any>}
*/
@CordovaInstance()
unsubscribe(topic: string): Promise<any> { return; }
unsubscribe(topic: string): Promise<any> {
return;
}
}