mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
refactor(local-notification):
This commit is contained in:
parent
0231220c6f
commit
34e038d3ca
@ -1,4 +1,6 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
/**
|
||||
* @name Local Notifications
|
||||
* @description
|
||||
@ -57,7 +59,7 @@ export class LocalNotifications {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static schedule(options?: Notification|Array<Notification>): void {}
|
||||
static schedule(options?: Notification | Array<Notification>): void { }
|
||||
|
||||
/**
|
||||
* Updates a previously scheduled notification. Must include the id in the options parameter.
|
||||
@ -66,14 +68,14 @@ export class LocalNotifications {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static update(options?: Notification): void {}
|
||||
static update(options?: Notification): void { }
|
||||
|
||||
/**
|
||||
* Clears single or multiple notifications
|
||||
* @param notificationId A single notification id, or an array of notification ids.
|
||||
*/
|
||||
@Cordova()
|
||||
static clear(notificationId: any): Promise<any> {return; }
|
||||
static clear(notificationId: any): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Clears all notifications
|
||||
@ -82,14 +84,14 @@ export class LocalNotifications {
|
||||
successIndex: 0,
|
||||
errorIndex: 2
|
||||
})
|
||||
static clearAll(): Promise<any> {return; }
|
||||
static clearAll(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Cancels single or multiple notifications
|
||||
* @param notificationId A single notification id, or an array of notification ids.
|
||||
*/
|
||||
@Cordova()
|
||||
static cancel(notificationId: any): Promise<any> {return; }
|
||||
static cancel(notificationId: any): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Cancels all notifications
|
||||
@ -98,85 +100,85 @@ export class LocalNotifications {
|
||||
successIndex: 0,
|
||||
errorIndex: 2
|
||||
})
|
||||
static cancelAll(): Promise<any> {return; }
|
||||
static cancelAll(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Checks presence of a notification
|
||||
* @param notificationId
|
||||
*/
|
||||
@Cordova()
|
||||
static isPresent (notificationId: number): Promise<boolean> {return; }
|
||||
static isPresent(notificationId: number): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* Checks is a notification is scheduled
|
||||
* @param notificationId
|
||||
*/
|
||||
@Cordova()
|
||||
static isScheduled (notificationId: number): Promise<boolean> {return; }
|
||||
static isScheduled(notificationId: number): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* Checks if a notification is triggered
|
||||
* @param notificationId
|
||||
*/
|
||||
@Cordova()
|
||||
static isTriggered (notificationId: number): Promise<boolean> {return; }
|
||||
static isTriggered(notificationId: number): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* Get all the notification ids
|
||||
*/
|
||||
@Cordova()
|
||||
static getAllIds (): Promise<Array<number>> {return; }
|
||||
static getAllIds(): Promise<Array<number>> { return; }
|
||||
|
||||
/**
|
||||
* Get the ids of triggered notifications
|
||||
*/
|
||||
@Cordova()
|
||||
static getTriggeredIds (): Promise<Array<number>> {return; }
|
||||
static getTriggeredIds(): Promise<Array<number>> { return; }
|
||||
|
||||
/**
|
||||
* Get the ids of scheduled notifications
|
||||
*/
|
||||
@Cordova()
|
||||
static getScheduledIds (): Promise<Array<number>> {return; }
|
||||
static getScheduledIds(): Promise<Array<number>> { return; }
|
||||
|
||||
/**
|
||||
* Get a notification object
|
||||
* @param notificationId The id of the notification to get
|
||||
*/
|
||||
@Cordova()
|
||||
static get (notificationId: any): Promise <Notification> {return; }
|
||||
static get(notificationId: any): Promise<Notification> { return; }
|
||||
|
||||
/**
|
||||
* Get a scheduled notification object
|
||||
* @param notificationId The id of the notification to get
|
||||
*/
|
||||
@Cordova()
|
||||
static getScheduled (notificationId: any): Promise <Notification> {return; }
|
||||
static getScheduled(notificationId: any): Promise<Notification> { return; }
|
||||
|
||||
/**
|
||||
* Get a triggered notification object
|
||||
* @param notificationId The id of the notification to get
|
||||
*/
|
||||
@Cordova()
|
||||
static getTriggered (notificationId: any): Promise <Notification> {return; }
|
||||
static getTriggered(notificationId: any): Promise<Notification> { return; }
|
||||
|
||||
/**
|
||||
* Get all notification objects
|
||||
*/
|
||||
@Cordova()
|
||||
static getAll(): Promise<Array<Notification>> {return; }
|
||||
static getAll(): Promise<Array<Notification>> { return; }
|
||||
|
||||
/**
|
||||
* Get all scheduled notification objects
|
||||
*/
|
||||
@Cordova()
|
||||
static getAllScheduled(): Promise<Array<Notification>> {return; }
|
||||
static getAllScheduled(): Promise<Array<Notification>> { return; }
|
||||
|
||||
/**
|
||||
* Get all triggered notification objects
|
||||
*/
|
||||
@Cordova()
|
||||
static getAllTriggered(): Promise<Array<Notification>> {return; }
|
||||
static getAllTriggered(): Promise<Array<Notification>> { return; }
|
||||
|
||||
|
||||
/**
|
||||
@ -187,7 +189,7 @@ export class LocalNotifications {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static on(eventName: string, callback: any): void {}
|
||||
static on(eventName: string, callback: any): void { }
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user