From 9d75ecb0e23bd7a4e1fea8e76227269d92da1b37 Mon Sep 17 00:00:00 2001 From: kobepeng Date: Wed, 7 Nov 2018 11:52:51 +0800 Subject: [PATCH] feat(jpush): integrate jpush with native ngx --- src/app/app.module.ts | 6 +- src/nativewrapper/jpush/index.d.ts | 69 ++++++++++++++++ src/nativewrapper/jpush/index.js | 69 ++++++++++++++++ src/nativewrapper/jpush/ngx/index.d.ts | 67 ++++++++++++++++ src/nativewrapper/jpush/ngx/index.js | 78 +++++++++++++++++++ .../jpush/ngx/index.metadata.json | 1 + 6 files changed, 287 insertions(+), 3 deletions(-) create mode 100644 src/nativewrapper/jpush/index.d.ts create mode 100644 src/nativewrapper/jpush/index.js create mode 100644 src/nativewrapper/jpush/ngx/index.d.ts create mode 100644 src/nativewrapper/jpush/ngx/index.js create mode 100644 src/nativewrapper/jpush/ngx/index.metadata.json diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 8117224..9966761 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -15,7 +15,7 @@ import { BackgroundMode } from '@ionic-native/background-mode/ngx'; import { StatusBar } from '@ionic-native/status-bar/ngx'; import { SplashScreen } from '@ionic-native/splash-screen/ngx'; -// import { JPush } from '@jiguang-ionic/jpush'; +import { JPush } from '../nativewrapper/jpush/ngx'; import { CoreModule } from './core/core.module'; import { SharedModule } from './shared/shared.module'; @@ -26,7 +26,7 @@ import { StoreModule } from '@ngrx/store'; import { MyApp } from './app.component'; import { MyErrorHandler } from './error.handler'; -// import { RavenErrorHandler } from './raven-error-handler.'; +import { RavenErrorHandler } from './raven-error-handler.'; @NgModule({ declarations: [MyApp], @@ -35,7 +35,6 @@ import { MyErrorHandler } from './error.handler'; CoreModule, SharedModule, BrowserModule, - // JPush, IonicStorageModule.forRoot(), IonicModule.forRoot(), StoreModule.forRoot({}), @@ -49,6 +48,7 @@ import { MyErrorHandler } from './error.handler'; SplashScreen, BackgroundMode, File, + JPush, FileTransfer, FileOpener, Insomnia, diff --git a/src/nativewrapper/jpush/index.d.ts b/src/nativewrapper/jpush/index.d.ts new file mode 100644 index 0000000..8d35814 --- /dev/null +++ b/src/nativewrapper/jpush/index.d.ts @@ -0,0 +1,69 @@ +import { IonicNativePlugin } from '@ionic-native/core'; +export interface TagOptions { + sequence: number; + tags?: string[]; +} +export interface AliasOptions { + sequence: number; + alias?: string; +} +export declare class JPushOriginal extends IonicNativePlugin { + init(): Promise; + setDebugMode(enable: boolean): Promise; + getRegistrationID(): Promise; + stopPush(): Promise; + resumePush(): Promise; + isPushStopped(): Promise; + setTags(params: TagOptions): Promise; + addTags(params: TagOptions): Promise; + deleteTags(params: TagOptions): Promise; + cleanTags(params: TagOptions): Promise; + getAllTags(params: TagOptions): Promise; + /** + * @param params { sequence: number, tag: string } + */ + checkTagBindState(params: object): Promise; + setAlias(params: AliasOptions): Promise; + deleteAlias(params: AliasOptions): Promise; + getAlias(params: AliasOptions): Promise; + /** + * Determinate whether the application notification has been opened. + * + * iOS: 0: closed; >1: opened. + * UIRemoteNotificationTypeNone = 0, + * UIRemoteNotificationTypeBadge = 1 << 0, + * UIRemoteNotificationTypeSound = 1 << 1, + * UIRemoteNotificationTypeAlert = 1 << 2, + * UIRemoteNotificationTypeNewsstandContentAvailability = 1 << 3 + * + * Android: 0: closed; 1: opened. + */ + getUserNotificationSettings(): Promise; + clearLocalNotifications(): Promise; + setBadge(badge: number): Promise; + resetBadge(): Promise; + setApplicationIconBadgeNumber(badge: number): Promise; + getApplicationIconBadgeNumber(): Promise; + addLocalNotificationForIOS(delayTime: number, content: string, badge: number, identifierKey: string, extras?: object): Promise; + deleteLocalNotificationWithIdentifierKeyInIOS(identifierKey: string): Promise; + addDismissActions(actions: object[], categoryId: string): Promise; + addNotificationActions(actions: object[], categoryId: string): Promise; + setLocation(latitude: number, longitude: number): Promise; + startLogPageView(pageName: string): Promise; + stopLogPageView(pageName: string): Promise; + beginLogPageView(pageName: string, duration: number): Promise; + getConnectionState(): Promise; + setBasicPushNotificationBuilder(): Promise; + setCustomPushNotificationBuilder(): Promise; + clearAllNotification(): Promise; + clearNotificationById(id: number): Promise; + setLatestNotificationNum(num: number): Promise; + addLocalNotification(builderId: number, content: string, title: string, notificationId: number, broadcastTime: number, extras?: string): Promise; + removeLocalNotification(notificationId: number): Promise; + reportNotificationOpened(msgId: number): Promise; + requestPermission(): Promise; + setSilenceTime(startHour: number, startMinute: number, endHour: number, endMinute: number): Promise; + setPushTime(weekdays: string[], startHour: number, endHour: number): Promise; +} + +export declare const JPush: JPushOriginal; \ No newline at end of file diff --git a/src/nativewrapper/jpush/index.js b/src/nativewrapper/jpush/index.js new file mode 100644 index 0000000..aee2d02 --- /dev/null +++ b/src/nativewrapper/jpush/index.js @@ -0,0 +1,69 @@ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +import { IonicNativePlugin, cordova } from '@ionic-native/core'; +var JPushOriginal = /** @class */ (function (_super) { + __extends(JPushOriginal, _super); + function JPushOriginal() { + return _super !== null && _super.apply(this, arguments) || this; + } + JPushOriginal.prototype.init = function () { return cordova(this, "init", {}, arguments); }; + JPushOriginal.prototype.setDebugMode = function (enable) { return cordova(this, "setDebugMode", {}, arguments); }; + JPushOriginal.prototype.getRegistrationID = function () { return cordova(this, "getRegistrationID", {}, arguments); }; + JPushOriginal.prototype.stopPush = function () { return cordova(this, "stopPush", {}, arguments); }; + JPushOriginal.prototype.resumePush = function () { return cordova(this, "resumePush", {}, arguments); }; + JPushOriginal.prototype.isPushStopped = function () { return cordova(this, "isPushStopped", {}, arguments); }; + JPushOriginal.prototype.setTags = function (params) { return cordova(this, "setTags", {}, arguments); }; + JPushOriginal.prototype.addTags = function (params) { return cordova(this, "addTags", {}, arguments); }; + JPushOriginal.prototype.deleteTags = function (params) { return cordova(this, "deleteTags", {}, arguments); }; + JPushOriginal.prototype.cleanTags = function (params) { return cordova(this, "cleanTags", {}, arguments); }; + JPushOriginal.prototype.getAllTags = function (params) { return cordova(this, "getAllTags", {}, arguments); }; + JPushOriginal.prototype.checkTagBindState = function (params) { return cordova(this, "checkTagBindState", {}, arguments); }; + JPushOriginal.prototype.setAlias = function (params) { return cordova(this, "setAlias", {}, arguments); }; + JPushOriginal.prototype.deleteAlias = function (params) { return cordova(this, "deleteAlias", {}, arguments); }; + JPushOriginal.prototype.getAlias = function (params) { return cordova(this, "getAlias", {}, arguments); }; + JPushOriginal.prototype.getUserNotificationSettings = function () { return cordova(this, "getUserNotificationSettings", {}, arguments); }; + JPushOriginal.prototype.clearLocalNotifications = function () { return cordova(this, "clearLocalNotifications", {}, arguments); }; + JPushOriginal.prototype.setBadge = function (badge) { return cordova(this, "setBadge", {}, arguments); }; + JPushOriginal.prototype.resetBadge = function () { return cordova(this, "resetBadge", {}, arguments); }; + JPushOriginal.prototype.setApplicationIconBadgeNumber = function (badge) { return cordova(this, "setApplicationIconBadgeNumber", {}, arguments); }; + JPushOriginal.prototype.getApplicationIconBadgeNumber = function () { return cordova(this, "getApplicationIconBadgeNumber", {}, arguments); }; + JPushOriginal.prototype.addLocalNotificationForIOS = function (delayTime, content, badge, identifierKey, extras) { return cordova(this, "addLocalNotificationForIOS", {}, arguments); }; + JPushOriginal.prototype.deleteLocalNotificationWithIdentifierKeyInIOS = function (identifierKey) { return cordova(this, "deleteLocalNotificationWithIdentifierKeyInIOS", {}, arguments); }; + JPushOriginal.prototype.addDismissActions = function (actions, categoryId) { return cordova(this, "addDismissActions", {}, arguments); }; + JPushOriginal.prototype.addNotificationActions = function (actions, categoryId) { return cordova(this, "addNotificationActions", {}, arguments); }; + JPushOriginal.prototype.setLocation = function (latitude, longitude) { return cordova(this, "setLocation", {}, arguments); }; + JPushOriginal.prototype.startLogPageView = function (pageName) { return cordova(this, "startLogPageView", {}, arguments); }; + JPushOriginal.prototype.stopLogPageView = function (pageName) { return cordova(this, "stopLogPageView", {}, arguments); }; + JPushOriginal.prototype.beginLogPageView = function (pageName, duration) { return cordova(this, "beginLogPageView", {}, arguments); }; + JPushOriginal.prototype.getConnectionState = function () { return cordova(this, "getConnectionState", {}, arguments); }; + JPushOriginal.prototype.setBasicPushNotificationBuilder = function () { return cordova(this, "setBasicPushNotificationBuilder", {}, arguments); }; + JPushOriginal.prototype.setCustomPushNotificationBuilder = function () { return cordova(this, "setCustomPushNotificationBuilder", {}, arguments); }; + JPushOriginal.prototype.clearAllNotification = function () { return cordova(this, "clearAllNotification", {}, arguments); }; + JPushOriginal.prototype.clearNotificationById = function (id) { return cordova(this, "clearNotificationById", {}, arguments); }; + JPushOriginal.prototype.setLatestNotificationNum = function (num) { return cordova(this, "setLatestNotificationNum", {}, arguments); }; + JPushOriginal.prototype.addLocalNotification = function (builderId, content, title, notificationId, broadcastTime, extras) { return cordova(this, "addLocalNotification", {}, arguments); }; + JPushOriginal.prototype.removeLocalNotification = function (notificationId) { return cordova(this, "removeLocalNotification", {}, arguments); }; + JPushOriginal.prototype.reportNotificationOpened = function (msgId) { return cordova(this, "reportNotificationOpened", {}, arguments); }; + JPushOriginal.prototype.requestPermission = function () { return cordova(this, "requestPermission", {}, arguments); }; + JPushOriginal.prototype.setSilenceTime = function (startHour, startMinute, endHour, endMinute) { return cordova(this, "setSilenceTime", {}, arguments); }; + JPushOriginal.prototype.setPushTime = function (weekdays, startHour, endHour) { return cordova(this, "setPushTime", {}, arguments); }; + JPushOriginal.pluginName = "JPush"; + JPushOriginal.plugin = "jpush-phonegap-plugin"; + JPushOriginal.pluginRef = "JPush"; + JPushOriginal.repo = "https://github.com/jpush/jpush-phonegap-plugin"; + JPushOriginal.install = "ionic cordova plugin add jpush-phonegap-plugin --variable APP_KEY=YOUR_APP_KEY"; + JPushOriginal.installVariables = ["APP_KEY"]; + JPushOriginal.platforms = ["Android", "iOS"]; + return JPushOriginal; +}(IonicNativePlugin)); +var JPush = new JPushOriginal(); +export { JPush }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvQGlvbmljLW5hdGl2ZS9wbHVnaW5zL2pwdXNoL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFDQSxPQUFPLDhCQUtOLE1BQU0sb0JBQW9CLENBQUM7O0lBc0JELHlCQUFpQjs7OztJQUUxQyxvQkFBSTtJQUlKLDRCQUFZLGFBQUMsTUFBZTtJQUk1QixpQ0FBaUI7SUFJakIsd0JBQVE7SUFJUiwwQkFBVTtJQUlWLDZCQUFhO0lBSWIsdUJBQU8sYUFBQyxNQUFrQjtJQUkxQix1QkFBTyxhQUFDLE1BQWtCO0lBSTFCLDBCQUFVLGFBQUMsTUFBa0I7SUFJN0IseUJBQVMsYUFBQyxNQUFrQjtJQUk1QiwwQkFBVSxhQUFDLE1BQWtCO0lBTzdCLGlDQUFpQixhQUFDLE1BQWM7SUFJaEMsd0JBQVEsYUFBQyxNQUFvQjtJQUk3QiwyQkFBVyxhQUFDLE1BQW9CO0lBSWhDLHdCQUFRLGFBQUMsTUFBb0I7SUFnQjdCLDJDQUEyQjtJQUkzQix1Q0FBdUI7SUFJdkIsd0JBQVEsYUFBQyxLQUFhO0lBSXRCLDBCQUFVO0lBSVYsNkNBQTZCLGFBQUMsS0FBYTtJQUkzQyw2Q0FBNkI7SUFJN0IsMENBQTBCLGFBQ3hCLFNBQWlCLEVBQ2pCLE9BQWUsRUFDZixLQUFhLEVBQ2IsYUFBcUIsRUFDckIsTUFBZTtJQUtqQiw2REFBNkMsYUFDM0MsYUFBcUI7SUFLdkIsaUNBQWlCLGFBQUMsT0FBaUIsRUFBRSxVQUFrQj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yxcbiAgICBub3RpZmljYXRpb25JZDogbnVtYmVyLFxuICAgIGJyb2FkY2FzdFRpbWU6IG51bWJlcixcbiAgICBleHRyYXM/OiBzdHJpbmdcbiAgKTogUHJvbWlzZTxhbnk+IHtcbiAgICByZXR1cm47XG4gIH1cbiAgQENvcmRvdmEoKVxuICByZW1vdmVMb2NhbE5vdGlmaWNhdGlvbihub3RpZmljYXRpb25JZDogbnVtYmVyKTogUHJvbWlzZTxhbnk+IHtcbiAgICByZXR1cm47XG4gIH1cbiAgQENvcmRvdmEoKVxuICByZXBvcnROb3RpZmljYXRpb25PcGVuZWQobXNnSWQ6IG51bWJlcik6IFByb21pc2U8YW55PiB7XG4gICAgcmV0dXJuO1xuICB9XG4gIEBDb3Jkb3ZhKClcbiAgcmVxdWVzdFBlcm1pc3Npb24oKTogUHJvbWlzZTxhbnk+IHtcbiAgICByZXR1cm47XG4gIH1cbiAgQENvcmRvdmEoKVxuICBzZXRTaWxlbmNlVGltZShcbiAgICBzdGFydEhvdXI6IG51bWJlcixcbiAgICBzdGFydE1pbnV0ZTogbnVtYmVyLFxuICAgIGVuZEhvdXI6IG51bWJlcixcbiAgICBlbmRNaW51dGU6IG51bWJlclxuICApOiBQcm9taXNlPGFueT4ge1xuICAgIHJldHVybjtcbiAgfVxuICBAQ29yZG92YSgpXG4gIHNldFB1c2hUaW1lKFxuICAgIHdlZWtkYXlzOiBzdHJpbmdbXSxcbiAgICBzdGFydEhvdXI6IG51bWJlcixcbiAgICBlbmRIb3VyOiBudW1iZXJcbiAgKTogUHJvbWlzZTxhbnk+IHtcbiAgICByZXR1cm47XG4gIH1cbn1cbiJdfQ== \ No newline at end of file diff --git a/src/nativewrapper/jpush/ngx/index.d.ts b/src/nativewrapper/jpush/ngx/index.d.ts new file mode 100644 index 0000000..89868ba --- /dev/null +++ b/src/nativewrapper/jpush/ngx/index.d.ts @@ -0,0 +1,67 @@ +import { IonicNativePlugin } from '@ionic-native/core'; +export interface TagOptions { + sequence: number; + tags?: string[]; +} +export interface AliasOptions { + sequence: number; + alias?: string; +} +export declare class JPush extends IonicNativePlugin { + init(): Promise; + setDebugMode(enable: boolean): Promise; + getRegistrationID(): Promise; + stopPush(): Promise; + resumePush(): Promise; + isPushStopped(): Promise; + setTags(params: TagOptions): Promise; + addTags(params: TagOptions): Promise; + deleteTags(params: TagOptions): Promise; + cleanTags(params: TagOptions): Promise; + getAllTags(params: TagOptions): Promise; + /** + * @param params { sequence: number, tag: string } + */ + checkTagBindState(params: object): Promise; + setAlias(params: AliasOptions): Promise; + deleteAlias(params: AliasOptions): Promise; + getAlias(params: AliasOptions): Promise; + /** + * Determinate whether the application notification has been opened. + * + * iOS: 0: closed; >1: opened. + * UIRemoteNotificationTypeNone = 0, + * UIRemoteNotificationTypeBadge = 1 << 0, + * UIRemoteNotificationTypeSound = 1 << 1, + * UIRemoteNotificationTypeAlert = 1 << 2, + * UIRemoteNotificationTypeNewsstandContentAvailability = 1 << 3 + * + * Android: 0: closed; 1: opened. + */ + getUserNotificationSettings(): Promise; + clearLocalNotifications(): Promise; + setBadge(badge: number): Promise; + resetBadge(): Promise; + setApplicationIconBadgeNumber(badge: number): Promise; + getApplicationIconBadgeNumber(): Promise; + addLocalNotificationForIOS(delayTime: number, content: string, badge: number, identifierKey: string, extras?: object): Promise; + deleteLocalNotificationWithIdentifierKeyInIOS(identifierKey: string): Promise; + addDismissActions(actions: object[], categoryId: string): Promise; + addNotificationActions(actions: object[], categoryId: string): Promise; + setLocation(latitude: number, longitude: number): Promise; + startLogPageView(pageName: string): Promise; + stopLogPageView(pageName: string): Promise; + beginLogPageView(pageName: string, duration: number): Promise; + getConnectionState(): Promise; + setBasicPushNotificationBuilder(): Promise; + setCustomPushNotificationBuilder(): Promise; + clearAllNotification(): Promise; + clearNotificationById(id: number): Promise; + setLatestNotificationNum(num: number): Promise; + addLocalNotification(builderId: number, content: string, title: string, notificationId: number, broadcastTime: number, extras?: string): Promise; + removeLocalNotification(notificationId: number): Promise; + reportNotificationOpened(msgId: number): Promise; + requestPermission(): Promise; + setSilenceTime(startHour: number, startMinute: number, endHour: number, endMinute: number): Promise; + setPushTime(weekdays: string[], startHour: number, endHour: number): Promise; +} diff --git a/src/nativewrapper/jpush/ngx/index.js b/src/nativewrapper/jpush/ngx/index.js new file mode 100644 index 0000000..2c37ff5 --- /dev/null +++ b/src/nativewrapper/jpush/ngx/index.js @@ -0,0 +1,78 @@ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +import { Injectable } from '@angular/core'; +import { IonicNativePlugin, cordova } from '@ionic-native/core'; +var JPush = /** @class */ (function (_super) { + __extends(JPush, _super); + function JPush() { + return _super !== null && _super.apply(this, arguments) || this; + } + JPush.prototype.init = function () { return cordova(this, "init", {}, arguments); }; + JPush.prototype.setDebugMode = function (enable) { return cordova(this, "setDebugMode", {}, arguments); }; + JPush.prototype.getRegistrationID = function () { return cordova(this, "getRegistrationID", {}, arguments); }; + JPush.prototype.stopPush = function () { return cordova(this, "stopPush", {}, arguments); }; + JPush.prototype.resumePush = function () { return cordova(this, "resumePush", {}, arguments); }; + JPush.prototype.isPushStopped = function () { return cordova(this, "isPushStopped", {}, arguments); }; + JPush.prototype.setTags = function (params) { return cordova(this, "setTags", {}, arguments); }; + JPush.prototype.addTags = function (params) { return cordova(this, "addTags", {}, arguments); }; + JPush.prototype.deleteTags = function (params) { return cordova(this, "deleteTags", {}, arguments); }; + JPush.prototype.cleanTags = function (params) { return cordova(this, "cleanTags", {}, arguments); }; + JPush.prototype.getAllTags = function (params) { return cordova(this, "getAllTags", {}, arguments); }; + JPush.prototype.checkTagBindState = function (params) { return cordova(this, "checkTagBindState", {}, arguments); }; + JPush.prototype.setAlias = function (params) { return cordova(this, "setAlias", {}, arguments); }; + JPush.prototype.deleteAlias = function (params) { return cordova(this, "deleteAlias", {}, arguments); }; + JPush.prototype.getAlias = function (params) { return cordova(this, "getAlias", {}, arguments); }; + JPush.prototype.getUserNotificationSettings = function () { return cordova(this, "getUserNotificationSettings", {}, arguments); }; + JPush.prototype.clearLocalNotifications = function () { return cordova(this, "clearLocalNotifications", {}, arguments); }; + JPush.prototype.setBadge = function (badge) { return cordova(this, "setBadge", {}, arguments); }; + JPush.prototype.resetBadge = function () { return cordova(this, "resetBadge", {}, arguments); }; + JPush.prototype.setApplicationIconBadgeNumber = function (badge) { return cordova(this, "setApplicationIconBadgeNumber", {}, arguments); }; + JPush.prototype.getApplicationIconBadgeNumber = function () { return cordova(this, "getApplicationIconBadgeNumber", {}, arguments); }; + JPush.prototype.addLocalNotificationForIOS = function (delayTime, content, badge, identifierKey, extras) { return cordova(this, "addLocalNotificationForIOS", {}, arguments); }; + JPush.prototype.deleteLocalNotificationWithIdentifierKeyInIOS = function (identifierKey) { return cordova(this, "deleteLocalNotificationWithIdentifierKeyInIOS", {}, arguments); }; + JPush.prototype.addDismissActions = function (actions, categoryId) { return cordova(this, "addDismissActions", {}, arguments); }; + JPush.prototype.addNotificationActions = function (actions, categoryId) { return cordova(this, "addNotificationActions", {}, arguments); }; + JPush.prototype.setLocation = function (latitude, longitude) { return cordova(this, "setLocation", {}, arguments); }; + JPush.prototype.startLogPageView = function (pageName) { return cordova(this, "startLogPageView", {}, arguments); }; + JPush.prototype.stopLogPageView = function (pageName) { return cordova(this, "stopLogPageView", {}, arguments); }; + JPush.prototype.beginLogPageView = function (pageName, duration) { return cordova(this, "beginLogPageView", {}, arguments); }; + JPush.prototype.getConnectionState = function () { return cordova(this, "getConnectionState", {}, arguments); }; + JPush.prototype.setBasicPushNotificationBuilder = function () { return cordova(this, "setBasicPushNotificationBuilder", {}, arguments); }; + JPush.prototype.setCustomPushNotificationBuilder = function () { return cordova(this, "setCustomPushNotificationBuilder", {}, arguments); }; + JPush.prototype.clearAllNotification = function () { return cordova(this, "clearAllNotification", {}, arguments); }; + JPush.prototype.clearNotificationById = function (id) { return cordova(this, "clearNotificationById", {}, arguments); }; + JPush.prototype.setLatestNotificationNum = function (num) { return cordova(this, "setLatestNotificationNum", {}, arguments); }; + JPush.prototype.addLocalNotification = function (builderId, content, title, notificationId, broadcastTime, extras) { return cordova(this, "addLocalNotification", {}, arguments); }; + JPush.prototype.removeLocalNotification = function (notificationId) { return cordova(this, "removeLocalNotification", {}, arguments); }; + JPush.prototype.reportNotificationOpened = function (msgId) { return cordova(this, "reportNotificationOpened", {}, arguments); }; + JPush.prototype.requestPermission = function () { return cordova(this, "requestPermission", {}, arguments); }; + JPush.prototype.setSilenceTime = function (startHour, startMinute, endHour, endMinute) { return cordova(this, "setSilenceTime", {}, arguments); }; + JPush.prototype.setPushTime = function (weekdays, startHour, endHour) { return cordova(this, "setPushTime", {}, arguments); }; + JPush.pluginName = "JPush"; + JPush.plugin = "jpush-phonegap-plugin"; + JPush.pluginRef = "JPush"; + JPush.repo = "https://github.com/jpush/jpush-phonegap-plugin"; + JPush.install = "ionic cordova plugin add jpush-phonegap-plugin --variable APP_KEY=YOUR_APP_KEY"; + JPush.installVariables = ["APP_KEY"]; + JPush.platforms = ["Android", "iOS"]; + JPush = __decorate([ + Injectable() + ], JPush); + return JPush; +}(IonicNativePlugin)); +export { JPush }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW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bm90aWZpY2F0aW9uSWQ6IG51bWJlcixcbiAgICBicm9hZGNhc3RUaW1lOiBudW1iZXIsXG4gICAgZXh0cmFzPzogc3RyaW5nXG4gICk6IFByb21pc2U8YW55PiB7XG4gICAgcmV0dXJuO1xuICB9XG4gIEBDb3Jkb3ZhKClcbiAgcmVtb3ZlTG9jYWxOb3RpZmljYXRpb24obm90aWZpY2F0aW9uSWQ6IG51bWJlcik6IFByb21pc2U8YW55PiB7XG4gICAgcmV0dXJuO1xuICB9XG4gIEBDb3Jkb3ZhKClcbiAgcmVwb3J0Tm90aWZpY2F0aW9uT3BlbmVkKG1zZ0lkOiBudW1iZXIpOiBQcm9taXNlPGFueT4ge1xuICAgIHJldHVybjtcbiAgfVxuICBAQ29yZG92YSgpXG4gIHJlcXVlc3RQZXJtaXNzaW9uKCk6IFByb21pc2U8YW55PiB7XG4gICAgcmV0dXJuO1xuICB9XG4gIEBDb3Jkb3ZhKClcbiAgc2V0U2lsZW5jZVRpbWUoXG4gICAgc3RhcnRIb3VyOiBudW1iZXIsXG4gICAgc3RhcnRNaW51dGU6IG51bWJlcixcbiAgICBlbmRIb3VyOiBudW1iZXIsXG4gICAgZW5kTWludXRlOiBudW1iZXJcbiAgKTogUHJvbWlzZTxhbnk+IHtcbiAgICByZXR1cm47XG4gIH1cbiAgQENvcmRvdmEoKVxuICBzZXRQdXNoVGltZShcbiAgICB3ZWVrZGF5czogc3RyaW5nW10sXG4gICAgc3RhcnRIb3VyOiBudW1iZXIsXG4gICAgZW5kSG91cjogbnVtYmVyXG4gICk6IFByb21pc2U8YW55PiB7XG4gICAgcmV0dXJuO1xuICB9XG59XG4iXX0= \ No newline at end of file diff --git a/src/nativewrapper/jpush/ngx/index.metadata.json b/src/nativewrapper/jpush/ngx/index.metadata.json new file mode 100644 index 0000000..ae7d5e9 --- /dev/null +++ b/src/nativewrapper/jpush/ngx/index.metadata.json @@ -0,0 +1 @@ +[{"__symbolic":"module","version":4,"metadata":{"TagOptions":{"__symbolic":"interface"},"AliasOptions":{"__symbolic":"interface"},"JPush":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@ionic-native/core","name":"IonicNativePlugin","line":28,"character":27},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":27,"character":1}}],"members":{"init":[{"__symbolic":"method"}],"setDebugMode":[{"__symbolic":"method"}],"getRegistrationID":[{"__symbolic":"method"}],"stopPush":[{"__symbolic":"method"}],"resumePush":[{"__symbolic":"method"}],"isPushStopped":[{"__symbolic":"method"}],"setTags":[{"__symbolic":"method"}],"addTags":[{"__symbolic":"method"}],"deleteTags":[{"__symbolic":"method"}],"cleanTags":[{"__symbolic":"method"}],"getAllTags":[{"__symbolic":"method"}],"checkTagBindState":[{"__symbolic":"method"}],"setAlias":[{"__symbolic":"method"}],"deleteAlias":[{"__symbolic":"method"}],"getAlias":[{"__symbolic":"method"}],"getUserNotificationSettings":[{"__symbolic":"method"}],"clearLocalNotifications":[{"__symbolic":"method"}],"setBadge":[{"__symbolic":"method"}],"resetBadge":[{"__symbolic":"method"}],"setApplicationIconBadgeNumber":[{"__symbolic":"method"}],"getApplicationIconBadgeNumber":[{"__symbolic":"method"}],"addLocalNotificationForIOS":[{"__symbolic":"method"}],"deleteLocalNotificationWithIdentifierKeyInIOS":[{"__symbolic":"method"}],"addDismissActions":[{"__symbolic":"method"}],"addNotificationActions":[{"__symbolic":"method"}],"setLocation":[{"__symbolic":"method"}],"startLogPageView":[{"__symbolic":"method"}],"stopLogPageView":[{"__symbolic":"method"}],"beginLogPageView":[{"__symbolic":"method"}],"getConnectionState":[{"__symbolic":"method"}],"setBasicPushNotificationBuilder":[{"__symbolic":"method"}],"setCustomPushNotificationBuilder":[{"__symbolic":"method"}],"clearAllNotification":[{"__symbolic":"method"}],"clearNotificationById":[{"__symbolic":"method"}],"setLatestNotificationNum":[{"__symbolic":"method"}],"addLocalNotification":[{"__symbolic":"method"}],"removeLocalNotification":[{"__symbolic":"method"}],"reportNotificationOpened":[{"__symbolic":"method"}],"requestPermission":[{"__symbolic":"method"}],"setSilenceTime":[{"__symbolic":"method"}],"setPushTime":[{"__symbolic":"method"}]}}}}]