Remove Class Kit, Estimote Beacons, Intel Security, Jins Meme, and Restart plugins

This commit is contained in:
Max Lynch 2021-09-11 09:39:56 -05:00
parent 7886014423
commit 6897f5030a
5 changed files with 0 additions and 1439 deletions

View File

@ -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 cant test ClassKit behavior in Simulator because Schoolwork isnt 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<any>}
*/
@Cordova()
initContextsFromXml(urlPrefix: string): Promise<any> {
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<any>}
*/
@Cordova()
addContext(urlPrefix: string, context: CCKContext): Promise<any> {
return;
}
/**
* Remove all contexts
* @return {Promise<any>}
*/
@Cordova()
removeContexts(): Promise<any> {
return;
}
/**
* Remove context with identifier path
* @param {string[]} identifierPath Full identifier path from root, including the context identifier itself.
* @return {Promise<any>}
*/
@Cordova()
removeContext(identifierPath: string[]): Promise<any> {
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<any>}
*/
@Cordova()
beginActivity(identifierPath: string[], asNew: boolean): Promise<any> {
return;
}
/**
* End the active activity
* @return {Promise<any>}
*/
@Cordova()
endActivity(): Promise<any> {
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<any>}
*/
@Cordova()
setProgressRange(fromStart: number, toEnd: number): Promise<any> {
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<any>}
*/
@Cordova()
setProgress(progress: number): Promise<any> {
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<any>}
*/
@Cordova()
setBinaryItem(binaryItem: CCKBinaryItem): Promise<any> {
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<any>}
*/
@Cordova()
setScoreItem(scoreItem: CCKScoreItem): Promise<any> {
return;
}
/**
* Activity information that signifies a quantity.
* @param {CCKQuantityItem} quantityItem The quantity item to add to the activity.
* @return {Promise<any>}
*/
@Cordova()
setQuantityItem(quantityItem: CCKQuantityItem): Promise<any> {
return;
}
}

View File

@ -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<any>}
*/
@Cordova()
requestWhenInUseAuthorization(): Promise<any> {
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<any>}
*/
@Cordova()
requestAlwaysAuthorization(): Promise<any> {
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<any>}
*/
@Cordova()
authorizationStatus(): Promise<any> {
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<any>}
*/
@Cordova({
clearFunction: 'stopAdvertisingAsBeacon',
})
startAdvertisingAsBeacon(uuid: string, major: number, minor: number, regionId: string): Promise<any> {
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<any>}
*/
@Cordova()
stopAdvertisingAsBeacon(): Promise<any> {
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<any>}
*/
@Cordova()
enableAnalytics(enable: boolean): Promise<any> {
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<any>}
*/
@Cordova()
isAnalyticsEnabled(): Promise<any> {
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<any>}
*/
@Cordova()
isAuthorized(): Promise<any> {
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<any>}
*/
@Cordova()
setupAppIDAndAppToken(appID: string, appToken: string): Promise<any> {
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<any>} Returns an Observable that notifies of each beacon discovered.
*/
@Cordova({
observable: true,
clearFunction: 'stopEstimoteBeaconDiscovery',
})
startEstimoteBeaconDiscovery(): Observable<any> {
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<any>}
*/
@Cordova()
stopEstimoteBeaconDiscovery(): Promise<any> {
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<any>} Returns an Observable that notifies of each beacon discovered.
*/
@Cordova({
observable: true,
clearFunction: 'stopRangingBeaconsInRegion',
clearWithArgs: true,
})
startRangingBeaconsInRegion(region: EstimoteBeaconRegion): Observable<any> {
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<any>}
*/
@Cordova()
stopRangingBeaconsInRegion(region: EstimoteBeaconRegion): Promise<any> {
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<any>}
*/
@Cordova({
observable: true,
clearFunction: 'stopRangingSecureBeaconsInRegion',
clearWithArgs: true,
})
startRangingSecureBeaconsInRegion(region: EstimoteBeaconRegion): Observable<any> {
return;
}
/**
* Stop ranging secure beacons. Available on iOS.
* This function has the same parameters/behavior as
* {@link EstimoteBeacons.stopRangingBeaconsInRegion}.
* @returns {Promise<any>}
*/
@Cordova()
stopRangingSecureBeaconsInRegion(region: EstimoteBeaconRegion): Promise<any> {
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<any>} 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<any> {
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<any>}
*/
@Cordova()
stopMonitoringForRegion(region: EstimoteBeaconRegion): Promise<any> {
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<any>}
*/
@Cordova({
observable: true,
clearFunction: 'stopSecureMonitoringForRegion',
clearWithArgs: true,
successIndex: 1,
errorIndex: 2,
})
startSecureMonitoringForRegion(region: EstimoteBeaconRegion, notifyEntryStateOnDisplay: boolean): Observable<any> {
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<any>}
*/
@Cordova()
stopSecureMonitoringForRegion(region: EstimoteBeaconRegion): Promise<any> {
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<any>}
*/
@Cordova()
connectToBeacon(beacon: any): Promise<any> {
return;
}
/**
* Disconnect from connected Estimote Beacon. Available on Android.
*
* @usage
* ```
* EstimoteBeacons.disconnectConnectedBeacon();
* ```
* @returns {Promise<any>}
*/
@Cordova()
disconnectConnectedBeacon(): Promise<any> {
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<any>}
*/
@Cordova()
writeConnectedProximityUUID(uuid: any): Promise<any> {
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<any>}
*/
@Cordova()
writeConnectedMajor(major: number): Promise<any> {
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<any>}
*/
@Cordova()
writeConnectedMinor(minor: number): Promise<any> {
return;
}
}

