Merge branch 'master' into v5

This commit is contained in:
Daniel 2018-06-22 18:13:47 +02:00
parent f7afd1f066
commit f3ef2a877d
31 changed files with 815 additions and 117 deletions

143
package-lock.json generated
View File

@ -561,6 +561,23 @@
"dev": true,
"requires": {
"util": "0.10.3"
},
"dependencies": {
"inherits": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
"integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=",
"dev": true
},
"util": {
"version": "0.10.3",
"resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
"integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
"dev": true,
"requires": {
"inherits": "2.0.1"
}
}
}
},
"assert-plus": {
@ -1051,9 +1068,9 @@
}
},
"babel-plugin-transform-es2015-modules-commonjs": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz",
"integrity": "sha1-DYOUApt9xqvhqX7xgeAHWN0uXYo=",
"version": "6.26.2",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz",
"integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==",
"dev": true,
"requires": {
"babel-plugin-transform-strict-mode": "^6.24.1",
@ -1606,9 +1623,9 @@
"dev": true
},
"browser-resolve": {
"version": "1.11.2",
"resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz",
"integrity": "sha1-j/CbCixCFxihBRwmCzLkj0QpOM4=",
"version": "1.11.3",
"resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz",
"integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==",
"dev": true,
"requires": {
"resolve": "1.1.7"
@ -1701,9 +1718,9 @@
}
},
"browserify-cipher": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz",
"integrity": "sha1-mYgkSHS/XtTijalWZtzWasj8Njo=",
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz",
"integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==",
"dev": true,
"requires": {
"browserify-aes": "^1.0.4",
@ -1712,9 +1729,9 @@
}
},
"browserify-des": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz",
"integrity": "sha1-2qJ3cXRwki7S/hhZQRihdUOXId0=",
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.1.tgz",
"integrity": "sha512-zy0Cobe3hhgpiOM32Tj7KQ3Vl91m0njwsjzZQK1L+JDf11dzP9qIvjreVinsvXrgfjhStXwUWAEpB9D7Gwmayw==",
"dev": true,
"requires": {
"cipher-base": "^1.0.1",
@ -2607,9 +2624,9 @@
}
},
"create-ecdh": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz",
"integrity": "sha1-iIxyNZbN92EvZJgjPuvXo1MBc30=",
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz",
"integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==",
"dev": true,
"requires": {
"bn.js": "^4.1.0",
@ -2626,21 +2643,22 @@
}
},
"create-hash": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz",
"integrity": "sha1-YGBCrIuSYnUPSDyt2rD1gZFy2P0=",
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
"integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==",
"dev": true,
"requires": {
"cipher-base": "^1.0.1",
"inherits": "^2.0.1",
"ripemd160": "^2.0.0",
"md5.js": "^1.3.4",
"ripemd160": "^2.0.1",
"sha.js": "^2.4.0"
}
},
"create-hmac": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.6.tgz",
"integrity": "sha1-rLniIaThe9sHbpBlfEK5PjcmzwY=",
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
"integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
"dev": true,
"requires": {
"cipher-base": "^1.0.3",
@ -3181,9 +3199,9 @@
"dev": true
},
"diffie-hellman": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz",
"integrity": "sha1-tYNXOScM/ias9jIJn97SoH8gnl4=",
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
"integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==",
"dev": true,
"requires": {
"bn.js": "^4.1.0",
@ -3346,9 +3364,9 @@
}
},
"electron-to-chromium": {
"version": "1.3.42",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.42.tgz",
"integrity": "sha1-lcM78B0MxAVVauyJn+Yf1NduoPk=",
"version": "1.3.50",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.50.tgz",
"integrity": "sha1-dDi3b5K0G5GfP73TUPvQdX2s3fc=",
"dev": true
},
"elliptic": {
@ -5934,18 +5952,19 @@
}
},
"hash-base": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz",
"integrity": "sha1-ZuodhW206KVHDK32/OI65SRO8uE=",
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz",
"integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=",
"dev": true,
"requires": {
"inherits": "^2.0.1"
"inherits": "^2.0.1",
"safe-buffer": "^5.0.1"
}
},
"hash.js": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz",
"integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==",
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.4.tgz",
"integrity": "sha512-A6RlQvvZEtFS5fLU43IDu0QUmBy+fDO9VMdTXvufKwIkt/rFfvICAViCax5fbDO4zdNzaC3/27ZhKUok5bAJyw==",
"dev": true,
"requires": {
"inherits": "^2.0.3",
@ -8300,9 +8319,9 @@
"dev": true
},
"minimalistic-assert": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz",
"integrity": "sha1-cCvi3aazf0g2vLP121ZkG2Sh09M=",
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
"integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==",
"dev": true
},
"minimalistic-crypto-utils": {
@ -9490,9 +9509,9 @@
}
},
"parse-asn1": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.0.tgz",
"integrity": "sha1-N8T5t+06tlx0gXtfJICTf7+XxxI=",
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz",
"integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==",
"dev": true,
"requires": {
"asn1.js": "^4.0.0",
@ -9660,9 +9679,9 @@
}
},
"pbkdf2": {
"version": "3.0.14",
"resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.14.tgz",
"integrity": "sha512-gjsZW9O34fm0R7PaLHRJmLLVfSoesxztjPjE9o6R+qtVJij90ltg1joIovN9GKrRW3t1PzhDDG3UMEMFfZ+1wA==",
"version": "3.0.16",
"resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.16.tgz",
"integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==",
"dev": true,
"requires": {
"create-hash": "^1.1.2",
@ -9846,9 +9865,9 @@
}
},
"public-encrypt": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz",
"integrity": "sha1-OfaZ86RlYN1eusvKaTyvfGXBjMY=",
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz",
"integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==",
"dev": true,
"requires": {
"bn.js": "^4.1.0",
@ -10161,9 +10180,9 @@
"dev": true
},
"regenerate": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.3.tgz",
"integrity": "sha512-jVpo1GadrDAK59t/0jRx5VxYWQEDkkEKi6+HjE3joFVLfDOh9Xrdh0dF1eSq+BI/SwvTQ44gSscJ8N5zYL61sg==",
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz",
"integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==",
"dev": true
},
"regenerator-runtime": {
@ -10441,12 +10460,12 @@
}
},
"ripemd160": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz",
"integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=",
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz",
"integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==",
"dev": true,
"requires": {
"hash-base": "^2.0.0",
"hash-base": "^3.0.0",
"inherits": "^2.0.1"
}
},
@ -12754,20 +12773,12 @@
"dev": true
},
"util": {
"version": "0.10.3",
"resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
"integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
"version": "0.10.4",
"resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
"integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
"dev": true,
"requires": {
"inherits": "2.0.1"
},
"dependencies": {
"inherits": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
"integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=",
"dev": true
}
"inherits": "2.0.3"
}
},
"util-deprecate": {

View File

@ -159,25 +159,47 @@ export interface AFADeleteOptions {
})
@Injectable()
export class AndroidFingerprintAuth extends IonicNativePlugin {
/**
* Convenience property containing all possible errors
*/
ERRORS: {
BAD_PADDING_EXCEPTION: 'BAD_PADDING_EXCEPTION';
CERTIFICATE_EXCEPTION: 'CERTIFICATE_EXCEPTION';
FINGERPRINT_CANCELLED: 'FINGERPRINT_CANCELLED';
FINGERPRINT_DATA_NOT_DELETED: 'FINGERPRINT_DATA_NOT_DELETED';
FINGERPRINT_ERROR: 'FINGERPRINT_ERROR';
FINGERPRINT_NOT_AVAILABLE: 'FINGERPRINT_NOT_AVAILABLE';
FINGERPRINT_PERMISSION_DENIED: 'FINGERPRINT_PERMISSION_DENIED';
FINGERPRINT_PERMISSION_DENIED_SHOW_REQUEST: 'FINGERPRINT_PERMISSION_DENIED_SHOW_REQUEST';
ILLEGAL_BLOCK_SIZE_EXCEPTION: 'ILLEGAL_BLOCK_SIZE_EXCEPTION';
INIT_CIPHER_FAILED: 'INIT_CIPHER_FAILED';
INVALID_ALGORITHM_PARAMETER_EXCEPTION: 'INVALID_ALGORITHM_PARAMETER_EXCEPTION';
IO_EXCEPTION: 'IO_EXCEPTION';
JSON_EXCEPTION: 'JSON_EXCEPTION';
MINIMUM_SDK: 'MINIMUM_SDK';
MISSING_ACTION_PARAMETERS: 'MISSING_ACTION_PARAMETERS';
MISSING_PARAMETERS: 'MISSING_PARAMETERS';
NO_SUCH_ALGORITHM_EXCEPTION: 'NO_SUCH_ALGORITHM_EXCEPTION';
SECURITY_EXCEPTION: 'SECURITY_EXCEPTION';
BAD_PADDING_EXCEPTION: string;
CERTIFICATE_EXCEPTION: string;
FINGERPRINT_CANCELLED: string;
FINGERPRINT_DATA_NOT_DELETED: string;
FINGERPRINT_ERROR: string;
FINGERPRINT_NOT_AVAILABLE: string;
FINGERPRINT_PERMISSION_DENIED: string;
FINGERPRINT_PERMISSION_DENIED_SHOW_REQUEST: string;
ILLEGAL_BLOCK_SIZE_EXCEPTION: string;
INIT_CIPHER_FAILED: string;
INVALID_ALGORITHM_PARAMETER_EXCEPTION: string;
IO_EXCEPTION: string;
JSON_EXCEPTION: string;
MINIMUM_SDK: string;
MISSING_ACTION_PARAMETERS: string;
MISSING_PARAMETERS: string;
NO_SUCH_ALGORITHM_EXCEPTION: string;
SECURITY_EXCEPTION: string;
} = {
BAD_PADDING_EXCEPTION: 'BAD_PADDING_EXCEPTION',
CERTIFICATE_EXCEPTION: 'CERTIFICATE_EXCEPTION',
FINGERPRINT_CANCELLED: 'FINGERPRINT_CANCELLED',
FINGERPRINT_DATA_NOT_DELETED: 'FINGERPRINT_DATA_NOT_DELETED',
FINGERPRINT_ERROR: 'FINGERPRINT_ERROR',
FINGERPRINT_NOT_AVAILABLE: 'FINGERPRINT_NOT_AVAILABLE',
FINGERPRINT_PERMISSION_DENIED: 'FINGERPRINT_PERMISSION_DENIED',
FINGERPRINT_PERMISSION_DENIED_SHOW_REQUEST: 'FINGERPRINT_PERMISSION_DENIED_SHOW_REQUEST',
ILLEGAL_BLOCK_SIZE_EXCEPTION: 'ILLEGAL_BLOCK_SIZE_EXCEPTION',
INIT_CIPHER_FAILED: 'INIT_CIPHER_FAILED',
INVALID_ALGORITHM_PARAMETER_EXCEPTION: 'INVALID_ALGORITHM_PARAMETER_EXCEPTION',
IO_EXCEPTION: 'IO_EXCEPTION',
JSON_EXCEPTION: 'JSON_EXCEPTION',
MINIMUM_SDK: 'MINIMUM_SDK',
MISSING_ACTION_PARAMETERS: 'MISSING_ACTION_PARAMETERS',
MISSING_PARAMETERS: 'MISSING_PARAMETERS',
NO_SUCH_ALGORITHM_EXCEPTION: 'NO_SUCH_ALGORITHM_EXCEPTION',
SECURITY_EXCEPTION: 'SECURITY_EXCEPTION'
};
/**

View File

@ -1,6 +1,8 @@
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs';
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
/**
* @name Appodeal

View File

@ -476,14 +476,13 @@ export class BackgroundGeolocation extends IonicNativePlugin {
* Method can be used to detect user changes in location services settings.
* If user enable or disable location services then success callback will be executed.
* In case or error (SettingNotFoundException) fail callback will be executed.
* @returns {Promise<boolean>}
* @returns {Observable<number>}
*/
@Cordova({
platforms: ['Android']
platforms: ['Android'],
observable: true
})
watchLocationMode(): Promise<boolean> {
return;
}
watchLocationMode(): Observable<number> { return; }
/**
* Stop watching for location mode changes.

View File

@ -289,6 +289,71 @@ export class BLE extends IonicNativePlugin {
return;
}
/**
* Establish an automatic connection to a peripheral.
* @usage
* ```
* BLE.autoConnect('12:34:56:78:9A:BC').subscribe(peripheralData => {
* console.log(peripheralData);
* },
* peripheralData => {
* console.log('disconnected');
* });
* ```
* @param {string} deviceId UUID or MAC address of the peripheral
* @return {Observable<any>} Returns an Observable that notifies of connect/disconnect.
*/
@Cordova({
observable: true,
clearFunction: 'disconnect',
clearWithArgs: true
})
autoConnect(deviceId: string): Observable<any> {
return;
}
/**
* Request MTU size.
* May be used to fix the Error 14 "Unlikely" on write requests with more than 20 bytes.
* @usage
* ```
* BLE.requestMtu('12:34:56:78:9A:BC', 512).then(() => {
* console.log('MTU Size Accepted');
* }, error => {
* console.log('MTU Size Failed');
* });
* ```
* @param {string} deviceId UUID or MAC address of the peripheral
* @param {number} mtuSize The new MTU size. (23 - 517, default is usually 23. Max recommended: 512)
* @return {Promise<any>} Returns a Promise.
*/
@Cordova()
requestMtu(deviceId: string, mtuSize: number): Promise<any> {
return;
}
/**
* Refresh Device Cache
* This method may fix a issue of old cached services and characteristics.
* NOTE Since this uses an undocumented API it's not guaranteed to work.
* If you choose a too low delay time (timeoutMillis) the method could fail.
* @usage
* ```
* BLE.refreshDeviceCache('12:34:56:78:9A:BC', 10000).then(discoveredServices => {
* console.log('The new discovered services after the clean: ', discoveredServices);
* }, error => {
* console.log('Refresh device cache failed.');
* });
* ```
* @param {string} deviceId UUID or MAC address of the peripheral
* @param {number} timeoutMillis Delay in milliseconds after refresh before discovering services.
* @return {Promise<any>} Returns a Promise.
*/
@Cordova()
refreshDeviceCache(deviceId: string, timeoutMillis: number): Promise<any> {
return;
}
/**
* Disconnect from a peripheral.
* @usage

View File

@ -129,6 +129,12 @@ export interface CardIOResponse {
* @name Card IO
* @description
* @usage
* This plug-in exposes card.io credit card scanning.
*
* **NOTE**: If you would like to actually process a credit card charge, you might be interested in the [PayPal Cordova Plug-in](https://github.com/paypal/PayPal-Cordova-Plugin).
*
* Requires Cordova plugin: `card.io.cordova.mobilesdk`. For more info, please see the [Card IO plugin docs](https://github.com/card-io/card.io-Cordova-Plugin).
*
* Note: For use with iOS 10 + When building your app with the iOS 10 SDK +, you have to add some info to the info.plist file. This is due to increased security in iOS 10. Go to your app directory and search for the <your app name>Info.plist file. Add the following lines in the main <dict> element.
* ```xml
* <key>NSCameraUsageDescription</key>
@ -150,8 +156,8 @@ export interface CardIOResponse {
* requireExpiry: true,
* requireCVV: false,
* requirePostalCode: false
* }
* CardIO.scan(options);
* };
* this.cardIO.scan(options);
* }
* }
* );

View File

@ -63,7 +63,6 @@ export class Clipboard extends IonicNativePlugin {
* @returns {Promise<any>} Returns a promise after the text has been cleaned
*/
@Cordova()
clear(): Promise<any> {
return;
}
clear(): Promise<any> { return; }
}

