jpush-phonegap-plugin/ionic/jpush/ngx/index.js

95 lines
19 KiB
JavaScript
Raw Normal View History

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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvQGlvbmljLW5hdGl2ZS9wbHVnaW5zL2pwdXNoL25neC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUE7Ozs7Ozs7Ozs7R0FVRztBQUNILE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyw4QkFBMEYsTUFBTSxvQkFBb0IsQ0FBQzs7SUF1RGpHLHlCQUFpQjs7OztJQVMxQyw0QkFBWSxhQUFDLElBQVksRUFBRSxJQUFZO0lBUXZDLG9CQUFJO0lBTUosNEJBQVksYUFBQyxNQUFlO0lBRzVCLGlDQUFpQjtJQUdqQix3QkFBUTtJQUdSLDBCQUFVO0lBR1YsNkJBQWE7SUFHYix1QkFBTyxhQUFDLE1BQWtCO0lBRzFCLHVCQUFPLGFBQUMsTUFBa0I7SUFHMUIsMEJBQVUsYUFBQyxNQUFrQjtJQUc3Qix5QkFBUyxhQUFDLE1BQWtCO0lBRzVCLDBCQUFVLGFBQUMsTUFBa0I7SUFNN0IsaUNBQWlCLGFBQUMsTUFBYztJQUdoQyx3QkFBUSxhQUFDLE1BQW9CO0lBRzdCLDJCQUFXLGFBQUMsTUFBb0I7SUFHaEMsd0JBQVEsYUFBQyxNQUFvQjtJQWU3QiwyQ0FBMkI7SUFHM0IsdUNBQXV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