View File

@ -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<any>} 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<Number> {
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<any>} 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<Number> {
return;
}
/**
* This returns the plain-text data of the secure data instance.
* @param instanceID {Number} Secure data instance ID.
* @returns {Promise<string>} Returns a Promise that resolves to the data as plain-text, or rejects with an error.
*/
@Cordova({ otherPromise: true })
getData(instanceID: Number): Promise<string> {
return;
}
/**
* This returns the sealed chunk of a secure data instance.
* @param instanceID {any} Secure data instance ID.
* @returns {Promise<any>} Returns a Promise that resolves to the sealed data, or rejects with an error.
*/
@Cordova({ otherPromise: true })
getSealedData(instanceID: any): Promise<any> {
return;
}
/**
* This returns the tag of the secure data instance.
* @param instanceID {any} Secure data instance ID.
* @returns {Promise<string>} Returns a Promise that resolves to the tag, or rejects with an error.
*/
@Cordova({ otherPromise: true })
getTag(instanceID: any): Promise<string> {
return;
}
/**
* This returns the data policy of the secure data instance.
* @param instanceID {any} Secure data instance ID.
* @returns {Promise<any>} Returns a promise that resolves to the policy object, or rejects with an error.
*/
@Cordova({ otherPromise: true })
getPolicy(instanceID: any): Promise<any> {
return;
}
/**
* This returns an array of the data owners unique IDs.
* @param instanceID {any} Secure data instance ID.
* @returns {Promise<Array>} Returns a promise that resolves to an array of owners' unique IDs, or rejects with an error.
*/
@Cordova({ otherPromise: true })
getOwners(instanceID: any): Promise<any[]> {
return;
}
/**
* This returns the data creator unique ID.
* @param instanceID {any} Secure data instance ID.
* @returns {Promise<Number>} Returns a promsie that resolves to the creator's unique ID, or rejects with an error.
*/
@Cordova({ otherPromise: true })
getCreator(instanceID: any): Promise<Number> {
return;
}
/**
* This returns an array of the trusted web domains of the secure data instance.
* @param instanceID {any} Secure data instance ID.
* @returns {Promise<Array>} Returns a promise that resolves to a list of web owners, or rejects with an error.
*/
@Cordova({ otherPromise: true })
getWebOwners(instanceID: any): Promise<any[]> {
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<any>} Returns a promise that resolves with no parameters, or rejects with an error.
*/
@Cordova({ otherPromise: true })
changeExtraKey(options: any): Promise<any> {
return;
}
/**
* This releases a secure data instance.
* @param instanceID {any} Secure data instance ID.
* @returns {Promise<any>} Returns a promise that resovles with no parameters, or rejects with an error.
*/
@Cordova({ otherPromise: true })
destroy(instanceID: any): Promise<any> {
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<any>} Returns a Promise that resolves with no parameters, or rejects with an error.
*/
@Cordova({ otherPromise: true })
delete(options: { id: string; storageType?: Number }): Promise<any> {
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<Number>} 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<Number> {
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<any>} 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<any> {
return;
}
}