View File

@ -0,0 +1,91 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Cloud Settings
* @description
* Stores app settings in cloud storage so if the user re-installs the app or installs it on a different device, the settings will be restored and available in the new installation.
*
* @usage
* ```typescript
* import { CloudSettings } from '@ionic-native/cloud-settings';
*
*
* constructor(private cloudSettings: CloudSettings) { }
*
* ...
*
* this.cloudSettings.exists()
* .then((exists: boolean) => console.log("Saved settings exist: " + exists) )
*
* this.cloudSettings.load()
* .then((settings: any) => this.settings = settings)
* .catch((error: any) => console.error(error));
*
* this.cloudSettings.save(this.settings)
* .then((savedSettings: any) => console.log("Saved settings: " + JSON.stringify(savedSettings)))
* .catch((error: any) => console.error(error));
*
* ```
*/
@Plugin({
pluginName: 'CloudSettings',
plugin: 'cordova-plugin-cloud-settings',
pluginRef: 'cordova.plugin.cloudsettings',
repo: 'https://github.com/dpa99c/cordova-plugin-cloud-settings',
install:
'ionic cordova plugin add cordova-plugin-cloud-settings --variable ANDROID_BACKUP_SERVICE_KEY=myapikey',
installVariables: ['ANDROID_BACKUP_SERVICE_KEY'],
platforms: ['Android', 'iOS']
})
@Injectable()
export class CloudSettings extends IonicNativePlugin {
/**
* Indicates if any stored cloud settings currently exist for the current user.
* @return {Promise<boolean>} Will be passed a boolean flag which indicates whether an store settings exist for the user.
*/
@Cordova()
exists(): Promise<boolean> {
return;
}
/**
* Saves the settings to cloud backup.
* @param {object} settings - a JSON structure representing the user settings to save to cloud backup.
* @param {boolean} [overwrite] - (optional) if true, existing settings will be replaced rather than updated. Defaults to false.
* If false, existing settings will be merged with the new settings passed to this function.
* @return {Promise<any>} Will be passed a single object argument which contains the saved settings as a JSON object.
*/
@Cordova({
successIndex: 1,
errorIndex: 2
})
save(settings: any, overwrite?: boolean): Promise<any> {
return;
}
/**
* Loads the current settings.
* @return {Promise<any>} Will be passed a single object argument which contains the saved settings as a JSON object.
*/
@Cordova()
load(): Promise<any> {
return;
}
/**
* Registers a function which will be called if/when settings on the device have been updated from the cloud.
* @param {Function} handler - callback function to invoke when device settings have been updated from the cloud.
*/
@Cordova({ sync: true })
onRestore(handler: Function): void {}
/**
* Outputs verbose log messages from the native plugin components to the JS console.
* @return {Promise<void>}
*/
@Cordova()
enableDebug(): Promise<void> {
return;
}
}

