From 6897f5030a056262cb23c702e8855fc5a557c52a Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Sat, 11 Sep 2021 09:39:56 -0500 Subject: [PATCH] Remove Class Kit, Estimote Beacons, Intel Security, Jins Meme, and Restart plugins --- src/@ionic-native/plugins/class-kit/index.ts | 366 ------------ .../plugins/estimote-beacons/index.ts | 558 ------------------ .../plugins/intel-security/index.ts | 261 -------- src/@ionic-native/plugins/jins-meme/index.ts | 205 ------- src/@ionic-native/plugins/restart/index.ts | 49 -- 5 files changed, 1439 deletions(-) delete mode 100644 src/@ionic-native/plugins/class-kit/index.ts delete mode 100644 src/@ionic-native/plugins/estimote-beacons/index.ts delete mode 100644 src/@ionic-native/plugins/intel-security/index.ts delete mode 100644 src/@ionic-native/plugins/jins-meme/index.ts delete mode 100644 src/@ionic-native/plugins/restart/index.ts diff --git a/src/@ionic-native/plugins/class-kit/index.ts b/src/@ionic-native/plugins/class-kit/index.ts deleted file mode 100644 index 7b92f14a..00000000 --- a/src/@ionic-native/plugins/class-kit/index.ts +++ /dev/null @@ -1,366 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; - -export interface CCKContext { - /** - * Full identifier path from root, including the context identifier itself.. - */ - identifierPath: string[]; - /** - * Title of the context. - */ - title: string; - /** - * Optional. Type value for the context. - */ - type?: CCKContextType; - /** - * Optional. Topic value of the context. - */ - topic?: string; - /** - * Optional. Display order of the context. - */ - displayOrder?: number; -} - -export enum CCKContextType { - none = 0, - app, - chapter, - section, - level, - page, - task, - challenge, - quiz, - exercise, - lesson, - book, - game, - document, - audio, - video, -} - -export enum CCKContextTopic { - math = 'math', - science = 'science', - literacyAndWriting = 'literacyAndWriting', - worldLanguage = 'worldLanguage', - socialScience = 'socialScience', - computerScienceAndEngineering = 'computerScienceAndEngineering', - artsAndMusic = 'artsAndMusic', - healthAndFitness = 'healthAndFitness', -} - -export interface CCKBinaryItem { - /** - * A unique string identifier for the activity item. - */ - identifier: string; - /** - * A human readable name for the activity item. - */ - title: string; - /** - * A type value for the activity item. - */ - type: CCKBinaryType; - /** - * The value that the binary activity item takes. - */ - isCorrect: boolean; - /** - * Optional. Should the activity item be added as the primary activity item. - */ - isPrimaryActivityItem?: boolean; -} - -export enum CCKBinaryType { - trueFalse = 0, - passFail, - yesNo, -} - -export interface CCKScoreItem { - /** - * A unique string identifier for the activity item. - */ - identifier: string; - /** - * A human readable name for the activity item. - */ - title: string; - /** - * The score earned during completion of a task. - */ - score: number; - /** - * The maximum possible score, against which the reported score should be judged. - */ - maxScore: number; - /** - * Optional. Should the activity item be added as the primary activity item. - */ - isPrimaryActivityItem?: boolean; -} - -export interface CCKQuantityItem { - /** - * A unique string identifier for the activity item. - */ - identifier: string; - /** - * A human readable name for the activity item. - */ - title: string; - /** - * A quantity associated with the task. - */ - quantity: number; - /** - * Optional. Should the activity item be added as the primary activity item. - */ - isPrimaryActivityItem?: boolean; -} - -/** - * @name Class Kit - * @description Plugin for using Apple's ClassKit framework. - * - * - * Prerequisites: - * Only works with Xcode 9.4 and iOS 11.4. Your Provisioning Profile must include the ClassKit capability. Read more about how to Request ClassKit Resources (https://developer.apple.com/contact/classkit/) in here: https://developer.apple.com/documentation/classkit/enabling_classkit_in_your_app. - * Also note that you can’t test ClassKit behavior in Simulator because Schoolwork isn’t available in that environment. - * - * @usage - * ```typescript - * import { ClassKit, CCKContext, CCKBinaryItem, CCKQuantityItem, CCKScoreItem, CCKContextTopic, CCKContextType, CCKBinaryType } from '@ionic-native/class-kit/ngx'; - * - * // Init contexts defined in XML file 'CCK-contexts.xml' - * constructor( ..., private classKit: ClassKit) { - * platform.ready().then(() => { - * classKit.initContextsFromXml("classkitplugin://") - * .then(() => console.log("success")) - * .catch(e => console.log("error: ", e)); - * }); - * } - * - * ... - * - * // Init context with identifier path - * const context: CCKContext = { - * identifierPath: ["parent_title_one", "child_one", "child_one_correct_quiz"], - * title: "child one correct quiz", - * type: CCKContextType.exercise, - * topic: CCKContextTopic.science, - * displayOrder: 0 - * }; - * - * this.classKit.addContext("classkitplugin://", context) - * .then(() => console.log("success")) - * .catch(e => console.log("error: ", e)); - * - * - * // Remove all contexts - * this.classKit.removeContexts() - * .then(() => console.log("success")) - * .catch(e => console.log("error: ", e)); - * - * - * // Remove context with identifier path - * this.classKit.removeContext(["parent_title_one", "child_one", "child_one_correct_quiz"]) - * .then(() => console.log("success")) - * .catch(e => console.log("error: ", e)); - * - * - * // Begin a new activity or restart an activity for a given context - * this.classKit.beginActivity(["parent_title_one", "child_two", "child_two_quiz"], false) - * .then(() => console.log("success")) - * .catch(e => console.log("error: ", e)); - * - * - * // Adds a progress range to the active given activity - * this.classKit.setProgressRange(0, 0.66) - * .then(() => console.log("success")) - * .catch(e => console.log("error: ", e)); - * - * - * // Adds a progress to the active given activity - * this.classKit.setProgress(0.66) - * .then(() => console.log("success")) - * .catch(e => console.log("error: ", e)); - * - * - * // Adds activity information that is true or false, pass or fail, yes or no - * const binaryItem: CCKBinaryItem = { - * identifier: "child_two_quiz_IDENTIFIER_1", - * title: "CHILD TWO QUIZ 1", - * type: CCKBinaryType.trueFalse, - * isCorrect: isCorrect, - * isPrimaryActivityItem: false - * }; - * - * this.classKit.setBinaryItem(binaryItem) - * .then(() => console.log("success")) - * .catch(e => console.log("error: ", e)); - * - * - * // Adds activity information that signifies a score out of a possible maximum - * const scoreItem: CCKScoreItem = { - * identifier: "total_score", - * title: "Total Score :-)", - * score: 0.66, - * maxScore: 1.0, - * isPrimaryActivityItem: true - * }; - * - * this.classKit.setScoreItem(scoreItem) - * .then(() => console.log("success")) - * .catch(e => console.log("error: ", e)); - * - * - * // Activity information that signifies a quantity - * const quantityItem: CCKQuantityItem = { - * identifier: "quantity_item_hints", - * title: "Hints", - * quantity: 12, - * isPrimaryActivityItem: false - * }; - * - * this.classKit.setQuantityItem(quantityItem) - * .then(() => console.log("success")) - * .catch(e => console.log("error: ", e)); - * - * ``` - * - * @interfaces - * CCKContext - * CCKContextType - * CCKContextTopic - * CCKBinaryItem - * CCKBinaryType - * CCKScoreItem - * CCKQuantityItem - */ -@Plugin({ - pluginName: 'ClassKit', - plugin: 'cordova-plugin-classkit', - pluginRef: 'CordovaClassKit', - repo: 'https://github.com/sebastianbaar/cordova-plugin-classkit.git', - platforms: ['iOS'], -}) -@Injectable() -export class ClassKit extends IonicNativePlugin { - /** - * Init contexts defined in XML file 'CCK-contexts.xml' - * @param {string} urlPrefix URL prefix to use for custom URLs to locate activities (deeplink). - * @return {Promise} - */ - @Cordova() - initContextsFromXml(urlPrefix: string): Promise { - return; - } - - /** - * Init context with identifier path - * @param {string} urlPrefix URL prefix to use for custom URLs to locate activities (deeplink). - * @param {CCKContext} context Context to initialize. - * @return {Promise} - */ - @Cordova() - addContext(urlPrefix: string, context: CCKContext): Promise { - return; - } - - /** - * Remove all contexts - * @return {Promise} - */ - @Cordova() - removeContexts(): Promise { - return; - } - - /** - * Remove context with identifier path - * @param {string[]} identifierPath Full identifier path from root, including the context identifier itself. - * @return {Promise} - */ - @Cordova() - removeContext(identifierPath: string[]): Promise { - return; - } - - /** - * Begin a new activity or restart an activity for a given context - * @param {string[]} identifierPath Full identifier path from root, including the context identifier itself. - * @param {boolean} asNew Should a new activity be created (or an old activity be restarted). - * @return {Promise} - */ - @Cordova() - beginActivity(identifierPath: string[], asNew: boolean): Promise { - return; - } - - /** - * End the active activity - * @return {Promise} - */ - @Cordova() - endActivity(): Promise { - return; - } - - /** - * Adds a progress range to the active given activity - * @param {number} fromStart The beginning of the new range to add. This should be fractional value between 0 and 1, inclusive. - * @param {number} toEnd The end of the new range to add. This should be larger than the start value and less than or equal to one. - * @return {Promise} - */ - @Cordova() - setProgressRange(fromStart: number, toEnd: number): Promise { - return; - } - - /** - * Adds a progress to the active given activity - * @param {number} progress A measure of progress through the task, given as a fraction in the range [0, 1]. - * @return {Promise} - */ - @Cordova() - setProgress(progress: number): Promise { - return; - } - - /** - * Adds activity information that is true or false, pass or fail, yes or no - * @param {CCKBinaryItem} binaryItem The binary item to add to the activity. - * @return {Promise} - */ - @Cordova() - setBinaryItem(binaryItem: CCKBinaryItem): Promise { - return; - } - - /** - * Adds activity information that signifies a score out of a possible maximum - * @param {CCKScoreItem} scoreItem The score item to add to the activity. - * @return {Promise} - */ - @Cordova() - setScoreItem(scoreItem: CCKScoreItem): Promise { - return; - } - - /** - * Activity information that signifies a quantity. - * @param {CCKQuantityItem} quantityItem The quantity item to add to the activity. - * @return {Promise} - */ - @Cordova() - setQuantityItem(quantityItem: CCKQuantityItem): Promise { - return; - } -} diff --git a/src/@ionic-native/plugins/estimote-beacons/index.ts b/src/@ionic-native/plugins/estimote-beacons/index.ts deleted file mode 100644 index 4c7f8ec6..00000000 --- a/src/@ionic-native/plugins/estimote-beacons/index.ts +++ /dev/null @@ -1,558 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; -import { Observable } from 'rxjs'; - -export interface EstimoteBeaconRegion { - state?: string; - - major: number; - - minor: number; - - identifier?: string; - - uuid: string; -} - -/** - * @name Estimote Beacons - * - * @description - * This plugin enables communication between a phone and Estimote Beacons peripherals. - * - * @usage - * ```typescript - * import { EstimoteBeacons } from '@ionic-native/estimote-beacons/ngx'; - * - * constructor(private eb: EstimoteBeacons) { } - * - * ... - * - * this.eb.requestAlwaysAuthorization(); - * - * this.eb.enableAnalytics(true); - * - * ``` - * - * @interfaces - * EstimoteBeaconRegion - */ -@Plugin({ - pluginName: 'EstimoteBeacons', - plugin: 'cordova-plugin-estimote', - pluginRef: 'estimote.beacons', - repo: 'https://github.com/evothings/phonegap-estimotebeacons', - platforms: ['Android', 'iOS'], -}) -@Injectable() -export class EstimoteBeacons extends IonicNativePlugin { - /** Proximity value */ - ProximityUnknown = 0; - - /** Proximity value */ - ProximityImmediate = 1; - - /** Proximity value */ - ProximityNear = 2; - - /** Proximity value */ - ProximityFar = 3; - - /** Beacon colour */ - BeaconColorUnknown = 0; - - /** Beacon colour */ - BeaconColorMintCocktail = 1; - - /** Beacon colour */ - BeaconColorIcyMarshmallow = 2; - - /** Beacon colour */ - BeaconColorBlueberryPie = 3; - - /** - * Beacon colour. - */ - BeaconColorSweetBeetroot = 4; - - /** Beacon colour */ - BeaconColorCandyFloss = 5; - - /** Beacon colour */ - BeaconColorLemonTart = 6; - - /** Beacon colour */ - BeaconColorVanillaJello = 7; - - /** Beacon colour */ - BeaconColorLiquoriceSwirl = 8; - - /** Beacon colour */ - BeaconColorWhite = 9; - - /** Beacon colour */ - BeaconColorTransparent = 10; - - /** Region state */ - RegionStateUnknown = 'unknown'; - - /** Region state */ - RegionStateOutside = 'outside'; - - /** Region state */ - RegionStateInside = 'inside'; - - /** - * Ask the user for permission to use location services - * while the app is in the foreground. - * You need to call this function or requestAlwaysAuthorization - * on iOS 8+. - * Does nothing on other platforms. - * - * @usage - * ``` - * EstimoteBeacons.requestWhenInUseAuthorization().then( - * () => { console.log('on success'); }, - * () => { console.log('on error'); } - * ); - * ``` - * - * @see {@link https://community.estimote.com/hc/en-us/articles/203393036-Estimote-SDK-and-iOS-8-Location-Services|Estimote SDK and iOS 8 Location Services} - * @returns {Promise} - */ - @Cordova() - requestWhenInUseAuthorization(): Promise { - return; - } - - /** - * Ask the user for permission to use location services - * whenever the app is running. - * You need to call this function or requestWhenInUseAuthorization - * on iOS 8+. - * Does nothing on other platforms. - * - * @usage - * ``` - * EstimoteBeacons.requestAlwaysAuthorization().then( - * () => { console.log('on success'); }, - * () => { console.log('on error'); } - * ); - * ``` - * - * @see {@link https://community.estimote.com/hc/en-us/articles/203393036-Estimote-SDK-and-iOS-8-Location-Services|Estimote SDK and iOS 8 Location Services} - * @returns {Promise} - */ - @Cordova() - requestAlwaysAuthorization(): Promise { - return; - } - - /** - * Get the current location authorization status. - * Implemented on iOS 8+. - * Does nothing on other platforms. - * - * @usage - * ``` - * EstimoteBeacons.authorizationStatus().then( - * (result) => { console.log('Location authorization status: ' + result); }, - * (errorMessage) => { console.log('Error: ' + errorMessage); } - * ); - * ``` - * - * @see {@link https://community.estimote.com/hc/en-us/articles/203393036-Estimote-SDK-and-iOS-8-Location-Services|Estimote SDK and iOS 8 Location Services} - * @returns {Promise} - */ - @Cordova() - authorizationStatus(): Promise { - return; - } - - /** - * Start advertising as a beacon. - * - * @usage - * ``` - * EstimoteBeacons.startAdvertisingAsBeacon('B9407F30-F5F8-466E-AFF9-25556B57FE6D', 1, 1, 'MyRegion') - * .then(() => { console.log('Beacon started'); }); - * setTimeout(() => { - * EstimoteBeacons.stopAdvertisingAsBeacon().then((result) => { console.log('Beacon stopped'); }); - * }, 5000); - * ``` - * @param {string} uuid UUID string the beacon should advertise (mandatory). - * @param {number} major Major value to advertise (mandatory). - * @param {number} minor Minor value to advertise (mandatory). - * @param {string} regionId Identifier of the region used to advertise (mandatory). - * @returns {Promise} - */ - @Cordova({ - clearFunction: 'stopAdvertisingAsBeacon', - }) - startAdvertisingAsBeacon(uuid: string, major: number, minor: number, regionId: string): Promise { - return; - } - - /** - * Stop advertising as a beacon. - * - * @usage - * ``` - * EstimoteBeacons.startAdvertisingAsBeacon('B9407F30-F5F8-466E-AFF9-25556B57FE6D', 1, 1, 'MyRegion') - * .then(() => { console.log('Beacon started'); }); - * setTimeout(() => { - * EstimoteBeacons.stopAdvertisingAsBeacon().then((result) => { console.log('Beacon stopped'); }); - * }, 5000); - * ``` - * @returns {Promise} - */ - @Cordova() - stopAdvertisingAsBeacon(): Promise { - return; - } - - /** - * Enable analytics. - * - * @see {@link http://estimote.github.io/iOS-SDK/Classes/ESTConfig.html|Further details} - * - * @usage - * ``` - * EstimoteBeacons.enableAnalytics(true).then(() => { console.log('Analytics enabled'); }); - * ``` - * @param {number} enable Boolean value to turn analytics on or off (mandatory). - * @returns {Promise} - */ - @Cordova() - enableAnalytics(enable: boolean): Promise { - return; - } - - /** - * Test if analytics is enabled. - * - * @see {@link http://estimote.github.io/iOS-SDK/Classes/ESTConfig.html|Further details} - * - * @usage - * ``` - * EstimoteBeacons.isAnalyticsEnabled().then((enabled) => { console.log('Analytics enabled: ' + enabled); }); - * ``` - * @returns {Promise} - */ - @Cordova() - isAnalyticsEnabled(): Promise { - return; - } - - /** - * Test if App ID and App Token is set. - * - * @see {@link http://estimote.github.io/iOS-SDK/Classes/ESTConfig.html|Further details} - * - * @usage - * ``` - * EstimoteBeacons.isAuthorized().then((isAuthorized) => { console.log('App ID and App Token is set: ' + isAuthorized); }); - * ``` - * @returns {Promise} - */ - @Cordova() - isAuthorized(): Promise { - return; - } - - /** - * Set App ID and App Token. - * - * @see {@link http://estimote.github.io/iOS-SDK/Classes/ESTConfig.html|Further details} - * - * @usage - * ``` - * EstimoteBeacons.setupAppIDAndAppToken('MyAppID', 'MyAppToken').then(() => { console.log('AppID and AppToken configured!'); }); - * ``` - * @param {string} appID The App ID (mandatory). - * @param {string} appToken The App Token (mandatory). - * @returns {Promise} - */ - @Cordova() - setupAppIDAndAppToken(appID: string, appToken: string): Promise { - return; - } - - /** - * Start scanning for all nearby beacons using CoreBluetooth (no region object is used). - * Available on iOS. - * - * @usage - * ``` - * EstimoteBeacons.startEstimoteBeaconDiscovery().subscribe(beacons => { - * console.log(JSON.stringify(beacons)); - * }); - * setTimeout(() => { - * EstimoteBeacons.stopEstimoteBeaconDiscovery().then(() => { console.log('scan stopped'); }); - * }, 5000); - * ``` - * @returns {Observable} Returns an Observable that notifies of each beacon discovered. - */ - @Cordova({ - observable: true, - clearFunction: 'stopEstimoteBeaconDiscovery', - }) - startEstimoteBeaconDiscovery(): Observable { - return; - } - - /** - * Stop CoreBluetooth scan. Available on iOS. - * - * @usage - * ``` - * EstimoteBeacons.startEstimoteBeaconDiscovery().subscribe(beacons => { - * console.log(JSON.stringify(beacons)); - * }); - * setTimeout(() => { - * EstimoteBeacons.stopEstimoteBeaconDiscovery().then(() => { console.log('scan stopped'); }); - * }, 5000); - * ``` - * @returns {Promise} - */ - @Cordova() - stopEstimoteBeaconDiscovery(): Promise { - return; - } - - /** - * Start ranging beacons. Available on iOS and Android. - * - * @usage - * ``` - * let region: EstimoteBeaconRegion = {} // Empty region matches all beacons. - * EstimoteBeacons.startRangingBeaconsInRegion(region).subscribe(info => { - * console.log(JSON.stringify(info)); - * }); - * setTimeout(() => { - * EstimoteBeacons.stopRangingBeaconsInRegion(region).then(() => { console.log('scan stopped'); }); - * }, 5000); - * ``` - * @param {EstimoteBeaconRegion} region Dictionary with region properties (mandatory). - * @returns {Observable} Returns an Observable that notifies of each beacon discovered. - */ - @Cordova({ - observable: true, - clearFunction: 'stopRangingBeaconsInRegion', - clearWithArgs: true, - }) - startRangingBeaconsInRegion(region: EstimoteBeaconRegion): Observable { - return; - } - - /** - * Stop ranging beacons. Available on iOS and Android. - * - * @usage - * ``` - * let region: EstimoteBeaconRegion = {} // Empty region matches all beacons. - * EstimoteBeacons.startRangingBeaconsInRegion(region).subscribe(info => { - * console.log(JSON.stringify(info)); - * }); - * setTimeout(() => { - * EstimoteBeacons.stopRangingBeaconsInRegion(region).then(() => { console.log('scan stopped'); }); - * }, 5000); - * ``` - * @param {EstimoteBeaconRegion} region Dictionary with region properties (mandatory). - * @returns {Promise} - */ - @Cordova() - stopRangingBeaconsInRegion(region: EstimoteBeaconRegion): Promise { - return; - } - - /** - * Start ranging secure beacons. Available on iOS. - * This function has the same parameters/behavior as - * {@link EstimoteBeacons.startRangingBeaconsInRegion}. - * To use secure beacons set the App ID and App Token using - * {@link EstimoteBeacons.setupAppIDAndAppToken}. - * @returns {Observable} - */ - @Cordova({ - observable: true, - clearFunction: 'stopRangingSecureBeaconsInRegion', - clearWithArgs: true, - }) - startRangingSecureBeaconsInRegion(region: EstimoteBeaconRegion): Observable { - return; - } - - /** - * Stop ranging secure beacons. Available on iOS. - * This function has the same parameters/behavior as - * {@link EstimoteBeacons.stopRangingBeaconsInRegion}. - * @returns {Promise} - */ - @Cordova() - stopRangingSecureBeaconsInRegion(region: EstimoteBeaconRegion): Promise { - return; - } - - /** - * Start monitoring beacons. Available on iOS and Android. - * - * @usage - * ``` - * let region: EstimoteBeaconRegion = {} // Empty region matches all beacons. - * EstimoteBeacons.startMonitoringForRegion(region).subscribe(state => { - * console.log('Region state: ' + JSON.stringify(state)); - * }); - * ``` - * @param {EstimoteBeaconRegion} region Dictionary with region properties (mandatory). - * @param {boolean} [notifyEntryStateOnDisplay] Set to true to detect if you - * are inside a region when the user turns display on, see - * {@link https://developer.apple.com/library/prerelease/ios/documentation/CoreLocation/Reference/CLBeaconRegion_class/index.html#//apple_ref/occ/instp/CLBeaconRegion/notifyEntryStateOnDisplay|iOS documentation} - * for further details (iOS only). - * @returns {Observable} Returns an Observable that notifies of each region state discovered. - */ - @Cordova({ - observable: true, - clearFunction: 'stopMonitoringForRegion', - clearWithArgs: true, - successIndex: 1, - errorIndex: 2, - }) - startMonitoringForRegion(region: EstimoteBeaconRegion, notifyEntryStateOnDisplay: boolean): Observable { - return; - } - - /** - * Stop monitoring beacons. Available on iOS and Android. - * - * @usage - * ``` - * let region: EstimoteBeaconRegion = {} // Empty region matches all beacons. - * EstimoteBeacons.stopMonitoringForRegion(region).then(() => { console.log('monitoring is stopped'); }); - * ``` - * @param {EstimoteBeaconRegion} region Dictionary with region properties (mandatory). - * @returns {Promise} - */ - @Cordova() - stopMonitoringForRegion(region: EstimoteBeaconRegion): Promise { - return; - } - - /** - * Start monitoring secure beacons. Available on iOS. - * This function has the same parameters/behavior as - * EstimoteBeacons.startMonitoringForRegion. - * To use secure beacons set the App ID and App Token using - * {@link EstimoteBeacons.setupAppIDAndAppToken}. - * @see {@link EstimoteBeacons.startMonitoringForRegion} - * @param {EstimoteBeaconRegion} region Region - * @param {boolean} notifyEntryStateOnDisplay - * @returns {Observable} - */ - @Cordova({ - observable: true, - clearFunction: 'stopSecureMonitoringForRegion', - clearWithArgs: true, - successIndex: 1, - errorIndex: 2, - }) - startSecureMonitoringForRegion(region: EstimoteBeaconRegion, notifyEntryStateOnDisplay: boolean): Observable { - return; - } - - /** - * Stop monitoring secure beacons. Available on iOS. - * This function has the same parameters/behaviour as - * {@link EstimoteBeacons.stopMonitoringForRegion}. - * @param region {EstimoteBeaconRegion} Region - * @returns {Promise} - */ - @Cordova() - stopSecureMonitoringForRegion(region: EstimoteBeaconRegion): Promise { - return; - } - - /** - * Connect to Estimote Beacon. Available on Android. - * - * @usage - * ``` - * EstimoteBeacons.connectToBeacon(FF:0F:F0:00:F0:00); - * ``` - * ``` - * EstimoteBeacons.connectToBeacon({ - * proximityUUID: '000000FF-F00F-0FF0-F000-000FF0F00000', - * major: 1, - * minor: 1 - * }); - * ``` - * @param {Beacon} beacon Beacon to connect to. - * @returns {Promise} - */ - @Cordova() - connectToBeacon(beacon: any): Promise { - return; - } - - /** - * Disconnect from connected Estimote Beacon. Available on Android. - * - * @usage - * ``` - * EstimoteBeacons.disconnectConnectedBeacon(); - * ``` - * @returns {Promise} - */ - @Cordova() - disconnectConnectedBeacon(): Promise { - return; - } - - /** - * Write proximity UUID to connected Estimote Beacon. Available on Android. - * - * @usage - * ``` - * // Example that writes constant ESTIMOTE_PROXIMITY_UUID - * EstimoteBeacons.writeConnectedProximityUUID(ESTIMOTE_PROXIMITY_UUID); - * - * @param {string} uuid String to write as new UUID - * @returns {Promise} - */ - @Cordova() - writeConnectedProximityUUID(uuid: any): Promise { - return; - } - - /** - * Write major to connected Estimote Beacon. Available on Android. - * - * @usage - * ``` - * // Example that writes 1 - * EstimoteBeacons.writeConnectedMajor(1); - * - * @param {number} major number to write as new major - * @returns {Promise} - */ - @Cordova() - writeConnectedMajor(major: number): Promise { - return; - } - - /** - * Write minor to connected Estimote Beacon. Available on Android. - * - * @usage - * ``` - * // Example that writes 1 - * EstimoteBeacons.writeConnectedMinor(1); - * - * @param {number} minor number to write as new minor - * @returns {Promise} - */ - @Cordova() - writeConnectedMinor(minor: number): Promise { - return; - } -} diff --git a/src/@ionic-native/plugins/intel-security/index.ts b/src/@ionic-native/plugins/intel-security/index.ts deleted file mode 100644 index 08615435..00000000 --- a/src/@ionic-native/plugins/intel-security/index.ts +++ /dev/null @@ -1,261 +0,0 @@ -import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; -import { Injectable } from '@angular/core'; - -declare const window: any; - -export interface IntelSecurityDataOptions { - /* Non-empty string. **/ - data: String; - /** Tag text. */ - tag?: String; - /** Valid secure data instance ID. */ - extraKey?: Number; - /** Application access control policy. */ - appAccessControl?: Number; - /** Device locality policy. */ - deviceLocality?: Number; - /** Sensitivity level policy. */ - sensitivityLevel?: Number; - /** Disallow sealed blob access. */ - noStore?: Boolean; - /** Disallow plain-text data access. */ - noRead?: Boolean; - /** Creator unique ID. */ - creator?: Number; - /** Array of owners unique IDs. */ - owners?: Number[]; - /** List of trusted web domains. */ - webOwners?: String[]; -} - -/** - * @name Intel Security - * @description - * The App Security API enables the use of security properties and capabilities on the platform, using a new set of API defined for application developers. You are not required to be a security expert to make good use of the API. Key elements, such as encryption of data and establishments of capabilities, is abstracted and done by the API implementation, for you. - * - * For example: - * - Use the API to store (E.g. cache) data locally, using the device non-volatile storage. Data protection/encryption will be done for you by the API implementation - * - Establish a connection with remote server (E.g. XHR) using a protected channel. SSL/TLS establishment and usage will be done for you by the API implementation - * - * For more information please visit the [API documentation](https://software.intel.com/en-us/app-security-api/api). - * - * @usage - * ```typescript - * import { IntelSecurity } from '@ionic-native/intel-security/ngx'; - * ... - * constructor(private intelSecurity: IntelSecurity) { } - * ... - * - * let storageID = 'id'; - * - * this.intelSecurity.data.createFromData({ data: 'Sample Data' }) - * .then((instanceID: Number) => this.intelSecurity.storage.write({ id: storageId, instanceID: instanceID })) - * .catch((error: any) => console.log(error)); - * - * this.intelSecurity.storage.read({id: storageID }) - * .then((instanceID: number) => this.intelSecurity.data.getData(instanceID)) - * .then((data: string) => console.log(data)) // Resolves to 'Sample Data' - * .catch((error: any) => console.log(error)); - * - * this.intelSecurity.storage.delete({ id: storageID }) - * .then(() => console.log('Deleted Successfully')) - * .catch((error: any) => console.log(error)); - * ``` - * @classes - * IntelSecurityData - * IntelSecurityStorage - * @interfaces - * IntelSecurityDataOptions - */ -@Plugin({ - pluginName: 'IntelSecurity', - plugin: 'com-intel-security-cordova-plugin', - pluginRef: 'intel.security', - repo: 'https://github.com/AppSecurityApi/com-intel-security-cordova-plugin', - platforms: ['Android', 'iOS', 'Windows', 'Windows Phone 8'], -}) -@Injectable() -export class IntelSecurity extends IonicNativePlugin { - /** - * returns an IntelSecurityStorage object - * @type {IntelSecurityStorage} - */ - storage: IntelSecurityStorage = new IntelSecurityStorage(); - - /** - * Returns an IntelSecurityData object - * @type {IntelSecurityData} - */ - data: IntelSecurityData = new IntelSecurityData(); -} - -/** - * @hidden - */ -@Plugin({ - pluginName: 'IntelSecurity', - plugin: 'com-intel-security-cordova-plugin', - pluginRef: 'intel.security.secureData', -}) -export class IntelSecurityData { - /** - * This creates a new instance of secure data using plain-text data. - * @param options {IntelSecurityDataOptions} - * @returns {Promise} Returns a Promise that resolves with the instanceID of the created data instance, or rejects with an error. - */ - @Cordova({ otherPromise: true }) - createFromData(options: IntelSecurityDataOptions): Promise { - return; - } - - /** - * This creates a new instance of secure data (using sealed data) - * @param options {Object} - * @param options.sealedData {string} Sealed data in string format. - * @returns {Promise} Returns a Promise that resolves with the instanceID of the created data instance, or rejects with an error. - */ - @Cordova({ otherPromise: true }) - createFromSealedData(options: { sealedData: string }): Promise { - return; - } - - /** - * This returns the plain-text data of the secure data instance. - * @param instanceID {Number} Secure data instance ID. - * @returns {Promise} Returns a Promise that resolves to the data as plain-text, or rejects with an error. - */ - @Cordova({ otherPromise: true }) - getData(instanceID: Number): Promise { - return; - } - - /** - * This returns the sealed chunk of a secure data instance. - * @param instanceID {any} Secure data instance ID. - * @returns {Promise} Returns a Promise that resolves to the sealed data, or rejects with an error. - */ - @Cordova({ otherPromise: true }) - getSealedData(instanceID: any): Promise { - return; - } - - /** - * This returns the tag of the secure data instance. - * @param instanceID {any} Secure data instance ID. - * @returns {Promise} Returns a Promise that resolves to the tag, or rejects with an error. - */ - @Cordova({ otherPromise: true }) - getTag(instanceID: any): Promise { - return; - } - - /** - * This returns the data policy of the secure data instance. - * @param instanceID {any} Secure data instance ID. - * @returns {Promise} Returns a promise that resolves to the policy object, or rejects with an error. - */ - @Cordova({ otherPromise: true }) - getPolicy(instanceID: any): Promise { - return; - } - - /** - * This returns an array of the data owners unique IDs. - * @param instanceID {any} Secure data instance ID. - * @returns {Promise} Returns a promise that resolves to an array of owners' unique IDs, or rejects with an error. - */ - @Cordova({ otherPromise: true }) - getOwners(instanceID: any): Promise { - return; - } - - /** - * This returns the data creator unique ID. - * @param instanceID {any} Secure data instance ID. - * @returns {Promise} Returns a promsie that resolves to the creator's unique ID, or rejects with an error. - */ - @Cordova({ otherPromise: true }) - getCreator(instanceID: any): Promise { - return; - } - - /** - * This returns an array of the trusted web domains of the secure data instance. - * @param instanceID {any} Secure data instance ID. - * @returns {Promise} Returns a promise that resolves to a list of web owners, or rejects with an error. - */ - @Cordova({ otherPromise: true }) - getWebOwners(instanceID: any): Promise { - return; - } - - /** - * This changes the extra key of a secure data instance. To successfully replace the extra key, the calling application must have sufficient access to the plain-text data. - * @param options {Object} - * @param options.instanceID {any} Secure data instance ID. - * @param options.extraKey {Number} Extra sealing secret for secure data instance. - * @returns {Promise} Returns a promise that resolves with no parameters, or rejects with an error. - */ - @Cordova({ otherPromise: true }) - changeExtraKey(options: any): Promise { - return; - } - - /** - * This releases a secure data instance. - * @param instanceID {any} Secure data instance ID. - * @returns {Promise} Returns a promise that resovles with no parameters, or rejects with an error. - */ - @Cordova({ otherPromise: true }) - destroy(instanceID: any): Promise { - return; - } -} - -/** - * @hidden - */ -@Plugin({ - pluginName: 'IntelSecurity', - plugin: 'com-intel-security-cordova-plugin', - pluginRef: 'intel.security.secureStorage', -}) -export class IntelSecurityStorage { - /** - * This deletes a secure storage resource (indicated by id). - * @param options {Object} - * @param options.id {String} Storage resource identifier. - * @param [options.storageType] {Number} Storage type. - * @returns {Promise} Returns a Promise that resolves with no parameters, or rejects with an error. - */ - @Cordova({ otherPromise: true }) - delete(options: { id: string; storageType?: Number }): Promise { - return; - } - - /** - * This reads the data from secure storage (indicated by id) and creates a new secure data instance. - * @param options {Object} - * @param options.id {String} Storage resource identifier. - * @param [options.storageType] {Number} Storage type. - * @param [options.extraKey] {Number} Valid secure data instance ID. - * @returns {Promise} Returns a Promise that resolves with the instance ID of the created secure data instance, or rejects with an error. - */ - @Cordova({ otherPromise: true }) - read(options: { id: string; storageType?: Number; extraKey?: Number }): Promise { - return; - } - - /** - * This writes the data contained in a secure data instance into secure storage. - * @param options {Object} - * @param options.id {String} Storage resource identifier. - * @param options.instanceID {Number} Valid secure data instance ID - * @param [options.storageType] {Number} Storage type. - * @returns {Promise} Returns a Promise that resolves with no parameters, or rejects with an error. - */ - @Cordova({ otherPromise: true }) - write(options: { id: String; instanceID: Number; storageType?: Number }): Promise { - return; - } -} diff --git a/src/@ionic-native/plugins/jins-meme/index.ts b/src/@ionic-native/plugins/jins-meme/index.ts deleted file mode 100644 index 0c5228fb..00000000 --- a/src/@ionic-native/plugins/jins-meme/index.ts +++ /dev/null @@ -1,205 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Cordova, CordovaCheck, IonicNativePlugin, Plugin } from '@ionic-native/core'; -import { Observable } from 'rxjs'; - -declare const cordova: any; - -/** - * @name Jins Meme - * @description - * Implementation of the JINS MEME SDK - * - * @usage - * ```typescript - * import { JinsMeme } from '@ionic-native/jins-meme/ngx'; - * - * constructor(private jinsMeme: JinsMeme) { } - * - * ... - * - * this.jinsMeme.setAppClientID(appClientId: string, clientSecret: string).then( - * // Bluetooth should be enabled and the JINS MEME powered on (blinking blue light) - * this.jinsMeme.startScan().subscribe((meme_addr) => { - * this.jinsMeme.connect(meme_addr).subscribe((connectResult) => { - * this.memeService.startDataReport().subscribe((dataReport) => { - * console.log(dataReport); - * }); - * }); - * }); - * .catch(console.log('jinsMeme.setAppClientID authentication error')); - * - * ``` - */ -@Plugin({ - pluginName: 'JINS MEME', - plugin: 'cordova-plugin-jins-meme', - pluginRef: 'JinsMemePlugin', - repo: 'https://github.com/BlyncSync/cordova-plugin-jins-meme', - platforms: ['Android', 'iOS'], -}) -@Injectable() -export class JinsMeme extends IonicNativePlugin { - /** - * Authentication and authorization of App and SDK. - * Must call this method first. - * Sign up for an app ID (and get an app/client secret) at developers.jins.com - * - * @param {string} setAppClientID - * @param {string} clientSecret - * @returns {Promise} - */ - @Cordova() - setAppClientID(appClientId: string, clientSecret: string): Promise { - return; - } - /** - * Starts scanning for JINS MEME. - * @returns {Observable} - */ - @Cordova({ - observable: true, - clearFunction: 'stopScan', - clearWithArgs: true, - }) - startScan(): Observable { - return; - } - /** - * Stops scanning JINS MEME. - * @returns {Promise} - */ - @Cordova() - stopScan(): Promise { - return; - } - /** - * Establishes connection to JINS MEME. - * @param {string} target - * @returns {Observable} - */ - @CordovaCheck({ - observable: true, - }) - connect(target: string): Observable { - return new Observable((observer: any) => { - const data = cordova.plugins.JinsMemePlugin.connect( - target, - observer.next.bind(observer), - observer.complete.bind(observer), - observer.error.bind(observer) - ); - return data; - }); - } - - /** - * Set auto connection mode. - * @param {Boolean} flag - * @returns {Promise} - */ - @Cordova() - setAutoConnect(flag: boolean): Promise { - return; - } - /** - * Returns whether a connection to JINS MEME has been established. - * @returns {Promise} - */ - @Cordova() - isConnected(): Promise { - return; - } - /** - * Disconnects from JINS MEME. - * @returns {Promise} - */ - @Cordova() - disconnect(): Promise { - return; - } - /** - * Starts receiving realtime data. - * @returns {Observable} - */ - @Cordova({ - observable: true, - clearFunction: 'stopDataReport', - clearWithArgs: true, - }) - startDataReport(): Observable { - return; - } - /** - * Stops receiving data. - * @returns {Promise} - */ - @Cordova() - stopDataReport(): Promise { - return; - } - /** - * Returns SDK version. - * - * @returns {Promise} - */ - @Cordova() - getSDKVersion(): Promise { - return; - } - /** - * Returns JINS MEME connected with other apps. - * @returns {Promise} - */ - @Cordova() - getConnectedByOthers(): Promise { - return; - } - /** - * Returns calibration status - * @returns {Promise} - */ - @Cordova() - isCalibrated(): Promise { - return; - } - /** - * Returns device type. - * @returns {Promise} - */ - @Cordova() - getConnectedDeviceType(): Promise { - return; - } - /** - * Returns hardware version. - * @returns {Promise} - */ - @Cordova() - getConnectedDeviceSubType(): Promise { - return; - } - /** - * Returns FW Version. - * @returns {Promise} - */ - @Cordova() - getFWVersion(): Promise { - return; - } - /** - * Returns HW Version. - * @returns {Promise} - */ - @Cordova() - getHWVersion(): Promise { - return; - } - /** - * Returns response about whether data was received or not. - * @returns {Promise} - */ - @Cordova() - isDataReceiving(): Promise { - return; - } -} diff --git a/src/@ionic-native/plugins/restart/index.ts b/src/@ionic-native/plugins/restart/index.ts deleted file mode 100644 index 6bee8340..00000000 --- a/src/@ionic-native/plugins/restart/index.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core'; - -/** - * @name Restart - * @description - * This plugin to restart android application - * - * @usage - * ```typescript - * import { Restart } from '@ionic-native/restart'; - * - * - * constructor(private restart: Restart) { } - * - * ... - * - * - * this.restart.restart(true) - * .then((res: any) => console.log(res)) - * .catch((error: any) => console.error(error)); - * - * ``` - */ -@Plugin({ - pluginName: 'Restart', - plugin: 'cordova-plugin-restart', - pluginRef: 'RestartPlugin', - repo: 'https://github.com/MaximBelov/cordova-plugin-restart', - install: 'ionic cordova plugin add cordova-plugin-restart', - platforms: ['Android'], -}) -@Injectable() -export class Restart extends IonicNativePlugin { - @Cordova({ - errorIndex: 0, - successIndex: 2, - }) - restart(cold: boolean): Promise { - return; - } - - @Cordova({ - errorIndex: 0, - }) - enableDebug(): Promise { - return; - } -}