mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-22 01:19:36 +08:00
fix conflicts
This commit is contained in:
commit
41d335e4e9
@ -1,6 +1,9 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
|
||||
declare var window: any;
|
||||
|
||||
/**
|
||||
* @name 3DTouch
|
||||
* @description
|
||||
@ -74,7 +77,7 @@ export class ThreeDeeTouch {
|
||||
* @returns {Promise<boolean>} returns a promise that resolves with a boolean that indicates whether the plugin is available or not
|
||||
*/
|
||||
@Cordova()
|
||||
static isAvailable(): Promise<boolean> {return; }
|
||||
static isAvailable(): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* You can get a notification when the user force touches the webview. The plugin defines a Force Touch when at least 75% of the maximum force is applied to the screen. Your app will receive the x and y coordinates, so you have to figure out which UI element was touched.
|
||||
@ -83,7 +86,7 @@ export class ThreeDeeTouch {
|
||||
@Cordova({
|
||||
observable: true
|
||||
})
|
||||
static watchForceTouches(): Observable<ThreeDeeTouchForceTouch> {return; }
|
||||
static watchForceTouches(): Observable<ThreeDeeTouchForceTouch> { return; }
|
||||
|
||||
/**
|
||||
* setup the 3D-touch actions, takes an array of objects with the following
|
||||
@ -95,7 +98,7 @@ export class ThreeDeeTouch {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static configureQuickActions(quickActions: Array<ThreeDeeTouchQuickAction>): void {}
|
||||
static configureQuickActions(quickActions: Array<ThreeDeeTouchQuickAction>): void { }
|
||||
|
||||
/**
|
||||
* When a home icon is pressed, your app launches and this JS callback is invoked.
|
||||
@ -118,7 +121,7 @@ export class ThreeDeeTouch {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static enableLinkPreview(): void {}
|
||||
static enableLinkPreview(): void { }
|
||||
|
||||
/**
|
||||
* Disabled the link preview feature, if enabled.
|
||||
@ -126,7 +129,7 @@ export class ThreeDeeTouch {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static disableLinkPreview(): void {}
|
||||
static disableLinkPreview(): void { }
|
||||
}
|
||||
export interface ThreeDeeTouchQuickAction {
|
||||
type?: string;
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
/**
|
||||
* @name Action Sheet
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
/**
|
||||
* @name AdMob
|
||||
@ -22,7 +22,7 @@ export class AdMob {
|
||||
* @param adIdOrOptions
|
||||
*/
|
||||
@Cordova()
|
||||
static createBanner(adIdOrOptions: any): Promise<any> {return; }
|
||||
static createBanner(adIdOrOptions: any): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
*
|
||||
@ -30,7 +30,7 @@ export class AdMob {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static removeBanner(): void {}
|
||||
static removeBanner(): void { }
|
||||
|
||||
/**
|
||||
*
|
||||
@ -39,7 +39,7 @@ export class AdMob {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static showBanner(position: any): void {}
|
||||
static showBanner(position: any): void { }
|
||||
|
||||
/**
|
||||
*
|
||||
@ -49,7 +49,7 @@ export class AdMob {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static showBannerAtXY(x: number, y: number): void {}
|
||||
static showBannerAtXY(x: number, y: number): void { }
|
||||
|
||||
/**
|
||||
*
|
||||
@ -57,14 +57,14 @@ export class AdMob {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static hideBanner(): void {}
|
||||
static hideBanner(): void { }
|
||||
|
||||
/**
|
||||
*
|
||||
* @param adIdOrOptions
|
||||
*/
|
||||
@Cordova()
|
||||
static prepareInterstitial(adIdOrOptions: any): Promise<any> {return; }
|
||||
static prepareInterstitial(adIdOrOptions: any): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Show interstitial
|
||||
@ -72,20 +72,20 @@ export class AdMob {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static showInterstitial(): void {}
|
||||
static showInterstitial(): void { }
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Cordova()
|
||||
static isInterstitialReady (): Promise<boolean> {return; }
|
||||
static isInterstitialReady(): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* Prepare a reward video ad
|
||||
* @param adIdOrOptions
|
||||
*/
|
||||
@Cordova()
|
||||
static prepareRewardVideoAd(adIdOrOptions: any): Promise<any> {return; }
|
||||
static prepareRewardVideoAd(adIdOrOptions: any): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Show a reward video ad
|
||||
@ -100,14 +100,14 @@ export class AdMob {
|
||||
* @param options Returns a promise that resolves if the options are set successfully
|
||||
*/
|
||||
@Cordova()
|
||||
static setOptions(options: any): Promise<any> {return; }
|
||||
static setOptions(options: any): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Get user ad settings
|
||||
* @returns {Promise<any>} Returns a promise that resolves with the ad settings
|
||||
*/
|
||||
@Cordova()
|
||||
static getAdSettings(): Promise<any> {return; }
|
||||
static getAdSettings(): Promise<any> { return; }
|
||||
|
||||
// Events
|
||||
|
||||
@ -115,65 +115,65 @@ export class AdMob {
|
||||
eventObservable: true,
|
||||
event: 'onBannerFailedToReceive'
|
||||
})
|
||||
static onBannerFailedToReceive (): Observable<any> {return; }
|
||||
static onBannerFailedToReceive(): Observable<any> { return; }
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'onBannerReceive'
|
||||
})
|
||||
static onBannerReceive (): Observable<any> {return; }
|
||||
static onBannerReceive(): Observable<any> { return; }
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'onBannerPresent'
|
||||
})
|
||||
static onBannerPresent (): Observable<any> {return; }
|
||||
static onBannerPresent(): Observable<any> { return; }
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'onBannerLeaveApp'
|
||||
})
|
||||
static onBannerLeaveApp (): Observable<any> {return; }
|
||||
static onBannerLeaveApp(): Observable<any> { return; }
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'onBannerDismiss'
|
||||
})
|
||||
static onBannerDismiss (): Observable<any> {return; }
|
||||
static onBannerDismiss(): Observable<any> { return; }
|
||||
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'onInterstitialFailedToReceive'
|
||||
})
|
||||
static onInterstitialFailedToReceive (): Observable<any> {return; }
|
||||
static onInterstitialFailedToReceive(): Observable<any> { return; }
|
||||
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'onInterstitialReceive'
|
||||
})
|
||||
static onInterstitialReceive (): Observable<any> {return; }
|
||||
static onInterstitialReceive(): Observable<any> { return; }
|
||||
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'onInterstitialPresent'
|
||||
})
|
||||
static onInterstitialPresent (): Observable<any> {return; }
|
||||
static onInterstitialPresent(): Observable<any> { return; }
|
||||
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'onInterstitialLeaveApp'
|
||||
})
|
||||
static onInterstitialLeaveApp (): Observable<any> {return; }
|
||||
static onInterstitialLeaveApp(): Observable<any> { return; }
|
||||
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'onInterstitialDismiss'
|
||||
})
|
||||
static onInterstitialDismiss (): Observable<any> {return; }
|
||||
static onInterstitialDismiss(): Observable<any> { return; }
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
/**
|
||||
* @name App Availability
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {Plugin, Cordova, CordovaProperty} from './plugin';
|
||||
import { Cordova, CordovaProperty, Plugin } from './plugin';
|
||||
|
||||
|
||||
declare var window;
|
||||
|
||||
@ -62,6 +63,6 @@ export class AppRate {
|
||||
* @param {boolean} immediately Show the rating prompt immediately.
|
||||
*/
|
||||
@Cordova()
|
||||
static promptForRating(immediately: boolean): void {};
|
||||
static promptForRating(immediately: boolean): void { };
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
/**
|
||||
* @name App Version
|
||||
|
@ -1,5 +1,6 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
|
||||
declare var window;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
/**
|
||||
* @name Background Mode
|
||||
@ -39,28 +39,28 @@ export class BackgroundMode {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static enable(): void {}
|
||||
static enable(): void { }
|
||||
|
||||
/**
|
||||
* Disable the background mode.
|
||||
* Once the background mode has been disabled, the app will be paused when in background.
|
||||
*/
|
||||
@Cordova()
|
||||
static disable(): void {}
|
||||
static disable(): void { }
|
||||
|
||||
/**
|
||||
* Checks if background mode is enabled or not.
|
||||
* @returns {boolean} returns a true of false if the background mode is enabled.
|
||||
*/
|
||||
@Cordova()
|
||||
static isEnabled(): Promise<boolean> {return; }
|
||||
static isEnabled(): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* Can be used to get the information if the background mode is active.
|
||||
* @returns {boolean} returns tru or flase if the background mode is active.
|
||||
*/
|
||||
@Cordova()
|
||||
static isActive(): Promise<boolean> {return; }
|
||||
static isActive(): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* Override the default title, ticker and text.
|
||||
@ -70,7 +70,7 @@ export class BackgroundMode {
|
||||
@Cordova({
|
||||
platforms: ['Android']
|
||||
})
|
||||
static setDefaults(options?: Configure): void {}
|
||||
static setDefaults(options?: Configure): void { }
|
||||
|
||||
/**
|
||||
* Modify the displayed information.
|
||||
@ -80,7 +80,7 @@ export class BackgroundMode {
|
||||
@Cordova({
|
||||
platforms: ['Android']
|
||||
})
|
||||
static update(options?: Configure): void {}
|
||||
static update(options?: Configure): void { }
|
||||
|
||||
/**
|
||||
* Sets a callback for a specific event
|
||||
@ -90,7 +90,7 @@ export class BackgroundMode {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static on(eventName: string, callback: any): void {}
|
||||
static on(eventName: string, callback: any): void { }
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
/**
|
||||
* @name Badge
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
/**
|
||||
* @name Barcode Scanner
|
||||
@ -52,6 +52,6 @@ export class BarcodeScanner {
|
||||
* @param data
|
||||
*/
|
||||
@Cordova()
|
||||
static encode(type: string, data: any): Promise<any> {return; }
|
||||
static encode(type: string, data: any): Promise<any> { return; }
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
/**
|
||||
* @name Base64 To Gallery
|
||||
* @description This plugin allows you to save base64 data as a png image into the device
|
||||
@ -24,11 +24,11 @@ export class Base64ToGallery {
|
||||
/**
|
||||
* Converts a base64 string to an image file in the device gallery
|
||||
* @param {string} data The actual base64 string that you want to save
|
||||
* @param {sstring} prefix Prefix the file with a string. Default is 'img_'. Optional.
|
||||
* @param {string} prefix Prefix the file with a string. Default is 'img_'. Optional.
|
||||
* @returns {Promise} returns a promise that resolves when the image is saved.
|
||||
*/
|
||||
@Cordova()
|
||||
static base64ToGallery(data: string , prefix?: string ): Promise<any> {
|
||||
static base64ToGallery(data: string, prefix?: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
/**
|
||||
* @name Battery Status
|
||||
@ -39,7 +39,7 @@ export class BatteryStatus {
|
||||
eventObservable: true,
|
||||
event: 'batterystatus'
|
||||
})
|
||||
static onChange (): Observable<StatusObject> {return; }
|
||||
static onChange(): Observable<StatusObject> { return; }
|
||||
|
||||
/**
|
||||
* Watch when the battery level goes low
|
||||
@ -49,7 +49,7 @@ export class BatteryStatus {
|
||||
eventObservable: true,
|
||||
event: 'batterylow'
|
||||
})
|
||||
static onLow (): Observable<StatusObject> {return; }
|
||||
static onLow(): Observable<StatusObject> { return; }
|
||||
|
||||
/**
|
||||
* Watch when the battery level goes to critial
|
||||
@ -59,7 +59,7 @@ export class BatteryStatus {
|
||||
eventObservable: true,
|
||||
event: 'batterycritical'
|
||||
})
|
||||
static onCritical (): Observable<StatusObject> {return; }
|
||||
static onCritical(): Observable<StatusObject> { return; }
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
/**
|
||||
* @name BLE
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
/**
|
||||
* @name Bluetooth Serial
|
||||
@ -42,7 +42,7 @@ export class BluetoothSerial {
|
||||
observable: true,
|
||||
clearFunction: 'disconnect'
|
||||
})
|
||||
static connect (macAddress_or_uuid: string): Observable<any> {return; }
|
||||
static connect(macAddress_or_uuid: string): Observable<any> { return; }
|
||||
|
||||
/**
|
||||
* Connect insecurely to a Bluetooth device
|
||||
@ -54,7 +54,7 @@ export class BluetoothSerial {
|
||||
observable: true,
|
||||
clearFunction: 'disconnect'
|
||||
})
|
||||
static connectInsecure (macAddress: string): Observable<any> {return; }
|
||||
static connectInsecure(macAddress: string): Observable<any> { return; }
|
||||
|
||||
/**
|
||||
* Writes data to the serial port
|
||||
@ -64,7 +64,7 @@ export class BluetoothSerial {
|
||||
@Cordova({
|
||||
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
|
||||
@ -72,7 +72,7 @@ export class BluetoothSerial {
|
||||
*/
|
||||
@Cordova({
|
||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||
}) static available (): Promise<any> {return; }
|
||||
}) static available(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Reads data from the buffer
|
||||
@ -81,7 +81,7 @@ export class BluetoothSerial {
|
||||
@Cordova({
|
||||
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
|
||||
@ -91,7 +91,7 @@ export class BluetoothSerial {
|
||||
@Cordova({
|
||||
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
|
||||
@ -103,7 +103,7 @@ export class BluetoothSerial {
|
||||
observable: true,
|
||||
clearFunction: 'unsubscribe'
|
||||
})
|
||||
static subscribe (delimiter: string): Observable<any> {return; }
|
||||
static subscribe(delimiter: string): Observable<any> { return; }
|
||||
|
||||
/**
|
||||
* Subscribe to be notified when data is received
|
||||
@ -114,7 +114,7 @@ export class BluetoothSerial {
|
||||
observable: true,
|
||||
clearFunction: 'unsubscribeRawData'
|
||||
})
|
||||
static subscribeRawData (): Observable<any> {return; }
|
||||
static subscribeRawData(): Observable<any> { return; }
|
||||
|
||||
/**
|
||||
* Clears data in buffer
|
||||
@ -123,7 +123,7 @@ export class BluetoothSerial {
|
||||
@Cordova({
|
||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||
})
|
||||
static clear (): Promise<any> {return; }
|
||||
static clear(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Lists bonded devices
|
||||
@ -132,7 +132,7 @@ export class BluetoothSerial {
|
||||
@Cordova({
|
||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||
})
|
||||
static list (): Promise<any> {return; }
|
||||
static list(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Reports if bluetooth is enabled
|
||||
@ -141,7 +141,7 @@ export class BluetoothSerial {
|
||||
@Cordova({
|
||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||
})
|
||||
static isEnabled (): Promise<any> {return; }
|
||||
static isEnabled(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Reports the connection status
|
||||
@ -150,7 +150,7 @@ export class BluetoothSerial {
|
||||
@Cordova({
|
||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||
})
|
||||
static isConnected (): Promise<any> {return; }
|
||||
static isConnected(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Reads the RSSI from the connected peripheral
|
||||
@ -159,7 +159,7 @@ export class BluetoothSerial {
|
||||
@Cordova({
|
||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||
})
|
||||
static readRSSI (): Promise<any> {return; }
|
||||
static readRSSI(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Show the Bluetooth settings on the device
|
||||
@ -168,7 +168,7 @@ export class BluetoothSerial {
|
||||
@Cordova({
|
||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||
})
|
||||
static showBluetoothSettings (): Promise<any> {return; }
|
||||
static showBluetoothSettings(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Enable Bluetooth on the device
|
||||
@ -177,7 +177,7 @@ export class BluetoothSerial {
|
||||
@Cordova({
|
||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||
})
|
||||
static enable (): Promise<any> {return; }
|
||||
static enable(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Discover unpaired devices
|
||||
@ -186,7 +186,7 @@ export class BluetoothSerial {
|
||||
@Cordova({
|
||||
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.
|
||||
@ -197,7 +197,7 @@ export class BluetoothSerial {
|
||||
observable: true,
|
||||
clearFunction: 'clearDeviceDiscoveredListener'
|
||||
})
|
||||
static setDeviceDiscoveredListener (): Observable<any> {return; }
|
||||
static setDeviceDiscoveredListener(): Observable<any> { return; }
|
||||
|
||||
/**
|
||||
* Sets the human readable device name that is broadcasted to other devices
|
||||
@ -207,7 +207,7 @@ export class BluetoothSerial {
|
||||
platforms: ['Android'],
|
||||
sync: true
|
||||
})
|
||||
static setName (newName: string): void {}
|
||||
static setName(newName: string): void { }
|
||||
|
||||
/**
|
||||
* Makes the device discoverable by other devices
|
||||
@ -217,5 +217,5 @@ export class BluetoothSerial {
|
||||
platforms: ['Android'],
|
||||
sync: true
|
||||
})
|
||||
static setDiscoverable (discoverableDuration: number): void {}
|
||||
static setDiscoverable(discoverableDuration: number): void { }
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
/**
|
||||
* @name Brightness
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
export interface CalendarOptions {
|
||||
firstReminderMinutes?: number;
|
||||
@ -53,35 +54,35 @@ export class Calendar {
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@Cordova()
|
||||
static hasReadPermission(): Promise<boolean> {return; }
|
||||
static hasReadPermission(): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* Check if we have write permission
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@Cordova()
|
||||
static hasWritePermission(): Promise<boolean> {return; }
|
||||
static hasWritePermission(): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* Request write permission
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
static requestWritePermission(): Promise<any> {return; }
|
||||
static requestWritePermission(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Request read permission
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
static requestReadPermission(): Promise<any> {return; }
|
||||
static requestReadPermission(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Requests read/write permissions
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
static requestReadWritePermission(): Promise<any> {return; }
|
||||
static requestReadWritePermission(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Create a calendar. (iOS only)
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
export interface CameraOptions {
|
||||
@ -164,7 +164,7 @@ export class Camera {
|
||||
/** Allow selection of video only, ONLY RETURNS URL */
|
||||
VIDEO: 1,
|
||||
/** Allow selection from all media types */
|
||||
ALLMEDIA : 2
|
||||
ALLMEDIA: 2
|
||||
};
|
||||
|
||||
/**
|
||||
@ -173,11 +173,11 @@ export class Camera {
|
||||
*/
|
||||
static PictureSourceType = {
|
||||
/** Choose image from picture library (same as SAVEDPHOTOALBUM for Android) */
|
||||
PHOTOLIBRARY : 0,
|
||||
PHOTOLIBRARY: 0,
|
||||
/** Take picture from camera */
|
||||
CAMERA : 1,
|
||||
CAMERA: 1,
|
||||
/** Choose image from picture library (same as PHOTOLIBRARY for Android) */
|
||||
SAVEDPHOTOALBUM : 2
|
||||
SAVEDPHOTOALBUM: 2
|
||||
};
|
||||
|
||||
/**
|
||||
@ -186,11 +186,11 @@ export class Camera {
|
||||
* @enum {number}
|
||||
*/
|
||||
static PopoverArrowDirection = {
|
||||
ARROW_UP : 1,
|
||||
ARROW_DOWN : 2,
|
||||
ARROW_LEFT : 4,
|
||||
ARROW_RIGHT : 8,
|
||||
ARROW_ANY : 15
|
||||
ARROW_UP: 1,
|
||||
ARROW_DOWN: 2,
|
||||
ARROW_LEFT: 4,
|
||||
ARROW_RIGHT: 8,
|
||||
ARROW_ANY: 15
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
/**
|
||||
* @name CardIO
|
||||
@ -37,20 +37,20 @@ export class CardIO {
|
||||
*
|
||||
*/
|
||||
@Cordova()
|
||||
static canScan(): Promise<boolean> {return; }
|
||||
static canScan(): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* Scan a credit card with card.io.
|
||||
* @param {CardIOOptions} options Options for configuring the plugin
|
||||
*/
|
||||
@Cordova()
|
||||
static scan(options?: CardIOOptions): Promise<any> {return; }
|
||||
static scan(options?: CardIOOptions): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Retrieve the version of the card.io library. Useful when contacting support.
|
||||
*/
|
||||
@Cordova()
|
||||
static version(): Promise<string> {return; }
|
||||
static version(): Promise<string> { return; }
|
||||
}
|
||||
|
||||
export interface CardIOOptions {
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
/**
|
||||
* @name Clipboard
|
||||
|
@ -1,6 +1,9 @@
|
||||
import {Plugin, Cordova, InstanceProperty, CordovaInstance} from './plugin';
|
||||
import { Cordova, CordovaInstance, Plugin, InstanceProperty } from './plugin';
|
||||
|
||||
|
||||
declare var window: any,
|
||||
navigator: any;
|
||||
|
||||
export interface IContactProperties {
|
||||
/** A globally unique identifier. */
|
||||
id?: string;
|
||||
@ -32,29 +35,30 @@ export interface IContactProperties {
|
||||
urls?: IContactField[];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export class Contact implements IContactProperties {
|
||||
private _objectInstance: any;
|
||||
@InstanceProperty get id(): string {return; }
|
||||
@InstanceProperty get displayName(): string {return; }
|
||||
@InstanceProperty get id(): string { return; }
|
||||
@InstanceProperty get displayName(): string { return; }
|
||||
@InstanceProperty get name(): IContactName {return; }
|
||||
@InstanceProperty get nickname(): string {return; }
|
||||
@InstanceProperty get phoneNumbers(): IContactField[] {return; }
|
||||
@InstanceProperty get emails(): IContactField[] {return; }
|
||||
@InstanceProperty get addresses(): IContactAddress[] {return; }
|
||||
@InstanceProperty get ims(): IContactField[] {return; }
|
||||
@InstanceProperty get organizations(): IContactOrganization[] {return; }
|
||||
@InstanceProperty get birthday(): Date {return; }
|
||||
@InstanceProperty get note(): string {return; }
|
||||
@InstanceProperty get photos(): IContactField[] {return; }
|
||||
@InstanceProperty get categories(): IContactField[] {return; }
|
||||
@InstanceProperty get urls(): IContactField[] {return; }
|
||||
constructor () {
|
||||
@InstanceProperty get nickname(): string { return; }
|
||||
@InstanceProperty get phoneNumbers(): IContactField[] { return; }
|
||||
@InstanceProperty get emails(): IContactField[] { return; }
|
||||
@InstanceProperty get addresses(): IContactAddress[] { return; }
|
||||
@InstanceProperty get ims(): IContactField[] { return; }
|
||||
@InstanceProperty get organizations(): IContactOrganization[] { return; }
|
||||
@InstanceProperty get birthday(): Date { return; }
|
||||
@InstanceProperty get note(): string { return; }
|
||||
@InstanceProperty get photos(): IContactField[] { return; }
|
||||
@InstanceProperty get categories(): IContactField[] { return; }
|
||||
@InstanceProperty get urls(): IContactField[] { return; }
|
||||
|
||||
constructor() {
|
||||
this._objectInstance = navigator.contacts.create();
|
||||
}
|
||||
|
||||
clone(): Contact {
|
||||
let newContact = new Contact();
|
||||
for (let prop in this) {
|
||||
@ -63,19 +67,23 @@ export class Contact implements IContactProperties {
|
||||
}
|
||||
return newContact;
|
||||
}
|
||||
|
||||
@CordovaInstance()
|
||||
remove(): Promise<any> {return; }
|
||||
remove(): Promise<any> { return; }
|
||||
|
||||
@CordovaInstance()
|
||||
save(): Promise<any> {return; }
|
||||
save(): Promise<any> { return; }
|
||||
}
|
||||
|
||||
interface IContactError {
|
||||
/** Error code */
|
||||
code: number;
|
||||
/** Error message */
|
||||
message: string;
|
||||
}
|
||||
|
||||
declare var ContactError: {
|
||||
new(code: number): IContactError;
|
||||
new (code: number): IContactError;
|
||||
UNKNOWN_ERROR: number;
|
||||
INVALID_ARGUMENT_ERROR: number;
|
||||
TIMEOUT_ERROR: number;
|
||||
@ -84,6 +92,7 @@ declare var ContactError: {
|
||||
NOT_SUPPORTED_ERROR: number;
|
||||
PERMISSION_DENIED_ERROR: number
|
||||
};
|
||||
|
||||
export interface IContactName {
|
||||
/** The complete name of the contact. */
|
||||
formatted?: string;
|
||||
@ -104,15 +113,17 @@ export interface IContactName {
|
||||
*/
|
||||
export class ContactName implements IContactName {
|
||||
private _objectInstance: any;
|
||||
|
||||
constructor(formatted?: string, familyName?: string, givenName?: string, middleName?: string, honorificPrefix?: string, honorificSuffix?: string) {
|
||||
this._objectInstance = new window.ContactName(formatted, familyName, givenName, middleName, honorificPrefix, honorificSuffix);
|
||||
}
|
||||
@InstanceProperty get formatted(): string {return; }
|
||||
@InstanceProperty get familyName(): string {return; }
|
||||
@InstanceProperty get givenName(): string {return; }
|
||||
@InstanceProperty get middleName(): string {return; }
|
||||
@InstanceProperty get honorificPrefix(): string {return; }
|
||||
@InstanceProperty get honorificSuffix(): string {return; }
|
||||
|
||||
@InstanceProperty get formatted(): string { return; }
|
||||
@InstanceProperty get familyName(): string { return; }
|
||||
@InstanceProperty get givenName(): string { return; }
|
||||
@InstanceProperty get middleName(): string { return; }
|
||||
@InstanceProperty get honorificPrefix(): string { return; }
|
||||
@InstanceProperty get honorificSuffix(): string { return; }
|
||||
}
|
||||
|
||||
export interface IContactField {
|
||||
@ -129,12 +140,14 @@ export interface IContactField {
|
||||
*/
|
||||
export class ContactField implements IContactField {
|
||||
private _objectInstance: any;
|
||||
|
||||
constructor(type?: string, value?: string, pref?: boolean) {
|
||||
this._objectInstance = new window.ContactField(type, value, pref);
|
||||
}
|
||||
@InstanceProperty get type(): string {return; }
|
||||
@InstanceProperty get value(): string {return; }
|
||||
@InstanceProperty get pref(): boolean {return; }
|
||||
|
||||
@InstanceProperty get type(): string { return; }
|
||||
@InstanceProperty get value(): string { return; }
|
||||
@InstanceProperty get pref(): boolean { return; }
|
||||
}
|
||||
|
||||
export interface IContactAddress {
|
||||
@ -161,7 +174,8 @@ export interface IContactAddress {
|
||||
*/
|
||||
export class ContactAddress implements IContactAddress {
|
||||
private _objectInstance: any;
|
||||
constructor (pref?: boolean,
|
||||
|
||||
constructor(pref?: boolean,
|
||||
type?: string,
|
||||
formatted?: string,
|
||||
streetAddress?: string,
|
||||
@ -171,14 +185,15 @@ export class ContactAddress implements IContactAddress {
|
||||
country?: string) {
|
||||
this._objectInstance = new window.ContactAddress(pref, type, formatted, streetAddress, locality, region, postalCode, country);
|
||||
}
|
||||
@InstanceProperty get pref(): boolean {return; }
|
||||
@InstanceProperty get type(): string {return; }
|
||||
@InstanceProperty get formatted(): string {return; }
|
||||
@InstanceProperty get streetAddress(): string {return; }
|
||||
@InstanceProperty get locality(): string {return; }
|
||||
@InstanceProperty get region(): string {return; }
|
||||
@InstanceProperty get postalCode(): string {return; }
|
||||
@InstanceProperty get country(): string {return; }
|
||||
|
||||
@InstanceProperty get pref(): boolean { return; }
|
||||
@InstanceProperty get type(): string { return; }
|
||||
@InstanceProperty get formatted(): string { return; }
|
||||
@InstanceProperty get streetAddress(): string { return; }
|
||||
@InstanceProperty get locality(): string { return; }
|
||||
@InstanceProperty get region(): string { return; }
|
||||
@InstanceProperty get postalCode(): string { return; }
|
||||
@InstanceProperty get country(): string { return; }
|
||||
}
|
||||
|
||||
export interface IContactOrganization {
|
||||
@ -199,14 +214,14 @@ export interface IContactOrganization {
|
||||
*/
|
||||
export class ContactOrganization implements IContactOrganization {
|
||||
private _objectInstance: any;
|
||||
constructor () {
|
||||
constructor() {
|
||||
this._objectInstance = new window.ContactOrganization();
|
||||
}
|
||||
@InstanceProperty get pref(): boolean {return; }
|
||||
@InstanceProperty get type(): string {return; }
|
||||
@InstanceProperty get name(): string {return; }
|
||||
@InstanceProperty get department(): string {return; }
|
||||
@InstanceProperty get title(): string {return; }
|
||||
@InstanceProperty get pref(): boolean { return; }
|
||||
@InstanceProperty get type(): string { return; }
|
||||
@InstanceProperty get name(): string { return; }
|
||||
@InstanceProperty get department(): string { return; }
|
||||
@InstanceProperty get title(): string { return; }
|
||||
}
|
||||
|
||||
/** Search options to filter navigator.contacts. */
|
||||
@ -224,13 +239,15 @@ export interface IContactFindOptions {
|
||||
*/
|
||||
export class ContactFindOptions implements IContactFindOptions {
|
||||
private _objectInstance: any;
|
||||
constructor () {
|
||||
|
||||
constructor() {
|
||||
this._objectInstance = new window.ContactFindOptions();
|
||||
}
|
||||
@InstanceProperty get filter(): string {return; }
|
||||
@InstanceProperty get multiple(): boolean {return; }
|
||||
@InstanceProperty get desiredFields(): any {return; }
|
||||
@InstanceProperty get hasPhoneNumber(): boolean {return; }
|
||||
|
||||
@InstanceProperty get filter(): string { return; }
|
||||
@InstanceProperty get multiple(): boolean { return; }
|
||||
@InstanceProperty get desiredFields(): any { return; }
|
||||
@InstanceProperty get hasPhoneNumber(): boolean { return; }
|
||||
}
|
||||
|
||||
/**
|
||||
@ -264,6 +281,7 @@ export class Contacts {
|
||||
static create(): Contact {
|
||||
return new Contact();
|
||||
}
|
||||
|
||||
/**
|
||||
* Search for contacts in the Contacts list.
|
||||
* @param fields {string[]} Contact fields to be used as a search qualifier.
|
||||
@ -283,10 +301,11 @@ export class Contacts {
|
||||
errorIndex: 2
|
||||
})
|
||||
static find(fields: string[], options?: any): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Select a single Contact.
|
||||
* @return Returns a Promise that resolves with the selected Contact
|
||||
*/
|
||||
@Cordova()
|
||||
static pickContact(): Promise<any> {return; }
|
||||
static pickContact(): Promise<any> { return; }
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
export interface DatePickerOptions {
|
||||
/**
|
||||
|
@ -1,5 +1,7 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
|
||||
/**
|
||||
* @name DB Meter
|
||||
* @description This plugin defines a global DBMeter object, which permits to get the decibel values from the microphone.
|
||||
@ -45,27 +47,27 @@ export class DBMeter {
|
||||
observable: true,
|
||||
clearFunction: 'stop'
|
||||
})
|
||||
static start (): Observable<any> {return; }
|
||||
static start(): Observable<any> { return; }
|
||||
|
||||
/**
|
||||
* Stops listening
|
||||
* @private
|
||||
*/
|
||||
@Cordova()
|
||||
static stop (): Promise<any> {return; }
|
||||
static stop(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
@Cordova()
|
||||
static isListening(): Promise<boolean> {return; }
|
||||
static isListening(): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
@Cordova()
|
||||
static delete(): Promise<any> {return; }
|
||||
static delete(): Promise<any> { return; }
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
|
||||
export interface DeeplinkMatch {
|
||||
/**
|
||||
@ -52,7 +53,7 @@ export class Deeplinks {
|
||||
@Cordova({
|
||||
observable: true
|
||||
})
|
||||
static route(paths): Observable<DeeplinkMatch> {return; }
|
||||
static route(paths): Observable<DeeplinkMatch> { return; }
|
||||
|
||||
/**
|
||||
*
|
||||
@ -75,5 +76,5 @@ export class Deeplinks {
|
||||
@Cordova({
|
||||
observable: true
|
||||
})
|
||||
static routeWithNavController(navController, paths): Observable<DeeplinkMatch> {return; }
|
||||
static routeWithNavController(navController, paths): Observable<DeeplinkMatch> { return; }
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {Plugin, CordovaProperty} from './plugin';
|
||||
import { CordovaProperty, Plugin } from './plugin';
|
||||
|
||||
|
||||
declare var window: {
|
||||
device: Device
|
||||
|
@ -1,4 +1,6 @@
|
||||
import {Cordova, Plugin} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
@Plugin({
|
||||
plugin: 'https://github.com/loicknuchel/cordova-device-accounts.git',
|
||||
pluginRef: 'plugins.DeviceAccounts',
|
||||
@ -11,23 +13,23 @@ export class DeviceAccounts {
|
||||
* Gets all accounts registered on the Android Device
|
||||
*/
|
||||
@Cordova()
|
||||
static get(): Promise<any> {return; }
|
||||
static get(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Get all accounts registered on Android device for requested type
|
||||
*/
|
||||
@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)
|
||||
*/
|
||||
@Cordova()
|
||||
static getEmails(): Promise<any> {return; }
|
||||
static getEmails(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Get the first email registered on Android device
|
||||
*/
|
||||
@Cordova()
|
||||
static getEmail(): Promise<any> {return; }
|
||||
static getEmail(): Promise<any> { return; }
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
|
||||
export interface AccelerationData {
|
||||
|
||||
@ -73,9 +74,7 @@ export class DeviceMotion {
|
||||
* @returns {Promise<any>} Returns object with x, y, z, and timestamp properties
|
||||
*/
|
||||
@Cordova()
|
||||
static getCurrentAcceleration(): Promise<AccelerationData> {
|
||||
return;
|
||||
}
|
||||
static getCurrentAcceleration(): Promise<AccelerationData> { return; }
|
||||
|
||||
/**
|
||||
* Watch the device acceleration. Clear the watch by unsubscribing from the observable.
|
||||
@ -87,7 +86,5 @@ export class DeviceMotion {
|
||||
observable: true,
|
||||
clearFunction: 'clearWatch'
|
||||
})
|
||||
static watchAcceleration(options?: AccelerometerOptions): Observable<AccelerationData> {
|
||||
return;
|
||||
}
|
||||
static watchAcceleration(options?: AccelerometerOptions): Observable<AccelerationData> { return; }
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
|
||||
export interface CompassHeading {
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
@Plugin({
|
||||
plugin: 'cordova.plugins.diagnostic',
|
||||
@ -10,28 +11,28 @@ export class Diagnostic {
|
||||
* Checks if app is able to access device location.
|
||||
*/
|
||||
@Cordova()
|
||||
static isLocationEnabled(): Promise<any> {return; }
|
||||
static isLocationEnabled(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Checks if Wifi is connected/enabled. On iOS this returns true if the device is connected to a network by WiFi. On Android and Windows 10 Mobile this returns true if the WiFi setting is set to enabled.
|
||||
* On Android this requires permission. `<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />`
|
||||
*/
|
||||
@Cordova()
|
||||
static isWifiEnabled(): Promise<any> {return; }
|
||||
static isWifiEnabled(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Checks if the device has a camera. On Android this returns true if the device has a camera. On iOS this returns true if both the device has a camera AND the application is authorized to use it. On Windows 10 Mobile this returns true if both the device has a rear-facing camera AND the
|
||||
* application is authorized to use it.
|
||||
*/
|
||||
@Cordova()
|
||||
static isCameraEnabled(): Promise<any> {return; }
|
||||
static isCameraEnabled(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Checks if the device has Bluetooth capabilities and if so that Bluetooth is switched on (same on Android, iOS and Windows 10 Mobile)
|
||||
* On Android this requires permission <uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
*/
|
||||
@Cordova()
|
||||
static isBluetoothEnabled(): Promise<any> {return; }
|
||||
static isBluetoothEnabled(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Returns the location authorization status for the application.
|
||||
@ -40,27 +41,27 @@ export class Diagnostic {
|
||||
* mode - (iOS-only / optional) location authorization mode: "always" or "when_in_use". If not specified, defaults to "when_in_use".
|
||||
*/
|
||||
@Cordova()
|
||||
static requestLocationAuthorization(mode?: string): Promise<any> {return; }
|
||||
static requestLocationAuthorization(mode?: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Checks if the application is authorized to use location.
|
||||
* Note for Android: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return GRANTED status as permissions are already granted at installation time.
|
||||
*/
|
||||
@Cordova()
|
||||
static isLocationAuthorized(): Promise<any> {return; }
|
||||
static isLocationAuthorized(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Checks if camera hardware is present on device.
|
||||
*/
|
||||
@Cordova()
|
||||
static isCameraPresent(): Promise<any> {return; }
|
||||
static isCameraPresent(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Checks if the application is authorized to use the camera.
|
||||
* Note for Android: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return TRUE as permissions are already granted at installation time.
|
||||
*/
|
||||
@Cordova()
|
||||
static isCameraAuthorized(): Promise<any> {return; }
|
||||
static isCameraAuthorized(): Promise<any> { return; }
|
||||
/**
|
||||
* Checks if location mode is set to return high-accuracy locations from GPS hardware.
|
||||
* Returns true if Location mode is enabled and is set to either:
|
||||
@ -68,7 +69,7 @@ export class Diagnostic {
|
||||
* - High accuracy = GPS hardware, network triangulation and Wifi network IDs (high and low accuracy)
|
||||
*/
|
||||
@Cordova()
|
||||
static isGpsLocationEnabled(): Promise<any> {return; }
|
||||
static isGpsLocationEnabled(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Checks if location mode is set to return low-accuracy locations from network triangulation/WiFi access points.
|
||||
@ -77,7 +78,7 @@ export class Diagnostic {
|
||||
* - High accuracy = GPS hardware, network triangulation and Wifi network IDs (high and low accuracy)
|
||||
*/
|
||||
@Cordova()
|
||||
static isNetworkLocationEnabled(): Promise<any> {return; }
|
||||
static isNetworkLocationEnabled(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Checks if remote (push) notifications are enabled.
|
||||
@ -85,7 +86,7 @@ export class Diagnostic {
|
||||
* On iOS <=7, returns true if app is registered for remote notifications AND alert style is not set to "None" (i.e. "Banners" or "Alerts") - same as isRegisteredForRemoteNotifications().
|
||||
*/
|
||||
@Cordova()
|
||||
static isRemoteNotificationsEnabled(): Promise<any> {return; }
|
||||
static isRemoteNotificationsEnabled(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Indicates if the app is registered for remote (push) notifications on the device.
|
||||
@ -93,5 +94,5 @@ export class Diagnostic {
|
||||
* On iOS <=7, returns true if app is registered for remote notifications AND alert style is not set to "None" (i.e. "Banners" or "Alerts") - same as isRemoteNotificationsEnabled().
|
||||
*/
|
||||
@Cordova()
|
||||
static isRegisteredForRemoteNotifications(): Promise<any> {return; }
|
||||
static isRegisteredForRemoteNotifications(): Promise<any> { return; }
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
export interface PromptCallback {
|
||||
|
||||
@ -11,7 +12,6 @@ export interface PromptCallback {
|
||||
* The text entered in the prompt dialog box. (String)
|
||||
*/
|
||||
input1: string;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -53,7 +53,7 @@ export class Dialogs {
|
||||
message,
|
||||
title: string = 'Alert',
|
||||
buttonName: string = 'OK'
|
||||
): Promise<any> {return; }
|
||||
): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Displays a customizable confirmation dialog box.
|
||||
@ -99,6 +99,6 @@ export class Dialogs {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static beep(times: number): void {}
|
||||
static beep(times: number): void { }
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,8 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
declare var cordova: any;
|
||||
|
||||
/**
|
||||
* @name Email Composer
|
||||
* @description
|
||||
@ -53,7 +56,7 @@ export class EmailComposer {
|
||||
* @param app {string?} An optional app id or uri scheme.
|
||||
* @returns {Promise<boolean>} Resolves if available, rejects if not available
|
||||
*/
|
||||
static isAvailable (app?: string): Promise<any> {
|
||||
static isAvailable(app?: string): Promise<any> {
|
||||
return new Promise<boolean>((resolve, reject) => {
|
||||
if (app) cordova.plugins.email.isAvailable(app, (isAvailable) => { if (isAvailable) resolve(); else reject(); });
|
||||
else cordova.plugins.email.isAvailable((isAvailable) => { if (isAvailable) resolve(); else reject(); });
|
||||
@ -67,7 +70,7 @@ export class EmailComposer {
|
||||
* @param packageName {string} The package name
|
||||
*/
|
||||
@Cordova()
|
||||
static addAlias(alias: string, packageName: string): void {}
|
||||
static addAlias(alias: string, packageName: string): void { }
|
||||
|
||||
/**
|
||||
* Displays the email composer pre-filled with data.
|
||||
@ -80,9 +83,10 @@ export class EmailComposer {
|
||||
successIndex: 1,
|
||||
errorIndex: 3
|
||||
})
|
||||
static open(email: Email, scope?: any): Promise<any> {return; }
|
||||
static open(email: Email, scope?: any): Promise<any> { return; }
|
||||
|
||||
}
|
||||
|
||||
export interface Email {
|
||||
app?: string;
|
||||
to?: string | Array<string>;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
/**
|
||||
* @name Facebook
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
declare var window;
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {Plugin, CordovaInstance} from './plugin';
|
||||
import { CordovaInstance, Plugin } from './plugin';
|
||||
|
||||
|
||||
declare var FileTransfer;
|
||||
|
||||
@ -189,6 +190,6 @@ export class Transfer {
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
abort(): void {}
|
||||
abort(): void { }
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
/**
|
||||
* @name Flashlight
|
||||
@ -21,7 +22,6 @@ import {Plugin, Cordova} from './plugin';
|
||||
})
|
||||
export class Flashlight {
|
||||
|
||||
|
||||
/**
|
||||
* Checks if the flashlight is available
|
||||
* @returns {Promise<boolean>} Returns a promise that resolves with a boolean stating if the flashlight is available.
|
||||
|
@ -1,5 +1,6 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
|
||||
declare var navigator: any;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
/**
|
||||
* @name Globalization
|
||||
@ -23,14 +23,14 @@ export class Globalization {
|
||||
* @return {Promise<{value: string}>}
|
||||
*/
|
||||
@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.
|
||||
* @return {Promise<{value: string}>}
|
||||
*/
|
||||
@Cordova()
|
||||
static getLocaleName(): Promise<{value: string}> {return; }
|
||||
static getLocaleName(): Promise<{ value: string }> { return; }
|
||||
|
||||
/**
|
||||
* Converts date to string
|
||||
@ -40,9 +40,9 @@ export class Globalization {
|
||||
*/
|
||||
@Cordova({
|
||||
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; }
|
||||
|
||||
/**
|
||||
* Parses a date formatted as a string, according to the client's user preferences and calendar using the time zone of the client, and returns the corresponding date object.
|
||||
@ -54,8 +54,7 @@ export class Globalization {
|
||||
successIndex: 1,
|
||||
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; }
|
||||
|
||||
/**
|
||||
* Returns a pattern string to format and parse dates according to the client's user preferences.
|
||||
@ -65,8 +64,7 @@ export class Globalization {
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
static getDatePattern(options: {formatLength: string, selector: string}): Promise<{pattern: string}> {return; }
|
||||
|
||||
static getDatePattern(options: { formatLength: string, selector: string }): Promise<{ pattern: string }> { return; }
|
||||
|
||||
/**
|
||||
* Returns an array of the names of the months or days of the week, depending on the client's user preferences and calendar.
|
||||
@ -76,7 +74,7 @@ export class Globalization {
|
||||
@Cordova({
|
||||
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; }
|
||||
|
||||
/**
|
||||
* Indicates whether daylight savings time is in effect for a given date using the client's time zone and calendar.
|
||||
@ -84,14 +82,14 @@ export class Globalization {
|
||||
* @returns {Promise<dst>} reutrns a promise with the value
|
||||
*/
|
||||
@Cordova()
|
||||
static isDayLightSavingsTime(date: Date): Promise<{dst: string}> {return; }
|
||||
static isDayLightSavingsTime(date: Date): Promise<{ dst: string }> { return; }
|
||||
|
||||
/**
|
||||
* Returns the first day of the week according to the client's user preferences and calendar.
|
||||
* @returns {Promise<value>} reutrns a promise with the value
|
||||
*/
|
||||
@Cordova()
|
||||
static getFirstDayOfWeek(): Promise<{value: string}> {return; }
|
||||
static getFirstDayOfWeek(): Promise<{ value: string }> { return; }
|
||||
|
||||
/**
|
||||
* Returns a number formatted as a string according to the client's user preferences.
|
||||
@ -101,7 +99,7 @@ export class Globalization {
|
||||
successIndex: 1,
|
||||
errorIndex: 2
|
||||
})
|
||||
static numberToString(options: {type: string}): Promise<{value: string}> {return; }
|
||||
static numberToString(options: { type: string }): Promise<{ value: string }> { return; }
|
||||
|
||||
/**
|
||||
*
|
||||
@ -113,7 +111,7 @@ export class Globalization {
|
||||
successIndex: 1,
|
||||
errorIndex: 2
|
||||
})
|
||||
static stringToNumber(stringToConvert: string, options: {type: string}): Promise<{value: number|string}> {return; }
|
||||
static stringToNumber(stringToConvert: string, options: { type: string }): Promise<{ value: number | string }> { return; }
|
||||
|
||||
/**
|
||||
* Returns a pattern string to format and parse numbers according to the client's user preferences.
|
||||
@ -123,7 +121,7 @@ export class Globalization {
|
||||
@Cordova({
|
||||
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; }
|
||||
|
||||
/**
|
||||
* Returns a pattern string to format and parse currency values according to the client's user preferences and ISO 4217 currency code.
|
||||
@ -131,6 +129,6 @@ export class Globalization {
|
||||
* @returns {Promise} returns a promise with the value
|
||||
*/
|
||||
@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; }
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
/**
|
||||
* @name Google Plus
|
||||
@ -22,25 +23,25 @@ export class GooglePlus {
|
||||
* @param options
|
||||
*/
|
||||
@Cordova()
|
||||
static login(options?: any): Promise<any> {return; }
|
||||
static login(options?: any): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* You can call trySilentLogin to check if they're already signed in to the app and sign them in silently if they are.
|
||||
* @param options
|
||||
*/
|
||||
@Cordova()
|
||||
static trySilentLogin(options?: any): Promise<any> {return; }
|
||||
static trySilentLogin(options?: any): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* This will clear the OAuth2 token.
|
||||
*/
|
||||
@Cordova()
|
||||
static logout(): Promise<any> {return; }
|
||||
static logout(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* This will clear the OAuth2 token, forget which account was used to login, and disconnect that account from the app. This will require the user to allow the app access again next time they sign in. Be aware that this effect is not always instantaneous. It can take time to completely disconnect.
|
||||
*/
|
||||
@Cordova()
|
||||
static disconnect(): Promise<any> {return; }
|
||||
static disconnect(): Promise<any> { return; }
|
||||
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
declare var window;
|
||||
|
||||
|
@ -1,10 +1,13 @@
|
||||
import { Cordova, CordovaInstance, Plugin } from './plugin';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
* Created by Ibrahim on 3/29/2016.
|
||||
*/
|
||||
declare var plugin: any;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* You can listen to these events where appropriate
|
||||
@ -944,7 +947,7 @@ export class GoogleMapsKmlOverlay {
|
||||
export class GoogleMapsLatLngBounds {
|
||||
private _objectInstance: any;
|
||||
|
||||
constructor(public southwestOrArrayOfLatLng: GoogleMapsLatLng|GoogleMapsLatLng[], public northeast?: GoogleMapsLatLng) {
|
||||
constructor(public southwestOrArrayOfLatLng: GoogleMapsLatLng | GoogleMapsLatLng[], public northeast?: GoogleMapsLatLng) {
|
||||
let args = !!northeast ? [southwestOrArrayOfLatLng, northeast] : southwestOrArrayOfLatLng;
|
||||
this._objectInstance = new plugin.google.maps.LatLngBounds(args);
|
||||
}
|
||||
@ -1004,13 +1007,13 @@ export class GoogleMapsLatLng {
|
||||
*/
|
||||
export interface GeocoderRequest {
|
||||
address?: string;
|
||||
position?: {lat: number; lng: number};
|
||||
position?: { lat: number; lng: number };
|
||||
}
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export interface GeocoderResult {
|
||||
position?: {lat: number; lng: number};
|
||||
position?: { lat: number; lng: number };
|
||||
subThoroughfare?: string;
|
||||
thoroughfare?: string;
|
||||
locality?: string;
|
||||
@ -1029,7 +1032,7 @@ export class Geocoder {
|
||||
*/
|
||||
static geocode(request: GeocoderRequest): Promise<GeocoderResult[]> {
|
||||
return new Promise<GeocoderResult[]>((resolve, reject) => {
|
||||
if (!plugin || !plugin.google || !plugin.google.maps || !plugin.google.maps.Geocoder) reject({error: 'plugin_not_installed'});
|
||||
if (!plugin || !plugin.google || !plugin.google.maps || !plugin.google.maps.Geocoder) reject({ error: 'plugin_not_installed' });
|
||||
else plugin.google.maps.Geocoder.geocode(request, resolve);
|
||||
});
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
/**
|
||||
* @name Hotspot
|
||||
@ -24,10 +24,10 @@ import {Plugin, Cordova} from './plugin';
|
||||
export class Hotspot {
|
||||
|
||||
@Cordova()
|
||||
static isAvailable(): Promise<boolean> {return; }
|
||||
static isAvailable(): Promise<boolean> { return; }
|
||||
|
||||
@Cordova()
|
||||
static toggleWifi(): Promise<boolean> {return; }
|
||||
static toggleWifi(): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* Configures and starts hotspot with SSID and Password
|
||||
@ -39,7 +39,7 @@ export class Hotspot {
|
||||
* @return {Promise<void>} - Promise to call once hotspot is started, or reject upon failure
|
||||
*/
|
||||
@Cordova()
|
||||
static createHotspot(ssid: string, mode: string, password: string): Promise<void> {return; }
|
||||
static createHotspot(ssid: string, mode: string, password: string): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Turns on Access Point
|
||||
@ -47,7 +47,7 @@ export class Hotspot {
|
||||
* @return {Promise<boolean>} - true if AP is started
|
||||
*/
|
||||
@Cordova()
|
||||
static startHotspot(): Promise<boolean> {return; }
|
||||
static startHotspot(): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* Configures hotspot with SSID and Password
|
||||
@ -59,7 +59,7 @@ export class Hotspot {
|
||||
* @return {Promise<void>} - Promise to call when hotspot is configured, or reject upon failure
|
||||
*/
|
||||
@Cordova()
|
||||
static configureHotspot(ssid: string, mode: string, password: string): Promise<void> {return; }
|
||||
static configureHotspot(ssid: string, mode: string, password: string): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Turns off Access Point
|
||||
@ -67,7 +67,7 @@ export class Hotspot {
|
||||
* @return {Promise<boolean>} - Promise to turn off the hotspot, true on success, false on failure
|
||||
*/
|
||||
@Cordova()
|
||||
static stopHotspot(): Promise<boolean> {return; }
|
||||
static stopHotspot(): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* Checks if hotspot is enabled
|
||||
@ -75,10 +75,10 @@ export class Hotspot {
|
||||
* @return {Promise<void>} - Promise that hotspot is enabled, rejected if it is not enabled
|
||||
*/
|
||||
@Cordova()
|
||||
static isHotspotEnabled(): Promise<void> {return; }
|
||||
static isHotspotEnabled(): Promise<void> { return; }
|
||||
|
||||
@Cordova()
|
||||
static getAllHotspotDevices(): Promise<Array<HotspotDevice>> {return; }
|
||||
static getAllHotspotDevices(): Promise<Array<HotspotDevice>> { return; }
|
||||
|
||||
/**
|
||||
* Connect to a WiFi network
|
||||
@ -92,7 +92,7 @@ export class Hotspot {
|
||||
* Promise that connection to the WiFi network was successfull, rejected if unsuccessful
|
||||
*/
|
||||
@Cordova()
|
||||
static connectToWifi(ssid: string, password: string): Promise<void> {return; }
|
||||
static connectToWifi(ssid: string, password: string): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Connect to a WiFi network
|
||||
@ -110,7 +110,7 @@ export class Hotspot {
|
||||
* Promise that connection to the WiFi network was successfull, rejected if unsuccessful
|
||||
*/
|
||||
@Cordova()
|
||||
static connectToWifiAuthEncrypt(ssid: string, password: string, authentication: string, encryption: Array<string>): Promise<void> {return; }
|
||||
static connectToWifiAuthEncrypt(ssid: string, password: string, authentication: string, encryption: Array<string>): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Add a WiFi network
|
||||
@ -126,7 +126,7 @@ export class Hotspot {
|
||||
* Promise that adding the WiFi network was successfull, rejected if unsuccessful
|
||||
*/
|
||||
@Cordova()
|
||||
static addWifiNetwork(ssid: string, mode: string, password: string): Promise<void> {return; }
|
||||
static addWifiNetwork(ssid: string, mode: string, password: string): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Remove a WiFi network
|
||||
@ -138,43 +138,43 @@ export class Hotspot {
|
||||
* Promise that removing the WiFi network was successfull, rejected if unsuccessful
|
||||
*/
|
||||
@Cordova()
|
||||
static removeWifiNetwork(ssid: string): Promise<void> {return; }
|
||||
static removeWifiNetwork(ssid: string): Promise<void> { return; }
|
||||
|
||||
@Cordova()
|
||||
static isConnectedToInternet(): Promise<boolean> {return; }
|
||||
static isConnectedToInternet(): Promise<boolean> { return; }
|
||||
|
||||
@Cordova()
|
||||
static isConnectedToInternetViaWifi(): Promise<boolean> {return; }
|
||||
static isConnectedToInternetViaWifi(): Promise<boolean> { return; }
|
||||
|
||||
@Cordova()
|
||||
static isWifiOn(): Promise<boolean> {return; }
|
||||
static isWifiOn(): Promise<boolean> { return; }
|
||||
|
||||
@Cordova()
|
||||
static isWifiSupported(): Promise<boolean> {return; }
|
||||
static isWifiSupported(): Promise<boolean> { return; }
|
||||
|
||||
@Cordova()
|
||||
static isWifiDirectSupported(): Promise<boolean> {return; }
|
||||
static isWifiDirectSupported(): Promise<boolean> { return; }
|
||||
|
||||
@Cordova()
|
||||
static scanWifi(): Promise<Array<Network>> {return; }
|
||||
static scanWifi(): Promise<Array<Network>> { return; }
|
||||
|
||||
@Cordova()
|
||||
static scanWifiByLevel(): Promise<Array<Network>> {return; }
|
||||
static scanWifiByLevel(): Promise<Array<Network>> { return; }
|
||||
|
||||
@Cordova()
|
||||
static startWifiPeriodicallyScan(interval: number, duration: number): Promise<any> {return; }
|
||||
static startWifiPeriodicallyScan(interval: number, duration: number): Promise<any> { return; }
|
||||
|
||||
@Cordova()
|
||||
static stopWifiPeriodicallyScan(): Promise<any> {return; }
|
||||
static stopWifiPeriodicallyScan(): Promise<any> { return; }
|
||||
|
||||
@Cordova()
|
||||
static getNetConfig(): Promise<NetworkConfig> {return; }
|
||||
static getNetConfig(): Promise<NetworkConfig> { return; }
|
||||
|
||||
@Cordova()
|
||||
static getConnectionInfo(): Promise<ConnectionInfo> {return; }
|
||||
static getConnectionInfo(): Promise<ConnectionInfo> { return; }
|
||||
|
||||
@Cordova()
|
||||
static pingHost(ip: string): Promise<string> {return; }
|
||||
static pingHost(ip: string): Promise<string> { return; }
|
||||
|
||||
/**
|
||||
* Gets MAC Address associated with IP Address from ARP File
|
||||
@ -184,7 +184,7 @@ export class Hotspot {
|
||||
* @return {Promise<string>} - A Promise for the MAC Address
|
||||
*/
|
||||
@Cordova()
|
||||
static getMacAddressOfHost(ip: string): Promise<string> {return; }
|
||||
static getMacAddressOfHost(ip: string): Promise<string> { return; }
|
||||
|
||||
/**
|
||||
* Checks if IP is live using DNS
|
||||
@ -194,7 +194,7 @@ export class Hotspot {
|
||||
* @return {Promise<boolean>} - A Promise for whether the IP Address is reachable
|
||||
*/
|
||||
@Cordova()
|
||||
static isDnsLive(ip: string): Promise<boolean> {return; }
|
||||
static isDnsLive(ip: string): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* Checks if IP is live using socket And PORT
|
||||
@ -204,7 +204,7 @@ export class Hotspot {
|
||||
* @return {Promise<boolean>} - A Promise for whether the IP Address is reachable
|
||||
*/
|
||||
@Cordova()
|
||||
static isPortLive(ip: string): Promise<boolean> {return; }
|
||||
static isPortLive(ip: string): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* Checks if device is rooted
|
||||
@ -212,7 +212,7 @@ export class Hotspot {
|
||||
* @return {Promise<boolean>} - A Promise for whether the device is rooted
|
||||
*/
|
||||
@Cordova()
|
||||
static isRooted(): Promise<boolean> {return; }
|
||||
static isRooted(): Promise<boolean> { return; }
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
|
||||
/**
|
||||
* @name Httpd
|
||||
* @description
|
||||
@ -23,22 +25,24 @@ export class Httpd {
|
||||
observable: true,
|
||||
clearFunction: 'stopServer'
|
||||
})
|
||||
static startServer(options: any): Observable<string> {return; }
|
||||
static startServer(options: any): Observable<string> { return; }
|
||||
|
||||
/**
|
||||
* Gets the URL of the running server
|
||||
* @returns {Promise<string>} Returns a promise that resolves with the URL of the web server.
|
||||
*/
|
||||
@Cordova()
|
||||
static getUrl(): Promise<string> {return; }
|
||||
static getUrl(): Promise<string> { return; }
|
||||
|
||||
/**
|
||||
* Get the local path of the running webserver
|
||||
* @returns {Promise<string>} Returns a promise that resolves with the local path of the web server.
|
||||
*/
|
||||
@Cordova()
|
||||
static getLocalPath(): Promise<string> {return; }
|
||||
static getLocalPath(): Promise<string> { return; }
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* These options are used for the Httpd.startServer() function.
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
|
||||
declare var cordova: any;
|
||||
|
||||
@ -47,6 +48,7 @@ export interface Beacon {
|
||||
accuracy: number;
|
||||
|
||||
}
|
||||
|
||||
export interface BeaconRegion {
|
||||
/**
|
||||
* A unique identifier for this region.
|
||||
@ -76,6 +78,7 @@ export interface BeaconRegion {
|
||||
*/
|
||||
notifyEntryStateOnDisplay?: boolean;
|
||||
}
|
||||
|
||||
export interface CircularRegion {
|
||||
/**
|
||||
* A unique identifier for this region.
|
||||
@ -97,6 +100,7 @@ export interface CircularRegion {
|
||||
*/
|
||||
radius: number;
|
||||
}
|
||||
|
||||
export type Region = BeaconRegion | CircularRegion;
|
||||
|
||||
export interface PluginResult {
|
||||
@ -131,6 +135,7 @@ export interface PluginResult {
|
||||
*/
|
||||
error: string;
|
||||
}
|
||||
|
||||
export interface Delegate {
|
||||
/**
|
||||
* An observable that publishes information about the location permission authorization status.
|
||||
@ -270,7 +275,6 @@ export interface Delegate {
|
||||
})
|
||||
export class IBeacon {
|
||||
|
||||
|
||||
/**
|
||||
* Instances of this class are delegates between the {@link LocationManager} and
|
||||
* the code that consumes the messages generated on in the native layer.
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
export interface ImagePickerOptions {
|
||||
// max images to be selected, defaults to 15. If this is set to 1, upon
|
||||
@ -55,4 +56,5 @@ export class ImagePicker {
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
static getPictures(options: ImagePickerOptions): Promise<any> { return; }
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
export interface InAppBrowserEvent extends Event {
|
||||
/** the eventname, either loadstart, loadstop, loaderror, or exit. */
|
||||
@ -54,14 +55,14 @@ export interface InAppBrowserRef {
|
||||
* For multi-line scripts, this is the return value of the last statement,
|
||||
* or the last expression evaluated.
|
||||
*/
|
||||
executeScript(script: {file?: string, code?: string}, callback?: (result?: any) => void);
|
||||
executeScript(script: { file?: string, code?: string }, callback?: (result?: any) => void);
|
||||
|
||||
/**
|
||||
* Injects CSS into the InAppBrowser window.
|
||||
* @param css Details of the script to run, specifying either a file or code key.
|
||||
* @param callback The function that executes after the CSS is injected.
|
||||
*/
|
||||
insertCSS(css: {file?: string, code?: string}, callback?: () => void);
|
||||
insertCSS(css: { file?: string, code?: string }, callback?: () => void);
|
||||
}
|
||||
|
||||
@Plugin({
|
||||
@ -82,4 +83,5 @@ export class InAppBrowser {
|
||||
sync: true
|
||||
})
|
||||
static open(url: string, target?: string, options?: string): InAppBrowserRef { return; }
|
||||
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
/**
|
||||
* @name Insomnia
|
||||
@ -44,4 +45,5 @@ export class Insomnia {
|
||||
*/
|
||||
@Cordova()
|
||||
static allowSleepAgain(): Promise<any> { return; }
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
import {Cordova, Plugin} from './plugin';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
|
||||
/**
|
||||
* @name Keyboard
|
||||
@ -34,7 +35,7 @@ export class Keyboard {
|
||||
sync: true,
|
||||
platforms: ['Android', 'BlackBerry 10', 'Windows']
|
||||
})
|
||||
static show(): void {}
|
||||
static show(): void { }
|
||||
|
||||
/**
|
||||
* Close the keyboard if open.
|
||||
@ -43,7 +44,7 @@ export class Keyboard {
|
||||
sync: true,
|
||||
platforms: ['iOS', 'Android', 'BlackBerry 10', 'Windows']
|
||||
})
|
||||
static close(): void {}
|
||||
static close(): void { }
|
||||
|
||||
/**
|
||||
* Prevents the native UIScrollView from moving when an input is focused.
|
||||
@ -53,7 +54,7 @@ export class Keyboard {
|
||||
sync: true,
|
||||
platforms: ['iOS', 'Windows']
|
||||
})
|
||||
static disableScroll(disable: boolean): void {}
|
||||
static disableScroll(disable: boolean): void { }
|
||||
|
||||
/**
|
||||
* Creates an observable that notifies you when the keyboard is shown. Unsubscribe to observable to cancel event watch.
|
||||
@ -63,7 +64,7 @@ export class Keyboard {
|
||||
event: 'native.keyboardshow',
|
||||
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.
|
||||
@ -73,6 +74,6 @@ export class Keyboard {
|
||||
event: 'native.keyboardhide',
|
||||
platforms: ['iOS', 'Android', 'BlackBerry 10', 'Windows']
|
||||
})
|
||||
static onKeyboardHide(): Observable<any> {return; }
|
||||
static onKeyboardHide(): Observable<any> { return; }
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
export interface LaunchNavigatorOptions {
|
||||
|
||||
@ -15,7 +16,7 @@ export interface LaunchNavigatorOptions {
|
||||
/**
|
||||
* Start point of the navigation
|
||||
*/
|
||||
start?: string|number[];
|
||||
start?: string | number[];
|
||||
|
||||
/**
|
||||
* nickname to display in app for start . e.g. "My House".
|
||||
@ -98,7 +99,7 @@ export class LaunchNavigator {
|
||||
errorIndex: 2
|
||||
})
|
||||
static navigate(
|
||||
destination: string|number[],
|
||||
destination: string | number[],
|
||||
options?: LaunchNavigatorOptions
|
||||
): Promise<any> { return; }
|
||||
|
||||
@ -107,43 +108,43 @@ export class LaunchNavigator {
|
||||
* @param app {string}
|
||||
*/
|
||||
@Cordova()
|
||||
static isAppAvailable(app: string): Promise<any> {return; }
|
||||
static isAppAvailable(app: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Returns a list indicating which apps are installed and available on the current device.
|
||||
*/
|
||||
@Cordova()
|
||||
static availableApps(): Promise<string[]> {return; }
|
||||
static availableApps(): Promise<string[]> { return; }
|
||||
|
||||
/**
|
||||
* Returns the display name of the specified app.
|
||||
* @param app {string}
|
||||
*/
|
||||
@Cordova({sync: true})
|
||||
static getAppDisplayName(app: string): string {return; }
|
||||
@Cordova({ sync: true })
|
||||
static getAppDisplayName(app: string): string { return; }
|
||||
|
||||
/**
|
||||
* Returns list of supported apps on a given platform.
|
||||
* @param platform {string}
|
||||
*/
|
||||
@Cordova({sync: true})
|
||||
static getAppsForPlatform(platform: string): string[] {return; }
|
||||
@Cordova({ sync: true })
|
||||
static getAppsForPlatform(platform: string): string[] { return; }
|
||||
|
||||
/**
|
||||
* Indicates if an app on a given platform supports specification of transport mode.
|
||||
* @param app {string} specified as a string, you can use one of the constants, e.g `LaunchNavigator.APP.GOOGLE_MAPS`
|
||||
* @param platform {string}
|
||||
*/
|
||||
@Cordova({sync: true})
|
||||
static supportsTransportMode(app: string, platform: string): boolean {return; }
|
||||
@Cordova({ sync: true })
|
||||
static supportsTransportMode(app: string, platform: string): boolean { return; }
|
||||
|
||||
/**
|
||||
* Returns the list of transport modes supported by an app on a given platform.
|
||||
* @param app {string}
|
||||
* @param platform {string}
|
||||
*/
|
||||
@Cordova({sync: true})
|
||||
static getTransportModes(app: string, platform: string): string[] {return; }
|
||||
@Cordova({ sync: true })
|
||||
static getTransportModes(app: string, platform: string): string[] { return; }
|
||||
|
||||
/**
|
||||
* Indicates if an app on a given platform supports specification of launch mode.
|
||||
@ -151,25 +152,25 @@ export class LaunchNavigator {
|
||||
* @param app {string}
|
||||
* @param platform {string}
|
||||
*/
|
||||
@Cordova({sync: true})
|
||||
static supportsLaunchMode(app: string, platform: string): boolean {return; }
|
||||
@Cordova({ sync: true })
|
||||
static supportsLaunchMode(app: string, platform: string): boolean { return; }
|
||||
|
||||
/**
|
||||
* Indicates if an app on a given platform supports specification of start location.
|
||||
* @param app {string}
|
||||
* @param platform {string}
|
||||
*/
|
||||
@Cordova({sync: true})
|
||||
static supportsStart(app: string, platform: string): boolean {return; }
|
||||
@Cordova({ sync: true })
|
||||
static supportsStart(app: string, platform: string): boolean { return; }
|
||||
|
||||
@Cordova({sync: true})
|
||||
static supportsStartName(app: string, platform: string): boolean {return; }
|
||||
@Cordova({ sync: true })
|
||||
static supportsStartName(app: string, platform: string): boolean { return; }
|
||||
|
||||
@Cordova({sync: true})
|
||||
static supportsDestName(app: string, platform: string): boolean {return; }
|
||||
@Cordova({ sync: true })
|
||||
static supportsDestName(app: string, platform: string): boolean { return; }
|
||||
|
||||
@Cordova({sync: true})
|
||||
static userSelect(destination: string|number[], options: LaunchNavigatorOptions): void { }
|
||||
@Cordova({ sync: true })
|
||||
static userSelect(destination: string | number[], options: LaunchNavigatorOptions): void { }
|
||||
|
||||
static APP: any = {
|
||||
USER_SELECT: 'user_select',
|
||||
|
@ -1,4 +1,6 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
/**
|
||||
* @name Local Notifications
|
||||
* @description
|
||||
@ -57,7 +59,7 @@ export class LocalNotifications {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static schedule(options?: Notification|Array<Notification>): void {}
|
||||
static schedule(options?: Notification | Array<Notification>): void { }
|
||||
|
||||
/**
|
||||
* Updates a previously scheduled notification. Must include the id in the options parameter.
|
||||
@ -66,14 +68,14 @@ export class LocalNotifications {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static update(options?: Notification): void {}
|
||||
static update(options?: Notification): void { }
|
||||
|
||||
/**
|
||||
* Clears single or multiple notifications
|
||||
* @param notificationId A single notification id, or an array of notification ids.
|
||||
*/
|
||||
@Cordova()
|
||||
static clear(notificationId: any): Promise<any> {return; }
|
||||
static clear(notificationId: any): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Clears all notifications
|
||||
@ -82,14 +84,14 @@ export class LocalNotifications {
|
||||
successIndex: 0,
|
||||
errorIndex: 2
|
||||
})
|
||||
static clearAll(): Promise<any> {return; }
|
||||
static clearAll(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Cancels single or multiple notifications
|
||||
* @param notificationId A single notification id, or an array of notification ids.
|
||||
*/
|
||||
@Cordova()
|
||||
static cancel(notificationId: any): Promise<any> {return; }
|
||||
static cancel(notificationId: any): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Cancels all notifications
|
||||
@ -98,85 +100,85 @@ export class LocalNotifications {
|
||||
successIndex: 0,
|
||||
errorIndex: 2
|
||||
})
|
||||
static cancelAll(): Promise<any> {return; }
|
||||
static cancelAll(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Checks presence of a notification
|
||||
* @param notificationId
|
||||
*/
|
||||
@Cordova()
|
||||
static isPresent (notificationId: number): Promise<boolean> {return; }
|
||||
static isPresent(notificationId: number): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* Checks is a notification is scheduled
|
||||
* @param notificationId
|
||||
*/
|
||||
@Cordova()
|
||||
static isScheduled (notificationId: number): Promise<boolean> {return; }
|
||||
static isScheduled(notificationId: number): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* Checks if a notification is triggered
|
||||
* @param notificationId
|
||||
*/
|
||||
@Cordova()
|
||||
static isTriggered (notificationId: number): Promise<boolean> {return; }
|
||||
static isTriggered(notificationId: number): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* Get all the notification ids
|
||||
*/
|
||||
@Cordova()
|
||||
static getAllIds (): Promise<Array<number>> {return; }
|
||||
static getAllIds(): Promise<Array<number>> { return; }
|
||||
|
||||
/**
|
||||
* Get the ids of triggered notifications
|
||||
*/
|
||||
@Cordova()
|
||||
static getTriggeredIds (): Promise<Array<number>> {return; }
|
||||
static getTriggeredIds(): Promise<Array<number>> { return; }
|
||||
|
||||
/**
|
||||
* Get the ids of scheduled notifications
|
||||
*/
|
||||
@Cordova()
|
||||
static getScheduledIds (): Promise<Array<number>> {return; }
|
||||
static getScheduledIds(): Promise<Array<number>> { return; }
|
||||
|
||||
/**
|
||||
* Get a notification object
|
||||
* @param notificationId The id of the notification to get
|
||||
*/
|
||||
@Cordova()
|
||||
static get (notificationId: any): Promise <Notification> {return; }
|
||||
static get(notificationId: any): Promise<Notification> { return; }
|
||||
|
||||
/**
|
||||
* Get a scheduled notification object
|
||||
* @param notificationId The id of the notification to get
|
||||
*/
|
||||
@Cordova()
|
||||
static getScheduled (notificationId: any): Promise <Notification> {return; }
|
||||
static getScheduled(notificationId: any): Promise<Notification> { return; }
|
||||
|
||||
/**
|
||||
* Get a triggered notification object
|
||||
* @param notificationId The id of the notification to get
|
||||
*/
|
||||
@Cordova()
|
||||
static getTriggered (notificationId: any): Promise <Notification> {return; }
|
||||
static getTriggered(notificationId: any): Promise<Notification> { return; }
|
||||
|
||||
/**
|
||||
* Get all notification objects
|
||||
*/
|
||||
@Cordova()
|
||||
static getAll(): Promise<Array<Notification>> {return; }
|
||||
static getAll(): Promise<Array<Notification>> { return; }
|
||||
|
||||
/**
|
||||
* Get all scheduled notification objects
|
||||
*/
|
||||
@Cordova()
|
||||
static getAllScheduled(): Promise<Array<Notification>> {return; }
|
||||
static getAllScheduled(): Promise<Array<Notification>> { return; }
|
||||
|
||||
/**
|
||||
* Get all triggered notification objects
|
||||
*/
|
||||
@Cordova()
|
||||
static getAllTriggered(): Promise<Array<Notification>> {return; }
|
||||
static getAllTriggered(): Promise<Array<Notification>> { return; }
|
||||
|
||||
|
||||
/**
|
||||
@ -187,7 +189,7 @@ export class LocalNotifications {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static on(eventName: string, callback: any): void {}
|
||||
static on(eventName: string, callback: any): void { }
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,9 @@
|
||||
import {Plugin, Cordova, CordovaProperty} from './plugin';
|
||||
import {Observable} from 'rxjs/Rx';
|
||||
import { Cordova, CordovaProperty, Plugin } from './plugin';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
|
||||
|
||||
declare var navigator: any;
|
||||
|
||||
/**
|
||||
* @name Media Capture
|
||||
* @description
|
||||
@ -59,7 +62,7 @@ export class MediaCapture {
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
static captureAudio(options?: CaptureAudioOptions): Promise<MediaFile[]|CaptureError> {return; }
|
||||
static captureAudio(options?: CaptureAudioOptions): Promise<MediaFile[] | CaptureError> { return; }
|
||||
|
||||
/**
|
||||
* Start the camera application and return information about captured image files.
|
||||
@ -68,7 +71,7 @@ export class MediaCapture {
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
static captureImage(options?: CaptureImageOptions): Promise<MediaFile[]|CaptureError> {return; }
|
||||
static captureImage(options?: CaptureImageOptions): Promise<MediaFile[] | CaptureError> { return; }
|
||||
|
||||
/**
|
||||
* Start the video recorder application and return information about captured video clip files.
|
||||
@ -77,7 +80,7 @@ export class MediaCapture {
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
static captureVideo(options?: CaptureVideoOptions): Promise<MediaFile[]|CaptureError> {return; }
|
||||
static captureVideo(options?: CaptureVideoOptions): Promise<MediaFile[] | CaptureError> { return; }
|
||||
|
||||
/**
|
||||
* is fired if the capture call is successful
|
||||
@ -86,7 +89,7 @@ export class MediaCapture {
|
||||
eventObservable: true,
|
||||
event: 'pendingcaptureresult'
|
||||
})
|
||||
static onPendingCaptureResult(): Observable<MediaFile[]> {return; }
|
||||
static onPendingCaptureResult(): Observable<MediaFile[]> { return; }
|
||||
|
||||
/**
|
||||
* is fired if the capture call is unsuccessful
|
||||
@ -95,7 +98,7 @@ export class MediaCapture {
|
||||
eventObservable: true,
|
||||
event: 'pendingcaptureerror'
|
||||
})
|
||||
static onPendingCaptureError(): Observable<CaptureError> {return; }
|
||||
static onPendingCaptureError(): Observable<CaptureError> { return; }
|
||||
|
||||
}
|
||||
/**
|
||||
|
@ -1,6 +1,9 @@
|
||||
import {CordovaInstance, Plugin} from './plugin';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import { CordovaInstance, Plugin } from './plugin';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
|
||||
declare var Media: any;
|
||||
|
||||
/**
|
||||
* @name MediaPlugin
|
||||
* @description
|
||||
@ -85,9 +88,9 @@ export class MediaPlugin {
|
||||
* Open a media file
|
||||
* @param src {string} A URI containing the audio content.
|
||||
*/
|
||||
constructor (src: string) {
|
||||
constructor(src: string) {
|
||||
let res, rej, next;
|
||||
this.init = new Promise<any>((resolve, reject) => {res = resolve; rej = reject; });
|
||||
this.init = new Promise<any>((resolve, reject) => { res = resolve; rej = reject; });
|
||||
this.status = new Observable((observer) => {
|
||||
next = data => observer.next(data);
|
||||
});
|
||||
@ -98,13 +101,13 @@ export class MediaPlugin {
|
||||
* Returns the current amplitude of the current recording.
|
||||
*/
|
||||
@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.
|
||||
*/
|
||||
@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.
|
||||
@ -112,7 +115,7 @@ export class MediaPlugin {
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
getDuration (): number {return; }
|
||||
getDuration(): number { return; }
|
||||
|
||||
/**
|
||||
* Starts or resumes playing an audio file.
|
||||
@ -120,10 +123,10 @@ export class MediaPlugin {
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
play (iosOptions?: {
|
||||
play(iosOptions?: {
|
||||
numberOfLoops?: number,
|
||||
playAudioWhenScreenIsLocked?: boolean
|
||||
}): void {}
|
||||
}): void { }
|
||||
|
||||
/**
|
||||
* Pauses playing an audio file.
|
||||
@ -131,7 +134,7 @@ export class MediaPlugin {
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
pause (): void {}
|
||||
pause(): void { }
|
||||
|
||||
/**
|
||||
* Releases the underlying operating system's audio resources. This is particularly important for Android, since there are a finite amount of OpenCore instances for media playback. Applications should call the release function for any Media resource that is no longer needed.
|
||||
@ -139,7 +142,7 @@ export class MediaPlugin {
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
release (): void {}
|
||||
release(): void { }
|
||||
|
||||
/**
|
||||
* Sets the current position within an audio file.
|
||||
@ -148,7 +151,7 @@ export class MediaPlugin {
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
seekTo (milliseconds: number): void {}
|
||||
seekTo(milliseconds: number): void { }
|
||||
|
||||
/**
|
||||
* Set the volume for an audio file.
|
||||
@ -157,7 +160,7 @@ export class MediaPlugin {
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
setVolume (volume: number): void {}
|
||||
setVolume(volume: number): void { }
|
||||
|
||||
/**
|
||||
* Starts recording an audio file.
|
||||
@ -165,7 +168,7 @@ export class MediaPlugin {
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
startRecord (): void {}
|
||||
startRecord(): void { }
|
||||
|
||||
|
||||
/**
|
||||
@ -174,7 +177,7 @@ export class MediaPlugin {
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
stopRecord (): void {}
|
||||
stopRecord(): void { }
|
||||
|
||||
|
||||
/**
|
||||
@ -183,17 +186,15 @@ export class MediaPlugin {
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
stop (): void {}
|
||||
|
||||
|
||||
stop(): void { }
|
||||
|
||||
}
|
||||
|
||||
export class MediaError {
|
||||
static get MEDIA_ERR_ABORTED () {return 1; }
|
||||
static get MEDIA_ERR_NETWORK () {return 2; }
|
||||
static get MEDIA_ERR_DECODE () {return 3; }
|
||||
static get MEDIA_ERR_NONE_SUPPORTED () {return 4; }
|
||||
static get MEDIA_ERR_ABORTED() { return 1; }
|
||||
static get MEDIA_ERR_NETWORK() { return 2; }
|
||||
static get MEDIA_ERR_DECODE() { return 3; }
|
||||
static get MEDIA_ERR_NONE_SUPPORTED() { return 4; }
|
||||
code: number;
|
||||
message: string;
|
||||
}
|
@ -1,4 +1,6 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
/**
|
||||
* @name Native Storage
|
||||
* @description
|
||||
@ -53,4 +55,5 @@ export class NativeStorage {
|
||||
*/
|
||||
@Cordova()
|
||||
static clear(): Promise<any> {return; }
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
import {Plugin, Cordova, CordovaProperty} from './plugin';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import { Cordova, CordovaProperty, Plugin } from './plugin';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
|
||||
declare var navigator: any;
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
/**
|
||||
* @name OneSignal
|
||||
@ -250,4 +251,5 @@ export class OneSignal {
|
||||
logLevel: number,
|
||||
visualLevel: number
|
||||
}): void { }
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,6 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
/**
|
||||
* @name Pin Dialog
|
||||
* @description
|
||||
@ -33,5 +35,6 @@ export class PinDialog {
|
||||
@Cordova({
|
||||
successIndex: 1
|
||||
})
|
||||
static prompt(message: string, title: string, buttons: string[]): Promise<{buttonIndex: number, input1: string}> {return; }
|
||||
static prompt(message: string, title: string, buttons: string[]): Promise<{ buttonIndex: number, input1: string }> { return; }
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {get} from '../util';
|
||||
import { get } from '../util';
|
||||
|
||||
declare var window;
|
||||
declare var Promise;
|
||||
@ -36,7 +36,7 @@ export const cordovaWarn = function(pluginName: string, method: string) {
|
||||
if (method) console.warn('Native: tried calling ' + pluginName + '.' + method + ', but Cordova is not available. Make sure to include cordova.js or run in a device/simulator');
|
||||
else console.warn('Native: tried accessing the ' + pluginName + ' plugin but Cordova is not available. Make sure to include cordova.js or run in a device/simulator');
|
||||
};
|
||||
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 (opts.callbackOrder === 'reverse') {
|
||||
// Get those arguments in the order [resolve, reject, ...restOfArgs]
|
||||
@ -55,10 +55,10 @@ function setIndex (args: any[], opts: any= {}, resolve?: Function, reject?: Func
|
||||
return args;
|
||||
}
|
||||
|
||||
function callCordovaPlugin(pluginObj: any, methodName: string, args: any[], opts: any= {}, resolve?: Function, reject?: Function) {
|
||||
function callCordovaPlugin(pluginObj: any, methodName: string, args: any[], opts: any = {}, resolve?: Function, reject?: Function) {
|
||||
// Try to figure out where the success/error callbacks need to be bound
|
||||
// to our promise resolve/reject handlers.
|
||||
args = setIndex (args, opts, resolve, reject);
|
||||
args = setIndex(args, opts, resolve, reject);
|
||||
|
||||
let pluginInstance = getPlugin(pluginObj.pluginRef);
|
||||
|
||||
@ -96,7 +96,7 @@ function getPromise(cb) {
|
||||
}
|
||||
}
|
||||
|
||||
function wrapPromise(pluginObj: any, methodName: string, args: any[], opts: any= {}) {
|
||||
function wrapPromise(pluginObj: any, methodName: string, args: any[], opts: any = {}) {
|
||||
let pluginResult, rej;
|
||||
const p = getPromise((resolve, reject) => {
|
||||
pluginResult = callCordovaPlugin(pluginObj, methodName, args, opts, resolve, reject);
|
||||
@ -106,7 +106,7 @@ function wrapPromise(pluginObj: any, methodName: string, args: any[], opts: any=
|
||||
// a warning that Cordova is undefined or the plugin is uninstalled, so there is no reason
|
||||
// to error
|
||||
if (pluginResult && pluginResult.error) {
|
||||
p.catch(() => {});
|
||||
p.catch(() => { });
|
||||
rej(pluginResult.error);
|
||||
}
|
||||
return p;
|
||||
@ -139,7 +139,7 @@ function callInstance(pluginObj: any, methodName: string, args: any[], opts: any
|
||||
return pluginObj._objectInstance[methodName].apply(pluginObj._objectInstance, args);
|
||||
}
|
||||
|
||||
function wrapInstance (pluginObj: any, methodName: string, opts: any = {}) {
|
||||
function wrapInstance(pluginObj: any, methodName: string, opts: any = {}) {
|
||||
return (...args) => {
|
||||
if (opts.sync) {
|
||||
// Sync doesn't wrap the plugin with a promise or observable, it returns the result as-is
|
||||
@ -172,7 +172,7 @@ function wrapInstance (pluginObj: any, methodName: string, opts: any = {}) {
|
||||
* @param event
|
||||
* @returns {Observable}
|
||||
*/
|
||||
function wrapEventObservable (event: string): Observable<any> {
|
||||
function wrapEventObservable(event: string): Observable<any> {
|
||||
return new Observable(observer => {
|
||||
window.addEventListener(event, observer.next.bind(observer), false);
|
||||
return () => window.removeEventListener(event, observer.next.bind(observer), false);
|
||||
@ -288,7 +288,7 @@ export function CordovaProperty(target: Function, key: string, descriptor: Typed
|
||||
let pluginInstance = getPlugin(pluginObj.pluginRef);
|
||||
if (!pluginInstance) {
|
||||
pluginWarn(this, key);
|
||||
return { };
|
||||
return {};
|
||||
}
|
||||
return originalMethod.apply(this, args);
|
||||
};
|
||||
|
@ -1,4 +1,6 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
declare var cordova: any;
|
||||
|
||||
export interface PrintOptions {
|
||||
@ -61,4 +63,5 @@ export class Printer {
|
||||
*/
|
||||
@Cordova()
|
||||
static print(content: string | HTMLElement, options?: PrintOptions): Promise<any> { return; }
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
export type EventResponse = RegistrationEventResponse | NotificationEventResponse | Error;
|
||||
|
||||
@ -265,7 +266,7 @@ export interface PushOptions {
|
||||
}
|
||||
|
||||
declare var PushNotification: {
|
||||
new(): PushNotification
|
||||
new (): PushNotification
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
/**
|
||||
* @name SafariViewController
|
||||
@ -50,39 +51,40 @@ export class SafariViewController {
|
||||
* Checks if SafariViewController is available
|
||||
*/
|
||||
@Cordova()
|
||||
static isAvailable(): Promise<boolean> {return; }
|
||||
static isAvailable(): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* Shows Safari View Controller
|
||||
* @param options
|
||||
*/
|
||||
@Cordova()
|
||||
static show(options?: SafariViewControllerOptions): Promise<any> {return; }
|
||||
static show(options?: SafariViewControllerOptions): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Hides Safari View Controller
|
||||
*/
|
||||
@Cordova()
|
||||
static hide(): void {}
|
||||
static hide(): void { }
|
||||
|
||||
/**
|
||||
* Tries to connect to the Chrome's custom tabs service. you must call this method before calling any of the other methods listed below.
|
||||
*/
|
||||
@Cordova()
|
||||
static connectToService(): Promise<any> {return; }
|
||||
static connectToService(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Call this method whenever there's a chance the user will open an external url.
|
||||
*/
|
||||
@Cordova()
|
||||
static warmUp(): Promise<any> {return; }
|
||||
static warmUp(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* For even better performance optimization, call this methods if there's more than a 50% chance the user will open a certain URL.
|
||||
* @param url
|
||||
*/
|
||||
@Cordova()
|
||||
static mayLaunchUrl(url: string): Promise<any> {return; }
|
||||
static mayLaunchUrl(url: string): Promise<any> { return; }
|
||||
|
||||
}
|
||||
|
||||
export interface SafariViewControllerOptions {
|
||||
|
@ -1,5 +1,8 @@
|
||||
import {Cordova, Plugin} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
declare var navigator: any;
|
||||
|
||||
@Plugin({
|
||||
plugin: 'https://github.com/gitawego/cordova-screenshot.git',
|
||||
pluginRef: 'navigator.screenshot',
|
||||
@ -7,7 +10,7 @@ declare var navigator: any;
|
||||
})
|
||||
export class Screenshot {
|
||||
|
||||
/**
|
||||
/**
|
||||
* Takes screenshot and saves the image
|
||||
*
|
||||
* @param {string} format. Format can take the value of either 'jpg' or 'png'
|
||||
@ -16,14 +19,14 @@ export class Screenshot {
|
||||
* Default quality is set to 100.
|
||||
* @param {string} filename. Name of the file as stored on the storage
|
||||
*/
|
||||
static save (format?: string, quality?: number, filename?: string): Promise<any> {
|
||||
static save(format?: string, quality?: number, filename?: string): Promise<any> {
|
||||
return new Promise<any>(
|
||||
(resolve, reject) => {
|
||||
navigator.screenshot.save(
|
||||
(error, result) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
}else {
|
||||
} else {
|
||||
resolve(result);
|
||||
}
|
||||
},
|
||||
@ -35,20 +38,20 @@ export class Screenshot {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Takes screenshot and returns the image as an URI
|
||||
*
|
||||
* @param {number} quality. Determines the quality of the screenshot.
|
||||
* Default quality is set to 100.
|
||||
*/
|
||||
static URI (quality?: number): Promise<any> {
|
||||
static URI(quality?: number): Promise<any> {
|
||||
return new Promise<any>(
|
||||
(resolve, reject) => {
|
||||
navigator.screenshot.URI(
|
||||
(error, result) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
}else {
|
||||
} else {
|
||||
resolve(result);
|
||||
}
|
||||
},
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
/**
|
||||
* @name Sim
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
/**
|
||||
* Options for sending an SMS
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
/**
|
||||
* @name Social Sharing
|
||||
@ -20,7 +21,6 @@ import {Plugin, Cordova} from './plugin';
|
||||
})
|
||||
export class SocialSharing {
|
||||
|
||||
|
||||
/**
|
||||
* Shares using the share sheet
|
||||
* @param message {string} The message you would like to share.
|
||||
@ -29,7 +29,7 @@ export class SocialSharing {
|
||||
* @param url {string} A URL to share
|
||||
*/
|
||||
@Cordova()
|
||||
static share (message?: string, subject?: string, file?: string|Array<string>, url?: string): Promise<any> {return; }
|
||||
static share(message?: string, subject?: string, file?: string | Array<string>, url?: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Shares using the share sheet with additional options and returns a result object or an error message (requires plugin version 5.1.0+)
|
||||
@ -38,7 +38,7 @@ export class SocialSharing {
|
||||
@Cordova({
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
static shareWithOptions (options: { message?: string, subject?: string, file?: string|Array<string>, url?: string, chooserTitle?: string }): Promise<any> {return; }
|
||||
static shareWithOptions(options: { message?: string, subject?: string, file?: string | Array<string>, url?: string, chooserTitle?: string }): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Checks if you can share via a specific app.
|
||||
@ -47,7 +47,7 @@ export class SocialSharing {
|
||||
@Cordova({
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
static canShareVia (appName: string): Promise<any> {return; }
|
||||
static canShareVia(appName: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Shares directly to Twitter
|
||||
@ -58,7 +58,7 @@ export class SocialSharing {
|
||||
@Cordova({
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
static shareViaTwitter (message: string, image?: string, url?: string): Promise<any> {return; }
|
||||
static shareViaTwitter(message: string, image?: string, url?: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Shares directly to Facebook
|
||||
@ -69,7 +69,7 @@ export class SocialSharing {
|
||||
@Cordova({
|
||||
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; }
|
||||
|
||||
|
||||
/**
|
||||
@ -82,7 +82,7 @@ export class SocialSharing {
|
||||
@Cordova({
|
||||
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
|
||||
@ -92,7 +92,7 @@ export class SocialSharing {
|
||||
@Cordova({
|
||||
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
|
||||
@ -103,7 +103,7 @@ export class SocialSharing {
|
||||
@Cordova({
|
||||
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
|
||||
@ -115,7 +115,7 @@ export class SocialSharing {
|
||||
@Cordova({
|
||||
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
|
||||
@ -125,7 +125,7 @@ export class SocialSharing {
|
||||
@Cordova({
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
static shareViaSMS(messge: string, phoneNumber: string): Promise<any> {return; }
|
||||
static shareViaSMS(messge: string, phoneNumber: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Share via Email
|
||||
@ -139,7 +139,6 @@ export class SocialSharing {
|
||||
@Cordova({
|
||||
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; }
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
/**
|
||||
* @name Spinner Dialog
|
||||
@ -22,7 +23,6 @@ import {Plugin, Cordova} from './plugin';
|
||||
})
|
||||
export class SpinnerDialog {
|
||||
|
||||
|
||||
/**
|
||||
* Shows the spinner dialog
|
||||
* @param title {string} Spinner title (shows on Android only)
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
/**
|
||||
* @name Splashscreen
|
||||
|
@ -1,5 +1,8 @@
|
||||
import {CordovaInstance, Plugin, Cordova} from './plugin';
|
||||
import { Cordova, CordovaInstance, Plugin } from './plugin';
|
||||
|
||||
|
||||
declare var sqlitePlugin;
|
||||
|
||||
/**
|
||||
* @name SQLite
|
||||
*
|
||||
@ -39,7 +42,7 @@ export class SQLite {
|
||||
return this._objectInstance.databaseFeatures;
|
||||
}
|
||||
|
||||
constructor () {}
|
||||
constructor() { }
|
||||
|
||||
/**
|
||||
* Open or create a SQLite database file.
|
||||
@ -67,7 +70,7 @@ export class SQLite {
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
openDatabase (config: any): Promise<any> {
|
||||
openDatabase(config: any): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
sqlitePlugin.openDatabase(config, db => {
|
||||
this._objectInstance = db;
|
||||
@ -82,26 +85,26 @@ export class SQLite {
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
addTransaction (transaction: any): void {}
|
||||
addTransaction(transaction: any): void { }
|
||||
|
||||
@CordovaInstance()
|
||||
transaction (fn: any): Promise<any> {return; }
|
||||
transaction(fn: any): Promise<any> { return; }
|
||||
|
||||
@CordovaInstance()
|
||||
readTransaction (fn: any): Promise<any> {return; }
|
||||
readTransaction(fn: any): Promise<any> { return; }
|
||||
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
startNextTransaction (): void {}
|
||||
startNextTransaction(): void { }
|
||||
|
||||
@CordovaInstance()
|
||||
close (): Promise<any> {return; }
|
||||
close(): Promise<any> { return; }
|
||||
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
start (): void {}
|
||||
start(): void { }
|
||||
|
||||
/**
|
||||
* Execute SQL on the opened database. Note, you must call `openDatabase` first, and
|
||||
@ -117,59 +120,59 @@ export class SQLite {
|
||||
* ```
|
||||
*/
|
||||
@CordovaInstance()
|
||||
executeSql (statement: string, params: any): Promise<any> {return; }
|
||||
executeSql(statement: string, params: any): Promise<any> { return; }
|
||||
|
||||
@CordovaInstance()
|
||||
addSatement (sql, values): Promise<any> {return; }
|
||||
addSatement(sql, values): Promise<any> { return; }
|
||||
|
||||
@CordovaInstance()
|
||||
sqlBatch (sqlStatements: any): Promise<any> {return; }
|
||||
sqlBatch(sqlStatements: any): Promise<any> { return; }
|
||||
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
abortallPendingTransactions (): void {}
|
||||
abortallPendingTransactions(): void { }
|
||||
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
handleStatementSuccess (handler, response): void {}
|
||||
handleStatementSuccess(handler, response): void { }
|
||||
|
||||
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
handleStatementFailure (handler, response): void {}
|
||||
handleStatementFailure(handler, response): void { }
|
||||
|
||||
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
run (): void {}
|
||||
run(): void { }
|
||||
|
||||
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
abort (txFailure): void {}
|
||||
abort(txFailure): void { }
|
||||
|
||||
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
finish (): void {}
|
||||
finish(): void { }
|
||||
|
||||
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
abortFromQ (sqlerror): void {}
|
||||
abortFromQ(sqlerror): void { }
|
||||
|
||||
|
||||
@Cordova()
|
||||
static echoTest (): Promise<any> {return; }
|
||||
static echoTest(): Promise<any> { return; }
|
||||
|
||||
@Cordova()
|
||||
static deleteDatabase (first): Promise<any> {return; }
|
||||
static deleteDatabase(first): Promise<any> { return; }
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {Plugin, Cordova, CordovaProperty} from './plugin';
|
||||
import { Cordova, CordovaProperty, Plugin } from './plugin';
|
||||
|
||||
|
||||
declare var window;
|
||||
|
||||
@ -37,7 +38,7 @@ export class StatusBar {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static overlaysWebView(doesOverlay: boolean) {};
|
||||
static overlaysWebView(doesOverlay: boolean) { };
|
||||
|
||||
/**
|
||||
* Use the default statusbar (dark text, for light backgrounds).
|
||||
@ -45,7 +46,7 @@ export class StatusBar {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static styleDefault() {};
|
||||
static styleDefault() { };
|
||||
|
||||
/**
|
||||
* Use the lightContent statusbar (light text, for dark backgrounds).
|
||||
@ -53,7 +54,7 @@ export class StatusBar {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static styleLightContent() {};
|
||||
static styleLightContent() { };
|
||||
|
||||
/**
|
||||
* Use the blackTranslucent statusbar (light text, for dark backgrounds).
|
||||
@ -61,7 +62,7 @@ export class StatusBar {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static styleBlackTranslucent() {};
|
||||
static styleBlackTranslucent() { };
|
||||
|
||||
/**
|
||||
* Use the blackOpaque statusbar (light text, for dark backgrounds).
|
||||
@ -69,7 +70,7 @@ export class StatusBar {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static styleBlackOpaque() {};
|
||||
static styleBlackOpaque() { };
|
||||
|
||||
/**
|
||||
* Set the status bar to a specific named color. Valid options:
|
||||
@ -82,7 +83,7 @@ export class StatusBar {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static backgroundColorByName(colorName: string) {};
|
||||
static backgroundColorByName(colorName: string) { };
|
||||
|
||||
/**
|
||||
* Set the status bar to a specific hex color (CSS shorthand supported!).
|
||||
@ -94,7 +95,7 @@ export class StatusBar {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static backgroundColorByHexString(hexString: string) {};
|
||||
static backgroundColorByHexString(hexString: string) { };
|
||||
|
||||
/**
|
||||
* Hide the StatusBar
|
||||
@ -102,7 +103,7 @@ export class StatusBar {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static hide() {};
|
||||
static hide() { };
|
||||
|
||||
/**
|
||||
* Show the StatusBar
|
||||
@ -110,11 +111,12 @@ export class StatusBar {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static show() {};
|
||||
static show() { };
|
||||
|
||||
/**
|
||||
* Whether the StatusBar is currently visible or not.
|
||||
*/
|
||||
@CordovaProperty
|
||||
static get isVisible() { return window.StatusBar.isVisible; }
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
|
||||
export interface ToastOptions {
|
||||
/**
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
/**
|
||||
* @name TouchID
|
||||
@ -82,4 +83,5 @@ export class TouchID {
|
||||
*/
|
||||
@Cordova()
|
||||
static verifyFingerprintWithCustomPasswordFallbackAndEnterPasswordLabel(message: string, enterPasswordLabel: string): Promise<any> { return; }
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,6 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
/**
|
||||
* @name Vibration
|
||||
* @description Vibrates the device
|
||||
@ -37,6 +39,6 @@ export class Vibration {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static vibrate(time: number|Array<number>) {}
|
||||
static vibrate(time: number | Array<number>) { }
|
||||
|
||||
}
|
@ -1,5 +1,8 @@
|
||||
import {Cordova, CordovaProperty, Plugin} from './plugin';
|
||||
import { Cordova, CordovaProperty, Plugin } from './plugin';
|
||||
|
||||
|
||||
declare var window;
|
||||
|
||||
/**
|
||||
* @name WebIntent
|
||||
* @description
|
||||
@ -15,31 +18,31 @@ declare var window;
|
||||
export class WebIntent {
|
||||
|
||||
@CordovaProperty
|
||||
static get ACTION_VIEW () {
|
||||
static get ACTION_VIEW() {
|
||||
return window.plugins.webintent.ACTION_VIEW;
|
||||
}
|
||||
|
||||
@CordovaProperty
|
||||
static get EXTRA_TEXT () {
|
||||
static get EXTRA_TEXT() {
|
||||
return window.plugins.webintent.EXTRA_TEXT;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
static startActivity (options: {action: any, url: string}): Promise<any> {return; }
|
||||
static startActivity(options: { action: any, url: string }): Promise<any> { return; }
|
||||
|
||||
@Cordova()
|
||||
static hasExtra (extra: any): Promise<any> {return; }
|
||||
static hasExtra(extra: any): Promise<any> { return; }
|
||||
|
||||
@Cordova()
|
||||
static getExtra (extra: any): Promise<any> {return; }
|
||||
static getExtra(extra: any): Promise<any> { return; }
|
||||
|
||||
@Cordova()
|
||||
static getUri (): Promise<string> {return; };
|
||||
static getUri(): Promise<string> { return; };
|
||||
|
||||
@Cordova()
|
||||
static onNewIntent(): Promise<string> {return; };
|
||||
static onNewIntent(): Promise<string> { return; };
|
||||
|
||||
@Cordova()
|
||||
static sendBroadcast(options: {action: string, extras?: {option: boolean}}): Promise<any> {return; }
|
||||
static sendBroadcast(options: { action: string, extras?: { option: boolean } }): Promise<any> { return; }
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user