diff --git a/ionic/index.ts b/ionic/index.ts index 6753d17..0da14e7 100644 --- a/ionic/index.ts +++ b/ionic/index.ts @@ -23,11 +23,17 @@ export interface AliasOptions { @Injectable() export class JPush extends IonicNativePlugin { - @Cordova() - init(): Promise { return; } + @Cordova({ + sync: true, + platforms: ['iOS', 'Android'] + }) + init(): void { } - @Cordova() - setDebugMode(enable: boolean): Promise { return; } + @Cordova({ + sync: true, + platforms: ['iOS', 'Android'] + }) + setDebugMode(enable: boolean): void { } @Cordova() getRegistrationID(): Promise { return; } @@ -91,41 +97,74 @@ export class JPush extends IonicNativePlugin { // iOS API - start - @Cordova() - setBadge(badge: number): Promise { return; } + @Cordova({ + sync: true, + platforms: ['iOS'] + }) + setBadge(badge: number): void { } - @Cordova() - resetBadge(): Promise { return; } + @Cordova({ + sync: true, + platforms: ['iOS'] + }) + resetBadge(): void { } - @Cordova() - setApplicationIconBadgeNumber(badge: number): Promise { return; } + @Cordova({ + sync: true, + platforms: ['iOS'] + }) + setApplicationIconBadgeNumber(badge: number): void { } @Cordova() getApplicationIconBadgeNumber(): Promise { return; } - @Cordova() - addLocalNotificationForIOS(delayTime: number, content: string, badge: number, identifierKey: string, extras?: object): Promise { return; } + @Cordova({ + sync: true, + platforms: ['iOS'] + }) + addLocalNotificationForIOS(delayTime: number, content: string, badge: number, identifierKey: string, extras?: object): void { } - @Cordova() - deleteLocalNotificationWithIdentifierKeyInIOS(identifierKey: string): Promise { return; } + @Cordova({ + sync: true, + platforms: ['iOS'] + }) + deleteLocalNotificationWithIdentifierKeyInIOS(identifierKey: string): void { } - @Cordova() - addDismissActions(actions: Array, categoryId: string): Promise { return; } + @Cordova({ + sync: true, + platforms: ['iOS'] + }) + addDismissActions(actions: Array, categoryId: string): void { } - @Cordova() - addNotificationActions(actions: Array, categoryId: string): Promise { return; } + @Cordova({ + sync: true, + platforms: ['iOS'] + }) + addNotificationActions(actions: Array, categoryId: string): void { } - @Cordova() - setLocation(latitude: number, longitude: number): Promise { return; } + @Cordova({ + sync: true, + platforms: ['iOS'] + }) + setLocation(latitude: number, longitude: number): void { } - @Cordova() - startLogPageView(pageName: string): Promise { return; } + @Cordova({ + sync: true, + platforms: ['iOS'] + }) + startLogPageView(pageName: string): void { return; } - @Cordova() - stopLogPageView(pageName: string): Promise { return; } + @Cordova({ + sync: true, + platforms: ['iOS'] + }) + stopLogPageView(pageName: string): void { return; } - @Cordova() - beginLogPageView(pageName: string, duration: number): Promise { return; } + @Cordova({ + sync: true, + platforms: ['iOS'] + }) + beginLogPageView(pageName: string, duration: number): void { return; } // iOS API - end diff --git a/ionic/jpush/index.d.ts b/ionic/jpush/index.d.ts index 0046106..e74dbc6 100644 --- a/ionic/jpush/index.d.ts +++ b/ionic/jpush/index.d.ts @@ -7,9 +7,37 @@ export interface AliasOptions { sequence: number; alias?: string; } -export declare class JPush extends IonicNativePlugin { - init(): Promise; - setDebugMode(enable: boolean): Promise; +/** + * @name jpush + * @description + * This plugin does something + * + * @usage + * ```typescript + * import { jpush } from '@ionic-native/jpush'; + * + * + * constructor(private jpush: jpush) { } + * + * ... + * + * + * this.jpush.functionName('Hello', 123) + * .then((res: any) => console.log(res)) + * .catch((error: any) => console.error(error)); + * + * ``` + */ +export declare class JPushOriginal extends IonicNativePlugin { + /** + * This function does something + * @param arg1 {string} Some param to configure something + * @param arg2 {number} Another param to configure something + * @return {Promise} Returns a promise that resolves when something happens + */ + functionName(arg1: string, arg2: number): Promise; + init(): void; + setDebugMode(enable: boolean): void; getRegistrationID(): Promise; stopPush(): Promise; resumePush(): Promise; @@ -40,18 +68,18 @@ export declare class JPush extends IonicNativePlugin { */ getUserNotificationSettings(): Promise; clearLocalNotifications(): Promise; - setBadge(badge: number): Promise; - resetBadge(): Promise; - setApplicationIconBadgeNumber(badge: number): Promise; + setBadge(badge: number): void; + resetBadge(): void; + setApplicationIconBadgeNumber(badge: number): void; getApplicationIconBadgeNumber(): Promise; - addLocalNotificationForIOS(delayTime: number, content: string, badge: number, identifierKey: string, extras?: object): Promise; - deleteLocalNotificationWithIdentifierKeyInIOS(identifierKey: string): Promise; - addDismissActions(actions: Array, categoryId: string): Promise; - addNotificationActions(actions: Array, categoryId: string): Promise; - setLocation(latitude: number, longitude: number): Promise; - startLogPageView(pageName: string): Promise; - stopLogPageView(pageName: string): Promise; - beginLogPageView(pageName: string, duration: number): Promise; + addLocalNotificationForIOS(delayTime: number, content: string, badge: number, identifierKey: string, extras?: object): void; + deleteLocalNotificationWithIdentifierKeyInIOS(identifierKey: string): void; + addDismissActions(actions: Array, categoryId: string): void; + addNotificationActions(actions: Array, categoryId: string): void; + setLocation(latitude: number, longitude: number): void; + startLogPageView(pageName: string): void; + stopLogPageView(pageName: string): void; + beginLogPageView(pageName: string, duration: number): void; getConnectionState(): Promise; setBasicPushNotificationBuilder(): Promise; setCustomPushNotificationBuilder(): Promise; @@ -65,3 +93,5 @@ export declare class JPush extends IonicNativePlugin { setSilenceTime(startHour: number, startMinute: number, endHour: number, endMinute: number): Promise; setPushTime(weekdays: Array, startHour: number, endHour: number): Promise; } + +export declare const JPush: JPushOriginal; \ No newline at end of file diff --git a/ionic/jpush/index.js b/ionic/jpush/index.js index 52e5b2b..0e1c15e 100644 --- a/ionic/jpush/index.js +++ b/ionic/jpush/index.js @@ -1,352 +1,73 @@ 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]; }; + var extendStatics = function (d, b) { + 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 extendStatics(d, b); + }; 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; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; -import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core'; -import { Injectable } from '@angular/core'; -var JPush = (function (_super) { - __extends(JPush, _super); - function JPush() { +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; } - JPush.prototype.init = function () { return; }; - JPush.prototype.setDebugMode = function (enable) { return; }; - JPush.prototype.getRegistrationID = function () { return; }; - JPush.prototype.stopPush = function () { return; }; - JPush.prototype.resumePush = function () { return; }; - JPush.prototype.isPushStopped = function () { return; }; - JPush.prototype.setTags = function (params) { return; }; - JPush.prototype.addTags = function (params) { return; }; - JPush.prototype.deleteTags = function (params) { return; }; - JPush.prototype.cleanTags = function (params) { return; }; - JPush.prototype.getAllTags = function (params) { return; }; - /** - * @param params { sequence: number, tag: string } - */ - JPush.prototype.checkTagBindState = function (params) { return; }; - JPush.prototype.setAlias = function (params) { return; }; - JPush.prototype.deleteAlias = function (params) { return; }; - JPush.prototype.getAlias = function (params) { return; }; - /** - * 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. - */ - JPush.prototype.getUserNotificationSettings = function () { return; }; - JPush.prototype.clearLocalNotifications = function () { return; }; - // iOS API - start - JPush.prototype.setBadge = function (badge) { return; }; - JPush.prototype.resetBadge = function () { return; }; - JPush.prototype.setApplicationIconBadgeNumber = function (badge) { return; }; - JPush.prototype.getApplicationIconBadgeNumber = function () { return; }; - JPush.prototype.addLocalNotificationForIOS = function (delayTime, content, badge, identifierKey, extras) { return; }; - JPush.prototype.deleteLocalNotificationWithIdentifierKeyInIOS = function (identifierKey) { return; }; - JPush.prototype.addDismissActions = function (actions, categoryId) { return; }; - JPush.prototype.addNotificationActions = function (actions, categoryId) { return; }; - JPush.prototype.setLocation = function (latitude, longitude) { return; }; - JPush.prototype.startLogPageView = function (pageName) { return; }; - JPush.prototype.stopLogPageView = function (pageName) { return; }; - JPush.prototype.beginLogPageView = function (pageName, duration) { return; }; - // iOS API - end - // Android API - start - JPush.prototype.getConnectionState = function () { return; }; - JPush.prototype.setBasicPushNotificationBuilder = function () { return; }; - JPush.prototype.setCustomPushNotificationBuilder = function () { return; }; - JPush.prototype.clearAllNotification = function () { return; }; - JPush.prototype.clearNotificationById = function (id) { return; }; - JPush.prototype.setLatestNotificationNum = function (num) { return; }; - JPush.prototype.addLocalNotification = function (builderId, content, title, notificationId, broadcastTime, extras) { return; }; - JPush.prototype.removeLocalNotification = function (notificationId) { return; }; - JPush.prototype.reportNotificationOpened = function (msgId) { return; }; - JPush.prototype.requestPermission = function () { return; }; - JPush.prototype.setSilenceTime = function (startHour, startMinute, endHour, endMinute) { return; }; - JPush.prototype.setPushTime = function (weekdays, startHour, endHour) { return; }; - // Android API - end - JPush.decorators = [ - { type: Injectable }, - ]; - /** @nocollapse */ - JPush.ctorParameters = function () { return []; }; - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", []), - __metadata("design:returntype", Promise) - ], JPush.prototype, "init", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", [Boolean]), - __metadata("design:returntype", Promise) - ], JPush.prototype, "setDebugMode", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", []), - __metadata("design:returntype", Promise) - ], JPush.prototype, "getRegistrationID", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", []), - __metadata("design:returntype", Promise) - ], JPush.prototype, "stopPush", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", []), - __metadata("design:returntype", Promise) - ], JPush.prototype, "resumePush", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", []), - __metadata("design:returntype", Promise) - ], JPush.prototype, "isPushStopped", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", [Object]), - __metadata("design:returntype", Promise) - ], JPush.prototype, "setTags", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", [Object]), - __metadata("design:returntype", Promise) - ], JPush.prototype, "addTags", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", [Object]), - __metadata("design:returntype", Promise) - ], JPush.prototype, "deleteTags", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", [Object]), - __metadata("design:returntype", Promise) - ], JPush.prototype, "cleanTags", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", [Object]), - __metadata("design:returntype", Promise) - ], JPush.prototype, "getAllTags", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", [Object]), - __metadata("design:returntype", Promise) - ], JPush.prototype, "checkTagBindState", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", [Object]), - __metadata("design:returntype", Promise) - ], JPush.prototype, "setAlias", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", [Object]), - __metadata("design:returntype", Promise) - ], JPush.prototype, "deleteAlias", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", [Object]), - __metadata("design:returntype", Promise) - ], JPush.prototype, "getAlias", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", []), - __metadata("design:returntype", Promise) - ], JPush.prototype, "getUserNotificationSettings", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", []), - __metadata("design:returntype", Promise) - ], JPush.prototype, "clearLocalNotifications", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", [Number]), - __metadata("design:returntype", Promise) - ], JPush.prototype, "setBadge", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", []), - __metadata("design:returntype", Promise) - ], JPush.prototype, "resetBadge", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", [Number]), - __metadata("design:returntype", Promise) - ], JPush.prototype, "setApplicationIconBadgeNumber", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", []), - __metadata("design:returntype", Promise) - ], JPush.prototype, "getApplicationIconBadgeNumber", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", [Number, String, Number, String, Object]), - __metadata("design:returntype", Promise) - ], JPush.prototype, "addLocalNotificationForIOS", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", [String]), - __metadata("design:returntype", Promise) - ], JPush.prototype, "deleteLocalNotificationWithIdentifierKeyInIOS", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", [Array, String]), - __metadata("design:returntype", Promise) - ], JPush.prototype, "addDismissActions", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", [Array, String]), - __metadata("design:returntype", Promise) - ], JPush.prototype, "addNotificationActions", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", [Number, Number]), - __metadata("design:returntype", Promise) - ], JPush.prototype, "setLocation", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", [String]), - __metadata("design:returntype", Promise) - ], JPush.prototype, "startLogPageView", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", [String]), - __metadata("design:returntype", Promise) - ], JPush.prototype, "stopLogPageView", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", [String, Number]), - __metadata("design:returntype", Promise) - ], JPush.prototype, "beginLogPageView", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", []), - __metadata("design:returntype", Promise) - ], JPush.prototype, "getConnectionState", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", []), - __metadata("design:returntype", Promise) - ], JPush.prototype, "setBasicPushNotificationBuilder", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", []), - __metadata("design:returntype", Promise) - ], JPush.prototype, "setCustomPushNotificationBuilder", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", []), - __metadata("design:returntype", Promise) - ], JPush.prototype, "clearAllNotification", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", [Number]), - __metadata("design:returntype", Promise) - ], JPush.prototype, "clearNotificationById", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", [Number]), - __metadata("design:returntype", Promise) - ], JPush.prototype, "setLatestNotificationNum", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", [Number, String, String, Number, Number, String]), - __metadata("design:returntype", Promise) - ], JPush.prototype, "addLocalNotification", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", [Number]), - __metadata("design:returntype", Promise) - ], JPush.prototype, "removeLocalNotification", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", [Number]), - __metadata("design:returntype", Promise) - ], JPush.prototype, "reportNotificationOpened", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", []), - __metadata("design:returntype", Promise) - ], JPush.prototype, "requestPermission", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", [Number, Number, Number, Number]), - __metadata("design:returntype", Promise) - ], JPush.prototype, "setSilenceTime", null); - __decorate([ - Cordova(), - __metadata("design:type", Function), - __metadata("design:paramtypes", [Array, Number, Number]), - __metadata("design:returntype", Promise) - ], JPush.prototype, "setPushTime", null); - JPush = __decorate([ - Plugin({ - pluginName: 'JPush', - plugin: 'jpush-phonegap-plugin', - pluginRef: 'plugins.jPushPlugin', - repo: 'https://github.com/jpush/jpush-phonegap-plugin', - install: 'ionic cordova plugin add jpush-phonegap-plugin --variable APP_KEY=your_app_key', - installVariables: ['APP_KEY'], - platforms: ['Android', 'iOS'] - }) - ], JPush); - return JPush; + JPushOriginal.prototype.functionName = function (arg1, arg2) { return cordova(this, "functionName", {}, arguments); }; + JPushOriginal.prototype.init = function () { return cordova(this, "init", { "sync": true, "platforms": ["iOS", "Android"] }, arguments); }; + JPushOriginal.prototype.setDebugMode = function (enable) { return cordova(this, "setDebugMode", { "sync": true, "platforms": ["iOS", "Android"] }, 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", { "sync": true, "platforms": ["iOS"] }, arguments); }; + JPushOriginal.prototype.resetBadge = function () { return cordova(this, "resetBadge", { "sync": true, "platforms": ["iOS"] }, arguments); }; + JPushOriginal.prototype.setApplicationIconBadgeNumber = function (badge) { return cordova(this, "setApplicationIconBadgeNumber", { "sync": true, "platforms": ["iOS"] }, arguments); }; + JPushOriginal.prototype.getApplicationIconBadgeNumber = function () { return cordova(this, "getApplicationIconBadgeNumber", {}, arguments); }; + JPushOriginal.prototype.addLocalNotificationForIOS = function (delayTime, content, badge, identifierKey, extras) { return cordova(this, "addLocalNotificationForIOS", { "sync": true, "platforms": ["iOS"] }, arguments); }; + JPushOriginal.prototype.deleteLocalNotificationWithIdentifierKeyInIOS = function (identifierKey) { return cordova(this, "deleteLocalNotificationWithIdentifierKeyInIOS", { "sync": true, "platforms": ["iOS"] }, arguments); }; + JPushOriginal.prototype.addDismissActions = function (actions, categoryId) { return cordova(this, "addDismissActions", { "sync": true, "platforms": ["iOS"] }, arguments); }; + JPushOriginal.prototype.addNotificationActions = function (actions, categoryId) { return cordova(this, "addNotificationActions", { "sync": true, "platforms": ["iOS"] }, arguments); }; + JPushOriginal.prototype.setLocation = function (latitude, longitude) { return cordova(this, "setLocation", { "sync": true, "platforms": ["iOS"] }, arguments); }; + JPushOriginal.prototype.startLogPageView = function (pageName) { return cordova(this, "startLogPageView", { "sync": true, "platforms": ["iOS"] }, arguments); }; + JPushOriginal.prototype.stopLogPageView = function (pageName) { return cordova(this, "stopLogPageView", { "sync": true, "platforms": ["iOS"] }, arguments); }; + JPushOriginal.prototype.beginLogPageView = function (pageName, duration) { return cordova(this, "beginLogPageView", { "sync": true, "platforms": ["iOS"] }, 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 = "plugins.jPushPlugin"; + 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=index.js.map \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvQGlvbmljLW5hdGl2ZS9wbHVnaW5zL2pwdXNoL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7QUFZQSxPQUFPLDhCQUEwRixNQUFNLG9CQUFvQixDQUFDOztJQXVEakcseUJBQWlCOzs7O0lBUzFDLDRCQUFZLGFBQUMsSUFBWSxFQUFFLElBQVk7SUFRdkMsb0JBQUk7SUFNSiw0QkFBWSxhQUFDLE1BQWU7SUFHNUIsaUNBQWlCO0lBR2pCLHdCQUFRO0lBR1IsMEJBQVU7SUFHViw2QkFBYTtJQUdiLHVCQUFPLGFBQUMsTUFBa0I7SUFHMUIsdUJBQU8sYUFBQyxNQUFrQjtJQUcxQiwwQkFBVSxhQUFDLE1BQWtCO0lBRzdCLHlCQUFTLGFBQUMsTUFBa0I7SUFHNUIsMEJBQVUsYUFBQyxNQUFrQjtJQU03QixpQ0FBaUIsYUFBQyxNQUFjO0lBR2hDLHdCQUFRLGFBQUMsTUFBb0I7SUFHN0IsMkJBQVcsYUFBQyxNQUFvQjtJQUdoQyx3QkFBUSxhQUFDLE1BQW9CO0lBZTdCLDJDQUEyQjtJQUczQix1Q0FBdUI7SUFRdkIsd0JBQVEsYUFBQyxLQUFhO0lBTXRCLDBCQUFVO0lBTVYsNkNBQTZCLGFBQUMsS0FBYTtJQUczQyw2Q0FBNkI7SUFNN0IsMENBQTBCLGFBQUMsU0FBaUIsRUFBRSxPQUFlLEVBQ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cm47IH1cblxuICBAQ29yZG92YSgpXG4gIHJlcXVlc3RQZXJtaXNzaW9uKCk6IFByb21pc2U8YW55PiB7IHJldHVybjsgfVxuXG4gIEBDb3Jkb3ZhKClcbiAgc2V0U2lsZW5jZVRpbWUoc3RhcnRIb3VyOiBudW1iZXIsIHN0YXJ0TWludXRlOiBudW1iZXIsIGVuZEhvdXI6IG51bWJlciwgZW5kTWludXRlOiBudW1iZXIpOiBQcm9taXNlPGFueT4geyByZXR1cm47IH1cblxuICBAQ29yZG92YSgpXG4gIHNldFB1c2hUaW1lKHdlZWtkYXlzOiBBcnJheTxzdHJpbmc+LCBzdGFydEhvdXI6IG51bWJlciwgZW5kSG91cjogbnVtYmVyKTogUHJvbWlzZTxhbnk+IHsgcmV0dXJuOyB9XG5cbiAgLy8gQW5kcm9pZCBBUEkgLSBlbmRcblxufVxuIl19 \ No newline at end of file diff --git a/ionic/jpush/ngx/index.d.ts b/ionic/jpush/ngx/index.d.ts new file mode 100644 index 0000000..7aaabf5 --- /dev/null +++ b/ionic/jpush/ngx/index.d.ts @@ -0,0 +1,95 @@ +import { IonicNativePlugin } from '@ionic-native/core'; +export interface TagOptions { + sequence: number; + tags?: Array; +} +export interface AliasOptions { + sequence: number; + alias?: string; +} +/** + * @name jpush + * @description + * This plugin does something + * + * @usage + * ```typescript + * import { jpush } from '@ionic-native/jpush'; + * + * + * constructor(private jpush: jpush) { } + * + * ... + * + * + * this.jpush.functionName('Hello', 123) + * .then((res: any) => console.log(res)) + * .catch((error: any) => console.error(error)); + * + * ``` + */ +export declare class JPush extends IonicNativePlugin { + /** + * This function does something + * @param arg1 {string} Some param to configure something + * @param arg2 {number} Another param to configure something + * @return {Promise} Returns a promise that resolves when something happens + */ + functionName(arg1: string, arg2: number): Promise; + init(): void; + setDebugMode(enable: boolean): void; + 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): void; + resetBadge(): void; + setApplicationIconBadgeNumber(badge: number): void; + getApplicationIconBadgeNumber(): Promise; + addLocalNotificationForIOS(delayTime: number, content: string, badge: number, identifierKey: string, extras?: object): void; + deleteLocalNotificationWithIdentifierKeyInIOS(identifierKey: string): void; + addDismissActions(actions: Array, categoryId: string): void; + addNotificationActions(actions: Array, categoryId: string): void; + setLocation(latitude: number, longitude: number): void; + startLogPageView(pageName: string): void; + stopLogPageView(pageName: string): void; + beginLogPageView(pageName: string, duration: number): void; + 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: Array, startHour: number, endHour: number): Promise; +} diff --git a/ionic/jpush/ngx/index.js b/ionic/jpush/ngx/index.js new file mode 100644 index 0000000..01cc8b1 --- /dev/null +++ b/ionic/jpush/ngx/index.js @@ -0,0 +1,95 @@ +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + 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 extendStatics(d, b); + }; + 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; +}; +/** + * This is a template for new plugin wrappers + * + * TODO: + * - Add/Change information below + * - Document usage (importing, executing main functionality) + * - Remove any imports that you are not using + * - Remove all the comments included in this template, EXCEPT the @Plugin wrapper docs and any other docs you added + * - Remove this note + * + */ +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.functionName = function (arg1, arg2) { return cordova(this, "functionName", {}, arguments); }; + JPush.prototype.init = function () { return cordova(this, "init", { "sync": true, "platforms": ["iOS", "Android"] }, arguments); }; + JPush.prototype.setDebugMode = function (enable) { return cordova(this, "setDebugMode", { "sync": true, "platforms": ["iOS", "Android"] }, 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", { "sync": true, "platforms": ["iOS"] }, arguments); }; + JPush.prototype.resetBadge = function () { return cordova(this, "resetBadge", { "sync": true, "platforms": ["iOS"] }, arguments); }; + JPush.prototype.setApplicationIconBadgeNumber = function (badge) { return cordova(this, "setApplicationIconBadgeNumber", { "sync": true, "platforms": ["iOS"] }, arguments); }; + JPush.prototype.getApplicationIconBadgeNumber = function () { return cordova(this, "getApplicationIconBadgeNumber", {}, arguments); }; + JPush.prototype.addLocalNotificationForIOS = function (delayTime, content, badge, identifierKey, extras) { return cordova(this, "addLocalNotificationForIOS", { "sync": true, "platforms": ["iOS"] }, arguments); }; + JPush.prototype.deleteLocalNotificationWithIdentifierKeyInIOS = function (identifierKey) { return cordova(this, "deleteLocalNotificationWithIdentifierKeyInIOS", { "sync": true, "platforms": ["iOS"] }, arguments); }; + JPush.prototype.addDismissActions = function (actions, categoryId) { return cordova(this, "addDismissActions", { "sync": true, "platforms": ["iOS"] }, arguments); }; + JPush.prototype.addNotificationActions = function (actions, categoryId) { return cordova(this, "addNotificationActions", { "sync": true, "platforms": ["iOS"] }, arguments); }; + JPush.prototype.setLocation = function (latitude, longitude) { return cordova(this, "setLocation", { "sync": true, "platforms": ["iOS"] }, arguments); }; + JPush.prototype.startLogPageView = function (pageName) { return cordova(this, "startLogPageView", { "sync": true, "platforms": ["iOS"] }, arguments); }; + JPush.prototype.stopLogPageView = function (pageName) { return cordova(this, "stopLogPageView", { "sync": true, "platforms": ["iOS"] }, arguments); }; + JPush.prototype.beginLogPageView = function (pageName, duration) { return cordova(this, "beginLogPageView", { "sync": true, "platforms": ["iOS"] }, 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 = "plugins.jPushPlugin"; + 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({ + providedIn: 'root' + }) + ], JPush); + return JPush; +}(IonicNativePlugin)); +export { JPush }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvQGlvbmljLW5hdGl2ZS9wbHVnaW5zL2pwdXNoL25neC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUE7Ozs7Ozs7Ozs7R0FVRztBQUNILE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyw4QkFBMEYsTUFBTSxvQkFBb0IsQ0FBQzs7SUF1RGpHLHlCQUFpQjs7OztJQVMxQyw0QkFBWSxhQUFDLElBQVksRUFBRSxJQUFZO0lBUXZDLG9CQUFJO0lBTUosNEJBQVksYUFBQyxNQUFlO0lBRzVCLGlDQUFpQjtJQUdqQix3QkFBUTtJQUdSLDBCQUFVO0lBR1YsNkJBQWE7SUFHYix1QkFBTyxhQUFDLE1BQWtCO0lBRzFCLHVCQUFPLGFBQUMsTUFBa0I7SUFHMUIsMEJBQVUsYUFBQyxNQUFrQjtJQUc3Qix5QkFBUyxhQUFDLE1BQWtCO0lBRzVCLDBCQUFVLGFBQUMsTUFBa0I7SUFNN0IsaUNBQWlCLGFBQUMsTUFBYztJQUdoQyx3QkFBUSxhQUFDLE1BQW9CO0lBRzdCLDJCQUFXLGFBQUMsTUFBb0I7SUFHaEMsd0JBQVEsYUFBQyxNQUFvQjtJQWU3QiwyQ0FBMkI7SU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47IH1cblxuICBAQ29yZG92YSgpXG4gIHJlbW92ZUxvY2FsTm90aWZpY2F0aW9uKG5vdGlmaWNhdGlvbklkOiBudW1iZXIpOiBQcm9taXNlPGFueT4geyByZXR1cm47IH1cblxuICBAQ29yZG92YSgpXG4gIHJlcG9ydE5vdGlmaWNhdGlvbk9wZW5lZChtc2dJZDogbnVtYmVyKTogUHJvbWlzZTxhbnk+IHsgcmV0dXJuOyB9XG5cbiAgQENvcmRvdmEoKVxuICByZXF1ZXN0UGVybWlzc2lvbigpOiBQcm9taXNlPGFueT4geyByZXR1cm47IH1cblxuICBAQ29yZG92YSgpXG4gIHNldFNpbGVuY2VUaW1lKHN0YXJ0SG91cjogbnVtYmVyLCBzdGFydE1pbnV0ZTogbnVtYmVyLCBlbmRIb3VyOiBudW1iZXIsIGVuZE1pbnV0ZTogbnVtYmVyKTogUHJvbWlzZTxhbnk+IHsgcmV0dXJuOyB9XG5cbiAgQENvcmRvdmEoKVxuICBzZXRQdXNoVGltZSh3ZWVrZGF5czogQXJyYXk8c3RyaW5nPiwgc3RhcnRIb3VyOiBudW1iZXIsIGVuZEhvdXI6IG51bWJlcik6IFByb21pc2U8YW55PiB7IHJldHVybjsgfVxuXG4gIC8vIEFuZHJvaWQgQVBJIC0gZW5kXG5cbn1cbiJdfQ== \ No newline at end of file diff --git a/ionic/jpush/ngx/index.metadata.json b/ionic/jpush/ngx/index.metadata.json new file mode 100644 index 0000000..73891e7 --- /dev/null +++ b/ionic/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":67,"character":27},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":64,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"functionName":[{"__symbolic":"method"}],"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"}]}}}}] diff --git a/ionic/jpush/package.json b/ionic/jpush/package.json index 8894fd3..d25c4c6 100644 --- a/ionic/jpush/package.json +++ b/ionic/jpush/package.json @@ -1,15 +1,15 @@ { "name": "@jiguang-ionic/jpush", - "version": "1.0.2", + "version": "2.0.0", "description": "JPush support for ionic-native", "module": "index.js", "typings": "index.d.ts", "author": "hevin", "license": "MIT", "peerDependencies": { - "@ionic-native/core": "^4.2.0", + "@ionic-native/core": "^5.1.0", "@angular/core": "*", - "rxjs": "^5.0.1" + "rxjs": "^6.3.0" }, "repository": { "type": "git",