Merge remote-tracking branch 'origin/v5'

This commit is contained in:
Daniel
2019-01-23 07:54:31 +01:00
313 changed files with 15065 additions and 8137 deletions
+1 -1
View File
@@ -268,7 +268,7 @@ export interface DataCaptureResult {
*
* @usage
* ```typescript
* import { AbbyyRTR } from '@ionic-native/abbyy-rtr';
* import { AbbyyRTR } from '@ionic-native/abbyy-rtr/ngx';
*
*
* constructor(private abbyyRTR: AbbyyRTR) { }
@@ -62,7 +62,7 @@ export interface ActionSheetOptions {
*
* @usage
* ```typescript
* import { ActionSheet, ActionSheetOptions } from '@ionic-native/action-sheet';
* import { ActionSheet, ActionSheetOptions } from '@ionic-native/action-sheet/ngx';
*
* constructor(private actionSheet: ActionSheet) { }
*
@@ -79,7 +79,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);
+1 -1
View File
@@ -263,7 +263,7 @@ export enum AdjustLogLevel {
*
* @usage
* ```typescript
* import { Adjust, AdjustConfig, AdjustEnvironment } from '@ionic-native/adjust';
* import { Adjust, AdjustConfig, AdjustEnvironment } from '@ionic-native/adjust/ngx';
*
* constructor(private adjust: Adjust) { }
*
@@ -1,7 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { fromEvent } from 'rxjs/observable/fromEvent';
import { Observable, fromEvent } from 'rxjs';
export interface AdMobFreeBannerConfig {
/**
@@ -73,7 +72,7 @@ export interface AdMobFreeRewardVideoConfig {
*
* @usage
* ```typescript
* import { AdMobFree, AdMobFreeBannerConfig } from '@ionic-native/admob-free';
* import { AdMobFree, AdMobFreeBannerConfig } from '@ionic-native/admob-free/ngx';
*
*
* constructor(private admobFree: AdMobFree) { }
@@ -179,7 +178,7 @@ export class AdMobFree extends IonicNativePlugin {
plugin: 'cordova-plugin-admob-free',
pluginRef: 'admob.banner'
})
export class AdMobFreeBanner {
export class AdMobFreeBanner extends IonicNativePlugin {
/**
* Update config
* @param options
@@ -235,7 +234,7 @@ export class AdMobFreeBanner {
plugin: 'cordova-plugin-admob-free',
pluginRef: 'admob.interstitial'
})
export class AdMobFreeInterstitial {
export class AdMobFreeInterstitial extends IonicNativePlugin {
/**
* Update config
* @param options
@@ -282,7 +281,7 @@ export class AdMobFreeInterstitial {
plugin: 'cordova-plugin-admob-free',
pluginRef: 'admob.rewardvideo'
})
export class AdMobFreeRewardVideo {
export class AdMobFreeRewardVideo extends IonicNativePlugin {
/**
* Update config
* @param {AdMobFreeRewardVideoConfig} options Admob reward config
@@ -1,7 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { fromEvent } from 'rxjs/observable/fromEvent';
import { Observable, fromEvent } from 'rxjs';
export type AdUnitIDOption = string | {
android: string;
+8 -8
View File
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
export type AdSize =
| 'SMART_BANNER'
@@ -106,8 +106,8 @@ export interface AdExtras {
* IMPORTANT NOTICE: this plugin takes a percentage out of your earnings if you profit more than $1,000. Read more about this on the plugin's repo. For a completely free alternative, see [AdMobPro Free](../admob-free).
* @usage
* ```typescript
* import { AdMobPro } from '@ionic-native/admob-pro';
* import { Platform } from 'ionic-angular';
* import { AdMobPro } from '@ionic-native/admob-pro/ngx';
* import { Platform } from '@ionic/angular';
*
* constructor(private admob: AdMobPro, private platform: Platform ) { }
*
@@ -275,7 +275,7 @@ export class AdMobPro extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onAdFailLoad',
element: document
element: 'document'
})
onAdFailLoad(): Observable<any> {
return;
@@ -288,7 +288,7 @@ export class AdMobPro extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onAdLoaded',
element: document
element: 'document'
})
onAdLoaded(): Observable<any> {
return;
@@ -301,7 +301,7 @@ export class AdMobPro extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onAdPresent',
element: document
element: 'document'
})
onAdPresent(): Observable<any> {
return;
@@ -314,7 +314,7 @@ export class AdMobPro extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onAdLeaveApp',
element: document
element: 'document'
})
onAdLeaveApp(): Observable<any> {
return;
@@ -327,7 +327,7 @@ export class AdMobPro extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onAdDismiss',
element: document
element: 'document'
})
onAdDismiss(): Observable<any> {
return;
+4 -4
View File
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
export interface AdmobOptions {
/**
@@ -93,7 +93,7 @@ export interface AdmobOptions {
*
* @usage
* ```typescript
* import { Admob, AdmobOptions } from '@ionic-native/admob';
* import { Admob, AdmobOptions } from '@ionic-native/admob/ngx';
*
*
* constructor(private admob: Admob) {
@@ -246,7 +246,7 @@ export class Admob extends IonicNativePlugin {
* Use one of these constants as adSize option when calling createBannerView
* @readonly
*/
@CordovaProperty
@CordovaProperty()
readonly AD_SIZE: {
BANNER: string;
IAB_MRECT: string;
@@ -259,7 +259,7 @@ export class Admob extends IonicNativePlugin {
* This enum represents AdMob's supported ad types
* @readonly
*/
@CordovaProperty
@CordovaProperty()
readonly AD_TYPE: {
BANNER: string;
INTERSTITIAL: string;
+1 -2
View File
@@ -10,7 +10,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { AES256 } from '@ionic-native/aes-256';
* import { AES256 } from '@ionic-native/aes-256/ngx';
*
* private secureKey: string;
* private secureIV: string;
@@ -56,7 +56,6 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
})
@Injectable()
export class AES256 extends IonicNativePlugin {
/**
* This function used to perform the aes256 encryption
* @param {string} secureKey A 32 bytes string, which will used as input key for AES256 encryption.
+1 -1
View File
@@ -10,7 +10,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { Alipay } from '@ionic-native/alipay';
* import { Alipay } from '@ionic-native/alipay/ngx';
*
* constructor(private alipay: Alipay) {
*
@@ -67,7 +67,7 @@ export class AnalyticsFirebase extends IonicNativePlugin {
* Use one of these default events or a custom event
* @readonly
*/
@CordovaProperty
@CordovaProperty()
readonly DEFAULT_EVENTS: {
ADD_PAYMENT_INFO: string;
ADD_TO_CART: string;
@@ -107,7 +107,7 @@ export class AnalyticsFirebase extends IonicNativePlugin {
* Use one of these default params or a custom param
* @readonly
*/
@CordovaProperty
@CordovaProperty()
readonly DEFAULT_PARAMS: {
ACHIEVEMENT_ID: string;
ACLID: string;
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
export type AndroidExoPlayerAspectRatio = 'FILL_SCREEN' | 'FIT_SCREEN';
@@ -158,7 +158,7 @@ export interface AndroidExoPlayerControllerConfig {
*
* @usage
* ```typescript
* import { AndroidExoPlayer } from '@ionic-native/android-exoplayer';
* import { AndroidExoPlayer } from '@ionic-native/android-exoplayer/ngx';
*
* constructor(private androidExoPlayer: AndroidExoPlayer) { }
*
@@ -110,7 +110,7 @@ export interface AFADeleteOptions {
* This plugin will open a native dialog fragment prompting the user to authenticate using their fingerprint. If the device has a secure lockscreen (pattern, PIN, or password), the user may opt to authenticate using that method as a backup.
* @usage
* ```typescript
* import { AndroidFingerprintAuth } from '@ionic-native/android-fingerprint-auth';
* import { AndroidFingerprintAuth } from '@ionic-native/android-fingerprint-auth/ngx';
*
* constructor(private androidFingerprintAuth: AndroidFingerprintAuth) { }
*
@@ -3,7 +3,7 @@ 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 */
@@ -36,7 +36,7 @@ export enum AndroidSystemUiFlags {
* In Android 4.4+, however, you can now enter true full screen, fully interactive immersive mode. In this mode, your app will remain in true full screen until you choose otherwise; users can swipe down from the top of the screen to temporarily display the system UI.
* @usage
* ```typescript
* import { AndroidFullScreen } from '@ionic-native/android-full-screen';
* import { AndroidFullScreen } from '@ionic-native/android-full-screen/ngx';
*
* constructor(private androidFullScreen: AndroidFullScreen) { }
*
@@ -62,63 +62,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).
@@ -127,5 +145,7 @@ export class AndroidFullScreen extends IonicNativePlugin {
* @return {Promise<void>}
*/
@Cordova()
setSystemUiVisibility(visibility: AndroidSystemUiFlags): Promise<void> { return; }
setSystemUiVisibility(visibility: AndroidSystemUiFlags): Promise<void> {
return;
}
}
@@ -10,7 +10,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```
* import { AndroidPermissions } from '@ionic-native/android-permissions';
* import { AndroidPermissions } from '@ionic-native/android-permissions/ngx';
*
*
* constructor(private androidPermissions: AndroidPermissions) { }
@@ -223,7 +223,7 @@ export class AndroidPermissions extends IonicNativePlugin {
/**
* Request permissions
* @param {Array<string>} permissions An array with permissions
* @param {string[]} permissions An array with permissions
* @return {Promise<any>} Returns a promise
*/
@Cordova()
@@ -10,7 +10,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { AppAvailability } from '@ionic-native/app-availability';
* import { AppAvailability } from '@ionic-native/app-availability/ngx';
* import { Platform } from 'ionic-angular';
*
* constructor(private appAvailability: AppAvailability, private platform: Platform) { }
@@ -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;
}
}
@@ -17,7 +17,7 @@ export interface StringMap {
*
* @usage
* ```typescript
* import { AppCenterAnalytics } from '@ionic-native/app-center-analytics';
* import { AppCenterAnalytics } from '@ionic-native/app-center-analytics/ngx';
*
*
* constructor(private appCenterAnalytics: AppCenterAnalytics) { }
@@ -40,7 +40,7 @@ export interface AppCenterCrashReportDevice {
*
* @usage
* ```typescript
* import { AppCenterCrashes } from '@ionic-native/app-center-crashes';
* import { AppCenterCrashes } from '@ionic-native/app-center-crashes/ngx';
*
*
* constructor(private AppCenterCrashes: AppCenterCrashes) { }
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
/**
* @name App Center Push
@@ -10,7 +10,7 @@ import { Observable } from 'rxjs/Observable';
*
* @usage
* ```typescript
* import { AppCenterPush } from '@ionic-native/app-center-push';
* import { AppCenterPush } from '@ionic-native/app-center-push/ngx';
*
*
* constructor(private appCenterPush: AppCenterPush) { }
@@ -8,8 +8,8 @@ import { Injectable } from '@angular/core';
*
* @usage
* ```typescript
* import { Platfrom } from 'ionic-angular';
* import { AppMinimize } from '@ionic-native/app-minimize';
* import { Platfrom } from '@ionic/angular';
* import { AppMinimize } from '@ionic-native/app-minimize/ngx';
*
*
* constructor(private platform: Platform, private appMinimize: AppMinimize) { }
@@ -37,6 +37,8 @@ export class AppMinimize extends IonicNativePlugin {
* @return {Promise<any>}
*/
@Cordova()
minimize(): Promise<any> { return; }
minimize(): Promise<any> {
return;
}
}
@@ -1,5 +1,5 @@
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
import { Injectable } from '@angular/core';
/**
@@ -9,7 +9,7 @@ import { Injectable } from '@angular/core';
*
* @usage
* ```typescript
* import { AppPreferences } from '@ionic-native/app-preferences';
* import { AppPreferences } from '@ionic-native/app-preferences/ngx';
*
* constructor(private appPreferences: AppPreferences) { }
*
@@ -25,11 +25,18 @@ import { Injectable } from '@angular/core';
plugin: 'cordova-plugin-app-preferences',
pluginRef: 'plugins.appPreferences',
repo: 'https://github.com/apla/me.apla.cordova.app-preferences',
platforms: ['Android', 'BlackBerry 10', 'Browser', 'iOS', 'macOS', 'Windows 8', 'Windows Phone']
platforms: [
'Android',
'BlackBerry 10',
'Browser',
'iOS',
'macOS',
'Windows 8',
'Windows Phone'
]
})
@Injectable()
export class AppPreferences extends IonicNativePlugin {
/**
* Get a preference value
*
@@ -40,7 +47,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 +76,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 +88,9 @@ export class AppPreferences extends IonicNativePlugin {
@Cordova({
callbackOrder: 'reverse'
})
clearAll(): Promise<any> { return; }
clearAll(): Promise<any> {
return;
}
/**
* Show native preferences interface
@@ -87,7 +100,9 @@ export class AppPreferences extends IonicNativePlugin {
@Cordova({
callbackOrder: 'reverse'
})
show(): Promise<any> { return; }
show(): Promise<any> {
return;
}
/**
* Show native preferences interface
@@ -98,7 +113,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 +128,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 +148,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 +160,7 @@ export class AppPreferences extends IonicNativePlugin {
@Cordova({
platforms: ['iOS', 'Windows', 'Windows Phone 8']
})
defaults(): Object { return; }
defaults(): Object {
return;
}
}
+5 -4
View File
@@ -134,7 +134,7 @@ export interface AppUrls {
*
* @usage
* ```typescript
* import { AppRate } from '@ionic-native/app-rate';
* import { AppRate } from '@ionic-native/app-rate/ngx';
*
* constructor(private appRate: AppRate) { }
*
@@ -144,7 +144,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);
*
@@ -156,7 +156,7 @@ export interface AppUrls {
* android: 'market://details?id=<package_name>',
* windows: 'ms-windows-store://review/?ProductId=<store_id>'
* }
* };
* }
*
* this.appRate.promptForRating(false);
* ```
@@ -181,7 +181,8 @@ export class AppRate extends IonicNativePlugin {
* Configure various settings for the Rating View.
* See table below for options
*/
@CordovaProperty preferences: AppRatePreferences;
@CordovaProperty()
preferences: AppRatePreferences;
/**
* Prompts the user for rating
@@ -26,7 +26,7 @@ export interface AppUpdateOptions {
* Then use the following code:
*
* ```typescript
* import { AppUpdate } from '@ionic-native/app-update';
* import { AppUpdate } from '@ionic-native/app-update/ngx';
*
* constructor(private appUpdate: AppUpdate) {
*
@@ -2,7 +2,6 @@ import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name App Version
* @description
@@ -12,7 +11,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { AppVersion } from '@ionic-native/app-version';
* import { AppVersion } from '@ionic-native/app-version/ngx';
*
* constructor(private appVersion: AppVersion) { }
*
+4 -3
View File
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
export type IMakePayments =
| 'This device can make payments and has a supported card'
@@ -71,6 +71,7 @@ export interface IShippingMethod {
detail: string;
amount: number;
}
export interface IOrderItemsAndShippingMethods {
items: IOrderItem[];
shippingMethods?: IShippingMethod[];
@@ -99,7 +100,7 @@ export interface ISelectedShippingContact {
*
* @usage
* ```typescript
* import { ApplePay } from '@ionic-native/apple-pay';
* import { ApplePay } from '@ionic-native/apple-pay/ngx';
*
*
* constructor(private applePay: ApplePay) { }
@@ -237,7 +238,7 @@ export class ApplePay extends IonicNativePlugin {
* this.paySheetItems.shippingCost = {
* label: 'Shipping Cost',
* amount: shippingMethod[0].amount
* };
* }
* this.applePay.updateItemsAndShippingMethods(this.paySheetItems, shippingMethods);
* });
*/
@@ -11,7 +11,7 @@ export interface CardData {
cardholderName: string;
primaryAccountNumberSuffix: string;
localizedDescription?: string;
paymentNetwork?: string;
paymentNetwork: string;
}
/**
@@ -21,33 +21,25 @@ export interface CardData {
*
* @usage
* ```typescript
* import { AppleWallet } from '@ionic-native/apple-wallet';
* import { AppleWallet } from '@ionic-native/apple-wallet/ngx';
*
*
* constructor(private appleWallet: AppleWallet) { }
*
*
* ...
*
*
* // Simple call to check whether the app can add cards to Apple Pay.
* this.appleWallet.available()
* .then((res) => {
* // Apple Wallet is enabled and a supported card is setup. Expect:
* // boolean value, true or false
* // res is a boolean value, either true or false
* console.log("Is Apple Wallet available? ", res);
* })
* .catch((message) => {
* // Error message while trying to know if device is able to add to wallet
* console.error("ERROR AVAILBLE>> ", message);
* });
*
*
* ...
*
*
* // Simple call with the configuration data needed to instantiate a new PKAddPaymentPassViewController object.
* // The encryption scheme, cardholder name, and primary account suffix are required for configuration.
* // The configuration information is used for setup and display only. It should not contain any sensitive information.
*
* let data: cardData = {
* cardholderName: 'Test User',
* primaryAccountNumberSuffix: '1234',
@@ -57,32 +49,14 @@ export interface CardData {
*
* this.appleWallet.startAddPaymentPass(data: cardData)
* .then((res) => {
* // User proceed and successfully asked to add card to his wallet
* // Use the callback response JSON payload to complete addition process
* console.log("startAddPaymentPass success response ", res);
* })
* .catch((err) => {
* // Error or user cancelled.
* console.error("startAddPaymentPass ERROR response", err);
* });
*
* // You should expect the callback success response to be as follow
*
* // {
* // data: {
* // "certificateSubCA": "Base64 string represents certificateSubCA",
* // "certificateLeaf":" Base64 string represents certificateLeaf"
* // "nonce": "Base64 string represents nonce",
* // "nonceSignature": "Base64 string represents nonceSignature",
* // }
* // }
*
* // This method provides the data needed to create an add payment request.
* // Pass the certificate chain to the issuer server. The server returns an encrypted JSON file containing the card data.
* // After you receive the encrypted data, pass it to completeAddPaymentPass method
*
*
* ...
*
*
* let data: encryptedCardData = {
* activationData: 'encoded Base64 activationData from your server',
* encryptedPassData: 'encoded Base64 encryptedPassData from your server',
@@ -91,12 +65,10 @@ export interface CardData {
*
* this.appleWallet.encryptedCardData(data: encryptedCardData)
* .then((res) => {
* // callback success response means card has been added successfully,
* // PKAddPaymentPassViewController will be dismissed
* console.log("completeAddCardToAppleWallet success response ", res);
* })
* .catch((err) => {
* // Error and can not add the card, or something wrong happend
* // PKAddPaymentPassViewController will be dismissed
* console.error("completeAddCardToAppleWallet ERROR response", err);
* });
*
* ```
+26 -26
View File
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
/**
* @name Appodeal
@@ -9,7 +9,7 @@ import { Observable } from 'rxjs/Observable';
*
* @usage
* ```typescript
* import { Appodeal } from '@ionic-native/appodeal';
* import { Appodeal } from '@ionic-native/appodeal/ngx';
*
* constructor(private appodeal: Appodeal) {
*
@@ -361,7 +361,7 @@ export class Appodeal extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onInterstitialLoaded',
element: document
element: 'document'
})
onInterstitialLoaded(): Observable<any> {
return;
@@ -370,7 +370,7 @@ export class Appodeal extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onInterstitialFailedToLoad',
element: document
element: 'document'
})
onInterstitialFailedToLoad(): Observable<any> {
return;
@@ -379,7 +379,7 @@ export class Appodeal extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onInterstitialShown',
element: document
element: 'document'
})
onInterstitialShown(): Observable<any> {
return;
@@ -388,7 +388,7 @@ export class Appodeal extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onInterstitialClicked',
element: document
element: 'document'
})
onInterstitialClicked(): Observable<any> {
return;
@@ -397,7 +397,7 @@ export class Appodeal extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onInterstitialClosed',
element: document
element: 'document'
})
onInterstitialClosed(): Observable<any> {
return;
@@ -406,7 +406,7 @@ export class Appodeal extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onSkippableVideoLoaded',
element: document
element: 'document'
})
onSkippableVideoLoaded(): Observable<any> {
return;
@@ -415,7 +415,7 @@ export class Appodeal extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onSkippableVideoFailedToLoad',
element: document
element: 'document'
})
onSkippableVideoFailedToLoad(): Observable<any> {
return;
@@ -424,7 +424,7 @@ export class Appodeal extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onSkippableVideoShown',
element: document
element: 'document'
})
onSkippableVideoShown(): Observable<any> {
return;
@@ -433,7 +433,7 @@ export class Appodeal extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onSkippableVideoFinished',
element: document
element: 'document'
})
onSkippableVideoFinished(): Observable<any> {
return;
@@ -442,7 +442,7 @@ export class Appodeal extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onSkippableVideoClosed',
element: document
element: 'document'
})
onSkippableVideoClosed(): Observable<any> {
return;
@@ -451,7 +451,7 @@ export class Appodeal extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onRewardedVideoLoaded',
element: document
element: 'document'
})
onRewardedVideoLoaded(): Observable<any> {
return;
@@ -460,7 +460,7 @@ export class Appodeal extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onRewardedVideoFailedToLoad',
element: document
element: 'document'
})
onRewardedVideoFailedToLoad(): Observable<any> {
return;
@@ -469,7 +469,7 @@ export class Appodeal extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onRewardedVideoShown',
element: document
element: 'document'
})
onRewardedVideoShown(): Observable<any> {
return;
@@ -478,7 +478,7 @@ export class Appodeal extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onRewardedVideoFinished',
element: document
element: 'document'
})
onRewardedVideoFinished(): Observable<any> {
return;
@@ -487,7 +487,7 @@ export class Appodeal extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onRewardedVideoClosed',
element: document
element: 'document'
})
onRewardedVideoClosed(): Observable<any> {
return;
@@ -496,7 +496,7 @@ export class Appodeal extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onNonSkippableVideoLoaded',
element: document
element: 'document'
})
onNonSkippableVideoLoaded(): Observable<any> {
return;
@@ -505,7 +505,7 @@ export class Appodeal extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onNonSkippableVideoFailedToLoad',
element: document
element: 'document'
})
onNonSkippableVideoFailedToLoad(): Observable<any> {
return;
@@ -514,7 +514,7 @@ export class Appodeal extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onNonSkippableVideoShown',
element: document
element: 'document'
})
onNonSkippableVideoShown(): Observable<any> {
return;
@@ -523,7 +523,7 @@ export class Appodeal extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onNonSkippableVideoFinished',
element: document
element: 'document'
})
onNonSkippableVideoFinished(): Observable<any> {
return;
@@ -532,7 +532,7 @@ export class Appodeal extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onNonSkippableVideoClosed',
element: document
element: 'document'
})
onNonSkippableVideoClosed(): Observable<any> {
return;
@@ -541,7 +541,7 @@ export class Appodeal extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onBannerClicked',
element: document
element: 'document'
})
onBannerClicked(): Observable<any> {
return;
@@ -550,7 +550,7 @@ export class Appodeal extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onBannerFailedToLoad',
element: document
element: 'document'
})
onBannerFailedToLoad(): Observable<any> {
return;
@@ -559,7 +559,7 @@ export class Appodeal extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onBannerLoaded',
element: document
element: 'document'
})
onBannerLoaded(): Observable<any> {
return;
@@ -568,7 +568,7 @@ export class Appodeal extends IonicNativePlugin {
@Cordova({
eventObservable: true,
event: 'onBannerShown',
element: document
element: 'document'
})
onBannerShown(): Observable<any> {
return;
+1 -1
View File
@@ -52,7 +52,7 @@ export interface AppsflyerInviteOptions {
*
* @usage
* ```typescript
* import { Appsflyer } from '@ionic-native/appsflyer';
* import { Appsflyer } from '@ionic-native/appsflyer/ngx';
*
*
* constructor(private appsflyer: Appsflyer) { }
@@ -0,0 +1,141 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Audio Management
* @description
* A Cordova plugin to manage volume of audio streams for: ring, music, notification and system. Possible
* ringer values for those streams are: silent, vibrate and normal.
*
* @usage
* ```typescript
* import { AudioManagement } from '@ionic-native/audio-management/ngx';
*
*
* constructor(public audioman: AudioManagement) { }
*
* ...
*
* setAudioMode() {
* this.audioman.setAudioMode(AudioManagement.AudioMode.NORMAL)
* .then(() => {
* console.log('Device audio mode is now NORMAL');
* })
* .catch((reason) => {
* console.log(reason);
* });
* }
*
* getAudioMode() {
* this.audioman.getAudioMode()
* .then((value: AudioManagement.AudioModeReturn) => {
* console.log('Device audio mode is ' + value.label + ' (' + value.audioMode + ')');
* })
* .catch((reason) => {
* console.log(reason);
* });
* }
*
* ```
* @interfaces
* AudioModeReturn
*/
@Plugin({
pluginName: 'AudioManagement',
plugin: 'clovelced-plugin-audiomanagement',
pluginRef: 'AudioManagement',
repo: 'https://github.com/clovelCed/cordova-plugin-audiomanagement',
platforms: ['Android']
})
@Injectable()
export class AudioManagement extends IonicNativePlugin {
/**
* Sets the `AudioManagement.AudioMode` for the device.
*
* @param {AudioManagement.AudioMode} mode the device can be set to: Silent, Normal, Vibrate
* @returns {Promise<void>}
*/
@Cordova({
successIndex: 1,
errorIndex: 2
})
setAudioMode(mode: AudioManagement.AudioMode): Promise<void> {
return;
}
/**
* Gets the current `AudioManagement.AudioMode` of the device. Thenable returns an object with
* `label` and `audioMode` values.
*
* @returns {Promise<AudioManagement.AudioModeReturn>}
*/
@Cordova()
getAudioMode(): Promise<AudioManagement.AudioModeReturn> {
return;
}
/**
* Sets the specified `AudioManagement.VolumeType` for the device with the value from `volume`.
*
* @param {AudioManagement.VolumeType} type the `AudioManagement.VolumeType` to set
* @param {number} volume the volume value
* @returns {Promise<void>}
*/
@Cordova({
successIndex: 2,
errorIndex: 3
})
setVolume(type: AudioManagement.VolumeType, volume: number): Promise<void> {
return;
}
/**
* Gets the specified `AudioManagement.VolumeType`'s `volume`. Thenable returns an object with
* a numeric property for volume, `volume`.
*
* @param {AudioManagement.VolumeType} type the `AudioManagement.VolumeType` to get
* @returns {Promise<{volume: number}>}
*/
@Cordova({
successIndex: 1,
errorIndex: 2
})
getVolume(type: AudioManagement.VolumeType): Promise<{ volume: number }> {
return;
}
/**
* Gets the specified `AudioManagement.VolumeType`'s maximum `volume`. Thenable returns an
* object with a numeric property, `maxVolume`.
*
* @param {AudioManagement.VolumeType} type the `AudioManagement.VolumeType` to get
* @returns {Promise<{maxVolume: number}>}
*/
@Cordova({
successIndex: 1,
errorIndex: 2
})
getMaxVolume(type: AudioManagement.VolumeType): Promise<{ maxVolume: number }> {
return;
}
}
export namespace AudioManagement {
export enum AudioMode {
SILENT = 0,
VIBRATE,
NORMAL
}
export enum VolumeType {
RING = 0,
MUSIC,
NOTIFICATION,
SYSTEM
}
export interface AudioModeReturn {
audioMode: AudioManagement.AudioMode;
label: string;
}
}
+5 -3
View File
@@ -9,7 +9,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { Autostart } from '@ionic-native/autostart';
* import { Autostart } from '@ionic-native/autostart/ngx';
*
*
* constructor(private autostart: Autostart) { }
@@ -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 {
}
}
@@ -20,14 +20,14 @@ export interface BackgroundFetchConfig {
* @usage
*
* ```typescript
* import { BackgroundFetch, BackgroundFetchConfig } from '@ionic-native/background-fetch';
* import { BackgroundFetch, BackgroundFetchConfig } from '@ionic-native/background-fetch/ngx';
*
*
* constructor(private backgroundFetch: BackgroundFetch) {
*
* 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,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
export enum BackgroundGeolocationLocationCode {
PERMISSION_DENIED = 1,
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
/**
* Configurations items that can be updated.
@@ -57,7 +57,7 @@ export interface BackgroundModeConfiguration {
* Requires Cordova plugin: cordova-plugin-background-mode. For more info about plugin, visit: https://github.com/katzer/cordova-plugin-background-mode
* @usage
* ```typescript
* import { BackgroundMode } from '@ionic-native/background-mode';
* import { BackgroundMode } from '@ionic-native/background-mode/ngx';
*
* constructor(private backgroundMode: BackgroundMode) { }
*
+7 -3
View File
@@ -10,7 +10,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { Backlight } from '@ionic-native/backlight';
* import { Backlight } from '@ionic-native/backlight/ngx';
*
* constructor(private backlight: Backlight) { }
*
@@ -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;
}
}
+1 -1
View File
@@ -10,7 +10,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { Badge } from '@ionic-native/badge';
* import { Badge } from '@ionic-native/badge/ngx';
*
* constructor(private badge: Badge) { }
*
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
declare const baiduPush: any;
@@ -82,7 +82,7 @@ export interface NotificationData {
*
* @usage
* ```typescript
* import { BaiduPush } from '@ionic-native/baidu-push';
* import { BaiduPush } from '@ionic-native/baidu-push/ngx';
*
*
* constructor(private baiduPush: BaiduPush) { }
@@ -84,7 +84,7 @@ export interface BarcodeScanResult {
*
* @usage
* ```typescript
* import { BarcodeScanner } from '@ionic-native/barcode-scanner';
* import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
*
* constructor(private barcodeScanner: BarcodeScanner) { }
*
@@ -16,7 +16,7 @@ export interface Base64ToGalleryOptions {
* @description This plugin allows you to save base64 data as a png image into the device
* @usage
* ```typescript
* import { Base64ToGallery } from '@ionic-native/base64-to-gallery';
* import { Base64ToGallery } from '@ionic-native/base64-to-gallery/ngx';
*
* constructor(private base64ToGallery: Base64ToGallery) { }
*
+4 -2
View File
@@ -9,7 +9,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { Base64 } from '@ionic-native/base64';
* import { Base64 } from '@ionic-native/base64/ngx';
*
* constructor(private base64: Base64) { }
*
@@ -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,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
export interface BatteryStatusResponse {
/**
@@ -21,7 +21,7 @@ export interface BatteryStatusResponse {
*
* @usage
* ```typescript
* import { BatteryStatus } from '@ionic-native/battery-status';
* import { BatteryStatus } from '@ionic-native/battery-status/ngx';
*
* constructor(private batteryStatus: BatteryStatus) { }
*
+2 -2
View File
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
export interface BLEScanOptions {
/** true if duplicate devices should be reported, false (default) if devices should only be reported once. */
@@ -28,7 +28,7 @@ export interface BLEScanOptions {
*
* ```typescript
*
* import { BLE } from '@ionic-native/ble';
* import { BLE } from '@ionic-native/ble/ngx';
*
* constructor(private ble: BLE) { }
*
File diff suppressed because it is too large Load Diff
+17 -7
View File
@@ -1,5 +1,5 @@
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
import { Injectable } from '@angular/core';
/**
@@ -38,7 +38,7 @@ export interface BlinkUpWPSOptions {
*
* @usage
* ```typescript
* import { BlinkUp } from '@ionic-native/blinkup';
* import { BlinkUp } from '@ionic-native/blinkup/ngx';
*
* const options = <BlinkUpWifiOptions>{
* apiKey: 'API_KEY',
@@ -70,7 +70,9 @@ export class BlinkUp extends IonicNativePlugin {
callbackOrder: 'reverse',
observable: true
})
startBlinkUp(options: BlinkUpOptions): Observable<any> { return; }
startBlinkUp(options: BlinkUpOptions): Observable<any> {
return;
}
/**
* flashWifiBlinkUp - invokes the flash wifi process
@@ -81,7 +83,9 @@ export class BlinkUp extends IonicNativePlugin {
callbackOrder: 'reverse',
observable: true
})
flashWifiBlinkUp(options: BlinkUpWifiOptions): Observable<any> { return; }
flashWifiBlinkUp(options: BlinkUpWifiOptions): Observable<any> {
return;
}
/**
* flashWPSBlinkUp - invokes the flash wps process
@@ -92,7 +96,9 @@ export class BlinkUp extends IonicNativePlugin {
callbackOrder: 'reverse',
observable: true
})
flashWPSBlinkUp(options: BlinkUpWPSOptions): Observable<any> { return; }
flashWPSBlinkUp(options: BlinkUpWPSOptions): Observable<any> {
return;
}
/**
* abortBlinkUp - abort blinkup process
@@ -101,7 +107,9 @@ export class BlinkUp extends IonicNativePlugin {
@Cordova({
observable: true
})
abortBlinkUp(): Observable<any> { return; }
abortBlinkUp(): Observable<any> {
return;
}
/**
* clearBlinkUpData - clear wifi data
@@ -110,5 +118,7 @@ export class BlinkUp extends IonicNativePlugin {
@Cordova({
observable: true
})
clearBlinkUpData(): Observable<any> { return; }
clearBlinkUpData(): Observable<any> {
return;
}
}
+19 -19
View File
@@ -5,7 +5,7 @@ import {
IonicNativePlugin,
Plugin
} from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
/* Available status of device */
export type Status =
@@ -339,7 +339,7 @@ export interface InitializeResult {
/** Service's UUID */
service: string;
/** Characteristic UUID */
characteristic: string;
characterisitc: string;
/** This integer value will be incremented every read/writeRequested */
requestId: number;
/** Offset value */
@@ -397,7 +397,7 @@ export interface AdapterInfo {
*
* @usage
* ```typescript
* import { BluetoothLE } from '@ionic-native/bluetooth-le';
* import { BluetoothLE } from '@ionic-native/bluetooth-le/ngx';
*
*
* constructor(public bluetoothle: BluetoothLE, public plt: Platform) {
@@ -466,7 +466,7 @@ export class BluetoothLE extends IonicNativePlugin {
* Currently the discoverable state does not have any relevance because there is no "setDiscoverable" functionality in place. That may change in the future.
* @returns {Promise<AdapterInfo>}
*/
@Cordova({ callbackOrder: 'reverse', observable: true })
@Cordova({ callbackOrder: 'reverse' })
getAdapterInfo(): Promise<AdapterInfo> {
return;
}
@@ -668,7 +668,7 @@ export class BluetoothLE extends IonicNativePlugin {
* @returns {Promise<OperationResult>}
*/
@Cordova({ callbackOrder: 'reverse' })
read(params: DescriptorParams): Promise<{ result: OperationResult }> {
read(params: DescriptorParams): Promise<OperationResult> {
return;
}
@@ -678,10 +678,10 @@ export class BluetoothLE extends IonicNativePlugin {
* Once a subscription is no longer needed, execute unsubscribe in a similar fashion.
* The Client Configuration descriptor will automatically be written to enable notification/indication based on the characteristic's properties.
* @param {DescriptorParams} params
* @returns {(Observable<{ result: OperationResult }>)}
* @returns {Observable<OperationResult>}
*/
@Cordova({ callbackOrder: 'reverse', observable: true })
subscribe(params: DescriptorParams): Observable<{ result: OperationResult }> {
subscribe(params: DescriptorParams): Observable<OperationResult> {
return;
}
@@ -1048,28 +1048,28 @@ export class BluetoothLE extends IonicNativePlugin {
return;
}
@CordovaProperty
@CordovaProperty()
SCAN_MODE_OPPORTUNISTIC: number;
@CordovaProperty
@CordovaProperty()
SCAN_MODE_LOW_POWER: number;
@CordovaProperty
@CordovaProperty()
SCAN_MODE_BALANCED: number;
@CordovaProperty
@CordovaProperty()
SCAN_MODE_LOW_LATENCY: number;
@CordovaProperty
@CordovaProperty()
MATCH_MODE_AGRESSIVE: number;
@CordovaProperty
@CordovaProperty()
MATCH_MODE_STICKY: number;
@CordovaProperty
@CordovaProperty()
MATCH_NUM_ONE_ADVERTISEMENT: number;
@CordovaProperty
@CordovaProperty()
MATCH_NUM_FEW_ADVERTISEMENT: number;
@CordovaProperty
@CordovaProperty()
MATCH_NUM_MAX_ADVERTISEMENT: number;
@CordovaProperty
@CordovaProperty()
CALLBACK_TYPE_ALL_MATCHES: number;
@CordovaProperty
@CordovaProperty()
CALLBACK_TYPE_FIRST_MATCH: number;
@CordovaProperty
@CordovaProperty()
CALLBACK_TYPE_MATCH_LOST: number;
}
@@ -1,13 +1,13 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
/**
* @name Bluetooth Serial
* @description This plugin enables serial communication over Bluetooth. It was written for communicating between Android or iOS and an Arduino (not Android to Android or iOS to iOS).
* @usage
* ```typescript
* import { BluetoothSerial } from '@ionic-native/bluetooth-serial';
* import { BluetoothSerial } from '@ionic-native/bluetooth-serial/ngx';
*
* constructor(private bluetoothSerial: BluetoothSerial) { }
*
@@ -39,7 +39,6 @@ import { Observable } from 'rxjs/Observable';
})
@Injectable()
export class BluetoothSerial extends IonicNativePlugin {
/**
* Connect to a Bluetooth device
* @param {string} macAddress_or_uuid Identifier of the remote device
@@ -50,7 +49,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 +63,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 +84,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 +94,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 +106,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 +118,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 +132,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 +145,9 @@ export class BluetoothSerial extends IonicNativePlugin {
observable: true,
clearFunction: 'unsubscribeRawData'
})
subscribeRawData(): Observable<any> { return; }
subscribeRawData(): Observable<any> {
return;
}
/**
* Clears data in buffer
@@ -138,7 +156,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 +167,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 +178,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 +189,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 +200,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 +211,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 +222,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 +233,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 +246,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 +258,7 @@ 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 +268,5 @@ export class BluetoothSerial extends IonicNativePlugin {
platforms: ['Android'],
sync: true
})
setDiscoverable(discoverableDuration: number): void { }
setDiscoverable(discoverableDuration: number): void {}
}
+3 -3
View File
@@ -148,7 +148,7 @@ export interface PaymentUIResult {
*
* @usage
* ```typescript
* import { Braintree, ApplePayOptions, PaymentUIOptions } from '@ionic-native/braintree';
* import { Braintree, ApplePayOptions, PaymentUIOptions } from '@ionic-native/braintree/ngx';
*
* constructor(private braintree: Braintree) { }
*
@@ -166,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))
+1 -1
View File
@@ -60,7 +60,7 @@ export interface BranchUniversalObject {
*
* @usage
* ```
* import { BranchIo } from '@ionic-native/branch-io';
* import { BranchIo } from '@ionic-native/branch-io/ngx';
*
*
* constructor(private branch: BranchIo) { }
@@ -10,7 +10,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { Brightness } from '@ionic-native/brightness';
* import { Brightness } from '@ionic-native/brightness/ngx';
*
* constructor(private brightness: Brightness) { }
*
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
/**
* @name Broadcaster
@@ -9,7 +9,7 @@ import { Observable } from 'rxjs/Observable';
*
* @usage
* ```typescript
* import { Broadcaster } from '@ionic-native/broadcaster';
* import { Broadcaster } from '@ionic-native/broadcaster/ngx';
*
* constructor(private broadcaster: Broadcaster) { }
*
@@ -8,7 +8,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { BrowserTab } from '@ionic-native/browser-tab';
* import { BrowserTab } from '@ionic-native/browser-tab/ngx';
*
* constructor(private browserTab: BrowserTab) {
*
+1 -1
View File
@@ -66,7 +66,7 @@ export interface NameOrOptions {
*
* @usage
* ```typescript
* import { Calendar } from '@ionic-native/calendar';
* import { Calendar } from '@ionic-native/calendar/ngx';
*
* constructor(private calendar: Calendar) { }
*
@@ -19,7 +19,7 @@ export interface CallDirectoryLog {
*
* @usage
* ```typescript
* import { CallDirectory } from '@ionic-native/call-directory';
* import { CallDirectory } from '@ionic-native/call-directory/ngx';
*
*
* constructor(private callDirectory: CallDirectory) { }
@@ -62,7 +62,7 @@ export class CallDirectory extends IonicNativePlugin {
/**
* Add identification numbers
* @param {Array<CallDirectoryItem>} items Set of numbers with labels
* @param {CallDirectoryItem[]} items Set of numbers with labels
* @return {Promise<any>} Returns a promise that resolves when numbers are added
*/
@Cordova()
@@ -72,7 +72,7 @@ export class CallDirectory extends IonicNativePlugin {
/**
* Remove identification numbers
* @param {Array<CallDirectoryItem>} items Set of numbers with arbitrary label
* @param {CallDirectoryItem[]} items Set of numbers with arbitrary label
* @return {Promise<any>} Returns a promise that resolves when numbers are removed
*/
@Cordova()
@@ -91,7 +91,7 @@ export class CallDirectory extends IonicNativePlugin {
/**
* Get all numbers and labels in call directory
* @return {Array<CallDirectoryItem>} Returns a promise that resolves with an array of all items
* @return {CallDirectoryItem[]} Returns a promise that resolves with an array of all items
*/
@Cordova()
getAllItems(): Promise<CallDirectoryItem[]> {
+1 -1
View File
@@ -14,7 +14,7 @@ export interface CallLogObject {
*
* @usage
* ```typescript
* import { CallLog } from '@ionic-native/call-log';
* import { CallLog } from '@ionic-native/call-log/ngx';
*
*
* constructor(private callLog: CallLog) { }
@@ -9,7 +9,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { CallNumber } from '@ionic-native/call-number';
* import { CallNumber } from '@ionic-native/call-number/ngx';
*
* constructor(private callNumber: CallNumber) { }
*
@@ -63,7 +63,7 @@ export interface CameraPreviewPictureOptions {
*
* @usage
* ```typescript
* import { CameraPreview, CameraPreviewPictureOptions, CameraPreviewOptions, CameraPreviewDimensions } from '@ionic-native/camera-preview';
* import { CameraPreview, CameraPreviewPictureOptions, CameraPreviewOptions, CameraPreviewDimensions } from '@ionic-native/camera-preview/ngx';
*
* constructor(private cameraPreview: CameraPreview) { }
*
@@ -80,7 +80,7 @@ export interface CameraPreviewPictureOptions {
* previewDrag: true,
* toBack: true,
* alpha: 1
* };
* }
*
* // start camera
* this.cameraPreview.startCamera(cameraPreviewOpts).then(
+1 -1
View File
@@ -138,7 +138,7 @@ export enum Direction {
*
* @usage
* ```typescript
* import { Camera, CameraOptions } from '@ionic-native/camera';
* import { Camera, CameraOptions } from '@ionic-native/camera/ngx';
*
* constructor(private camera: Camera) { }
*
+4 -4
View File
@@ -8,7 +8,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;
@@ -18,7 +18,7 @@ export interface CardIOOptions {
requirePostalCode?: boolean;
/**
* Removes the keyboard button from the scan screen.
* Removes the keyboard button from the scan screen.
*/
suppressManual?: boolean;
@@ -43,7 +43,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;
@@ -141,7 +141,7 @@ export interface CardIOResponse {
* <string>To scan credit cards.</string>
* ```
* ```typescript
* import { CardIO } from '@ionic-native/card-io';
* import { CardIO } from '@ionic-native/card-io/ngx';
*
* constructor(private cardIO: CardIO) { }
*
+1 -1
View File
@@ -28,7 +28,7 @@ export interface ChooserResult {
*
* @usage
* ```typescript
* import { Chooser } from '@ionic-native/chooser';
* import { Chooser } from '@ionic-native/chooser/ngx';
*
*
* constructor(private chooser: Chooser) { }
+1 -1
View File
@@ -136,7 +136,7 @@ export interface CCKQuantityItem {
*
* @usage
* ```typescript
* import { ClassKit, CCKContext, CCKBinaryItem, CCKQuantityItem, CCKScoreItem, CCKContextTopic, CCKContextType, CCKBinaryType } from '@ionic-native/class-kit';
* import { ClassKit, CCKContext, CCKBinaryItem, CCKQuantityItem, CCKScoreItem, CCKContextTopic, CCKContextType, CCKBinaryType } from '@ionic-native/class-kit/ngx';
*
* // Init contexts defined in XML file 'CCK-contexts.xml'
* constructor( ..., private classKit: ClassKit) {
+1 -1
View File
@@ -10,7 +10,7 @@ declare var clevertap: any;
*
* @usage
* ```typescript
* import { CleverTap } from '@ionic-native/clevertap';
* import { CleverTap } from '@ionic-native/clevertap/ngx';
*
* constructor(private clevertap: CleverTap) { }
*
+1 -1
View File
@@ -8,7 +8,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { Clipboard } from '@ionic-native/clipboard';
* import { Clipboard } from '@ionic-native/clipboard/ngx';
*
* constructor(private clipboard: Clipboard) { }
*
@@ -8,7 +8,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { CloudSettings } from '@ionic-native/cloud-settings';
* import { CloudSettings } from '@ionic-native/cloud-settings/ngx';
*
*
* constructor(private cloudSettings: CloudSettings) { }
+6 -2
View File
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
namespace Http {
export const enum Verb {
@@ -118,20 +118,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;
@@ -460,7 +464,7 @@ export interface DownloadProgress {
*
* @usage
* ```typescript
* import { CodePush } from '@ionic-native/code-push';
* import { CodePush } from '@ionic-native/code-push/ngx';
*
* constructor(private codePush: CodePush) { }
*
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
/**
* @name Colored Browser Tabs
@@ -9,7 +9,7 @@ import { Observable } from 'rxjs/Observable';
*
* @usage
* ```typescript
* import { ColoredBrowserTabs } from '@ionic-native/colored-browser-tabs';
* import { ColoredBrowserTabs } from '@ionic-native/colored-browser-tabs/ngx';
*
*
* constructor(private browserTabs: ColoredBrowserTabs) { }
+15 -16
View File
@@ -92,22 +92,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 rawId: 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;
@@ -314,7 +313,7 @@ export class ContactFindOptions implements IContactFindOptions {
* @usage
*
* ```typescript
* import { Contacts, Contact, ContactField, ContactName } from '@ionic-native/contacts';
* import { Contacts, Contact, ContactField, ContactName } from '@ionic-native/contacts/ngx';
*
* constructor(private contacts: Contacts) { }
*
@@ -1,5 +1,5 @@
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Couchbase Lite
@@ -8,9 +8,9 @@ import { Injectable } from '@angular/core';
*
* @usage
* ```typescript
* import { CouchbaseLite } from '@ionic-native/couchbase-lite';
* import { CouchbaseLite } from '@ionic-native/couchbase-lite/ngx';
* import { Http } from '@angular/http';
* import { Observable } from 'rxjs/Observable'
* import { Observable } from 'rxjs'
* constructor(private couchbase: CouchbaseLite, private platform:Platform,private _http:Http) {
* this.initMethod();
* }
+1 -1
View File
@@ -12,7 +12,7 @@ export interface CropOptions {
* @description Crops images
* @usage
* ```typescript
* import { Crop } from '@ionic-native/crop';
* import { Crop } from '@ionic-native/crop/ngx';
*
* constructor(private crop: Crop) { }
*
@@ -125,7 +125,7 @@ export interface DatePickerOptions {
*
* @usage
* ```typescript
* import { DatePicker } from '@ionic-native/date-picker';
* import { DatePicker } from '@ionic-native/date-picker/ngx';
*
* constructor(private datePicker: DatePicker) { }
*
+2 -2
View File
@@ -1,13 +1,13 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
/**
* @name DB Meter
* @description This plugin defines a global DBMeter object, which permits to get the decibel values from the microphone.
* @usage
* ```typescript
* import { DBMeter } from '@ionic-native/db-meter';
* import { DBMeter } from '@ionic-native/db-meter/ngx';
*
* constructor(private dbMeter: DBMeter) { }
*
+20 -10
View File
@@ -1,9 +1,8 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
export interface DeeplinkMatch {
/**
* The route info for the matched route
*/
@@ -20,7 +19,6 @@ export interface DeeplinkMatch {
* the route was matched (for example, Facebook sometimes adds extra data)
*/
$link: any;
}
export interface DeeplinkOptions {
@@ -37,7 +35,7 @@ export interface DeeplinkOptions {
*
* @usage
* ```typescript
* import { Deeplinks } from '@ionic-native/deeplinks';
* import { Deeplinks } from '@ionic-native/deeplinks/ngx';
*
* constructor(private deeplinks: Deeplinks) { }
*
@@ -85,13 +83,18 @@ export interface DeeplinkOptions {
plugin: 'ionic-plugin-deeplinks',
pluginRef: 'IonicDeeplink',
repo: 'https://github.com/ionic-team/ionic-plugin-deeplinks',
install: 'ionic cordova plugin add ionic-plugin-deeplinks --variable URL_SCHEME=myapp --variable DEEPLINK_SCHEME=https --variable DEEPLINK_HOST=example.com --variable ANDROID_PATH_PREFIX=/',
installVariables: ['URL_SCHEME', 'DEEPLINK_SCHEME', 'DEEPLINK_HOST', 'ANDROID_PATH_PREFIX'],
install:
'ionic cordova plugin add ionic-plugin-deeplinks --variable URL_SCHEME=myapp --variable DEEPLINK_SCHEME=https --variable DEEPLINK_HOST=example.com --variable ANDROID_PATH_PREFIX=/',
installVariables: [
'URL_SCHEME',
'DEEPLINK_SCHEME',
'DEEPLINK_HOST',
'ANDROID_PATH_PREFIX'
],
platforms: ['Android', 'Browser', 'iOS']
})
@Injectable()
export class Deeplinks extends IonicNativePlugin {
/**
* Define a set of paths to match against incoming deeplinks.
*
@@ -105,7 +108,9 @@ export class Deeplinks extends IonicNativePlugin {
@Cordova({
observable: true
})
route(paths: any): Observable<DeeplinkMatch> { return; }
route(paths: any): Observable<DeeplinkMatch> {
return;
}
/**
*
@@ -132,6 +137,11 @@ 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;
}
}
@@ -19,7 +19,7 @@ export interface AndroidAccount {
*
* @usage
* ```typescript
* import { DeviceAccounts } from '@ionic-native/device-accounts';
* import { DeviceAccounts } from '@ionic-native/device-accounts/ngx';
*
* constructor(private deviceAccounts: DeviceAccounts) { }
*
@@ -1,7 +1,7 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface DeviceFeedbackEnabled {
export interface DeviceFeedbackStatus {
/** Haptic Feedback */
haptic: boolean;
@@ -17,7 +17,7 @@ export interface DeviceFeedbackEnabled {
*
* @usage
* ```typescript
* import { DeviceFeedback } from '@ionic-native/device-feedback';
* import { DeviceFeedback } from '@ionic-native/device-feedback/ngx';
*
* constructor(private deviceFeedback: DeviceFeedback) { }
*
@@ -67,7 +67,7 @@ export class DeviceFeedback extends IonicNativePlugin {
* @returns {Promise<DeviceFeedbackEnabled>}
*/
@Cordova()
isFeedbackEnabled(): Promise<DeviceFeedbackEnabled> {
isFeedbackEnabled(): Promise<DeviceFeedbackStatus> {
return;
}
}
@@ -1,9 +1,8 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
export interface DeviceMotionAccelerationData {
/**
* Amount of acceleration on the x-axis. (in m/s^2)
*/
@@ -23,16 +22,13 @@ export interface DeviceMotionAccelerationData {
* Creation timestamp in milliseconds.
*/
timestamp: any;
}
export interface DeviceMotionAccelerometerOptions {
/**
* Requested period of calls to accelerometerSuccess with acceleration data in Milliseconds. Default: 10000
*/
frequency?: number;
}
/**
@@ -42,7 +38,7 @@ export interface DeviceMotionAccelerometerOptions {
*
* @usage
* ```typescript
* import { DeviceMotion, DeviceMotionAccelerationData } from '@ionic-native/device-motion';
* import { DeviceMotion, DeviceMotionAccelerationData } from '@ionic-native/device-motion/ngx';
*
* constructor(private deviceMotion: DeviceMotion) { }
*
@@ -72,17 +68,28 @@ export interface DeviceMotionAccelerometerOptions {
plugin: 'cordova-plugin-device-motion',
pluginRef: 'navigator.accelerometer',
repo: 'https://github.com/apache/cordova-plugin-device-motion',
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone 8']
platforms: [
'Android',
'BlackBerry 10',
'Browser',
'Firefox OS',
'iOS',
'Tizen',
'Ubuntu',
'Windows',
'Windows Phone 8'
]
})
@Injectable()
export class DeviceMotion extends IonicNativePlugin {
/**
* Get the current acceleration along the x, y, and z axes.
* @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 +101,9 @@ export class DeviceMotion extends IonicNativePlugin {
observable: true,
clearFunction: 'clearWatch'
})
watchAcceleration(options?: DeviceMotionAccelerometerOptions): Observable<DeviceMotionAccelerationData> { return; }
watchAcceleration(
options?: DeviceMotionAccelerometerOptions
): Observable<DeviceMotionAccelerationData> {
return;
}
}
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
export interface DeviceOrientationCompassHeading {
/**
@@ -44,7 +44,7 @@ export interface DeviceOrientationCompassOptions {
* @usage
* ```typescript
* // DeviceOrientationCompassHeading is an interface for compass
* import { DeviceOrientation, DeviceOrientationCompassHeading } from '@ionic-native/device-orientation';
* import { DeviceOrientation, DeviceOrientationCompassHeading } from '@ionic-native/device-orientation/ngx';
*
* constructor(private deviceOrientation: DeviceOrientation) { }
*
+9 -9
View File
@@ -10,7 +10,7 @@ declare const window: any;
*
* @usage
* ```typescript
* import { Device } from '@ionic-native/device';
* import { Device } from '@ionic-native/device/ngx';
*
* constructor(private device: Device) { }
*
@@ -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;
}
@@ -8,13 +8,13 @@ import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-nati
*
* @usage
* ```typescript
* import { Diagnostic } from '@ionic-native/diagnostic';
* import { Diagnostic } from '@ionic-native/diagnostic/ngx';
*
* constructor(private diagnostic: Diagnostic) { }
*
* ...
*
* 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);
@@ -70,7 +70,7 @@ export class Diagnostic extends IonicNativePlugin {
BODY_SENSORS: 'BODY_SENSORS'
};
@CordovaProperty
@CordovaProperty()
permissionStatus: {
GRANTED: string;
DENIED: string;
@@ -129,7 +129,7 @@ export class Diagnostic extends IonicNativePlugin {
POWERING_ON: 'powering_on'
};
@CordovaProperty
@CordovaProperty()
NFCState: {
UNKNOWN: string;
POWERED_OFF: string;
@@ -138,7 +138,7 @@ export class Diagnostic extends IonicNativePlugin {
POWERING_OFF: string;
};
@CordovaProperty
@CordovaProperty()
motionStatus: {
NOT_REQUESTED: string;
GRANTED: string;
+3 -3
View File
@@ -22,7 +22,7 @@ export interface DialogsPromptCallback {
*
* @usage
* ```typescript
* import { Dialogs } from '@ionic-native/dialogs';
* import { Dialogs } from '@ionic-native/dialogs/ngx';
*
* constructor(private dialogs: Dialogs) { }
*
@@ -65,7 +65,7 @@ export class Dialogs extends IonicNativePlugin {
* Displays a customizable confirmation dialog box.
* @param {string} message Dialog message.
* @param {string} [title] Dialog title. (Optional, defaults to Confirm)
* @param {Array<string>} [buttonLabels] Array of strings specifying button labels. (Optional, defaults to [OK,Cancel])
* @param {string[]} [buttonLabels] Array of strings specifying button labels. (Optional, defaults to [OK,Cancel])
* @returns {Promise<number>} Returns a promise that resolves the button index that was clicked, or 0 if the user has dismissed the dialog by clicking outside the dialog box. Note that the index use one-based indexing.
*/
@Cordova({
@@ -84,7 +84,7 @@ export class Dialogs extends IonicNativePlugin {
* Displays a native dialog box that is more customizable than the browser's prompt function.
* @param {string} [message] Dialog message.
* @param {string} [title] Dialog title. (Optional, defaults to Prompt)
* @param {Array<string>} [buttonLabels] Array of strings specifying button labels. (Optional, defaults to ["OK","Cancel"])
* @param {string[]} [buttonLabels] Array of strings specifying button labels. (Optional, defaults to ["OK","Cancel"])
* @param {string} [defaultText] Default text box input value. (Optional, Default: empty string)
* @returns {Promise<DialogsPromptCallback>} Returns a promise that resolves an object with the button index clicked and the text entered
*/
+4 -2
View File
@@ -7,7 +7,7 @@ import { Injectable } from '@angular/core';
*
* @usage
* ```typescript
* import { DNS } from '@ionic-native/dns';
* import { DNS } from '@ionic-native/dns/ngx';
*
*
* constructor(private dns: DNS) { }
@@ -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;
}
}
@@ -10,7 +10,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { DocumentPicker } from '@ionic-native/document-picker';
* import { DocumentPicker } from '@ionic-native/document-picker/ngx';
*
* constructor(private docPicker: DocumentPicker) { }
*
@@ -36,7 +36,7 @@ export interface DocumentViewerOptions {
*
* @usage
* ```typescript
* import { DocumentViewer } from '@ionic-native/document-viewer';
* import { DocumentViewer } from '@ionic-native/document-viewer/ngx';
*
*
* constructor(private document: DocumentViewer) { }
@@ -69,21 +69,24 @@ 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
*
* @param url {string} Url to the file
* @param contentType {string} Content type of the file
* @param options {Array<DocumentViewerOptions>} options
* @param options {DocumentViewerOptions} options
* @param [onPossible] {Function}
* @param [onMissingApp] {Function}
* @param [onImpossible] {Function}
* @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 {
}
}
@@ -3,7 +3,8 @@ import {
Cordova,
CordovaCheck,
IonicNativePlugin,
Plugin
Plugin,
getPromise
} from '@ionic-native/core';
export interface EmailComposerOptions {
@@ -62,7 +63,7 @@ export interface EmailComposerOptions {
*
* @usage
* ```typescript
* import { EmailComposer } from '@ionic-native/email-composer';
* import { EmailComposer } from '@ionic-native/email-composer/ngx';
*
* constructor(private emailComposer: EmailComposer) { }
*
@@ -88,7 +89,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);
@@ -149,7 +150,7 @@ export class EmailComposer extends IonicNativePlugin {
*/
@CordovaCheck()
isAvailable(app?: string): Promise<any> {
return new Promise<boolean>((resolve, reject) => {
return getPromise<boolean>((resolve, reject) => {
if (app) {
EmailComposer.getPlugin().isAvailable(app, (isAvailable: boolean) => {
if (isAvailable) {
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
export interface EstimoteBeaconRegion {
state?: string;
@@ -22,7 +22,7 @@ export interface EstimoteBeaconRegion {
*
* @usage
* ```typescript
* import { EstimoteBeacons } from '@ionic-native/estimote-beacons';
* import { EstimoteBeacons } from '@ionic-native/estimote-beacons/ngx';
*
* constructor(private eb: EstimoteBeacons) { }
*
@@ -475,9 +475,9 @@ export class EstimoteBeacons extends IonicNativePlugin {
/**
* Stop monitoring secure beacons. Available on iOS.
* This function has the same parameters/behavior as
* This function has the same parameters/behaviour as
* {@link EstimoteBeacons.stopMonitoringForRegion}.
* @param {EstimoteBeaconRegion} region Region
* @param region {EstimoteBeaconRegion} Region
* @returns {Promise<any>}
*/
@Cordova()
@@ -12,7 +12,7 @@ import { CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { ExtendedDeviceInformation } from '@ionic-native/extended-device-information';
* import { ExtendedDeviceInformation } from '@ionic-native/extended-device-information/ngx';
*
*
* constructor(private extendedDeviceInformation: ExtendedDeviceInformation) { }
@@ -35,24 +35,24 @@ export class ExtendedDeviceInformation extends IonicNativePlugin {
/**
* Get the device's memory size
*/
@CordovaProperty
memory: string;
@CordovaProperty()
memory: number;
/**
* Get the device's CPU mhz
*/
@CordovaProperty
cpumhz: number;
@CordovaProperty()
cpumhz: string;
/**
* Get the total storage
*/
@CordovaProperty
@CordovaProperty()
totalstorage: string;
/**
* Get the total storage
*/
@CordovaProperty
@CordovaProperty()
freestorage: number;
}
+2 -2
View File
@@ -14,7 +14,7 @@ export interface Attributes {
*
* @usage
* ```typescript
* import { Crashlytics } from '@ionic-native/fabric';
* import { Crashlytics } from '@ionic-native/fabric/ngx';
*
*
* constructor(private crashlytics: Crashlytics) { }
@@ -142,7 +142,7 @@ export class Crashlytics extends IonicNativePlugin {
*
* @usage
* ```typescript
* import { Answers } from '@ionic-native/fabric';
* import { Answers } from '@ionic-native/fabric/ngx';
*
*
* constructor(private answers: Answers) { }
+1 -1
View File
@@ -89,7 +89,7 @@ export interface FacebookLoginResponse {
*
* @usage
* ```typescript
* import { Facebook, FacebookLoginResponse } from '@ionic-native/facebook';
* import { Facebook, FacebookLoginResponse } from '@ionic-native/facebook/ngx';
*
* constructor(private fb: Facebook) { }
*
+3 -3
View File
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
export interface NotificationData {
/**
@@ -23,7 +23,7 @@ export interface NotificationData {
*
* @usage
* ```typescript
* import { FCM } from '@ionic-native/fcm';
* import { FCM } from '@ionic-native/fcm/ngx';
*
* constructor(private fcm: FCM) {}
*
@@ -9,7 +9,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { FileChooser } from '@ionic-native/file-chooser';
* import { FileChooser } from '@ionic-native/file-chooser/ngx';
*
* constructor(private fileChooser: FileChooser) { }
*
@@ -36,6 +36,8 @@ export class FileChooser extends IonicNativePlugin {
* @returns {Promise<string>}
*/
@Cordova()
open(): Promise<string> { return; }
open(): Promise<string> {
return;
}
}
@@ -8,7 +8,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { FileEncryption } from '@ionic-native/file-encryption';
* import { FileEncryption } from '@ionic-native/file-encryption/ngx';
*
*
* constructor(private fileEncryption: FileEncryption) { }
@@ -8,7 +8,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { FileOpener } from '@ionic-native/file-opener';
* import { FileOpener } from '@ionic-native/file-opener/ngx';
*
* constructor(private fileOpener: FileOpener) { }
*
+1 -1
View File
@@ -11,7 +11,7 @@ declare const window: any;
*
* @usage
* ```typescript
* import { FilePath } from '@ionic-native/file-path';
* import { FilePath } from '@ionic-native/file-path/ngx';
*
* constructor(private filePath: FilePath) { }
*
@@ -16,7 +16,7 @@ export interface IOSFilePickerPosition {
*
* @usage
* ```typescript
* import { IOSFilePicker } from '@ionic-native/file-picker';
* import { IOSFilePicker } from '@ionic-native/file-picker/ngx';
*
* constructor(private filePicker: IOSFilePicker) { }
*
@@ -118,7 +118,7 @@ export interface FileTransferError {
*
* @usage
* ```typescript
* import { FileTransfer, FileUploadOptions, FileTransferObject } from '@ionic-native/file-transfer';
* import { FileTransfer, FileUploadOptions, FileTransferObject } from '@ionic-native/file-transfer/ngx';
* import { File } from '@ionic-native/file';
*
* constructor(private transfer: FileTransfer, private file: File) { }
@@ -300,5 +300,6 @@ export class FileTransferObject {
@CordovaInstance({
sync: true
})
abort(): void {}
abort(): void {
}
}
+186 -128
View File
@@ -1,10 +1,5 @@
import { Injectable } from '@angular/core';
import {
CordovaCheck,
CordovaProperty,
IonicNativePlugin,
Plugin
} from '@ionic-native/core';
import { CordovaCheck, CordovaProperty, IonicNativePlugin, Plugin, getPromise } from '@ionic-native/core';
export interface IFile extends Blob {
/**
@@ -30,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.
@@ -53,10 +49,12 @@ export interface LocalFileSystem {
/**
* Requests a filesystem in which to store application data.
* @param type Whether the filesystem requested should be persistent, as defined above. Use one of TEMPORARY or PERSISTENT.
* @param type Whether the filesystem requested should be persistent, as defined above. Use one of TEMPORARY or
* PERSISTENT.
* @param size This is an indicator of how much storage space, in bytes, the application expects to need.
* @param successCallback The callback that is called when the user agent provides a filesystem.
* @param errorCallback A callback that is called when errors happen, or when the request to obtain the filesystem is denied.
* @param errorCallback A callback that is called when errors happen, or when the request to obtain the filesystem is
* denied.
*/
requestFileSystem(
type: number,
@@ -69,7 +67,8 @@ export interface LocalFileSystem {
* Allows the user to look up the Entry for a file or directory referred to by a local URL.
* @param url A URL referring to a local file in a filesystem accessable via this API.
* @param successCallback A callback that is called to report the Entry to which the supplied URL refers.
* @param errorCallback A callback that is called when errors happen, or when the request to obtain the Entry is denied.
* @param errorCallback A callback that is called when errors happen, or when the request to obtain the Entry is
* denied.
*/
resolveLocalFileSystemURL(
url: string,
@@ -109,7 +108,8 @@ export interface Flags {
create?: boolean;
/**
* By itself, exclusive must have no effect. Used with create, it must cause getFile and getDirectory to fail if the target path already exists.
* By itself, exclusive must have no effect. Used with create, it must cause getFile and getDirectory to fail if the
* target path already exists.
*/
exclusive?: boolean;
}
@@ -119,7 +119,8 @@ export interface Flags {
*/
export interface FileSystem {
/**
* This is the name of the file system. The specifics of naming filesystems is unspecified, but a name must be unique across the list of exposed file systems.
* This is the name of the file system. The specifics of naming filesystems is unspecified, but a name must be unique
* across the list of exposed file systems.
* @readonly
*/
name: string;
@@ -172,22 +173,41 @@ export interface Entry {
* 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.
* @param successCallback A callback that is called with the time of the last modification.
* @param errorCallback ErrorCallback A callback that is called when errors happen.
*/
getMetadata(
successCallback: MetadataCallback,
errorCallback?: ErrorCallback
): void;
/**
* Set the metadata of the entry.
* @param successCallback {Function} is called with a Metadata object
* @param errorCallback {Function} is called with a FileError
* @param metadataObject {Metadata} keys and values to set
*/
setMetadata(
successCallback: MetadataCallback,
errorCallback: ErrorCallback,
metadataObject: Metadata
): void;
/**
* Move an entry to a different location on the file system. It is an error to try to:
*
@@ -219,7 +239,8 @@ export interface Entry {
* <li> copy a directory to a path occupied by a file;</li>
* <li> copy any element to a path occupied by a directory which is not empty.</li>
* <li> A copy of a file on top of an existing file must attempt to delete and replace that file.</li>
* <li> A copy of a directory on top of an existing empty directory must attempt to delete and replace that directory.</li>
* <li> A copy of a directory on top of an existing empty directory must attempt to delete and replace that
* directory.</li>
* </ul>
*
* Directory copies are always recursive--that is, they copy all contents of the directory.
@@ -232,7 +253,8 @@ export interface Entry {
): void;
/**
* Returns a URL that can be used to identify this entry. Unlike the URN defined in [FILE-API-ED], it has no specific expiration; as it describes a location on disk, it should be valid at least as long as that location exists.
* Returns a URL that can be used to identify this entry. Unlike the URN defined in [FILE-API-ED], it has no specific
* expiration; as it describes a location on disk, it should be valid at least as long as that location exists.
*/
toURL(): string;
@@ -243,14 +265,16 @@ export interface Entry {
toInternalURL(): string;
/**
* Deletes a file or directory. It is an error to attempt to delete a directory that is not empty. It is an error to attempt to delete the root directory of a filesystem.
* Deletes a file or directory. It is an error to attempt to delete a directory that is not empty. It is an error to
* attempt to delete the root directory of a filesystem.
* @param successCallback A callback that is called on success.
* @param errorCallback A callback that is called when errors happen.
*/
remove(successCallback: VoidCallback, errorCallback?: ErrorCallback): void;
/**
* Look up the parent DirectoryEntry containing this Entry. If this Entry is the root of its filesystem, its parent is itself.
* Look up the parent DirectoryEntry containing this Entry. If this Entry is the root of its filesystem, its parent
* is itself.
* @param successCallback A callback that is called to return the parent Entry.
* @param errorCallback A callback that is called when errors happen.
*/
@@ -271,11 +295,13 @@ export interface DirectoryEntry extends Entry {
/**
* Creates or looks up a file.
* @param path Either an absolute path or a relative path from this DirectoryEntry to the file to be looked up or created. It is an error to attempt to create a file whose immediate parent does not yet exist.
* @param path Either an absolute path or a relative path from this DirectoryEntry to the file to be looked up or
* created. It is an error to attempt to create a file whose immediate parent does not yet exist.
* @param options
* <ul>
* <li>If create and exclusive are both true, and the path already exists, getFile must fail.</li>
* <li>If create is true, the path doesn't exist, and no other error occurs, getFile must create it as a zero-length file and return a corresponding FileEntry.</li>
* <li>If create is true, the path doesn't exist, and no other error occurs, getFile must create it as a
* zero-length file and return a corresponding FileEntry.</li>
* <li>If create is not true and the path doesn't exist, getFile must fail.</li>
* <li>If create is not true and the path exists, but is a directory, getFile must fail.</li>
* <li>Otherwise, if no other error occurs, getFile must return a FileEntry corresponding to path.</li>
@@ -292,11 +318,13 @@ export interface DirectoryEntry extends Entry {
/**
* Creates or looks up a directory.
* @param path Either an absolute path or a relative path from this DirectoryEntry to the directory to be looked up or created. It is an error to attempt to create a directory whose immediate parent does not yet exist.
* @param path Either an absolute path or a relative path from this DirectoryEntry to the directory to be looked up
* or created. It is an error to attempt to create a directory whose immediate parent does not yet exist.
* @param options
* <ul>
* <li>If create and exclusive are both true and the path already exists, getDirectory must fail.</li>
* <li>If create is true, the path doesn't exist, and no other error occurs, getDirectory must create and return a corresponding DirectoryEntry.</li>
* <li>If create is true, the path doesn't exist, and no other error occurs, getDirectory must create and return
* a corresponding DirectoryEntry.</li>
* <li>If create is not true and the path doesn't exist, getDirectory must fail.</li>
* <li>If create is not true and the path exists, but is a file, getDirectory must fail.</li>
* <li>Otherwise, if no other error occurs, getDirectory must return a DirectoryEntry corresponding to path.</li>
@@ -313,7 +341,9 @@ export interface DirectoryEntry extends Entry {
): void;
/**
* Deletes a directory and all of its contents, if any. In the event of an error [e.g. trying to delete a directory that contains a file that cannot be removed], some of the contents of the directory may be deleted. It is an error to attempt to delete the root directory of a filesystem.
* Deletes a directory and all of its contents, if any. In the event of an error [e.g. trying to delete a directory
* that contains a file that cannot be removed], some of the contents of the directory may be deleted. It is an error
* to attempt to delete the root directory of a filesystem.
* @param successCallback A callback that is called on success.
* @param errorCallback A callback that is called when errors happen.
*/
@@ -324,7 +354,8 @@ export interface DirectoryEntry extends Entry {
}
/**
* This export interface lets a user list files and directories in a directory. If there are no additions to or deletions from a directory between the first and last call to readEntries, and no errors occur, then:
* This export interface lets a user list files and directories in a directory. If there are no additions to or
* deletions from a directory between the first and last call to readEntries, and no errors occur, then:
* <ul>
* <li> A series of calls to readEntries must return each entry in the directory exactly once.</li>
* <li> Once all entries have been returned, the next call to readEntries must produce an empty array.</li>
@@ -335,9 +366,12 @@ 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.
* @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.
* @param errorCallback A callback indicating that there was an error reading from the Directory.
*/
readEntries(
@@ -426,17 +460,20 @@ export interface RemoveResult {
/** @hidden */
export declare class FileSaver extends EventTarget {
/**
* 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.
* 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.
*/
constructor(data: Blob);
/**
* When the abort method is called, user agents must run the steps below:
* <ol>
* <li> If readyState == DONE or readyState == INIT, terminate this overall series of steps without doing anything else. </li>
* <li> If readyState == DONE or readyState == INIT, terminate this overall series of steps without doing anything
* else. </li>
* <li> Set readyState to DONE. </li>
* <li> If there are any tasks from the object's FileSaver task source in one of the task queues, then remove those tasks. </li>
* <li> If there are any tasks from the object's FileSaver task source in one of the task queues, then remove those
* tasks. </li>
* <li> Terminate the write algorithm being processed. </li>
* <li> Set the error attribute to a DOMError object of type "AbortError". </li>
* <li> Fire a progress event called abort </li>
@@ -451,21 +488,20 @@ export declare class FileSaver extends EventTarget {
* @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.
* 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:
* 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>
@@ -474,47 +510,65 @@ export declare class FileSaver extends EventTarget {
* @readonly
*/
readyState: number;
/**
* The last error that occurred on the FileSaver.
* @readonly
*/
error: Error;
/**
* Handler for write start 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 write end 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.
*/
constructor(data: Blob);
/**
* When the abort method is called, user agents must run the steps below:
* <ol>
* <li> If readyState == DONE or readyState == INIT, terminate this overall series of steps without doing anything
* else. </li>
* <li> Set readyState to DONE. </li>
* <li> If there are any tasks from the object's FileSaver task source in one of the task queues, then remove those
* tasks. </li>
* <li> Terminate the write algorithm being processed. </li>
* <li> Set the error attribute to a DOMError object of type "AbortError". </li>
* <li> Fire a progress event called abort </li>
* <li> Fire a progress event called writeend </li>
* <li> Terminate this algorithm. </li>
* </ol>
*/
abort(): void;
}
/**
* @hidden
* This interface expands on the FileSaver interface to allow for multiple write actions, rather than just saving a single Blob.
* This interface expands on the FileSaver interface to allow for multiple write actions, rather than just saving a
* single Blob.
*/
export declare class FileWriter extends FileSaver {
/**
@@ -524,7 +578,8 @@ export declare class FileWriter extends FileSaver {
position: number;
/**
* The length of the file. If the user does not have read access to the file, this must be the highest byte offset at which the user has written.
* The length of the file. If the user does not have read access to the file, this must be the highest byte offset at
* which the user has written.
*/
length: number;
@@ -536,12 +591,14 @@ export declare class FileWriter extends FileSaver {
/**
* Seek sets the file position at which the next write will occur.
* @param offset If nonnegative, an absolute byte offset into the file. If negative, an offset back from the end of the file.
* @param offset If nonnegative, an absolute byte offset into the file. If negative, an offset back from the end of
* the file.
*/
seek(offset: number): void;
/**
* Changes the length of the file to that specified. If shortening the file, data beyond the new length must be discarded. If extending the file, the existing data must be zero-padded up to the new length.
* Changes the length of the file to that specified. If shortening the file, data beyond the new length must be
* discarded. If extending the file, the existing data must be zero-padded up to the new length.
* @param size The size to which the length of the file is to be adjusted, measured in bytes.
*/
truncate(size: number): void;
@@ -555,7 +612,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;
@@ -571,6 +627,8 @@ export declare class FileError {
/** Error code */
code: number;
message: string;
constructor(code: number);
}
/** @hidden */
@@ -592,9 +650,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;
/**
@@ -616,20 +678,22 @@ declare const window: Window;
*
* Example:
* ```
* import { File } from '@ionic-native/file';
* import { File } from '@ionic-native/file/ngx';
*
* constructor(private file: File) { }
*
* ...
*
* this.file.checkDir(this.file.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err => console.log('Directory doesn\'t exist'));
* this.file.checkDir(this.file.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err =>
* console.log('Directory doesn't exist'));
*
* ```
*
* This plugin is based on several specs, including : The HTML5 File API http: //www.w3.org/TR/FileAPI/
* The (now-defunct) Directories and System extensions Latest: http: //www.w3.org/TR/2012/WD-file-system-api-20120417/
* Although most of the plugin code was written when an earlier spec was current: http: //www.w3.org/TR/2011/WD-file-system-api-20110419/
* It also implements the FileWriter spec : http: //dev.w3.org/2009/dap/file-system/file-writer.html
* Although most of the plugin code was written when an earlier spec was current: http:
* //www.w3.org/TR/2011/WD-file-system-api-20110419/ It also implements the FileWriter spec : http:
* //dev.w3.org/2009/dap/file-system/file-writer.html
* @interfaces
* IFile
* Entry
@@ -649,75 +713,63 @@ export class File extends IonicNativePlugin {
/**
* Read-only directory where the application is installed.
*/
@CordovaProperty
applicationDirectory: string;
@CordovaProperty() applicationDirectory: string;
/**
* Read-only directory where the application is installed.
*/
@CordovaProperty
applicationStorageDirectory: string;
@CordovaProperty() applicationStorageDirectory: string;
/**
* Where to put app-specific data files.
*/
@CordovaProperty
dataDirectory: string;
@CordovaProperty() dataDirectory: string;
/**
* Cached files that should survive app restarts.
* Apps should not rely on the OS to delete files in here.
*/
@CordovaProperty
cacheDirectory: string;
@CordovaProperty() cacheDirectory: string;
/**
* Android: the application space on external storage.
*/
@CordovaProperty
externalApplicationStorageDirectory: string;
@CordovaProperty() externalApplicationStorageDirectory: string;
/**
* Android: Where to put app-specific data files on external storage.
*/
@CordovaProperty
externalDataDirectory: string;
@CordovaProperty() externalDataDirectory: string;
/**
* Android: the application cache on external storage.
*/
@CordovaProperty
externalCacheDirectory: string;
@CordovaProperty() externalCacheDirectory: string;
/**
* Android: the external storage (SD card) root.
*/
@CordovaProperty
externalRootDirectory: string;
@CordovaProperty() externalRootDirectory: string;
/**
* iOS: Temp directory that the OS can clear at will.
*/
@CordovaProperty
tempDirectory: string;
@CordovaProperty() tempDirectory: string;
/**
* iOS: Holds app-specific files that should be synced (e.g. to iCloud).
*/
@CordovaProperty
syncedDataDirectory: string;
@CordovaProperty() syncedDataDirectory: string;
/**
* iOS: Files private to the app, but that are meaningful to other applications (e.g. Office files)
*/
@CordovaProperty
documentsDirectory: string;
@CordovaProperty() documentsDirectory: string;
/**
* BlackBerry10: Files globally available to all apps
*/
@CordovaProperty
sharedDirectory: string;
@CordovaProperty() sharedDirectory: string;
cordovaFileError: any = {
1: 'NOT_FOUND_ERR',
@@ -742,8 +794,8 @@ export class File extends IonicNativePlugin {
*/
@CordovaCheck()
getFreeDiskSpace(): Promise<number> {
return new Promise<any>((resolve, reject) => {
cordova.exec(resolve, reject, 'File', 'getFreeDiskSpace', []);
return getPromise<any>((resolve, reject) => {
cordova.exec(resolve as (data: any) => any, reject as (data: any) => any, 'File', 'getFreeDiskSpace', []);
});
}
@@ -752,7 +804,8 @@ export class File extends IonicNativePlugin {
*
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
* @param {string} dir Name of directory to check
* @returns {Promise<boolean>} Returns a Promise that resolves to true if the directory exists or rejects with an error.
* @returns {Promise<boolean>} Returns a Promise that resolves to true if the directory exists or rejects with an
* error.
*/
@CordovaCheck()
checkDir(path: string, dir: string): Promise<boolean> {
@@ -834,7 +887,8 @@ export class File extends IonicNativePlugin {
* @param {string} dirName The source directory name
* @param {string} newPath The destination path to the directory
* @param {string} newDirName The destination directory name
* @returns {Promise<DirectoryEntry|Entry>} Returns a Promise that resolves to the new DirectoryEntry object or rejects with an error.
* @returns {Promise<DirectoryEntry|Entry>} Returns a Promise that resolves to the new DirectoryEntry object or
* rejects with an error.
*/
@CordovaCheck()
moveDir(
@@ -1070,10 +1124,11 @@ export class File extends IonicNativePlugin {
/**
* Write content to FileEntry.
* @hidden
* Write to an existing file.
* @param {FileEntry} fe file entry object
* @param {string | Blob} text content or blob to write
* @param {string | Blob | ArrayBuffer} text 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.
* @returns {Promise<FileEntry>} Returns a Promise that resolves to updated file entry or rejects with an error.
*/
private writeFileEntry(
fe: FileEntry,
@@ -1113,10 +1168,10 @@ export class File extends IonicNativePlugin {
/**
* Read the contents of a file as text.
*
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
* @param {string} file Name of file, relative to path.
* @returns {Promise<string>} Returns a Promise that resolves with the contents of the file as string or rejects with an error.
* @returns {Promise<string>} Returns a Promise that resolves with the contents of the file as string or rejects with
* an error.
*/
@CordovaCheck()
readAsText(path: string, file: string): Promise<string> {
@@ -1130,7 +1185,8 @@ export class File extends IonicNativePlugin {
*
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
* @param {string} file Name of file, relative to path.
* @returns {Promise<string>} Returns a Promise that resolves with the contents of the file as data URL or rejects with an error.
* @returns {Promise<string>} Returns a Promise that resolves with the contents of the file as data URL or rejects
* with an error.
*/
@CordovaCheck()
readAsDataURL(path: string, file: string): Promise<string> {
@@ -1141,7 +1197,8 @@ export class File extends IonicNativePlugin {
* Read file and return data as a binary data.
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
* @param {string} file Name of file, relative to path.
* @returns {Promise<string>} Returns a Promise that resolves with the contents of the file as string rejects with an error.
* @returns {Promise<string>} Returns a Promise that resolves with the contents of the file as string rejects with an
* error.
*/
@CordovaCheck()
readAsBinaryString(path: string, file: string): Promise<string> {
@@ -1152,53 +1209,14 @@ export class File extends IonicNativePlugin {
* Read file and return data as an ArrayBuffer.
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
* @param {string} file Name of file, relative to path.
* @returns {Promise<ArrayBuffer>} Returns a Promise that resolves with the contents of the file as ArrayBuffer or rejects with an error.
* @returns {Promise<ArrayBuffer>} Returns a Promise that resolves with the contents of the file as ArrayBuffer or
* rejects with an error.
*/
@CordovaCheck()
readAsArrayBuffer(path: string, file: string): Promise<ArrayBuffer> {
return this.readFile<ArrayBuffer>(path, file, 'ArrayBuffer');
}
private readFile<T>(
path: string,
file: string,
readAs: 'ArrayBuffer' | 'BinaryString' | 'DataURL' | 'Text'
): Promise<T> {
if (/^\//.test(file)) {
const 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((reader.result as any) as T);
} 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.
*
@@ -1285,7 +1303,7 @@ export class File extends IonicNativePlugin {
*/
@CordovaCheck()
resolveLocalFilesystemUrl(fileUrl: string): Promise<Entry> {
return new Promise<Entry>((resolve, reject) => {
return getPromise<Entry>((resolve, reject) => {
try {
window.resolveLocalFileSystemURL(
fileUrl,
@@ -1381,6 +1399,46 @@ export class File extends IonicNativePlugin {
});
}
private readFile<T>(
path: string,
file: string,
readAs: 'ArrayBuffer' | 'BinaryString' | 'DataURL' | 'Text'
): Promise<T> {
if (/^\//.test(file)) {
const 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 getPromise<T>((resolve, reject) => {
reader.onloadend = () => {
if (reader.result !== undefined || reader.result !== null) {
resolve((reader.result as any) as T);
} 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
*/
@@ -1533,8 +1591,8 @@ export class File extends IonicNativePlugin {
writer.write(chunk);
}
return new Promise<any>((resolve, reject) => {
writer.onerror = reject;
return getPromise<any>((resolve, reject) => {
writer.onerror = reject as (event: ProgressEvent) => void;
writer.onwrite = () => {
if (writtenSize < file.size) {
writeNextChunk();
@@ -36,7 +36,7 @@ export interface FingerprintOptions {
*
* @usage
* ```typescript
* import { FingerprintAIO } from '@ionic-native/fingerprint-aio';
* import { FingerprintAIO } from '@ionic-native/fingerprint-aio/ngx';
*
* constructor(private faio: FingerprintAIO) { }
*
@@ -13,7 +13,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { FirebaseAnalytics } from '@ionic-native/firebase-analytics';
* import { FirebaseAnalytics } from '@ionic-native/firebase-analytics/ngx';
*
*
* constructor(private firebaseAnalytics: FirebaseAnalytics) { }
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
/**
* @name Firebase Authentication
@@ -9,7 +9,7 @@ import { Observable } from 'rxjs/Observable';
*
* @usage
* ```typescript
* import { FirebaseAuthentication } from '@ionic-native/firebase-authentication';
* import { FirebaseAuthentication } from '@ionic-native/firebase-authentication/ngx';
*
*
* constructor(private firebaseAuthentication: FirebaseAuthentication) { }
@@ -9,7 +9,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { FirebaseConfig } from '@ionic-native/firebase-config';
* import { FirebaseConfig } from '@ionic-native/firebase-config/ngx';
*
*
* constructor(private firebaseConfig: FirebaseConfig) { }
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
export interface IDynamicLink {
matchType: 'Weak' | 'Strong';
@@ -32,7 +32,7 @@ export interface IDynamicLink {
* ```
* @usage
* ```typescript
* import { FirebaseDynamicLinks } from '@ionic-native/firebase-dynamic-links';
* import { FirebaseDynamicLinks } from '@ionic-native/firebase-dynamic-links/ngx';
*
*
* constructor(private firebaseDynamicLinks: FirebaseDynamicLinks) { }
@@ -51,21 +51,22 @@ export interface IDynamicLink {
plugin: ' cordova-plugin-firebase-dynamiclinks',
pluginRef: 'cordova.plugins.firebase.dynamiclinks',
repo: 'https://github.com/chemerisuk/cordova-plugin-firebase-dynamiclinks',
install: 'ionic cordova plugin add cordova-plugin-firebase-dynamiclinks --save --variable APP_DOMAIN="example.com" --variable APP_PATH="/"',
install:
'ionic cordova plugin add cordova-plugin-firebase-dynamiclinks --save --variable APP_DOMAIN="example.com" --variable APP_PATH="/"',
installVariables: ['APP_DOMAIN', 'APP_PATH'],
platforms: ['Android', 'iOS']
})
@Injectable()
export class FirebaseDynamicLinks extends IonicNativePlugin {
/**
* Registers callback that is triggered on each dynamic link click.
* @return {Observable<IDynamicLink>} Returns an observable
*/
@Cordova({
callbackOrder: 'reverse',
observable: true,
observable: true
})
onDynamicLink(): Observable<IDynamicLink> { return; }
onDynamicLink(): Observable<IDynamicLink> {
return;
}
}
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
export interface IFirebaseMessage {
aps: any;
@@ -15,7 +15,7 @@ export interface IFirebaseMessage {
*
* @usage
* ```typescript
* import { FirebaseMessaging } from '@ionic-native/firebase-messaging';
* import { FirebaseMessaging } from '@ionic-native/firebase-messaging/ngx';
*
*
* constructor(private firebaseMessaging: FirebaseMessaging) { }
+2 -2
View File
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
/**
* @name Firebase
@@ -9,7 +9,7 @@ import { Observable } from 'rxjs/Observable';
*
* @usage
* ```typescript
* import { Firebase } from '@ionic-native/firebase';
* import { Firebase } from '@ionic-native/firebase/ngx';
*
* constructor(private firebase: Firebase) { }
*
+16 -6
View File
@@ -9,7 +9,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { Flashlight } from '@ionic-native/flashlight';
* import { Flashlight } from '@ionic-native/flashlight/ngx';
*
* constructor(private flashlight: 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;
}
}

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