View File

@ -0,0 +1,93 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @beta
* @name Firebase Config
* @description
* Cordova plugin for Firebase Config
*
* @usage
* ```typescript
* import { FirebaseConfig } from '@ionic-native/firebase-config';
*
*
* constructor(private firebaseConfig: FirebaseConfig) { }
*
* ...
*
*
* this.firebaseConfig.getBoolean('my_key')
* .then((res: any) => console.log(res))
* .catch((error: any) => console.error(error));
*
* ```
*/
@Plugin({
pluginName: 'FirebaseConfig',
plugin: 'cordova-plugin-firebase-config',
pluginRef: 'cordova.plugins.firebase.config',
repo: 'https://github.com/chemerisuk/cordova-plugin-firebase-config',
platforms: ['Android', 'iOS']
})
@Injectable()
export class FirebaseConfig extends IonicNativePlugin {
/**
* Fetches remote config values with appropriate TTL and then activates them.
*
* @param {number} ttlSeconds
* @returns {Promise<null>}
*/
@Cordova({ sync: true })
update(ttlSeconds: number): Promise<null> {
return;
}
/**
* Fetches a boolean configuration value from RemoteConfig
*
* @param {string} key
* @param {string} [namespace]
* @returns {Promise<boolean>}
*/
@Cordova({ sync: true })
getBoolean(key: string, namespace?: string): Promise<boolean> {
return;
}
/**
* Fetches a string configuration value from RemoteConfig
*
* @param {string} key
* @param {string} [namespace]
* @returns {Promise<boolean>}
*/
@Cordova({ sync: true })
getString(key: string, namespace?: string): Promise<string> {
return;
}
/**
* Fetches a numeric configuration value from RemoteConfig
*
* @param {string} key
* @param {string} [namespace]
* @returns {Promise<boolean>}
*/
@Cordova({ sync: true })
getNumber(key: string, namespace?: string): Promise<number> {
return;
}
/**
* Fetches an array of bytes configuration value from RemoteConfig
*
* @param {string} key
* @param {string} [namespace]
* @returns {Promise<boolean>}
*/
@Cordova({ sync: true })
getBytes(key: string, namespace?: string): Promise<any[]> {
return;
}
}

