mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-03-04 00:13:06 +08:00
chore(tslint): add tslint & clean up code
This commit is contained in:
parent
8b6d9f33f6
commit
06146b322f
@ -2,6 +2,7 @@ var gulp = require('gulp');
|
|||||||
var minimist = require('minimist');
|
var minimist = require('minimist');
|
||||||
var uglify = require('gulp-uglify');
|
var uglify = require('gulp-uglify');
|
||||||
var rename = require("gulp-rename");
|
var rename = require("gulp-rename");
|
||||||
|
var tslint = require('gulp-tslint');
|
||||||
|
|
||||||
var flagConfig = {
|
var flagConfig = {
|
||||||
string: ['port', 'version', 'ngVersion', 'animations'],
|
string: ['port', 'version', 'ngVersion', 'animations'],
|
||||||
@ -23,3 +24,9 @@ gulp.task("minify:dist", function(){
|
|||||||
}))
|
}))
|
||||||
.pipe(gulp.dest('./dist'));
|
.pipe(gulp.dest('./dist'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
gulp.task("tslint", function(){
|
||||||
|
gulp.src("src/**/*.ts")
|
||||||
|
.pipe(tslint())
|
||||||
|
.pipe(tslint.report('verbose'));
|
||||||
|
});
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
"glob": "^6.0.4",
|
"glob": "^6.0.4",
|
||||||
"gulp": "~3.9.0",
|
"gulp": "~3.9.0",
|
||||||
"gulp-rename": "^1.2.2",
|
"gulp-rename": "^1.2.2",
|
||||||
|
"gulp-tslint": "^5.0.0",
|
||||||
"gulp-uglify": "^1.5.3",
|
"gulp-uglify": "^1.5.3",
|
||||||
"lodash": "3.10.1",
|
"lodash": "3.10.1",
|
||||||
"minimist": "^1.1.3",
|
"minimist": "^1.1.3",
|
||||||
@ -30,6 +31,8 @@
|
|||||||
"node-html-encoder": "0.0.2",
|
"node-html-encoder": "0.0.2",
|
||||||
"q": "1.4.1",
|
"q": "1.4.1",
|
||||||
"semver": "^5.0.1",
|
"semver": "^5.0.1",
|
||||||
|
"tslint": "^3.8.1",
|
||||||
|
"tslint-eslint-rules": "^1.3.0",
|
||||||
"typescript": "^1.7.5"
|
"typescript": "^1.7.5"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -59,12 +59,12 @@ export class ActionSheet {
|
|||||||
addCancelButtonWithLabel?: string,
|
addCancelButtonWithLabel?: string,
|
||||||
addDestructiveButtonWithLabel?: string,
|
addDestructiveButtonWithLabel?: string,
|
||||||
position?: number[]
|
position?: number[]
|
||||||
}): Promise<any> { return }
|
}): Promise<any> { return; }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hide the ActionSheet.
|
* Hide the ActionSheet.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static hide(): Promise<any> { return }
|
static hide(): Promise<any> { return; }
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import {Plugin, Cordova} from './plugin';
|
||||||
import {Observable} from "rxjs/Observable";
|
import {Observable} from 'rxjs/Observable';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name AdMob
|
* @name AdMob
|
||||||
@ -20,7 +20,7 @@ export class AdMob {
|
|||||||
* @param adIdOrOptions
|
* @param adIdOrOptions
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static createBanner(adIdOrOptions : any) : Promise<any> {return}
|
static createBanner(adIdOrOptions: any): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -62,7 +62,7 @@ export class AdMob {
|
|||||||
* @param adIdOrOptions
|
* @param adIdOrOptions
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static prepareInterstitial(adIdOrOptions : any) : Promise<any> {return}
|
static prepareInterstitial(adIdOrOptions: any): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show interstitial
|
* Show interstitial
|
||||||
@ -76,14 +76,14 @@ export class AdMob {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isInterstitialReady () : Promise<boolean> {return}
|
static isInterstitialReady (): Promise<boolean> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prepare a reward video ad
|
* Prepare a reward video ad
|
||||||
* @param adIdOrOptions
|
* @param adIdOrOptions
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static prepareRewardVideoAd(adIdOrOptions : any) : Promise<any> {return}
|
static prepareRewardVideoAd(adIdOrOptions: any): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show a reward video ad
|
* Show a reward video ad
|
||||||
@ -98,14 +98,14 @@ export class AdMob {
|
|||||||
* @param options Returns a promise that resolves if the options are set successfully
|
* @param options Returns a promise that resolves if the options are set successfully
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static setOptions(options:any) : Promise<any> {return}
|
static setOptions(options: any): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get user ad settings
|
* Get user ad settings
|
||||||
* @returns {Promise<any>} Returns a promise that resolves with the ad settings
|
* @returns {Promise<any>} Returns a promise that resolves with the ad settings
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getAdSettings() : Promise<any> {return}
|
static getAdSettings(): Promise<any> {return; }
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
|
|
||||||
@ -113,65 +113,65 @@ export class AdMob {
|
|||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'onBannerFailedToReceive'
|
event: 'onBannerFailedToReceive'
|
||||||
})
|
})
|
||||||
static onBannerFailedToReceive () : Observable<any> {return}
|
static onBannerFailedToReceive (): Observable<any> {return; }
|
||||||
|
|
||||||
@Cordova({
|
@Cordova({
|
||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'onBannerReceive'
|
event: 'onBannerReceive'
|
||||||
})
|
})
|
||||||
static onBannerReceive () : Observable<any> {return}
|
static onBannerReceive (): Observable<any> {return; }
|
||||||
|
|
||||||
@Cordova({
|
@Cordova({
|
||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'onBannerPresent'
|
event: 'onBannerPresent'
|
||||||
})
|
})
|
||||||
static onBannerPresent () : Observable<any> {return}
|
static onBannerPresent (): Observable<any> {return; }
|
||||||
|
|
||||||
@Cordova({
|
@Cordova({
|
||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'onBannerLeaveApp'
|
event: 'onBannerLeaveApp'
|
||||||
})
|
})
|
||||||
static onBannerLeaveApp () : Observable<any> {return}
|
static onBannerLeaveApp (): Observable<any> {return; }
|
||||||
|
|
||||||
@Cordova({
|
@Cordova({
|
||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'onBannerDismiss'
|
event: 'onBannerDismiss'
|
||||||
})
|
})
|
||||||
static onBannerDismiss () : Observable<any> {return}
|
static onBannerDismiss (): Observable<any> {return; }
|
||||||
|
|
||||||
|
|
||||||
@Cordova({
|
@Cordova({
|
||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'onInterstitialFailedToReceive'
|
event: 'onInterstitialFailedToReceive'
|
||||||
})
|
})
|
||||||
static onInterstitialFailedToReceive () : Observable<any> {return}
|
static onInterstitialFailedToReceive (): Observable<any> {return; }
|
||||||
|
|
||||||
|
|
||||||
@Cordova({
|
@Cordova({
|
||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'onInterstitialReceive'
|
event: 'onInterstitialReceive'
|
||||||
})
|
})
|
||||||
static onInterstitialReceive () : Observable<any> {return}
|
static onInterstitialReceive (): Observable<any> {return; }
|
||||||
|
|
||||||
|
|
||||||
@Cordova({
|
@Cordova({
|
||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'onInterstitialPresent'
|
event: 'onInterstitialPresent'
|
||||||
})
|
})
|
||||||
static onInterstitialPresent () : Observable<any> {return}
|
static onInterstitialPresent (): Observable<any> {return; }
|
||||||
|
|
||||||
|
|
||||||
@Cordova({
|
@Cordova({
|
||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'onInterstitialLeaveApp'
|
event: 'onInterstitialLeaveApp'
|
||||||
})
|
})
|
||||||
static onInterstitialLeaveApp () : Observable<any> {return}
|
static onInterstitialLeaveApp (): Observable<any> {return; }
|
||||||
|
|
||||||
|
|
||||||
@Cordova({
|
@Cordova({
|
||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'onInterstitialDismiss'
|
event: 'onInterstitialDismiss'
|
||||||
})
|
})
|
||||||
static onInterstitialDismiss () : Observable<any> {return}
|
static onInterstitialDismiss (): Observable<any> {return; }
|
||||||
|
|
||||||
}
|
}
|
@ -41,6 +41,6 @@ export class AppAvailability {
|
|||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static check(app: string): Promise<boolean> { return }
|
static check(app: string): Promise<boolean> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -30,27 +30,27 @@ export class AppVersion {
|
|||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getAppName(): Promise<any> { return }
|
static getAppName(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the package name of the app
|
* Returns the package name of the app
|
||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getPackageName(): Promise<any> { return }
|
static getPackageName(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the build identifier of the app
|
* Returns the build identifier of the app
|
||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getVersionCode(): Promise<any> { return }
|
static getVersionCode(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the version of the app
|
* Returns the version of the app
|
||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getVersionNumber(): Promise<any> { return }
|
static getVersionNumber(): Promise<any> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -29,49 +29,49 @@ export class Badge {
|
|||||||
* Clear the badge of the app icon.
|
* Clear the badge of the app icon.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static clear(): Promise<boolean> { return }
|
static clear(): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the badge of the app icon.
|
* Set the badge of the app icon.
|
||||||
* @param {number} number The new badge number.
|
* @param {number} badgeNumber The new badge number.
|
||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static set(number: number): Promise<any> { return }
|
static set(badgeNumber: number): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the badge of the app icon.
|
* Get the badge of the app icon.
|
||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static get(): Promise<any> { return }
|
static get(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Increase the badge number.
|
* Increase the badge number.
|
||||||
* @param {number} count Count to add to the current badge number
|
* @param {number} increaseBy Count to add to the current badge number
|
||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static increase(number: number): Promise<any> { return }
|
static increase(increaseBy: number): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decrease the badge number.
|
* Decrease the badge number.
|
||||||
* @param {number} count Count to subtract from the current badge number
|
* @param {number} decreaseBy Count to subtract from the current badge number
|
||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static decrease(number: number): Promise<any> { return }
|
static decrease(decreaseBy: number): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if the app has permission to show badges.
|
* Determine if the app has permission to show badges.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static hasPermission(): Promise<any> { return }
|
static hasPermission(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register permission to set badge notifications
|
* Register permission to set badge notifications
|
||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static registerPermission(): Promise<any> { return }
|
static registerPermission(): Promise<any> { return; }
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ export class BarcodeScanner {
|
|||||||
* @return Returns a Promise that resolves with scanner data, or rejects with an error.
|
* @return Returns a Promise that resolves with scanner data, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static scan(): Promise<any> { return }
|
static scan(): Promise<any> { return; }
|
||||||
|
|
||||||
// Not well supported
|
// Not well supported
|
||||||
// @Cordova()
|
// @Cordova()
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Plugin, Cordova} from './plugin'
|
import {Plugin, Cordova} from './plugin';
|
||||||
/**
|
/**
|
||||||
* @name Base64 To Gallery
|
* @name Base64 To Gallery
|
||||||
* @description This plugin allows you to save base64 data as a png image into the device
|
* @description This plugin allows you to save base64 data as a png image into the device
|
||||||
@ -28,7 +28,7 @@ export class Base64ToGallery {
|
|||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
base64ToGallery(data: string , prefix?: string ): Promise<any> {
|
base64ToGallery(data: string , prefix?: string ): Promise<any> {
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import {Plugin, Cordova} from './plugin';
|
||||||
import {Observable} from "rxjs/Observable";
|
import {Observable} from 'rxjs/Observable';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Battery Status
|
* @name Battery Status
|
||||||
@ -39,7 +39,7 @@ export class BatteryStatus {
|
|||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'batterystatus'
|
event: 'batterystatus'
|
||||||
})
|
})
|
||||||
static onChange () : Observable<StatusObject> {return}
|
static onChange (): Observable<StatusObject> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Watch when the battery level goes low
|
* Watch when the battery level goes low
|
||||||
@ -49,7 +49,7 @@ export class BatteryStatus {
|
|||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'batterylow'
|
event: 'batterylow'
|
||||||
})
|
})
|
||||||
static onLow () : Observable<StatusObject> {return}
|
static onLow (): Observable<StatusObject> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Watch when the battery level goes to critial
|
* Watch when the battery level goes to critial
|
||||||
@ -59,7 +59,7 @@ export class BatteryStatus {
|
|||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'batterycritical'
|
event: 'batterycritical'
|
||||||
})
|
})
|
||||||
static onCritical () : Observable<StatusObject> {return}
|
static onCritical (): Observable<StatusObject> {return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,10 +67,10 @@ export interface StatusObject {
|
|||||||
/**
|
/**
|
||||||
* The battery charge percentage
|
* The battery charge percentage
|
||||||
*/
|
*/
|
||||||
level : number,
|
level: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A boolean that indicates whether the device is plugged in
|
* A boolean that indicates whether the device is plugged in
|
||||||
*/
|
*/
|
||||||
isPlugged : boolean
|
isPlugged: boolean;
|
||||||
}
|
}
|
||||||
|
@ -182,7 +182,7 @@ export class BLE {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true
|
observable: true
|
||||||
})
|
})
|
||||||
static scan(services: string[], seconds: number): Observable<any> { return }
|
static scan(services: string[], seconds: number): Observable<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Scan and discover BLE peripherals until `stopScan` is called.
|
* Scan and discover BLE peripherals until `stopScan` is called.
|
||||||
@ -205,7 +205,7 @@ export class BLE {
|
|||||||
clearFunction: 'stopScan',
|
clearFunction: 'stopScan',
|
||||||
clearWithArgs: true
|
clearWithArgs: true
|
||||||
})
|
})
|
||||||
static startScan(services: string[]): Observable<any> { return }
|
static startScan(services: string[]): Observable<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop a scan started by `startScan`.
|
* Stop a scan started by `startScan`.
|
||||||
@ -222,7 +222,7 @@ export class BLE {
|
|||||||
* @return returns a Promise.
|
* @return returns a Promise.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static stopScan(): Promise<any> { return }
|
static stopScan(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect to a peripheral.
|
* Connect to a peripheral.
|
||||||
@ -243,7 +243,7 @@ export class BLE {
|
|||||||
clearFunction: 'disconnect',
|
clearFunction: 'disconnect',
|
||||||
clearWithArgs: true
|
clearWithArgs: true
|
||||||
})
|
})
|
||||||
static connect(deviceId: string): Observable<any> { return }
|
static connect(deviceId: string): Observable<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disconnect from a peripheral.
|
* Disconnect from a peripheral.
|
||||||
@ -257,14 +257,14 @@ export class BLE {
|
|||||||
* @return Returns a Promise
|
* @return Returns a Promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static disconnect(deviceId: string): Promise<any> { return }
|
static disconnect(deviceId: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read the value of a characteristic.
|
* Read the value of a characteristic.
|
||||||
*
|
*
|
||||||
* @param {string} device_id UUID or MAC address of the peripheral
|
* @param {string} deviceId UUID or MAC address of the peripheral
|
||||||
* @param {string} service_uuid UUID of the BLE service
|
* @param {string} serviceUUID UUID of the BLE service
|
||||||
* @param {string} characteristic_uuid UUID of the BLE characteristic
|
* @param {string} characteristicUUID UUID of the BLE characteristic
|
||||||
* @return Returns a Promise
|
* @return Returns a Promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -272,7 +272,7 @@ export class BLE {
|
|||||||
deviceId: string,
|
deviceId: string,
|
||||||
serviceUUID: string,
|
serviceUUID: string,
|
||||||
characteristicUUID: string
|
characteristicUUID: string
|
||||||
): Promise<any> { return };
|
): Promise<any> { return; };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write the value of a characteristic.
|
* Write the value of a characteristic.
|
||||||
@ -296,9 +296,9 @@ export class BLE {
|
|||||||
* BLE.write(device_id, SERVICE, CHARACTERISTIC, data.buffer);
|
* BLE.write(device_id, SERVICE, CHARACTERISTIC, data.buffer);
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
* @param {string} device_id UUID or MAC address of the peripheral
|
* @param {string} deviceId UUID or MAC address of the peripheral
|
||||||
* @param {string} service_uuid UUID of the BLE service
|
* @param {string} serviceUUID UUID of the BLE service
|
||||||
* @param {string} characteristic_uuid UUID of the BLE characteristic
|
* @param {string} characteristicUUID UUID of the BLE characteristic
|
||||||
* @param {ArrayBuffer} value Data to write to the characteristic, as an ArrayBuffer.
|
* @param {ArrayBuffer} value Data to write to the characteristic, as an ArrayBuffer.
|
||||||
* @return Returns a Promise
|
* @return Returns a Promise
|
||||||
*/
|
*/
|
||||||
@ -308,14 +308,14 @@ export class BLE {
|
|||||||
serviceUUID: string,
|
serviceUUID: string,
|
||||||
characteristicUUID: string,
|
characteristicUUID: string,
|
||||||
value: ArrayBuffer
|
value: ArrayBuffer
|
||||||
): Promise<any> { return }
|
): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write the value of a characteristic without waiting for confirmation from the peripheral.
|
* Write the value of a characteristic without waiting for confirmation from the peripheral.
|
||||||
*
|
*
|
||||||
* @param {string} device_id UUID or MAC address of the peripheral
|
* @param {string} deviceId UUID or MAC address of the peripheral
|
||||||
* @param {string} service_uuid UUID of the BLE service
|
* @param {string} serviceUUID UUID of the BLE service
|
||||||
* @param {string} characteristic_uuid UUID of the BLE characteristic
|
* @param {string} characteristicUUID UUID of the BLE characteristic
|
||||||
* @param {ArrayBuffer} value Data to write to the characteristic, as an ArrayBuffer.
|
* @param {ArrayBuffer} value Data to write to the characteristic, as an ArrayBuffer.
|
||||||
* @return Returns a Promise
|
* @return Returns a Promise
|
||||||
*/
|
*/
|
||||||
@ -325,7 +325,7 @@ export class BLE {
|
|||||||
serviceUUID: string,
|
serviceUUID: string,
|
||||||
characteristicUUID: string,
|
characteristicUUID: string,
|
||||||
value: ArrayBuffer
|
value: ArrayBuffer
|
||||||
): Promise<any> { return }
|
): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register to be notified when the value of a characteristic changes.
|
* Register to be notified when the value of a characteristic changes.
|
||||||
@ -337,9 +337,9 @@ export class BLE {
|
|||||||
* });
|
* });
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @param {string} device_id UUID or MAC address of the peripheral
|
* @param {string} deviceId UUID or MAC address of the peripheral
|
||||||
* @param {string} service_uuid UUID of the BLE service
|
* @param {string} serviceUUID UUID of the BLE service
|
||||||
* @param {string} characteristic_uuid UUID of the BLE characteristic
|
* @param {string} characteristicUUID UUID of the BLE characteristic
|
||||||
* @return Returns an Observable that notifies of characteristic changes.
|
* @return Returns an Observable that notifies of characteristic changes.
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -351,14 +351,14 @@ export class BLE {
|
|||||||
deviceId: string,
|
deviceId: string,
|
||||||
serviceUUID: string,
|
serviceUUID: string,
|
||||||
characteristicUUID: string
|
characteristicUUID: string
|
||||||
): Observable<any> { return }
|
): Observable<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop being notified when the value of a characteristic changes.
|
* Stop being notified when the value of a characteristic changes.
|
||||||
*
|
*
|
||||||
* @param {string} device_id UUID or MAC address of the peripheral
|
* @param {string} deviceId UUID or MAC address of the peripheral
|
||||||
* @param {string} service_uuid UUID of the BLE service
|
* @param {string} serviceUUID UUID of the BLE service
|
||||||
* @param {string} characteristic_uuid UUID of the BLE characteristic
|
* @param {string} characteristicUUID UUID of the BLE characteristic
|
||||||
* @return Returns a Promise.
|
* @return Returns a Promise.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -366,7 +366,7 @@ export class BLE {
|
|||||||
deviceId: string,
|
deviceId: string,
|
||||||
serviceUUID: string,
|
serviceUUID: string,
|
||||||
characteristicUUID: string
|
characteristicUUID: string
|
||||||
): Promise<any> { return }
|
): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Report the connection status.
|
* Report the connection status.
|
||||||
@ -378,11 +378,11 @@ export class BLE {
|
|||||||
* () => { console.log('not connected'); }
|
* () => { console.log('not connected'); }
|
||||||
* );
|
* );
|
||||||
* ```
|
* ```
|
||||||
* @param {string} device_id UUID or MAC address of the peripheral
|
* @param {string} deviceId UUID or MAC address of the peripheral
|
||||||
* @return Returns a Promise.
|
* @return Returns a Promise.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isConnected(deviceId: string): Promise<any> { return }
|
static isConnected(deviceId: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Report if bluetooth is enabled.
|
* Report if bluetooth is enabled.
|
||||||
@ -397,7 +397,7 @@ export class BLE {
|
|||||||
* @return Returns a Promise.
|
* @return Returns a Promise.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isEnabled(): Promise<any> { return }
|
static isEnabled(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open System Bluetooth settings (Android only).
|
* Open System Bluetooth settings (Android only).
|
||||||
@ -405,7 +405,7 @@ export class BLE {
|
|||||||
* @return Returns a Promise.
|
* @return Returns a Promise.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static showBluetoothSettings(): Promise<any> { return }
|
static showBluetoothSettings(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable Bluetooth on the device (Android only).
|
* Enable Bluetooth on the device (Android only).
|
||||||
@ -413,5 +413,5 @@ export class BLE {
|
|||||||
* @return Returns a Promise.
|
* @return Returns a Promise.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static enable(): Promise<any> { return }
|
static enable(): Promise<any> { return; }
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import {Plugin, Cordova} from './plugin';
|
||||||
import {Observable} from "rxjs/Observable";
|
import {Observable} from 'rxjs/Observable';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Bluetooth Serial
|
* @name Bluetooth Serial
|
||||||
@ -21,7 +21,7 @@ export class BluetoothSerial {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||||
})
|
})
|
||||||
static connect (macAddress_or_uuid : string) : Promise<any> {return}
|
static connect (macAddress_or_uuid: string): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect insecurely to a Bluetooth device
|
* Connect insecurely to a Bluetooth device
|
||||||
@ -30,7 +30,7 @@ export class BluetoothSerial {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android']
|
platforms: ['Android']
|
||||||
})
|
})
|
||||||
static connectInsecure (macAddress : string) : Promise<any> {return}
|
static connectInsecure (macAddress: string): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disconnect
|
* Disconnect
|
||||||
@ -38,7 +38,7 @@ export class BluetoothSerial {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||||
})
|
})
|
||||||
static disconnect () : Promise<any> {return}
|
static disconnect (): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes data to the serial port
|
* Writes data to the serial port
|
||||||
@ -66,14 +66,14 @@ export class BluetoothSerial {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||||
})
|
})
|
||||||
static write (data : any) : Promise<any> {return}
|
static write (data: any): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the number of bytes of data available
|
* Gets the number of bytes of data available
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||||
}) static available () : Promise<any> {return}
|
}) static available (): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads data from the buffer
|
* Reads data from the buffer
|
||||||
@ -81,7 +81,7 @@ export class BluetoothSerial {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||||
})
|
})
|
||||||
static read () : Promise<any> {return}
|
static read (): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads data from the buffer until it reaches a delimiter
|
* Reads data from the buffer until it reaches a delimiter
|
||||||
@ -90,7 +90,7 @@ export class BluetoothSerial {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||||
})
|
})
|
||||||
static readUntil (delimiter : string) : Promise<any> {return}
|
static readUntil (delimiter: string): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Subscribe to be notified when data is received
|
* Subscribe to be notified when data is received
|
||||||
@ -101,7 +101,7 @@ export class BluetoothSerial {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'unsubscribe'
|
clearFunction: 'unsubscribe'
|
||||||
})
|
})
|
||||||
static subscribe (delimiter : string) : Observable<any> {return}
|
static subscribe (delimiter: string): Observable<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Subscribe to be notified when data is received
|
* Subscribe to be notified when data is received
|
||||||
@ -111,7 +111,7 @@ export class BluetoothSerial {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'unsubscribeRawData'
|
clearFunction: 'unsubscribeRawData'
|
||||||
})
|
})
|
||||||
static subscribeRawData () : Observable<any> {return}
|
static subscribeRawData (): Observable<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears data in buffer
|
* Clears data in buffer
|
||||||
@ -119,7 +119,7 @@ export class BluetoothSerial {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||||
})
|
})
|
||||||
static clear () : Promise<any> {return}
|
static clear (): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lists bonded devices
|
* Lists bonded devices
|
||||||
@ -127,7 +127,7 @@ export class BluetoothSerial {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||||
})
|
})
|
||||||
static list () : Promise<any> {return}
|
static list (): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reports if bluetooth is enabled
|
* Reports if bluetooth is enabled
|
||||||
@ -135,7 +135,7 @@ export class BluetoothSerial {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||||
})
|
})
|
||||||
static isEnabled () : Promise<any> {return}
|
static isEnabled (): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reports the connection status
|
* Reports the connection status
|
||||||
@ -143,7 +143,7 @@ export class BluetoothSerial {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||||
})
|
})
|
||||||
static isConnected () : Promise<any> {return}
|
static isConnected (): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads the RSSI from the connected peripheral
|
* Reads the RSSI from the connected peripheral
|
||||||
@ -151,7 +151,7 @@ export class BluetoothSerial {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||||
})
|
})
|
||||||
static readRSSI () : Promise<any> {return}
|
static readRSSI (): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the Bluetooth settings on the device
|
* Show the Bluetooth settings on the device
|
||||||
@ -159,7 +159,7 @@ export class BluetoothSerial {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||||
})
|
})
|
||||||
static showBluetoothSettings () : Promise<any> {return}
|
static showBluetoothSettings (): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable Bluetooth on the device
|
* Enable Bluetooth on the device
|
||||||
@ -167,7 +167,7 @@ export class BluetoothSerial {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||||
})
|
})
|
||||||
static enable () : Promise<any> {return}
|
static enable (): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Discover unpaired devices
|
* Discover unpaired devices
|
||||||
@ -189,7 +189,7 @@ export class BluetoothSerial {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||||
})
|
})
|
||||||
static discoverUnpaired () : Promise<any> {return}
|
static discoverUnpaired (): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Subscribe to be notified on Bluetooth device discovery. Discovery process must be initiated with the `discoverUnpaired` function.
|
* Subscribe to be notified on Bluetooth device discovery. Discovery process must be initiated with the `discoverUnpaired` function.
|
||||||
@ -199,7 +199,7 @@ export class BluetoothSerial {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'clearDeviceDiscoveredListener'
|
clearFunction: 'clearDeviceDiscoveredListener'
|
||||||
})
|
})
|
||||||
static setDeviceDiscoveredListener () : Observable<any> {return}
|
static setDeviceDiscoveredListener (): Observable<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the human readable device name that is broadcasted to other devices
|
* Sets the human readable device name that is broadcasted to other devices
|
||||||
|
@ -3,8 +3,8 @@ import {Plugin, Cordova} from './plugin';
|
|||||||
export interface CalendarOptions {
|
export interface CalendarOptions {
|
||||||
firstReminderMinutes?: number;
|
firstReminderMinutes?: number;
|
||||||
secondReminderMinutes?: number;
|
secondReminderMinutes?: number;
|
||||||
recurrence?: string, // options are: 'daily', 'weekly', 'monthly', 'yearly'
|
recurrence?: string; // options are: 'daily', 'weekly', 'monthly', 'yearly'
|
||||||
recurrenceInterval?: number, // only used when recurrence is set
|
recurrenceInterval?: number; // only used when recurrence is set
|
||||||
recurrenceEndDate?: Date;
|
recurrenceEndDate?: Date;
|
||||||
calendarName?: string;
|
calendarName?: string;
|
||||||
calendarId?: number;
|
calendarId?: number;
|
||||||
@ -12,8 +12,8 @@ export interface CalendarOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface Calendar {
|
export interface Calendar {
|
||||||
id: number,
|
id: number;
|
||||||
name: string
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -57,7 +57,7 @@ export class Calendar {
|
|||||||
@Cordova()
|
@Cordova()
|
||||||
static createCalendar(
|
static createCalendar(
|
||||||
nameOrOptions: string | { calendarName: string, calendarColor: string }
|
nameOrOptions: string | { calendarName: string, calendarColor: string }
|
||||||
): Promise<any> { return }
|
): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete a calendar. (iOS only)
|
* Delete a calendar. (iOS only)
|
||||||
@ -74,7 +74,7 @@ export class Calendar {
|
|||||||
* @return Returns a Promise
|
* @return Returns a Promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static deleteCalendar(name: string): Promise<any> { return }
|
static deleteCalendar(name: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the default calendar options.
|
* Returns the default calendar options.
|
||||||
@ -102,7 +102,7 @@ export class Calendar {
|
|||||||
calendarName: null,
|
calendarName: null,
|
||||||
calendarId: null,
|
calendarId: null,
|
||||||
url: null
|
url: null
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -122,7 +122,7 @@ export class Calendar {
|
|||||||
notes?: string,
|
notes?: string,
|
||||||
startDate?: Date,
|
startDate?: Date,
|
||||||
endDate?: Date
|
endDate?: Date
|
||||||
): Promise<any> { return }
|
): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Silently create an event with additional options.
|
* Silently create an event with additional options.
|
||||||
@ -143,7 +143,7 @@ export class Calendar {
|
|||||||
startDate?: Date,
|
startDate?: Date,
|
||||||
endDate?: Date,
|
endDate?: Date,
|
||||||
options?: CalendarOptions
|
options?: CalendarOptions
|
||||||
): Promise<any> { return }
|
): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interactively create an event.
|
* Interactively create an event.
|
||||||
@ -162,7 +162,7 @@ export class Calendar {
|
|||||||
notes?: string,
|
notes?: string,
|
||||||
startDate?: Date,
|
startDate?: Date,
|
||||||
endDate?: Date
|
endDate?: Date
|
||||||
): Promise<any> { return }
|
): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interactively create an event with additional options.
|
* Interactively create an event with additional options.
|
||||||
@ -183,7 +183,7 @@ export class Calendar {
|
|||||||
startDate?: Date,
|
startDate?: Date,
|
||||||
endDate?: Date,
|
endDate?: Date,
|
||||||
options?: CalendarOptions
|
options?: CalendarOptions
|
||||||
): Promise<any> { return }
|
): Promise<any> { return; }
|
||||||
|
|
||||||
// deprecated
|
// deprecated
|
||||||
// @Cordova()
|
// @Cordova()
|
||||||
@ -213,7 +213,7 @@ export class Calendar {
|
|||||||
notes?: string,
|
notes?: string,
|
||||||
startDate?: Date,
|
startDate?: Date,
|
||||||
endDate?: Date
|
endDate?: Date
|
||||||
): Promise<any> { return }
|
): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find an event with additional options.
|
* Find an event with additional options.
|
||||||
@ -234,7 +234,7 @@ export class Calendar {
|
|||||||
startDate?: Date,
|
startDate?: Date,
|
||||||
endDate?: Date,
|
endDate?: Date,
|
||||||
options?: CalendarOptions
|
options?: CalendarOptions
|
||||||
): Promise<any> { return }
|
): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find a list of events within the specified date range. (Android only)
|
* Find a list of events within the specified date range. (Android only)
|
||||||
@ -244,21 +244,21 @@ export class Calendar {
|
|||||||
* @return Returns a Promise that resolves with the list of events, or rejects with an error.
|
* @return Returns a Promise that resolves with the list of events, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static listEventsInRange(startDate: Date, endDate: Date): Promise<any> { return }
|
static listEventsInRange(startDate: Date, endDate: Date): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a list of all calendars.
|
* Get a list of all calendars.
|
||||||
* @return A Promise that resolves with the list of calendars, or rejects with an error.
|
* @return A Promise that resolves with the list of calendars, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static listCalendars(){ return }
|
static listCalendars() { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a list of all future events in the specified calendar. (iOS only)
|
* Get a list of all future events in the specified calendar. (iOS only)
|
||||||
* @return Returns a Promise that resolves with the list of events, or rejects with an error.
|
* @return Returns a Promise that resolves with the list of events, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static findAllEventsInNamedCalendar(calendarName: string): Promise<any> { return }
|
static findAllEventsInNamedCalendar(calendarName: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Modify an event. (iOS only)
|
* Modify an event. (iOS only)
|
||||||
@ -287,7 +287,7 @@ export class Calendar {
|
|||||||
newNotes?: string,
|
newNotes?: string,
|
||||||
newStartDate?: Date,
|
newStartDate?: Date,
|
||||||
newEndDate?: Date
|
newEndDate?: Date
|
||||||
): Promise<any> { return }
|
): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Modify an event with additional options. (iOS only)
|
* Modify an event with additional options. (iOS only)
|
||||||
@ -318,7 +318,7 @@ export class Calendar {
|
|||||||
newStartDate?: Date,
|
newStartDate?: Date,
|
||||||
newEndDate?: Date,
|
newEndDate?: Date,
|
||||||
options?: CalendarOptions
|
options?: CalendarOptions
|
||||||
) { return }
|
) { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete an event.
|
* Delete an event.
|
||||||
@ -337,7 +337,7 @@ export class Calendar {
|
|||||||
notes?: string,
|
notes?: string,
|
||||||
startDate?: Date,
|
startDate?: Date,
|
||||||
endDate?: Date
|
endDate?: Date
|
||||||
): Promise<any> { return }
|
): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete an event from the specified Calendar. (iOS only)
|
* Delete an event from the specified Calendar. (iOS only)
|
||||||
@ -358,12 +358,12 @@ export class Calendar {
|
|||||||
startDate?: Date,
|
startDate?: Date,
|
||||||
endDate?: Date,
|
endDate?: Date,
|
||||||
calendarName?: string
|
calendarName?: string
|
||||||
): Promise<any> { return }
|
): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open the calendar at the specified date.
|
* Open the calendar at the specified date.
|
||||||
* @return {Date} date
|
* @return {Date} date
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static openCalendar(date: Date): Promise<any> { return }
|
static openCalendar(date: Date): Promise<any> { return; }
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,7 @@ export class Camera {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
static getPicture(options: CameraOptions): Promise<any> { return }
|
static getPicture(options: CameraOptions): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove intermediate image files that are kept in temporary storage after calling camera.getPicture.
|
* Remove intermediate image files that are kept in temporary storage after calling camera.getPicture.
|
||||||
|
@ -41,13 +41,13 @@ export class Clipboard {
|
|||||||
* @returns {Promise<T>}
|
* @returns {Promise<T>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static copy(text: string): Promise<any> { return }
|
static copy(text: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pastes the text stored in clipboard
|
* Pastes the text stored in clipboard
|
||||||
* @returns {Promise<T>}
|
* @returns {Promise<T>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static paste(): Promise<any> { return }
|
static paste(): Promise<any> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -249,7 +249,7 @@ export class Contacts {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
static find(fields: string[], options?: any): Promise<any> { return }
|
static find(fields: string[], options?: any): Promise<any> { return; }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -257,5 +257,5 @@ export class Contacts {
|
|||||||
* @return Returns a Promise that resolves with the selected Contact
|
* @return Returns a Promise that resolves with the selected Contact
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static pickContact(): Promise<any> { return }
|
static pickContact(): Promise<any> { return; }
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import {Plugin, Cordova} from './plugin';
|
||||||
|
|
||||||
export interface datePickerOptions {
|
export interface DatePickerOptions {
|
||||||
/**
|
/**
|
||||||
* Platforms: iOS, Android, Windows
|
* Platforms: iOS, Android, Windows
|
||||||
* The mode of the date picker
|
* The mode of the date picker
|
||||||
* Values: date | time | datetime
|
* Values: date | time | datetime
|
||||||
*/
|
*/
|
||||||
mode: string,
|
mode: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Platforms: iOS, Android, Windows
|
* Platforms: iOS, Android, Windows
|
||||||
* Selected date
|
* Selected date
|
||||||
*/
|
*/
|
||||||
date: Date,
|
date: Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Platforms: iOS, Android, Windows
|
* Platforms: iOS, Android, Windows
|
||||||
@ -20,7 +20,7 @@ export interface datePickerOptions {
|
|||||||
* Type: Date | empty String
|
* Type: Date | empty String
|
||||||
* Default: empty String
|
* Default: empty String
|
||||||
*/
|
*/
|
||||||
minDate?: Date,
|
minDate?: Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Platforms?: iOS, Android, Windows
|
* Platforms?: iOS, Android, Windows
|
||||||
@ -28,7 +28,7 @@ export interface datePickerOptions {
|
|||||||
* Type?: Date | empty String
|
* Type?: Date | empty String
|
||||||
* Default?: empty String
|
* Default?: empty String
|
||||||
*/
|
*/
|
||||||
maxDate?: Date,
|
maxDate?: Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Platforms?: Android
|
* Platforms?: Android
|
||||||
@ -36,31 +36,31 @@ export interface datePickerOptions {
|
|||||||
* Type?: String
|
* Type?: String
|
||||||
* Default?: empty String
|
* Default?: empty String
|
||||||
*/
|
*/
|
||||||
titleText?: string,
|
titleText?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Platforms?: Android
|
* Platforms?: Android
|
||||||
* Label of BUTTON_POSITIVE (done button) on Android
|
* Label of BUTTON_POSITIVE (done button) on Android
|
||||||
*/
|
*/
|
||||||
okText?: string,
|
okText?: string;
|
||||||
|
|
||||||
// TODO complete documentation here, and copy params & docs to main plugin docs
|
// TODO complete documentation here, and copy params & docs to main plugin docs
|
||||||
cancelText?: string,
|
cancelText?: string;
|
||||||
todayText?: string,
|
todayText?: string;
|
||||||
nowText?: string,
|
nowText?: string;
|
||||||
is24Hour?: boolean,
|
is24Hour?: boolean;
|
||||||
androidTheme?: number,
|
androidTheme?: number;
|
||||||
allowOldDate?: boolean,
|
allowOldDate?: boolean;
|
||||||
allowFutureDates?: boolean,
|
allowFutureDates?: boolean;
|
||||||
doneButtonLabel?: string,
|
doneButtonLabel?: string;
|
||||||
doneButtonColor?: string,
|
doneButtonColor?: string;
|
||||||
cancelButtonLabel?: string,
|
cancelButtonLabel?: string;
|
||||||
cancelButtonColor?: string,
|
cancelButtonColor?: string;
|
||||||
x?: number,
|
x?: number;
|
||||||
y?: number,
|
y?: number;
|
||||||
minuteInterval?: number,
|
minuteInterval?: number;
|
||||||
popoverArrowDirection?: string,
|
popoverArrowDirection?: string;
|
||||||
locale?: string
|
locale?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -101,6 +101,6 @@ export class DatePicker {
|
|||||||
* @returns {Promise<Date>} Returns a promise that resolves with the picked date and/or time, or rejects with an error.
|
* @returns {Promise<Date>} Returns a promise that resolves with the picked date and/or time, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static show(options: datePickerOptions): Promise<Date> { return }
|
static show(options: DatePickerOptions): Promise<Date> { return; }
|
||||||
|
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin'
|
import {Plugin, Cordova} from './plugin';
|
||||||
import {Observable} from "rxjs/Observable";
|
import {Observable} from 'rxjs/Observable';
|
||||||
/**
|
/**
|
||||||
* @name DB Meter
|
* @name DB Meter
|
||||||
* @description This plugin defines a global DBMeter object, which permits to get the decibel values from the microphone.
|
* @description This plugin defines a global DBMeter object, which permits to get the decibel values from the microphone.
|
||||||
@ -45,27 +45,27 @@ export class DBMeter {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'stop'
|
clearFunction: 'stop'
|
||||||
})
|
})
|
||||||
static start () : Observable<any> {return}
|
static start (): Observable<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stops listening
|
* Stops listening
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static stop () : Promise<any> {return}
|
static stop (): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the DB Meter is listening
|
* Check if the DB Meter is listening
|
||||||
* @return {Promise<boolean>} Returns a promise that resolves with a boolean that tells us whether the DB meter is listening
|
* @return {Promise<boolean>} Returns a promise that resolves with a boolean that tells us whether the DB meter is listening
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isListening() : Promise<boolean> {return}
|
static isListening(): Promise<boolean> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete the DB Meter instance
|
* Delete the DB Meter instance
|
||||||
* @return {Promise<any>} Returns a promise that will resolve if the instance has been deleted, and rejects if errors occur.
|
* @return {Promise<any>} Returns a promise that will resolve if the instance has been deleted, and rejects if errors occur.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static delete() : Promise<any> {return}
|
static delete(): Promise<any> {return; }
|
||||||
|
|
||||||
}
|
}
|
@ -11,23 +11,23 @@ export class DeviceAccounts {
|
|||||||
* Gets all accounts registered on the Android Device
|
* Gets all accounts registered on the Android Device
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static get() : Promise<any> {return}
|
static get(): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all accounts registered on Android device for requested type
|
* Get all accounts registered on Android device for requested type
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getByType(type: string) : Promise<any> {return}
|
static getByType(type: string): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all emails registered on Android device (accounts with 'com.google' type)
|
* Get all emails registered on Android device (accounts with 'com.google' type)
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getEmails() : Promise<any> {return}
|
static getEmails(): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the first email registered on Android device
|
* Get the first email registered on Android device
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getEmail() : Promise<any> {return}
|
static getEmail(): Promise<any> {return; }
|
||||||
}
|
}
|
@ -1,36 +1,36 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import {Plugin, Cordova} from './plugin';
|
||||||
import {Observable} from "rxjs/Observable";
|
import {Observable} from 'rxjs/Observable';
|
||||||
|
|
||||||
export interface accelerationData {
|
export interface AccelerationData {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Amount of acceleration on the x-axis. (in m/s^2)
|
* Amount of acceleration on the x-axis. (in m/s^2)
|
||||||
*/
|
*/
|
||||||
x : number,
|
x: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Amount of acceleration on the y-axis. (in m/s^2)
|
* Amount of acceleration on the y-axis. (in m/s^2)
|
||||||
*/
|
*/
|
||||||
y : number,
|
y: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Amount of acceleration on the z-axis. (in m/s^2)
|
* Amount of acceleration on the z-axis. (in m/s^2)
|
||||||
*/
|
*/
|
||||||
z : number,
|
z: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creation timestamp in milliseconds.
|
* Creation timestamp in milliseconds.
|
||||||
*/
|
*/
|
||||||
timestamp : any
|
timestamp: any;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface accelerometerOptions {
|
export interface AccelerometerOptions {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Requested period of calls to accelerometerSuccess with acceleration data in Milliseconds. Default: 10000
|
* Requested period of calls to accelerometerSuccess with acceleration data in Milliseconds. Default: 10000
|
||||||
*/
|
*/
|
||||||
frequency? : number
|
frequency?: number;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,7 +74,9 @@ export class DeviceMotion {
|
|||||||
* @returns {Promise<any>} Returns object with x, y, z, and timestamp properties
|
* @returns {Promise<any>} Returns object with x, y, z, and timestamp properties
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getCurrentAcceleration(): Promise<accelerationData> { return }
|
static getCurrentAcceleration(): Promise<AccelerationData> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Watch the device acceleration. Clear the watch by unsubscribing from the observable.
|
* Watch the device acceleration. Clear the watch by unsubscribing from the observable.
|
||||||
@ -89,12 +91,14 @@ export class DeviceMotion {
|
|||||||
* subscription.unsubscribe();
|
* subscription.unsubscribe();
|
||||||
* ```
|
* ```
|
||||||
* @param options
|
* @param options
|
||||||
* @returns {Observable<accelerationData>}
|
* @returns {Observable<AccelerationData>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse',
|
callbackOrder: 'reverse',
|
||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'clearWatch'
|
clearFunction: 'clearWatch'
|
||||||
})
|
})
|
||||||
static watchAcceleration (options?: accelerometerOptions): Observable<accelerationData> { return }
|
static watchAcceleration(options?: AccelerometerOptions): Observable<AccelerationData> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,27 +1,27 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import {Plugin, Cordova} from './plugin';
|
||||||
import {Observable} from "rxjs/Observable";
|
import {Observable} from 'rxjs/Observable';
|
||||||
|
|
||||||
export interface CompassHeading {
|
export interface CompassHeading {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The heading in degrees from 0-359.99 at a single moment in time. (Number)
|
* The heading in degrees from 0-359.99 at a single moment in time. (Number)
|
||||||
*/
|
*/
|
||||||
magneticHeading : number,
|
magneticHeading: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The heading relative to the geographic North Pole in degrees 0-359.99 at a single moment in time. A negative value indicates that the true heading can't be determined. (Number)
|
* The heading relative to the geographic North Pole in degrees 0-359.99 at a single moment in time. A negative value indicates that the true heading can't be determined. (Number)
|
||||||
*/
|
*/
|
||||||
trueHeading : number,
|
trueHeading: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The deviation in degrees between the reported heading and the true heading. (Number)
|
* The deviation in degrees between the reported heading and the true heading. (Number)
|
||||||
*/
|
*/
|
||||||
headingAccuracy : number,
|
headingAccuracy: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The time at which this heading was determined. (DOMTimeStamp)
|
* The time at which this heading was determined. (DOMTimeStamp)
|
||||||
*/
|
*/
|
||||||
timestamp : any
|
timestamp: any;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,12 +30,12 @@ export interface CompassOptions {
|
|||||||
/**
|
/**
|
||||||
* How often to retrieve the compass heading in milliseconds. (Number) (Default: 100)
|
* How often to retrieve the compass heading in milliseconds. (Number) (Default: 100)
|
||||||
*/
|
*/
|
||||||
frequency? : number,
|
frequency?: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The change in degrees required to initiate a watchHeading success callback. When this value is set, frequency is ignored. (Number)
|
* The change in degrees required to initiate a watchHeading success callback. When this value is set, frequency is ignored. (Number)
|
||||||
*/
|
*/
|
||||||
filter? : number
|
filter?: number;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ export class DeviceOrientation {
|
|||||||
* @returns {Promise<CompassHeading>}
|
* @returns {Promise<CompassHeading>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getCurrentHeading(): Promise<CompassHeading> { return }
|
static getCurrentHeading(): Promise<CompassHeading> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the device current heading at a regular interval
|
* Get the device current heading at a regular interval
|
||||||
@ -91,6 +91,6 @@ export class DeviceOrientation {
|
|||||||
observable: true,
|
observable: true,
|
||||||
cancelFunction: 'clearWatch'
|
cancelFunction: 'clearWatch'
|
||||||
})
|
})
|
||||||
static watchHeading(options?: CompassOptions): Observable<CompassHeading> { return }
|
static watchHeading(options?: CompassOptions): Observable<CompassHeading> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import {Plugin, Cordova} from './plugin';
|
||||||
|
|
||||||
export interface promptCallback {
|
export interface PromptCallback {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The index of the pressed button. (Number) Note that the index uses one-based indexing, so the value is 1, 2, 3, etc.
|
* The index of the pressed button. (Number) Note that the index uses one-based indexing, so the value is 1, 2, 3, etc.
|
||||||
*/
|
*/
|
||||||
buttonIndex : number,
|
buttonIndex: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The text entered in the prompt dialog box. (String)
|
* The text entered in the prompt dialog box. (String)
|
||||||
*/
|
*/
|
||||||
input1 : string
|
input1: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ export class Dialogs {
|
|||||||
message,
|
message,
|
||||||
title: string = 'Alert',
|
title: string = 'Alert',
|
||||||
buttonName: string = 'OK'
|
buttonName: string = 'OK'
|
||||||
): Promise<any>{ return }
|
): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays a customizable confirmation dialog box.
|
* Displays a customizable confirmation dialog box.
|
||||||
@ -70,7 +70,7 @@ export class Dialogs {
|
|||||||
message,
|
message,
|
||||||
title: string = 'Confirm',
|
title: string = 'Confirm',
|
||||||
buttonLabels: Array<string> = ['OK', 'Cancel']
|
buttonLabels: Array<string> = ['OK', 'Cancel']
|
||||||
): Promise<number>{ return }
|
): Promise<number> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays a native dialog box that is more customizable than the browser's prompt function.
|
* Displays a native dialog box that is more customizable than the browser's prompt function.
|
||||||
@ -89,7 +89,7 @@ export class Dialogs {
|
|||||||
title: string = 'Prompt',
|
title: string = 'Prompt',
|
||||||
buttonLabels: Array<string> = ['OK', 'Cancel'],
|
buttonLabels: Array<string> = ['OK', 'Cancel'],
|
||||||
defaultText: string = ''
|
defaultText: string = ''
|
||||||
): Promise<any>{ return }
|
): Promise<any> { return; }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -5,15 +5,15 @@ declare var cordova;
|
|||||||
/**
|
/**
|
||||||
* Email object for Opening Email Composer
|
* Email object for Opening Email Composer
|
||||||
*/
|
*/
|
||||||
export interface email {
|
export interface Email {
|
||||||
app?: string,
|
app?: string;
|
||||||
to: string | Array<string>,
|
to: string | Array<string>;
|
||||||
cc: string | Array<string>,
|
cc: string | Array<string>;
|
||||||
bcc: string | Array<string>,
|
bcc: string | Array<string>;
|
||||||
attachments: Array<any>,
|
attachments: Array<any>;
|
||||||
subject: string,
|
subject: string;
|
||||||
body: string,
|
body: string;
|
||||||
isHtml: boolean
|
isHtml: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -86,7 +86,7 @@ export class EmailComposer {
|
|||||||
/**
|
/**
|
||||||
* Displays the email composer pre-filled with data.
|
* Displays the email composer pre-filled with data.
|
||||||
*
|
*
|
||||||
* @param email {email} Email
|
* @param email {Email} Email
|
||||||
* @param scope {any?} An optional scope for the promise
|
* @param scope {any?} An optional scope for the promise
|
||||||
* @returns {Promise<any>} Resolves promise when the EmailComposer has been opened
|
* @returns {Promise<any>} Resolves promise when the EmailComposer has been opened
|
||||||
*/
|
*/
|
||||||
@ -94,6 +94,6 @@ export class EmailComposer {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 3
|
errorIndex: 3
|
||||||
})
|
})
|
||||||
static open(email : email, scope? : any) : Promise<any> {return}
|
static open(email: Email, scope?: any): Promise<any> {return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@ export class Facebook {
|
|||||||
* @return Returns a Promise that resolves with a status object if login succeeds, and rejects if login fails.
|
* @return Returns a Promise that resolves with a status object if login succeeds, and rejects if login fails.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static login(permissions: string[]): Promise<any> { return }
|
static login(permissions: string[]): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logout of Facebook.
|
* Logout of Facebook.
|
||||||
@ -120,7 +120,7 @@ export class Facebook {
|
|||||||
* @return Returns a Promise that resolves on a successful logout, and rejects if logout fails.
|
* @return Returns a Promise that resolves on a successful logout, and rejects if logout fails.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static logout(): Promise<any> { return }
|
static logout(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if a user is logged in to Facebook and has authenticated your app. There are three possible states for a user:
|
* Determine if a user is logged in to Facebook and has authenticated your app. There are three possible states for a user:
|
||||||
@ -149,7 +149,7 @@ export class Facebook {
|
|||||||
* @return Returns a Promise that resolves with a status, or rejects with an error
|
* @return Returns a Promise that resolves with a status, or rejects with an error
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getLoginStatus(): Promise<any> { return }
|
static getLoginStatus(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a Facebook access token for using Facebook services.
|
* Get a Facebook access token for using Facebook services.
|
||||||
@ -157,7 +157,7 @@ export class Facebook {
|
|||||||
* @return Returns a Promise that resolves with an access token, or rejects with an error
|
* @return Returns a Promise that resolves with an access token, or rejects with an error
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getAccessToken(): Promise<string> { return }
|
static getAccessToken(): Promise<string> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show one of various Facebook dialogs. Example of options for a Share dialog:
|
* Show one of various Facebook dialogs. Example of options for a Share dialog:
|
||||||
@ -177,7 +177,7 @@ export class Facebook {
|
|||||||
* @return Returns a Promise that resolves with success data, or rejects with an error
|
* @return Returns a Promise that resolves with success data, or rejects with an error
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static showDialog(options: any): Promise<any> { return }
|
static showDialog(options: any): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a call to Facebook Graph API. Can take additional permissions beyond those granted on login.
|
* Make a call to Facebook Graph API. Can take additional permissions beyond those granted on login.
|
||||||
@ -193,7 +193,7 @@ export class Facebook {
|
|||||||
* @return Returns a Promise that resolves with the result of the request, or rejects with an error
|
* @return Returns a Promise that resolves with the result of the request, or rejects with an error
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static api(requestPath: string, permissions: string[]): Promise<any> { return }
|
static api(requestPath: string, permissions: string[]): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log an event. For more information see the Events section above.
|
* Log an event. For more information see the Events section above.
|
||||||
@ -208,7 +208,7 @@ export class Facebook {
|
|||||||
name: string,
|
name: string,
|
||||||
params?: Object,
|
params?: Object,
|
||||||
valueToSum?: number
|
valueToSum?: number
|
||||||
): Promise<any> { return }
|
): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log a purchase. For more information see the Events section above.
|
* Log a purchase. For more information see the Events section above.
|
||||||
@ -218,7 +218,7 @@ export class Facebook {
|
|||||||
* @return Returns a Promise
|
* @return Returns a Promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static logPurchase(value: number, currency: string): Promise<any> { return }
|
static logPurchase(value: number, currency: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open App Invite dialog. Does not require login.
|
* Open App Invite dialog. Does not require login.
|
||||||
@ -239,5 +239,5 @@ export class Facebook {
|
|||||||
static appInvite(options: {
|
static appInvite(options: {
|
||||||
url: string,
|
url: string,
|
||||||
picture: string
|
picture: string
|
||||||
}): Promise<any> { return }
|
}): Promise<any> { return; }
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ export class File {
|
|||||||
*/
|
*/
|
||||||
static checkDir(path: string, dir: string): Promise<any> {
|
static checkDir(path: string, dir: string): Promise<any> {
|
||||||
let resolveFn, rejectFn;
|
let resolveFn, rejectFn;
|
||||||
let promise = new Promise((resolve, reject) => {resolveFn = resolve; rejectFn = reject; })
|
let promise = new Promise((resolve, reject) => {resolveFn = resolve; rejectFn = reject; });
|
||||||
|
|
||||||
if ((/^\//.test(dir))) {
|
if ((/^\//.test(dir))) {
|
||||||
rejectFn('directory cannot start with \/');
|
rejectFn('directory cannot start with \/');
|
||||||
@ -84,13 +84,13 @@ export class File {
|
|||||||
*/
|
*/
|
||||||
static createDir(path: string, dirName: string, replace: boolean): Promise<any> {
|
static createDir(path: string, dirName: string, replace: boolean): Promise<any> {
|
||||||
let resolveFn, rejectFn;
|
let resolveFn, rejectFn;
|
||||||
let promise = new Promise((resolve, reject) => {resolveFn = resolve; rejectFn = reject; })
|
let promise = new Promise((resolve, reject) => {resolveFn = resolve; rejectFn = reject; });
|
||||||
|
|
||||||
if ((/^\//.test(dirName))) {
|
if ((/^\//.test(dirName))) {
|
||||||
rejectFn('directory cannot start with \/');
|
rejectFn('directory cannot start with \/');
|
||||||
}
|
}
|
||||||
|
|
||||||
replace = replace ? false : true;
|
replace = !replace;
|
||||||
|
|
||||||
var options = {
|
var options = {
|
||||||
create: true,
|
create: true,
|
||||||
@ -126,7 +126,7 @@ export class File {
|
|||||||
*/
|
*/
|
||||||
static removeDir(path: string, dirName: string): Promise<any> {
|
static removeDir(path: string, dirName: string): Promise<any> {
|
||||||
let resolveFn, rejectFn;
|
let resolveFn, rejectFn;
|
||||||
let promise = new Promise((resolve, reject) => {resolveFn = resolve; rejectFn = reject; })
|
let promise = new Promise((resolve, reject) => {resolveFn = resolve; rejectFn = reject; });
|
||||||
|
|
||||||
if ((/^\//.test(dirName))) {
|
if ((/^\//.test(dirName))) {
|
||||||
rejectFn('directory cannot start with \/');
|
rejectFn('directory cannot start with \/');
|
||||||
@ -137,7 +137,7 @@ export class File {
|
|||||||
fileSystem.getDirectory(dirName, {create: false}, function (dirEntry) {
|
fileSystem.getDirectory(dirName, {create: false}, function (dirEntry) {
|
||||||
dirEntry.remove(function () {
|
dirEntry.remove(function () {
|
||||||
resolveFn({success: true, fileRemoved: dirEntry});
|
resolveFn({success: true, fileRemoved: dirEntry});
|
||||||
}, function (error) {
|
}, function (error: any) {
|
||||||
error.message = File.cordovaFileError[error.code];
|
error.message = File.cordovaFileError[error.code];
|
||||||
rejectFn(error);
|
rejectFn(error);
|
||||||
});
|
});
|
||||||
@ -168,7 +168,7 @@ export class File {
|
|||||||
*/
|
*/
|
||||||
static moveDir(path: string, dirName: string, newPath: string, newDirName: string): Promise<any> {
|
static moveDir(path: string, dirName: string, newPath: string, newDirName: string): Promise<any> {
|
||||||
let resolveFn, rejectFn;
|
let resolveFn, rejectFn;
|
||||||
let promise = new Promise((resolve, reject) => {resolveFn = resolve; rejectFn = reject; })
|
let promise = new Promise((resolve, reject) => {resolveFn = resolve; rejectFn = reject; });
|
||||||
|
|
||||||
newDirName = newDirName || dirName;
|
newDirName = newDirName || dirName;
|
||||||
|
|
||||||
@ -212,7 +212,7 @@ export class File {
|
|||||||
*/
|
*/
|
||||||
static copyDir(path: string, dirName: string, newPath: string, newDirName: string): Promise<any> {
|
static copyDir(path: string, dirName: string, newPath: string, newDirName: string): Promise<any> {
|
||||||
let resolveFn, rejectFn;
|
let resolveFn, rejectFn;
|
||||||
let promise = new Promise((resolve, reject) => {resolveFn = resolve; rejectFn = reject; })
|
let promise = new Promise((resolve, reject) => {resolveFn = resolve; rejectFn = reject; });
|
||||||
|
|
||||||
newDirName = newDirName || dirName;
|
newDirName = newDirName || dirName;
|
||||||
|
|
||||||
@ -260,7 +260,7 @@ export class File {
|
|||||||
*/
|
*/
|
||||||
static listDir(path: string, dirName: string): Promise<any> {
|
static listDir(path: string, dirName: string): Promise<any> {
|
||||||
let resolveFn, rejectFn;
|
let resolveFn, rejectFn;
|
||||||
let promise = new Promise((resolve, reject) => {resolveFn = resolve; rejectFn = reject; })
|
let promise = new Promise((resolve, reject) => {resolveFn = resolve; rejectFn = reject; });
|
||||||
|
|
||||||
if ((/^\//.test(dirName))) {
|
if ((/^\//.test(dirName))) {
|
||||||
rejectFn('directory cannot start with \/');
|
rejectFn('directory cannot start with \/');
|
||||||
@ -305,7 +305,7 @@ export class File {
|
|||||||
*/
|
*/
|
||||||
static removeRecursively(path: string, dirName: string): Promise<any> {
|
static removeRecursively(path: string, dirName: string): Promise<any> {
|
||||||
let resolveFn, rejectFn;
|
let resolveFn, rejectFn;
|
||||||
let promise = new Promise((resolve, reject) => {resolveFn = resolve; rejectFn = reject; })
|
let promise = new Promise((resolve, reject) => {resolveFn = resolve; rejectFn = reject; });
|
||||||
|
|
||||||
if ((/^\//.test(dirName))) {
|
if ((/^\//.test(dirName))) {
|
||||||
rejectFn('directory cannot start with \/');
|
rejectFn('directory cannot start with \/');
|
||||||
@ -345,7 +345,7 @@ export class File {
|
|||||||
*/
|
*/
|
||||||
static checkFile(path: string, file: string): Promise<any> {
|
static checkFile(path: string, file: string): Promise<any> {
|
||||||
let resolveFn, rejectFn;
|
let resolveFn, rejectFn;
|
||||||
let promise = new Promise((resolve, reject) => {resolveFn = resolve; rejectFn = reject; })
|
let promise = new Promise((resolve, reject) => {resolveFn = resolve; rejectFn = reject; });
|
||||||
|
|
||||||
if ((/^\//.test(file))) {
|
if ((/^\//.test(file))) {
|
||||||
rejectFn('file cannot start with \/');
|
rejectFn('file cannot start with \/');
|
||||||
@ -384,14 +384,14 @@ export class File {
|
|||||||
*/
|
*/
|
||||||
static createFile(path: string, fileName: string, replace: boolean): Promise<any> {
|
static createFile(path: string, fileName: string, replace: boolean): Promise<any> {
|
||||||
let resolveFn, rejectFn;
|
let resolveFn, rejectFn;
|
||||||
let promise = new Promise((resolve, reject) => {resolveFn = resolve; rejectFn = reject; })
|
let promise = new Promise((resolve, reject) => {resolveFn = resolve; rejectFn = reject; });
|
||||||
|
|
||||||
|
|
||||||
if ((/^\//.test(fileName))) {
|
if ((/^\//.test(fileName))) {
|
||||||
rejectFn('file-name cannot start with \/');
|
rejectFn('file-name cannot start with \/');
|
||||||
}
|
}
|
||||||
|
|
||||||
replace = replace ? false : true;
|
replace = !replace;
|
||||||
|
|
||||||
var options = {
|
var options = {
|
||||||
create: true,
|
create: true,
|
||||||
@ -427,7 +427,7 @@ export class File {
|
|||||||
*/
|
*/
|
||||||
static removeFile(path: string, fileName: string): Promise<any> {
|
static removeFile(path: string, fileName: string): Promise<any> {
|
||||||
let resolveFn, rejectFn;
|
let resolveFn, rejectFn;
|
||||||
let promise = new Promise((resolve, reject) => {resolveFn = resolve; rejectFn = reject; })
|
let promise = new Promise((resolve, reject) => {resolveFn = resolve; rejectFn = reject; });
|
||||||
|
|
||||||
if ((/^\//.test(fileName))) {
|
if ((/^\//.test(fileName))) {
|
||||||
rejectFn('file-name cannot start with \/');
|
rejectFn('file-name cannot start with \/');
|
||||||
@ -438,7 +438,7 @@ export class File {
|
|||||||
fileSystem.getFile(fileName, {create: false}, function (fileEntry) {
|
fileSystem.getFile(fileName, {create: false}, function (fileEntry) {
|
||||||
fileEntry.remove(function () {
|
fileEntry.remove(function () {
|
||||||
resolveFn({success: true, fileRemoved: fileEntry});
|
resolveFn({success: true, fileRemoved: fileEntry});
|
||||||
}, function (error) {
|
}, function (error: any) {
|
||||||
error.message = File.cordovaFileError[error.code];
|
error.message = File.cordovaFileError[error.code];
|
||||||
rejectFn(error);
|
rejectFn(error);
|
||||||
});
|
});
|
||||||
@ -481,9 +481,9 @@ export class File {
|
|||||||
*/
|
*/
|
||||||
static moveFile(path: string, fileName: string, newPath: string, newFileName: string): Promise<any> {
|
static moveFile(path: string, fileName: string, newPath: string, newFileName: string): Promise<any> {
|
||||||
let resolveFn, rejectFn;
|
let resolveFn, rejectFn;
|
||||||
let promise = new Promise((resolve, reject) => {resolveFn = resolve; rejectFn = reject; })
|
let promise = new Promise((resolve, reject) => {resolveFn = resolve; rejectFn = reject; });
|
||||||
|
|
||||||
newFileName = newFileName || fileName
|
newFileName = newFileName || fileName;
|
||||||
|
|
||||||
if ((/^\//.test(newFileName))) {
|
if ((/^\//.test(newFileName))) {
|
||||||
rejectFn('file-name cannot start with \/');
|
rejectFn('file-name cannot start with \/');
|
||||||
@ -525,9 +525,9 @@ export class File {
|
|||||||
*/
|
*/
|
||||||
static copyFile(path: string, fileName: string, newPath: string, newFileName: string): Promise<any> {
|
static copyFile(path: string, fileName: string, newPath: string, newFileName: string): Promise<any> {
|
||||||
let resolveFn, rejectFn;
|
let resolveFn, rejectFn;
|
||||||
let promise = new Promise((resolve, reject) => {resolveFn = resolve; rejectFn = reject; })
|
let promise = new Promise((resolve, reject) => {resolveFn = resolve; rejectFn = reject; });
|
||||||
|
|
||||||
newFileName = newFileName || fileName
|
newFileName = newFileName || fileName;
|
||||||
|
|
||||||
if ((/^\//.test(newFileName))) {
|
if ((/^\//.test(newFileName))) {
|
||||||
rejectFn('file-name cannot start with \/');
|
rejectFn('file-name cannot start with \/');
|
||||||
|
@ -27,28 +27,28 @@ export class Flashlight {
|
|||||||
* @returns {Promise<boolean>} Returns a promise that resolves with a boolean stating if the flash light is available.
|
* @returns {Promise<boolean>} Returns a promise that resolves with a boolean stating if the flash light is available.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static available(): Promise<boolean> { return }
|
static available(): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Switches the flashlight on
|
* Switches the flashlight on
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static switchOn(): Promise<boolean> { return }
|
static switchOn(): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Switches the flash light off
|
* Switches the flash light off
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static switchOff(): Promise<boolean> { return }
|
static switchOff(): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Toggles the flashlight
|
* Toggles the flashlight
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static toggle(): Promise<any> { return }
|
static toggle(): Promise<any> { return; }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -58,6 +58,6 @@ export class Flashlight {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static isSwitchedOn(): boolean { return }
|
static isSwitchedOn(): boolean { return; }
|
||||||
|
|
||||||
}
|
}
|
@ -133,7 +133,7 @@ export class Geolocation {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
static getCurrentPosition(options?: GeolocationOptions): Promise<Geoposition> { return }
|
static getCurrentPosition(options?: GeolocationOptions): Promise<Geoposition> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Watch the current device's position. Clear the watch by unsubscribing from
|
* Watch the current device's position. Clear the watch by unsubscribing from
|
||||||
@ -156,5 +156,5 @@ export class Geolocation {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'clearWatch'
|
clearFunction: 'clearWatch'
|
||||||
})
|
})
|
||||||
static watchPosition(options?: GeolocationOptions): Observable<Geoposition> { return }
|
static watchPosition(options?: GeolocationOptions): Observable<Geoposition> { return; }
|
||||||
}
|
}
|
||||||
|
@ -23,14 +23,14 @@ export class Globalization {
|
|||||||
* @return {Promise<{value: string}>}
|
* @return {Promise<{value: string}>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getPreferredLanguage() : Promise<{value:string}> {return}
|
static getPreferredLanguage(): Promise<{value: string}> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the BCP 47 compliant locale identifier string to the successCallback with a properties object as a parameter.
|
* Returns the BCP 47 compliant locale identifier string to the successCallback with a properties object as a parameter.
|
||||||
* @return {Promise<{value: string}>}
|
* @return {Promise<{value: string}>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getLocaleName() : Promise<{value:string}> {return}
|
static getLocaleName(): Promise<{value: string}> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts date to string
|
* Converts date to string
|
||||||
@ -42,7 +42,7 @@ export class Globalization {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
static dateToString(date : Date, options : {formatLength:string, selector:string}) : Promise<{value:string}> {return}
|
static dateToString(date: Date, options: {formatLength: string, selector: string}): Promise<{value: string}> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -53,7 +53,7 @@ export class Globalization {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
static stringToDate(dateString:string, options:{formatLength:string, selector:string}) : Promise<{year : number, month : number, day:number, hour:number, minute:number, second:number, millisecond:number}> {return}
|
static stringToDate(dateString: string, options: {formatLength: string, selector: string}): Promise<{year: number, month: number, day: number, hour: number, minute: number, second: number, millisecond: number}> {return; }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -63,7 +63,7 @@ export class Globalization {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
static getDatePattern(options:{formatLength:string, selector:string}) : Promise<{pattern:string}> {return}
|
static getDatePattern(options: {formatLength: string, selector: string}): Promise<{pattern: string}> {return; }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -73,20 +73,20 @@ export class Globalization {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
static getDateNames(options:{type:string,item:string}) : Promise<{value:Array<string>}> {return}
|
static getDateNames(options: {type: string, item: string}): Promise<{value: Array<string>}> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if day light saving is active
|
* Check if day light saving is active
|
||||||
* @param date
|
* @param date
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isDayLightSavingsTime(date:Date) : Promise<{dst:string}> {return}
|
static isDayLightSavingsTime(date: Date): Promise<{dst: string}> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get first day of week
|
* Get first day of week
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getFirstDayOfWeek() : Promise<{value:string}> {return}
|
static getFirstDayOfWeek(): Promise<{value: string}> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -96,18 +96,18 @@ export class Globalization {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
static numberToString(options:{type:string}) : Promise<{value:string}> {return}
|
static numberToString(options: {type: string}): Promise<{value: string}> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param string
|
* @param stringToConvert
|
||||||
* @param options
|
* @param options
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
static stringToNumber(string:string, options:{type:string}) :Promise<{value}> {return}
|
static stringToNumber(stringToConvert: string, options: {type: string}): Promise<{value}> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -116,13 +116,13 @@ export class Globalization {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
static getNumberPattern(options:{type:string}) : Promise<{pattern:string, symbol:string, fraction:number, rounding:number, positive:string, negative:string, decimal:string, grouping:string}> {return}
|
static getNumberPattern(options: {type: string}): Promise<{pattern: string, symbol: string, fraction: number, rounding: number, positive: string, negative: string, decimal: string, grouping: string}> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param currencyCode
|
* @param currencyCode
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getCurrencyPattern(currencyCode:string) : Promise<{pattern:string, code:string, fraction:number, rounding:number, decimal:number, grouping:string}> {return}
|
static getCurrencyPattern(currencyCode: string): Promise<{pattern: string, code: string, fraction: number, rounding: number, decimal: number, grouping: string}> {return; }
|
||||||
|
|
||||||
}
|
}
|
@ -24,7 +24,7 @@ export class GoogleAnalytics {
|
|||||||
* @param {string} id Your Google Analytics Mobile App property
|
* @param {string} id Your Google Analytics Mobile App property
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static startTrackerWithId(id: string): Promise<any> { return }
|
static startTrackerWithId(id: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Track a screen
|
* Track a screen
|
||||||
@ -33,7 +33,7 @@ export class GoogleAnalytics {
|
|||||||
* @param {string} title Screen title
|
* @param {string} title Screen title
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static trackView(title: string): Promise<any> { return }
|
static trackView(title: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Track an event
|
* Track an event
|
||||||
@ -44,7 +44,7 @@ export class GoogleAnalytics {
|
|||||||
* @param {number} value
|
* @param {number} value
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static trackEvent(category: string, action: string, label?: string, value?: number): Promise<any> { return }
|
static trackEvent(category: string, action: string, label?: string, value?: number): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Track an exception
|
* Track an exception
|
||||||
@ -52,7 +52,7 @@ export class GoogleAnalytics {
|
|||||||
* @param {boolean} fatal
|
* @param {boolean} fatal
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static trackException(description: string, fatal: boolean): Promise<any> { return }
|
static trackException(description: string, fatal: boolean): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Track User Timing (App Speed)
|
* Track User Timing (App Speed)
|
||||||
@ -62,7 +62,7 @@ export class GoogleAnalytics {
|
|||||||
* @param {string} label
|
* @param {string} label
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static trackTiming(category: string, intervalInMilliseconds: number, variable: string, label: string): Promise<any> { return }
|
static trackTiming(category: string, intervalInMilliseconds: number, variable: string, label: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a Transaction (Ecommerce)
|
* Add a Transaction (Ecommerce)
|
||||||
@ -75,7 +75,7 @@ export class GoogleAnalytics {
|
|||||||
* @param {string} currencyCode
|
* @param {string} currencyCode
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static addTransaction(id: string, affiliation: string, revenue: number, tax: number, shipping: number, currencyCode: string): Promise<any> { return }
|
static addTransaction(id: string, affiliation: string, revenue: number, tax: number, shipping: number, currencyCode: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a Transaction Item (Ecommerce)
|
* Add a Transaction Item (Ecommerce)
|
||||||
@ -89,7 +89,7 @@ export class GoogleAnalytics {
|
|||||||
* @param {string} currencyCode
|
* @param {string} currencyCode
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static addTransactionItem(id: string, name: string, sku: string, category: string, price: number, quantity: number, currencyCode: string): Promise<any> { return }
|
static addTransactionItem(id: string, name: string, sku: string, category: string, price: number, quantity: number, currencyCode: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a Custom Dimension
|
* Add a Custom Dimension
|
||||||
@ -98,7 +98,7 @@ export class GoogleAnalytics {
|
|||||||
* @param {string} value
|
* @param {string} value
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static addCustomDimension(key: number, value: string): Promise<any> { return }
|
static addCustomDimension(key: number, value: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a UserId
|
* Set a UserId
|
||||||
@ -106,18 +106,18 @@ export class GoogleAnalytics {
|
|||||||
* @param {string} id
|
* @param {string} id
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static setUserId(id: string): Promise<any> { return }
|
static setUserId(id: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable verbose logging
|
* Enable verbose logging
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static debugMode(): Promise<any> { return }
|
static debugMode(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable/disable automatic reporting of uncaught exceptions
|
* Enable/disable automatic reporting of uncaught exceptions
|
||||||
* @param {boolean} shouldEnable
|
* @param {boolean} shouldEnable
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static enableUncaughtExceptionReporting(shouldEnable: boolean): Promise<any> { return }
|
static enableUncaughtExceptionReporting(shouldEnable: boolean): Promise<any> { return; }
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {Cordova, Plugin} from "./plugin";
|
import {Cordova, Plugin} from './plugin';
|
||||||
import {Observable} from "rxjs/Observable";
|
import {Observable} from 'rxjs/Observable';
|
||||||
import {CordovaInstance} from "./plugin";
|
import {CordovaInstance} from './plugin';
|
||||||
/**
|
/**
|
||||||
* Created by Ibrahim on 3/29/2016.
|
* Created by Ibrahim on 3/29/2016.
|
||||||
*/
|
*/
|
||||||
@ -25,7 +25,7 @@ export class GoogleMaps {
|
|||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'plugin.google.maps.event.MAP_READY'
|
event: 'plugin.google.maps.event.MAP_READY'
|
||||||
})
|
})
|
||||||
static onInit () : Observable<GoogleMaps> {return}
|
static onInit (): Observable<GoogleMaps> {return; }
|
||||||
|
|
||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Plugin, Cordova} from './plugin'
|
import {Plugin, Cordova} from './plugin';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Hotspot
|
* @name Hotspot
|
||||||
@ -20,87 +20,87 @@ import {Plugin, Cordova} from './plugin'
|
|||||||
export class Hotspot {
|
export class Hotspot {
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isAvailable() : Promise<boolean> {return}
|
static isAvailable(): Promise<boolean> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static toggleWifi() : Promise<any> {return}
|
static toggleWifi(): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static createHotspot(ssid : string, mode : string, password : string) : Promise<any> {return}
|
static createHotspot(ssid: string, mode: string, password: string): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static startHotspot() : Promise<any> {return}
|
static startHotspot(): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static configureHotspot(ssid : string, mode : string, password : string) : Promise<any> {return}
|
static configureHotspot(ssid: string, mode: string, password: string): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static stopHotspot() : Promise<any> {return}
|
static stopHotspot(): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isHotspotEnabled() : Promise<any> {return}
|
static isHotspotEnabled(): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getAllHotspotDevices() : Promise<any> {return}
|
static getAllHotspotDevices(): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static connectToHotspot(ssid, password) : Promise<any> {return}
|
static connectToHotspot(ssid, password): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static connectToWifiAuthEncrypt(ssid, password, authentication, encryption) : Promise<any> {return}
|
static connectToWifiAuthEncrypt(ssid, password, authentication, encryption): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static addWifiNetwork(ssid, mode, password) : Promise<any> {return}
|
static addWifiNetwork(ssid, mode, password): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static removeWifiNetwork(ssid) : Promise<any> {return}
|
static removeWifiNetwork(ssid): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isConnectedToInternet() : Promise<any> {return}
|
static isConnectedToInternet(): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isConnectedToInternetViaWifi() : Promise<any> {return}
|
static isConnectedToInternetViaWifi(): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isWifiOn() : Promise<any> {return}
|
static isWifiOn(): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isWifiSupported() : Promise<any> {return}
|
static isWifiSupported(): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isWifiDirectSupported() : Promise<any> {return}
|
static isWifiDirectSupported(): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static scanWifi() : Promise<any> {return}
|
static scanWifi(): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static scanWifiByLevel() : Promise<any> {return}
|
static scanWifiByLevel(): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static startPeriodicallyScan(interval, duration) : Promise<any> {return}
|
static startPeriodicallyScan(interval, duration): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static stopPeriodicallyScan() : Promise<any> {return}
|
static stopPeriodicallyScan(): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getNetConfig() : Promise<any> {return}
|
static getNetConfig(): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getConnectionInfo() : Promise<any> {return}
|
static getConnectionInfo(): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static pingHost(ip) : Promise<any> {return}
|
static pingHost(ip): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getMacAddressOfHost(ip) : Promise<any> {return}
|
static getMacAddressOfHost(ip): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isDnsLive(ip) : Promise<any> {return}
|
static isDnsLive(ip): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isPortLife(ip) : Promise<any> {return}
|
static isPortLife(ip): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isRooted() : Promise<any> {return}
|
static isRooted(): Promise<any> {return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,18 +3,18 @@ import {Plugin, Cordova} from './plugin';
|
|||||||
export interface ImagePickerOptions {
|
export interface ImagePickerOptions {
|
||||||
// max images to be selected, defaults to 15. If this is set to 1, upon
|
// max images to be selected, defaults to 15. If this is set to 1, upon
|
||||||
// selection of a single image, the plugin will return it.
|
// selection of a single image, the plugin will return it.
|
||||||
maximumImagesCount?: number,
|
maximumImagesCount?: number;
|
||||||
|
|
||||||
// max width and height to allow the images to be. Will keep aspect
|
// max width and height to allow the images to be. Will keep aspect
|
||||||
// ratio no matter what. So if both are 800, the returned image
|
// ratio no matter what. So if both are 800, the returned image
|
||||||
// will be at most 800 pixels wide and 800 pixels tall. If the width is
|
// will be at most 800 pixels wide and 800 pixels tall. If the width is
|
||||||
// 800 and height 0 the image will be 800 pixels wide if the source
|
// 800 and height 0 the image will be 800 pixels wide if the source
|
||||||
// is at least that wide.
|
// is at least that wide.
|
||||||
width?: number,
|
width?: number;
|
||||||
height?: number,
|
height?: number;
|
||||||
|
|
||||||
// quality of resized image, defaults to 100
|
// quality of resized image, defaults to 100
|
||||||
quality?: number
|
quality?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -54,5 +54,5 @@ export class ImagePicker {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
static getPictures(options: ImagePickerOptions): Promise<any> { return }
|
static getPictures(options: ImagePickerOptions): Promise<any> { return; }
|
||||||
}
|
}
|
||||||
|
@ -81,5 +81,5 @@ export class InAppBrowser {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static open(url: string, target?: string, options?: string): InAppBrowserRef { return }
|
static open(url: string, target?: string, options?: string): InAppBrowserRef { return; }
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
import {Cordova, Plugin} from './plugin'
|
import {Cordova, Plugin} from './plugin';
|
||||||
import {Observable} from "rxjs/Observable";
|
import {Observable} from 'rxjs/Observable';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Keyboard
|
* @name Keyboard
|
||||||
@ -23,11 +23,8 @@ export class Keyboard {
|
|||||||
* Hide the keyboard accessory bar with the next, previous and done buttons.
|
* Hide the keyboard accessory bar with the next, previous and done buttons.
|
||||||
* @param hide {boolean}
|
* @param hide {boolean}
|
||||||
*/
|
*/
|
||||||
//@Cordova({
|
|
||||||
// sync: true
|
|
||||||
//})
|
|
||||||
static hideKeyboardAccessoryBar(hide: boolean): void {
|
static hideKeyboardAccessoryBar(hide: boolean): void {
|
||||||
console.log("hideKeyboardAccessoryBar method has been removed temporarily.")
|
console.log('hideKeyboardAccessoryBar method has been removed temporarily.');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -66,7 +63,7 @@ export class Keyboard {
|
|||||||
event: 'native.keyboardshow',
|
event: 'native.keyboardshow',
|
||||||
platforms: ['iOS', 'Android', 'BlackBerry 10', 'Windows']
|
platforms: ['iOS', 'Android', 'BlackBerry 10', 'Windows']
|
||||||
})
|
})
|
||||||
static onKeyboardShow() : Observable<any> {return}
|
static onKeyboardShow(): Observable<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an observable that notifies you when the keyboard is hidden. Unsubscribe to observable to cancel event watch.
|
* Creates an observable that notifies you when the keyboard is hidden. Unsubscribe to observable to cancel event watch.
|
||||||
@ -76,6 +73,6 @@ export class Keyboard {
|
|||||||
event: 'native.keyboardhide',
|
event: 'native.keyboardhide',
|
||||||
platforms: ['iOS', 'Android', 'BlackBerry 10', 'Windows']
|
platforms: ['iOS', 'Android', 'BlackBerry 10', 'Windows']
|
||||||
})
|
})
|
||||||
static onKeyboardHide() : Observable<any> {return}
|
static onKeyboardHide(): Observable<any> {return; }
|
||||||
|
|
||||||
}
|
}
|
@ -1,48 +1,48 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import {Plugin, Cordova} from './plugin';
|
||||||
|
|
||||||
export interface launchNavigatorOptions {
|
export interface LaunchNavigatorOptions {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* iOS, Android, Windows
|
* iOS, Android, Windows
|
||||||
* If true, the plugin will NOT attempt to use the geolocation plugin to determine the current device position when the start location parameter is omitted. Defaults to false.
|
* If true, the plugin will NOT attempt to use the geolocation plugin to determine the current device position when the start location parameter is omitted. Defaults to false.
|
||||||
*/
|
*/
|
||||||
disableAutoGeolocation? : boolean,
|
disableAutoGeolocation?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* iOS, Android, Windows
|
* iOS, Android, Windows
|
||||||
* Transportation mode for navigation: "driving", "walking" or "transit". Defaults to "driving" if not specified.
|
* Transportation mode for navigation: "driving", "walking" or "transit". Defaults to "driving" if not specified.
|
||||||
*/
|
*/
|
||||||
transportMode? : string,
|
transportMode?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* iOS
|
* iOS
|
||||||
* If true, plugin will attempt to launch Google Maps instead of Apple Maps. If Google Maps is not available, it will fall back to Apple Maps.
|
* If true, plugin will attempt to launch Google Maps instead of Apple Maps. If Google Maps is not available, it will fall back to Apple Maps.
|
||||||
*/
|
*/
|
||||||
preferGoogleMaps? : boolean,
|
preferGoogleMaps?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* iOS
|
* iOS
|
||||||
* If using Google Maps and the app has a URL scheme, passing this to Google Maps will display a button which returns to the app.
|
* If using Google Maps and the app has a URL scheme, passing this to Google Maps will display a button which returns to the app.
|
||||||
*/
|
*/
|
||||||
urlScheme? : string,
|
urlScheme?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* iOS
|
* iOS
|
||||||
* If using Google Maps with a URL scheme, this specifies the text of the button in Google Maps which returns to the app. Defaults to "Back" if not specified.
|
* If using Google Maps with a URL scheme, this specifies the text of the button in Google Maps which returns to the app. Defaults to "Back" if not specified.
|
||||||
*/
|
*/
|
||||||
backButtonText? : string,
|
backButtonText?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* iOS
|
* iOS
|
||||||
* If true, debug log output will be generated by the plugin. Defaults to false.
|
* If true, debug log output will be generated by the plugin. Defaults to false.
|
||||||
*/
|
*/
|
||||||
enableDebug? : boolean,
|
enableDebug?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Android
|
* Android
|
||||||
* Navigation mode in which to open Google Maps app: "maps" or "turn-by-turn". Defaults to "maps" if not specified.
|
* Navigation mode in which to open Google Maps app: "maps" or "turn-by-turn". Defaults to "maps" if not specified.
|
||||||
*/
|
*/
|
||||||
navigationMode? : string,
|
navigationMode?: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ export class LaunchNavigator {
|
|||||||
static navigate(
|
static navigate(
|
||||||
destination: any,
|
destination: any,
|
||||||
start: any = null,
|
start: any = null,
|
||||||
options?: launchNavigatorOptions
|
options?: LaunchNavigatorOptions
|
||||||
): Promise<any> { return }
|
): Promise<any> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ export class LocalNotifications {
|
|||||||
* @param notificationId A single notification id, or an array of notification ids.
|
* @param notificationId A single notification id, or an array of notification ids.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static clear(notificationId : any) : Promise<any> {return}
|
static clear(notificationId: any): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears all notifications
|
* Clears all notifications
|
||||||
@ -82,14 +82,14 @@ export class LocalNotifications {
|
|||||||
successIndex: 0,
|
successIndex: 0,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
static clearAll() : Promise<any> {return}
|
static clearAll(): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cancels single or multiple notifications
|
* Cancels single or multiple notifications
|
||||||
* @param notificationId A single notification id, or an array of notification ids.
|
* @param notificationId A single notification id, or an array of notification ids.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static cancel(notificationId : any) : Promise<any> {return}
|
static cancel(notificationId: any): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cancels all notifications
|
* Cancels all notifications
|
||||||
@ -98,85 +98,85 @@ export class LocalNotifications {
|
|||||||
successIndex: 0,
|
successIndex: 0,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
static cancelAll() : Promise<any> {return}
|
static cancelAll(): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks presence of a notification
|
* Checks presence of a notification
|
||||||
* @param notificationId
|
* @param notificationId
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isPresent (notificationId : number) : Promise<boolean> {return}
|
static isPresent (notificationId: number): Promise<boolean> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks is a notification is scheduled
|
* Checks is a notification is scheduled
|
||||||
* @param notificationId
|
* @param notificationId
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isScheduled (notificationId : number) : Promise<boolean> {return}
|
static isScheduled (notificationId: number): Promise<boolean> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if a notification is triggered
|
* Checks if a notification is triggered
|
||||||
* @param notificationId
|
* @param notificationId
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isTriggered (notificationId : number) : Promise<boolean> {return}
|
static isTriggered (notificationId: number): Promise<boolean> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all the notification ids
|
* Get all the notification ids
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getAllIds () : Promise<Array<number>> {return}
|
static getAllIds (): Promise<Array<number>> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the ids of triggered notifications
|
* Get the ids of triggered notifications
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getTriggeredIds () : Promise<Array<number>> {return}
|
static getTriggeredIds (): Promise<Array<number>> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the ids of scheduled notifications
|
* Get the ids of scheduled notifications
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getScheduledIds () : Promise<Array<number>> {return}
|
static getScheduledIds (): Promise<Array<number>> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a notification object
|
* Get a notification object
|
||||||
* @param notificationId The id of the notification to get
|
* @param notificationId The id of the notification to get
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static get (notificationId : any) : Promise <Notification> {return}
|
static get (notificationId: any): Promise <Notification> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a scheduled notification object
|
* Get a scheduled notification object
|
||||||
* @param notificationId The id of the notification to get
|
* @param notificationId The id of the notification to get
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getScheduled (notificationId : any) : Promise <Notification> {return}
|
static getScheduled (notificationId: any): Promise <Notification> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a triggered notification object
|
* Get a triggered notification object
|
||||||
* @param notificationId The id of the notification to get
|
* @param notificationId The id of the notification to get
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getTriggered (notificationId : any) : Promise <Notification> {return}
|
static getTriggered (notificationId: any): Promise <Notification> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all notification objects
|
* Get all notification objects
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getAll() : Promise<Array<Notification>> {return}
|
static getAll(): Promise<Array<Notification>> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all scheduled notification objects
|
* Get all scheduled notification objects
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getAllScheduled() : Promise<Array<Notification>> {return}
|
static getAllScheduled(): Promise<Array<Notification>> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all triggered notification objects
|
* Get all triggered notification objects
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getAllTriggered() : Promise<Array<Notification>> {return}
|
static getAllTriggered(): Promise<Array<Notification>> {return; }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -198,64 +198,64 @@ export interface Notification {
|
|||||||
* A unique identifier required to clear, cancel, update or retrieve the local notification in the future
|
* A unique identifier required to clear, cancel, update or retrieve the local notification in the future
|
||||||
* Default: 0
|
* Default: 0
|
||||||
*/
|
*/
|
||||||
id? : number,
|
id?: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* First row of the notification
|
* First row of the notification
|
||||||
* Default: Empty string (iOS) or the app name (Android)
|
* Default: Empty string (iOS) or the app name (Android)
|
||||||
*/
|
*/
|
||||||
title? : string,
|
title?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Second row of the notification
|
* Second row of the notification
|
||||||
* Default: Empty string
|
* Default: Empty string
|
||||||
*/
|
*/
|
||||||
text? : string,
|
text?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The interval at which to reschedule the local notification. That can be a value of second, minute, hour, day, week, month or year
|
* The interval at which to reschedule the local notification. That can be a value of second, minute, hour, day, week, month or year
|
||||||
* Default: 0 (which means that the system triggers the local notification once)
|
* Default: 0 (which means that the system triggers the local notification once)
|
||||||
*/
|
*/
|
||||||
every? : string,
|
every?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The date and time when the system should deliver the local notification. If the specified value is nil or is a date in the past, the local notification is delivered immediately.
|
* The date and time when the system should deliver the local notification. If the specified value is nil or is a date in the past, the local notification is delivered immediately.
|
||||||
* Default: now ~ new Date()
|
* Default: now ~ new Date()
|
||||||
*/
|
*/
|
||||||
at? : any,
|
at?: any;
|
||||||
firstAt? : any,
|
firstAt?: any;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The number currently set as the badge of the app icon in Springboard (iOS) or at the right-hand side of the local notification (Android)
|
* The number currently set as the badge of the app icon in Springboard (iOS) or at the right-hand side of the local notification (Android)
|
||||||
* Default: 0 (which means don't show a number)
|
* Default: 0 (which means don't show a number)
|
||||||
*/
|
*/
|
||||||
badge? : number,
|
badge?: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Uri of the file containing the sound to play when an alert is displayed
|
* Uri of the file containing the sound to play when an alert is displayed
|
||||||
* Default: res://platform_default
|
* Default: res://platform_default
|
||||||
*/
|
*/
|
||||||
sound? : string,
|
sound?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Arbitrary data, objects will be encoded to JSON string
|
* Arbitrary data, objects will be encoded to JSON string
|
||||||
* Default: null
|
* Default: null
|
||||||
*/
|
*/
|
||||||
data? : any,
|
data?: any;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ANDROID ONLY
|
* ANDROID ONLY
|
||||||
* Uri of the icon that is shown in the ticker and notification
|
* Uri of the icon that is shown in the ticker and notification
|
||||||
* Default: res://icon
|
* Default: res://icon
|
||||||
*/
|
*/
|
||||||
icon? : string,
|
icon?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ANDROID ONLY
|
* ANDROID ONLY
|
||||||
* Uri of the resource (only res://) to use in the notification layouts. Different classes of devices may return different sizes
|
* Uri of the resource (only res://) to use in the notification layouts. Different classes of devices may return different sizes
|
||||||
* Default: res://ic_popup_reminder
|
* Default: res://ic_popup_reminder
|
||||||
*/
|
*/
|
||||||
smallIcon? : string,
|
smallIcon?: string;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -265,12 +265,12 @@ export interface Notification {
|
|||||||
* - They do not have an 'X' close button, and are not affected by the "Clear all" button
|
* - They do not have an 'X' close button, and are not affected by the "Clear all" button
|
||||||
* Default: false
|
* Default: false
|
||||||
*/
|
*/
|
||||||
ongoing? : boolean,
|
ongoing?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ANDROID ONLY
|
* ANDROID ONLY
|
||||||
* ARGB value that you would like the LED on the device to blink
|
* ARGB value that you would like the LED on the device to blink
|
||||||
* Default: FFFFFF
|
* Default: FFFFFF
|
||||||
*/
|
*/
|
||||||
led? : string
|
led?: string;
|
||||||
}
|
}
|
||||||
|
@ -67,13 +67,13 @@ export class MediaPlugin {
|
|||||||
* Returns the current amplitude of the current recording.
|
* Returns the current amplitude of the current recording.
|
||||||
*/
|
*/
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
getCurrentAmplitude () : Promise<any> {return}
|
getCurrentAmplitude (): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the current position within an audio file. Also updates the Media object's position parameter.
|
* Returns the current position within an audio file. Also updates the Media object's position parameter.
|
||||||
*/
|
*/
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
getCurrentPosition () : Promise<any> {return}
|
getCurrentPosition (): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the duration of an audio file in seconds. If the duration is unknown, it returns a value of -1.
|
* Returns the duration of an audio file in seconds. If the duration is unknown, it returns a value of -1.
|
||||||
@ -81,7 +81,7 @@ export class MediaPlugin {
|
|||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
getDuration () : number {return}
|
getDuration (): number {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts or resumes playing an audio file.
|
* Starts or resumes playing an audio file.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {Plugin, Cordova, CordovaProperty} from './plugin';
|
import {Plugin, Cordova, CordovaProperty} from './plugin';
|
||||||
import {Observable} from "rxjs/Observable";
|
import {Observable} from 'rxjs/Observable';
|
||||||
|
|
||||||
declare var navigator;
|
declare var navigator: any;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Network
|
* @name Network
|
||||||
@ -55,17 +55,17 @@ export class Network {
|
|||||||
static get connection(): Connection { return navigator.connection.type; }
|
static get connection(): Connection { return navigator.connection.type; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Watch the network for a disconnect (i.e. network goes offline)
|
* Get notified when the device goes offline
|
||||||
* @returns {Observable<any>} Returns an observable.
|
* @returns {Observable<any>} Returns an observable.
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'offline'
|
event: 'offline'
|
||||||
})
|
})
|
||||||
static onDisconnect() : Observable<any> { return }
|
static onDisconnect(): Observable<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Watch the network for a connection (i.e. network goes online)
|
* Get notified when the device goes online
|
||||||
* @returns {Observable<any>} Returns an observable.
|
* @returns {Observable<any>} Returns an observable.
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -77,12 +77,12 @@ export class Network {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class Connection {
|
export class Connection {
|
||||||
static get UNKNOWN() { return "unknown"; }
|
static get UNKNOWN() { return 'unknown'; }
|
||||||
static get ETHERNET() { return "ethernet"; }
|
static get ETHERNET() { return 'ethernet'; }
|
||||||
static get WIFI() { return "wifi"; }
|
static get WIFI() { return 'wifi'; }
|
||||||
static get CELL_2G() { return "2g"; }
|
static get CELL_2G() { return '2g'; }
|
||||||
static get CELL_3G() { return "3g"; }
|
static get CELL_3G() { return '3g'; }
|
||||||
static get CELL_4G() { return "4g"; }
|
static get CELL_4G() { return '4g'; }
|
||||||
static get CELL() { return "cellular"; }
|
static get CELL() { return 'cellular'; }
|
||||||
static get NONE() { return "none"; }
|
static get NONE() { return 'none'; }
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ export const cordovaWarn = function(pluginName: string, method: string) {
|
|||||||
};
|
};
|
||||||
function setIndex (args: any[], opts: any= {}, resolve?: Function, reject?: Function): any {
|
function setIndex (args: any[], opts: any= {}, resolve?: Function, reject?: Function): any {
|
||||||
// If the plugin method expects myMethod(success, err, options)
|
// If the plugin method expects myMethod(success, err, options)
|
||||||
if (opts.callbackOrder == 'reverse') {
|
if (opts.callbackOrder === 'reverse') {
|
||||||
// Get those arguments in the order [resolve, reject, ...restOfArgs]
|
// Get those arguments in the order [resolve, reject, ...restOfArgs]
|
||||||
args.unshift(reject);
|
args.unshift(reject);
|
||||||
args.unshift(resolve);
|
args.unshift(resolve);
|
||||||
@ -88,7 +88,7 @@ function callCordovaPlugin(pluginObj:any, methodName:string, args:any[], opts:an
|
|||||||
cordovaWarn(pluginObj.name, methodName);
|
cordovaWarn(pluginObj.name, methodName);
|
||||||
return {
|
return {
|
||||||
error: 'cordova_not_available'
|
error: 'cordova_not_available'
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
pluginWarn(pluginObj, methodName);
|
pluginWarn(pluginObj, methodName);
|
||||||
@ -106,7 +106,7 @@ function getPromise(cb) {
|
|||||||
// console.log('Native promises available...');
|
// console.log('Native promises available...');
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
cb(resolve, reject);
|
cb(resolve, reject);
|
||||||
})
|
});
|
||||||
} else if (window.angular) {
|
} else if (window.angular) {
|
||||||
let $q = window.angular.injector(['ng']).get('$q');
|
let $q = window.angular.injector(['ng']).get('$q');
|
||||||
// console.log('Loaded $q', $q);
|
// console.log('Loaded $q', $q);
|
||||||
@ -151,7 +151,7 @@ function wrapObservable(pluginObj:any, methodName:string, args:any[], opts:any =
|
|||||||
console.warn('Unable to clear the previous observable watch for', pluginObj.name, methodName);
|
console.warn('Unable to clear the previous observable watch for', pluginObj.name, methodName);
|
||||||
console.error(e);
|
console.error(e);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,14 +177,14 @@ function wrapInstance (pluginObj:any, methodName:string, args:any[], opts:any =
|
|||||||
console.warn('Unable to clear the previous observable watch for', pluginObj.name, methodName);
|
console.warn('Unable to clear the previous observable watch for', pluginObj.name, methodName);
|
||||||
console.error(e);
|
console.error(e);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return getPromise((resolve, reject) => {
|
return getPromise((resolve, reject) => {
|
||||||
callInstance(pluginObj, methodName, args, opts, resolve, reject);
|
callInstance(pluginObj, methodName, args, opts, resolve, reject);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -221,7 +221,7 @@ export const wrap = function(pluginObj:any, methodName:string, opts:any = {}) {
|
|||||||
|
|
||||||
else
|
else
|
||||||
return wrapPromise(pluginObj, methodName, args, opts);
|
return wrapPromise(pluginObj, methodName, args, opts);
|
||||||
}
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -256,7 +256,7 @@ export function Plugin(config) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return cls;
|
return cls;
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -273,8 +273,8 @@ export function Cordova(opts:any = {}) {
|
|||||||
value: function(...args: any[]) {
|
value: function(...args: any[]) {
|
||||||
return wrap(this, methodName, opts).apply(this, args);
|
return wrap(this, methodName, opts).apply(this, args);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -288,8 +288,8 @@ export function CordovaInstance(opts:any = {}) {
|
|||||||
value: function(...args: any[]) {
|
value: function(...args: any[]) {
|
||||||
return wrapInstance(this, methodName, opts).apply(this, args);
|
return wrapInstance(this, methodName, opts).apply(this, args);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import {Plugin, Cordova} from './plugin';
|
||||||
|
|
||||||
export type EventResponse = RegistrationEventResponse | NotificationEventResponse | Error
|
export type EventResponse = RegistrationEventResponse | NotificationEventResponse | Error;
|
||||||
|
|
||||||
export interface RegistrationEventResponse {
|
export interface RegistrationEventResponse {
|
||||||
/**
|
/**
|
||||||
* The registration ID provided by the 3rd party remote push service.
|
* The registration ID provided by the 3rd party remote push service.
|
||||||
*/
|
*/
|
||||||
registrationId: string
|
registrationId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -14,28 +14,28 @@ export interface NotificationEventResponse {
|
|||||||
/**
|
/**
|
||||||
* The text of the push message sent from the 3rd party service.
|
* The text of the push message sent from the 3rd party service.
|
||||||
*/
|
*/
|
||||||
message: string
|
message: string;
|
||||||
/**
|
/**
|
||||||
* The optional title of the push message sent from the 3rd party service.
|
* The optional title of the push message sent from the 3rd party service.
|
||||||
*/
|
*/
|
||||||
title?: string
|
title?: string;
|
||||||
/**
|
/**
|
||||||
* The number of messages to be displayed in the badge iOS or message count in the notification shade in Android.
|
* The number of messages to be displayed in the badge iOS or message count in the notification shade in Android.
|
||||||
* For windows, it represents the value in the badge notification which could be a number or a status glyph.
|
* For windows, it represents the value in the badge notification which could be a number or a status glyph.
|
||||||
*/
|
*/
|
||||||
count: string
|
count: string;
|
||||||
/**
|
/**
|
||||||
* The name of the sound file to be played upon receipt of the notification.
|
* The name of the sound file to be played upon receipt of the notification.
|
||||||
*/
|
*/
|
||||||
sound: string
|
sound: string;
|
||||||
/**
|
/**
|
||||||
* The path of the image file to be displayed in the notification.
|
* The path of the image file to be displayed in the notification.
|
||||||
*/
|
*/
|
||||||
image: string
|
image: string;
|
||||||
/**
|
/**
|
||||||
* An optional collection of data sent by the 3rd party push service that does not fit in the above properties.
|
* An optional collection of data sent by the 3rd party push service that does not fit in the above properties.
|
||||||
*/
|
*/
|
||||||
additionalData: NotificationEventAdditionalData
|
additionalData: NotificationEventAdditionalData;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -47,15 +47,15 @@ export interface NotificationEventResponse {
|
|||||||
* so that he could specify any custom code without having to use array notation (map['prop']) for all of them.
|
* so that he could specify any custom code without having to use array notation (map['prop']) for all of them.
|
||||||
*/
|
*/
|
||||||
export interface NotificationEventAdditionalData {
|
export interface NotificationEventAdditionalData {
|
||||||
[name: string]: any
|
[name: string]: any;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the notification was received while the app was in the foreground
|
* Whether the notification was received while the app was in the foreground
|
||||||
*/
|
*/
|
||||||
foreground?: boolean
|
foreground?: boolean;
|
||||||
collapse_key?: string
|
collapse_key?: string;
|
||||||
from?: string
|
from?: string;
|
||||||
notId?: string
|
notId?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PushNotification {
|
export interface PushNotification {
|
||||||
@ -64,19 +64,19 @@ export interface PushNotification {
|
|||||||
* @param event
|
* @param event
|
||||||
* @param callback
|
* @param callback
|
||||||
*/
|
*/
|
||||||
on(event: "registration", callback: (response: RegistrationEventResponse) => any): void
|
on(event: "registration", callback: (response: RegistrationEventResponse) => any): void;
|
||||||
/**
|
/**
|
||||||
* The event notification will be triggered each time a push notification is received by a 3rd party push service on the device.
|
* The event notification will be triggered each time a push notification is received by a 3rd party push service on the device.
|
||||||
* @param event
|
* @param event
|
||||||
* @param callback
|
* @param callback
|
||||||
*/
|
*/
|
||||||
on(event: "notification", callback: (response: NotificationEventResponse) => any): void
|
on(event: "notification", callback: (response: NotificationEventResponse) => any): void;
|
||||||
/**
|
/**
|
||||||
* The event error will trigger when an internal error occurs and the cache is aborted.
|
* The event error will trigger when an internal error occurs and the cache is aborted.
|
||||||
* @param event
|
* @param event
|
||||||
* @param callback
|
* @param callback
|
||||||
*/
|
*/
|
||||||
on(event: "error", callback: (response: Error) => any): void
|
on(event: "error", callback: (response: Error) => any): void;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param event Name of the event to listen to. See below(above) for all the event names.
|
* @param event Name of the event to listen to. See below(above) for all the event names.
|
||||||
@ -84,11 +84,11 @@ export interface PushNotification {
|
|||||||
* @param event
|
* @param event
|
||||||
* @param callback
|
* @param callback
|
||||||
*/
|
*/
|
||||||
on(event: string, callback: (response: EventResponse) => any): void
|
on(event: string, callback: (response: EventResponse) => any): void;
|
||||||
|
|
||||||
off(event: "registration", callback: (response: RegistrationEventResponse) => any): void
|
off(event: "registration", callback: (response: RegistrationEventResponse) => any): void;
|
||||||
off(event: "notification", callback: (response: NotificationEventResponse) => any): void
|
off(event: "notification", callback: (response: NotificationEventResponse) => any): void;
|
||||||
off(event: "error", callback: (response: Error) => any): void
|
off(event: "error", callback: (response: Error) => any): void;
|
||||||
/**
|
/**
|
||||||
* As stated in the example, you will have to store your event handler if you are planning to remove it.
|
* As stated in the example, you will have to store your event handler if you are planning to remove it.
|
||||||
* @param event Name of the event type. The possible event names are the same as for the push.on function.
|
* @param event Name of the event type. The possible event names are the same as for the push.on function.
|
||||||
@ -96,7 +96,7 @@ export interface PushNotification {
|
|||||||
* @param event
|
* @param event
|
||||||
* @param callback
|
* @param callback
|
||||||
*/
|
*/
|
||||||
off(event: string, callback: (response: EventResponse) => any): void
|
off(event: string, callback: (response: EventResponse) => any): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The unregister method is used when the application no longer wants to receive push notifications.
|
* The unregister method is used when the application no longer wants to receive push notifications.
|
||||||
@ -105,7 +105,7 @@ export interface PushNotification {
|
|||||||
* @param successHandler
|
* @param successHandler
|
||||||
* @param errorHandler
|
* @param errorHandler
|
||||||
*/
|
*/
|
||||||
unregister(successHandler: () => any, errorHandler?: () => any): void
|
unregister(successHandler: () => any, errorHandler?: () => any): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the badge count visible when the app is not running
|
* Set the badge count visible when the app is not running
|
||||||
@ -117,14 +117,14 @@ export interface PushNotification {
|
|||||||
* @param errorHandler
|
* @param errorHandler
|
||||||
* @param count
|
* @param count
|
||||||
*/
|
*/
|
||||||
setApplicationIconBadgeNumber(successHandler: () => any, errorHandler: () => any, count?: number): void
|
setApplicationIconBadgeNumber(successHandler: () => any, errorHandler: () => any, count?: number): void;
|
||||||
/**
|
/**
|
||||||
* Get the current badge count visible when the app is not running
|
* Get the current badge count visible when the app is not running
|
||||||
* successHandler gets called with an integer which is the current badge count
|
* successHandler gets called with an integer which is the current badge count
|
||||||
* @param successHandler
|
* @param successHandler
|
||||||
* @param errorHandler
|
* @param errorHandler
|
||||||
*/
|
*/
|
||||||
getApplicationIconBadgeNumber(successHandler: (count: number) => any, errorHandler: () => any): void
|
getApplicationIconBadgeNumber(successHandler: (count: number) => any, errorHandler: () => any): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* iOS only
|
* iOS only
|
||||||
@ -133,10 +133,10 @@ export interface PushNotification {
|
|||||||
* @param successHandler
|
* @param successHandler
|
||||||
* @param errorHandler
|
* @param errorHandler
|
||||||
*/
|
*/
|
||||||
finish(successHandler: () => any, errorHandler: () => any): void
|
finish(successHandler: () => any, errorHandler: () => any): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface iOSPushOptions {
|
export interface IOSPushOptions {
|
||||||
/**
|
/**
|
||||||
* Maps to the project number in the Google Developer Console. Setting this
|
* Maps to the project number in the Google Developer Console. Setting this
|
||||||
* uses GCM for notifications instead of native.
|
* uses GCM for notifications instead of native.
|
||||||
@ -236,14 +236,14 @@ export interface AndroidPushOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface PushOptions {
|
export interface PushOptions {
|
||||||
ios?: iOSPushOptions;
|
ios?: IOSPushOptions;
|
||||||
android?: AndroidPushOptions;
|
android?: AndroidPushOptions;
|
||||||
windows?: {};
|
windows?: {};
|
||||||
}
|
}
|
||||||
|
|
||||||
declare var PushNotification: {
|
declare var PushNotification: {
|
||||||
new(): PushNotification
|
new(): PushNotification
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Push
|
* @name Push
|
||||||
@ -292,13 +292,13 @@ export class Push {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static init(options: PushOptions): PushNotification { return }
|
static init(options: PushOptions): PushNotification { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check whether the push notification permission has been granted.
|
* Check whether the push notification permission has been granted.
|
||||||
* @return {Promise} Returns a Promise that resolves with an object with one property: isEnabled, a boolean that indicates if permission has been granted.
|
* @return {Promise} Returns a Promise that resolves with an object with one property: isEnabled, a boolean that indicates if permission has been granted.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static hasPermission(): Promise<{ isEnabled: boolean }> { return }
|
static hasPermission(): Promise<{ isEnabled: boolean }> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ export class Screenshot {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 0
|
errorIndex: 0
|
||||||
})
|
})
|
||||||
static save (format?: string, quality?: number, filename?: string) : Promise<any> {return}
|
static save (format?: string, quality?: number, filename?: string): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Takes screenshot and returns the image as an URI
|
* Takes screenshot and returns the image as an URI
|
||||||
@ -32,5 +32,5 @@ export class Screenshot {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 0
|
errorIndex: 0
|
||||||
})
|
})
|
||||||
static URI (quality?: number) : Promise<any> {return}
|
static URI (quality?: number): Promise<any> {return; }
|
||||||
}
|
}
|
@ -3,23 +3,23 @@ import {Plugin, Cordova} from './plugin';
|
|||||||
/**
|
/**
|
||||||
* Options for sending an SMS
|
* Options for sending an SMS
|
||||||
*/
|
*/
|
||||||
export interface smsOptions {
|
export interface SmsOptions {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set to true to replace \n by a new line. Default: false
|
* Set to true to replace \n by a new line. Default: false
|
||||||
*/
|
*/
|
||||||
replaceLineBreaks? : boolean,
|
replaceLineBreaks?: boolean;
|
||||||
|
|
||||||
android? : smsOptionsAndroid
|
android?: SmsOptionsAndroid;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface smsOptionsAndroid {
|
export interface SmsOptionsAndroid {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set to "INTENT" to send SMS with the native android SMS messaging. Leaving it empty will send the SMS without opening any app.
|
* Set to "INTENT" to send SMS with the native android SMS messaging. Leaving it empty will send the SMS without opening any app.
|
||||||
*/
|
*/
|
||||||
intent? : string
|
intent?: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,16 +50,16 @@ export class SMS {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends sms to a number
|
* Sends sms to a number
|
||||||
* @param number {string|Array<string>} Phone number
|
* @param phoneNumber {string|Array<string>} Phone number
|
||||||
* @param message {string} Message
|
* @param message {string} Message
|
||||||
* @param options {smsOptions} Options
|
* @param options {SmsOptions} Options
|
||||||
* @returns {Promise<any>} Resolves promise when the SMS has been sent
|
* @returns {Promise<any>} Resolves promise when the SMS has been sent
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static send(
|
static send(
|
||||||
number: string | string[],
|
phoneNumber: string | string[],
|
||||||
message: string,
|
message: string,
|
||||||
options?: smsOptions
|
options?: SmsOptions
|
||||||
): Promise<any> { return }
|
): Promise<any> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ export class SocialSharing {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS', 'Android']
|
platforms: ['iOS', 'Android']
|
||||||
})
|
})
|
||||||
static canShareVia (appName : string) : Promise<any> {return}
|
static canShareVia (appName: string): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shares directly to Twitter
|
* Shares directly to Twitter
|
||||||
@ -63,7 +63,7 @@ export class SocialSharing {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS', 'Android']
|
platforms: ['iOS', 'Android']
|
||||||
})
|
})
|
||||||
static shareViaFacebook (message : string, image? : string, url? : string) : Promise<any> {return}
|
static shareViaFacebook (message: string, image?: string, url?: string): Promise<any> {return; }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -76,7 +76,7 @@ export class SocialSharing {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS', 'Android']
|
platforms: ['iOS', 'Android']
|
||||||
})
|
})
|
||||||
static shareViaFacebookWithPasteMessageHint (message : string, image? : string, url? : string, pasteMessageHint?:string) : Promise<any> {return}
|
static shareViaFacebookWithPasteMessageHint (message: string, image?: string, url?: string, pasteMessageHint?: string): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shares directly to Instagram
|
* Shares directly to Instagram
|
||||||
@ -86,7 +86,7 @@ export class SocialSharing {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS', 'Android']
|
platforms: ['iOS', 'Android']
|
||||||
})
|
})
|
||||||
static shareViaInstagram (message : string, image : string) : Promise<any> {return}
|
static shareViaInstagram (message: string, image: string): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shares directly to WhatsApp
|
* Shares directly to WhatsApp
|
||||||
@ -97,7 +97,7 @@ export class SocialSharing {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS', 'Android']
|
platforms: ['iOS', 'Android']
|
||||||
})
|
})
|
||||||
static shareViaWhatsApp (message : string, image? : string, url? : string) : Promise<any> {return}
|
static shareViaWhatsApp (message: string, image?: string, url?: string): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shares directly to a WhatsApp Contact
|
* Shares directly to a WhatsApp Contact
|
||||||
@ -109,17 +109,17 @@ export class SocialSharing {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS', 'Android']
|
platforms: ['iOS', 'Android']
|
||||||
})
|
})
|
||||||
static shareViaWhatsAppToReceiver (receiver:string, message : string, image? : string, url? : string) : Promise<any> {return}
|
static shareViaWhatsAppToReceiver (receiver: string, message: string, image?: string, url?: string): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Share via SMS
|
* Share via SMS
|
||||||
* @param messge {string} message to send
|
* @param messge {string} message to send
|
||||||
* @param number {string} Number or multiple numbers seperated by commas
|
* @param phoneNumber {string} Number or multiple numbers seperated by commas
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS', 'Android']
|
platforms: ['iOS', 'Android']
|
||||||
})
|
})
|
||||||
static shareViaSMS(messge : string, number : string) : Promise<any> {return}
|
static shareViaSMS(messge: string, phoneNumber: string): Promise<any> {return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Share via Email
|
* Share via Email
|
||||||
@ -133,7 +133,7 @@ export class SocialSharing {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS', 'Android']
|
platforms: ['iOS', 'Android']
|
||||||
})
|
})
|
||||||
static shareViaEmail(message:string, subject:string, to:Array<string>, cc:Array<string>, bcc:Array<string>, files:string|Array<string>) : Promise<any> {return}
|
static shareViaEmail(message: string, subject: string, to: Array<string>, cc: Array<string>, bcc: Array<string>, files: string|Array<string>): Promise<any> {return; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -46,8 +46,8 @@ export class SpinnerDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface SpinnerDialogIOSOptions {
|
export interface SpinnerDialogIOSOptions {
|
||||||
overlayOpacity? : number,
|
overlayOpacity?: number;
|
||||||
textColorRed? : number,
|
textColorRed?: number;
|
||||||
textColorGreen? : number,
|
textColorGreen?: number;
|
||||||
textColorBlue? : number
|
textColorBlue?: number;
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
import {Plugin, Cordova} from './plugin'
|
import {Plugin, Cordova} from './plugin';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Splashscreen
|
* @name Splashscreen
|
||||||
|
@ -30,10 +30,10 @@ export class SQLite {
|
|||||||
addTransaction (transaction: any): void {}
|
addTransaction (transaction: any): void {}
|
||||||
|
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
transaction (fn : any) : Promise<any> {return}
|
transaction (fn: any): Promise<any> {return; }
|
||||||
|
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
readTransaction (fn : any) : Promise<any> {return}
|
readTransaction (fn: any): Promise<any> {return; }
|
||||||
|
|
||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
@ -41,7 +41,7 @@ export class SQLite {
|
|||||||
startNextTransaction (): void {}
|
startNextTransaction (): void {}
|
||||||
|
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
close () : Promise<any> {return}
|
close (): Promise<any> {return; }
|
||||||
|
|
||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
@ -49,13 +49,13 @@ export class SQLite {
|
|||||||
start (): void {}
|
start (): void {}
|
||||||
|
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
executeSql (statement : string, params : any) : Promise<any> {return}
|
executeSql (statement: string, params: any): Promise<any> {return; }
|
||||||
|
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
addSatement (sql, values) : Promise<any> {return}
|
addSatement (sql, values): Promise<any> {return; }
|
||||||
|
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
sqlBatch (sqlStatements : any) : Promise<any> {return}
|
sqlBatch (sqlStatements: any): Promise<any> {return; }
|
||||||
|
|
||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
@ -99,9 +99,9 @@ export class SQLite {
|
|||||||
|
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static echoTest () : Promise<any> {return}
|
static echoTest (): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static deleteDatabase (first) : Promise<any> {return}
|
static deleteDatabase (first): Promise<any> {return; }
|
||||||
|
|
||||||
}
|
}
|
@ -77,14 +77,14 @@ export class Toast {
|
|||||||
message: string,
|
message: string,
|
||||||
duration: string,
|
duration: string,
|
||||||
position: string
|
position: string
|
||||||
): Observable<any> { return }
|
): Observable<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manually hide any currently visible toast.
|
* Manually hide any currently visible toast.
|
||||||
* @return {Promise} Returns a Promise that resolves on success.
|
* @return {Promise} Returns a Promise that resolves on success.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static hide(): Promise<any>{ return }
|
static hide(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show a native toast with the given options.
|
* Show a native toast with the given options.
|
||||||
@ -101,7 +101,7 @@ export class Toast {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'hide'
|
clearFunction: 'hide'
|
||||||
})
|
})
|
||||||
static showWithOptions(options: ToastOptions): Observable<any> { return }
|
static showWithOptions(options: ToastOptions): Observable<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shorthand for `show(message, 'short', 'top')`.
|
* Shorthand for `show(message, 'short', 'top')`.
|
||||||
@ -111,7 +111,7 @@ export class Toast {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'hide'
|
clearFunction: 'hide'
|
||||||
})
|
})
|
||||||
static showShortTop(message: string): Observable<any> { return }
|
static showShortTop(message: string): Observable<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shorthand for `show(message, 'short', 'center')`.
|
* Shorthand for `show(message, 'short', 'center')`.
|
||||||
@ -121,7 +121,7 @@ export class Toast {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'hide'
|
clearFunction: 'hide'
|
||||||
})
|
})
|
||||||
static showShortCenter(message: string): Observable<any> { return }
|
static showShortCenter(message: string): Observable<any> { return; }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -132,7 +132,7 @@ export class Toast {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'hide'
|
clearFunction: 'hide'
|
||||||
})
|
})
|
||||||
static showShortBottom(message: string): Observable<any> { return }
|
static showShortBottom(message: string): Observable<any> { return; }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -143,7 +143,7 @@ export class Toast {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'hide'
|
clearFunction: 'hide'
|
||||||
})
|
})
|
||||||
static showLongTop(message: string): Observable<any> { return }
|
static showLongTop(message: string): Observable<any> { return; }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -154,7 +154,7 @@ export class Toast {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'hide'
|
clearFunction: 'hide'
|
||||||
})
|
})
|
||||||
static showLongCenter(message: string): Observable<any> { return }
|
static showLongCenter(message: string): Observable<any> { return; }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -165,6 +165,6 @@ export class Toast {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'hide'
|
clearFunction: 'hide'
|
||||||
})
|
})
|
||||||
static showLongBottom(message: string): Observable<any> { return }
|
static showLongBottom(message: string): Observable<any> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ export class TouchID {
|
|||||||
* @return {Promise} Returns a Promise that resolves if yes, rejects if no.
|
* @return {Promise} Returns a Promise that resolves if yes, rejects if no.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
isAvailable(): Promise<any>{ return }
|
isAvailable(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show TouchID dialog and wait for a fingerprint scan. If user taps 'Enter Password' button, brings up standard system passcode screen.
|
* Show TouchID dialog and wait for a fingerprint scan. If user taps 'Enter Password' button, brings up standard system passcode screen.
|
||||||
@ -49,7 +49,7 @@ export class TouchID {
|
|||||||
* @return {Promise} Returns a Promise the resolves if the fingerprint scan was successful, rejects with an error code (see above).
|
* @return {Promise} Returns a Promise the resolves if the fingerprint scan was successful, rejects with an error code (see above).
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static verifyFingerprint(message: string): Promise<any>{ return }
|
static verifyFingerprint(message: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show TouchID dialog and wait for a fingerprint scan. If user taps 'Enter Password' button, rejects with code '-3' (see above).
|
* Show TouchID dialog and wait for a fingerprint scan. If user taps 'Enter Password' button, rejects with code '-3' (see above).
|
||||||
@ -58,7 +58,7 @@ export class TouchID {
|
|||||||
* @return {Promise} Returns a Promise the resolves if the fingerprint scan was successful, rejects with an error code (see above).
|
* @return {Promise} Returns a Promise the resolves if the fingerprint scan was successful, rejects with an error code (see above).
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static verifyFingerprintWithCustomPasswordFallback(message: string): Promise<any> { return }
|
static verifyFingerprintWithCustomPasswordFallback(message: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show TouchID dialog with custom 'Enter Password' message and wait for a fingerprint scan. If user taps 'Enter Password' button, rejects with code '-3' (see above).
|
* Show TouchID dialog with custom 'Enter Password' message and wait for a fingerprint scan. If user taps 'Enter Password' button, rejects with code '-3' (see above).
|
||||||
@ -68,5 +68,5 @@ export class TouchID {
|
|||||||
* @return {Promise} Returns a Promise the resolves if the fingerprint scan was successful, rejects with an error code (see above).
|
* @return {Promise} Returns a Promise the resolves if the fingerprint scan was successful, rejects with an error code (see above).
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static verifyFingerprintWithCustomPasswordFallbackAndEnterPasswordLabel(message: string, enterPasswordLabel: string): Promise<any> { return }
|
static verifyFingerprintWithCustomPasswordFallbackAndEnterPasswordLabel(message: string, enterPasswordLabel: string): Promise<any> { return; }
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Plugin, Cordova} from './plugin'
|
import {Plugin, Cordova} from './plugin';
|
||||||
/**
|
/**
|
||||||
* @name Vibration
|
* @name Vibration
|
||||||
* @description Vibrates the device
|
* @description Vibrates the device
|
||||||
|
@ -18,21 +18,21 @@ export class WebIntent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static startActivity (options : {action:any,url:string}) : Promise<any> {return}
|
static startActivity (options: {action: any, url: string}): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static hasExtra (extra : any) : Promise<any> {return}
|
static hasExtra (extra: any): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getExtra (extra : any) : Promise<any> {return}
|
static getExtra (extra: any): Promise<any> {return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getUri () : Promise<string> {return};
|
static getUri (): Promise<string> {return; };
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static onNewIntent() : Promise<string> {return};
|
static onNewIntent(): Promise<string> {return; };
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static sendBroadcast(options : {action:string, extras?:{option:boolean}}) : Promise<any> {return}
|
static sendBroadcast(options: {action: string, extras?: {option: boolean}}): Promise<any> {return; }
|
||||||
|
|
||||||
}
|
}
|
62
tslint.json
Normal file
62
tslint.json
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
{
|
||||||
|
"rulesDirectory": "node_modules/tslint-eslint-rules/dist/rules",
|
||||||
|
"rules": {
|
||||||
|
"class-name": true,
|
||||||
|
"comment-format": [
|
||||||
|
true,
|
||||||
|
"check-space"
|
||||||
|
],
|
||||||
|
"indent": [
|
||||||
|
true,
|
||||||
|
"spaces"
|
||||||
|
],
|
||||||
|
"no-duplicate-variable": true,
|
||||||
|
"no-eval": true,
|
||||||
|
"no-internal-module": true,
|
||||||
|
"no-trailing-whitespace": true,
|
||||||
|
"no-var-keyword": false,
|
||||||
|
"one-line": [
|
||||||
|
true,
|
||||||
|
"check-open-brace",
|
||||||
|
"check-whitespace"
|
||||||
|
],
|
||||||
|
"quotemark": [
|
||||||
|
true,
|
||||||
|
"single"
|
||||||
|
],
|
||||||
|
"semicolon": [
|
||||||
|
true,
|
||||||
|
"always"
|
||||||
|
],
|
||||||
|
"triple-equals": [
|
||||||
|
true,
|
||||||
|
"allow-null-check"
|
||||||
|
],
|
||||||
|
"typedef-whitespace": [
|
||||||
|
true,
|
||||||
|
{
|
||||||
|
"call-signature": "nospace",
|
||||||
|
"index-signature": "nospace",
|
||||||
|
"parameter": "nospace",
|
||||||
|
"property-declaration": "nospace",
|
||||||
|
"variable-declaration": "nospace"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"variable-name": [
|
||||||
|
true,
|
||||||
|
"ban-keywords"
|
||||||
|
],
|
||||||
|
"whitespace": [
|
||||||
|
true,
|
||||||
|
"check-branch",
|
||||||
|
"check-decl",
|
||||||
|
"check-operator",
|
||||||
|
"check-separator",
|
||||||
|
"check-type"
|
||||||
|
],
|
||||||
|
"no-inner-declarations": [
|
||||||
|
true,
|
||||||
|
"functions"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user