diff --git a/src/@ionic-native/plugins/local-notifications/index.ts b/src/@ionic-native/plugins/local-notifications/index.ts index 38dbd7d5d4..8e98036c8a 100755 --- a/src/@ionic-native/plugins/local-notifications/index.ts +++ b/src/@ionic-native/plugins/local-notifications/index.ts @@ -483,6 +483,24 @@ export interface ILocalNotification { }) @Injectable() export class LocalNotifications extends IonicNativePlugin { + /** + * Informs if the app has the permission to show notifications. + * @returns {Promise} + */ + @Cordova() + hasPermission(): Promise { + return; + } + + /** + * Request permission to show notifications if not already granted. + * @returns {Promise} + */ + @Cordova() + requestPermission(): Promise { + return; + } + /** * Schedules a single or multiple notifications * @param options {Notification | Array} optional @@ -570,59 +588,59 @@ export class LocalNotifications extends IonicNativePlugin { } /** - * Get all the notification ids - * @returns {Promise>} + * Check if a notification has a given type. + * @param {number} id The ID of the notification. + * @param {string} type The type of the notification. + * @returns {Promise} */ @Cordova() - getIds(): Promise { + hasType(id: number, type: string): Promise { return; } /** - * Get the ids of triggered notifications - * @returns {Promise>} + * Get the type (triggered, scheduled) for the notification. + * @param {number} id The ID of the notification. */ @Cordova() - getTriggeredIds(): Promise { + getType(id: number): Promise { return; } /** - * Get the ids of scheduled notifications - * @returns {Promise>} Returns a promise + * Get all the notification ids + * @returns {Promise>} */ @Cordova() - getScheduledIds(): Promise { + getIds(): Promise { return; } /** - * Get a notification object - * @param notificationId {any} The id of the notification to get - * @returns {Promise} + * Get the ids of scheduled notifications + * @returns {Promise>} Returns a promise */ @Cordova() - get(notificationId: any): Promise { + getScheduledIds(): Promise { return; } /** - * Get a scheduled notification object - * @param notificationId {any} The id of the notification to get - * @returns {Promise} + * Get the ids of triggered notifications + * @returns {Promise>} */ @Cordova() - getScheduled(notificationId: any): Promise { + getTriggeredIds(): Promise { return; } /** - * Get a triggered notification object - * @param notificationId The id of the notification to get + * Get a notification object + * @param notificationId {any} The id of the notification to get * @returns {Promise} */ @Cordova() - getTriggered(notificationId: any): Promise { + get(notificationId: any): Promise { return; } @@ -636,38 +654,22 @@ export class LocalNotifications extends IonicNativePlugin { } /** - * Get all scheduled notification objects - * @returns {Promise>} - */ - @Cordova() - getAllScheduled(): Promise { - return; - } - - /** - * Get all triggered notification objects - * @returns {Promise>} - */ - @Cordova() - getAllTriggered(): Promise { - return; - } - - /** - * Request permission to show notifications if not already granted. - * @returns {Promise} + * Get a scheduled notification object + * @param notificationId {any} The id of the notification to get + * @returns {Promise} */ @Cordova() - requestPermission(): Promise { + getScheduled(notificationId: any): Promise { return; } /** - * Informs if the app has the permission to show notifications. - * @returns {Promise} + * Get a triggered notification object + * @param notificationId The id of the notification to get + * @returns {Promise} */ @Cordova() - hasPermission(): Promise { + getTriggered(notificationId: any): Promise { return; } @@ -678,10 +680,7 @@ export class LocalNotifications extends IonicNativePlugin { * @returns {Promise} */ @Cordova() - addActions( - groupId: any, - actions: ILocalNotificationAction[] - ): Promise { + addActions(groupId: any, actions: ILocalNotificationAction[]): Promise { return; } @@ -727,6 +726,24 @@ export class LocalNotifications extends IonicNativePlugin { return; } + /** + * Get all scheduled notification objects + * @returns {Promise>} + */ + @Cordova() + getAllScheduled(): Promise { + return; + } + + /** + * Get all triggered notification objects + * @returns {Promise>} + */ + @Cordova() + getAllTriggered(): Promise { + return; + } + /** * Sets a callback for a specific event * @param eventName {string} The name of the event. Available events: schedule, trigger, click, update, clear, clearall, cancel, cancelall. Custom event names are possible for actions