View File

@ -23,10 +23,10 @@ export interface IDynamicLink {
*
* config.xml:
* ```xml
* <platform name="android">
* <platform name="ios">
* <preference name="GoogleIOSClientId" value="..." />
* </platform>
* <platform name="ios">
* <platform name="android">
* <preference name="GoogleAndroidClientId" value="..." />
* </platform>
* ```

View File

@ -0,0 +1,136 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
export interface IFirebaseMessage {
aps: any;
gcm: any;
}
/**
* @beta
* @name Firebase Messaging
* @description
* Cordova plugin for Firebase Messaging
*
* @usage
* ```typescript
* import { FirebaseMessaging } from '@ionic-native/firebase-messaging';
*
*
* constructor(private firebaseMessaging: FirebaseMessaging) { }
*
* ...
*
*
* this.firebaseMessaging.logEvent('page_view', {page: "dashboard"})
* .then((res: any) => console.log(res))
* .catch((error: any) => console.error(error));
*
* ```
* @interfaces
* IFirebaseMessage
*/
@Plugin({
pluginName: 'FirebaseMessaging',
plugin: 'cordova-plugin-firebase-messaging',
pluginRef: 'cordova.plugins.firebase.messaging',
repo: 'https://github.com/chemerisuk/cordova-plugin-firebase-messaging',
platforms: ['Android', 'iOS']
})
@Injectable()
export class FirebaseMessaging extends IonicNativePlugin {
/**
* Called when a push message received while app is in foreground.
*
* @returns {Observable<any>}
*/
@Cordova({ observable: true, callbackOrder: 'reverse' })
onMessage(): Observable<any> {
return;
}
/**
* Called when a push message received while app is in background.
*
* @returns {Observable<any>}
*/
@Cordova({ observable: true, callbackOrder: 'reverse' })
onBackgroundMessage(): Observable<any> {
return;
}
/**
* Grant permission to recieve push notifications (will trigger prompt on iOS).
*
* @returns {Promise<string>}
*/
@Cordova({ sync: true })
requestPermission(): Promise<string> {
return;
}
/**
* Returns a promise that fulfills with the current FCM token
*
* @returns {Promise<string>}
*/
@Cordova({ sync: true })
getToken(): Promise<string> {
return;
}
/**
* Triggers every time when FCM token updated.
* You should usually call getToken to get an updated token and send it to server.
*
* @returns {Observable<void>}
*/
@Cordova({ observable: true, callbackOrder: 'reverse' })
onTokenRefresh(): Observable<void> {
return;
}
/**
* Subscribe to topic in background.
*
* @param {string} topic
* @returns {Promise<null>}
*/
@Cordova({ sync: true })
subscribe(topic: string): Promise<null> {
return;
}
/**
* Unsubscribe from topic in background.
*
* @param {string} topic
* @returns {Promise<null>}
*/
@Cordova({ sync: true })
unsubscribe(topic: string): Promise<null> {
return;
}
/**
* Reads current badge number (if supported).
*
* @returns {Promise<number>}
*/
@Cordova({ sync: true })
getBadge(): Promise<number> {
return;
}
/**
* Sets current badge number (if supported).
*
* @param {number} value
* @returns {Promise<null>}
*/
@Cordova({ sync: true })
setBadge(value: number): Promise<null> {
return;
}
}

View File

@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs';
import { Observable } from 'rxjs/Observable';
/**
* @name FTP

View File

@ -0,0 +1,85 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
/**
* @name hce
* @description
* HCE Cordova Wrapper
*
* @usage
* ```typescript
* import { hce } from '@ionic-native/hce';
*
*
* constructor(private hce: hce) { }
*
* ...
*
* function onCommand(command){
* var commandAsBytes = new Uint8Array(command);
* var commandAsString = hce.util.byteArrayToHexString(commandAsBytes);
*
* // do something with the command
*
* // send the response
* hce.sendReponse(commandResponse);
* }
* this.hce.registerCommandCallback().then(onCommand);
*
* ```
*/
@Plugin({
pluginName: 'hce',
plugin: 'cordova-plugin-hce',
pluginRef: 'hce',
repo: 'https://github.com/don/cordova-plugin-hce',
install: '',
installVariables: ['AID_FILTER'],
platforms: ['Android']
})
@Injectable()
export class HCE extends IonicNativePlugin {
/**
* Registers command receiver.
* @param onCommand {HCECommandEvent} The event handler.
* @param fail {Function} Error event handler.
*
*/
@Cordova()
registerCommandCallback(onCommand: HCECommandEvent, fail?: Function): void {
return; // We add return; here to avoid any IDE / Compiler errors
}
/**
* Registers Deactivated receiver.
* @param ok {HCEDeactivatedEvent} Success event handler.
* @param fail {Function} Error event handler.
*
*/
@Cordova()
registerDeactivatedCallback(ok: HCEDeactivatedEvent, fail?: Function): void {
return; // We add return; here to avoid any IDE / Compiler errors
}
/**
* Sends response APDU.
* @param response {Uint8Array} Response
* @param success {string} Success Callback.
* @param success {string} Failure Callback.
*
*/
@Cordova()
sendResponse(
response: Uint8Array,
success?: Function,
failure?: Function
): void {
return; // We add return; here to avoid any IDE / Compiler errors
}
}
export interface HCECommandEvent {
(command: Uint8Array): void;
}
export interface HCEDeactivatedEvent {
(command: number): void;
}

View File

@ -76,6 +76,12 @@ export interface HealthQueryOptionsAggregated {
* supported values are: 'hour', 'day', 'week', 'month', 'year'.
*/
bucket: string;
/**
* In Android, it is possible to query for "raw" steps or to select those as filtered by the Google Fit app.
* In the latter case the query object must contain the field filtered: true.
*/
filtered?: boolean;
}
/**

View File

@ -106,6 +106,10 @@ export interface HotspotDevice {
* @beta
* @name Hotspot
* @description
* A Cordova plugin for managing Hotspot networks on Android.
*
* Requires Cordova plugin: `cordova-plugin-hotspot`. For more info, please see the [Hotspot plugin docs](https://github.com/hypery2k/cordova-hotspot-plugin).
*
* @usage
* ```typescript
* import { Hotspot, HotspotNetwork } from '@ionic-native/hotspot';

View File

@ -46,7 +46,7 @@ import { Injectable } from '@angular/core';
* alert('Store Error ' + JSON.stringify(err));
* });
*
* this.store.ready().then((status) => {
* this.store.ready(() => {
* console.log(JSON.stringify(this.store.get(productId)));
* console.log('Store is Ready: ' + JSON.stringify(status));
* console.log('Products: ' + JSON.stringify(this.store.products));
@ -427,14 +427,8 @@ export class InAppPurchase2 extends IonicNativePlugin {
return;
}
/**
*
* @return {Promise<any>} returns a promise that resolves when the store is ready
*/
@Cordova()
ready(): Promise<void> {
return;
}
ready(callback: Function): void { return; }
@Cordova({ sync: true })
refresh(): void {

View File

@ -5,6 +5,10 @@ import { Observable } from 'rxjs';
/**
* @name Keyboard
* @description
* Keyboard plugin for Cordova.
*
* Requires Cordova plugin: `ionic-plugin-keyboard`. For more info, please see the [Keyboard plugin docs](https://github.com/ionic-team/ionic-plugin-keyboard).
*
* @usage
* ```typescript
* import { Keyboard } from '@ionic-native/keyboard';

View File

@ -124,7 +124,7 @@ export interface ILocalNotificationAction {
/**
* Specifies whether the action causes the app to launch in the foreground
*/
launch?: boolean;
foreground?: boolean;
/**
* If the value is 'decline' the action is displayed with special highlighting to indicate that it performs a destructive task

View File

@ -123,6 +123,10 @@ export interface ConfigurationData {
/**
* @name Media Capture
* @description
* This plugin provides access to the device's audio, image, and video capture capabilities.
*
* Requires Cordova plugin: `cordova-plugin-media-capture`. For more info, please see the [Media Capture plugin docs](https://github.com/apache/cordova-plugin-media-capture).
*
* @usage
* ```typescript
* import { MediaCapture, MediaFile, CaptureError, CaptureImageOptions } from '@ionic-native/media-capture';

View File

@ -6,7 +6,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
* @beta
* @name Navigation Bar
* @description
* The NavigationBar plugin can you to hide and auto hide the android navigation bar.
* The NavigationBar plugin allows you to hide and auto hide the android navigation bar.
*
* @usage
* ```typescript

View File

@ -6,11 +6,11 @@ export interface OSNotification {
/**
* Was app in focus.
*/
isAppInFocus: boolean;
isAppInFocus?: boolean;
/**
* Was notification shown to the user. Will be false for silent notifications.
*/
shown: boolean;
shown?: boolean;
/**
* **ANDROID** - Android Notification assigned to the notification. Can be used to cancel or replace the notification.
*/
@ -18,17 +18,17 @@ export interface OSNotification {
/**
* Payload received from OneSignal.
*/
payload: OSNotificationPayload;
payload?: OSNotificationPayload;
/**
* How the notification was displayed to the user. Can be set to `Notification`, `InAppAlert`, or `None` if it was not displayed.
*/
displayType: OSDisplayType;
displayType?: OSDisplayType;
/**
* **ANDROID** - Notification is a summary notification for a group this will contain all notification payloads it was created from.
*/
groupedNotifications?: OSNotificationPayload[];
app_id?: string;
contents: any;
contents?: any;
headings?: any;
isIos?: boolean;
isAndroid?: boolean;
@ -60,6 +60,7 @@ export interface OSNotification {
wp_wns_sound?: string;
data?: any;
buttons?: any;
collapse_id?: string;
small_icon?: string;
large_icon?: string;
big_picture?: string;
@ -229,9 +230,13 @@ export interface OSPermissionState {
*/
hasPrompted: boolean;
/**
* Permissions Status
* Permissions Status (iOS Only)
*/
status: any;
/**
* Permissions State (Android Only)
*/
state: any;
}
/**

View File

@ -263,6 +263,7 @@ export interface GetLibraryOptions {
chunkTimeSec?: number;
useOriginalFileNames?: boolean;
includeAlbumData?: boolean;
maxItems?: number;
}
/**

View File

@ -5,6 +5,9 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Pin Dialog
* @description
* PhoneGap numeric password dialog plugin for Android and iOS.
*
* Requires Cordova plugin: `cordova-plugin-pin-dialog`. For more info, please see the [Pin Dialog plugin docs](https://github.com/Paldom/PinDialog).
*
* @usage
* ```typescript

View File

@ -61,6 +61,9 @@ export interface QRScannerStatus {
/**
* @name QR Scanner
* @description
* A fast, energy efficient, highly-configurable QR code scanner for Cordova apps.
*
* Requires Cordova plugin: `cordova-plugin-qrscanner`. For more info, please see the [QR Scanner plugin docs](https://github.com/bitpay/cordova-plugin-qrscanner).
*
* @usage
* ```typescript

View File

@ -18,6 +18,10 @@ export interface SafariViewControllerOptions {
/**
* @name Safari View Controller
* @description
* For displaying read-only web content.
*
* Requires Cordova plugin: `cordova-plugin-safariviewcontroller`. For more info, please see the [Safari View Controller plugin docs](https://github.com/EddyVerbruggen/cordova-plugin-safariviewcontroller).
*
* @usage
* ```typescript
* import { SafariViewController } from '@ionic-native/safari-view-controller';

View File

@ -0,0 +1,143 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface SiriShortcut {
persistentIdentifier: string;
title: string;
userInfo: { [key: string]: string; };
suggestedInvocationPhrase: string;
}
export interface SiriShortcutOptions extends SiriShortcut {
isEligibleForSearch?: boolean;
isEligibleForPrediction?: boolean;
}
/**
* @beta
* @name Siri Shortcuts
* @description
* This plugin only works when your app is built with XCode 10 Beta. Shortcuts will only appear on iOS-versions >= 12.0
*
* This plugin enables the use of Siri shortcuts in Cordova. Siri Shortcuts enable the user to perform certain actions by adding them to Siri.
* After you have donated a shortcut to Siri, it will appear in the settings menu, after which the user is able to add the action. You can check
* whether the user launched your app through a shortcut by calling `getActivatedShortcut()` when the app is resumed. It will return `null`
* if it has not been launched by Siri, and if it did, it will return an object with `SiriShortcut` properties.
*
* @usage
* ```typescript
* import { SiriShortcuts } from '@ionic-native/siri-shortcuts';
*
*
* constructor(private siriShortcuts: SiriShortcuts) { }
*
* ...
*
*
* this.siriShortcuts.donate({
* persistentIdentifier: 'open-my-app',
* title: 'Open my app',
* suggestedInvocationPhrase: 'Open my app',
* userInfo: { username: 'username' },
* isEligibleForSearch: true,
* isEligibleForPrediction: true,
* })
* .then(() => console.log('Shortcut donated.'))
* .catch((error: any) => console.error(error));
*
* this.siriShortcuts.present({
* persistentIdentifier: 'open-my-app',
* title: 'Open my app',
* suggestedInvocationPhrase: 'Open my app',
* userInfo: { username: 'username' },
* })
* .then(() => console.log('Shortcut added.'))
* .catch((error: any) => console.error(error));
*
* this.siriShortcuts.remove('open-my-app')
* .then(() => console.log('Shortcut removed.'))
* .catch((error: any) => console.error(error));
*
* this.siriShortcuts.removeAll()
* .then(() => console.log('All shortcuts removed removed.'))
* .catch((error: any) => console.error(error));
*
* this.siriShortcuts.getActivatedShortcut()
* .then((data: SiriShortcut|null) => console.log(data))
* .catch((error: any) => console.error(error));
*
* ```
*
* @interfaces
* SiriShortcut
* SiriShortcutOptions
*/
@Plugin({
pluginName: 'SiriShortcuts',
plugin: 'cordova-plugin-siri-shortcuts',
pluginRef: 'cordova.plugins.SiriShortcuts',
repo: 'https://github.com/bartwesselink/cordova-plugin-siri-shortcuts',
platforms: ['iOS']
})
@Injectable()
export class SiriShortcuts extends IonicNativePlugin {
/**
* Donate shortcut to Siri
* @param {SiriShortcutOptions} options Options to specify for the donation
* @param {string} options.persistentIdentifier Specify an identifier to uniquely identify the shortcut, in order to be able to remove it
* @param {string} options.title Specify a title for the shortcut, which is visible to the user as the name of the shortcut
* @param {string} options.suggestedInvocationPhrase Specify the phrase to give the user some inspiration on what the shortcut to call
* @param {object} options.userInfo Provide a key-value object that contains information about the shortcut, this will be returned in the getActivatedShortcut method. It is not possible to use the persistentIdentifier key, it is used internally
* @param {boolean} options.isEligibleForSearch This value defaults to true, set this value to make it searchable in Siri
* @param {boolean} options.isEligibleForPrediction This value defaults to true, set this value to set whether the shortcut eligible for prediction
* @return Promise<void>
*/
@Cordova()
donate(options: SiriShortcutOptions): Promise<void> {
return;
}
/**
* Present shortcut to the user, will popup a view controller asking the user to add it to Siri
* @param {SiriShortcutOptions} options Options to specify for the donation
* @param {string} options.persistentIdentifier Specify an identifier to uniquely identify the shortcut, in order to be able to remove it
* @param {string} options.title Specify a title for the shortcut, which is visible to the user as the name of the shortcut
* @param {string} options.suggestedInvocationPhrase Specify the phrase to give the user some inspiration on what the shortcut to call
* @param {object} options.userInfo Provide a key-value object that contains information about the shortcut, this will be returned in the getActivatedShortcut method. It is not possible to use the persistentIdentifier key, it is used internally
* @param {boolean} options.isEligibleForSearch This value defaults to true, set this value to make it searchable in Siri
* @param {boolean} options.isEligibleForPrediction This value defaults to true, set this value to set whether the shortcut eligible for prediction
* @return Promise<void>
*/
@Cordova()
present(options: SiriShortcutOptions): Promise<void> {
return;
}
/**
* Remove shortcuts based on identifiers
* @param {string|string[]} persistentIdentifiers Specify which shortcut(s) to delete by their persistent identifiers
* @return Promise<void>
*/
@Cordova()
remove(persistentIdentifiers: string|string[]): Promise<void> {
return;
}
/**
* Remove all shortcuts from the application
* @return Promise<void>
*/
@Cordova()
removeAll(): Promise<void> {
return;
}
/**
* Get the current clicked user activity, and return `null` if none
* @return Promise<SiriShortcut|null>
*/
@Cordova()
getActivatedShortcut(): Promise<SiriShortcut|null> {
return;
}
}

View File

@ -26,6 +26,10 @@ export interface SpinnerDialogIOSOptions {
/**
* @name Spinner Dialog
* @description
* Cordova plugin for showing a native spinner based on Paldom/SpinnerDialog.
*
* Requires Cordova plugin: `cordova-plugin-native-spinner`. For more info, please see the [Spinner Dialog plugin docs](https://github.com/greybax/cordova-plugin-native-spinner).
*
* @usage
* ```typescript
* import { SpinnerDialog } from '@ionic-native/spinner-dialog';

View File

@ -45,7 +45,7 @@ export interface StripeCardTokenParams {
/**
* Postal code / ZIP Code
*/
postal_code?: string;
postalCode?: string;
/**
* 3-letter ISO code for currency
*/

View File

@ -53,9 +53,9 @@ export interface ThemeableBrowserOptions {
// inAppBrowser options
location?: string;
hidden?: string;
clearcache?: string;
clearsessioncache?: string;
hidden?: boolean;
clearcache?: boolean;
clearsessioncache?: boolean;
zoom?: string;
hardwareback?: string;
mediaPlaybackRequiresUserAction?: string;

View File

@ -59,6 +59,10 @@ export interface ThreeDeeTouchForceTouch {
/**
* @name 3D Touch
* @description
* The 3D Touch plugin adds 3D Touch capabilities to your Cordova app.
*
* Requires Cordova plugin: `cordova-plugin-3dtouch`. For more info, please see the [3D Touch plugin docs](https://github.com/EddyVerbruggen/cordova-plugin-3dtouch).
*
* @usage
* Please do refer to the original plugin's repo for detailed usage. The usage example here might not be sufficient.
* ```typescript

View File

@ -228,4 +228,14 @@ export class WebIntent extends IonicNativePlugin {
getIntent(): Promise<any> {
return;
}
/**
* Send a result back to the Intent that started this Activity.
* The data can be passed using 'extras'.
* @returns {Promise<any>}
*/
@Cordova()
sendResult({ extras: {}}): Promise<any> {
return;
}
}