View File

@ -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<any>}
*/
@Cordova()
setAppClientID(appClientId: string, clientSecret: string): Promise<any> {
return;
}
/**
* Starts scanning for JINS MEME.
* @returns {Observable<any>}
*/
@Cordova({
observable: true,
clearFunction: 'stopScan',
clearWithArgs: true,
})
startScan(): Observable<any> {
return;
}
/**
* Stops scanning JINS MEME.
* @returns {Promise<any>}
*/
@Cordova()
stopScan(): Promise<any> {
return;
}
/**
* Establishes connection to JINS MEME.
* @param {string} target
* @returns {Observable<any>}
*/
@CordovaCheck({
observable: true,
})
connect(target: string): Observable<any> {
return new Observable<any>((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<any>}
*/
@Cordova()
setAutoConnect(flag: boolean): Promise<any> {
return;
}
/**
* Returns whether a connection to JINS MEME has been established.
* @returns {Promise<any>}
*/
@Cordova()
isConnected(): Promise<any> {
return;
}
/**
* Disconnects from JINS MEME.
* @returns {Promise<any>}
*/
@Cordova()
disconnect(): Promise<any> {
return;
}
/**
* Starts receiving realtime data.
* @returns {Observable<any>}
*/
@Cordova({
observable: true,
clearFunction: 'stopDataReport',
clearWithArgs: true,
})
startDataReport(): Observable<any> {
return;
}
/**
* Stops receiving data.
* @returns {Promise<any>}
*/
@Cordova()
stopDataReport(): Promise<any> {
return;
}
/**
* Returns SDK version.
*
* @returns {Promise<any>}
*/
@Cordova()
getSDKVersion(): Promise<any> {
return;
}
/**
* Returns JINS MEME connected with other apps.
* @returns {Promise<any>}
*/
@Cordova()
getConnectedByOthers(): Promise<any> {
return;
}
/**
* Returns calibration status
* @returns {Promise<any>}
*/
@Cordova()
isCalibrated(): Promise<any> {
return;
}
/**
* Returns device type.
* @returns {Promise<any>}
*/
@Cordova()
getConnectedDeviceType(): Promise<any> {
return;
}
/**
* Returns hardware version.
* @returns {Promise<any>}
*/
@Cordova()
getConnectedDeviceSubType(): Promise<any> {
return;
}
/**
* Returns FW Version.
* @returns {Promise<any>}
*/
@Cordova()
getFWVersion(): Promise<any> {
return;
}
/**
* Returns HW Version.
* @returns {Promise<any>}
*/
@Cordova()
getHWVersion(): Promise<any> {
return;
}
/**
* Returns response about whether data was received or not.
* @returns {Promise<any>}
*/
@Cordova()
isDataReceiving(): Promise<any> {
return;
}
}

View File

@ -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<any> {
return;
}
@Cordova({
errorIndex: 0,
})
enableDebug(): Promise<any> {
return;
}
}