mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2025-03-16 22:11:04 +08:00
Complete index.ts
This commit is contained in:
parent
07c9722551
commit
a891578f74
136
index.ts
136
index.ts
@ -1,6 +1,16 @@
|
|||||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
|
export interface TagOptions {
|
||||||
|
sequence: number;
|
||||||
|
tags?: Array<string>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AliasOptions {
|
||||||
|
sequence: number;
|
||||||
|
alias?: string;
|
||||||
|
}
|
||||||
|
|
||||||
@Plugin({
|
@Plugin({
|
||||||
pluginName: 'JPush',
|
pluginName: 'JPush',
|
||||||
plugin: 'jpush-phonegap-plugin',
|
plugin: 'jpush-phonegap-plugin',
|
||||||
@ -13,77 +23,53 @@ import { Injectable } from '@angular/core';
|
|||||||
@Injectable()
|
@Injectable()
|
||||||
export class JPush extends IonicNativePlugin {
|
export class JPush extends IonicNativePlugin {
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
init(): Promise<any> { return; }
|
init(): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
setDebugMode(enable: boolean): Promise<any> { return; }
|
setDebugMode(enable: boolean): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
getRegistrationID(): Promise<any> { return; }
|
getRegistrationID(): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
stopPush(): Promise<any> { return; }
|
stopPush(): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
resumePush(): Promise<any> { return; }
|
resumePush(): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
isPushStopped(): Promise<any> { return; }
|
isPushStopped(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
@Cordova()
|
||||||
* @param params { sequence: number, tags: [string, string] }
|
setTags(params: TagOptions): Promise<any> { return; }
|
||||||
*/
|
|
||||||
@Cordova
|
|
||||||
setTags(params: object): Promise<any> { return; }
|
|
||||||
|
|
||||||
/**
|
@Cordova()
|
||||||
* @param params { sequence: number, tags: [string, string] }
|
addTags(params: TagOptions): Promise<any> { return; }
|
||||||
*/
|
|
||||||
@Cordova
|
|
||||||
addTags(params: object): Promise<any> { return; }
|
|
||||||
|
|
||||||
/**
|
@Cordova()
|
||||||
* @param params { sequence: number, tags: [string, string] }
|
deleteTags(params: TagOptions): Promise<any> { return; }
|
||||||
*/
|
|
||||||
@Cordova
|
|
||||||
deleteTags(params: object): Promise<any> { return; }
|
|
||||||
|
|
||||||
/**
|
@Cordova()
|
||||||
* @param params { sequence: number }
|
cleanTags(params: TagOptions): Promise<any> { return; }
|
||||||
*/
|
|
||||||
@Cordova
|
|
||||||
cleanTags(params: object): Promise<any> { return; }
|
|
||||||
|
|
||||||
/**
|
@Cordova()
|
||||||
* @param params { sequence: number }
|
getAllTags(params: TagOptions): Promise<any> { return; }
|
||||||
*/
|
|
||||||
@Cordova
|
|
||||||
getAllTags(params: object): Promise<any> { return; }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param params { sequence: number, tag: string }
|
* @param params { sequence: number, tag: string }
|
||||||
*/
|
*/
|
||||||
@Cordova
|
@Cordova()
|
||||||
checkTagBindState(params: object): Promise<any> { return; }
|
checkTagBindState(params: object): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
@Cordova()
|
||||||
* @param params { sequence: number, alias: string }
|
setAlias(params: AliasOptions): Promise<any> { return; }
|
||||||
*/
|
|
||||||
@Cordova
|
|
||||||
setAlias(params: object): Promise<any> { return; }
|
|
||||||
|
|
||||||
/**
|
@Cordova()
|
||||||
* @param params { sequence: number }
|
deleteAlias(params: AliasOptions): Promise<any> { return; }
|
||||||
*/
|
|
||||||
@Cordova
|
|
||||||
deleteAlias(params: object): Promise<any> { return; }
|
|
||||||
|
|
||||||
/**
|
@Cordova()
|
||||||
* @param params { sequence: number }
|
getAlias(params: AliasOptions): Promise<any> { return; }
|
||||||
*/
|
|
||||||
@Cordova
|
|
||||||
getAlias(params: object): Promise<any> { return; }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determinate whether the application notification has been opened.
|
* Determinate whether the application notification has been opened.
|
||||||
@ -97,88 +83,88 @@ export class JPush extends IonicNativePlugin {
|
|||||||
*
|
*
|
||||||
* Android: 0: closed; 1: opened.
|
* Android: 0: closed; 1: opened.
|
||||||
*/
|
*/
|
||||||
@Cordova
|
@Cordova()
|
||||||
getUserNotificationSettings(): Promise<any> { return; }
|
getUserNotificationSettings(): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
clearLocalNotifications(): Promise<any> { return; }
|
clearLocalNotifications(): Promise<any> { return; }
|
||||||
|
|
||||||
// iOS API - start
|
// iOS API - start
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
setBadge(badge: number): Promise<any> { return; }
|
setBadge(badge: number): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
resetBadge(): Promise<any> { return; }
|
resetBadge(): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
setApplicationIconBadgeNumber(badge: number): Promise<any> { return; }
|
setApplicationIconBadgeNumber(badge: number): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
getApplicationIconBadgeNumber(): Promise<any> { return; }
|
getApplicationIconBadgeNumber(): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
addLocalNotificationForIOS(delayTime: number, content: string, badge: number, notificationId: number, extras: string): Promise<any> { return; }
|
addLocalNotificationForIOS(delayTime: number, content: string, badge: number, notificationId: number, extras?: string): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
deleteLocalNotificationWithIdentifierKeyInIOS(identifierKey: string): Promise<any> { return; }
|
deleteLocalNotificationWithIdentifierKeyInIOS(identifierKey: string): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
addDismissActions(actions: Array<object>, categoryId: string): Promise<any> { return; }
|
addDismissActions(actions: Array<object>, categoryId: string): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
addNotificationActions(actions: Array<object>, categoryId: string): Promise<any> { return; }
|
addNotificationActions(actions: Array<object>, categoryId: string): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
setLocation(latitude: number, longitude: number): Promise<any> { return; }
|
setLocation(latitude: number, longitude: number): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
startLogPageView(pageName: string): Promise<any> { return; }
|
startLogPageView(pageName: string): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
stopLogPageView(pageName: string): Promise<any> { return; }
|
stopLogPageView(pageName: string): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
beginLogPageView(pageName: string, duration: number): Promise<any> { return; }
|
beginLogPageView(pageName: string, duration: number): Promise<any> { return; }
|
||||||
|
|
||||||
// iOS API - end
|
// iOS API - end
|
||||||
|
|
||||||
// Android API - start
|
// Android API - start
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
getConnectionState(): Promise<any> { return; }
|
getConnectionState(): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
setBasicPushNotificationBuilder(): Promise<any> { return; }
|
setBasicPushNotificationBuilder(): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
setCustomPushNotificationBuilder(): Promise<any> { return; }
|
setCustomPushNotificationBuilder(): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
clearAllNotification(): Promise<any> { return; }
|
clearAllNotification(): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
clearNotificationById(id: number): Promise<any> { return; }
|
clearNotificationById(id: number): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
setLatestNotificationNum(num: number): Promise<any> { return; }
|
setLatestNotificationNum(num: number): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
addLocalNotification(builderId: number, content: string, title: string, notificationId: number, broadcastTime: number, extras: string): Promise<any> { return; }
|
addLocalNotification(builderId: number, content: string, title: string, notificationId: number, broadcastTime: number, extras?: string): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
removeLocalNotification(notificationId: number): Promise<any> { return; }
|
removeLocalNotification(notificationId: number): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
reportNotificationOpened(msgId: number): Promise<any> { return; }
|
reportNotificationOpened(msgId: number): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
requestPermission(): Promise<any> { return; }
|
requestPermission(): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
setSilenceTime(startHour: number, startMinute: number, endHour: number, endMinute: number): Promise<any> { return; }
|
setSilenceTime(startHour: number, startMinute: number, endHour: number, endMinute: number): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova
|
@Cordova()
|
||||||
setPushTime(weekdays: Array<string>, startHour: number, endHour: number): Promise<any> { return; }
|
setPushTime(weekdays: Array<string>, startHour: number, endHour: number): Promise<any> { return; }
|
||||||
|
|
||||||
// Android API - end
|
// Android API - end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user