Merge in v5 code

This commit is contained in:
Ibby Hadeed
2017-12-28 07:28:44 -05:00
parent d43fe72f7b
commit 0f9c21ab42
255 changed files with 11473 additions and 6501 deletions
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface ActionSheetOptions {
@@ -80,7 +80,7 @@ export interface ActionSheetOptions {
* addDestructiveButtonWithLabel: 'Delete',
* androidTheme: this.actionSheet.ANDROID_THEMES.THEME_HOLO_DARK,
* destructiveButtonLast: true
* };
* }
*
* this.actionSheet.show(options).then((buttonIndex: number) => {
* console.log('Button pressed: ' + buttonIndex);
@@ -123,7 +123,9 @@ export class ActionSheet extends IonicNativePlugin {
* button pressed (1 based, so 1, 2, 3, etc.)
*/
@Cordova()
show(options?: ActionSheetOptions): Promise<any> { return; }
show(options?: ActionSheetOptions): Promise<any> {
return;
}
/**
@@ -131,5 +133,7 @@ export class ActionSheet extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise that resolves when the actionsheet is closed
*/
@Cordova()
hide(options?: any): Promise<any> { return; }
hide(options?: any): Promise<any> {
return;
}
}
+173 -150
View File
@@ -1,4 +1,4 @@
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/fromEvent';
@@ -64,6 +64,162 @@ export interface AdMobFreeRewardVideoConfig {
autoShow?: boolean;
}
/**
* @hidden
*/
@Plugin({
pluginName: 'AdMobFree',
plugin: 'cordova-plugin-admob-free',
pluginRef: 'admob.banner',
})
export class AdMobFreeBanner {
/**
* Update config.
* @param options
* @return {AdMobFreeBannerConfig}
*/
@Cordova({ sync: true })
config(options: AdMobFreeBannerConfig): AdMobFreeBannerConfig {
return;
}
/**
* Hide the banner.
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
hide(): Promise<any> {
return;
}
/**
* Create banner.
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
prepare(): Promise<any> {
return;
}
/**
* Remove the banner.
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
remove(): Promise<any> {
return;
}
/**
* Show the banner.
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
show(): Promise<any> {
return;
}
}
/**
* @hidden
*/
@Plugin({
pluginName: 'AdMobFree',
plugin: 'cordova-plugin-admob-free',
pluginRef: 'admob.interstitial',
})
export class AdMobFreeInterstitial {
/**
* Update config.
* @param options
* @return {AdMobFreeInterstitialConfig}
*/
@Cordova({ sync: true })
config(options: AdMobFreeInterstitialConfig): AdMobFreeInterstitialConfig {
return;
}
/**
* Check if interstitial is ready
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
isReady(): Promise<any> {
return;
}
/**
* Prepare interstitial
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
prepare(): Promise<any> {
return;
}
/**
* Show the interstitial
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
show(): Promise<any> {
return;
}
}
/**
* @hidden
*/
@Plugin({
pluginName: 'AdMobFree',
plugin: 'cordova-plugin-admob-free',
pluginRef: 'admob.rewardvideo',
})
export class AdMobFreeRewardVideo {
/**
* Update config.
* @param options
* @return {AdMobFreeRewardVideoConfig}
*/
@Cordova({ sync: true })
config(options: AdMobFreeRewardVideoConfig): AdMobFreeRewardVideoConfig {
return;
}
/**
* Check if reward video is ready
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
isReady(): Promise<any> {
return;
}
/**
* Prepare reward video
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
prepare(): Promise<any> {
return;
}
/**
* Show the reward video
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
show(): Promise<any> {
return;
}
}
/**
* @name AdMob Free
* @description
@@ -84,7 +240,7 @@ export interface AdMobFreeRewardVideoConfig {
* // for the sake of this example we will just use the test config
* isTesting: true,
* autoShow: true
* };
* }
* this.admobFree.banner.config(bannerConfig);
*
* this.admobFree.banner.prepare()
@@ -140,6 +296,21 @@ export class AdMobFree extends IonicNativePlugin {
REWARD_VIDEO_START: 'admob.rewardvideo.events.START',
REWARD_VIDEO_REWARD: 'admob.rewardvideo.events.REWARD'
};
/**
* Returns the AdMobFreeBanner object
* @type {AdMobFreeBanner}
*/
banner: AdMobFreeBanner = new AdMobFreeBanner();
/**
* Returns the AdMobFreeInterstitial object
* @type {AdMobFreeInterstitial}
*/
interstitial: AdMobFreeInterstitial = new AdMobFreeInterstitial();
/**
* Returns the AdMobFreeRewardVideo object
* @type {AdMobFreeRewardVideo}
*/
rewardVideo: AdMobFreeRewardVideo = new AdMobFreeRewardVideo();
/**
* Watch an event
@@ -150,152 +321,4 @@ export class AdMobFree extends IonicNativePlugin {
return Observable.fromEvent(document, event);
}
/**
* Returns the AdMobFreeBanner object
* @type {AdMobFreeBanner}
*/
banner: AdMobFreeBanner = new AdMobFreeBanner();
/**
* Returns the AdMobFreeInterstitial object
* @type {AdMobFreeInterstitial}
*/
interstitial: AdMobFreeInterstitial = new AdMobFreeInterstitial();
/**
* Returns the AdMobFreeRewardVideo object
* @type {AdMobFreeRewardVideo}
*/
rewardVideo: AdMobFreeRewardVideo = new AdMobFreeRewardVideo();
}
/**
* @hidden
*/
@Plugin({
pluginName: 'AdMobFree',
plugin: 'cordova-plugin-admob-free',
pluginRef: 'admob.banner',
})
export class AdMobFreeBanner {
/**
* Update config.
* @param options
* @return {AdMobFreeBannerConfig}
*/
@Cordova({ sync: true })
config(options: AdMobFreeBannerConfig): AdMobFreeBannerConfig { return; }
/**
* Hide the banner.
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
hide(): Promise<any> { return; }
/**
* Create banner.
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
prepare(): Promise<any> { return; }
/**
* Remove the banner.
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
remove(): Promise<any> { return; }
/**
* Show the banner.
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
show(): Promise<any> { return; }
}
/**
* @hidden
*/
@Plugin({
pluginName: 'AdMobFree',
plugin: 'cordova-plugin-admob-free',
pluginRef: 'admob.interstitial',
})
export class AdMobFreeInterstitial {
/**
* Update config.
* @param options
* @return {AdMobFreeInterstitialConfig}
*/
@Cordova({ sync: true })
config(options: AdMobFreeInterstitialConfig): AdMobFreeInterstitialConfig { return; }
/**
* Check if interstitial is ready
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
isReady(): Promise<any> { return; }
/**
* Prepare interstitial
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
prepare(): Promise<any> { return; }
/**
* Show the interstitial
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
show(): Promise<any> { return; }
}
/**
* @hidden
*/
@Plugin({
pluginName: 'AdMobFree',
plugin: 'cordova-plugin-admob-free',
pluginRef: 'admob.rewardvideo',
})
export class AdMobFreeRewardVideo {
/**
* Update config.
* @param options
* @return {AdMobFreeRewardVideoConfig}
*/
@Cordova({ sync: true })
config(options: AdMobFreeRewardVideoConfig): AdMobFreeRewardVideoConfig { return; }
/**
* Check if reward video is ready
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
isReady(): Promise<any> { return; }
/**
* Prepare reward video
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
prepare(): Promise<any> { return; }
/**
* Show the reward video
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
show(): Promise<any> { return; }
}
+56 -23
View File
@@ -1,8 +1,15 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
export type AdSize = 'SMART_BANNER' | 'BANNER' | 'MEDIUM_RECTANGLE' | 'FULL_BANNER' | 'LEADERBOARD' | 'SKYSCRAPER' | 'CUSTOM';
export type AdSize =
'SMART_BANNER'
| 'BANNER'
| 'MEDIUM_RECTANGLE'
| 'FULL_BANNER'
| 'LEADERBOARD'
| 'SKYSCRAPER'
| 'CUSTOM';
export interface AdMobOptions {
@@ -167,7 +174,9 @@ export class AdMobPro extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise that resolves when the banner is created
*/
@Cordova()
createBanner(adIdOrOptions: string | AdMobOptions): Promise<any> { return; }
createBanner(adIdOrOptions: string | AdMobOptions): Promise<any> {
return;
}
/**
* Destroy the banner, remove it from screen.
@@ -175,7 +184,8 @@ export class AdMobPro extends IonicNativePlugin {
@Cordova({
sync: true
})
removeBanner(): void { }
removeBanner(): void {
}
/**
* Show banner at position
@@ -184,7 +194,8 @@ export class AdMobPro extends IonicNativePlugin {
@Cordova({
sync: true
})
showBanner(position: number): void { }
showBanner(position: number): void {
}
/**
* Show banner at custom position
@@ -194,7 +205,8 @@ export class AdMobPro extends IonicNativePlugin {
@Cordova({
sync: true
})
showBannerAtXY(x: number, y: number): void { }
showBannerAtXY(x: number, y: number): void {
}
/**
* Hide the banner, remove it from screen, but can show it later
@@ -202,7 +214,8 @@ export class AdMobPro extends IonicNativePlugin {
@Cordova({
sync: true
})
hideBanner(): void { }
hideBanner(): void {
}
/**
* Prepare interstitial banner
@@ -210,7 +223,9 @@ export class AdMobPro extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise that resolves when interstitial is prepared
*/
@Cordova()
prepareInterstitial(adIdOrOptions: string | AdMobOptions): Promise<any> { return; }
prepareInterstitial(adIdOrOptions: string | AdMobOptions): Promise<any> {
return;
}
/**
* Show interstitial ad when it's ready
@@ -218,7 +233,8 @@ export class AdMobPro extends IonicNativePlugin {
@Cordova({
sync: true
})
showInterstitial(): void { }
showInterstitial(): void {
}
/**
* Prepare a reward video ad
@@ -226,7 +242,9 @@ export class AdMobPro extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise that resolves when the ad is prepared
*/
@Cordova()
prepareRewardVideoAd(adIdOrOptions: string | AdMobOptions): Promise<any> { return; }
prepareRewardVideoAd(adIdOrOptions: string | AdMobOptions): Promise<any> {
return;
}
/**
* Show a reward video ad
@@ -234,7 +252,8 @@ export class AdMobPro extends IonicNativePlugin {
@Cordova({
sync: true
})
showRewardVideoAd(): void { }
showRewardVideoAd(): void {
}
/**
* Sets the values for configuration and targeting
@@ -242,14 +261,18 @@ export class AdMobPro extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise that resolves when the options have been set
*/
@Cordova()
setOptions(options: AdMobOptions): Promise<any> { return; }
setOptions(options: AdMobOptions): Promise<any> {
return;
}
/**
* Get user ad settings
* @returns {Promise<any>} Returns a promise that resolves with the ad settings
*/
@Cordova()
getAdSettings(): Promise<any> { return; }
getAdSettings(): Promise<any> {
return;
}
/**
* Triggered when failed to receive Ad
@@ -258,9 +281,11 @@ export class AdMobPro extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onAdFailLoad',
element: document
element: 'document'
})
onAdFailLoad(): Observable<any> { return; }
onAdFailLoad(): Observable<any> {
return;
}
/**
* Triggered when Ad received
@@ -269,9 +294,11 @@ export class AdMobPro extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onAdLoaded',
element: document
element: 'document'
})
onAdLoaded(): Observable<any> { return; }
onAdLoaded(): Observable<any> {
return;
}
/**
* Triggered when Ad will be showed on screen
@@ -280,9 +307,11 @@ export class AdMobPro extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onAdPresent',
element: document
element: 'document'
})
onAdPresent(): Observable<any> { return; }
onAdPresent(): Observable<any> {
return;
}
/**
* Triggered when user click the Ad, and will jump out of your App
@@ -291,9 +320,11 @@ export class AdMobPro extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onAdLeaveApp',
element: document
element: 'document'
})
onAdLeaveApp(): Observable<any> { return; }
onAdLeaveApp(): Observable<any> {
return;
}
/**
* Triggered when dismiss the Ad and back to your App
@@ -302,8 +333,10 @@ export class AdMobPro extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onAdDismiss',
element: document
element: 'document'
})
onAdDismiss(): Observable<any> { return; }
onAdDismiss(): Observable<any> {
return;
}
}
+5 -4
View File
@@ -1,8 +1,7 @@
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
export interface AlipayOrder {
/**
* appId assigned by Alipay
@@ -77,7 +76,7 @@ export interface AlipayOrder {
* // Should get from server side with sign.
* const alipayOrder: AlipayOrder = {
* ...
* };
* }
*
*
* this.alipay.pay(alipayOrder)
@@ -113,5 +112,7 @@ export class Alipay extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise that resolves with the success return, or rejects with an error.
*/
@Cordova()
pay(order: AlipayOrder | string): Promise<any> { return; }
pay(order: AlipayOrder | string): Promise<any> {
return;
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
export type AndroidExoPlayerAspectRatio = 'FILL_SCREEN' | 'FIT_SCREEN';
@@ -187,14 +187,16 @@ export class AndroidExoplayer extends IonicNativePlugin {
* @param parameters {AndroidExoPlayerParams} Parameters
* @return {Observable<AndroidExoplayerState>}
*/
@Cordova({
observable: true,
clearFunction: 'close',
clearWithArgs: false,
successIndex: 1,
errorIndex: 2
})
show(parameters: AndroidExoPlayerParams): Observable<AndroidExoplayerState> { return; }
@Cordova({
observable: true,
clearFunction: 'close',
clearWithArgs: false,
successIndex: 1,
errorIndex: 2
})
show(parameters: AndroidExoPlayerParams): Observable<AndroidExoplayerState> {
return;
}
/**
* Switch stream without disposing of the player.
@@ -203,21 +205,27 @@ export class AndroidExoplayer extends IonicNativePlugin {
* @return {Promise<void>}
*/
@Cordova()
setStream(url: string, controller: AndroidExoPlayerControllerConfig): Promise<void> { return; }
setStream(url: string, controller: AndroidExoPlayerControllerConfig): Promise<void> {
return;
}
/**
* Will pause if playing and play if paused
* @return {Promise<void>}
*/
@Cordova()
playPause(): Promise<void> { return; }
playPause(): Promise<void> {
return;
}
/**
* Stop playing.
* @return {Promise<void>}
*/
@Cordova()
stop(): Promise<void> { return; }
stop(): Promise<void> {
return;
}
/**
* Jump to a particular position.
@@ -225,7 +233,9 @@ export class AndroidExoplayer extends IonicNativePlugin {
* @return {Promise<void>}
*/
@Cordova()
seekTo(milliseconds: number): Promise<void> { return; }
seekTo(milliseconds: number): Promise<void> {
return;
}
/**
* Jump to a particular time relative to the current position.
@@ -233,28 +243,36 @@ export class AndroidExoplayer extends IonicNativePlugin {
* @return {Promise<void>}
*/
@Cordova()
seekBy(milliseconds: number): Promise<void> { return; }
seekBy(milliseconds: number): Promise<void> {
return;
}
/**
* Get the current player state.
* @return {Promise<AndroidExoplayerState>}
*/
@Cordova()
getState(): Promise<AndroidExoplayerState> { return; }
getState(): Promise<AndroidExoplayerState> {
return;
}
/**
* Show the controller.
* @return {Promise<void>}
*/
@Cordova()
showController(): Promise<void> { return; }
showController(): Promise<void> {
return;
}
/**
* Hide the controller.
* @return {Promise<void>}
*/
@Cordova()
hideController(): Promise<void> { return; }
hideController(): Promise<void> {
return;
}
/**
* Update the controller configuration.
@@ -262,12 +280,16 @@ export class AndroidExoplayer extends IonicNativePlugin {
* @return {Promise<void>}
*/
@Cordova()
setController(controller: AndroidExoPlayerControllerConfig): Promise<void> { return; }
setController(controller: AndroidExoPlayerControllerConfig): Promise<void> {
return;
}
/**
* Close and dispose of player, call before destroy.
* @return {Promise<void>}
*/
@Cordova()
close(): Promise<void> { return; }
close(): Promise<void> {
return;
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface AFAAuthOptions {
@@ -177,7 +177,9 @@ export class AndroidFingerprintAuth extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
encrypt(options: AFAAuthOptions): Promise<AFAEncryptResponse> { return; }
encrypt(options: AFAAuthOptions): Promise<AFAEncryptResponse> {
return;
}
/**
* Opens a native dialog fragment to use the device hardware fingerprint scanner to authenticate against fingerprints registered for the device.
@@ -185,19 +187,25 @@ export class AndroidFingerprintAuth extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
decrypt(options: AFAAuthOptions): Promise<AFADecryptOptions> { return; }
decrypt(options: AFAAuthOptions): Promise<AFADecryptOptions> {
return;
}
/**
* Check if service is available
* @returns {Promise<any>} Returns a Promise that resolves if fingerprint auth is available on the device
*/
@Cordova()
isAvailable(): Promise<{ isAvailable: boolean, isHardwareDetected: boolean, hasEnrolledFingerprints: boolean }> { return; }
isAvailable(): Promise<{ isAvailable: boolean, isHardwareDetected: boolean, hasEnrolledFingerprints: boolean }> {
return;
}
/**
* Delete the cipher used for encryption and decryption by username
* @returns {Promise<any>} Returns a Promise that resolves if the cipher was successfully deleted
*/
@Cordova()
delete(options: { clientId: string; username: string; }): Promise<{ deleted: boolean }> { return; }
delete(options: { clientId: string; username: string; }): Promise<{ deleted: boolean }> {
return;
}
}
@@ -1,9 +1,9 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* Bit flag values for setSystemUiVisibility()
* @see https://developer.android.com/reference/android/view/View.html#setSystemUiVisibility(int)
* @see https://developer.android.com/reference/android/view/View.html#setSystemUiVisibility(int)
*/
export enum AndroidSystemUiFlags {
/** View has requested the system UI (status bar) to be visible (the default). SYSTEM_UI_FLAG_VISIBLE */
@@ -64,63 +64,81 @@ export class AndroidFullScreen extends IonicNativePlugin {
* @return {Promise<void>}
*/
@Cordova()
isSupported(): Promise<void> { return; }
isSupported(): Promise<void> {
return;
}
/**
* Is immersive mode supported?
* @return {Promise<void>}
*/
@Cordova()
isImmersiveModeSupported(): Promise<void> { return; }
isImmersiveModeSupported(): Promise<void> {
return;
}
/**
* The width of the screen in immersive mode.
* @return {Promise<number>}
*/
@Cordova()
immersiveWidth(): Promise<number> { return; }
immersiveWidth(): Promise<number> {
return;
}
/**
* The height of the screen in immersive mode.
* @return {Promise<number>}
*/
@Cordova()
immersiveHeight(): Promise<number> { return; }
immersiveHeight(): Promise<number> {
return;
}
/**
* Hide system UI until user interacts.
* @return {Promise<void>}
*/
@Cordova()
leanMode(): Promise<void> { return; }
leanMode(): Promise<void> {
return;
}
/**
* Show system UI.
* @return {Promise<void>}
*/
@Cordova()
showSystemUI(): Promise<void> { return; }
showSystemUI(): Promise<void> {
return;
}
/**
* Extend your app underneath the status bar (Android 4.4+ only).
* @return {Promise<void>}
*/
@Cordova()
showUnderStatusBar(): Promise<void> { return; }
showUnderStatusBar(): Promise<void> {
return;
}
/**
* Extend your app underneath the system UI (Android 4.4+ only).
* @return {Promise<void>}
*/
@Cordova()
showUnderSystemUI(): Promise<void> { return; }
showUnderSystemUI(): Promise<void> {
return;
}
/**
* Hide system UI and keep it hidden (Android 4.4+ only).
* @return {Promise<void>}
*/
@Cordova()
immersiveMode(): Promise<void> { return; }
immersiveMode(): Promise<void> {
return;
}
/**
* Manually set the the system UI to a custom mode. This mirrors the Android method of the same name. (Android 4.4+ only).
@@ -129,5 +147,7 @@ export class AndroidFullScreen extends IonicNativePlugin {
* @return {Promise<void>}
*/
@Cordova()
setSystemUiVisibility(visibility: AndroidSystemUiFlags): Promise<void> { return; }
setSystemUiVisibility(visibility: AndroidSystemUiFlags): Promise<void> {
return;
}
}
@@ -1,4 +1,4 @@
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
/**
@@ -199,7 +199,9 @@ export class AndroidPermissions extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise
*/
@Cordova()
checkPermission(permission: string): Promise<any> { return; }
checkPermission(permission: string): Promise<any> {
return;
}
/**
* Request permission
@@ -207,7 +209,9 @@ export class AndroidPermissions extends IonicNativePlugin {
* @return {Promise<any>}
*/
@Cordova()
requestPermission(permission: string): Promise<any> { return; }
requestPermission(permission: string): Promise<any> {
return;
}
/**
* Request permissions
@@ -215,7 +219,9 @@ export class AndroidPermissions extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise
*/
@Cordova()
requestPermissions(permissions: string[]): Promise<any> { return; }
requestPermissions(permissions: string[]): Promise<any> {
return;
}
/**
* This function still works now, will not support in the future.
@@ -223,6 +229,8 @@ export class AndroidPermissions extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise
*/
@Cordova()
hasPermission(permission: string): Promise<any> { return; }
hasPermission(permission: string): Promise<any> {
return;
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name App Availability
@@ -48,6 +48,8 @@ export class AppAvailability extends IonicNativePlugin {
* @returns {Promise<boolean>}
*/
@Cordova()
check(app: string): Promise<boolean> { return; }
check(app: string): Promise<boolean> {
return;
}
}
@@ -1,4 +1,4 @@
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
/**
@@ -37,6 +37,8 @@ export class AppMinimize extends IonicNativePlugin {
* @return {Promise<any>}
*/
@Cordova()
minimize(): Promise<any> { return; }
minimize(): Promise<any> {
return;
}
}
@@ -1,4 +1,4 @@
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Injectable } from '@angular/core';
@@ -40,7 +40,9 @@ export class AppPreferences extends IonicNativePlugin {
@Cordova({
callbackOrder: 'reverse'
})
fetch(dict: string, key?: string): Promise<any> { return; }
fetch(dict: string, key?: string): Promise<any> {
return;
}
/**
* Set a preference value
@@ -67,7 +69,9 @@ export class AppPreferences extends IonicNativePlugin {
@Cordova({
callbackOrder: 'reverse'
})
remove(dict: string, key?: string): Promise<any> { return; }
remove(dict: string, key?: string): Promise<any> {
return;
}
/**
* Clear preferences
@@ -77,7 +81,9 @@ export class AppPreferences extends IonicNativePlugin {
@Cordova({
callbackOrder: 'reverse'
})
clearAll(): Promise<any> { return; }
clearAll(): Promise<any> {
return;
}
/**
* Show native preferences interface
@@ -87,7 +93,9 @@ export class AppPreferences extends IonicNativePlugin {
@Cordova({
callbackOrder: 'reverse'
})
show(): Promise<any> { return; }
show(): Promise<any> {
return;
}
/**
* Show native preferences interface
@@ -98,7 +106,9 @@ export class AppPreferences extends IonicNativePlugin {
@Cordova({
observable: true
})
watch(subscribe: boolean): Observable<any> { return; }
watch(subscribe: boolean): Observable<any> {
return;
}
/**
* Return named configuration context
@@ -111,13 +121,17 @@ export class AppPreferences extends IonicNativePlugin {
platforms: ['Android'],
sync: true
})
suite(suiteName: string): any { return; }
suite(suiteName: string): any {
return;
}
@Cordova({
platforms: ['iOS'],
sync: true
})
iosSuite(suiteName: string): any { return; }
iosSuite(suiteName: string): any {
return;
}
/**
* Return cloud synchronized configuration context
@@ -127,7 +141,9 @@ export class AppPreferences extends IonicNativePlugin {
@Cordova({
platforms: ['iOS', 'Windows', 'Windows Phone 8']
})
cloudSync(): Object { return; }
cloudSync(): Object {
return;
}
/**
* Return default configuration context
@@ -137,6 +153,8 @@ export class AppPreferences extends IonicNativePlugin {
@Cordova({
platforms: ['iOS', 'Windows', 'Windows Phone 8']
})
defaults(): Object { return; }
defaults(): Object {
return;
}
}
+8 -6
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface AppRatePreferences {
@@ -121,7 +121,7 @@ export interface AppUrls {
* ios: '<app_id>',
* android: 'market://details?id=<package_name>',
* windows: 'ms-windows-store://review/?ProductId=<store_id>'
* };
* }
*
* this.appRate.promptForRating(true);
*
@@ -133,7 +133,7 @@ export interface AppUrls {
* android: 'market://details?id=<package_name>',
* windows: 'ms-windows-store://review/?ProductId=<store_id>'
* }
* };
* }
*
* this.appRate.promptForRating(false);
* ```
@@ -158,7 +158,7 @@ export class AppRate extends IonicNativePlugin {
* Configure various settings for the Rating View.
* See table below for options
*/
@CordovaProperty
@CordovaProperty()
preferences: AppRatePreferences;
/**
@@ -166,12 +166,14 @@ export class AppRate extends IonicNativePlugin {
* @param {boolean} immediately Show the rating prompt immediately.
*/
@Cordova()
promptForRating(immediately: boolean): void { };
promptForRating(immediately: boolean): void {
}
/**
* Immediately send the user to the app store rating page
*/
@Cordova()
navigateToAppStore(): void { };
navigateToAppStore(): void {
}
}
@@ -1,4 +1,4 @@
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
/**
@@ -49,5 +49,7 @@ export class AppUpdate extends IonicNativePlugin {
@Cordova({
callbackOrder: 'reverse'
})
checkAppUpdate(updateUrl: string): Promise<any> { return; }
checkAppUpdate(updateUrl: string): Promise<any> {
return;
}
}
+13 -6
View File
@@ -1,6 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
@@ -41,27 +40,35 @@ export class AppVersion extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
getAppName(): Promise<any> { return; }
getAppName(): Promise<any> {
return;
}
/**
* Returns the package name of the app
* @returns {Promise<any>}
*/
@Cordova()
getPackageName(): Promise<any> { return; }
getPackageName(): Promise<any> {
return;
}
/**
* Returns the build identifier of the app
* @returns {Promise<any>}
*/
@Cordova()
getVersionCode(): Promise<any> { return; }
getVersionCode(): Promise<any> {
return;
}
/**
* Returns the version of the app
* @returns {Promise<any>}
*/
@Cordova()
getVersionNumber(): Promise<any> { return; }
getVersionNumber(): Promise<any> {
return;
}
}
+21 -12
View File
@@ -1,15 +1,22 @@
import {Injectable} from '@angular/core';
import {Observable} from 'rxjs/Observable';
import {
Plugin,
Cordova,
IonicNativePlugin
} from '@ionic-native/core';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export type IMakePayments = 'This device can make payments and has a supported card' | 'This device cannot make payments.' | 'This device can make payments but has no supported cards';
export type IMakePayments =
'This device can make payments and has a supported card'
| 'This device cannot make payments.'
| 'This device can make payments but has no supported cards';
export type IShippingType = 'shipping' | 'delivery' | 'store' | 'service';
export type IBillingRequirement = 'none' | 'all' | 'postcode' | 'name' | 'email' | 'phone';
export type ITransactionStatus = 'success' | 'failure' | 'invalid-billing-address' | 'invalid-shipping-address' | 'invalid-shipping-contact' | 'require-pin' | 'incorrect-pin' | 'locked-pin';
export type IBillingRequirement = 'none' | 'all' | 'postcode' | 'name' | 'email' | 'phone';
export type ITransactionStatus =
'success'
| 'failure'
| 'invalid-billing-address'
| 'invalid-shipping-address'
| 'invalid-shipping-contact'
| 'require-pin'
| 'incorrect-pin'
| 'locked-pin';
export type ICompleteTransaction = 'Payment status applied.';
export type IUpdateItemsAndShippingStatus = 'Updated List Info' | 'Did you make a payment request?';
@@ -50,12 +57,14 @@ export interface IOrderItem {
label: string;
amount: number;
}
export interface IShippingMethod {
export interface IShippingMethod {
identifier: string;
label: string;
detail: string;
amount: number;
}
export interface IOrderItemsAndShippingMethods {
items: IOrderItem[];
shippingMethods?: IShippingMethod[];
@@ -221,7 +230,7 @@ export class ApplePay extends IonicNativePlugin {
* this.paySheetItems.shippingCost = {
* label: 'Shipping Cost',
* amount: shippingMethod[0].amount
* };
* }
* this.applePay.updateItemsAndShippingMethods(this.paySheetItems, shippingMethods);
* });
*/
+188 -94
View File
@@ -1,4 +1,4 @@
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs';
import { Injectable } from '@angular/core';
@@ -46,14 +46,17 @@ export class Appodeal extends IonicNativePlugin {
* @param {number} adType
*/
@Cordova()
initialize(appKey: string, adType: number): void { };
initialize(appKey: string, adType: number): void {
}
/**
* check if SDK has been initialized
* @returns {Promise<boolean>}
*/
@Cordova()
isInitialized(): Promise<any> { return; };
isInitialized(): Promise<any> {
return;
}
/**
* show ad of specified type
@@ -61,7 +64,9 @@ export class Appodeal extends IonicNativePlugin {
* @returns {Promise<boolean>}
*/
@Cordova()
show(adType: number): Promise<any> { return; };
show(adType: number): Promise<any> {
return;
}
/**
* show ad of specified type with placement options
@@ -70,24 +75,26 @@ export class Appodeal extends IonicNativePlugin {
* @returns {Promise<boolean>}
*/
@Cordova()
showWithPlacement(
adType: number,
placement: any
): Promise<any> { return; };
showWithPlacement(adType: number,
placement: any): Promise<any> {
return;
}
/**
* hide ad of specified type
* @param {number} adType
*/
@Cordova()
hide(adType: number): void { };
hide(adType: number): void {
}
/**
* confirm use of ads of specified type
* @param {number} adType
*/
@Cordova()
confirm(adType: number): void { };
confirm(adType: number): void {
}
/**
* check if ad of specified type has been loaded
@@ -95,7 +102,9 @@ export class Appodeal extends IonicNativePlugin {
* @returns {Promise<boolean>}
*/
@Cordova()
isLoaded(adType: number): Promise<any> { return; };
isLoaded(adType: number): Promise<any> {
return;
}
/**
* check if ad of specified
@@ -103,7 +112,9 @@ export class Appodeal extends IonicNativePlugin {
* @returns {Promise<boolean>}
*/
@Cordova()
isPrecache(adType: number): Promise<any> { return; };
isPrecache(adType: number): Promise<any> {
return;
}
/**
*
@@ -111,75 +122,87 @@ export class Appodeal extends IonicNativePlugin {
* @param autoCache
*/
@Cordova()
setAutoCache(adType: number, autoCache: any): void { };
setAutoCache(adType: number, autoCache: any): void {
}
/**
* forcefully cache an ad by type
* @param {number} adType
*/
@Cordova()
cache(adType: number): void { };
cache(adType: number): void {
}
/**
*
* @param {boolean} set
*/
@Cordova()
setOnLoadedTriggerBoth(set: boolean): void { };
setOnLoadedTriggerBoth(set: boolean): void {
}
/**
* enable or disable Smart Banners
* @param {boolean} enabled
*/
@Cordova()
setSmartBanners(enabled: boolean): void { };
setSmartBanners(enabled: boolean): void {
}
/**
* enable or disable banner backgrounds
* @param {boolean} enabled
*/
@Cordova()
setBannerBackground(enabled: boolean): void { };
setBannerBackground(enabled: boolean): void {
}
/**
* enable or disable banner animations
* @param {boolean} enabled
*/
@Cordova()
setBannerAnimation(enabled: boolean): void { };
setBannerAnimation(enabled: boolean): void {
}
/**
*
* @param value
*/
@Cordova()
set728x90Banners(value: any): void { };
set728x90Banners(value: any): void {
}
/**
* enable or disable logging
* @param {boolean} logging
*/
@Cordova()
setLogging(logging: boolean): void { };
setLogging(logging: boolean): void {
}
/**
* enable or disable testing mode
* @param {boolean} testing
*/
@Cordova()
setTesting(testing: boolean): void { };
setTesting(testing: boolean): void {
}
/**
* reset device ID
*/
@Cordova()
resetUUID(): void { };
resetUUID(): void {
}
/**
* get version of Appdeal SDK
*/
@Cordova()
getVersion(): Promise<any> { return; };
getVersion(): Promise<any> {
return;
}
/**
*
@@ -187,7 +210,8 @@ export class Appodeal extends IonicNativePlugin {
* @param {number} adType
*/
@Cordova()
disableNetwork(network?: string, adType?: number): void { };
disableNetwork(network?: string, adType?: number): void {
}
/**
*
@@ -195,54 +219,62 @@ export class Appodeal extends IonicNativePlugin {
* @param {number} adType
*/
@Cordova()
disableNetworkType(network?: string, adType?: number): void { };
disableNetworkType(network?: string, adType?: number): void {
}
/**
* disable Location permissions for Appodeal SDK
*/
@Cordova()
disableLocationPermissionCheck(): void { };
disableLocationPermissionCheck(): void {
}
/**
* disable Storage permissions for Appodeal SDK
*/
@Cordova()
disableWriteExternalStoragePermissionCheck(): void { };
disableWriteExternalStoragePermissionCheck(): void {
}
/**
* enable event listeners
* @param {boolean} enabled
*/
@Cordova()
enableInterstitialCallbacks(enabled: boolean): void { };
enableInterstitialCallbacks(enabled: boolean): void {
}
/**
* enable event listeners
* @param {boolean} enabled
*/
@Cordova()
enableSkippableVideoCallbacks(enabled: boolean): void { };
enableSkippableVideoCallbacks(enabled: boolean): void {
}
/**
* enable event listeners
* @param {boolean} enabled
*/
@Cordova()
enableNonSkippableVideoCallbacks(enabled: boolean): void { };
enableNonSkippableVideoCallbacks(enabled: boolean): void {
}
/**
* enable event listeners
* @param {boolean} enabled
*/
@Cordova()
enableBannerCallbacks(enabled: boolean): void { };
enableBannerCallbacks(enabled: boolean): void {
}
/**
* enable event listeners
* @param {boolean} enabled
*/
@Cordova()
enableRewardedVideoCallbacks(enabled: boolean): void { };
enableRewardedVideoCallbacks(enabled: boolean): void {
}
/**
*
@@ -250,7 +282,8 @@ export class Appodeal extends IonicNativePlugin {
* @param {boolean} value
*/
@Cordova()
setCustomBooleanRule(name: string, value: boolean): void { };
setCustomBooleanRule(name: string, value: boolean): void {
}
/**
*
@@ -258,7 +291,8 @@ export class Appodeal extends IonicNativePlugin {
* @param {number} value
*/
@Cordova()
setCustomIntegerRule(name: string, value: number): void { };
setCustomIntegerRule(name: string, value: number): void {
}
/**
* set rule with float value
@@ -266,7 +300,8 @@ export class Appodeal extends IonicNativePlugin {
* @param {number} value
*/
@Cordova()
setCustomDoubleRule(name: string, value: number): void { };
setCustomDoubleRule(name: string, value: number): void {
}
/**
* set rule with string value
@@ -274,243 +309,302 @@ export class Appodeal extends IonicNativePlugin {
* @param {string} value
*/
@Cordova()
setCustomStringRule(name: string, value: string): void { };
setCustomStringRule(name: string, value: string): void {
}
/**
* set ID preference in Appodeal for current user
* @param id
*/
@Cordova()
setUserId(id: any): void { };
setUserId(id: any): void {
}
/**
* set Email preference in Appodeal for current user
* @param email
*/
@Cordova()
setEmail(email: any): void { };
setEmail(email: any): void {
}
/**
* set Birthday preference in Appodeal for current user
* @param birthday
*/
@Cordova()
setBirthday(birthday: any): void { };
setBirthday(birthday: any): void {
}
/**
* et Age preference in Appodeal for current user
* @param age
*/
@Cordova()
setAge(age: any): void { };
setAge(age: any): void {
}
/**
* set Gender preference in Appodeal for current user
* @param gender
*/
@Cordova()
setGender(gender: any): void { };
setGender(gender: any): void {
}
/**
* set Occupation preference in Appodeal for current user
* @param occupation
*/
@Cordova()
setOccupation(occupation: any): void { };
setOccupation(occupation: any): void {
}
/**
* set Relation preference in Appodeal for current user
* @param relation
*/
@Cordova()
setRelation(relation: any): void { };
setRelation(relation: any): void {
}
/**
* set Smoking preference in Appodeal for current user
* @param smoking
*/
@Cordova()
setSmoking(smoking: any): void { };
setSmoking(smoking: any): void {
}
/**
* set Alcohol preference in Appodeal for current user
* @param alcohol
*/
@Cordova()
setAlcohol(alcohol: any): void { };
setAlcohol(alcohol: any): void {
}
/**
* set Interests preference in Appodeal for current user
* @param interests
*/
@Cordova()
setInterests(interests: any): void { };
setInterests(interests: any): void {
}
@Cordova({
eventObservable: true,
event: 'onInterstitialLoaded',
element: document
element: 'document'
})
onInterstitialLoaded(): Observable<any> { return; }
onInterstitialLoaded(): Observable<any> {
return;
}
@Cordova({
eventObservable: true,
event: 'onInterstitialFailedToLoad',
element: document
element: 'document'
})
onInterstitialFailedToLoad(): Observable<any> { return; }
onInterstitialFailedToLoad(): Observable<any> {
return;
}
@Cordova({
eventObservable: true,
event: 'onInterstitialShown',
element: document
element: 'document'
})
onInterstitialShown(): Observable<any> { return; }
onInterstitialShown(): Observable<any> {
return;
}
@Cordova({
eventObservable: true,
event: 'onInterstitialClicked',
element: document
element: 'document'
})
onInterstitialClicked(): Observable<any> { return; }
onInterstitialClicked(): Observable<any> {
return;
}
@Cordova({
eventObservable: true,
event: 'onInterstitialClosed',
element: document
element: 'document'
})
onInterstitialClosed(): Observable<any> { return; }
onInterstitialClosed(): Observable<any> {
return;
}
@Cordova({
eventObservable: true,
event: 'onSkippableVideoLoaded',
element: document
element: 'document'
})
onSkippableVideoLoaded(): Observable<any> { return; }
onSkippableVideoLoaded(): Observable<any> {
return;
}
@Cordova({
eventObservable: true,
event: 'onSkippableVideoFailedToLoad',
element: document
element: 'document'
})
onSkippableVideoFailedToLoad(): Observable<any> { return; }
onSkippableVideoFailedToLoad(): Observable<any> {
return;
}
@Cordova({
eventObservable: true,
event: 'onSkippableVideoShown',
element: document
element: 'document'
})
onSkippableVideoShown(): Observable<any> { return; }
onSkippableVideoShown(): Observable<any> {
return;
}
@Cordova({
eventObservable: true,
event: 'onSkippableVideoFinished',
element: document
element: 'document'
})
onSkippableVideoFinished(): Observable<any> { return; }
onSkippableVideoFinished(): Observable<any> {
return;
}
@Cordova({
eventObservable: true,
event: 'onSkippableVideoClosed',
element: document
element: 'document'
})
onSkippableVideoClosed(): Observable<any> { return; }
onSkippableVideoClosed(): Observable<any> {
return;
}
@Cordova({
eventObservable: true,
event: 'onRewardedVideoLoaded',
element: document
element: 'document'
})
onRewardedVideoLoaded(): Observable<any> { return; }
onRewardedVideoLoaded(): Observable<any> {
return;
}
@Cordova({
eventObservable: true,
event: 'onRewardedVideoFailedToLoad',
element: document
element: 'document'
})
onRewardedVideoFailedToLoad(): Observable<any> { return; }
onRewardedVideoFailedToLoad(): Observable<any> {
return;
}
@Cordova({
eventObservable: true,
event: 'onRewardedVideoShown',
element: document
element: 'document'
})
onRewardedVideoShown(): Observable<any> { return; }
onRewardedVideoShown(): Observable<any> {
return;
}
@Cordova({
eventObservable: true,
event: 'onRewardedVideoFinished',
element: document
element: 'document'
})
onRewardedVideoFinished(): Observable<any> { return; }
onRewardedVideoFinished(): Observable<any> {
return;
}
@Cordova({
eventObservable: true,
event: 'onRewardedVideoClosed',
element: document
element: 'document'
})
onRewardedVideoClosed(): Observable<any> { return; }
onRewardedVideoClosed(): Observable<any> {
return;
}
@Cordova({
eventObservable: true,
event: 'onNonSkippableVideoLoaded',
element: document
element: 'document'
})
onNonSkippableVideoLoaded(): Observable<any> { return; }
onNonSkippableVideoLoaded(): Observable<any> {
return;
}
@Cordova({
eventObservable: true,
event: 'onNonSkippableVideoFailedToLoad',
element: document
element: 'document'
})
onNonSkippableVideoFailedToLoad(): Observable<any> { return; }
onNonSkippableVideoFailedToLoad(): Observable<any> {
return;
}
@Cordova({
eventObservable: true,
event: 'onNonSkippableVideoShown',
element: document
element: 'document'
})
onNonSkippableVideoShown(): Observable<any> { return; }
onNonSkippableVideoShown(): Observable<any> {
return;
}
@Cordova({
eventObservable: true,
event: 'onNonSkippableVideoFinished',
element: document
element: 'document'
})
onNonSkippableVideoFinished(): Observable<any> { return; }
onNonSkippableVideoFinished(): Observable<any> {
return;
}
@Cordova({
eventObservable: true,
event: 'onNonSkippableVideoClosed',
element: document
element: 'document'
})
onNonSkippableVideoClosed(): Observable<any> { return; }
onNonSkippableVideoClosed(): Observable<any> {
return;
}
@Cordova({
eventObservable: true,
event: 'onBannerClicked',
element: document
element: 'document'
})
onBannerClicked(): Observable<any> { return; }
onBannerClicked(): Observable<any> {
return;
}
@Cordova({
eventObservable: true,
event: 'onBannerFailedToLoad',
element: document
element: 'document'
})
onBannerFailedToLoad(): Observable<any> { return; }
onBannerFailedToLoad(): Observable<any> {
return;
}
@Cordova({
eventObservable: true,
event: 'onBannerLoaded',
element: document
element: 'document'
})
onBannerLoaded(): Observable<any> { return; }
onBannerLoaded(): Observable<any> {
return;
}
@Cordova({
eventObservable: true,
event: 'onBannerShown',
element: document
element: 'document'
})
onBannerShown(): Observable<any> { return; }
onBannerShown(): Observable<any> {
return;
}
}
+5 -3
View File
@@ -1,4 +1,4 @@
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
/**
@@ -36,12 +36,14 @@ export class Autostart extends IonicNativePlugin {
* Enable the automatic startup after the boot
*/
@Cordova({ sync: true })
enable(): void { }
enable(): void {
}
/**
* Disable the automatic startup after the boot
*/
@Cordova({ sync: true })
disable(): void { }
disable(): void {
}
}
@@ -1,4 +1,4 @@
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
export interface BackgroundFetchConfig {
@@ -27,7 +27,7 @@ export interface BackgroundFetchConfig {
*
* const config: BackgroundFetchConfig = {
* stopOnTerminate: false, // Set true to cease background-fetch from operating after user "closes" the app. Defaults to true.
* };
* }
*
* backgroundFetch.configure(config)
* .then(() => {
@@ -72,7 +72,9 @@ export class BackgroundFetch extends IonicNativePlugin {
@Cordova({
callbackOrder: 'reverse'
})
configure(config: BackgroundFetchConfig): Promise<any> { return; }
configure(config: BackgroundFetchConfig): Promise<any> {
return;
}
/**
* Start the background-fetch API.
@@ -80,14 +82,18 @@ export class BackgroundFetch extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
start(): Promise<any> { return; }
start(): Promise<any> {
return;
}
/**
* Stop the background-fetch API from firing fetch events. Your callbackFn provided to #configure will no longer be executed.
* @returns {Promise<any>}
*/
@Cordova()
stop(): Promise<any> { return; }
stop(): Promise<any> {
return;
}
/**
* You MUST call this method in your fetch callbackFn provided to #configure in order to signal to iOS that your fetch action is complete. iOS provides only 30s of background-time for a fetch-event -- if you exceed this 30s, iOS will kill your app.
@@ -95,13 +101,16 @@ export class BackgroundFetch extends IonicNativePlugin {
@Cordova({
sync: true
})
finish(): void { }
finish(): void {
}
/**
* Return the status of the background-fetch
* @returns {Promise<any>}
*/
@Cordova()
status(): Promise<any> { return; }
status(): Promise<any> {
return;
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
export interface BackgroundGeolocationResponse {
@@ -50,8 +50,8 @@ export interface BackgroundGeolocationResponse {
altitude: number;
/**
* accuracy of the altitude if available.
*/
* accuracy of the altitude if available.
*/
altitudeAccuracy: number;
/**
@@ -276,7 +276,7 @@ export interface BackgroundGeolocationConfig {
* distanceFilter: 30,
* debug: true, // enable this hear sounds for background-geolocation life-cycle.
* stopOnTerminate: false, // enable this to clear background location settings when the app terminates
* };
* }
*
* this.backgroundGeolocation.configure(config)
* .subscribe((location: BackgroundGeolocationResponse) => {
@@ -369,7 +369,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
callbackOrder: 'reverse',
observable: true
})
configure(options: BackgroundGeolocationConfig): Observable<BackgroundGeolocationResponse> { return; }
configure(options: BackgroundGeolocationConfig): Observable<BackgroundGeolocationResponse> {
return;
}
/**
* Turn ON the background-geolocation system.
@@ -377,14 +379,18 @@ export class BackgroundGeolocation extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
start(): Promise<any> { return; }
start(): Promise<any> {
return;
}
/**
* Turn OFF background-tracking
* @returns {Promise<any>}
*/
@Cordova()
stop(): Promise<any> { return; }
stop(): Promise<any> {
return;
}
/**
* Inform the native plugin that you're finished, the background-task may be completed
@@ -393,7 +399,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
@Cordova({
platforms: ['iOS']
})
finish(): Promise<any> { return; }
finish(): Promise<any> {
return;
}
/**
* Force the plugin to enter "moving" or "stationary" state
@@ -403,7 +411,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
@Cordova({
platforms: ['iOS']
})
changePace(isMoving: boolean): Promise<any> { return; }
changePace(isMoving: boolean): Promise<any> {
return;
}
/**
* Setup configuration
@@ -413,7 +423,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
@Cordova({
callbackOrder: 'reverse'
})
setConfig(options: BackgroundGeolocationConfig): Promise<any> { return; }
setConfig(options: BackgroundGeolocationConfig): Promise<any> {
return;
}
/**
* Returns current stationaryLocation if available. null if not
@@ -422,7 +434,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
@Cordova({
platforms: ['iOS']
})
getStationaryLocation(): Promise<BackgroundGeolocationResponse> { return; }
getStationaryLocation(): Promise<BackgroundGeolocationResponse> {
return;
}
/**
* Add a stationary-region listener. Whenever the devices enters "stationary-mode",
@@ -432,7 +446,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
@Cordova({
platforms: ['iOS']
})
onStationary(): Promise<any> { return; }
onStationary(): Promise<any> {
return;
}
/**
* Check if location is enabled on the device
@@ -441,19 +457,23 @@ export class BackgroundGeolocation extends IonicNativePlugin {
@Cordova({
platforms: ['Android']
})
isLocationEnabled(): Promise<number> { return; }
isLocationEnabled(): Promise<number> {
return;
}
/**
* Display app settings to change permissions
*/
@Cordova({ sync: true })
showAppSettings(): void { }
showAppSettings(): void {
}
/**
* Display device location settings
*/
@Cordova({ sync: true })
showLocationSettings(): void { }
showLocationSettings(): void {
}
/**
* Method can be used to detect user changes in location services settings.
@@ -464,7 +484,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
@Cordova({
platforms: ['Android']
})
watchLocationMode(): Promise<boolean> { return; }
watchLocationMode(): Promise<boolean> {
return;
}
/**
* Stop watching for location mode changes.
@@ -473,7 +495,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
@Cordova({
platforms: ['Android']
})
stopWatchingLocationMode(): Promise<any> { return; }
stopWatchingLocationMode(): Promise<any> {
return;
}
/**
* Method will return all stored locations.
@@ -487,14 +511,18 @@ export class BackgroundGeolocation extends IonicNativePlugin {
@Cordova({
platforms: ['Android']
})
getLocations(): Promise<any> { return; }
getLocations(): Promise<any> {
return;
}
/**
* Method will return locations, which has not been yet posted to server. NOTE: Locations does contain locationId.
* @returns {Promise<any>}
*/
@Cordova()
getValidLocations(): Promise<any> { return; }
getValidLocations(): Promise<any> {
return;
}
/**
* Delete stored location by given locationId.
@@ -504,7 +532,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
@Cordova({
platforms: ['Android']
})
deleteLocation(locationId: number): Promise<any> { return; }
deleteLocation(locationId: number): Promise<any> {
return;
}
/**
* Delete all stored locations.
@@ -513,7 +543,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
@Cordova({
platforms: ['Android']
})
deleteAllLocations(): Promise<any> { return; }
deleteAllLocations(): Promise<any> {
return;
}
/**
* Normally plugin will handle switching between BACKGROUND and FOREGROUND mode itself.
@@ -531,7 +563,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
@Cordova({
platforms: ['iOS']
})
switchMode(modeId: number): Promise<any> { return; }
switchMode(modeId: number): Promise<any> {
return;
}
/**
* Return all logged events. Useful for plugin debugging. Parameter limit limits number of returned entries.
@@ -541,6 +575,8 @@ export class BackgroundGeolocation extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
getLogEntries(limit: number): Promise<any> { return; }
getLogEntries(limit: number): Promise<any> {
return;
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
@@ -82,14 +82,17 @@ export class BackgroundMode extends IonicNativePlugin {
@Cordova({
sync: true
})
enable(): void { }
enable(): void {
}
/**
* Disable the background mode.
* Once the background mode has been disabled, the app will be paused when in background.
*/
@Cordova()
disable(): Promise<any> { return; }
disable(): Promise<any> {
return;
}
/**
* Checks if background mode is enabled or not.
@@ -98,7 +101,9 @@ export class BackgroundMode extends IonicNativePlugin {
@Cordova({
sync: true
})
isEnabled(): boolean { return; }
isEnabled(): boolean {
return;
}
/**
* Can be used to get the information if the background mode is active.
@@ -107,7 +112,9 @@ export class BackgroundMode extends IonicNativePlugin {
@Cordova({
sync: true
})
isActive(): boolean { return; }
isActive(): boolean {
return;
}
/**
* Override the default title, ticker and text.
@@ -117,7 +124,9 @@ export class BackgroundMode extends IonicNativePlugin {
@Cordova({
platforms: ['Android']
})
setDefaults(options?: BackgroundModeConfiguration): Promise<any> { return; }
setDefaults(options?: BackgroundModeConfiguration): Promise<any> {
return;
}
/**
* Modify the displayed information.
@@ -128,7 +137,8 @@ export class BackgroundMode extends IonicNativePlugin {
platforms: ['Android'],
sync: true
})
configure(options?: BackgroundModeConfiguration): void {}
configure(options?: BackgroundModeConfiguration): void {
}
/**
* Listen for events that the plugin fires. Available events are `enable`, `disable`, `activate`, `deactivate` and `failure`.
@@ -140,7 +150,9 @@ export class BackgroundMode extends IonicNativePlugin {
clearFunction: 'un',
clearWithArgs: true
})
on(event: string): Observable<any> { return; }
on(event: string): Observable<any> {
return;
}
/**
* Android allows to programmatically move from foreground to background.
@@ -149,7 +161,8 @@ export class BackgroundMode extends IonicNativePlugin {
platforms: ['Android'],
sync: true
})
moveToBackground(): void { }
moveToBackground(): void {
}
/**
* Enable GPS-tracking in background (Android).
@@ -158,7 +171,8 @@ export class BackgroundMode extends IonicNativePlugin {
platforms: ['Android'],
sync: true
})
disableWebViewOptimizations (): void { }
disableWebViewOptimizations(): void {
}
/**
* Android allows to programmatically move from background to foreground.
@@ -167,7 +181,8 @@ export class BackgroundMode extends IonicNativePlugin {
platforms: ['Android'],
sync: true
})
moveToForeground(): void { }
moveToForeground(): void {
}
/**
* Override the back button on Android to go to background instead of closing the app.
@@ -176,7 +191,8 @@ export class BackgroundMode extends IonicNativePlugin {
platforms: ['Android'],
sync: true
})
overrideBackButton(): void { }
overrideBackButton(): void {
}
/**
* Exclude the app from the recent task list. Works on Android 5.0+.
@@ -185,7 +201,8 @@ export class BackgroundMode extends IonicNativePlugin {
platforms: ['Android'],
sync: true
})
excludeFromTaskList(): void { }
excludeFromTaskList(): void {
}
/**
* The method works async instead of isActive() or isEnabled().
@@ -193,7 +210,9 @@ export class BackgroundMode extends IonicNativePlugin {
@Cordova({
platforms: ['Android']
})
isScreenOff(): Promise<boolean> { return; }
isScreenOff(): Promise<boolean> {
return;
}
/**
* Turn screen on
@@ -202,7 +221,8 @@ export class BackgroundMode extends IonicNativePlugin {
platforms: ['Android'],
sync: true
})
wakeUp(): void { }
wakeUp(): void {
}
/**
* Turn screen on and show app even locked
@@ -211,6 +231,7 @@ export class BackgroundMode extends IonicNativePlugin {
platforms: ['Android'],
sync: true
})
unlock(): void { }
unlock(): void {
}
}
+7 -3
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
@@ -39,13 +39,17 @@ export class Backlight extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise that resolves when the backlight is on
*/
@Cordova()
on(): Promise<any> { return; }
on(): Promise<any> {
return;
}
/**
* This function turns backlight off
* @return {Promise<any>} Returns a promise that resolves when the backlight is off
*/
@Cordova()
off(): Promise<any> { return; }
off(): Promise<any> {
return;
}
}
+22 -8
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
@@ -37,7 +37,9 @@ export class Badge extends IonicNativePlugin {
* @returns {Promise<boolean>}
*/
@Cordova()
clear(): Promise<boolean> { return; }
clear(): Promise<boolean> {
return;
}
/**
* Set the badge of the app icon.
@@ -45,14 +47,18 @@ export class Badge extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
set(badgeNumber: number): Promise<any> { return; }
set(badgeNumber: number): Promise<any> {
return;
}
/**
* Get the badge of the app icon.
* @returns {Promise<any>}
*/
@Cordova()
get(): Promise<any> { return; }
get(): Promise<any> {
return;
}
/**
* Increase the badge number.
@@ -60,7 +66,9 @@ export class Badge extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
increase(increaseBy: number): Promise<any> { return; }
increase(increaseBy: number): Promise<any> {
return;
}
/**
* Decrease the badge number.
@@ -68,20 +76,26 @@ export class Badge extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
decrease(decreaseBy: number): Promise<any> { return; }
decrease(decreaseBy: number): Promise<any> {
return;
}
/**
* Determine if the app has permission to show badges.
* @returns {Promise<any>}
*/
@Cordova()
hasPermission(): Promise<any> { return; }
hasPermission(): Promise<any> {
return;
}
/**
* Register permission to set badge notifications
* @returns {Promise<any>}
*/
@Cordova()
registerPermission(): Promise<any> { return; }
registerPermission(): Promise<any> {
return;
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface BarcodeScannerOptions {
@@ -117,7 +117,9 @@ export class BarcodeScanner extends IonicNativePlugin {
@Cordova({
callbackOrder: 'reverse'
})
scan(options?: BarcodeScannerOptions): Promise<BarcodeScanResult> { return; }
scan(options?: BarcodeScannerOptions): Promise<BarcodeScanResult> {
return;
}
/**
* Encodes data into a barcode.
@@ -127,6 +129,8 @@ export class BarcodeScanner extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
encode(type: string, data: any): Promise<any> { return; }
encode(type: string, data: any): Promise<any> {
return;
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Base64 To Gallery
+4 -2
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @beta
@@ -40,6 +40,8 @@ export class Base64 extends IonicNativePlugin {
* @return {Promise<string>} Returns a promise that resolves when the file is successfully encoded
*/
@Cordova()
encodeFile(filePath: string): Promise<string> { return; }
encodeFile(filePath: string): Promise<string> {
return;
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
export interface BatteryStatusResponse {
@@ -62,7 +62,9 @@ export class BatteryStatus extends IonicNativePlugin {
eventObservable: true,
event: 'batterystatus'
})
onChange(): Observable<BatteryStatusResponse> { return; }
onChange(): Observable<BatteryStatusResponse> {
return;
}
/**
* Watch when the battery level goes low
@@ -72,7 +74,9 @@ export class BatteryStatus extends IonicNativePlugin {
eventObservable: true,
event: 'batterylow'
})
onLow(): Observable<BatteryStatusResponse> { return; }
onLow(): Observable<BatteryStatusResponse> {
return;
}
/**
* Watch when the battery level goes to critial
@@ -82,6 +86,8 @@ export class BatteryStatus extends IonicNativePlugin {
eventObservable: true,
event: 'batterycritical'
})
onCritical(): Observable<BatteryStatusResponse> { return; }
onCritical(): Observable<BatteryStatusResponse> {
return;
}
}
+67 -43
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
/**
@@ -194,7 +194,9 @@ export class BLE extends IonicNativePlugin {
@Cordova({
observable: true
})
scan(services: string[], seconds: number): Observable<any> { return; }
scan(services: string[], seconds: number): Observable<any> {
return;
}
/**
* Scan and discover BLE peripherals until `stopScan` is called.
@@ -217,7 +219,9 @@ export class BLE extends IonicNativePlugin {
clearFunction: 'stopScan',
clearWithArgs: false
})
startScan(services: string[]): Observable<any> { return; }
startScan(services: string[]): Observable<any> {
return;
}
/**
* Scans for BLE devices. This function operates similarly to the `startScan` function, but allows you to specify extra options (like allowing duplicate device reports).
@@ -230,7 +234,9 @@ export class BLE extends IonicNativePlugin {
clearFunction: 'stopScan',
clearWithArgs: false
})
startScanWithOptions(services: string[], options: { reportDuplicates?: boolean } | any): Observable<any> { return; }
startScanWithOptions(services: string[], options: { reportDuplicates?: boolean } | any): Observable<any> {
return;
}
/**
* Stop a scan started by `startScan`.
@@ -247,7 +253,9 @@ export class BLE extends IonicNativePlugin {
* @return returns a Promise.
*/
@Cordova()
stopScan(): Promise<any> { return; }
stopScan(): Promise<any> {
return;
}
/**
* Connect to a peripheral.
@@ -268,7 +276,9 @@ export class BLE extends IonicNativePlugin {
clearFunction: 'disconnect',
clearWithArgs: true
})
connect(deviceId: string): Observable<any> { return; }
connect(deviceId: string): Observable<any> {
return;
}
/**
* Disconnect from a peripheral.
@@ -282,7 +292,9 @@ export class BLE extends IonicNativePlugin {
* @return Returns a Promise
*/
@Cordova()
disconnect(deviceId: string): Promise<any> { return; }
disconnect(deviceId: string): Promise<any> {
return;
}
/**
* Read the value of a characteristic.
@@ -293,11 +305,11 @@ export class BLE extends IonicNativePlugin {
* @return Returns a Promise
*/
@Cordova()
read(
deviceId: string,
serviceUUID: string,
characteristicUUID: string
): Promise<any> { return; };
read(deviceId: string,
serviceUUID: string,
characteristicUUID: string): Promise<any> {
return;
}
/**
* Write the value of a characteristic.
@@ -328,12 +340,12 @@ export class BLE extends IonicNativePlugin {
* @return Returns a Promise
*/
@Cordova()
write(
deviceId: string,
serviceUUID: string,
characteristicUUID: string,
value: ArrayBuffer
): Promise<any> { return; }
write(deviceId: string,
serviceUUID: string,
characteristicUUID: string,
value: ArrayBuffer): Promise<any> {
return;
}
/**
* Write the value of a characteristic without waiting for confirmation from the peripheral.
@@ -345,12 +357,12 @@ export class BLE extends IonicNativePlugin {
* @return Returns a Promise
*/
@Cordova()
writeWithoutResponse(
deviceId: string,
serviceUUID: string,
characteristicUUID: string,
value: ArrayBuffer
): Promise<any> { return; }
writeWithoutResponse(deviceId: string,
serviceUUID: string,
characteristicUUID: string,
value: ArrayBuffer): Promise<any> {
return;
}
/**
* Register to be notified when the value of a characteristic changes.
@@ -372,11 +384,11 @@ export class BLE extends IonicNativePlugin {
clearFunction: 'stopNotification',
clearWithArgs: true
})
startNotification(
deviceId: string,
serviceUUID: string,
characteristicUUID: string
): Observable<any> { return; }
startNotification(deviceId: string,
serviceUUID: string,
characteristicUUID: string): Observable<any> {
return;
}
/**
* Stop being notified when the value of a characteristic changes.
@@ -387,11 +399,11 @@ export class BLE extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
stopNotification(
deviceId: string,
serviceUUID: string,
characteristicUUID: string
): Promise<any> { return; }
stopNotification(deviceId: string,
serviceUUID: string,
characteristicUUID: string): Promise<any> {
return;
}
/**
* Report the connection status.
@@ -407,7 +419,9 @@ export class BLE extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
isConnected(deviceId: string): Promise<any> { return; }
isConnected(deviceId: string): Promise<any> {
return;
}
/**
* Report if bluetooth is enabled.
@@ -415,7 +429,9 @@ export class BLE extends IonicNativePlugin {
* @returns {Promise<void>} Returns a Promise that resolves if Bluetooth is enabled, and rejects if disabled.
*/
@Cordova()
isEnabled(): Promise<void> { return; }
isEnabled(): Promise<void> {
return;
}
/**
* Register to be notified when Bluetooth state changes on the device.
@@ -434,7 +450,9 @@ export class BLE extends IonicNativePlugin {
clearFunction: 'stopStateNotifications',
clearWithArgs: false
})
startStateNotifications(): Observable<any> { return; }
startStateNotifications(): Observable<any> {
return;
}
/**
* Stop state notifications.
@@ -442,7 +460,9 @@ export class BLE extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
stopStateNotifications(): Promise<any> { return; }
stopStateNotifications(): Promise<any> {
return;
}
/**
* Open System Bluetooth settings (Android only).
@@ -450,7 +470,9 @@ export class BLE extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
showBluetoothSettings(): Promise<any> { return; }
showBluetoothSettings(): Promise<any> {
return;
}
/**
* Enable Bluetooth on the device (Android only).
@@ -458,7 +480,9 @@ export class BLE extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
enable(): Promise<any> { return; }
enable(): Promise<any> {
return;
}
/**
* Read the RSSI value on the device connection.
@@ -468,7 +492,7 @@ export class BLE extends IonicNativePlugin {
*@returns {Promise<any>}
*/
@Cordova()
readRSSI(
deviceId: string,
): Promise<any> { return; }
readRSSI(deviceId: string): Promise<any> {
return;
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
/**
@@ -50,7 +50,9 @@ export class BluetoothSerial extends IonicNativePlugin {
observable: true,
clearFunction: 'disconnect'
})
connect(macAddress_or_uuid: string): Observable<any> { return; }
connect(macAddress_or_uuid: string): Observable<any> {
return;
}
/**
* Connect insecurely to a Bluetooth device
@@ -62,14 +64,18 @@ export class BluetoothSerial extends IonicNativePlugin {
observable: true,
clearFunction: 'disconnect'
})
connectInsecure(macAddress: string): Observable<any> { return; }
connectInsecure(macAddress: string): Observable<any> {
return;
}
/**
* Disconnect from the connected device
* @returns {Promise<any>}
*/
@Cordova()
disconnect(): Promise<any> { return; }
disconnect(): Promise<any> {
return;
}
/**
* Writes data to the serial port
@@ -79,7 +85,9 @@ export class BluetoothSerial extends IonicNativePlugin {
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone']
})
write(data: any): Promise<any> { return; }
write(data: any): Promise<any> {
return;
}
/**
* Gets the number of bytes of data available
@@ -87,7 +95,10 @@ export class BluetoothSerial extends IonicNativePlugin {
*/
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone']
}) available(): Promise<any> { return; }
})
available(): Promise<any> {
return;
}
/**
* Reads data from the buffer
@@ -96,7 +107,9 @@ export class BluetoothSerial extends IonicNativePlugin {
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone']
})
read(): Promise<any> { return; }
read(): Promise<any> {
return;
}
/**
* Reads data from the buffer until it reaches a delimiter
@@ -106,7 +119,9 @@ export class BluetoothSerial extends IonicNativePlugin {
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone']
})
readUntil(delimiter: string): Promise<any> { return; }
readUntil(delimiter: string): Promise<any> {
return;
}
/**
* Subscribe to be notified when data is received
@@ -118,7 +133,9 @@ export class BluetoothSerial extends IonicNativePlugin {
observable: true,
clearFunction: 'unsubscribe'
})
subscribe(delimiter: string): Observable<any> { return; }
subscribe(delimiter: string): Observable<any> {
return;
}
/**
* Subscribe to be notified when data is received
@@ -129,7 +146,9 @@ export class BluetoothSerial extends IonicNativePlugin {
observable: true,
clearFunction: 'unsubscribeRawData'
})
subscribeRawData(): Observable<any> { return; }
subscribeRawData(): Observable<any> {
return;
}
/**
* Clears data in buffer
@@ -138,7 +157,9 @@ export class BluetoothSerial extends IonicNativePlugin {
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone']
})
clear(): Promise<any> { return; }
clear(): Promise<any> {
return;
}
/**
* Lists bonded devices
@@ -147,7 +168,9 @@ export class BluetoothSerial extends IonicNativePlugin {
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone']
})
list(): Promise<any> { return; }
list(): Promise<any> {
return;
}
/**
* Reports if bluetooth is enabled
@@ -156,7 +179,9 @@ export class BluetoothSerial extends IonicNativePlugin {
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone']
})
isEnabled(): Promise<any> { return; }
isEnabled(): Promise<any> {
return;
}
/**
* Reports the connection status
@@ -165,7 +190,9 @@ export class BluetoothSerial extends IonicNativePlugin {
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone']
})
isConnected(): Promise<any> { return; }
isConnected(): Promise<any> {
return;
}
/**
* Reads the RSSI from the connected peripheral
@@ -174,7 +201,9 @@ export class BluetoothSerial extends IonicNativePlugin {
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone']
})
readRSSI(): Promise<any> { return; }
readRSSI(): Promise<any> {
return;
}
/**
* Show the Bluetooth settings on the device
@@ -183,7 +212,9 @@ export class BluetoothSerial extends IonicNativePlugin {
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone']
})
showBluetoothSettings(): Promise<any> { return; }
showBluetoothSettings(): Promise<any> {
return;
}
/**
* Enable Bluetooth on the device
@@ -192,7 +223,9 @@ export class BluetoothSerial extends IonicNativePlugin {
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone']
})
enable(): Promise<any> { return; }
enable(): Promise<any> {
return;
}
/**
* Discover unpaired devices
@@ -201,7 +234,9 @@ export class BluetoothSerial extends IonicNativePlugin {
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone']
})
discoverUnpaired(): Promise<any> { return; }
discoverUnpaired(): Promise<any> {
return;
}
/**
* Subscribe to be notified on Bluetooth device discovery. Discovery process must be initiated with the `discoverUnpaired` function.
@@ -212,7 +247,9 @@ export class BluetoothSerial extends IonicNativePlugin {
observable: true,
clearFunction: 'clearDeviceDiscoveredListener'
})
setDeviceDiscoveredListener(): Observable<any> { return; }
setDeviceDiscoveredListener(): Observable<any> {
return;
}
/**
* Sets the human readable device name that is broadcasted to other devices
@@ -222,7 +259,8 @@ export class BluetoothSerial extends IonicNativePlugin {
platforms: ['Android'],
sync: true
})
setName(newName: string): void { }
setName(newName: string): void {
}
/**
* Makes the device discoverable by other devices
@@ -232,6 +270,7 @@ export class BluetoothSerial extends IonicNativePlugin {
platforms: ['Android'],
sync: true
})
setDiscoverable(discoverableDuration: number): void { }
setDiscoverable(discoverableDuration: number): void {
}
}
+13 -8
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* Options for the setupApplePay method.
@@ -116,8 +116,7 @@ export interface PaymentUIResult {
/**
* Information about the Apple Pay card used to complete a payment (if Apple Pay was used).
*/
applePaycard: {
};
applePaycard: {};
/**
* Information about 3D Secure card used to complete a payment (if 3D Secure was used).
@@ -167,12 +166,12 @@ export interface PaymentUIResult {
* merchantId: '<YOUR MERCHANT ID>',
* currency: 'USD',
* country: 'US'
* };
* }
*
* const paymentOptions: PaymentUIOptions = {
* amount: '14.99',
* primaryDescription: 'Your product or service (per /item, /month, /week, etc)',
* };
* }
*
* this.braintree.initialize(BRAINTREE_TOKEN)
* .then(() => this.braintree.setupApplePay(appleOptions))
@@ -217,7 +216,9 @@ export class Braintree extends IonicNativePlugin {
@Cordova({
platforms: ['Android', 'iOS'],
})
initialize(token: string): Promise<undefined | string> { return; }
initialize(token: string): Promise<undefined | string> {
return;
}
/**
* Used to configure Apple Pay on iOS.
@@ -234,7 +235,9 @@ export class Braintree extends IonicNativePlugin {
@Cordova({
platforms: ['iOS'],
})
setupApplePay(options: ApplePayOptions): Promise<undefined | string> { return; }
setupApplePay(options: ApplePayOptions): Promise<undefined | string> {
return;
}
/**
* Shows Braintree's Drop-In Payments UI.
@@ -246,5 +249,7 @@ export class Braintree extends IonicNativePlugin {
@Cordova({
platforms: ['Android', 'iOS'],
})
presentDropInPaymentUI(options?: PaymentUIOptions): Promise<PaymentUIResult | string> { return; }
presentDropInPaymentUI(options?: PaymentUIOptions): Promise<PaymentUIResult | string> {
return;
}
}
+11 -6
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
@@ -39,7 +39,9 @@ export class Brightness extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise that resolves if setting brightness was successful.
*/
@Cordova()
setBrightness(value: number): Promise<any> { return; }
setBrightness(value: number): Promise<any> {
return;
}
/**
* Reads the current brightness of the device display.
@@ -48,12 +50,15 @@ export class Brightness extends IonicNativePlugin {
* brightness value of the device display (floating number between 0 and 1).
*/
@Cordova()
getBrightness(): Promise<any> { return; }
getBrightness(): Promise<any> {
return;
}
/**
* Keeps the screen on. Prevents the device from setting the screen to sleep.
*/
* Keeps the screen on. Prevents the device from setting the screen to sleep.
*/
@Cordova()
setKeepScreenOn(value: boolean): void { }
setKeepScreenOn(value: boolean): void {
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
/**
@@ -43,7 +43,9 @@ export class Broadcaster extends IonicNativePlugin {
clearFunction: 'removeEventListener',
clearWithArgs: true
})
addEventListener(eventName: string): Observable<any> { return; }
addEventListener(eventName: string): Observable<any> {
return;
}
/**
* This function sends data to the native code
@@ -52,6 +54,8 @@ export class Broadcaster extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise that resolves when an event is successfully fired
*/
@Cordova()
fireNativeEvent(eventName: string, eventData: any): Promise<any> { return; }
fireNativeEvent(eventName: string, eventData: any): Promise<any> {
return;
}
}
+10 -4
View File
@@ -1,4 +1,4 @@
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
/**
@@ -47,7 +47,9 @@ export class BrowserTab extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise that resolves when check is successful and returns true or false
*/
@Cordova()
isAvailable(): Promise<any> { return; }
isAvailable(): Promise<any> {
return;
}
/**
* Opens the provided URL using a browser tab
@@ -55,12 +57,16 @@ export class BrowserTab extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise that resolves when check open was successful
*/
@Cordova()
openUrl(url: string): Promise<any> { return; }
openUrl(url: string): Promise<any> {
return;
}
/**
* Closes browser tab
* @return {Promise<any>} Returns a promise that resolves when close was finished
*/
@Cordova()
close(): Promise<any> { return; }
close(): Promise<any> {
return;
}
}
+126 -100
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface CalendarOptions {
@@ -95,42 +95,54 @@ export class Calendar extends IonicNativePlugin {
* @returns {Promise<boolean>}
*/
@Cordova()
hasReadWritePermission(): Promise<boolean> { return; }
hasReadWritePermission(): Promise<boolean> {
return;
}
/**
* Check if we have read permission
* @returns {Promise<boolean>}
*/
@Cordova()
hasReadPermission(): Promise<boolean> { return; }
hasReadPermission(): Promise<boolean> {
return;
}
/**
* Check if we have write permission
* @returns {Promise<boolean>}
*/
@Cordova()
hasWritePermission(): Promise<boolean> { return; }
hasWritePermission(): Promise<boolean> {
return;
}
/**
* Request write permission
* @returns {Promise<any>}
*/
@Cordova()
requestWritePermission(): Promise<any> { return; }
requestWritePermission(): Promise<any> {
return;
}
/**
* Request read permission
* @returns {Promise<any>}
*/
@Cordova()
requestReadPermission(): Promise<any> { return; }
requestReadPermission(): Promise<any> {
return;
}
/**
* Requests read/write permissions
* @returns {Promise<any>}
*/
@Cordova()
requestReadWritePermission(): Promise<any> { return; }
requestReadWritePermission(): Promise<any> {
return;
}
/**
* Create a calendar. (iOS only)
@@ -139,7 +151,9 @@ export class Calendar extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise
*/
@Cordova()
createCalendar(nameOrOptions: string | any): Promise<any> { return; }
createCalendar(nameOrOptions: string | any): Promise<any> {
return;
}
/**
* Delete a calendar. (iOS only)
@@ -147,7 +161,9 @@ export class Calendar extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise
*/
@Cordova()
deleteCalendar(name: string): Promise<any> { return; }
deleteCalendar(name: string): Promise<any> {
return;
}
/**
* Returns the default calendar options.
@@ -157,7 +173,9 @@ export class Calendar extends IonicNativePlugin {
@Cordova({
sync: true
})
getCalendarOptions(): CalendarOptions { return; }
getCalendarOptions(): CalendarOptions {
return;
}
/**
* Silently create an event.
@@ -169,13 +187,13 @@ export class Calendar extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise
*/
@Cordova()
createEvent(
title?: string,
location?: string,
notes?: string,
startDate?: Date,
endDate?: Date
): Promise<any> { return; }
createEvent(title?: string,
location?: string,
notes?: string,
startDate?: Date,
endDate?: Date): Promise<any> {
return;
}
/**
* Silently create an event with additional options.
@@ -189,14 +207,14 @@ export class Calendar extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise
*/
@Cordova()
createEventWithOptions(
title?: string,
location?: string,
notes?: string,
startDate?: Date,
endDate?: Date,
options?: CalendarOptions
): Promise<any> { return; }
createEventWithOptions(title?: string,
location?: string,
notes?: string,
startDate?: Date,
endDate?: Date,
options?: CalendarOptions): Promise<any> {
return;
}
/**
* Interactively create an event.
@@ -209,13 +227,13 @@ export class Calendar extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise
*/
@Cordova()
createEventInteractively(
title?: string,
location?: string,
notes?: string,
startDate?: Date,
endDate?: Date
): Promise<any> { return; }
createEventInteractively(title?: string,
location?: string,
notes?: string,
startDate?: Date,
endDate?: Date): Promise<any> {
return;
}
/**
* Interactively create an event with additional options.
@@ -229,14 +247,14 @@ export class Calendar extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
createEventInteractivelyWithOptions(
title?: string,
location?: string,
notes?: string,
startDate?: Date,
endDate?: Date,
options?: CalendarOptions
): Promise<any> { return; }
createEventInteractivelyWithOptions(title?: string,
location?: string,
notes?: string,
startDate?: Date,
endDate?: Date,
options?: CalendarOptions): Promise<any> {
return;
}
/**
* Find an event.
@@ -249,13 +267,13 @@ export class Calendar extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
findEvent(
title?: string,
location?: string,
notes?: string,
startDate?: Date,
endDate?: Date
): Promise<any> { return; }
findEvent(title?: string,
location?: string,
notes?: string,
startDate?: Date,
endDate?: Date): Promise<any> {
return;
}
/**
* Find an event with additional options.
@@ -268,14 +286,14 @@ export class Calendar extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise that resolves with the event, or rejects with an error.
*/
@Cordova()
findEventWithOptions(
title?: string,
location?: string,
notes?: string,
startDate?: Date,
endDate?: Date,
options?: CalendarOptions
): Promise<any> { return; }
findEventWithOptions(title?: string,
location?: string,
notes?: string,
startDate?: Date,
endDate?: Date,
options?: CalendarOptions): Promise<any> {
return;
}
/**
* Find a list of events within the specified date range. (Android only)
@@ -287,14 +305,18 @@ export class Calendar extends IonicNativePlugin {
@Cordova({
platforms: ['Android']
})
listEventsInRange(startDate: Date, endDate: Date): Promise<any> { return; }
listEventsInRange(startDate: Date, endDate: Date): Promise<any> {
return;
}
/**
* Get a list of all calendars.
* @returns {Promise<any>} A Promise that resolves with the list of calendars, or rejects with an error.
*/
@Cordova()
listCalendars(): Promise<any> { return; }
listCalendars(): Promise<any> {
return;
}
/**
* Get a list of all future events in the specified calendar. (iOS only)
@@ -303,7 +325,9 @@ export class Calendar extends IonicNativePlugin {
@Cordova({
platforms: ['iOS']
})
findAllEventsInNamedCalendar(calendarName: string): Promise<any> { return; }
findAllEventsInNamedCalendar(calendarName: string): Promise<any> {
return;
}
/**
* Modify an event. (iOS only)
@@ -323,18 +347,18 @@ export class Calendar extends IonicNativePlugin {
@Cordova({
platforms: ['iOS']
})
modifyEvent(
title?: string,
location?: string,
notes?: string,
startDate?: Date,
endDate?: Date,
newTitle?: string,
newLocation?: string,
newNotes?: string,
newStartDate?: Date,
newEndDate?: Date
): Promise<any> { return; }
modifyEvent(title?: string,
location?: string,
notes?: string,
startDate?: Date,
endDate?: Date,
newTitle?: string,
newLocation?: string,
newNotes?: string,
newStartDate?: Date,
newEndDate?: Date): Promise<any> {
return;
}
/**
* Modify an event with additional options. (iOS only)
@@ -356,20 +380,20 @@ export class Calendar extends IonicNativePlugin {
@Cordova({
platforms: ['iOS']
})
modifyEventWithOptions(
title?: string,
location?: string,
notes?: string,
startDate?: Date,
endDate?: Date,
newTitle?: string,
newLocation?: string,
newNotes?: string,
newStartDate?: Date,
newEndDate?: Date,
filterOptions?: CalendarOptions,
newOptions?: CalendarOptions
): Promise<any> { return; }
modifyEventWithOptions(title?: string,
location?: string,
notes?: string,
startDate?: Date,
endDate?: Date,
newTitle?: string,
newLocation?: string,
newNotes?: string,
newStartDate?: Date,
newEndDate?: Date,
filterOptions?: CalendarOptions,
newOptions?: CalendarOptions): Promise<any> {
return;
}
/**
* Delete an event.
@@ -382,13 +406,13 @@ export class Calendar extends IonicNativePlugin {
* @return Returns a Promise
*/
@Cordova()
deleteEvent(
title?: string,
location?: string,
notes?: string,
startDate?: Date,
endDate?: Date
): Promise<any> { return; }
deleteEvent(title?: string,
location?: string,
notes?: string,
startDate?: Date,
endDate?: Date): Promise<any> {
return;
}
/**
* Delete an event from the specified Calendar. (iOS only)
@@ -404,14 +428,14 @@ export class Calendar extends IonicNativePlugin {
@Cordova({
platforms: ['iOS']
})
deleteEventFromNamedCalendar(
title?: string,
location?: string,
notes?: string,
startDate?: Date,
endDate?: Date,
calendarName?: string
): Promise<any> { return; }
deleteEventFromNamedCalendar(title?: string,
location?: string,
notes?: string,
startDate?: Date,
endDate?: Date,
calendarName?: string): Promise<any> {
return;
}
/**
* Open the calendar at the specified date.
@@ -419,6 +443,8 @@ export class Calendar extends IonicNativePlugin {
* @return {Promise<any>} Promise returns a promise
*/
@Cordova()
openCalendar(date: Date): Promise<any> { return; }
openCalendar(date: Date): Promise<any> {
return;
}
}
@@ -1,5 +1,6 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Call Number
* @description
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface CameraPreviewDimensions {
/** The width of the camera preview, default to window.screen.width */
@@ -77,7 +77,7 @@ export interface CameraPreviewPictureOptions {
* previewDrag: true,
* toBack: true,
* alpha: 1
* };
* }
*
* // start camera
* this.cameraPreview.startCamera(cameraPreviewOpts).then(
@@ -189,35 +189,45 @@ export class CameraPreview extends IonicNativePlugin {
successIndex: 1,
errorIndex: 2
})
startCamera(options: CameraPreviewOptions): Promise<any> { return; }
startCamera(options: CameraPreviewOptions): Promise<any> {
return;
}
/**
* Stops the camera preview instance. (iOS & Android)
* @return {Promise<any>}
*/
@Cordova()
stopCamera(): Promise<any> { return; }
stopCamera(): Promise<any> {
return;
}
/**
* Switch from the rear camera and front camera, if available.
* @return {Promise<any>}
*/
@Cordova()
switchCamera(): Promise<any> { return; }
switchCamera(): Promise<any> {
return;
}
/**
* Hide the camera preview box.
* @return {Promise<any>}
*/
@Cordova()
hide(): Promise<any> { return; }
hide(): Promise<any> {
return;
}
/**
* Show the camera preview box.
* @return {Promise<any>}
*/
@Cordova()
show(): Promise<any> { return; }
show(): Promise<any> {
return;
}
/**
* Take the picture (base64)
@@ -228,7 +238,9 @@ export class CameraPreview extends IonicNativePlugin {
successIndex: 1,
errorIndex: 2
})
takePicture(options?: CameraPreviewPictureOptions): Promise<any> { return; }
takePicture(options?: CameraPreviewPictureOptions): Promise<any> {
return;
}
/**
*
@@ -241,7 +253,9 @@ export class CameraPreview extends IonicNativePlugin {
successIndex: 1,
errorIndex: 2
})
setColorEffect(effect: string): Promise<any> { return; }
setColorEffect(effect: string): Promise<any> {
return;
}
/**
* Set the zoom (Android)
@@ -252,21 +266,27 @@ export class CameraPreview extends IonicNativePlugin {
successIndex: 1,
errorIndex: 2
})
setZoom(zoom?: number): Promise<any> { return; }
setZoom(zoom?: number): Promise<any> {
return;
}
/**
* Get the maximum zoom (Android)
* @return {Promise<any>}
*/
* Get the maximum zoom (Android)
* @return {Promise<any>}
*/
@Cordova()
getMaxZoom(): Promise<any> { return; }
getMaxZoom(): Promise<any> {
return;
}
/**
* Get current zoom (Android)
* @return {Promise<any>}
*/
@Cordova()
getZoom(): Promise<any> { return; }
getZoom(): Promise<any> {
return;
}
/**
* Set the preview Size
@@ -277,14 +297,18 @@ export class CameraPreview extends IonicNativePlugin {
successIndex: 1,
errorIndex: 2
})
setPreviewSize(dimensions?: CameraPreviewDimensions): Promise<any> { return; }
setPreviewSize(dimensions?: CameraPreviewDimensions): Promise<any> {
return;
}
/**
* Get focus mode
* @return {Promise<any>}
*/
@Cordova()
getFocusMode(): Promise<any> { return; }
getFocusMode(): Promise<any> {
return;
}
/**
* Set the focus mode
@@ -295,21 +319,27 @@ export class CameraPreview extends IonicNativePlugin {
successIndex: 1,
errorIndex: 2
})
setFocusMode(focusMode?: string): Promise<any> { return; }
setFocusMode(focusMode?: string): Promise<any> {
return;
}
/**
* Get supported focus modes
* @return {Promise<any>}
*/
@Cordova()
getSupportedFocusModes(): Promise<any> { return; }
getSupportedFocusModes(): Promise<any> {
return;
}
/**
* Get the current flash mode
* @return {Promise<any>}
*/
@Cordova()
getFlashMode(): Promise<any> { return; }
getFlashMode(): Promise<any> {
return;
}
/**
* Set the flashmode
@@ -320,35 +350,45 @@ export class CameraPreview extends IonicNativePlugin {
successIndex: 1,
errorIndex: 2
})
setFlashMode(flashMode?: string): Promise<any> { return; }
setFlashMode(flashMode?: string): Promise<any> {
return;
}
/**
* Get supported flash modes
* @return {Promise<any>}
*/
@Cordova()
getSupportedFlashModes(): Promise<any> { return; }
getSupportedFlashModes(): Promise<any> {
return;
}
/**
* Get supported picture sizes
* @return {Promise<any>}
*/
@Cordova()
getSupportedPictureSizes(): Promise<any> { return; }
getSupportedPictureSizes(): Promise<any> {
return;
}
/**
* Get exposure mode
* @return {Promise<any>}
*/
@Cordova()
getExposureMode(): Promise<any> { return; }
getExposureMode(): Promise<any> {
return;
}
/**
* Get exposure modes
* @return {Promise<any>}
*/
@Cordova()
getExposureModes(): Promise<any> { return; }
getExposureModes(): Promise<any> {
return;
}
/**
* Set exposure mode
@@ -359,14 +399,18 @@ export class CameraPreview extends IonicNativePlugin {
successIndex: 1,
errorIndex: 2
})
setExposureMode(lock?: string): Promise<any> { return; }
setExposureMode(lock?: string): Promise<any> {
return;
}
/**
* Get exposure compensation (Android)
* @return {Promise<any>}
*/
@Cordova()
getExposureCompensation(): Promise<any> { return; }
getExposureCompensation(): Promise<any> {
return;
}
/**
* Set exposure compensation (Android)
@@ -377,14 +421,18 @@ export class CameraPreview extends IonicNativePlugin {
successIndex: 1,
errorIndex: 2
})
setExposureCompensation(exposureCompensation?: number): Promise<any> { return; }
setExposureCompensation(exposureCompensation?: number): Promise<any> {
return;
}
/**
* Get exposure compensation range (Android)
* @return {Promise<any>}
*/
@Cordova()
getExposureCompensationRange(): Promise<any> { return; }
getExposureCompensationRange(): Promise<any> {
return;
}
/**
* Set specific focus point. Note, this assumes the camera is full-screen.
@@ -393,6 +441,8 @@ export class CameraPreview extends IonicNativePlugin {
* @return {Promise<any>}
*/
@Cordova()
tapToFocus(xPoint: number, yPoint: number): Promise<any> { return; }
tapToFocus(xPoint: number, yPoint: number): Promise<any> {
return;
}
}
+8 -4
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface CameraOptions {
/** Picture quality in range 0-100. Default is 50 */
@@ -33,7 +33,7 @@ export interface CameraOptions {
/**
* Width in pixels to scale image. Must be used with targetHeight.
* Aspect ratio remains constant.
*/
*/
targetWidth?: number;
/**
* Height in pixels to scale image. Must be used with targetWidth.
@@ -243,7 +243,9 @@ export class Camera extends IonicNativePlugin {
@Cordova({
callbackOrder: 'reverse'
})
getPicture(options?: CameraOptions): Promise<any> { return; }
getPicture(options?: CameraOptions): Promise<any> {
return;
}
/**
* Remove intermediate image files that are kept in temporary storage after calling camera.getPicture.
@@ -253,6 +255,8 @@ export class Camera extends IonicNativePlugin {
@Cordova({
platforms: ['iOS']
})
cleanup(): Promise<any> { return; };
cleanup(): Promise<any> {
return;
}
}
+14 -8
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface CardIOOptions {
@@ -9,7 +9,7 @@ export interface CardIOOptions {
requireExpiry?: boolean;
/**
* The user will be prompted for the card CVV
* The user will be prompted for the card CVV
*/
requireCVV?: boolean;
@@ -19,7 +19,7 @@ export interface CardIOOptions {
requirePostalCode?: boolean;
/**
* Removes the keyboard button from the scan screen.
* Removes the keyboard button from the scan screen.
*/
supressManual?: boolean;
@@ -44,7 +44,7 @@ export interface CardIOOptions {
scanInstructions?: string;
/**
* If set, the card will not be scanned with the camera.
* If set, the card will not be scanned with the camera.
*/
noCamera?: boolean;
@@ -154,7 +154,7 @@ export interface CardIOResponse {
* requireExpiry: true,
* requireCVV: false,
* requirePostalCode: false
* };
* }
* CardIO.scan(options);
* }
* }
@@ -181,7 +181,9 @@ export class CardIO extends IonicNativePlugin {
* @returns {Promise<boolean>}
*/
@Cordova()
canScan(): Promise<boolean> { return; }
canScan(): Promise<boolean> {
return;
}
/**
* Scan a credit card with card.io.
@@ -189,13 +191,17 @@ export class CardIO extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
scan(options?: CardIOOptions): Promise<CardIOResponse> { return; }
scan(options?: CardIOOptions): Promise<CardIOResponse> {
return;
}
/**
* Retrieve the version of the card.io library. Useful when contacting support.
* @returns {Promise<string>}
*/
@Cordova()
version(): Promise<string> { return; }
version(): Promise<string> {
return;
}
}
+8 -3
View File
@@ -1,5 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Clipboard
* @description
@@ -43,13 +44,17 @@ export class Clipboard extends IonicNativePlugin {
* @returns {Promise<any>} Returns a promise after the text has been copied
*/
@Cordova()
copy(text: string): Promise<any> { return; }
copy(text: string): Promise<any> {
return;
}
/**
* Pastes the text stored in clipboard
* @returns {Promise<any>} Returns a promise after the text has been pasted
*/
@Cordova()
paste(): Promise<any> { return; }
paste(): Promise<any> {
return;
}
}
+21 -4
View File
@@ -1,6 +1,7 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
namespace Http {
export const enum Verb {
GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, CONNECT, PATCH
@@ -13,6 +14,7 @@ namespace Http {
export interface Requester {
request(verb: Verb, url: string, callback: Callback<Response>): void;
request(verb: Verb, url: string, requestBody: string, callback: Callback<Response>): void;
}
}
@@ -93,20 +95,24 @@ export interface ILocalPackage extends IPackage {
* Decomposed static side of RemotePackage.
* For Class Decomposition guidelines see http://www.typescriptlang.org/Handbook#writing-dts-files-guidelines-and-specifics
*/
/* tslint:disable */
interface RemotePackage_Static {
new (): IRemotePackage;
}
/* tslint:enable */
/**
* Decomposed static side of LocalPackage.
* For Class Decomposition guidelines see http://www.typescriptlang.org/Handbook#writing-dts-files-guidelines-and-specifics
*/
/* tslint:disable */
interface LocalPackage_Static {
new (): ILocalPackage;
}
/* tslint:enable */
declare const RemotePackage: RemotePackage_Static;
@@ -127,9 +133,17 @@ interface NativeUpdateNotification {
appVersion: string;
}
export interface Callback<T> { (error: Error, parameter: T): void; }
export interface SuccessCallback<T> { (result?: T): void; }
export interface ErrorCallback { (error?: Error): void; }
export interface Callback<T> {
(error: Error, parameter: T): void;
}
export interface SuccessCallback<T> {
(result?: T): void;
}
export interface ErrorCallback {
(error?: Error): void;
}
interface Configuration {
appVersion: string;
@@ -146,8 +160,11 @@ declare class AcquisitionStatus {
declare class AcquisitionManager {
constructor(httpRequester: Http.Requester, configuration: Configuration);
public queryUpdateWithCurrentPackage(currentPackage: IPackage, callback?: Callback<IRemotePackage | NativeUpdateNotification>): void;
public reportStatusDeploy(pkg?: IPackage, status?: string, previousLabelOrAppVersion?: string, previousDeploymentKey?: string, callback?: Callback<void>): void;
public reportStatusDownload(pkg: IPackage, callback?: Callback<void>): void;
}
+83 -41
View File
@@ -1,10 +1,47 @@
import { Injectable } from '@angular/core';
import { CordovaInstance, InstanceProperty, Plugin, getPromise, InstanceCheck, checkAvailability, CordovaCheck, IonicNativePlugin } from '@ionic-native/core';
import {
checkAvailability,
CordovaCheck,
CordovaInstance,
getPromise,
InstanceCheck,
InstanceProperty,
IonicNativePlugin,
Plugin
} from '@ionic-native/core';
declare const window: any,
navigator: any;
export type ContactFieldType = '*' | 'addresses' | 'birthday' | 'categories' | 'country' | 'department' | 'displayName' | 'emails' | 'familyName' | 'formatted' | 'givenName' | 'honorificPrefix' | 'honorificSuffix' | 'id' | 'ims' | 'locality' | 'middleName' | 'name' | 'nickname' | 'note' | 'organizations' | 'phoneNumbers' | 'photos' | 'postalCode' | 'region' | 'streetAddress' | 'title' | 'urls';
export type ContactFieldType =
'*'
| 'addresses'
| 'birthday'
| 'categories'
| 'country'
| 'department'
| 'displayName'
| 'emails'
| 'familyName'
| 'formatted'
| 'givenName'
| 'honorificPrefix'
| 'honorificSuffix'
| 'id'
| 'ims'
| 'locality'
| 'middleName'
| 'name'
| 'nickname'
| 'note'
| 'organizations'
| 'phoneNumbers'
| 'photos'
| 'postalCode'
| 'region'
| 'streetAddress'
| 'title'
| 'urls';
export interface IContactProperties {
@@ -56,21 +93,21 @@ export interface IContactProperties {
* @hidden
*/
export class Contact implements IContactProperties {
@InstanceProperty() id: string;
@InstanceProperty() displayName: string;
@InstanceProperty() name: IContactName;
@InstanceProperty() nickname: string;
@InstanceProperty() phoneNumbers: IContactField[];
@InstanceProperty() emails: IContactField[];
@InstanceProperty() addresses: IContactAddress[];
@InstanceProperty() ims: IContactField[];
@InstanceProperty() organizations: IContactOrganization[];
@InstanceProperty() birthday: Date;
@InstanceProperty() note: string;
@InstanceProperty() photos: IContactField[];
@InstanceProperty() categories: IContactField[];
@InstanceProperty() urls: IContactField[];
private _objectInstance: any;
@InstanceProperty id: string;
@InstanceProperty displayName: string;
@InstanceProperty name: IContactName;
@InstanceProperty nickname: string;
@InstanceProperty phoneNumbers: IContactField[];
@InstanceProperty emails: IContactField[];
@InstanceProperty addresses: IContactAddress[];
@InstanceProperty ims: IContactField[];
@InstanceProperty organizations: IContactOrganization[];
@InstanceProperty birthday: Date;
@InstanceProperty note: string;
@InstanceProperty photos: IContactField[];
@InstanceProperty categories: IContactField[];
@InstanceProperty urls: IContactField[];
[key: string]: any;
@@ -91,7 +128,9 @@ export class Contact implements IContactProperties {
}
@CordovaInstance()
remove(): Promise<any> { return; }
remove(): Promise<any> {
return;
}
@InstanceCheck()
save(): Promise<any> {
@@ -148,11 +187,12 @@ export interface IContactName {
*/
export class ContactName implements IContactName {
constructor(public formatted?: string,
public familyName?: string,
public givenName?: string,
public middleName?: string,
public honorificPrefix?: string,
public honorificSuffix?: string) { }
public familyName?: string,
public givenName?: string,
public middleName?: string,
public honorificPrefix?: string,
public honorificSuffix?: string) {
}
}
export interface IContactField {
@@ -169,8 +209,9 @@ export interface IContactField {
*/
export class ContactField implements IContactField {
constructor(public type?: string,
public value?: string,
public pref?: boolean) { }
public value?: string,
public pref?: boolean) {
}
}
export interface IContactAddress {
@@ -197,13 +238,14 @@ export interface IContactAddress {
*/
export class ContactAddress implements IContactAddress {
constructor(public pref?: boolean,
public type?: string,
public formatted?: string,
public streetAddress?: string,
public locality?: string,
public region?: string,
public postalCode?: string,
public country?: string) { }
public type?: string,
public formatted?: string,
public streetAddress?: string,
public locality?: string,
public region?: string,
public postalCode?: string,
public country?: string) {
}
}
export interface IContactOrganization {
@@ -223,13 +265,12 @@ export interface IContactOrganization {
* @hidden
*/
export class ContactOrganization implements IContactOrganization {
constructor(
public type?: string,
public name?: string,
public department?: string,
public title?: string,
public pref?: boolean
) { }
constructor(public type?: string,
public name?: string,
public department?: string,
public title?: string,
public pref?: boolean) {
}
}
/** Search options to filter navigator.contacts. */
@@ -251,9 +292,10 @@ export interface IContactFindOptions {
*/
export class ContactFindOptions implements IContactFindOptions {
constructor(public filter?: string,
public multiple?: boolean,
public desiredFields?: string[],
public hasPhoneNumber?: boolean) { }
public multiple?: boolean,
public desiredFields?: string[],
public hasPhoneNumber?: boolean) {
}
}
/**
@@ -1,4 +1,4 @@
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
@@ -66,8 +66,8 @@ import { Injectable } from '@angular/core';
* .catch((error:any) => {
* return Observable.throw(error.json() || 'Couchbase Lite error');
* }) .
* }
* createDocument(database_name:string,document){
* }
* createDocument(database_name:string,document){
* let url = this.getUrl();
* url = url + database_name;
* return this._http
@@ -84,9 +84,9 @@ import { Injectable } from '@angular/core';
* createDocument('justbe', document);
* // successful response
* { "id": "string","rev": "string","ok": true }
* updateDocument(database_name:string,document){
* updateDocument(database_name:string,document){
* let url = this.getUrl();
* url = url + database_name + '/' + document._id;
* url = url + database_name + '/' + document._id;
* return this._http
* .put(url,document)
* .map(data => { this.results = data['results'] })
@@ -129,6 +129,8 @@ export class CouchbaseLite extends IonicNativePlugin {
@Cordova({
callbackStyle: 'node'
})
getURL(): Promise<any> { return; }
getURL(): Promise<any> {
return;
}
}
+4 -2
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Crop
@@ -38,6 +38,8 @@ export class Crop extends IonicNativePlugin {
@Cordova({
callbackOrder: 'reverse'
})
crop(pathToImage: string, options?: { quality: number }): Promise<string> { return; }
crop(pathToImage: string, options?: { quality: number }): Promise<string> {
return;
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface DatePickerOptions {
/**
+13 -5
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
/**
@@ -52,27 +52,35 @@ export class DBMeter extends IonicNativePlugin {
observable: true,
clearFunction: 'stop'
})
start(): Observable<any> { return; }
start(): Observable<any> {
return;
}
/**
* Stops listening
* @hidden
*/
@Cordova()
stop(): Promise<any> { return; }
stop(): Promise<any> {
return;
}
/**
* Check if the DB Meter is listening
* @returns {Promise<boolean>} Returns a promise that resolves with a boolean that tells us whether the DB meter is listening
*/
@Cordova()
isListening(): Promise<boolean> { return; }
isListening(): Promise<boolean> {
return;
}
/**
* Delete the DB Meter instance
* @returns {Promise<any>} Returns a promise that will resolve if the instance has been deleted, and rejects if errors occur.
*/
@Cordova()
delete(): Promise<any> { return; }
delete(): Promise<any> {
return;
}
}
+8 -4
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
export interface DeeplinkMatch {
@@ -105,7 +105,9 @@ export class Deeplinks extends IonicNativePlugin {
@Cordova({
observable: true
})
route(paths: any): Observable<DeeplinkMatch> { return; }
route(paths: any): Observable<DeeplinkMatch> {
return;
}
/**
*
@@ -123,7 +125,7 @@ export class Deeplinks extends IonicNativePlugin {
* promise result which you can then use to navigate in the app as you see fit.
*
* @param {Object} paths
*
*
* @param {DeeplinkOptions} options
*
* @returns {Observable<DeeplinkMatch>} Returns an Observable that resolves each time a deeplink comes through, and
@@ -132,6 +134,8 @@ export class Deeplinks extends IonicNativePlugin {
@Cordova({
observable: true
})
routeWithNavController(navController: any, paths: any, options?: DeeplinkOptions): Observable<DeeplinkMatch> { return; }
routeWithNavController(navController: any, paths: any, options?: DeeplinkOptions): Observable<DeeplinkMatch> {
return;
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Device Accounts
@@ -35,27 +35,35 @@ export class DeviceAccounts extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
get(): Promise<any> { return; }
get(): Promise<any> {
return;
}
/**
* Get all accounts registered on Android device for requested type
* @returns {Promise<any>}
*/
@Cordova()
getByType(type: string): Promise<any> { return; }
getByType(type: string): Promise<any> {
return;
}
/**
* Get all emails registered on Android device (accounts with 'com.google' type)
* @returns {Promise<any>}
*/
@Cordova()
getEmails(): Promise<any> { return; }
getEmails(): Promise<any> {
return;
}
/**
* Get the first email registered on Android device
* @returns {Promise<any>}
*/
@Cordova()
getEmail(): Promise<any> { return; }
getEmail(): Promise<any> {
return;
}
}
@@ -1,5 +1,6 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Device Feedback
* @description
@@ -44,20 +45,24 @@ export class DeviceFeedback extends IonicNativePlugin {
* Provide sound feedback to user, nevertheless respect user's settings and current active device profile as native feedback do.
*/
@Cordova({ sync: true })
acoustic(): void { }
acoustic(): void {
}
/**
* Provide vibrate feedback to user, nevertheless respect user's tactile feedback setting as native feedback do.
* @param type {Number} Specify type of vibration feedback. 0 for long press, 1 for virtual key, or 3 for keyboard tap.
*/
@Cordova({ sync: true })
haptic(type: number): void { }
haptic(type: number): void {
}
/**
* Check if haptic and acoustic feedback is enabled by user settings.
* @returns {Promise<any>}
*/
@Cordova()
isFeedbackEnabled(): Promise<{ haptic: boolean; acoustic: boolean; }> { return; }
isFeedbackEnabled(): Promise<{ haptic: boolean; acoustic: boolean; }> {
return;
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
export interface DeviceMotionAccelerationData {
@@ -82,7 +82,9 @@ export class DeviceMotion extends IonicNativePlugin {
* @returns {Promise<DeviceMotionAccelerationData>} Returns object with x, y, z, and timestamp properties
*/
@Cordova()
getCurrentAcceleration(): Promise<DeviceMotionAccelerationData> { return; }
getCurrentAcceleration(): Promise<DeviceMotionAccelerationData> {
return;
}
/**
* Watch the device acceleration. Clear the watch by unsubscribing from the observable.
@@ -94,6 +96,8 @@ export class DeviceMotion extends IonicNativePlugin {
observable: true,
clearFunction: 'clearWatch'
})
watchAcceleration(options?: DeviceMotionAccelerometerOptions): Observable<DeviceMotionAccelerationData> { return; }
watchAcceleration(options?: DeviceMotionAccelerometerOptions): Observable<DeviceMotionAccelerationData> {
return;
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
export interface DeviceOrientationCompassHeading {
@@ -87,7 +87,9 @@ export class DeviceOrientation extends IonicNativePlugin {
* @returns {Promise<DeviceOrientationCompassHeading>}
*/
@Cordova()
getCurrentHeading(): Promise<DeviceOrientationCompassHeading> { return; }
getCurrentHeading(): Promise<DeviceOrientationCompassHeading> {
return;
}
/**
* Get the device current heading at a regular interval
@@ -101,6 +103,8 @@ export class DeviceOrientation extends IonicNativePlugin {
observable: true,
clearFunction: 'clearWatch'
})
watchHeading(options?: DeviceOrientationCompassOptions): Observable<DeviceOrientationCompassHeading> { return; }
watchHeading(options?: DeviceOrientationCompassOptions): Observable<DeviceOrientationCompassHeading> {
return;
}
}
+9 -9
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
declare const window: any;
@@ -30,38 +30,38 @@ declare const window: any;
export class Device extends IonicNativePlugin {
/** Get the version of Cordova running on the device. */
@CordovaProperty
@CordovaProperty()
cordova: string;
/**
* The device.model returns the name of the device's model or product. The value is set
* by the device manufacturer and may be different across versions of the same product.
*/
@CordovaProperty
@CordovaProperty()
model: string;
/** Get the device's operating system name. */
@CordovaProperty
@CordovaProperty()
platform: string;
/** Get the device's Universally Unique Identifier (UUID). */
@CordovaProperty
@CordovaProperty()
uuid: string;
/** Get the operating system version. */
@CordovaProperty
@CordovaProperty()
version: string;
/** Get the device's manufacturer. */
@CordovaProperty
@CordovaProperty()
manufacturer: string;
/** Whether the device is running on a simulator. */
@CordovaProperty
@CordovaProperty()
isVirtual: boolean;
/** Get the device hardware serial number. */
@CordovaProperty
@CordovaProperty()
serial: string;
}
+228 -83
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, CordovaProperty, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Diagnostic
@@ -14,7 +14,7 @@ import { Cordova, Plugin, CordovaProperty, IonicNativePlugin } from '@ionic-nati
*
* ...
*
* let successCallback = (isAvailable) => { console.log('Is available? ' + isAvailable); };
* let successCallback = (isAvailable) => { console.log('Is available? ' + isAvailable); }
* let errorCallback = (e) => console.error(e);
*
* this.diagnostic.isCameraAvailable().then(successCallback).catch(errorCallback);
@@ -71,7 +71,7 @@ export class Diagnostic extends IonicNativePlugin {
BODY_SENSORS: 'BODY_SENSORS'
};
@CordovaProperty
@CordovaProperty()
permissionStatus: {
GRANTED: string;
DENIED: string;
@@ -116,7 +116,7 @@ export class Diagnostic extends IonicNativePlugin {
POWERING_ON: 'powering_on'
};
@CordovaProperty
@CordovaProperty()
NFCState: {
UNKNOWN: string;
POWERED_OFF: string;
@@ -125,7 +125,7 @@ export class Diagnostic extends IonicNativePlugin {
POWERING_OFF: string;
};
@CordovaProperty
@CordovaProperty()
motionStatus: {
NOT_REQUESTED: string;
GRANTED: string;
@@ -141,7 +141,9 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
isLocationAvailable(): Promise<any> { return; }
isLocationAvailable(): 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.
@@ -149,17 +151,21 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
isWifiAvailable(): Promise<any> { return; }
isWifiAvailable(): 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.
* @param {boolean} [externalStorage] Android only: If true, checks permission for READ_EXTERNAL_STORAGE in addition to CAMERA run-time permission.
* cordova-plugin-camera@2.2+ requires both of these permissions. Defaults to true.
* cordova-plugin-camera@2.2+ requires both of these permissions. Defaults to true.
* @returns {Promise<any>}
*/
@Cordova({ callbackOrder: 'reverse' })
isCameraAvailable( externalStorage?: boolean ): Promise<any> { return; }
isCameraAvailable(externalStorage?: boolean): 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)
@@ -167,38 +173,46 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
isBluetoothAvailable(): Promise<any> { return; }
isBluetoothAvailable(): Promise<any> {
return;
}
/**
* Displays the device location settings to allow user to enable location services/change location mode.
*/
@Cordova({ sync: true, platforms: ['Android', 'Windows 10', 'iOS'] })
switchToLocationSettings(): void { }
switchToLocationSettings(): void {
}
/**
* Displays mobile settings to allow user to enable mobile data.
*/
@Cordova({ sync: true, platforms: ['Android', 'Windows 10'] })
switchToMobileDataSettings(): void { }
switchToMobileDataSettings(): void {
}
/**
* Displays Bluetooth settings to allow user to enable Bluetooth.
*/
@Cordova({ sync: true, platforms: ['Android', 'Windows 10'] })
switchToBluetoothSettings(): void { }
switchToBluetoothSettings(): void {
}
/**
* Displays WiFi settings to allow user to enable WiFi.
*/
@Cordova({ sync: true, platforms: ['Android', 'Windows 10'] })
switchToWifiSettings(): void { }
switchToWifiSettings(): void {
}
/**
* Returns true if the WiFi setting is set to enabled, and is the same as `isWifiAvailable()`
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android', 'Windows 10'] })
isWifiEnabled(): Promise<boolean> { return; }
isWifiEnabled(): Promise<boolean> {
return;
}
/**
* Enables/disables WiFi on the device.
@@ -207,7 +221,9 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova({ callbackOrder: 'reverse', platforms: ['Android', 'Windows 10'] })
setWifiState(state: boolean): Promise<any> { return; }
setWifiState(state: boolean): Promise<any> {
return;
}
/**
* Enables/disables Bluetooth on the device.
@@ -216,7 +232,9 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova({ callbackOrder: 'reverse', platforms: ['Android', 'Windows 10'] })
setBluetoothState(state: boolean): Promise<any> { return; }
setBluetoothState(state: boolean): Promise<any> {
return;
}
// ANDROID AND IOS ONLY
@@ -226,7 +244,9 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
isLocationEnabled(): Promise<boolean> { return; }
isLocationEnabled(): Promise<boolean> {
return;
}
/**
* Checks if the application is authorized to use location.
@@ -234,14 +254,18 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
isLocationAuthorized(): Promise<any> { return; }
isLocationAuthorized(): Promise<any> {
return;
}
/**
* Returns the location authorization status for the application.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
getLocationAuthorizationStatus(): Promise<any> { return; }
getLocationAuthorizationStatus(): Promise<any> {
return;
}
/**
* Returns the location authorization status for the application.
@@ -251,14 +275,18 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'], callbackOrder: 'reverse' })
requestLocationAuthorization(mode?: string): Promise<any> { return; }
requestLocationAuthorization(mode?: string): Promise<any> {
return;
}
/**
* Checks if camera hardware is present on device.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
isCameraPresent(): Promise<any> { return; }
isCameraPresent(): Promise<any> {
return;
}
/**
* Checks if the application is authorized to use the camera.
@@ -268,7 +296,9 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'], callbackOrder: 'reverse' })
isCameraAuthorized( externalStorage?: boolean ): Promise<any> { return; }
isCameraAuthorized(externalStorage?: boolean): Promise<any> {
return;
}
/**
* Returns the camera authorization status for the application.
@@ -277,7 +307,9 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'], callbackOrder: 'reverse' })
getCameraAuthorizationStatus( externalStorage?: boolean ): Promise<any> { return; }
getCameraAuthorizationStatus(externalStorage?: boolean): Promise<any> {
return;
}
/**
* Requests camera authorization for the application.
@@ -286,49 +318,63 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'], callbackOrder: 'reverse' })
requestCameraAuthorization( externalStorage?: boolean ): Promise<any> { return; }
requestCameraAuthorization(externalStorage?: boolean): Promise<any> {
return;
}
/**
* Checks if the application is authorized to use the microphone.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
isMicrophoneAuthorized(): Promise<boolean> { return; }
isMicrophoneAuthorized(): Promise<boolean> {
return;
}
/**
* Returns the microphone authorization status for the application.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
getMicrophoneAuthorizationStatus(): Promise<any> { return; }
getMicrophoneAuthorizationStatus(): Promise<any> {
return;
}
/**
* Requests microphone authorization for the application.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
requestMicrophoneAuthorization(): Promise<any> { return; }
requestMicrophoneAuthorization(): Promise<any> {
return;
}
/**
* Checks if the application is authorized to use contacts (address book).
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
isContactsAuthorized(): Promise<boolean> { return; }
isContactsAuthorized(): Promise<boolean> {
return;
}
/**
* Returns the contacts authorization status for the application.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
getContactsAuthorizationStatus(): Promise<any> { return; }
getContactsAuthorizationStatus(): Promise<any> {
return;
}
/**
* Requests contacts authorization for the application.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
requestContactsAuthorization(): Promise<any> { return; }
requestContactsAuthorization(): Promise<any> {
return;
}
/**
* Checks if the application is authorized to use the calendar.
@@ -341,7 +387,9 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
isCalendarAuthorized(): Promise<boolean> { return; }
isCalendarAuthorized(): Promise<boolean> {
return;
}
/**
* Returns the calendar authorization status for the application.
@@ -355,7 +403,9 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
getCalendarAuthorizationStatus(): Promise<any> { return; }
getCalendarAuthorizationStatus(): Promise<any> {
return;
}
/**
* Requests calendar authorization for the application.
@@ -372,7 +422,9 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
requestCalendarAuthorization(): Promise<any> { return; }
requestCalendarAuthorization(): Promise<any> {
return;
}
/**
* Opens settings page for this app.
@@ -381,28 +433,34 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
switchToSettings(): Promise<any> { return; }
switchToSettings(): Promise<any> {
return;
}
/**
* Returns the state of Bluetooth on the device.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
getBluetoothState(): Promise<any> { return; }
getBluetoothState(): Promise<any> {
return;
}
/**
* Registers a function to be called when a change in Bluetooth state occurs.
* @param handler
*/
@Cordova({ platforms: ['Android', 'iOS'], sync: true })
registerBluetoothStateChangeHandler(handler: Function): void { }
registerBluetoothStateChangeHandler(handler: Function): void {
}
/**
* Registers a function to be called when a change in Location state occurs.
* @param handler
*/
@Cordova({ platforms: ['Android', 'iOS'], sync: true })
registerLocationStateChangeHandler(handler: Function): void { }
registerLocationStateChangeHandler(handler: Function): void {
}
// ANDROID ONLY
@@ -413,7 +471,9 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
isGpsLocationAvailable(): Promise<boolean> { return; }
isGpsLocationAvailable(): Promise<boolean> {
return;
}
/**
* Checks if location mode is set to return high-accuracy locations from GPS hardware.
@@ -423,7 +483,9 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'] })
isGpsLocationEnabled(): Promise<any> { return; }
isGpsLocationEnabled(): Promise<any> {
return;
}
/**
* Checks if low-accuracy locations are available to the app from network triangulation/WiFi access points.
@@ -431,7 +493,9 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'] })
isNetworkLocationAvailable(): Promise<any> { return; }
isNetworkLocationAvailable(): Promise<any> {
return;
}
/**
* Checks if location mode is set to return low-accuracy locations from network triangulation/WiFi access points.
@@ -441,14 +505,18 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'] })
isNetworkLocationEnabled(): Promise<any> { return; }
isNetworkLocationEnabled(): Promise<any> {
return;
}
/**
* Returns the current location mode setting for the device.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'] })
getLocationMode(): Promise<any> { return; }
getLocationMode(): Promise<any> {
return;
}
/**
* Returns the current authorisation status for a given permission.
@@ -457,7 +525,9 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'], callbackOrder: 'reverse' })
getPermissionAuthorizationStatus(permission: any): Promise<any> { return; }
getPermissionAuthorizationStatus(permission: any): Promise<any> {
return;
}
/**
* Returns the current authorisation status for multiple permissions.
@@ -466,7 +536,9 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'], callbackOrder: 'reverse' })
getPermissionsAuthorizationStatus(permissions: any[]): Promise<any> { return; }
getPermissionsAuthorizationStatus(permissions: any[]): Promise<any> {
return;
}
/**
* Requests app to be granted authorisation for a runtime permission.
@@ -475,7 +547,9 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'], callbackOrder: 'reverse' })
requestRuntimePermission(permission: any): Promise<any> { return; }
requestRuntimePermission(permission: any): Promise<any> {
return;
}
/**
* Requests app to be granted authorisation for multiple runtime permissions.
@@ -484,7 +558,9 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'], callbackOrder: 'reverse' })
requestRuntimePermissions(permissions: any[]): Promise<any> { return; }
requestRuntimePermissions(permissions: any[]): Promise<any> {
return;
}
/**
* Indicates if the plugin is currently requesting a runtime permission via the native API.
@@ -494,7 +570,9 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {boolean}
*/
@Cordova({ sync: true })
isRequestingPermission(): boolean { return; }
isRequestingPermission(): boolean {
return;
}
/**
* Registers a function to be called when a runtime permission request has completed.
@@ -502,7 +580,9 @@ export class Diagnostic extends IonicNativePlugin {
* @param handler {Function}
*/
@Cordova({ sync: true })
registerPermissionRequestCompleteHandler(handler: Function): void { return; }
registerPermissionRequestCompleteHandler(handler: Function): void {
return;
}
/**
* Checks if the device setting for Bluetooth is switched on.
@@ -510,49 +590,63 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
isBluetoothEnabled(): Promise<boolean> { return; }
isBluetoothEnabled(): Promise<boolean> {
return;
}
/**
* Checks if the device has Bluetooth capabilities.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
hasBluetoothSupport(): Promise<boolean> { return; }
hasBluetoothSupport(): Promise<boolean> {
return;
}
/**
* Checks if the device has Bluetooth Low Energy (LE) capabilities.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
hasBluetoothLESupport(): Promise<boolean> { return; }
hasBluetoothLESupport(): Promise<boolean> {
return;
}
/**
* Checks if the device supports Bluetooth Low Energy (LE) Peripheral mode.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
hasBluetoothLEPeripheralSupport(): Promise<boolean> { return; }
hasBluetoothLEPeripheralSupport(): Promise<boolean> {
return;
}
/**
* Checks if the application is authorized to use external storage.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
isExternalStorageAuthorized(): Promise<boolean> { return; }
isExternalStorageAuthorized(): Promise<boolean> {
return;
}
/**
* CReturns the external storage authorization status for the application.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
getExternalStorageAuthorizationStatus(): Promise<any> { return; }
getExternalStorageAuthorizationStatus(): Promise<any> {
return;
}
/**
* Requests external storage authorization for the application.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'] })
requestExternalStorageAuthorization(): Promise<any> { return; }
requestExternalStorageAuthorization(): Promise<any> {
return;
}
/**
* Returns details of external SD card(s): absolute path, is writable, free space.
@@ -565,7 +659,9 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'] })
getExternalSdCardDetails(): Promise<any> { return; }
getExternalSdCardDetails(): Promise<any> {
return;
}
/**
* Switches to the wireless settings page in the Settings app. Allows configuration of wireless controls such as Wi-Fi, Bluetooth and Mobile networks.
@@ -574,7 +670,8 @@ export class Diagnostic extends IonicNativePlugin {
platforms: ['Android'],
sync: true
})
switchToWirelessSettings(): void { }
switchToWirelessSettings(): void {
}
/**
* Displays NFC settings to allow user to enable NFC.
@@ -583,14 +680,17 @@ export class Diagnostic extends IonicNativePlugin {
platforms: ['Android'],
sync: true
})
switchToNFCSettings(): void { }
switchToNFCSettings(): void {
}
/**
* Checks if NFC hardware is present on device.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
isNFCPresent(): Promise<boolean> { return; }
isNFCPresent(): Promise<boolean> {
return;
}
/**
* Checks if the device setting for NFC is switched on.
@@ -598,7 +698,9 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
isNFCEnabled(): Promise<boolean> { return; }
isNFCEnabled(): Promise<boolean> {
return;
}
/**
* Checks if NFC is available to the app. Returns true if the device has NFC capabilities AND if NFC setting is switched on.
@@ -606,7 +708,9 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'] })
isNFCAvailable(): Promise<boolean> { return; }
isNFCAvailable(): Promise<boolean> {
return;
}
/**
* Registers a function to be called when a change in NFC state occurs. Pass in a falsey value to de-register the currently registered function.
@@ -617,28 +721,35 @@ export class Diagnostic extends IonicNativePlugin {
platforms: ['Android'],
sync: true
})
registerNFCStateChangeHandler(handler: Function): void { }
registerNFCStateChangeHandler(handler: Function): void {
}
/**
* Checks if the device data roaming setting is enabled.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
isDataRoamingEnabled(): Promise<boolean> { return; }
isDataRoamingEnabled(): Promise<boolean> {
return;
}
/**
* Checks if the device setting for ADB(debug) is switched on.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
isADBModeEnabled(): Promise<boolean> { return; }
isADBModeEnabled(): Promise<boolean> {
return;
}
/**
* Checks if the device is rooted.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
isDeviceRooted(): Promise<boolean> { return; }
isDeviceRooted(): Promise<boolean> {
return;
}
// IOS ONLY
@@ -647,14 +758,18 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['iOS'] })
isCameraRollAuthorized(): Promise<boolean> { return; }
isCameraRollAuthorized(): Promise<boolean> {
return;
}
/**
* Returns the authorization status for the application to use the Camera Roll in Photos app.
* @returns {Promise<string>}
*/
@Cordova({ platforms: ['iOS'] })
getCameraRollAuthorizationStatus(): Promise<string> { return; }
getCameraRollAuthorizationStatus(): Promise<string> {
return;
}
/**
* Requests camera roll authorization for the application.
@@ -663,21 +778,27 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['iOS'] })
requestCameraRollAuthorization(): Promise<any> { return; }
requestCameraRollAuthorization(): Promise<any> {
return;
}
/**
* Checks if remote (push) notifications are enabled.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['iOS', 'Android'] })
isRemoteNotificationsEnabled(): Promise<boolean> { return; }
isRemoteNotificationsEnabled(): Promise<boolean> {
return;
}
/**
* Indicates if the app is registered for remote (push) notifications on the device.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['iOS'] })
isRegisteredForRemoteNotifications(): Promise<boolean> { return; }
isRegisteredForRemoteNotifications(): Promise<boolean> {
return;
}
/**
* Returns the authorization status for the application to use Remote Notifications.
@@ -685,7 +806,9 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<string>}
*/
@Cordova({ platforms: ['iOS'] })
getRemoteNotificationsAuthorizationStatus(): Promise<string> { return; }
getRemoteNotificationsAuthorizationStatus(): Promise<string> {
return;
}
/**
* Indicates the current setting of notification types for the app in the Settings app.
@@ -693,42 +816,54 @@ export class Diagnostic extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['iOS'] })
getRemoteNotificationTypes(): Promise<any> { return; }
getRemoteNotificationTypes(): Promise<any> {
return;
}
/**
* Checks if the application is authorized to use reminders.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['iOS'] })
isRemindersAuthorized(): Promise<boolean> { return; }
isRemindersAuthorized(): Promise<boolean> {
return;
}
/**
* Returns the reminders authorization status for the application.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['iOS'] })
getRemindersAuthorizationStatus(): Promise<any> { return; }
getRemindersAuthorizationStatus(): Promise<any> {
return;
}
/**
* Requests reminders authorization for the application.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['iOS'] })
requestRemindersAuthorization(): Promise<any> { return; }
requestRemindersAuthorization(): Promise<any> {
return;
}
/**
* Checks if the application is authorized for background refresh.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['iOS'] })
isBackgroundRefreshAuthorized(): Promise<boolean> { return; }
isBackgroundRefreshAuthorized(): Promise<boolean> {
return;
}
/**
* Returns the background refresh authorization status for the application.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['iOS'] })
getBackgroundRefreshStatus(): Promise<any> { return; }
getBackgroundRefreshStatus(): Promise<any> {
return;
}
/**
* Requests Bluetooth authorization for the application.
@@ -737,14 +872,18 @@ export class Diagnostic extends IonicNativePlugin {
* @return {Promise<any>}
*/
@Cordova({ platforms: ['iOS'] })
requestBluetoothAuthorization(): Promise<any> { return; }
requestBluetoothAuthorization(): Promise<any> {
return;
}
/**
* Checks if motion tracking is available on the current device.
* @return {Promise<boolean>}
*/
@Cordova({ platforms: ['iOS'] })
isMotionAvailable(): Promise<boolean> { return; }
isMotionAvailable(): Promise<boolean> {
return;
}
/**
* Checks if it's possible to determine the outcome of a motion authorization request on the current device.
@@ -754,7 +893,9 @@ export class Diagnostic extends IonicNativePlugin {
* @return {Promise<boolean>}
*/
@Cordova({ platforms: ['iOS'] })
isMotionRequestOutcomeAvailable(): Promise<boolean> { return; }
isMotionRequestOutcomeAvailable(): Promise<boolean> {
return;
}
/**
* Requests motion tracking authorization for the application.
@@ -764,7 +905,9 @@ export class Diagnostic extends IonicNativePlugin {
* @return {Promise<string>}
*/
@Cordova({ platforms: ['iOS'] })
requestMotionAuthorization(): Promise<string> { return; }
requestMotionAuthorization(): Promise<string> {
return;
}
/**
* Checks motion authorization status for the application.
@@ -774,6 +917,8 @@ export class Diagnostic extends IonicNativePlugin {
* @return {Promise<string>}
*/
@Cordova({ platforms: ['iOS'] })
getMotionAuthorizationStatus(): Promise<string> { return; }
getMotionAuthorizationStatus(): Promise<string> {
return;
}
}
+12 -5
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface DialogsPromptCallback {
@@ -62,7 +62,9 @@ export class Dialogs extends IonicNativePlugin {
successIndex: 1,
errorIndex: 4
})
alert(message: string, title?: string, buttonName?: string): Promise<any> { return; }
alert(message: string, title?: string, buttonName?: string): Promise<any> {
return;
}
/**
* Displays a customizable confirmation dialog box.
@@ -75,7 +77,9 @@ export class Dialogs extends IonicNativePlugin {
successIndex: 1,
errorIndex: 4
})
confirm(message: string, title?: string, buttonLabels?: string[]): Promise<number> { return; }
confirm(message: string, title?: string, buttonLabels?: string[]): Promise<number> {
return;
}
/**
* Displays a native dialog box that is more customizable than the browser's prompt function.
@@ -89,7 +93,9 @@ export class Dialogs extends IonicNativePlugin {
successIndex: 1,
errorIndex: 5
})
prompt(message?: string, title?: string, buttonLabels?: string[], defaultText?: string): Promise<DialogsPromptCallback> { return; }
prompt(message?: string, title?: string, buttonLabels?: string[], defaultText?: string): Promise<DialogsPromptCallback> {
return;
}
/**
@@ -99,6 +105,7 @@ export class Dialogs extends IonicNativePlugin {
@Cordova({
sync: true
})
beep(times: number): void { }
beep(times: number): void {
}
}
+4 -2
View File
@@ -1,4 +1,4 @@
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
/**
@@ -36,5 +36,7 @@ export class DNS extends IonicNativePlugin {
* @returns {Promise<string>} Returns a promise that resolves with the resolution.
*/
@Cordova()
resolve(hostname: string): Promise<string> { return; }
resolve(hostname: string): Promise<string> {
return;
}
}
@@ -1,4 +1,4 @@
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
export interface DocumentViewerOptions {
@@ -69,7 +69,9 @@ export class DocumentViewer extends IonicNativePlugin {
* @returns {Promise<any>} Resolves promise when the EmailComposer has been opened
*/
@Cordova()
getSupportInfo(): Promise<any> { return; }
getSupportInfo(): Promise<any> {
return;
}
/**
* Check if the document can be shown
@@ -83,7 +85,8 @@ export class DocumentViewer extends IonicNativePlugin {
* @param [onError] {Function}
*/
@Cordova({ sync: true })
canViewDocument(url: string, contentType: string, options: DocumentViewerOptions, onPossible?: Function, onMissingApp?: Function, onImpossible?: Function, onError?: Function): void { }
canViewDocument(url: string, contentType: string, options: DocumentViewerOptions, onPossible?: Function, onMissingApp?: Function, onImpossible?: Function, onError?: Function): void {
}
/**
* Opens the file
@@ -97,6 +100,7 @@ export class DocumentViewer extends IonicNativePlugin {
* @param [onError] {Function}
*/
@Cordova({ sync: true })
viewDocument(url: string, contentType: string, options: DocumentViewerOptions, onShow?: Function, onClose?: Function, onMissingApp?: Function, onError?: Function): void { }
viewDocument(url: string, contentType: string, options: DocumentViewerOptions, onShow?: Function, onClose?: Function, onMissingApp?: Function, onError?: Function): void {
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, CordovaCheck, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, CordovaCheck, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface EmailComposerOptions {
@@ -81,7 +81,7 @@ export interface EmailComposerOptions {
* subject: 'Cordova Icons',
* body: 'How are you? Nice greetings from Leipzig',
* isHtml: true
* };
* }
*
* // Send a text message using default options
* this.emailComposer.open(email);
@@ -148,7 +148,9 @@ export class EmailComposer extends IonicNativePlugin {
successIndex: 0,
errorIndex: 2
})
requestPermission(): Promise<boolean> { return; }
requestPermission(): Promise<boolean> {
return;
}
/**
* Checks if the app has a permission to access email accounts information
@@ -158,7 +160,9 @@ export class EmailComposer extends IonicNativePlugin {
successIndex: 0,
errorIndex: 2
})
hasPermission(): Promise<boolean> { return; }
hasPermission(): Promise<boolean> {
return;
}
/**
* Adds a new mail app alias.
@@ -167,7 +171,8 @@ export class EmailComposer extends IonicNativePlugin {
* @param packageName {string} The package name
*/
@Cordova()
addAlias(alias: string, packageName: string): void { }
addAlias(alias: string, packageName: string): void {
}
/**
* Displays the email composer pre-filled with data.
@@ -180,6 +185,8 @@ export class EmailComposer extends IonicNativePlugin {
successIndex: 1,
errorIndex: 3
})
open(options: EmailComposerOptions, scope?: any): Promise<any> { return; }
open(options: EmailComposerOptions, scope?: any): Promise<any> {
return;
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
export interface EstimoteBeaconRegion {
@@ -124,7 +124,9 @@ export class EstimoteBeacons extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
requestWhenInUseAuthorization(): Promise<any> { return; }
requestWhenInUseAuthorization(): Promise<any> {
return;
}
/**
* Ask the user for permission to use location services
@@ -145,7 +147,9 @@ export class EstimoteBeacons extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
requestAlwaysAuthorization(): Promise<any> { return; }
requestAlwaysAuthorization(): Promise<any> {
return;
}
/**
* Get the current location authorization status.
@@ -164,7 +168,9 @@ export class EstimoteBeacons extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
authorizationStatus(): Promise<any> { return; }
authorizationStatus(): Promise<any> {
return;
}
/**
* Start advertising as a beacon.
@@ -186,7 +192,9 @@ export class EstimoteBeacons extends IonicNativePlugin {
@Cordova({
clearFunction: 'stopAdvertisingAsBeacon'
})
startAdvertisingAsBeacon(uuid: string, major: number, minor: number, regionId: string): Promise<any> { return; }
startAdvertisingAsBeacon(uuid: string, major: number, minor: number, regionId: string): Promise<any> {
return;
}
/**
* Stop advertising as a beacon.
@@ -202,7 +210,9 @@ export class EstimoteBeacons extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
stopAdvertisingAsBeacon(): Promise<any> { return; }
stopAdvertisingAsBeacon(): Promise<any> {
return;
}
/**
* Enable analytics.
@@ -217,12 +227,14 @@ export class EstimoteBeacons extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
enableAnalytics(enable: boolean): Promise<any> { return; }
enableAnalytics(enable: boolean): Promise<any> {
return;
}
/**
* Test if analytics is enabled.
*
* @see {@link http://estimote.github.io/iOS-SDK/Classes/ESTConfig.html|Further details}
* Test if analytics is enabled.
*
* @see {@link http://estimote.github.io/iOS-SDK/Classes/ESTConfig.html|Further details}
*
* @usage
* ```
@@ -231,12 +243,14 @@ export class EstimoteBeacons extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
isAnalyticsEnabled(): Promise<any> { return; }
isAnalyticsEnabled(): Promise<any> {
return;
}
/**
* Test if App ID and App Token is set.
*
* @see {@link http://estimote.github.io/iOS-SDK/Classes/ESTConfig.html|Further details}
* Test if App ID and App Token is set.
*
* @see {@link http://estimote.github.io/iOS-SDK/Classes/ESTConfig.html|Further details}
*
* @usage
* ```
@@ -245,12 +259,14 @@ export class EstimoteBeacons extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
isAuthorized(): Promise<any> { return; }
isAuthorized(): Promise<any> {
return;
}
/**
* Set App ID and App Token.
*
* @see {@link http://estimote.github.io/iOS-SDK/Classes/ESTConfig.html|Further details}
* Set App ID and App Token.
*
* @see {@link http://estimote.github.io/iOS-SDK/Classes/ESTConfig.html|Further details}
*
* @usage
* ```
@@ -261,7 +277,9 @@ export class EstimoteBeacons extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
setupAppIDAndAppToken(appID: string, appToken: string): Promise<any> { return; }
setupAppIDAndAppToken(appID: string, appToken: string): Promise<any> {
return;
}
/**
* Start scanning for all nearby beacons using CoreBluetooth (no region object is used).
@@ -282,7 +300,9 @@ export class EstimoteBeacons extends IonicNativePlugin {
observable: true,
clearFunction: 'stopEstimoteBeaconDiscovery'
})
startEstimoteBeaconDiscovery(): Observable<any> { return; }
startEstimoteBeaconDiscovery(): Observable<any> {
return;
}
/**
* Stop CoreBluetooth scan. Available on iOS.
@@ -299,7 +319,9 @@ export class EstimoteBeacons extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
stopEstimoteBeaconDiscovery(): Promise<any> { return; }
stopEstimoteBeaconDiscovery(): Promise<any> {
return;
}
/**
* Start ranging beacons. Available on iOS and Android.
@@ -322,7 +344,9 @@ export class EstimoteBeacons extends IonicNativePlugin {
clearFunction: 'stopRangingBeaconsInRegion',
clearWithArgs: true
})
startRangingBeaconsInRegion(region: EstimoteBeaconRegion): Observable<any> { return; }
startRangingBeaconsInRegion(region: EstimoteBeaconRegion): Observable<any> {
return;
}
/**
* Stop ranging beacons. Available on iOS and Android.
@@ -341,7 +365,9 @@ export class EstimoteBeacons extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
stopRangingBeaconsInRegion(region: EstimoteBeaconRegion): Promise<any> { return; }
stopRangingBeaconsInRegion(region: EstimoteBeaconRegion): Promise<any> {
return;
}
/**
* Start ranging secure beacons. Available on iOS.
@@ -356,7 +382,9 @@ export class EstimoteBeacons extends IonicNativePlugin {
clearFunction: 'stopRangingSecureBeaconsInRegion',
clearWithArgs: true
})
startRangingSecureBeaconsInRegion(region: EstimoteBeaconRegion): Observable<any> { return; }
startRangingSecureBeaconsInRegion(region: EstimoteBeaconRegion): Observable<any> {
return;
}
/**
* Stop ranging secure beacons. Available on iOS.
@@ -365,7 +393,9 @@ export class EstimoteBeacons extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
stopRangingSecureBeaconsInRegion(region: EstimoteBeaconRegion): Promise<any> { return; }
stopRangingSecureBeaconsInRegion(region: EstimoteBeaconRegion): Promise<any> {
return;
}
/**
* Start monitoring beacons. Available on iOS and Android.
@@ -391,7 +421,9 @@ export class EstimoteBeacons extends IonicNativePlugin {
successIndex: 1,
errorIndex: 2
})
startMonitoringForRegion(region: EstimoteBeaconRegion, notifyEntryStateOnDisplay: boolean): Observable<any> { return; }
startMonitoringForRegion(region: EstimoteBeaconRegion, notifyEntryStateOnDisplay: boolean): Observable<any> {
return;
}
/**
* Stop monitoring beacons. Available on iOS and Android.
@@ -405,7 +437,9 @@ export class EstimoteBeacons extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
stopMonitoringForRegion(region: EstimoteBeaconRegion): Promise<any> { return; }
stopMonitoringForRegion(region: EstimoteBeaconRegion): Promise<any> {
return;
}
/**
* Start monitoring secure beacons. Available on iOS.
@@ -425,17 +459,21 @@ export class EstimoteBeacons extends IonicNativePlugin {
successIndex: 1,
errorIndex: 2
})
startSecureMonitoringForRegion(region: EstimoteBeaconRegion, notifyEntryStateOnDisplay: boolean): Observable<any> { return; }
startSecureMonitoringForRegion(region: EstimoteBeaconRegion, notifyEntryStateOnDisplay: boolean): Observable<any> {
return;
}
/**
* Stop monitoring secure beacons. Available on iOS.
* This function has the same parameters/behaviour as
* {@link EstimoteBeacons.stopMonitoringForRegion}.
* @param region {EstimoteBeaconRegion} Region
* @returns {Promise<any>}
*/
* Stop monitoring secure beacons. Available on iOS.
* This function has the same parameters/behaviour as
* {@link EstimoteBeacons.stopMonitoringForRegion}.
* @param region {EstimoteBeaconRegion} Region
* @returns {Promise<any>}
*/
@Cordova()
stopSecureMonitoringForRegion(region: EstimoteBeaconRegion): Promise<any> { return; }
stopSecureMonitoringForRegion(region: EstimoteBeaconRegion): Promise<any> {
return;
}
/**
* Connect to Estimote Beacon. Available on Android.
@@ -455,7 +493,9 @@ export class EstimoteBeacons extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
connectToBeacon(beacon: any): Promise<any> { return; }
connectToBeacon(beacon: any): Promise<any> {
return;
}
/**
* Disconnect from connected Estimote Beacon. Available on Android.
@@ -467,7 +507,9 @@ export class EstimoteBeacons extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
disconnectConnectedBeacon(): Promise<any> { return; }
disconnectConnectedBeacon(): Promise<any> {
return;
}
/**
* Write proximity UUID to connected Estimote Beacon. Available on Android.
@@ -481,7 +523,9 @@ export class EstimoteBeacons extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
writeConnectedProximityUUID(uuid: any): Promise<any> { return; }
writeConnectedProximityUUID(uuid: any): Promise<any> {
return;
}
/**
* Write major to connected Estimote Beacon. Available on Android.
@@ -495,7 +539,9 @@ export class EstimoteBeacons extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
writeConnectedMajor(major: number): Promise<any> { return; }
writeConnectedMajor(major: number): Promise<any> {
return;
}
/**
* Write minor to connected Estimote Beacon. Available on Android.
@@ -509,6 +555,8 @@ export class EstimoteBeacons extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
writeConnectedMinor(minor: number): Promise<any> { return; }
writeConnectedMinor(minor: number): Promise<any> {
return;
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Extended Device Information
@@ -31,19 +31,19 @@ export class ExtendedDeviceInformation extends IonicNativePlugin {
/**
* Get the device's memory size
*/
@CordovaProperty
@CordovaProperty()
memory: number;
/**
* Get the device's CPU mhz
*/
@CordovaProperty
@CordovaProperty()
cpumhz: string;
/**
* Get the total storage
*/
@CordovaProperty
@CordovaProperty()
totalstorage: string;
}
+28 -10
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface FacebookLoginResponse {
@@ -189,7 +189,9 @@ export class Facebook extends IonicNativePlugin {
* @returns {Promise<FacebookLoginResponse>} Returns a Promise that resolves with a status object if login succeeds, and rejects if login fails.
*/
@Cordova()
login(permissions: string[]): Promise<FacebookLoginResponse> { return; }
login(permissions: string[]): Promise<FacebookLoginResponse> {
return;
}
/**
* Logout of Facebook.
@@ -198,7 +200,9 @@ export class Facebook extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise that resolves on a successful logout, and rejects if logout fails.
*/
@Cordova()
logout(): Promise<any> { return; }
logout(): Promise<any> {
return;
}
/**
* Determine if a user is logged in to Facebook and has authenticated your app. There are three possible states for a user:
@@ -227,7 +231,9 @@ export class Facebook extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise that resolves with a status, or rejects with an error
*/
@Cordova()
getLoginStatus(): Promise<any> { return; }
getLoginStatus(): Promise<any> {
return;
}
/**
* Get a Facebook access token for using Facebook services.
@@ -235,7 +241,9 @@ export class Facebook extends IonicNativePlugin {
* @returns {Promise<string>} Returns a Promise that resolves with an access token, or rejects with an error
*/
@Cordova()
getAccessToken(): Promise<string> { return; }
getAccessToken(): Promise<string> {
return;
}
/**
* Show one of various Facebook dialogs. Example of options for a Share dialog:
@@ -255,7 +263,9 @@ export class Facebook extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise that resolves with success data, or rejects with an error
*/
@Cordova()
showDialog(options: any): Promise<any> { return; }
showDialog(options: any): Promise<any> {
return;
}
/**
* Make a call to Facebook Graph API. Can take additional permissions beyond those granted on login.
@@ -271,7 +281,9 @@ export class Facebook extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise that resolves with the result of the request, or rejects with an error
*/
@Cordova()
api(requestPath: string, permissions: string[]): Promise<any> { return; }
api(requestPath: string, permissions: string[]): Promise<any> {
return;
}
/**
* Log an event. For more information see the Events section above.
@@ -285,7 +297,9 @@ export class Facebook extends IonicNativePlugin {
successIndex: 3,
errorIndex: 4
})
logEvent(name: string, params?: Object, valueToSum?: number): Promise<any> { return; }
logEvent(name: string, params?: Object, valueToSum?: number): Promise<any> {
return;
}
/**
* Log a purchase. For more information see the Events section above.
@@ -295,7 +309,9 @@ export class Facebook extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
logPurchase(value: number, currency: string): Promise<any> { return; }
logPurchase(value: number, currency: string): Promise<any> {
return;
}
/**
* Open App Invite dialog. Does not require login.
@@ -315,6 +331,8 @@ export class Facebook extends IonicNativePlugin {
appInvite(options: {
url: string,
picture: string
}): Promise<any> { return; }
}): Promise<any> {
return;
}
}
+17 -7
View File
@@ -1,4 +1,4 @@
import { Plugin, IonicNativePlugin, Cordova } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
@@ -42,7 +42,7 @@ export interface NotificationData {
* console.log("Received in background");
* } else {
* console.log("Received in foreground");
* };
* }
* })
*
* fcm.onTokenRefresh().subscribe(token=>{
@@ -71,7 +71,9 @@ export class FCM extends IonicNativePlugin {
* @returns {Promise<string>} Returns a Promise that resolves with the registration id token
*/
@Cordova()
getToken(): Promise<string> { return; }
getToken(): Promise<string> {
return;
}
/**
* Event firing on the token refresh
@@ -81,7 +83,9 @@ export class FCM extends IonicNativePlugin {
@Cordova({
observable: true
})
onTokenRefresh(): Observable<string> { return; }
onTokenRefresh(): Observable<string> {
return;
}
/**
* Subscribes you to a [topic](https://firebase.google.com/docs/notifications/android/console-topics)
@@ -91,7 +95,9 @@ export class FCM extends IonicNativePlugin {
* @returns {Promise<any>} Returns a promise resolving in result of subscribing to a topic
*/
@Cordova()
subscribeToTopic(topic: string): Promise<any> { return; }
subscribeToTopic(topic: string): Promise<any> {
return;
}
/**
* Unubscribes you from a [topic](https://firebase.google.com/docs/notifications/android/console-topics)
@@ -101,7 +107,9 @@ export class FCM extends IonicNativePlugin {
* @returns {Promise<any>} Returns a promise resolving in result of unsubscribing from a topic
*/
@Cordova()
unsubscribeFromTopic(topic: string): Promise<any> { return; }
unsubscribeFromTopic(topic: string): Promise<any> {
return;
}
/**
* Watch for incoming notifications
@@ -113,6 +121,8 @@ export class FCM extends IonicNativePlugin {
successIndex: 0,
errorIndex: 2
})
onNotification(): Observable<NotificationData> { return; }
onNotification(): Observable<NotificationData> {
return;
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name File Chooser
@@ -36,6 +36,8 @@ export class FileChooser extends IonicNativePlugin {
* @returns {Promise<string>}
*/
@Cordova()
open(): Promise<string> { return; }
open(): Promise<string> {
return;
}
}
@@ -1,4 +1,4 @@
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
/**
@@ -38,7 +38,9 @@ export class FileEncryption extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise that resolves when something happens
*/
@Cordova()
encrypt(file: string, key: string): Promise<any> { return; }
encrypt(file: string, key: string): Promise<any> {
return;
}
/**
* Decrypt a file
@@ -47,6 +49,8 @@ export class FileEncryption extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise that resolves when something happens
*/
@Cordova()
decrypt(file: string, key: string): Promise<any> { return; }
decrypt(file: string, key: string): Promise<any> {
return;
}
}
+10 -4
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name File Opener
@@ -41,7 +41,9 @@ export class FileOpener extends IonicNativePlugin {
successName: 'success',
errorName: 'error'
})
open(filePath: string, fileMIMEType: string): Promise<any> { return; }
open(filePath: string, fileMIMEType: string): Promise<any> {
return;
}
/**
* Uninstalls a package
@@ -53,7 +55,9 @@ export class FileOpener extends IonicNativePlugin {
successName: 'success',
errorName: 'error'
})
uninstall(packageId: string): Promise<any> { return; }
uninstall(packageId: string): Promise<any> {
return;
}
/**
* Check if an app is already installed
@@ -65,6 +69,8 @@ export class FileOpener extends IonicNativePlugin {
successName: 'success',
errorName: 'error'
})
appIsInstalled(packageId: string): Promise<any> { return; }
appIsInstalled(packageId: string): Promise<any> {
return;
}
}
+4 -2
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
declare const window: any;
@@ -39,6 +39,8 @@ export class FilePath extends IonicNativePlugin {
* @returns {Promise<string>}
*/
@Cordova()
resolveNativePath(path: string): Promise<string> { return; }
resolveNativePath(path: string): Promise<string> {
return;
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { CordovaInstance, Plugin, InstanceCheck, checkAvailability, IonicNativePlugin } from '@ionic-native/core';
import { checkAvailability, CordovaInstance, InstanceCheck, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface FileUploadOptions {
@@ -237,7 +237,9 @@ export class FileTransferObject {
successIndex: 2,
errorIndex: 3
})
upload(fileUrl: string, url: string, options?: FileUploadOptions, trustAllHosts?: boolean): Promise<FileUploadResult> { return; }
upload(fileUrl: string, url: string, options?: FileUploadOptions, trustAllHosts?: boolean): Promise<FileUploadResult> {
return;
}
/**
* Downloads a file from server.
@@ -252,7 +254,9 @@ export class FileTransferObject {
successIndex: 2,
errorIndex: 3
})
download(source: string, target: string, trustAllHosts?: boolean, options?: { [s: string]: any; }): Promise<any> { return; }
download(source: string, target: string, trustAllHosts?: boolean, options?: { [s: string]: any; }): Promise<any> {
return;
}
/**
* Registers a listener that gets called whenever a new chunk of data is transferred.
@@ -270,5 +274,6 @@ export class FileTransferObject {
@CordovaInstance({
sync: true
})
abort(): void {}
abort(): void {
}
}
+162 -168
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { CordovaProperty, Plugin, CordovaCheck, IonicNativePlugin } from '@ionic-native/core';
import { CordovaCheck, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface IFile extends Blob {
/**
@@ -25,6 +25,7 @@ export interface IFile extends Blob {
localURL: string;
start: number;
end: number;
/**
* Returns a "slice" of the file. Since Cordova Files don't contain the actual
* content, this really returns a File with adjusted start and end.
@@ -129,6 +130,22 @@ export interface Entry {
* Entry is a directory.
*/
isDirectory: boolean;
/**
* The name of the entry, excluding the path leading to it.
*/
name: string;
/**
* The full absolute path from the root to the entry.
*/
fullPath: string;
/**
* The file system on which the entry resides.
*/
filesystem: FileSystem;
/**
* an alternate URL which can be used by native webview controls, for example media players.
*/
nativeURL: string;
/**
* Look up metadata about this entry.
@@ -145,26 +162,6 @@ export interface Entry {
*/
setMetadata(successCallback: MetadataCallback, errorCallback: ErrorCallback, metadataObject: Metadata): void;
/**
* The name of the entry, excluding the path leading to it.
*/
name: string;
/**
* The full absolute path from the root to the entry.
*/
fullPath: string;
/**
* The file system on which the entry resides.
*/
filesystem: FileSystem;
/**
* an alternate URL which can be used by native webview controls, for example media players.
*/
nativeURL: string;
/**
* Move an entry to a different location on the file system. It is an error to try to:
*
@@ -286,6 +283,7 @@ export interface DirectoryEntry extends Entry {
export interface DirectoryReader {
localURL: string;
hasReadEntries: boolean;
/**
* Read the next block of entries from this directory.
* @param successCallback Called once per successful call to readEntries to deliver the next previously-unreported set of Entries in the associated Directory. If all Entries have already been returned from previous invocations of readEntries, successCallback must be called with a zero-length array as an argument.
@@ -402,6 +400,61 @@ export interface RemoveResult {
/** @hidden */
export declare class FileSaver extends EventTarget {
/**
* The blob is being written.
* @readonly
*/
INIT: number;
/**
* The object has been constructed, but there is no pending write.
* @readonly
*/
WRITING: number;
/**
* The entire Blob has been written to the file, an error occurred during the write, or the write was aborted using abort(). The FileSaver is no longer writing the blob.
* @readonly
*/
DONE: number;
/**
* The FileSaver object can be in one of 3 states. The readyState attribute, on getting, must return the current state, which must be one of the following values:
* <ul>
* <li>INIT</li>
* <li>WRITING</li>
* <li>DONE</li>
* <ul>
* @readonly
*/
readyState: number;
/**
* The last error that occurred on the FileSaver.
* @readonly
*/
error: Error;
/**
* Handler for writestart events
*/
onwritestart: (event: ProgressEvent) => void;
/**
* Handler for progress events.
*/
onprogress: (event: ProgressEvent) => void;
/**
* Handler for write events.
*/
onwrite: (event: ProgressEvent) => void;
/**
* Handler for abort events.
*/
onabort: (event: ProgressEvent) => void;
/**
* Handler for error events.
*/
onerror: (event: ProgressEvent) => void;
/**
* Handler for writeend events.
*/
onwriteend: (event: ProgressEvent) => void;
/**
* When the FileSaver constructor is called, the user agent must return a new FileSaver object with readyState set to INIT.
* This constructor must be visible when the script's global object is either a Window object or an object implementing the WorkerUtils interface.
@@ -422,71 +475,6 @@ export declare class FileSaver extends EventTarget {
* </ol>
*/
abort(): void;
/**
* The blob is being written.
* @readonly
*/
INIT: number;
/**
* The object has been constructed, but there is no pending write.
* @readonly
*/
WRITING: number;
/**
* The entire Blob has been written to the file, an error occurred during the write, or the write was aborted using abort(). The FileSaver is no longer writing the blob.
* @readonly
*/
DONE: number;
/**
* The FileSaver object can be in one of 3 states. The readyState attribute, on getting, must return the current state, which must be one of the following values:
* <ul>
* <li>INIT</li>
* <li>WRITING</li>
* <li>DONE</li>
* <ul>
* @readonly
*/
readyState: number;
/**
* The last error that occurred on the FileSaver.
* @readonly
*/
error: Error;
/**
* Handler for writestart events
*/
onwritestart: (event: ProgressEvent) => void;
/**
* Handler for progress events.
*/
onprogress: (event: ProgressEvent) => void;
/**
* Handler for write events.
*/
onwrite: (event: ProgressEvent) => void;
/**
* Handler for abort events.
*/
onabort: (event: ProgressEvent) => void;
/**
* Handler for error events.
*/
onerror: (event: ProgressEvent) => void;
/**
* Handler for writeend events.
*/
onwriteend: (event: ProgressEvent) => void;
}
/**
@@ -532,7 +520,6 @@ export interface IWriteOptions {
/** @hidden */
export declare class FileError {
constructor(code: number);
static NOT_FOUND_ERR: number;
static SECURITY_ERR: number;
static ABORT_ERR: number;
@@ -548,6 +535,8 @@ export declare class FileError {
/** Error code */
code: number;
message: string;
constructor(code: number);
}
/** @hidden */
@@ -569,9 +558,13 @@ export declare class FileReader {
onabort: (evt: ProgressEvent) => void;
abort(): void;
readAsText(fe: IFile, encoding?: string): void;
readAsDataURL(fe: IFile): void;
readAsBinaryString(fe: IFile): void;
readAsArrayBuffer(fe: IFile): void;
/**
@@ -581,7 +574,8 @@ export declare class FileReader {
}
interface Window extends LocalFileSystem {}
interface Window extends LocalFileSystem {
}
declare const window: Window;
@@ -628,74 +622,74 @@ export class File extends IonicNativePlugin {
/**
* Read-only directory where the application is installed.
*/
@CordovaProperty
@CordovaProperty()
applicationDirectory: string;
/**
* Read-only directory where the application is installed.
*/
@CordovaProperty
@CordovaProperty()
applicationStorageDirectory: string;
/**
* Where to put app-specific data files.
*/
@CordovaProperty
@CordovaProperty()
dataDirectory: string;
/**
* Cached files that should survive app restarts.
* Apps should not rely on the OS to delete files in here.
*/
@CordovaProperty
@CordovaProperty()
cacheDirectory: string;
/**
* Android: the application space on external storage.
*/
@CordovaProperty
@CordovaProperty()
externalApplicationStorageDirectory: string;
/**
* Android: Where to put app-specific data files on external storage.
*/
@CordovaProperty
@CordovaProperty()
externalDataDirectory: string;
/**
* Android: the application cache on external storage.
*/
@CordovaProperty
@CordovaProperty()
externalCacheDirectory: string;
/**
* Android: the external storage (SD card) root.
*/
@CordovaProperty
@CordovaProperty()
externalRootDirectory: string;
/**
* iOS: Temp directory that the OS can clear at will.
*/
@CordovaProperty
@CordovaProperty()
tempDirectory: string;
/**
* iOS: Holds app-specific files that should be synced (e.g. to iCloud).
*/
@CordovaProperty
@CordovaProperty()
syncedDataDirectory: string;
/**
* iOS: Files private to the app, but that are meaningful to other applications (e.g. Office files)
*/
@CordovaProperty
@CordovaProperty()
documentsDirectory: string;
/**
* BlackBerry10: Files globally available to all apps
*/
@CordovaProperty
@CordovaProperty()
sharedDirectory: string;
cordovaFileError: any = {
@@ -1027,31 +1021,6 @@ export class File extends IonicNativePlugin {
});
}
/** Write content to FileEntry.
*
* @hidden
* @param {FileEntry} fe file entry object
* @param {string | Blob} text content or blob to write
* @param {IWriteOptions} options replace file if set to true. See WriteOptions for more information.
* @returns {Promise<FileEntry>} Returns a Promise that resolves to updated file entry or rejects with an error.
*/
private writeFileEntry(fe: FileEntry, text: string | Blob | ArrayBuffer, options: IWriteOptions) {
return this.createWriter(fe)
.then((writer) => {
if (options.append) {
writer.seek(writer.length);
}
if (options.truncate) {
writer.truncate(options.truncate);
}
return this.write(writer, text);
})
.then(() => fe);
}
/** Write to an existing file.
*
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystems above
@@ -1112,40 +1081,6 @@ export class File extends IonicNativePlugin {
return this.readFile<ArrayBuffer>(path, file, 'ArrayBuffer');
}
private readFile<T>(path: string, file: string, readAs: 'ArrayBuffer' | 'BinaryString' | 'DataURL' | 'Text'): Promise<T> {
if ((/^\//.test(file))) {
let err = new FileError(5);
err.message = 'file-name cannot start with \/';
return Promise.reject<any>(err);
}
return this.resolveDirectoryUrl(path)
.then((directoryEntry: DirectoryEntry) => {
return this.getFile(directoryEntry, file, { create: false });
})
.then((fileEntry: FileEntry) => {
const reader = new FileReader();
return new Promise<T>((resolve, reject) => {
reader.onloadend = () => {
if (reader.result !== undefined || reader.result !== null) {
resolve(<T><any>reader.result);
} else if (reader.error !== undefined || reader.error !== null) {
reject(reader.error);
} else {
reject({ code: null, message: 'READER_ONLOADEND_ERR' });
}
};
fileEntry.file(file => {
reader[`readAs${readAs}`].call(reader, file);
}, error => {
reject(error);
});
});
});
}
/**
* Move a file to a given path.
*
@@ -1208,15 +1143,6 @@ export class File extends IonicNativePlugin {
});
}
/**
* @hidden
*/
private fillErrorMessage(err: FileError): void {
try {
err.message = this.cordovaFileError[err.code];
} catch (e) { }
}
/**
* Resolves a local file system URL
* @param fileUrl {string} file system url
@@ -1304,6 +1230,74 @@ export class File extends IonicNativePlugin {
});
}
/** Write content to FileEntry.
*
* @hidden
* @param {FileEntry} fe file entry object
* @param {string | Blob} text content or blob to write
* @param {IWriteOptions} options replace file if set to true. See WriteOptions for more information.
* @returns {Promise<FileEntry>} Returns a Promise that resolves to updated file entry or rejects with an error.
*/
private writeFileEntry(fe: FileEntry, text: string | Blob | ArrayBuffer, options: IWriteOptions) {
return this.createWriter(fe)
.then((writer) => {
if (options.append) {
writer.seek(writer.length);
}
if (options.truncate) {
writer.truncate(options.truncate);
}
return this.write(writer, text);
})
.then(() => fe);
}
private readFile<T>(path: string, file: string, readAs: 'ArrayBuffer' | 'BinaryString' | 'DataURL' | 'Text'): Promise<T> {
if ((/^\//.test(file))) {
let err = new FileError(5);
err.message = 'file-name cannot start with \/';
return Promise.reject<any>(err);
}
return this.resolveDirectoryUrl(path)
.then((directoryEntry: DirectoryEntry) => {
return this.getFile(directoryEntry, file, { create: false });
})
.then((fileEntry: FileEntry) => {
const reader = new FileReader();
return new Promise<T>((resolve, reject) => {
reader.onloadend = () => {
if (reader.result !== undefined || reader.result !== null) {
resolve(<T><any>reader.result);
} else if (reader.error !== undefined || reader.error !== null) {
reject(reader.error);
} else {
reject({ code: null, message: 'READER_ONLOADEND_ERR' });
}
};
fileEntry.file(file => {
reader[`readAs${readAs}`].call(reader, file);
}, error => {
reject(error);
});
});
});
}
/**
* @hidden
*/
private fillErrorMessage(err: FileError): void {
try {
err.message = this.cordovaFileError[err.code];
} catch (e) {
}
}
/**
* @hidden
*/
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface FingerprintOptions {
@@ -72,7 +72,9 @@ export class FingerprintAIO extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise with result
*/
@Cordova()
isAvailable(): Promise<any> { return; }
isAvailable(): Promise<any> {
return;
}
/**
* Show authentication dialogue
@@ -80,6 +82,8 @@ export class FingerprintAIO extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise that resolves when authentication was successfull
*/
@Cordova()
show(options: FingerprintOptions): Promise<any> { return; }
show(options: FingerprintOptions): Promise<any> {
return;
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @beta
@@ -44,7 +44,9 @@ export class FirebaseAnalytics extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise
*/
@Cordova()
logEvent(name: string, params: any): Promise<any> { return; }
logEvent(name: string, params: any): Promise<any> {
return;
}
/**
* Sets the user ID property.
@@ -53,7 +55,9 @@ export class FirebaseAnalytics extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise
*/
@Cordova()
setUserId(id: string): Promise<any> { return; }
setUserId(id: string): Promise<any> {
return;
}
/**
* This feature must be used in accordance with Google's Privacy Policy.
@@ -63,7 +67,9 @@ export class FirebaseAnalytics extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise
*/
@Cordova()
setUserProperty(name: string, value: string): Promise<any> { return; }
setUserProperty(name: string, value: string): Promise<any> {
return;
}
/**
* Sets whether analytics collection is enabled for this app on this device.
@@ -71,7 +77,9 @@ export class FirebaseAnalytics extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise
*/
@Cordova()
setEnabled(enabled: boolean): Promise<any> { return; }
setEnabled(enabled: boolean): Promise<any> {
return;
}
/**
* Sets the current screen name, which specifies the current visual context in your app.
@@ -80,6 +88,8 @@ export class FirebaseAnalytics extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise
*/
@Cordova()
setCurrentScreen(name: string): Promise<any> { return; }
setCurrentScreen(name: string): Promise<any> {
return;
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface DynamicLinksOptions {
title: string;
@@ -78,7 +78,9 @@ export class FirebaseDynamicLinks extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise
*/
@Cordova()
onDynamicLink(): Promise<any> { return; }
onDynamicLink(): Promise<any> {
return;
}
/**
* Display invitation dialog.
@@ -86,6 +88,8 @@ export class FirebaseDynamicLinks extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise
*/
@Cordova()
sendInvitation(options: DynamicLinksOptions): Promise<any> { return; }
sendInvitation(options: DynamicLinksOptions): Promise<any> {
return;
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
/**
+16 -6
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Flashlight
@@ -34,28 +34,36 @@ export class Flashlight extends IonicNativePlugin {
* @returns {Promise<boolean>} Returns a promise that resolves with a boolean stating if the flashlight is available.
*/
@Cordova()
available(): Promise<boolean> { return; }
available(): Promise<boolean> {
return;
}
/**
* Switches the flashlight on
* @returns {Promise<boolean>}
*/
@Cordova()
switchOn(): Promise<boolean> { return; }
switchOn(): Promise<boolean> {
return;
}
/**
* Switches the flashlight off
* @returns {Promise<boolean>}
*/
@Cordova()
switchOff(): Promise<boolean> { return; }
switchOff(): Promise<boolean> {
return;
}
/**
* Toggles the flashlight
* @returns {Promise<any>}
*/
@Cordova()
toggle(): Promise<any> { return; }
toggle(): Promise<any> {
return;
}
/**
@@ -65,6 +73,8 @@ export class Flashlight extends IonicNativePlugin {
@Cordova({
sync: true
})
isSwitchedOn(): boolean { return; }
isSwitchedOn(): boolean {
return;
}
}
@@ -1,4 +1,4 @@
import { Plugin, CordovaInstance, checkAvailability, IonicNativePlugin } from '@ionic-native/core';
import { checkAvailability, CordovaInstance, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
export interface FlurryAnalyticsOptions {
@@ -73,11 +73,12 @@ export interface FlurryAnalyticsLocation {
}
/**
* @hidden
*/
* @hidden
*/
export class FlurryAnalyticsObject {
constructor(private _objectInstance: any) { }
constructor(private _objectInstance: any) {
}
/**
* This function set the Event
@@ -192,7 +193,7 @@ export class FlurryAnalyticsObject {
* appKey: '<your app key>', // REQUIRED
* reportSessionsOnClose: true,
* enableLogging: true
* };
* }
*
* let fa: FlurryAnalyticsObject = this.flurryAnalytics.create(options);
*
+36 -18
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs';
/**
@@ -34,16 +34,18 @@ import { Observable } from 'rxjs';
export class FTP extends IonicNativePlugin {
/**
* Connect to one ftp server.
*
* Just need to init the connection once. If success, you can do any ftp actions later.
* @param hostname {string} The ftp server url. Like ip without protocol prefix, e.g. "192.168.1.1".
* @param username {string} The ftp login username. If it and `password` are all blank/undefined, the default username "anonymous" is used.
* @param password {string} The ftp login password. If it and `username` are all blank/undefined, the default password "anonymous@" is used.
* @return {Promise<any>} The success callback. Notice: For iOS, if triggered, means `init` success, but NOT means the later action, e.g. `ls`... `download` will success!
*/
* Connect to one ftp server.
*
* Just need to init the connection once. If success, you can do any ftp actions later.
* @param hostname {string} The ftp server url. Like ip without protocol prefix, e.g. "192.168.1.1".
* @param username {string} The ftp login username. If it and `password` are all blank/undefined, the default username "anonymous" is used.
* @param password {string} The ftp login password. If it and `username` are all blank/undefined, the default password "anonymous@" is used.
* @return {Promise<any>} The success callback. Notice: For iOS, if triggered, means `init` success, but NOT means the later action, e.g. `ls`... `download` will success!
*/
@Cordova()
connect(hostname: string, username: string, password: string): Promise<any> { return; }
connect(hostname: string, username: string, password: string): Promise<any> {
return;
}
/**
* List files (with info of `name`, `type`, `link`, `size`, `modifiedDate`) under one directory on the ftp server.
@@ -60,7 +62,9 @@ export class FTP extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise
*/
@Cordova()
ls(path: string): Promise<any> { return; }
ls(path: string): Promise<any> {
return;
}
/**
* Create one directory on the ftp server.
@@ -69,7 +73,9 @@ export class FTP extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise
*/
@Cordova()
mkdir(path: string): Promise<any> { return; }
mkdir(path: string): Promise<any> {
return;
}
/**
* Delete one directory on the ftp server.
@@ -80,7 +86,9 @@ export class FTP extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise
*/
@Cordova()
rmdir(path: string): Promise<any> { return; }
rmdir(path: string): Promise<any> {
return;
}
/**
* Delete one file on the ftp server.
@@ -89,7 +97,9 @@ export class FTP extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise
*/
@Cordova()
rm(file: string): Promise<any> { return; }
rm(file: string): Promise<any> {
return;
}
/**
* Upload one local file to the ftp server.
@@ -103,7 +113,9 @@ export class FTP extends IonicNativePlugin {
@Cordova({
observable: true
})
upload(localFile: string, remoteFile: string): Observable<any> { return; }
upload(localFile: string, remoteFile: string): Observable<any> {
return;
}
/**
* Download one remote file on the ftp server to local path.
@@ -117,7 +129,9 @@ export class FTP extends IonicNativePlugin {
@Cordova({
observable: true
})
download(localFile: string, remoteFile: string): Observable<any> { return; }
download(localFile: string, remoteFile: string): Observable<any> {
return;
}
/**
* Cancel all requests. Always success.
@@ -125,7 +139,9 @@ export class FTP extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise
*/
@Cordova()
cancel(): Promise<any> { return; }
cancel(): Promise<any> {
return;
}
/**
* Disconnect from ftp server.
@@ -133,6 +149,8 @@ export class FTP extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise
*/
@Cordova()
disconnect(): Promise<any> { return; }
disconnect(): Promise<any> {
return;
}
}
+21 -8
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, CordovaFunctionOverride, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, CordovaFunctionOverride, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
declare const window: any;
@@ -96,7 +96,9 @@ export class Geofence extends IonicNativePlugin {
* @return {Observable<any>}
*/
@CordovaFunctionOverride()
onTransitionReceived(): Observable<any> { return; };
onTransitionReceived(): Observable<any> {
return;
}
/**
* Initializes the plugin. User will be prompted to allow the app to use location and notifications.
@@ -104,7 +106,9 @@ export class Geofence extends IonicNativePlugin {
* @returns {Promise<void>}
*/
@Cordova()
initialize(): Promise<void> { return; };
initialize(): Promise<void> {
return;
}
/**
* Adds a new geofence or array of geofences. For geofence object, see above.
@@ -112,7 +116,9 @@ export class Geofence extends IonicNativePlugin {
* @returns {Promise<void>}
*/
@Cordova()
addOrUpdate(geofences: Object | Array<Object>): Promise<void> { return; };
addOrUpdate(geofences: Object | Array<Object>): Promise<void> {
return;
}
/**
* Removes a geofence or array of geofences. `geofenceID` corresponds to one or more IDs specified when the
@@ -121,7 +127,9 @@ export class Geofence extends IonicNativePlugin {
* @returns {Promise<void>}
*/
@Cordova()
remove(geofenceId: string | Array<string>): Promise<void> { return; };
remove(geofenceId: string | Array<string>): Promise<void> {
return;
}
/**
* Removes all geofences.
@@ -129,7 +137,9 @@ export class Geofence extends IonicNativePlugin {
* @returns {Promise<void>}
*/
@Cordova()
removeAll(): Promise<void> { return; };
removeAll(): Promise<void> {
return;
}
/**
* Returns an array of geofences currently being monitored.
@@ -137,7 +147,9 @@ export class Geofence extends IonicNativePlugin {
* @returns {Promise<Array<string>>}
*/
@Cordova()
getWatched(): Promise<string> { return; };
getWatched(): Promise<string> {
return;
}
/**
* Called when the user clicks a geofence notification. iOS and Android only.
@@ -148,7 +160,8 @@ export class Geofence extends IonicNativePlugin {
return new Observable<any>((observer) => {
window && window.geofence && (window.geofence.onNotificationClicked = observer.next.bind(observer));
return () => window.geofence.onNotificationClicked = () => { };
return () => window.geofence.onNotificationClicked = () => {
};
});
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
declare const navigator: any;
@@ -169,7 +169,9 @@ export class Geolocation extends IonicNativePlugin {
@Cordova({
callbackOrder: 'reverse'
})
getCurrentPosition(options?: GeolocationOptions): Promise<Geoposition> { return; }
getCurrentPosition(options?: GeolocationOptions): Promise<Geoposition> {
return;
}
/**
* Watch the current device's position. Clear the watch by unsubscribing from
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Globalization
@@ -36,14 +36,18 @@ export class Globalization extends IonicNativePlugin {
* @returns {Promise<{value: string}>}
*/
@Cordova()
getPreferredLanguage(): Promise<{ value: string }> { return; }
getPreferredLanguage(): Promise<{ value: string }> {
return;
}
/**
* Returns the BCP 47 compliant locale identifier string to the successCallback with a properties object as a parameter.
* @returns {Promise<{value: string}>}
*/
@Cordova()
getLocaleName(): Promise<{ value: string }> { return; }
getLocaleName(): Promise<{ value: string }> {
return;
}
/**
* Converts date to string
@@ -55,7 +59,9 @@ export class Globalization extends IonicNativePlugin {
successIndex: 1,
errorIndex: 2
})
dateToString(date: Date, options: { formatLength: string, selector: string }): Promise<{ value: string }> { return; }
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.
@@ -67,7 +73,9 @@ export class Globalization extends IonicNativePlugin {
successIndex: 1,
errorIndex: 2
})
stringToDate(dateString: string, options: { formatLength: string, selector: string }): Promise<{ year: number, month: number, day: number, hour: number, minute: number, second: number, millisecond: number }> { return; }
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.
@@ -77,7 +85,9 @@ export class Globalization extends IonicNativePlugin {
@Cordova({
callbackOrder: 'reverse'
})
getDatePattern(options: { formatLength: string, selector: string }): Promise<{ pattern: string, timezone: string, utf_offset: number, dst_offset: number }> { return; }
getDatePattern(options: { formatLength: string, selector: string }): Promise<{ pattern: string, timezone: string, utf_offset: number, dst_offset: number }> {
return;
}
/**
* Returns an array of the names of the months or days of the week, depending on the client's user preferences and calendar.
@@ -87,7 +97,9 @@ export class Globalization extends IonicNativePlugin {
@Cordova({
callbackOrder: 'reverse'
})
getDateNames(options: { type: string, item: string }): Promise<{ value: Array<string> }> { return; }
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.
@@ -95,14 +107,18 @@ export class Globalization extends IonicNativePlugin {
* @returns {Promise<{dst: string}>} reutrns a promise with the value
*/
@Cordova()
isDayLightSavingsTime(date: Date): Promise<{ dst: string }> { return; }
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: string}>} returns a promise with the value
*/
@Cordova()
getFirstDayOfWeek(): Promise<{ value: string }> { return; }
getFirstDayOfWeek(): Promise<{ value: string }> {
return;
}
/**
* Returns a number formatted as a string according to the client's user preferences.
@@ -113,7 +129,9 @@ export class Globalization extends IonicNativePlugin {
successIndex: 1,
errorIndex: 2
})
numberToString(numberToConvert: number, options: { type: string }): Promise<{ value: string }> { return; }
numberToString(numberToConvert: number, options: { type: string }): Promise<{ value: string }> {
return;
}
/**
*
@@ -125,7 +143,9 @@ export class Globalization extends IonicNativePlugin {
successIndex: 1,
errorIndex: 2
})
stringToNumber(stringToConvert: string, options: { type: string }): Promise<{ value: number | string }> { return; }
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.
@@ -135,7 +155,9 @@ export class Globalization extends IonicNativePlugin {
@Cordova({
callbackOrder: 'reverse'
})
getNumberPattern(options: { type: string }): Promise<{ pattern: string, symbol: string, fraction: number, rounding: number, positive: string, negative: string, decimal: string, grouping: string }> { return; }
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.
@@ -143,6 +165,8 @@ export class Globalization extends IonicNativePlugin {
* @returns {Promise<{ pattern: string, code: string, fraction: number, rounding: number, decimal: number, grouping: string }>}
*/
@Cordova()
getCurrencyPattern(currencyCode: string): Promise<{ pattern: string, code: string, fraction: number, rounding: number, decimal: number, grouping: string }> { return; }
getCurrencyPattern(currencyCode: string): Promise<{ pattern: string, code: string, fraction: number, rounding: number, decimal: number, grouping: string }> {
return;
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Google Analytics
@@ -50,7 +50,9 @@ export class GoogleAnalytics extends IonicNativePlugin {
successIndex: 2,
errorIndex: 3
})
startTrackerWithId(id: string, interval?: number): Promise<any> { return; }
startTrackerWithId(id: string, interval?: number): Promise<any> {
return;
}
/**
* Enabling Advertising Features in Google Analytics allows you to take advantage of Remarketing, Demographics & Interests reports, and more
@@ -58,7 +60,9 @@ export class GoogleAnalytics extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
setAllowIDFACollection(allow: boolean): Promise<any> { return; }
setAllowIDFACollection(allow: boolean): Promise<any> {
return;
}
/**
* Set a UserId
@@ -67,7 +71,9 @@ export class GoogleAnalytics extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
setUserId(id: string): Promise<any> { return; }
setUserId(id: string): Promise<any> {
return;
}
/**
* Set a anonymize Ip address
@@ -75,7 +81,9 @@ export class GoogleAnalytics extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
setAnonymizeIp(anonymize: boolean): Promise<any> { return; }
setAnonymizeIp(anonymize: boolean): Promise<any> {
return;
}
/**
* Sets the app version
@@ -83,7 +91,9 @@ export class GoogleAnalytics extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
setAppVersion(appVersion: string): Promise<any> { return; }
setAppVersion(appVersion: string): Promise<any> {
return;
}
/**
* Set OptOut
@@ -91,14 +101,18 @@ export class GoogleAnalytics extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
setOptOut(optout: boolean): Promise<any> { return; }
setOptOut(optout: boolean): Promise<any> {
return;
}
/**
* Enable verbose logging
* @returns {Promise<any>}
*/
@Cordova()
debugMode(): Promise<any> { return; }
debugMode(): Promise<any> {
return;
}
/**
* Track custom metric
@@ -110,7 +124,9 @@ export class GoogleAnalytics extends IonicNativePlugin {
successIndex: 2,
errorIndex: 3
})
trackMetric(key: number, value?: number): Promise<any> { return; }
trackMetric(key: number, value?: number): Promise<any> {
return;
}
/**
* Track a screen
@@ -125,7 +141,9 @@ export class GoogleAnalytics extends IonicNativePlugin {
successIndex: 3,
errorIndex: 4
})
trackView(title: string, campaignUrl?: string, newSession?: boolean): Promise<any> { return; }
trackView(title: string, campaignUrl?: string, newSession?: boolean): Promise<any> {
return;
}
/**
* Add a Custom Dimension
@@ -135,7 +153,9 @@ export class GoogleAnalytics extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
addCustomDimension(key: number, value: string): Promise<any> { return; }
addCustomDimension(key: number, value: string): Promise<any> {
return;
}
/**
* Track an event
@@ -151,7 +171,9 @@ export class GoogleAnalytics extends IonicNativePlugin {
successIndex: 5,
errorIndex: 6
})
trackEvent(category: string, action: string, label?: string, value?: number, newSession?: boolean): Promise<any> { return; }
trackEvent(category: string, action: string, label?: string, value?: number, newSession?: boolean): Promise<any> {
return;
}
/**
* Track an exception
@@ -160,7 +182,9 @@ export class GoogleAnalytics extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
trackException(description: string, fatal: boolean): Promise<any> { return; }
trackException(description: string, fatal: boolean): Promise<any> {
return;
}
/**
* Track User Timing (App Speed)
@@ -171,7 +195,9 @@ export class GoogleAnalytics extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
trackTiming(category: string, intervalInMilliseconds: number, variable: string, label: string): Promise<any> { return; }
trackTiming(category: string, intervalInMilliseconds: number, variable: string, label: string): Promise<any> {
return;
}
/**
* Add a Transaction (Ecommerce)
@@ -185,7 +211,9 @@ export class GoogleAnalytics extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
addTransaction(id: string, affiliation: string, revenue: number, tax: number, shipping: number, currencyCode: string): Promise<any> { return; }
addTransaction(id: string, affiliation: string, revenue: number, tax: number, shipping: number, currencyCode: string): Promise<any> {
return;
}
/**
* Add a Transaction Item (Ecommerce)
@@ -200,7 +228,9 @@ export class GoogleAnalytics extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
addTransactionItem(id: string, name: string, sku: string, category: string, price: number, quantity: number, currencyCode: string): Promise<any> { return; }
addTransactionItem(id: string, name: string, sku: string, category: string, price: number, quantity: number, currencyCode: string): Promise<any> {
return;
}
/**
* Enable/disable automatic reporting of uncaught exceptions
@@ -208,6 +238,8 @@ export class GoogleAnalytics extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
enableUncaughtExceptionReporting(shouldEnable: boolean): Promise<any> { return; }
enableUncaughtExceptionReporting(shouldEnable: boolean): Promise<any> {
return;
}
}
File diff suppressed because it is too large Load Diff
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface ScoreData {
@@ -67,10 +67,10 @@ export interface Player {
* The title of the player based on their gameplay activity. Not
* all players have this and it may change over time.
*/
title: string|null;
title: string | null;
/**
* Retrieves the URI for loading this player's icon-size profile image.
* Retrieves the URI for loading this player's icon-size profile image.
* Returns null if the player has no profile image.
*/
iconImageUrl: string;
@@ -101,12 +101,12 @@ export interface Player {
* this.googlePlayGamesServices.auth()
* .then(() => console.log('Logged in to Play Games Services'))
* .catch(e) => console.log('Error logging in Play Games Services', e);
*
*
* // Sign out of Play Games Services.
* this.googlePlayGamesServices.signOut()
* .then(() => console.log('Logged out of Play Games Services'))
* .catch(e => console.log('Error logging out of Play Games Services', e);
*
*
* // Check auth status.
* this.googlePlayGamesServices.isSignedIn()
* .then((signedIn: SignedInResponse) => {
@@ -114,38 +114,38 @@ export interface Player {
* hideLoginButton();
* }
* });
*
*
* // Fetch currently authenticated user's data.
* this.googlePlayGamesServices.showPlayer().then((data: Player) => {
* console.log('Player data', data);
* });
*
*
* // Submit a score.
* this.googlePlayGamesServices.submitScore({
* score: 100,
* leaderboardId: 'SomeLeaderboardId'
* });
*
*
* // Show the native leaderboards window.
* this.googlePlayGamesServices.showAllLeaderboards()
* .then(() => console.log('The leaderboard window is visible.'));
*
*
* // Show a signle native leaderboard window.
* this.googlePlayGamesServices.showLeaderboard({
* leaderboardId: 'SomeLeaderBoardId'
* }).then(() => console.log('The leaderboard window is visible.'));
*
*
* // Unlock an achievement.
* this.googlePlayGamesServices.unlockAchievement({
* achievementId: 'SomeAchievementId'
* }).then(() => console.log('Achievement unlocked'));
*
*
* // Incremement an achievement.
* this.googlePlayGamesServices.incrementAchievement({
* step: 1,
* achievementId: 'SomeAchievementId'
* }).then(() => console.log('Achievement incremented'));
*
*
* // Show the native achievements window.
* this.googlePlayGamesServices.showAchivements()
* .then(() => console.log('The achievements window is visible.'));
@@ -165,100 +165,120 @@ export class GooglePlayGamesServices extends IonicNativePlugin {
/**
* Initialise native Play Games Service login procedure.
*
*
* @return {Promise<any>} Returns a promise that resolves when the player
* is authenticated with Play Games Services.
*/
@Cordova()
auth(): Promise<any> { return; }
auth(): Promise<any> {
return;
}
/**
* Sign out of Google Play Games Services.
*
*
* @return {Promise<any>} Returns a promise that resolve when the player
* successfully signs out.
*/
@Cordova()
signOut(): Promise<any> { return; }
signOut(): Promise<any> {
return;
}
/**
* Check if the user is signed in.
*
*
* @return {Promise<SignedInResponse>} Returns a promise that resolves with
* the signed in response.
*/
@Cordova()
isSignedIn(): Promise<SignedInResponse> { return; }
isSignedIn(): Promise<SignedInResponse> {
return;
}
/**
* Show the currently authenticated player.
*
* @return {Promise<Player>} Returns a promise that resolves when Play
*
* @return {Promise<Player>} Returns a promise that resolves when Play
* Games Services returns the authenticated player.
*/
@Cordova()
showPlayer(): Promise<Player> { return; }
showPlayer(): Promise<Player> {
return;
}
/**
* Submit a score to a leaderboard. You should ensure that you have a
* successful return from auth() before submitting a score.
*
*
* @param data {ScoreData} The score data you want to submit.
* @return {Promise<any>} Returns a promise that resolves when the
* score is submitted.
*/
@Cordova()
submitScore(data: ScoreData): Promise<string> { return; }
submitScore(data: ScoreData): Promise<string> {
return;
}
/**
* Launches the native Play Games leaderboard view controller to show all the
* leaderboards.
*
*
* @return {Promise<any>} Returns a promise that resolves when the native
* leaderboards window opens.
*/
@Cordova()
showAllLeaderboards(): Promise<any> { return; }
showAllLeaderboards(): Promise<any> {
return;
}
/**
* Launches the native Play Games leaderboard view controll to show the
* specified leaderboard.
*
*
* @param data {LeaderboardData} The leaderboard you want to show.
* @return {Promise<any>} Returns a promise that resolves when the native
* leaderboard window opens.
*/
@Cordova()
showLeaderboard(data: LeaderboardData): Promise<any> { return; }
showLeaderboard(data: LeaderboardData): Promise<any> {
return;
}
/**
* Unlock an achievement.
*
*
* @param data {AchievementData}
* @return {Promise<any>} Returns a promise that resolves when the
* achievement is unlocked.
*/
@Cordova()
unlockAchievement(data: AchievementData): Promise<string> { return; }
unlockAchievement(data: AchievementData): Promise<string> {
return;
}
/**
* Increment an achievement.
*
*
* @param data {IncrementableAchievementData}
* @return {Promise<any>} Returns a promise that resolves when the
* achievement is incremented.
*/
@Cordova()
incrementAchievement(data: IncrementableAchievementData): Promise<string> { return; }
incrementAchievement(data: IncrementableAchievementData): Promise<string> {
return;
}
/**
* Lauches the native Play Games achievements view controller to show
* achievements.
*
*
* @return {Promise<any>} Returns a promise that resolves when the
* achievement window opens.
*/
@Cordova()
showAchievements(): Promise<any> { return; }
showAchievements(): Promise<any> {
return;
}
}
+16 -6
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Google Plus
@@ -39,7 +39,9 @@ export class GooglePlus extends IonicNativePlugin {
successIndex: 1,
errorIndex: 2
})
login(options?: any): Promise<any> { return; }
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.
@@ -47,27 +49,35 @@ export class GooglePlus extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
trySilentLogin(options?: any): Promise<any> { return; }
trySilentLogin(options?: any): Promise<any> {
return;
}
/**
* This will clear the OAuth2 token.
* @returns {Promise<any>}
*/
@Cordova()
logout(): Promise<any> { return; }
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.
* @returns {Promise<any>}
*/
@Cordova()
disconnect(): Promise<any> { return; }
disconnect(): Promise<any> {
return;
}
/**
* This will retrieve the Android signing certificate fingerprint which is required in the Google Developer Console.
* @returns {Promise<any>}
*/
@Cordova()
getSigningCertificateFingerprint(): Promise<any> { return; }
getSigningCertificateFingerprint(): Promise<any> {
return;
}
}
+5 -3
View File
@@ -1,4 +1,4 @@
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Injectable } from '@angular/core';
@@ -54,7 +54,7 @@ export interface GyroscopeOptions {
*
* let options: GyroscopeOptions = {
* frequency: 1000
* };
* }
*
* this.gyroscope.getCurrent(options)
* .then((orientation: GyroscopeOrientation) => {
@@ -105,5 +105,7 @@ export class Gyroscope extends IonicNativePlugin {
@Cordova({
callbackOrder: 'reverse'
})
getCurrent(options?: GyroscopeOptions): Promise<GyroscopeOrientation> { return; }
getCurrent(options?: GyroscopeOptions): Promise<GyroscopeOrientation> {
return;
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Header Color
@@ -37,6 +37,8 @@ export class HeaderColor extends IonicNativePlugin {
successName: 'success',
errorName: 'failure'
})
tint(color: string): Promise<any> { return; }
tint(color: string): Promise<any> {
return;
}
}
+187 -145
View File
@@ -1,116 +1,116 @@
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
export interface HealthKitOptions {
/**
* HKWorkoutActivityType constant
* Read more here: https://developer.apple.com/library/ios/documentation/HealthKit/Reference/HKWorkout_Class/#//apple_ref/c/tdef/HKWorkoutActivityType
*/
* HKWorkoutActivityType constant
* Read more here: https://developer.apple.com/library/ios/documentation/HealthKit/Reference/HKWorkout_Class/#//apple_ref/c/tdef/HKWorkoutActivityType
*/
activityType?: string; //
/**
* 'hour', 'week', 'year' or 'day', default 'day'
*/
* 'hour', 'week', 'year' or 'day', default 'day'
*/
aggregation?: string;
/**
*
*/
*
*/
amount?: number;
/**
*
*/
*
*/
correlationType?: string;
/**
*
*/
*
*/
date?: any;
/**
*
*/
*
*/
distance?: number;
/**
* probably useful with the former param
*/
* probably useful with the former param
*/
distanceUnit?: string;
/**
* in seconds, optional, use either this or endDate
*/
* in seconds, optional, use either this or endDate
*/
duration?: number;
/**
*
*/
*
*/
endDate?: any;
/**
*
*/
*
*/
energy?: number;
/**
* J|cal|kcal
*/
* J|cal|kcal
*/
energyUnit?: string;
/**
*
*/
*
*/
extraData?: any;
/**
*
*/
*
*/
metadata?: any;
/**
*
*/
*
*/
quantityType?: string;
/**
*
*/
*
*/
readTypes?: any;
/**
*
*/
*
*/
requestWritePermission?: boolean;
/**
*
*/
*
*/
samples?: any;
/**
*
*/
*
*/
sampleType?: string;
/**
*
*/
*
*/
startDate?: any;
/**
* m|cm|mm|in|ft
*/
* m|cm|mm|in|ft
*/
unit?: string;
/**
*
*/
*
*/
requestReadPermission?: boolean;
/**
*
*/
*
*/
writeTypes?: any;
}
@@ -144,166 +144,208 @@ export interface HealthKitOptions {
export class HealthKit extends IonicNativePlugin {
/**
* Check if HealthKit is supported (iOS8+, not on iPad)
* @returns {Promise<any>}
*/
* Check if HealthKit is supported (iOS8+, not on iPad)
* @returns {Promise<any>}
*/
@Cordova()
available(): Promise<any> { return; }
available(): Promise<any> {
return;
}
/**
* Pass in a type and get back on of undetermined | denied | authorized
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
* Pass in a type and get back on of undetermined | denied | authorized
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
@Cordova()
checkAuthStatus(options: HealthKitOptions): Promise<any> { return; }
checkAuthStatus(options: HealthKitOptions): Promise<any> {
return;
}
/**
* Ask some or all permissions up front
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
* Ask some or all permissions up front
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
@Cordova()
requestAuthorization(options: HealthKitOptions): Promise<any> { return; }
requestAuthorization(options: HealthKitOptions): Promise<any> {
return;
}
/**
* Formatted as yyyy-MM-dd
* @returns {Promise<any>}
*/
* Formatted as yyyy-MM-dd
* @returns {Promise<any>}
*/
@Cordova()
readDateOfBirth(): Promise<any> { return; }
readDateOfBirth(): Promise<any> {
return;
}
/**
* Output = male|female|other|unknown
* @returns {Promise<any>}
*/
* Output = male|female|other|unknown
* @returns {Promise<any>}
*/
@Cordova()
readGender(): Promise<any> { return; }
readGender(): Promise<any> {
return;
}
/**
* Output = A+|A-|B+|B-|AB+|AB-|O+|O-|unknown
* @returns {Promise<any>}
*/
* Output = A+|A-|B+|B-|AB+|AB-|O+|O-|unknown
* @returns {Promise<any>}
*/
@Cordova()
readBloodType(): Promise<any> { return; }
readBloodType(): Promise<any> {
return;
}
/**
* Output = I|II|III|IV|V|VI|unknown
* @returns {Promise<any>}
*/
* Output = I|II|III|IV|V|VI|unknown
* @returns {Promise<any>}
*/
@Cordova()
readFitzpatrickSkinType(): Promise<any> { return; }
readFitzpatrickSkinType(): Promise<any> {
return;
}
/**
* Pass in unit (g=gram, kg=kilogram, oz=ounce, lb=pound, st=stone) and amount
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
* Pass in unit (g=gram, kg=kilogram, oz=ounce, lb=pound, st=stone) and amount
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
@Cordova()
saveWeight(options: HealthKitOptions): Promise<any> { return; }
saveWeight(options: HealthKitOptions): Promise<any> {
return;
}
/**
* Pass in unit (g=gram, kg=kilogram, oz=ounce, lb=pound, st=stone)
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
* Pass in unit (g=gram, kg=kilogram, oz=ounce, lb=pound, st=stone)
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
@Cordova()
readWeight(options: HealthKitOptions): Promise<any> { return; }
readWeight(options: HealthKitOptions): Promise<any> {
return;
}
/**
* Pass in unit (mm=millimeter, cm=centimeter, m=meter, in=inch, ft=foot) and amount
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
* Pass in unit (mm=millimeter, cm=centimeter, m=meter, in=inch, ft=foot) and amount
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
@Cordova()
saveHeight(options: HealthKitOptions): Promise<any> { return; }
saveHeight(options: HealthKitOptions): Promise<any> {
return;
}
/**
* Pass in unit (mm=millimeter, cm=centimeter, m=meter, in=inch, ft=foot)
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
* Pass in unit (mm=millimeter, cm=centimeter, m=meter, in=inch, ft=foot)
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
@Cordova()
readHeight(options: HealthKitOptions): Promise<any> { return; }
readHeight(options: HealthKitOptions): Promise<any> {
return;
}
/**
* no params yet, so this will return all workouts ever of any type
* @returns {Promise<any>}
*/
* no params yet, so this will return all workouts ever of any type
* @returns {Promise<any>}
*/
@Cordova()
findWorkouts(): Promise<any> { return; }
findWorkouts(): Promise<any> {
return;
}
/**
*
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
*
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
@Cordova()
saveWorkout(options: HealthKitOptions): Promise<any> { return; }
saveWorkout(options: HealthKitOptions): Promise<any> {
return;
}
/**
*
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
*
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
@Cordova()
querySampleType(options: HealthKitOptions): Promise<any> { return; }
querySampleType(options: HealthKitOptions): Promise<any> {
return;
}
/**
*
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
*
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
@Cordova()
querySampleTypeAggregated(options: HealthKitOptions): Promise<any> { return; }
querySampleTypeAggregated(options: HealthKitOptions): Promise<any> {
return;
}
/**
*
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
*
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
@Cordova()
deleteSamples(options: HealthKitOptions): Promise<any> { return; }
deleteSamples(options: HealthKitOptions): Promise<any> {
return;
}
/**
*
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
*
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
@Cordova()
monitorSampleType(options: HealthKitOptions): Promise<any> { return; }
monitorSampleType(options: HealthKitOptions): Promise<any> {
return;
}
/**
*
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
*
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
@Cordova()
sumQuantityType(options: HealthKitOptions): Promise<any> { return; }
sumQuantityType(options: HealthKitOptions): Promise<any> {
return;
}
/**
*
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
*
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
@Cordova()
saveQuantitySample(options: HealthKitOptions): Promise<any> { return; }
saveQuantitySample(options: HealthKitOptions): Promise<any> {
return;
}
/**
*
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
*
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
@Cordova()
saveCorrelation(options: HealthKitOptions): Promise<any> { return; }
saveCorrelation(options: HealthKitOptions): Promise<any> {
return;
}
/**
*
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
*
* @param options {HealthKitOptions}
* @returns {Promise<any>}
*/
@Cordova()
queryCorrelationType(options: HealthKitOptions): Promise<any> { return; }
queryCorrelationType(options: HealthKitOptions): Promise<any> {
return;
}
}
+26 -12
View File
@@ -1,4 +1,4 @@
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
/**
@@ -6,13 +6,13 @@ import { Injectable } from '@angular/core';
*/
export interface HealthDataType {
/**
* Read only date types (see https://github.com/dariosalvi78/cordova-plugin-health#supported-data-types)
*/
* Read only date types (see https://github.com/dariosalvi78/cordova-plugin-health#supported-data-types)
*/
read?: string[];
/**
* Write only date types (see https://github.com/dariosalvi78/cordova-plugin-health#supported-data-types)
*/
* Write only date types (see https://github.com/dariosalvi78/cordova-plugin-health#supported-data-types)
*/
write?: string[];
}
@@ -210,7 +210,9 @@ export class Health extends IonicNativePlugin {
@Cordova({
callbackOrder: 'reverse'
})
isAvailable(): Promise<boolean> { return; }
isAvailable(): Promise<boolean> {
return;
}
/**
* Checks if recent Google Play Services and Google Fit are installed. If the play services are not installed,
@@ -226,7 +228,9 @@ export class Health extends IonicNativePlugin {
@Cordova({
callbackOrder: 'reverse'
})
promptInstallFit(): Promise<any> { return; }
promptInstallFit(): Promise<any> {
return;
}
/**
* Requests read and/or write access to a set of data types. It is recommendable to always explain why the app
@@ -248,7 +252,9 @@ export class Health extends IonicNativePlugin {
* @return {Promise<any>}
*/
@Cordova()
requestAuthorization(datatypes: Array<string | HealthDataType>): Promise<any> { return; }
requestAuthorization(datatypes: Array<string | HealthDataType>): Promise<any> {
return;
}
/**
* Check if the app has authorization to read/write a set of datatypes.
@@ -262,7 +268,9 @@ export class Health extends IonicNativePlugin {
* @return {Promise<boolean>} Returns a promise that resolves with a boolean that indicates the authorization status
*/
@Cordova()
isAuthorized(datatypes: Array<string | HealthDataType>): Promise<boolean> { return; }
isAuthorized(datatypes: Array<string | HealthDataType>): Promise<boolean> {
return;
}
/**
* Gets all the data points of a certain data type within a certain time window.
@@ -296,7 +304,9 @@ export class Health extends IonicNativePlugin {
* @return {Promise<HealthData>}
*/
@Cordova()
query(queryOptions: HealthQueryOptions): Promise<HealthData> { return; }
query(queryOptions: HealthQueryOptions): Promise<HealthData> {
return;
}
/**
* Gets aggregated data in a certain time window. Usually the sum is returned for the given quantity.
@@ -320,7 +330,9 @@ export class Health extends IonicNativePlugin {
* @return {Promise<HealthData[]>}
*/
@Cordova()
queryAggregated(queryOptionsAggregated: HealthQueryOptionsAggregated): Promise<HealthData[]> { return; }
queryAggregated(queryOptionsAggregated: HealthQueryOptionsAggregated): Promise<HealthData[]> {
return;
}
/**
* Stores a data point.
@@ -337,6 +349,8 @@ export class Health extends IonicNativePlugin {
* @return {Promise<any>}
*/
@Cordova()
store(storeOptions: HealthStoreOptions): Promise<any> { return; }
store(storeOptions: HealthStoreOptions): Promise<any> {
return;
}
}
+86 -29
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface HotspotConnectionInfo {
@@ -63,6 +63,7 @@ export interface HotspotNetwork {
capabilities: string;
}
export interface HotspotNetworkConfig {
/**
@@ -139,13 +140,17 @@ export class Hotspot extends IonicNativePlugin {
* @returns {Promise<boolean>}
*/
@Cordova()
isAvailable(): Promise<boolean> { return; }
isAvailable(): Promise<boolean> {
return;
}
/**
* @returns {Promise<boolean>}
*/
@Cordova()
toggleWifi(): Promise<boolean> { return; }
toggleWifi(): Promise<boolean> {
return;
}
/**
* Configures and starts hotspot with SSID and Password
@@ -157,7 +162,9 @@ export class Hotspot extends IonicNativePlugin {
* @returns {Promise<void>} - Promise to call once hotspot is started, or reject upon failure
*/
@Cordova()
createHotspot(ssid: string, mode: string, password: string): Promise<void> { return; }
createHotspot(ssid: string, mode: string, password: string): Promise<void> {
return;
}
/**
* Turns on Access Point
@@ -165,7 +172,9 @@ export class Hotspot extends IonicNativePlugin {
* @returns {Promise<boolean>} - true if AP is started
*/
@Cordova()
startHotspot(): Promise<boolean> { return; }
startHotspot(): Promise<boolean> {
return;
}
/**
* Configures hotspot with SSID and Password
@@ -177,7 +186,9 @@ export class Hotspot extends IonicNativePlugin {
* @returns {Promise<void>} - Promise to call when hotspot is configured, or reject upon failure
*/
@Cordova()
configureHotspot(ssid: string, mode: string, password: string): Promise<void> { return; }
configureHotspot(ssid: string, mode: string, password: string): Promise<void> {
return;
}
/**
* Turns off Access Point
@@ -185,7 +196,9 @@ export class Hotspot extends IonicNativePlugin {
* @returns {Promise<boolean>} - Promise to turn off the hotspot, true on success, false on failure
*/
@Cordova()
stopHotspot(): Promise<boolean> { return; }
stopHotspot(): Promise<boolean> {
return;
}
/**
* Checks if hotspot is enabled
@@ -193,13 +206,17 @@ export class Hotspot extends IonicNativePlugin {
* @returns {Promise<void>} - Promise that hotspot is enabled, rejected if it is not enabled
*/
@Cordova()
isHotspotEnabled(): Promise<void> { return; }
isHotspotEnabled(): Promise<void> {
return;
}
/**
* @returns {Promise<Array<HotspotDevice>>}
*/
@Cordova()
getAllHotspotDevices(): Promise<Array<HotspotDevice>> { return; }
getAllHotspotDevices(): Promise<Array<HotspotDevice>> {
return;
}
/**
* Connect to a WiFi network
@@ -213,7 +230,9 @@ export class Hotspot extends IonicNativePlugin {
* Promise that connection to the WiFi network was successfull, rejected if unsuccessful
*/
@Cordova()
connectToWifi(ssid: string, password: string): Promise<void> { return; }
connectToWifi(ssid: string, password: string): Promise<void> {
return;
}
/**
* Connect to a WiFi network
@@ -231,7 +250,9 @@ export class Hotspot extends IonicNativePlugin {
* Promise that connection to the WiFi network was successfull, rejected if unsuccessful
*/
@Cordova()
connectToWifiAuthEncrypt(ssid: string, password: string, authentication: string, encryption: Array<string>): Promise<void> { return; }
connectToWifiAuthEncrypt(ssid: string, password: string, authentication: string, encryption: Array<string>): Promise<void> {
return;
}
/**
* Add a WiFi network
@@ -247,7 +268,9 @@ export class Hotspot extends IonicNativePlugin {
* Promise that adding the WiFi network was successfull, rejected if unsuccessful
*/
@Cordova()
addWifiNetwork(ssid: string, mode: string, password: string): Promise<void> { return; }
addWifiNetwork(ssid: string, mode: string, password: string): Promise<void> {
return;
}
/**
* Remove a WiFi network
@@ -259,79 +282,105 @@ export class Hotspot extends IonicNativePlugin {
* Promise that removing the WiFi network was successfull, rejected if unsuccessful
*/
@Cordova()
removeWifiNetwork(ssid: string): Promise<void> { return; }
removeWifiNetwork(ssid: string): Promise<void> {
return;
}
/**
* @returns {Promise<boolean>}
*/
@Cordova()
isConnectedToInternet(): Promise<boolean> { return; }
isConnectedToInternet(): Promise<boolean> {
return;
}
/**
* @returns {Promise<boolean>}
*/
@Cordova()
isConnectedToInternetViaWifi(): Promise<boolean> { return; }
isConnectedToInternetViaWifi(): Promise<boolean> {
return;
}
/**
* @returns {Promise<boolean>}
*/
@Cordova()
isWifiOn(): Promise<boolean> { return; }
isWifiOn(): Promise<boolean> {
return;
}
/**
* @returns {Promise<boolean>}
*/
@Cordova()
isWifiSupported(): Promise<boolean> { return; }
isWifiSupported(): Promise<boolean> {
return;
}
/**
* @returns {Promise<boolean>}
*/
@Cordova()
isWifiDirectSupported(): Promise<boolean> { return; }
isWifiDirectSupported(): Promise<boolean> {
return;
}
/**
* @returns {Promise<Array<HotspotNetwork>>}
*/
@Cordova()
scanWifi(): Promise<Array<HotspotNetwork>> { return; }
scanWifi(): Promise<Array<HotspotNetwork>> {
return;
}
/**
* @returns {Promise<Array<HotspotNetwork>>}
*/
@Cordova()
scanWifiByLevel(): Promise<Array<HotspotNetwork>> { return; }
scanWifiByLevel(): Promise<Array<HotspotNetwork>> {
return;
}
/**
* @returns {Promise<any>}
*/
@Cordova()
startWifiPeriodicallyScan(interval: number, duration: number): Promise<any> { return; }
startWifiPeriodicallyScan(interval: number, duration: number): Promise<any> {
return;
}
/**
* @returns {Promise<any>}
*/
@Cordova()
stopWifiPeriodicallyScan(): Promise<any> { return; }
stopWifiPeriodicallyScan(): Promise<any> {
return;
}
/**
* @returns {Promise<HotspotNetworkConfig>}
*/
@Cordova()
getNetConfig(): Promise<HotspotNetworkConfig> { return; }
getNetConfig(): Promise<HotspotNetworkConfig> {
return;
}
/**
* @returns {Promise<HotspotConnectionInfo>}
*/
@Cordova()
getConnectionInfo(): Promise<HotspotConnectionInfo> { return; }
getConnectionInfo(): Promise<HotspotConnectionInfo> {
return;
}
/**
* @returns {Promise<string>}
*/
@Cordova()
pingHost(ip: string): Promise<string> { return; }
pingHost(ip: string): Promise<string> {
return;
}
/**
* Gets MAC Address associated with IP Address from ARP File
@@ -341,7 +390,9 @@ export class Hotspot extends IonicNativePlugin {
* @returns {Promise<string>} - A Promise for the MAC Address
*/
@Cordova()
getMacAddressOfHost(ip: string): Promise<string> { return; }
getMacAddressOfHost(ip: string): Promise<string> {
return;
}
/**
* Checks if IP is live using DNS
@@ -351,7 +402,9 @@ export class Hotspot extends IonicNativePlugin {
* @returns {Promise<boolean>} - A Promise for whether the IP Address is reachable
*/
@Cordova()
isDnsLive(ip: string): Promise<boolean> { return; }
isDnsLive(ip: string): Promise<boolean> {
return;
}
/**
* Checks if IP is live using socket And PORT
@@ -361,7 +414,9 @@ export class Hotspot extends IonicNativePlugin {
* @returns {Promise<boolean>} - A Promise for whether the IP Address is reachable
*/
@Cordova()
isPortLive(ip: string): Promise<boolean> { return; }
isPortLive(ip: string): Promise<boolean> {
return;
}
/**
* Checks if device is rooted
@@ -369,6 +424,8 @@ export class Hotspot extends IonicNativePlugin {
* @returns {Promise<boolean>} - A Promise for whether the device is rooted
*/
@Cordova()
isRooted(): Promise<boolean> { return; }
isRooted(): Promise<boolean> {
return;
}
}
+48 -19
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface HTTPResponse {
/**
@@ -74,7 +74,9 @@ export class HTTP extends IonicNativePlugin {
* @returns {Object} an object representing a basic HTTP Authorization header of the form {'Authorization': 'Basic base64encodedusernameandpassword'}
*/
@Cordova({ sync: true })
getBasicAuthHeader(username: string, password: string): { Authorization: string; } { return; }
getBasicAuthHeader(username: string, password: string): { Authorization: string; } {
return;
}
/**
* This sets up all future requests to use Basic HTTP authentication with the given username and password.
@@ -82,7 +84,8 @@ export class HTTP extends IonicNativePlugin {
* @param password {string} Password
*/
@Cordova({ sync: true })
useBasicAuth(username: string, password: string): void { }
useBasicAuth(username: string, password: string): void {
}
/**
* Set a header for all future requests. Takes a header and a value.
@@ -90,20 +93,23 @@ export class HTTP extends IonicNativePlugin {
* @param value {string} The value of the header
*/
@Cordova({ sync: true })
setHeader(header: string, value: string): void { }
setHeader(header: string, value: string): void {
}
/**
* Set the data serializer which will be used for all future POST and PUT requests. Takes a string representing the name of the serializer.
* @param serializer {string} The name of the serializer. Can be urlencoded or json
*/
@Cordova({ sync: true })
setDataSerializer(serializer: string): void { }
setDataSerializer(serializer: string): void {
}
/**
* Clear all cookies
*/
@Cordova({ sync: true })
clearCookies(): void { }
clearCookies(): void {
}
/**
* Remove cookies
@@ -111,21 +117,24 @@ export class HTTP extends IonicNativePlugin {
* @param cb
*/
@Cordova({ sync: true })
removeCookies(url: string, cb: () => void): void { }
removeCookies(url: string, cb: () => void): void {
}
/**
* Disable following redirects automatically
* @param disable {boolean} Set to true to disable following redirects automatically
*/
@Cordova({ sync: true })
disableRedirect(disable: boolean): void { }
disableRedirect(disable: boolean): void {
}
/**
* Set request timeout
* @param timeout {number} The timeout in seconds. Default 60
*/
@Cordova({ sync: true })
setRequestTimeout(timeout: number): void { }
setRequestTimeout(timeout: number): void {
}
/**
* Enable or disable SSL Pinning. This defaults to false.
@@ -137,7 +146,9 @@ export class HTTP extends IonicNativePlugin {
* @returns {Promise<void>} returns a promise that will resolve on success, and reject on failure
*/
@Cordova()
enableSSLPinning(enable: boolean): Promise<void> { return; }
enableSSLPinning(enable: boolean): Promise<void> {
return;
}
/**
* Accept all SSL certificates. Or disabled accepting all certificates. Defaults to false.
@@ -145,7 +156,9 @@ export class HTTP extends IonicNativePlugin {
* @returns {Promise<void>} returns a promise that will resolve on success, and reject on failure
*/
@Cordova()
acceptAllCerts(accept: boolean): Promise<void> { return; }
acceptAllCerts(accept: boolean): Promise<void> {
return;
}
/**
* Make a POST request
@@ -155,7 +168,9 @@ export class HTTP extends IonicNativePlugin {
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
*/
@Cordova()
post(url: string, body: any, headers: any): Promise<HTTPResponse> { return; }
post(url: string, body: any, headers: any): Promise<HTTPResponse> {
return;
}
/**
* Make a GET request
@@ -165,7 +180,9 @@ export class HTTP extends IonicNativePlugin {
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
*/
@Cordova()
get(url: string, parameters: any, headers: any): Promise<HTTPResponse> { return; }
get(url: string, parameters: any, headers: any): Promise<HTTPResponse> {
return;
}
/**
* Make a PUT request
@@ -175,7 +192,9 @@ export class HTTP extends IonicNativePlugin {
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
*/
@Cordova()
put(url: string, body: any, headers: any): Promise<HTTPResponse> { return; }
put(url: string, body: any, headers: any): Promise<HTTPResponse> {
return;
}
/**
* Make a PATCH request
@@ -185,7 +204,9 @@ export class HTTP extends IonicNativePlugin {
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
*/
@Cordova()
patch(url: string, body: any, headers: any): Promise<HTTPResponse> { return; }
patch(url: string, body: any, headers: any): Promise<HTTPResponse> {
return;
}
/**
* Make a DELETE request
@@ -195,7 +216,9 @@ export class HTTP extends IonicNativePlugin {
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
*/
@Cordova()
delete(url: string, parameters: any, headers: any): Promise<HTTPResponse> { return; }
delete(url: string, parameters: any, headers: any): Promise<HTTPResponse> {
return;
}
/**
* Make a HEAD request
@@ -205,7 +228,9 @@ export class HTTP extends IonicNativePlugin {
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
*/
@Cordova()
head(url: string, parameters: any, headers: any): Promise<HTTPResponse> { return; }
head(url: string, parameters: any, headers: any): Promise<HTTPResponse> {
return;
}
/**
*
@@ -217,7 +242,9 @@ export class HTTP extends IonicNativePlugin {
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
*/
@Cordova()
uploadFile(url: string, body: any, headers: any, filePath: string, name: string): Promise<HTTPResponse> { return; }
uploadFile(url: string, body: any, headers: any, filePath: string, name: string): Promise<HTTPResponse> {
return;
}
/**
*
@@ -228,5 +255,7 @@ export class HTTP extends IonicNativePlugin {
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
*/
@Cordova()
downloadFile(url: string, body: any, headers: any, filePath: string): Promise<HTTPResponse> { return; }
downloadFile(url: string, body: any, headers: any, filePath: string): Promise<HTTPResponse> {
return;
}
}
+12 -6
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
export interface HttpdOptions {
@@ -37,7 +37,7 @@ export interface HttpdOptions {
* www_root: 'httpd_root', // relative path to app's www directory
* port: 80,
* localhost_only: false
* };
* }
*
* this.httpd.startServer(options).subscribe((data) => {
* console.log('Server is live');
@@ -66,20 +66,26 @@ export class Httpd extends IonicNativePlugin {
observable: true,
clearFunction: 'stopServer'
})
startServer(options?: HttpdOptions): Observable<string> { return; }
startServer(options?: HttpdOptions): 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()
getUrl(): Promise<string> { return; }
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()
getLocalPath(): Promise<string> { return; }
getLocalPath(): Promise<string> {
return;
}
}
+42 -16
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @beta
@@ -56,8 +56,8 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
* this.hyperTrack.stopTracking().then(success => {
* // Handle success (String). Should be "OK".
* }, error => {});
*
* }, error => {});*
*
* }, error => {});*
* ```
*/
@Plugin({
@@ -75,7 +75,9 @@ export class HyperTrack extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise that resolves with the result text (which is the same as the given text) if successful, or it gets rejected if an error ocurred.
*/
@Cordova()
helloWorld(text: String): Promise<String> { return; }
helloWorld(text: String): Promise<String> {
return;
}
/**
* Create a new user to identify the current device or get a user from a lookup id.
@@ -86,7 +88,9 @@ export class HyperTrack extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise that resolves with a string representation of the User's JSON, or it gets rejected if an error ocurred.
*/
@Cordova()
getOrCreateUser(name: String, phone: String, photo: String, lookupId: String): Promise<any> { return; }
getOrCreateUser(name: String, phone: String, photo: String, lookupId: String): Promise<any> {
return;
}
/**
* Set UserId for the SDK created using HyperTrack APIs. This is useful if you already have a user previously created.
@@ -94,14 +98,18 @@ export class HyperTrack extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise that resolves with an "OK" string if successful, or it gets rejected if an error ocurred. An "OK" response doesn't necessarily mean that the userId was found. It just means that it was set correctly.
*/
@Cordova()
setUserId(userId: String): Promise<any> { return; }
setUserId(userId: String): Promise<any> {
return;
}
/**
* Enable the SDK and start tracking. This will fail if there is no user set.
* @returns {Promise<any>} Returns a Promise that resolves with the userId (String) of the User being tracked if successful, or it gets rejected if an error ocurred. One example of an error is not setting a User with getOrCreateUser() or setUserId() before calling this function.
*/
@Cordova()
startTracking(): Promise<any> { return; }
startTracking(): Promise<any> {
return;
}
/**
* Create and assign an action to the current user using specified parameters
@@ -113,7 +121,9 @@ export class HyperTrack extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise that resolves with a string representation of the Action's JSON, or it gets rejected if an error ocurred.
*/
@Cordova()
createAndAssignAction(type: String, lookupId: String, expectedPlaceAddress: String, expectedPlaceLatitude: Number, expectedPlaceLongitude: Number): Promise<any> { return; }
createAndAssignAction(type: String, lookupId: String, expectedPlaceAddress: String, expectedPlaceLatitude: Number, expectedPlaceLongitude: Number): Promise<any> {
return;
}
/**
* Complete an action from the SDK by its ID
@@ -121,7 +131,9 @@ export class HyperTrack extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise that resolves with an "OK" string if successful, or it gets rejected if an error ocurred.
*/
@Cordova()
completeAction(actionId: String): Promise<any> { return; }
completeAction(actionId: String): Promise<any> {
return;
}
/**
* Complete an action from the SDK using Action's lookupId as parameter
@@ -129,7 +141,9 @@ export class HyperTrack extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise that resolves with an "OK" string if successful, or it gets rejected if an error ocurred.
*/
@Cordova()
completeActionWithLookupId(lookupId: String): Promise<any> { return; }
completeActionWithLookupId(lookupId: String): Promise<any> {
return;
}
/**
* Disable the SDK and stop tracking.
@@ -137,14 +151,18 @@ export class HyperTrack extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise that resolves with the an "OK" string if successful, or it gets rejected if an error ocurred. One example of an error is not setting a User with getOrCreateUser() or setUserId() before calling this function.
*/
@Cordova()
stopTracking(): Promise<any> { return; }
stopTracking(): Promise<any> {
return;
}
/**
* Get user's current location from the SDK
* @returns {Promise<any>} Returns a Promise that resolves with a string representation of the Location's JSON, or it gets rejected if an error ocurred.
*/
@Cordova()
getCurrentLocation(): Promise<any> { return; }
getCurrentLocation(): Promise<any> {
return;
}
/**
* Check if Location permission has been granted to the app (for Android).
@@ -152,7 +170,9 @@ export class HyperTrack extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise that resolves with the a string that can be "true" or "false", depending if location permission was granted, or it gets rejected if an error ocurred.
*/
@Cordova()
checkLocationPermission(): Promise<any> { return; }
checkLocationPermission(): Promise<any> {
return;
}
/**
* Request user to grant Location access to the app (for Anrdoid).
@@ -160,7 +180,9 @@ export class HyperTrack extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise that resolves with the a string that can be "true" or "false", depending if Location access was given to the app, or it gets rejected if an error ocurred.
*/
@Cordova()
requestPermissions(): Promise<any> { return; }
requestPermissions(): Promise<any> {
return;
}
/**
* Check if Location services are enabled on the device (for Android).
@@ -168,7 +190,9 @@ export class HyperTrack extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise that resolves with the a string that can be "true" or "false", depending if location services are enabled, or it gets rejected if an error ocurred.
*/
@Cordova()
checkLocationServices(): Promise<any> { return; }
checkLocationServices(): Promise<any> {
return;
}
/**
* Request user to enable Location services on the device.
@@ -176,5 +200,7 @@ export class HyperTrack extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise that resolves with the a string that can be "true" or "false", depending if Location services were enabled, or it gets rejected if an error ocurred.
*/
@Cordova()
requestLocationServices(): Promise<any> { return; }
requestLocationServices(): Promise<any> {
return;
}
}
+82 -28
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, CordovaCheck, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, CordovaCheck, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
declare const cordova: any;
@@ -404,7 +404,9 @@ export class IBeacon extends IonicNativePlugin {
* @returns {IBeaconDelegate} Returns the IBeaconDelegate
*/
@Cordova()
getDelegate(): IBeaconDelegate { return; }
getDelegate(): IBeaconDelegate {
return;
}
/**
* @param {IBeaconDelegate} delegate An instance of a delegate to register with the native layer.
@@ -412,7 +414,9 @@ export class IBeacon extends IonicNativePlugin {
* @returns {IBeaconDelegate} Returns the IBeaconDelegate
*/
@Cordova()
setDelegate(delegate: IBeaconDelegate): IBeaconDelegate { return; }
setDelegate(delegate: IBeaconDelegate): IBeaconDelegate {
return;
}
/**
* Signals the native layer that the client side is ready to consume messages.
@@ -435,7 +439,9 @@ export class IBeacon extends IonicNativePlugin {
* native layer acknowledged the request and started to send events.
*/
@Cordova({ otherPromise: true })
onDomDelegateReady(): Promise<void> { return; }
onDomDelegateReady(): Promise<void> {
return;
}
/**
* Determines if bluetooth is switched on, according to the native layer.
@@ -443,7 +449,9 @@ export class IBeacon extends IonicNativePlugin {
* indicating whether bluetooth is active.
*/
@Cordova({ otherPromise: true })
isBluetoothEnabled(): Promise<boolean> { return; }
isBluetoothEnabled(): Promise<boolean> {
return;
}
/**
* Enables Bluetooth using the native Layer. (ANDROID ONLY)
@@ -452,7 +460,9 @@ export class IBeacon extends IonicNativePlugin {
* could be enabled. If not, the promise will be rejected with an error.
*/
@Cordova({ otherPromise: true })
enableBluetooth(): Promise<void> { return; }
enableBluetooth(): Promise<void> {
return;
}
/**
* Disables Bluetooth using the native Layer. (ANDROID ONLY)
@@ -461,7 +471,9 @@ export class IBeacon extends IonicNativePlugin {
* could be enabled. If not, the promise will be rejected with an error.
*/
@Cordova({ otherPromise: true })
disableBluetooth(): Promise<void> { return; }
disableBluetooth(): Promise<void> {
return;
}
/**
* Start monitoring the specified region.
@@ -481,7 +493,9 @@ export class IBeacon extends IonicNativePlugin {
* native layer acknowledged the dispatch of the monitoring request.
*/
@Cordova({ otherPromise: true })
startMonitoringForRegion(region: BeaconRegion): Promise<string> { return; }
startMonitoringForRegion(region: BeaconRegion): Promise<string> {
return;
}
/**
* Stop monitoring the specified region. It is valid to call
@@ -498,7 +512,9 @@ export class IBeacon extends IonicNativePlugin {
* native layer acknowledged the dispatch of the request to stop monitoring.
*/
@Cordova({ otherPromise: true })
stopMonitoringForRegion(region: BeaconRegion): Promise<void> { return; }
stopMonitoringForRegion(region: BeaconRegion): Promise<void> {
return;
}
/**
* Request state the for specified region. When result is ready
@@ -514,7 +530,9 @@ export class IBeacon extends IonicNativePlugin {
* native layer acknowledged the dispatch of the request to stop monitoring.
*/
@Cordova({ otherPromise: true })
requestStateForRegion(region: Region): Promise<void> { return; }
requestStateForRegion(region: Region): Promise<void> {
return;
}
/**
@@ -532,7 +550,9 @@ export class IBeacon extends IonicNativePlugin {
* native layer acknowledged the dispatch of the monitoring request.
*/
@Cordova({ otherPromise: true })
startRangingBeaconsInRegion(region: BeaconRegion): Promise<void> { return; }
startRangingBeaconsInRegion(region: BeaconRegion): Promise<void> {
return;
}
/**
* Stop ranging the specified region. It is valid to call
@@ -549,7 +569,9 @@ export class IBeacon extends IonicNativePlugin {
* native layer acknowledged the dispatch of the request to stop monitoring.
*/
@Cordova({ otherPromise: true })
stopRangingBeaconsInRegion(region: BeaconRegion): Promise<void> { return; }
stopRangingBeaconsInRegion(region: BeaconRegion): Promise<void> {
return;
}
/**
* Queries the native layer to determine the current authorization in effect.
@@ -558,7 +580,9 @@ export class IBeacon extends IonicNativePlugin {
* requested authorization status.
*/
@Cordova({ otherPromise: true })
getAuthorizationStatus(): Promise<IBeaconPluginResult> { return; }
getAuthorizationStatus(): Promise<IBeaconPluginResult> {
return;
}
/**
* For iOS 8 and above only. The permission model has changed by Apple in iOS 8, making it necessary for apps to
@@ -570,7 +594,9 @@ export class IBeacon extends IonicNativePlugin {
* @returns {Promise<void>} Returns a promise that is resolved when the request dialog is shown.
*/
@Cordova({ otherPromise: true })
requestWhenInUseAuthorization(): Promise<void> { return; }
requestWhenInUseAuthorization(): Promise<void> {
return;
}
/**
@@ -580,7 +606,9 @@ export class IBeacon extends IonicNativePlugin {
* shows the request dialog.
*/
@Cordova({ otherPromise: true })
requestAlwaysAuthorization(): Promise<void> { return; }
requestAlwaysAuthorization(): Promise<void> {
return;
}
/**
*
@@ -588,7 +616,9 @@ export class IBeacon extends IonicNativePlugin {
* of {Region} instances that are being monitored by the native layer.
*/
@Cordova({ otherPromise: true })
getMonitoredRegions(): Promise<Region[]> { return; }
getMonitoredRegions(): Promise<Region[]> {
return;
}
/**
*
@@ -596,7 +626,9 @@ export class IBeacon extends IonicNativePlugin {
* of {Region} instances that are being ranged by the native layer.
*/
@Cordova({ otherPromise: true })
getRangedRegions(): Promise<Region[]> { return; }
getRangedRegions(): Promise<Region[]> {
return;
}
/**
* Determines if ranging is available or not, according to the native layer.
@@ -604,7 +636,9 @@ export class IBeacon extends IonicNativePlugin {
* indicating whether ranging is available or not.
*/
@Cordova({ otherPromise: true })
isRangingAvailable(): Promise<boolean> { return; }
isRangingAvailable(): Promise<boolean> {
return;
}
/**
* Determines if region type is supported or not, according to the native layer.
@@ -616,7 +650,9 @@ export class IBeacon extends IonicNativePlugin {
* indicating whether the region type is supported or not.
*/
@Cordova({ otherPromise: true })
isMonitoringAvailableForClass(region: Region): Promise<boolean> { return; }
isMonitoringAvailableForClass(region: Region): Promise<boolean> {
return;
}
/**
* Start advertising the specified region.
@@ -636,7 +672,9 @@ export class IBeacon extends IonicNativePlugin {
* native layer acknowledged the dispatch of the advertising request.
*/
@Cordova({ otherPromise: true })
startAdvertising(region: Region, measuredPower?: number): Promise<void> { return; }
startAdvertising(region: Region, measuredPower?: number): Promise<void> {
return;
}
/**
* Stop advertising as a beacon.
@@ -647,7 +685,9 @@ export class IBeacon extends IonicNativePlugin {
* native layer acknowledged the dispatch of the request to stop advertising.
*/
@Cordova({ otherPromise: true })
stopAdvertising(region: Region): Promise<void> { return; }
stopAdvertising(region: Region): Promise<void> {
return;
}
/**
* Determines if advertising is available or not, according to the native layer.
@@ -655,7 +695,9 @@ export class IBeacon extends IonicNativePlugin {
* indicating whether advertising is available or not.
*/
@Cordova({ otherPromise: true })
isAdvertisingAvailable(): Promise<boolean> { return; }
isAdvertisingAvailable(): Promise<boolean> {
return;
}
/**
* Determines if advertising is currently active, according to the native layer.
@@ -663,7 +705,9 @@ export class IBeacon extends IonicNativePlugin {
* indicating whether advertising is active.
*/
@Cordova({ otherPromise: true })
isAdvertising(): Promise<boolean> { return; }
isAdvertising(): Promise<boolean> {
return;
}
/**
* Disables debug logging in the native layer. Use this method if you want
@@ -673,7 +717,9 @@ export class IBeacon extends IonicNativePlugin {
* native layer has set the logging level accordingly.
*/
@Cordova({ otherPromise: true })
disableDebugLogs(): Promise<void> { return; }
disableDebugLogs(): Promise<void> {
return;
}
/**
* Enables the posting of debug notifications in the native layer. Use this method if you want
@@ -684,7 +730,9 @@ export class IBeacon extends IonicNativePlugin {
* native layer has set the flag to enabled.
*/
@Cordova({ otherPromise: true })
enableDebugNotifications(): Promise<void> { return; }
enableDebugNotifications(): Promise<void> {
return;
}
/**
* Disables the posting of debug notifications in the native layer. Use this method if you want
@@ -694,7 +742,9 @@ export class IBeacon extends IonicNativePlugin {
* native layer has set the flag to disabled.
*/
@Cordova({ otherPromise: true })
disableDebugNotifications(): Promise<void> { return; }
disableDebugNotifications(): Promise<void> {
return;
}
/**
* Enables debug logging in the native layer. Use this method if you want
@@ -704,7 +754,9 @@ export class IBeacon extends IonicNativePlugin {
* native layer has set the logging level accordingly.
*/
@Cordova({ otherPromise: true })
enableDebugLogs(): Promise<void> { return; }
enableDebugLogs(): Promise<void> {
return;
}
/**
* Appends the provided [message] to the device logs.
@@ -717,6 +769,8 @@ export class IBeacon extends IonicNativePlugin {
* is expected to be equivalent to the one provided in the original call.
*/
@Cordova({ otherPromise: true })
appendToDeviceLog(message: string): Promise<void> { return; }
appendToDeviceLog(message: string): Promise<void> {
return;
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface ImagePickerOptions {
@@ -75,7 +75,9 @@ export class ImagePicker extends IonicNativePlugin {
@Cordova({
callbackOrder: 'reverse'
})
getPictures(options: ImagePickerOptions): Promise<any> { return; }
getPictures(options: ImagePickerOptions): Promise<any> {
return;
}
/**
* Check if we have permission to read images
@@ -84,7 +86,9 @@ export class ImagePicker extends IonicNativePlugin {
@Cordova({
platforms: ['Android']
})
hasReadPermission(): Promise<boolean> { return; }
hasReadPermission(): Promise<boolean> {
return;
}
/**
* Request permission to read images
@@ -93,6 +97,8 @@ export class ImagePicker extends IonicNativePlugin {
@Cordova({
platforms: ['Android']
})
requestReadPermission(): Promise<any> { return; }
requestReadPermission(): Promise<any> {
return;
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface ImageResizerOptions {
/**
@@ -80,5 +80,7 @@ export class ImageResizer extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
resize(options: ImageResizerOptions): Promise<any> { return; }
resize(options: ImageResizerOptions): Promise<any> {
return;
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Plugin, CordovaInstance, InstanceCheck, IonicNativePlugin } from '@ionic-native/core';
import { CordovaInstance, InstanceCheck, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observer } from 'rxjs/Observer';
@@ -54,6 +54,7 @@ export interface InAppBrowserOptions {
*/
[key: string]: any;
}
export interface InAppBrowserEvent extends Event {
/** the eventname, either loadstart, loadstop, loaderror, or exit. */
type: string;
@@ -105,20 +106,23 @@ export class InAppBrowserObject {
* if the InAppBrowser was already visible.
*/
@CordovaInstance({ sync: true })
show(): void { }
show(): void {
}
/**
* Closes the InAppBrowser window.
*/
@CordovaInstance({ sync: true })
close(): void { }
close(): void {
}
/**
* Hides an InAppBrowser window that is currently shown. Calling this has no effect
* if the InAppBrowser was already hidden.
*/
@CordovaInstance({ sync: true })
hide(): void { }
hide(): void {
}
/**
* Injects JavaScript code into the InAppBrowser window.
@@ -126,7 +130,9 @@ export class InAppBrowserObject {
* @returns {Promise<any>}
*/
@CordovaInstance()
executeScript(script: { file?: string, code?: string }): Promise<any> { return; }
executeScript(script: { file?: string, code?: string }): Promise<any> {
return;
}
/**
* Injects CSS into the InAppBrowser window.
@@ -134,7 +140,9 @@ export class InAppBrowserObject {
* @returns {Promise<any>}
*/
@CordovaInstance()
insertCSS(css: { file?: string, code?: string }): Promise<any> { return; }
insertCSS(css: { file?: string, code?: string }): Promise<any> {
return;
}
/**
* A method that allows you to listen to events happening in the browser.
@@ -1,4 +1,4 @@
import { Plugin, IonicNativePlugin, Cordova, CordovaProperty } from '@ionic-native/core';
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
/**
@@ -81,15 +81,15 @@ export type IAPProducts = Array<IAPProduct> & {
/**
* Get product by ID
*/
byId: { [id: string]: IAPProduct; };
byId: { [id: string]: IAPProduct; }
/**
* Get product by alias
*/
byAlias: { [alias: string]: IAPProduct; };
byAlias: { [alias: string]: IAPProduct; }
/**
* Remove all products (for testing only).
*/
reset: () => {};
reset: () => {}
};
export type IAPQueryCallback = ((product: IAPProduct) => void) | ((error: IAPError) => void);
@@ -204,160 +204,160 @@ export class IAPError {
@Injectable()
export class InAppPurchase2 extends IonicNativePlugin {
@CordovaProperty
@CordovaProperty()
QUIET: number;
@CordovaProperty
@CordovaProperty()
ERROR: number;
@CordovaProperty
@CordovaProperty()
WARNING: number;
@CordovaProperty
@CordovaProperty()
INFO: number;
@CordovaProperty
@CordovaProperty()
DEBUG: number;
/**
* Debug level. Use QUIET, ERROR, WARNING, INFO or DEBUG constants
*/
@CordovaProperty
@CordovaProperty()
verbosity: number;
/**
* Set to true to invoke the platform purchase sandbox. (Windows only)
*/
@CordovaProperty
@CordovaProperty()
sandbox: boolean;
@CordovaProperty
@CordovaProperty()
FREE_SUBSCRIPTION: string;
@CordovaProperty
@CordovaProperty()
PAID_SUBSCRIPTION: string;
@CordovaProperty
@CordovaProperty()
NON_RENEWING_SUBSCRIPTION: string;
@CordovaProperty
@CordovaProperty()
CONSUMABLE: string;
@CordovaProperty
@CordovaProperty()
NON_CONSUMABLE: string;
@CordovaProperty
@CordovaProperty()
ERR_SETUP: number;
@CordovaProperty
@CordovaProperty()
ERR_LOAD: number;
@CordovaProperty
@CordovaProperty()
ERR_PURCHASE: number;
@CordovaProperty
@CordovaProperty()
ERR_LOAD_RECEIPTS: number;
@CordovaProperty
@CordovaProperty()
ERR_CLIENT_INVALID: number;
@CordovaProperty
@CordovaProperty()
ERR_PAYMENT_CANCELLED: number;
@CordovaProperty
@CordovaProperty()
ERR_PAYMENT_INVALID: number;
@CordovaProperty
@CordovaProperty()
ERR_PAYMENT_NOT_ALLOWED: number;
@CordovaProperty
@CordovaProperty()
ERR_UNKNOWN: number;
@CordovaProperty
@CordovaProperty()
ERR_REFRESH_RECEIPTS: number;
@CordovaProperty
@CordovaProperty()
ERR_INVALID_PRODUCT_ID: number;
@CordovaProperty
@CordovaProperty()
ERR_FINISH: number;
@CordovaProperty
@CordovaProperty()
ERR_COMMUNICATION: number;
@CordovaProperty
@CordovaProperty()
ERR_SUBSCRIPTIONS_NOT_AVAILABLE: number;
@CordovaProperty
@CordovaProperty()
ERR_MISSING_TOKEN: number;
@CordovaProperty
@CordovaProperty()
ERR_VERIFICATION_FAILED: number;
@CordovaProperty
@CordovaProperty()
ERR_BAD_RESPONSE: number;
@CordovaProperty
@CordovaProperty()
ERR_REFRESH: number;
@CordovaProperty
@CordovaProperty()
ERR_PAYMENT_EXPIRED: number;
@CordovaProperty
@CordovaProperty()
ERR_DOWNLOAD: number;
@CordovaProperty
@CordovaProperty()
ERR_SUBSCRIPTION_UPDATE_NOT_AVAILABLE: number;
@CordovaProperty
@CordovaProperty()
REGISTERED: string;
@CordovaProperty
@CordovaProperty()
INVALID: string;
@CordovaProperty
@CordovaProperty()
VALID: string;
@CordovaProperty
@CordovaProperty()
REQUESTED: string;
@CordovaProperty
@CordovaProperty()
INITIATED: string;
@CordovaProperty
@CordovaProperty()
APPROVED: string;
@CordovaProperty
@CordovaProperty()
FINISHED: string;
@CordovaProperty
@CordovaProperty()
OWNED: string;
@CordovaProperty
@CordovaProperty()
DOWNLOADING: string;
@CordovaProperty
@CordovaProperty()
DOWNLOADED: string;
@CordovaProperty
@CordovaProperty()
INVALID_PAYLOAD: number;
@CordovaProperty
@CordovaProperty()
CONNECTION_FAILED: number;
@CordovaProperty
@CordovaProperty()
PURCHASE_EXPIRED: number;
@CordovaProperty
@CordovaProperty()
products: IAPProducts;
@CordovaProperty
@CordovaProperty()
validator: string | ((product: string | IAPProduct, callback: Function) => void);
@CordovaProperty
@CordovaProperty()
log: {
error: (message: string) => void;
warn: (message: string) => void;
@@ -370,21 +370,25 @@ export class InAppPurchase2 extends IonicNativePlugin {
* @param idOrAlias
*/
@Cordova({ sync: true })
get(idOrAlias: string): IAPProduct { return; }
get(idOrAlias: string): IAPProduct {
return;
}
/**
* Register error handler
* @param onError {Function} function to call on error
*/
@Cordova({ sync: true })
error(onError: Function): void {}
error(onError: Function): void {
}
/**
* Add or register a product
* @param product {IAPProductOptions}
*/
@Cordova({ sync: true})
register(product: IAPProductOptions): void {}
@Cordova({ sync: true })
register(product: IAPProductOptions): void {
}
/**
*
@@ -394,7 +398,9 @@ export class InAppPurchase2 extends IonicNativePlugin {
* @return {IAPProductEvents}
*/
@Cordova({ sync: true })
when(query: string | IAPProduct, event?: string, callback?: IAPQueryCallback): IAPProductEvents { return; }
when(query: string | IAPProduct, event?: string, callback?: IAPQueryCallback): IAPProductEvents {
return;
}
/**
* Identical to `when`, but the callback will be called only once. After being called, the callback will be unregistered.
@@ -404,26 +410,34 @@ export class InAppPurchase2 extends IonicNativePlugin {
* @return {IAPProductEvents}
*/
@Cordova({ sync: true })
once(query: string | IAPProduct, event?: string, callback?: IAPQueryCallback): IAPProductEvents { return; }
once(query: string | IAPProduct, event?: string, callback?: IAPQueryCallback): IAPProductEvents {
return;
}
/**
* Unregister a callback. Works for callbacks registered with ready, when, once and error.
* @param callback {Function}
*/
@Cordova({ sync: true })
off(callback: Function): void {}
off(callback: Function): void {
}
@Cordova({ sync: true })
order(product: string | IAPProduct, additionalData?: any): { then: Function; error: Function; } { return; }
order(product: string | IAPProduct, additionalData?: any): { then: Function; error: Function; } {
return;
}
/**
*
* @return {Promise<any>} returns a promise that resolves when the store is ready
*/
@Cordova()
ready(): Promise<void> { return; }
ready(): Promise<void> {
return;
}
@Cordova({ sync: true })
refresh(): void {}
refresh(): void {
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
@@ -71,7 +71,9 @@ export class InAppPurchase extends IonicNativePlugin {
@Cordova({
otherPromise: true
})
getProducts(productId: string[]): Promise<any> { return; }
getProducts(productId: string[]): Promise<any> {
return;
}
/**
* Buy a product that matches the productId.
@@ -81,7 +83,9 @@ export class InAppPurchase extends IonicNativePlugin {
@Cordova({
otherPromise: true
})
buy(productId: string): Promise<{ transactionId: string, receipt: string, signature: string, productType: string }> { return; }
buy(productId: string): Promise<{ transactionId: string, receipt: string, signature: string, productType: string }> {
return;
}
/**
* Same as buy, but for subscription based products.
@@ -91,7 +95,9 @@ export class InAppPurchase extends IonicNativePlugin {
@Cordova({
otherPromise: true
})
subscribe(productId: string): Promise<{ transactionId: string, receipt: string, signature: string, productType: string }> { return; }
subscribe(productId: string): Promise<{ transactionId: string, receipt: string, signature: string, productType: string }> {
return;
}
/**
* Call this function after purchasing a "consumable" product to mark it as consumed. On Android, you must consume products that you want to let the user purchase multiple times. If you will not consume the product after a purchase, the next time you will attempt to purchase it you will get the error message:
@@ -103,7 +109,9 @@ export class InAppPurchase extends IonicNativePlugin {
@Cordova({
otherPromise: true
})
consume(productType: string, receipt: string, signature: string): Promise<any> { return; }
consume(productType: string, receipt: string, signature: string): Promise<any> {
return;
}
/**
* Restore all purchases from the store
@@ -112,7 +120,9 @@ export class InAppPurchase extends IonicNativePlugin {
@Cordova({
otherPromise: true
})
restorePurchases(): Promise<any> { return; }
restorePurchases(): Promise<any> {
return;
}
/**
* Get the receipt.
@@ -122,6 +132,8 @@ export class InAppPurchase extends IonicNativePlugin {
otherPromise: true,
platforms: ['iOS']
})
getReceipt(): Promise<string> { return; }
getReceipt(): Promise<string> {
return;
}
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, CordovaFunctionOverride, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, CordovaFunctionOverride, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
export interface IndexItem {
+7 -3
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
@@ -44,13 +44,17 @@ export class Insomnia extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
keepAwake(): Promise<any> { return; }
keepAwake(): Promise<any> {
return;
}
/**
* Allows the application to sleep again
* @returns {Promise<any>}
*/
@Cordova()
allowSleepAgain(): Promise<any> { return; }
allowSleepAgain(): Promise<any> {
return;
}
}
+10 -4
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Instagram
@@ -37,7 +37,9 @@ export class Instagram extends IonicNativePlugin {
@Cordova({
callbackStyle: 'node'
})
isInstalled(): Promise<boolean | string> { return; }
isInstalled(): Promise<boolean | string> {
return;
}
/**
* Share an image on Instagram
@@ -50,7 +52,9 @@ export class Instagram extends IonicNativePlugin {
@Cordova({
callbackStyle: 'node'
})
share(canvasIdOrDataUrl: string, caption?: string): Promise<any> { return; }
share(canvasIdOrDataUrl: string, caption?: string): Promise<any> {
return;
}
/**
* Share a library asset or video
@@ -60,6 +64,8 @@ export class Instagram extends IonicNativePlugin {
@Cordova({
callbackOrder: 'reverse'
})
shareAsset(assetLocalIdentifier: string): Promise<any> { return; }
shareAsset(assetLocalIdentifier: string): Promise<any> {
return;
}
}
+187 -159
View File
@@ -1,4 +1,4 @@
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
declare const window: any;
@@ -28,6 +28,192 @@ export interface IntelSecurityDataOptions {
webOwners?: String[];
}
/**
* @hidden
*/
@Plugin({
pluginName: 'IntelSecurity',
plugin: 'com-intel-security-cordova-plugin',
pluginRef: 'intel.security.secureData'
})
export class IntelSecurityData {
/**
* This creates a new instance of secure data using plain-text data.
* @param options {IntelSecurityDataOptions}
* @returns {Promise<any>} Returns a Promise that resolves with the instanceID of the created data instance, or rejects with an error.
*/
@Cordova({ otherPromise: true })
createFromData(options: IntelSecurityDataOptions): Promise<Number> {
return;
}
/**
* This creates a new instance of secure data (using sealed data)
* @param options {Object}
* @param options.sealedData {string} Sealed data in string format.
* @returns {Promise<any>} Returns a Promise that resolves with the instanceID of the created data instance, or rejects with an error.
*/
@Cordova({ otherPromise: true })
createFromSealedData(options: { sealedData: string }): Promise<Number> {
return;
}
/**
* This returns the plain-text data of the secure data instance.
* @param instanceID {Number} Secure data instance ID.
* @returns {Promise<string>} Returns a Promise that resolves to the data as plain-text, or rejects with an error.
*/
@Cordova({ otherPromise: true })
getData(instanceID: Number): Promise<string> {
return;
}
/**
* This returns the sealed chunk of a secure data instance.
* @param instanceID {any} Secure data instance ID.
* @returns {Promise<any>} Returns a Promise that resolves to the sealed data, or rejects with an error.
*/
@Cordova({ otherPromise: true })
getSealedData(instanceID: any): Promise<any> {
return;
}
/**
* This returns the tag of the secure data instance.
* @param instanceID {any} Secure data instance ID.
* @returns {Promise<string>} Returns a Promise that resolves to the tag, or rejects with an error.
*/
@Cordova({ otherPromise: true })
getTag(instanceID: any): Promise<string> {
return;
}
/**
* This returns the data policy of the secure data instance.
* @param instanceID {any} Secure data instance ID.
* @returns {Promise<any>} Returns a promise that resolves to the policy object, or rejects with an error.
*/
@Cordova({ otherPromise: true })
getPolicy(instanceID: any): Promise<any> {
return;
}
/**
* This returns an array of the data owners unique IDs.
* @param instanceID {any} Secure data instance ID.
* @returns {Promise<Array>} Returns a promise that resolves to an array of owners' unique IDs, or rejects with an error.
*/
@Cordova({ otherPromise: true })
getOwners(instanceID: any): Promise<Array<any>> {
return;
}
/**
* This returns the data creator unique ID.
* @param instanceID {any} Secure data instance ID.
* @returns {Promise<Number>} Returns a promsie that resolves to the creator's unique ID, or rejects with an error.
*/
@Cordova({ otherPromise: true })
getCreator(instanceID: any): Promise<Number> {
return;
}
/**
* This returns an array of the trusted web domains of the secure data instance.
* @param instanceID {any} Secure data instance ID.
* @returns {Promise<Array>} Returns a promise that resolves to a list of web owners, or rejects with an error.
*/
@Cordova({ otherPromise: true })
getWebOwners(instanceID: any): Promise<Array<any>> {
return;
}
/**
* This changes the extra key of a secure data instance. To successfully replace the extra key, the calling application must have sufficient access to the plain-text data.
* @param options {Object}
* @param options.instanceID {any} Secure data instance ID.
* @param options.extraKey {Number} Extra sealing secret for secure data instance.
* @returns {Promise<any>} Returns a promise that resolves with no parameters, or rejects with an error.
*/
@Cordova({ otherPromise: true })
changeExtraKey(options: any): Promise<any> {
return;
}
/**
* This releases a secure data instance.
* @param instanceID {any} Secure data instance ID.
* @returns {Promise<any>} Returns a promise that resovles with no parameters, or rejects with an error.
*/
@Cordova({ otherPromise: true })
destroy(instanceID: any): Promise<any> {
return;
}
}
/**
* @hidden
*/
@Plugin({
pluginName: 'IntelSecurity',
plugin: 'com-intel-security-cordova-plugin',
pluginRef: 'intel.security.secureStorage'
})
export class IntelSecurityStorage {
/**
* This deletes a secure storage resource (indicated by id).
* @param options {Object}
* @param options.id {String} Storage resource identifier.
* @param [options.storageType] {Number} Storage type.
* @returns {Promise<any>} Returns a Promise that resolves with no parameters, or rejects with an error.
*/
@Cordova({ otherPromise: true })
delete(options: {
id: string,
storageType?: Number
}): Promise<any> {
return;
}
/**
* This reads the data from secure storage (indicated by id) and creates a new secure data instance.
* @param options {Object}
* @param options.id {String} Storage resource identifier.
* @param [options.storageType] {Number} Storage type.
* @param [options.extraKey] {Number} Valid secure data instance ID.
* @returns {Promise<Number>} Returns a Promise that resolves with the instance ID of the created secure data instance, or rejects with an error.
*/
@Cordova({ otherPromise: true })
read(options: {
id: string,
storageType?: Number,
extraKey?: Number
}): Promise<Number> {
return;
}
/**
* This writes the data contained in a secure data instance into secure storage.
* @param options {Object}
* @param options.id {String} Storage resource identifier.
* @param options.instanceID {Number} Valid secure data instance ID
* @param [options.storageType] {Number} Storage type.
* @returns {Promise<any>} Returns a Promise that resolves with no parameters, or rejects with an error.
*/
@Cordova({ otherPromise: true })
write(options: {
id: String,
instanceID: Number,
storageType?: Number
}): Promise<any> {
return;
}
}
/**
* @name Intel Security
* @description
@@ -90,161 +276,3 @@ export class IntelSecurity extends IonicNativePlugin {
data: IntelSecurityData = new IntelSecurityData();
}
/**
* @hidden
*/
@Plugin({
pluginName: 'IntelSecurity',
plugin: 'com-intel-security-cordova-plugin',
pluginRef: 'intel.security.secureData'
})
export class IntelSecurityData {
/**
* This creates a new instance of secure data using plain-text data.
* @param options {IntelSecurityDataOptions}
* @returns {Promise<any>} Returns a Promise that resolves with the instanceID of the created data instance, or rejects with an error.
*/
@Cordova({ otherPromise: true })
createFromData(options: IntelSecurityDataOptions): Promise<Number> { return; }
/**
* This creates a new instance of secure data (using sealed data)
* @param options {Object}
* @param options.sealedData {string} Sealed data in string format.
* @returns {Promise<any>} Returns a Promise that resolves with the instanceID of the created data instance, or rejects with an error.
*/
@Cordova({ otherPromise: true })
createFromSealedData(options: { sealedData: string }): Promise<Number> { return; }
/**
* This returns the plain-text data of the secure data instance.
* @param instanceID {Number} Secure data instance ID.
* @returns {Promise<string>} Returns a Promise that resolves to the data as plain-text, or rejects with an error.
*/
@Cordova({ otherPromise: true })
getData(instanceID: Number): Promise<string> { return; }
/**
* This returns the sealed chunk of a secure data instance.
* @param instanceID {any} Secure data instance ID.
* @returns {Promise<any>} Returns a Promise that resolves to the sealed data, or rejects with an error.
*/
@Cordova({ otherPromise: true })
getSealedData(instanceID: any): Promise<any> { return; }
/**
* This returns the tag of the secure data instance.
* @param instanceID {any} Secure data instance ID.
* @returns {Promise<string>} Returns a Promise that resolves to the tag, or rejects with an error.
*/
@Cordova({ otherPromise: true })
getTag(instanceID: any): Promise<string> { return; }
/**
* This returns the data policy of the secure data instance.
* @param instanceID {any} Secure data instance ID.
* @returns {Promise<any>} Returns a promise that resolves to the policy object, or rejects with an error.
*/
@Cordova({ otherPromise: true })
getPolicy(instanceID: any): Promise<any> { return; }
/**
* This returns an array of the data owners unique IDs.
* @param instanceID {any} Secure data instance ID.
* @returns {Promise<Array>} Returns a promise that resolves to an array of owners' unique IDs, or rejects with an error.
*/
@Cordova({ otherPromise: true })
getOwners(instanceID: any): Promise<Array<any>> { return; }
/**
* This returns the data creator unique ID.
* @param instanceID {any} Secure data instance ID.
* @returns {Promise<Number>} Returns a promsie that resolves to the creator's unique ID, or rejects with an error.
*/
@Cordova({ otherPromise: true })
getCreator(instanceID: any): Promise<Number> { return; }
/**
* This returns an array of the trusted web domains of the secure data instance.
* @param instanceID {any} Secure data instance ID.
* @returns {Promise<Array>} Returns a promise that resolves to a list of web owners, or rejects with an error.
*/
@Cordova({ otherPromise: true })
getWebOwners(instanceID: any): Promise<Array<any>> { return; }
/**
* This changes the extra key of a secure data instance. To successfully replace the extra key, the calling application must have sufficient access to the plain-text data.
* @param options {Object}
* @param options.instanceID {any} Secure data instance ID.
* @param options.extraKey {Number} Extra sealing secret for secure data instance.
* @returns {Promise<any>} Returns a promise that resolves with no parameters, or rejects with an error.
*/
@Cordova({ otherPromise: true })
changeExtraKey(options: any): Promise<any> { return; }
/**
* This releases a secure data instance.
* @param instanceID {any} Secure data instance ID.
* @returns {Promise<any>} Returns a promise that resovles with no parameters, or rejects with an error.
*/
@Cordova({ otherPromise: true })
destroy(instanceID: any): Promise<any> { return; }
}
/**
* @hidden
*/
@Plugin({
pluginName: 'IntelSecurity',
plugin: 'com-intel-security-cordova-plugin',
pluginRef: 'intel.security.secureStorage'
})
export class IntelSecurityStorage {
/**
* This deletes a secure storage resource (indicated by id).
* @param options {Object}
* @param options.id {String} Storage resource identifier.
* @param [options.storageType] {Number} Storage type.
* @returns {Promise<any>} Returns a Promise that resolves with no parameters, or rejects with an error.
*/
@Cordova({ otherPromise: true })
delete(options: {
id: string,
storageType?: Number
}): Promise<any> { return; }
/**
* This reads the data from secure storage (indicated by id) and creates a new secure data instance.
* @param options {Object}
* @param options.id {String} Storage resource identifier.
* @param [options.storageType] {Number} Storage type.
* @param [options.extraKey] {Number} Valid secure data instance ID.
* @returns {Promise<Number>} Returns a Promise that resolves with the instance ID of the created secure data instance, or rejects with an error.
*/
@Cordova({ otherPromise: true })
read(options: {
id: string,
storageType?: Number,
extraKey?: Number
}): Promise<Number> { return; }
/**
* This writes the data contained in a secure data instance into secure storage.
* @param options {Object}
* @param options.id {String} Storage resource identifier.
* @param options.instanceID {Number} Valid secure data instance ID
* @param [options.storageType] {Number} Storage type.
* @returns {Promise<any>} Returns a Promise that resolves with no parameters, or rejects with an error.
*/
@Cordova({ otherPromise: true })
write(options: {
id: String,
instanceID: Number,
storageType?: Number
}): Promise<any> { return; }
}
+49 -17
View File
@@ -1,4 +1,4 @@
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
/**
@@ -38,7 +38,9 @@ export class Intercom extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise
*/
@Cordova()
registerIdentifiedUser(options: any): Promise<any> { return; }
registerIdentifiedUser(options: any): Promise<any> {
return;
}
/**
* Register a unidentified user
@@ -46,14 +48,18 @@ export class Intercom extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise
*/
@Cordova()
registerUnidentifiedUser(options: any): Promise<any> { return; }
registerUnidentifiedUser(options: any): Promise<any> {
return;
}
/**
* This resets the Intercom integration's cache of your user's identity and wipes the slate clean.
* @return {Promise<any>} Returns a promise
*/
@Cordova()
reset(): Promise<any> { return; }
reset(): Promise<any> {
return;
}
/**
*
@@ -62,7 +68,9 @@ export class Intercom extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise
*/
@Cordova()
setSecureMode(secureHash: string, secureData: any): Promise<any> { return; }
setSecureMode(secureHash: string, secureData: any): Promise<any> {
return;
}
/**
*
@@ -70,7 +78,9 @@ export class Intercom extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise
*/
@Cordova()
setUserHash(secureHash: string): Promise<any> { return; }
setUserHash(secureHash: string): Promise<any> {
return;
}
/**
*
@@ -78,7 +88,9 @@ export class Intercom extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise
*/
@Cordova()
updateUser(attributes: any): Promise<any> { return; }
updateUser(attributes: any): Promise<any> {
return;
}
/**
*
@@ -87,21 +99,27 @@ export class Intercom extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise
*/
@Cordova()
logEvent(eventName: string, metaData: any): Promise<any> { return; }
logEvent(eventName: string, metaData: any): Promise<any> {
return;
}
/**
*
* @return {Promise<any>} Returns a promise
*/
@Cordova()
displayMessenger(): Promise<any> { return; }
displayMessenger(): Promise<any> {
return;
}
/**
*
* @return {Promise<any>} Returns a promise
*/
@Cordova()
displayMessageComposer(): Promise<any> { return; }
displayMessageComposer(): Promise<any> {
return;
}
/**
*
@@ -109,21 +127,27 @@ export class Intercom extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise
*/
@Cordova()
displayMessageComposerWithInitialMessage(initialMessage: string): Promise<any> { return; }
displayMessageComposerWithInitialMessage(initialMessage: string): Promise<any> {
return;
}
/**
*
* @return {Promise<any>} Returns a promise
*/
@Cordova()
displayConversationsList(): Promise<any> { return; }
displayConversationsList(): Promise<any> {
return;
}
/**
*
* @return {Promise<any>} Returns a promise
*/
@Cordova()
unreadConversationCount(): Promise<any> { return; }
unreadConversationCount(): Promise<any> {
return;
}
/**
*
@@ -131,7 +155,9 @@ export class Intercom extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise
*/
@Cordova()
setLauncherVisibility(visibility: string): Promise<any> { return; }
setLauncherVisibility(visibility: string): Promise<any> {
return;
}
/**
*
@@ -139,20 +165,26 @@ export class Intercom extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise
*/
@Cordova()
setInAppMessageVisibility(visibility: string): Promise<any> { return; }
setInAppMessageVisibility(visibility: string): Promise<any> {
return;
}
/**
*
* @return {Promise<any>} Returns a promise
*/
@Cordova()
hideMessenger(): Promise<any> { return; }
hideMessenger(): Promise<any> {
return;
}
/**
*
* @return {Promise<any>} Returns a promise
*/
@Cordova()
registerForPush(): Promise<any> { return; }
registerForPush(): Promise<any> {
return;
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Is Debug
+68 -20
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, CordovaCheck, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, CordovaCheck, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
declare const cordova: any;
@@ -49,7 +49,10 @@ export class JinsMeme extends IonicNativePlugin {
*@returns {Promise<any>}
*/
@Cordova()
setAppClientID(appClientId: string, clientSecret: string): Promise<any> { return; }
setAppClientID(appClientId: string, clientSecret: string): Promise<any> {
return;
}
/**
* Starts scanning for JINS MEME.
* @returns {Observable<any>}
@@ -59,13 +62,19 @@ export class JinsMeme extends IonicNativePlugin {
clearFunction: 'stopScan',
clearWithArgs: true
})
startScan(): Observable<any> { return; }
startScan(): Observable<any> {
return;
}
/**
* Stops scanning JINS MEME.
* @returns {Promise<any>}
*/
@Cordova()
stopScan(): Promise<any> { return; }
stopScan(): Promise<any> {
return;
}
/**
* Establishes connection to JINS MEME.
* @param {string} target
@@ -80,25 +89,35 @@ export class JinsMeme extends IonicNativePlugin {
return () => console.log(data);
});
}
/**
* Set auto connection mode.
*@param {Boolean} flag
*@returns {Promise<any>}
*/
@Cordova()
setAutoConnect(flag: boolean): Promise<any> { return; }
setAutoConnect(flag: boolean): Promise<any> {
return;
}
/**
* Returns whether a connection to JINS MEME has been established.
*@returns {Promise<any>}
*/
@Cordova()
isConnected(): Promise<any> { return; }
isConnected(): Promise<any> {
return;
}
/**
* Disconnects from JINS MEME.
*@returns {Promise<any>}
*/
@Cordova()
disconnect(): Promise<any> { return; }
disconnect(): Promise<any> {
return;
}
/**
* Starts receiving realtime data.
* @returns {Observable<any>}
@@ -108,60 +127,89 @@ export class JinsMeme extends IonicNativePlugin {
clearFunction: 'stopDataReport',
clearWithArgs: true
})
startDataReport(): Observable<any> { return; }
startDataReport(): Observable<any> {
return;
}
/**
* Stops receiving data.
*@returns {Promise<any>}
*/
* Stops receiving data.
*@returns {Promise<any>}
*/
@Cordova()
stopDataReport(): Promise<any> { return; }
stopDataReport(): Promise<any> {
return;
}
/**
* Returns SDK version.
*
*@returns {Promise<any>}
*/
@Cordova()
getSDKVersion(): Promise<any> { return; }
getSDKVersion(): Promise<any> {
return;
}
/**
* Returns JINS MEME connected with other apps.
*@returns {Promise<any>}
*/
@Cordova()
getConnectedByOthers(): Promise<any> { return; }
getConnectedByOthers(): Promise<any> {
return;
}
/**
* Returns calibration status
*@returns {Promise<any>}
*/
@Cordova()
isCalibrated(): Promise<any> { return; }
isCalibrated(): Promise<any> {
return;
}
/**
* Returns device type.
*@returns {Promise<any>}
*/
@Cordova()
getConnectedDeviceType(): Promise<any> { return; }
getConnectedDeviceType(): Promise<any> {
return;
}
/**
* Returns hardware version.
*@returns {Promise<any>}
*/
@Cordova()
getConnectedDeviceSubType(): Promise<any> { return; }
getConnectedDeviceSubType(): Promise<any> {
return;
}
/**
* Returns FW Version.
*@returns {Promise<any>}
*/
@Cordova()
getFWVersion(): Promise<any> { return; }
getFWVersion(): Promise<any> {
return;
}
/**
* Returns HW Version.
*@returns {Promise<any>}
*/
@Cordova()
getHWVersion(): Promise<any> { return; }
getHWVersion(): Promise<any> {
return;
}
/**
* Returns response about whether data was received or not.
*@returns {Promise<any>}
*/
@Cordova()
isDataReceiving(): Promise<any> { return; }
isDataReceiving(): Promise<any> {
return;
}
}

Some files were not shown because too many files have changed in this diff Show More