mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-07-16 00:00:04 +08:00
Compare commits
42
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bdd1755f8b | ||
|
|
3ed39c06ed | ||
|
|
89a5ca7ec5 | ||
|
|
0422521db6 | ||
|
|
8d57df3e64 | ||
|
|
fbf7463724 | ||
|
|
cbeb4139d9 | ||
|
|
457d47cc16 | ||
|
|
358474dcfd | ||
|
|
d6d9b54991 | ||
|
|
93ff513bd8 | ||
|
|
d3af51915e | ||
|
|
276c88dea1 | ||
|
|
653f5a2969 | ||
|
|
e661f2ece9 | ||
|
|
15cd285ec6 | ||
|
|
95b92623a6 | ||
|
|
7aa5e00453 | ||
|
|
59fd0cc50d | ||
|
|
c433317051 | ||
|
|
f223ed4fa1 | ||
|
|
7160953683 | ||
|
|
4c55212b8d | ||
|
|
38a1dd1187 | ||
|
|
7cff234c26 | ||
|
|
039c6d40af | ||
|
|
46b1a7385c | ||
|
|
737ad518c8 | ||
|
|
89ed51cc49 | ||
|
|
26a8df9b7c | ||
|
|
84db491ead | ||
|
|
d5011fb105 | ||
|
|
c9d41ebd8a | ||
|
|
60a7190eda | ||
|
|
261106131e | ||
|
|
4803912350 | ||
|
|
9feefe8454 | ||
|
|
81df665189 | ||
|
|
f2c8edecc4 | ||
|
|
6c18a8bc4f | ||
|
|
ca7f872a3c | ||
|
|
2c04ae5985 |
@@ -1,3 +1,43 @@
|
||||
<a name="5.0.0-beta.21"></a>
|
||||
# [5.0.0-beta.21](https://github.com/ionic-team/ionic-native/compare/v5.0.0-beta.20...v5.0.0-beta.21) (2018-09-25)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **admob-free:** fix duplicated class ([95b9262](https://github.com/ionic-team/ionic-native/commit/95b9262))
|
||||
* **bluetooth-le:** Removed a wrong cordova decorator param ([#2733](https://github.com/ionic-team/ionic-native/issues/2733)) ([cbeb413](https://github.com/ionic-team/ionic-native/commit/cbeb413))
|
||||
* **build:** fix macos mojave build errors ([358474d](https://github.com/ionic-team/ionic-native/commit/358474d))
|
||||
* **keyboard:** include the mode parameter in setResizeMode() ([8d57df3](https://github.com/ionic-team/ionic-native/commit/8d57df3))
|
||||
* **keyboard:** use cordova-plugin-ionic-keyboard ([#2743](https://github.com/ionic-team/ionic-native/issues/2743)) ([fbf7463](https://github.com/ionic-team/ionic-native/commit/fbf7463)), closes [#2306](https://github.com/ionic-team/ionic-native/issues/2306)
|
||||
* **printer:** import getPromise ([15cd285](https://github.com/ionic-team/ionic-native/commit/15cd285))
|
||||
* **screenshot:** import getPromise ([e661f2e](https://github.com/ionic-team/ionic-native/commit/e661f2e))
|
||||
* **secure-storage:** add missing "getPromise" import ([#2727](https://github.com/ionic-team/ionic-native/issues/2727)) ([457d47c](https://github.com/ionic-team/ionic-native/commit/457d47c))
|
||||
* **secure-storage:** import getPromise ([653f5a2](https://github.com/ionic-team/ionic-native/commit/653f5a2))
|
||||
|
||||
|
||||
|
||||
<a name="5.0.0-beta.20"></a>
|
||||
# [5.0.0-beta.20](https://github.com/ionic-team/ionic-native/compare/v5.0.0-beta.19...v5.0.0-beta.20) (2018-09-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **build:** Fix TypeScript bug, wrong type exported for wrap fn ([c433317](https://github.com/ionic-team/ionic-native/commit/c433317))
|
||||
|
||||
|
||||
|
||||
<a name="5.0.0-beta.19"></a>
|
||||
# [5.0.0-beta.19](https://github.com/ionic-team/ionic-native/compare/v5.0.0-beta.18...v5.0.0-beta.19) (2018-09-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **index-app-content:** fix lint ([2611061](https://github.com/ionic-team/ionic-native/commit/2611061))
|
||||
* **ms-adal:** remove duplicate imports ([4803912](https://github.com/ionic-team/ionic-native/commit/4803912))
|
||||
* **web-intent:** fix lint ([9feefe8](https://github.com/ionic-team/ionic-native/commit/9feefe8))
|
||||
|
||||
|
||||
|
||||
<a name="5.0.0-beta.18"></a>
|
||||
# [5.0.0-beta.18](https://github.com/ionic-team/ionic-native/compare/v5.0.0-beta.14...v5.0.0-beta.18) (2018-09-15)
|
||||
|
||||
|
||||
Generated
+530
-3366
File diff suppressed because it is too large
Load Diff
+16
-24
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ionic-native",
|
||||
"version": "5.0.0-beta.18",
|
||||
"version": "5.0.0-beta.21",
|
||||
"description": "Native plugin wrappers for Cordova and Ionic with TypeScript, ES6+, Promise and Observable support",
|
||||
"homepage": "https://ionicframework.com/",
|
||||
"author": "Ionic Team <hi@ionic.io> (https://ionic.io)",
|
||||
@@ -22,30 +22,24 @@
|
||||
"shipit": "npm run build && npm run readmes && npm run npmpub"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/common": "^6.1.7",
|
||||
"@angular/compiler": "^6.1.7",
|
||||
"@angular/compiler-cli": "^6.1.7",
|
||||
"@angular/core": "^6.1.7",
|
||||
"@angular/common": "^6.1.8",
|
||||
"@angular/compiler": "^6.1.8",
|
||||
"@angular/compiler-cli": "^6.1.8",
|
||||
"@angular/core": "^6.1.8",
|
||||
"@types/cordova": "0.0.34",
|
||||
"@types/fs-extra": "^5.0.4",
|
||||
"@types/jest": "^23.3.2",
|
||||
"@types/lodash": "^4.14.116",
|
||||
"@types/node": "^9.6.31",
|
||||
"@types/node": "^9.6.32",
|
||||
"@types/rimraf": "^2.0.2",
|
||||
"@types/webpack": "^4.4.11",
|
||||
"@types/webpack": "^4.4.12",
|
||||
"ajv": "^6.5.4",
|
||||
"async-promise-queue": "^1.0.4",
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-preset-env": "^1.7.0",
|
||||
"babelify": "^8.0.0",
|
||||
"browserify": "^16.2.2",
|
||||
"canonical-path": "0.0.2",
|
||||
"conventional-changelog-cli": "^2.0.5",
|
||||
"cpr": "^3.0.1",
|
||||
"cz-conventional-changelog": "^2.1.0",
|
||||
"dgeni": "^0.4.10",
|
||||
"dgeni-packages": "0.16.10",
|
||||
"fs-extra": "^7.0.0",
|
||||
"fs-extra-promise": "^1.0.1",
|
||||
"gulp": "3.9.1",
|
||||
"gulp-rename": "^1.4.0",
|
||||
"gulp-replace": "^1.0.0",
|
||||
@@ -53,25 +47,23 @@
|
||||
"jest": "^23.6.0",
|
||||
"lodash": "^4.17.11",
|
||||
"minimist": "1.2.0",
|
||||
"nodemon": "^1.18.4",
|
||||
"natives": "^1.1.5",
|
||||
"rimraf": "^2.6.2",
|
||||
"rxjs": "^6.3.2",
|
||||
"rxjs-tslint-rules": "^4.8.0",
|
||||
"string-replace-webpack-plugin": "^0.1.3",
|
||||
"ts-jest": "^22.4.6",
|
||||
"ts-node": "^6.2.0",
|
||||
"ts-jest": "23.1.4",
|
||||
"ts-node": "^7.0.1",
|
||||
"tslint": "^5.11.0",
|
||||
"tslint-ionic-rules": "0.0.14",
|
||||
"tslint-ionic-rules": "0.0.19",
|
||||
"typescript": "2.9.2",
|
||||
"uglifyjs-webpack-plugin": "^1.3.0",
|
||||
"uglifyjs-webpack-plugin": "^2.0.1",
|
||||
"unminified-webpack-plugin": "^2.0.0",
|
||||
"webpack": "^4.19.0",
|
||||
"webpack": "^4.20.1",
|
||||
"winston": "^3.1.0",
|
||||
"zone.js": "latest"
|
||||
"zone.js": "^0.8.26"
|
||||
},
|
||||
"jest": {
|
||||
"transform": {
|
||||
"^.+\\.tsx?$": "<rootDir>/node_modules/ts-jest/preprocessor.js"
|
||||
"^.+\\.tsx?$": "ts-jest"
|
||||
},
|
||||
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(js?|ts?)$",
|
||||
"moduleFileExtensions": [
|
||||
|
||||
@@ -12,8 +12,9 @@ export const PLUGINS_ROOT = path.join(ROOT, 'src/@ionic-native/plugins/');
|
||||
export const PLUGIN_PATHS = fs.readdirSync(PLUGINS_ROOT).map(d => path.join(PLUGINS_ROOT, d, 'index.ts'));
|
||||
|
||||
export function getDecorator(node: ts.Node, index = 0): ts.Decorator {
|
||||
if (node.decorators && node.decorators[index])
|
||||
if (node.decorators && node.decorators[index]) {
|
||||
return node.decorators[index];
|
||||
}
|
||||
}
|
||||
|
||||
export function hasDecorator(decoratorName: string, node: ts.Node): boolean {
|
||||
@@ -43,7 +44,7 @@ export function getDecoratorArgs(decorator: any) {
|
||||
break;
|
||||
|
||||
case ts.SyntaxKind.ArrayLiteralExpression:
|
||||
val = prop.initializer.elements.map(e => e.text);
|
||||
val = prop.initializer.elements.map((e: any) => e.text);
|
||||
break;
|
||||
|
||||
case ts.SyntaxKind.TrueKeyword:
|
||||
|
||||
@@ -187,7 +187,7 @@ docType: "<$ doc.docType $>"
|
||||
<ol class="installation">
|
||||
<li>Install the Cordova and Ionic Native plugins:<br>
|
||||
<pre><code class="nohighlight">$ <@ if prop.install @><$ prop.install | replace('<', '<').replace('>', '>') $><@ else @>ionic cordova plugin add <$ prop.plugin $><@ endif @>
|
||||
$ npm install --save @ionic-native/<$ doc.npmId $>
|
||||
$ npm install @ionic-native/<$ doc.npmId $>@beta
|
||||
</code></pre>
|
||||
</li>
|
||||
<li><a href="https://ionicframework.com/docs/native/#Add_Plugins_to_Your_App_Module">Add this plugin to your app's module</a></li>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
```
|
||||
$ <@ if prop.install @><$ prop.install $><@ else @>ionic cordova plugin add <$ prop.plugin $><@ endif @>
|
||||
$ npm install --save @ionic-native/<$ doc.npmId $>
|
||||
$ npm install @ionic-native/<$ doc.npmId $>@beta
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://ionicframework.com/docs/native/<$ doc.fileInfo.relativePath|replace('/home/ubuntu/ionic-native/', '')|replace('//','/')|replace('index.ts','')|replace('src/@ionic-native/plugins/','') $>)
|
||||
|
||||
+18
-15
@@ -1,39 +1,42 @@
|
||||
"use strict";
|
||||
'use strict';
|
||||
const config = require('./config.json'),
|
||||
projectPackage = require('../../package.json'),
|
||||
path = require('path'),
|
||||
fs = require('fs-extra-promise').useFs(require('fs-extra')),
|
||||
fs = require('fs-extra'),
|
||||
Dgeni = require('dgeni');
|
||||
|
||||
module.exports = gulp => {
|
||||
gulp.task('docs', [], () => {
|
||||
|
||||
try {
|
||||
|
||||
const ionicPackage = require('./dgeni/dgeni-config')(projectPackage.version),
|
||||
const ionicPackage = require('./dgeni/dgeni-config')(
|
||||
projectPackage.version
|
||||
),
|
||||
dgeni = new Dgeni([ionicPackage]);
|
||||
|
||||
return dgeni.generate().then(docs => console.log(docs.length + ' docs generated'));
|
||||
|
||||
return dgeni
|
||||
.generate()
|
||||
.then(docs => console.log(docs.length + ' docs generated'));
|
||||
} catch (err) {
|
||||
console.log(err.stack);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
gulp.task('readmes', [], function() {
|
||||
|
||||
fs.copySync(path.resolve(__dirname, '..', '..', 'README.md'), path.resolve(__dirname, '..', '..', config.pluginDir, 'core', 'README.md'));
|
||||
fs.copySync(
|
||||
path.resolve(__dirname, '..', '..', 'README.md'),
|
||||
path.resolve(__dirname, '..', '..', config.pluginDir, 'core', 'README.md')
|
||||
);
|
||||
|
||||
try {
|
||||
|
||||
const ionicPackage = require('./dgeni/dgeni-readmes-config')(projectPackage.version),
|
||||
const ionicPackage = require('./dgeni/dgeni-readmes-config')(
|
||||
projectPackage.version
|
||||
),
|
||||
dgeni = new Dgeni([ionicPackage]);
|
||||
return dgeni.generate().then(docs => console.log(docs.length + ' README files generated'));
|
||||
|
||||
return dgeni
|
||||
.generate()
|
||||
.then(docs => console.log(docs.length + ' README files generated'));
|
||||
} catch (err) {
|
||||
console.log(err.stack);
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
@@ -412,14 +412,18 @@ export function cordovaWarn(pluginName: string, method?: string): void {
|
||||
}
|
||||
}
|
||||
|
||||
// Fixes a bug in TypeScript 2.9.2 where the ...args is being converted into args: {} and
|
||||
// causing compilation issues
|
||||
export type WrapFn = (...args: any[]) => any;
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export const wrap = function(
|
||||
export const wrap = (
|
||||
pluginObj: any,
|
||||
methodName: string,
|
||||
opts: CordovaOptions = {}
|
||||
): Function {
|
||||
): WrapFn => {
|
||||
return (...args: any[]) => {
|
||||
if (opts.sync) {
|
||||
// Sync doesn't wrap the plugin with a promise or observable, it returns the result as-is
|
||||
|
||||
@@ -19,7 +19,7 @@ function overrideFunction(pluginObj: any, methodName: string): Observable<any> {
|
||||
export function cordovaFunctionOverride(
|
||||
pluginObj: any,
|
||||
methodName: string,
|
||||
args: IArguments | Array<any> = []
|
||||
args: IArguments | any[] = []
|
||||
) {
|
||||
return overrideFunction(pluginObj, methodName);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { wrapInstance } from './common';
|
||||
import { CordovaOptions } from './interfaces';
|
||||
|
||||
export function cordovaInstance(pluginObj: any, methodName: string, config: CordovaOptions, args: IArguments | Array<any>) {
|
||||
export function cordovaInstance(pluginObj: any, methodName: string, config: CordovaOptions, args: IArguments | any[]) {
|
||||
args = Array.from(args);
|
||||
return wrapInstance(pluginObj, methodName, config).apply(this, args);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { wrap } from './common';
|
||||
import { CordovaOptions } from './interfaces';
|
||||
|
||||
export function cordova(pluginObj: any, methodName: string, config: CordovaOptions, args: IArguments | Array<any>) {
|
||||
export function cordova(pluginObj: any, methodName: string, config: CordovaOptions, args: IArguments | any[]) {
|
||||
return wrap(pluginObj, methodName, config).apply(this, args);
|
||||
}
|
||||
|
||||
@@ -13,12 +13,14 @@ export function initAngular1(plugins: any) {
|
||||
const serviceName = '$cordova' + name;
|
||||
const cls = plugins[name];
|
||||
|
||||
(function (serviceName, cls, name) {
|
||||
ngModule.service(serviceName, [function () {
|
||||
const funcs = window.angular.copy(cls);
|
||||
funcs.__proto__['name'] = name;
|
||||
return funcs;
|
||||
}]);
|
||||
((serviceName, cls, name) => {
|
||||
ngModule.service(serviceName, [
|
||||
() => {
|
||||
const funcs = window.angular.copy(cls);
|
||||
funcs.__proto__['name'] = name;
|
||||
return funcs;
|
||||
}
|
||||
]);
|
||||
})(serviceName, cls, name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,12 +21,12 @@ export interface TextCaptureOptions {
|
||||
* for example: ["English", "French", "German"]. Empty array
|
||||
* disables language selection.
|
||||
*/
|
||||
selectableRecognitionLanguages?: Array<string>;
|
||||
selectableRecognitionLanguages?: string[];
|
||||
|
||||
/**
|
||||
* Recognition language selected by default.
|
||||
*/
|
||||
recognitionLanguages?: Array<string>;
|
||||
recognitionLanguages?: string[];
|
||||
|
||||
/**
|
||||
* Width and height of the recognition area, separated by a
|
||||
@@ -75,7 +75,7 @@ export interface TextCaptureResult {
|
||||
* · rect (string): position and size of the bounding rectangle,
|
||||
* a string of 4 integers separated with whitespaces ("x y width height").
|
||||
*/
|
||||
textLines: Array<{ text: string, quadrangle: string, rect?: string }>;
|
||||
textLines: { text: string, quadrangle: string, rect?: string }[];
|
||||
|
||||
/**
|
||||
* Additional information. This object has the following keys:
|
||||
@@ -94,7 +94,7 @@ export interface TextCaptureResult {
|
||||
stabilityStatus: string,
|
||||
userAction: string,
|
||||
frameSize: string,
|
||||
recognitionLanguages: Array<string>
|
||||
recognitionLanguages: string[]
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -136,8 +136,8 @@ export interface DataCaptureOptions {
|
||||
customDataCaptureScenario?: {
|
||||
name: string,
|
||||
description: string,
|
||||
recognitionLanguages: Array<string>,
|
||||
fields: Array<{ regEx: string }>
|
||||
recognitionLanguages: string[],
|
||||
fields: { regEx: string }[]
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { fromEvent, Observable } from 'rxjs';
|
||||
import { Observable, fromEvent } from 'rxjs';
|
||||
|
||||
export interface AdMobFreeBannerConfig {
|
||||
/**
|
||||
@@ -63,6 +63,113 @@ export interface AdMobFreeRewardVideoConfig {
|
||||
autoShow?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name AdMob Free
|
||||
* @description
|
||||
* A free, no ad-sharing version of Google AdMob plugin for Cordova.
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-admob-free`. For more info, please see the [AdMob Free plugin docs](https://github.com/ratson/cordova-plugin-admob-free).
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { AdMobFree, AdMobFreeBannerConfig } from '@ionic-native/admob-free';
|
||||
*
|
||||
*
|
||||
* constructor(private admobFree: AdMobFree) { }
|
||||
*
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* const bannerConfig: AdMobFreeBannerConfig = {
|
||||
* // add your config here
|
||||
* // for the sake of this example we will just use the test config
|
||||
* isTesting: true,
|
||||
* autoShow: true
|
||||
* };
|
||||
* this.admobFree.banner.config(bannerConfig);
|
||||
*
|
||||
* this.admobFree.banner.prepare()
|
||||
* .then(() => {
|
||||
* // banner Ad is ready
|
||||
* // if we set autoShow to false, then we will need to call the show method here
|
||||
* })
|
||||
* .catch(e => console.log(e));
|
||||
*
|
||||
*
|
||||
* ```
|
||||
* @interfaces
|
||||
* AdMobFreeBannerConfig
|
||||
* AdMobFreeInterstitialConfig
|
||||
* AdMobFreeRewardVideoConfig
|
||||
* @classes
|
||||
* AdMobFreeBanner
|
||||
* AdMobFreeInterstitial
|
||||
* AdMobFreeRewardVideo
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'AdMobFree',
|
||||
plugin: 'cordova-plugin-admob-free',
|
||||
pluginRef: 'admob',
|
||||
repo: 'https://github.com/ratson/cordova-plugin-admob-free',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class AdMobFree extends IonicNativePlugin {
|
||||
/**
|
||||
* Convenience object to get event names
|
||||
* @type {Object}
|
||||
*/
|
||||
events = {
|
||||
BANNER_LOAD: 'admob.banner.events.LOAD',
|
||||
BANNER_LOAD_FAIL: 'admob.banner.events.LOAD_FAIL',
|
||||
BANNER_OPEN: 'admob.banner.events.OPEN',
|
||||
BANNER_CLOSE: 'admob.banner.events.CLOSE',
|
||||
BANNER_EXIT_APP: 'admob.banner.events.EXIT_APP',
|
||||
|
||||
INTERSTITIAL_LOAD: 'admob.interstitial.events.LOAD',
|
||||
INTERSTITIAL_LOAD_FAIL: 'admob.interstitial.events.LOAD_FAIL',
|
||||
INTERSTITIAL_OPEN: 'admob.interstitial.events.OPEN',
|
||||
INTERSTITIAL_CLOSE: 'admob.interstitial.events.CLOSE',
|
||||
INTERSTITIAL_EXIT_APP: 'admob.interstitial.events.EXIT_APP',
|
||||
|
||||
REWARD_VIDEO_LOAD: 'admob.rewardvideo.events.LOAD',
|
||||
REWARD_VIDEO_LOAD_FAIL: 'admob.rewardvideo.events.LOAD_FAIL',
|
||||
REWARD_VIDEO_OPEN: 'admob.rewardvideo.events.OPEN',
|
||||
REWARD_VIDEO_CLOSE: 'admob.rewardvideo.events.CLOSE',
|
||||
REWARD_VIDEO_EXIT_APP: 'admob.rewardvideo.events.EXIT_APP',
|
||||
REWARD_VIDEO_START: 'admob.rewardvideo.events.START',
|
||||
REWARD_VIDEO_REWARD: 'admob.rewardvideo.events.REWARD'
|
||||
};
|
||||
|
||||
/**
|
||||
* Watch an event
|
||||
* @param event {string} event name
|
||||
* @return {Observable<any>}
|
||||
*/
|
||||
on(event: string): Observable<any> {
|
||||
return fromEvent(document, event);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the AdMobFreeBanner object
|
||||
* @type {AdMobFreeBanner}
|
||||
*/
|
||||
banner: AdMobFreeBanner = new AdMobFreeBanner();
|
||||
|
||||
/**
|
||||
* Returns the AdMobFreeInterstitial object
|
||||
* @type {AdMobFreeInterstitial}
|
||||
*/
|
||||
interstitial: AdMobFreeInterstitial = new AdMobFreeInterstitial();
|
||||
|
||||
/**
|
||||
* Returns the AdMobFreeRewardVideo object
|
||||
* @type {AdMobFreeRewardVideo}
|
||||
*/
|
||||
rewardVideo: AdMobFreeRewardVideo = new AdMobFreeRewardVideo();
|
||||
}
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
@@ -212,104 +319,3 @@ export class AdMobFreeRewardVideo extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @name AdMob Free
|
||||
* @description
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { AdMobFree, AdMobFreeBannerConfig } from '@ionic-native/admob-free';
|
||||
*
|
||||
*
|
||||
* constructor(private admobFree: AdMobFree) { }
|
||||
*
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* const bannerConfig: AdMobFreeBannerConfig = {
|
||||
* // add your config here
|
||||
* // for the sake of this example we will just use the test config
|
||||
* isTesting: true,
|
||||
* autoShow: true
|
||||
* }
|
||||
* this.admobFree.banner.config(bannerConfig);
|
||||
*
|
||||
* this.admobFree.banner.prepare()
|
||||
* .then(() => {
|
||||
* // banner Ad is ready
|
||||
* // if we set autoShow to false, then we will need to call the show method here
|
||||
* })
|
||||
* .catch(e => console.log(e));
|
||||
*
|
||||
*
|
||||
* ```
|
||||
* @interfaces
|
||||
* AdMobFreeBannerConfig
|
||||
* AdMobFreeInterstitialConfig
|
||||
* AdMobFreeRewardVideoConfig
|
||||
* @classes
|
||||
* AdMobFreeBanner
|
||||
* AdMobFreeInterstitial
|
||||
* AdMobFreeRewardVideo
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'AdMobFree',
|
||||
plugin: 'cordova-plugin-admob-free',
|
||||
pluginRef: 'admob',
|
||||
repo: 'https://github.com/ratson/cordova-plugin-admob-free',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class AdMobFree extends IonicNativePlugin {
|
||||
/**
|
||||
* Convenience object to get event names
|
||||
* @type {Object}
|
||||
*/
|
||||
events: any = {
|
||||
BANNER_LOAD: 'admob.banner.events.LOAD',
|
||||
BANNER_LOAD_FAIL: 'admob.banner.events.LOAD_FAIL',
|
||||
BANNER_OPEN: 'admob.banner.events.OPEN',
|
||||
BANNER_CLOSE: 'admob.banner.events.CLOSE',
|
||||
BANNER_EXIT_APP: 'admob.banner.events.EXIT_APP',
|
||||
|
||||
INTERSTITIAL_LOAD: 'admob.interstitial.events.LOAD',
|
||||
INTERSTITIAL_LOAD_FAIL: 'admob.interstitial.events.LOAD_FAIL',
|
||||
INTERSTITIAL_OPEN: 'admob.interstitial.events.OPEN',
|
||||
INTERSTITIAL_CLOSE: 'admob.interstitial.events.CLOSE',
|
||||
INTERSTITIAL_EXIT_APP: 'admob.interstitial.events.EXIT_APP',
|
||||
|
||||
REWARD_VIDEO_LOAD: 'admob.rewardvideo.events.LOAD',
|
||||
REWARD_VIDEO_LOAD_FAIL: 'admob.rewardvideo.events.LOAD_FAIL',
|
||||
REWARD_VIDEO_OPEN: 'admob.rewardvideo.events.OPEN',
|
||||
REWARD_VIDEO_CLOSE: 'admob.rewardvideo.events.CLOSE',
|
||||
REWARD_VIDEO_EXIT_APP: 'admob.rewardvideo.events.EXIT_APP',
|
||||
REWARD_VIDEO_START: 'admob.rewardvideo.events.START',
|
||||
REWARD_VIDEO_REWARD: 'admob.rewardvideo.events.REWARD'
|
||||
};
|
||||
/**
|
||||
* Returns the AdMobFreeBanner object
|
||||
* @type {AdMobFreeBanner}
|
||||
*/
|
||||
banner: AdMobFreeBanner = new AdMobFreeBanner();
|
||||
/**
|
||||
* Returns the AdMobFreeInterstitial object
|
||||
* @type {AdMobFreeInterstitial}
|
||||
*/
|
||||
interstitial: AdMobFreeInterstitial = new AdMobFreeInterstitial();
|
||||
/**
|
||||
* Returns the AdMobFreeRewardVideo object
|
||||
* @type {AdMobFreeRewardVideo}
|
||||
*/
|
||||
rewardVideo: AdMobFreeRewardVideo = new AdMobFreeRewardVideo();
|
||||
|
||||
/**
|
||||
* Watch an event
|
||||
* @param event {string} event name
|
||||
* @return {Observable<any>}
|
||||
*/
|
||||
on(event: string): Observable<any> {
|
||||
return fromEvent(document, event);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,4 +101,5 @@ export class AES256 extends IonicNativePlugin {
|
||||
generateSecureIV(password: string): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -75,7 +75,7 @@ export interface AppRateCustomLocale {
|
||||
/** No button label */
|
||||
noButtonLabel?: string;
|
||||
|
||||
/** App rate promt title */
|
||||
/** App rate prompt title */
|
||||
appRatePromptTitle?: string;
|
||||
|
||||
/** Feedback prompt title */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
export type IMakePayments =
|
||||
| 'This device can make payments and has a supported card'
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface EncryptedCardData {
|
||||
activationData: string;
|
||||
encryptedPassData: string;
|
||||
wrappedKey: string;
|
||||
}
|
||||
|
||||
export interface CardData {
|
||||
cardholderName: string;
|
||||
primaryAccountNumberSuffix: string;
|
||||
localizedDescription?: string;
|
||||
paymentNetwork: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Apple Wallet
|
||||
* @description
|
||||
* A Cordova plugin that enables users from Add Payment Cards to their Apple Wallet.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { AppleWallet } from '@ionic-native/apple-wallet';
|
||||
*
|
||||
*
|
||||
* constructor(private appleWallet: AppleWallet) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.appleWallet.available()
|
||||
* .then((res) => {
|
||||
* // res is a boolean value, either true or false
|
||||
* console.log("Is Apple Wallet available? ", res);
|
||||
* })
|
||||
* .catch((message) => {
|
||||
* console.error("ERROR AVAILBLE>> ", message);
|
||||
* });
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* let data: cardData = {
|
||||
* cardholderName: 'Test User',
|
||||
* primaryAccountNumberSuffix: '1234',
|
||||
* localizedDescription: 'Description of payment card',
|
||||
* paymentNetwork: 'VISA'
|
||||
* }
|
||||
*
|
||||
* this.appleWallet.startAddPaymentPass(data: cardData)
|
||||
* .then((res) => {
|
||||
* console.log("startAddPaymentPass success response ", res);
|
||||
* })
|
||||
* .catch((err) => {
|
||||
* console.error("startAddPaymentPass ERROR response", err);
|
||||
* });
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* let data: encryptedCardData = {
|
||||
* activationData: 'encoded Base64 activationData from your server',
|
||||
* encryptedPassData: 'encoded Base64 encryptedPassData from your server',
|
||||
* wrappedKey: 'encoded Base64 wrappedKey from your server',
|
||||
* }
|
||||
*
|
||||
* this.appleWallet.encryptedCardData(data: encryptedCardData)
|
||||
* .then((res) => {
|
||||
* console.log("completeAddCardToAppleWallet success response ", res);
|
||||
* })
|
||||
* .catch((err) => {
|
||||
* console.error("completeAddCardToAppleWallet ERROR response", err);
|
||||
* });
|
||||
*
|
||||
* ```
|
||||
* @Interfaces
|
||||
* EncryptedCardData
|
||||
* CardData
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'AppleWallet',
|
||||
plugin: 'cordova-apple-wallet',
|
||||
pluginRef: 'AppleWallet',
|
||||
repo: 'https://github.com/tomavic/cordova-apple-wallet',
|
||||
platforms: ['iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class AppleWallet extends IonicNativePlugin {
|
||||
/**
|
||||
* Detects if the current device supports Apple Wallet
|
||||
* @return {Promise<boolean>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
available(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple call with the configuration data needed to instantiate a new PKAddPaymentPassViewController object.
|
||||
* @param {cardData} data
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
startAddPaymentPass(data: CardData): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple call contains the card data needed to add a card to Apple Pay.
|
||||
* @param {encryptedCardData} data
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
completeAddPaymentPass(data: EncryptedCardData): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -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 Autostart
|
||||
|
||||
@@ -482,7 +482,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
||||
platforms: ['Android'],
|
||||
observable: true
|
||||
})
|
||||
watchLocationMode(): Observable<number> { return; }
|
||||
watchLocationMode(): Observable<number> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop watching for location mode changes.
|
||||
|
||||
@@ -589,7 +589,6 @@ export class BLE extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves a list of the peripherals (containing any of the specified services)
|
||||
* currently connected to the system. The peripheral list is sent to the success callback.
|
||||
@@ -599,7 +598,7 @@ export class BLE extends IonicNativePlugin {
|
||||
* @returns {Promise<any>} Returns a promise with a list of peripheral objects
|
||||
*/
|
||||
@Cordova()
|
||||
connectedPeripheralsWithServices (services: string[]): Promise<any[]> {
|
||||
connectedPeripheralsWithServices(services: string[]): Promise<any[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -611,7 +610,7 @@ export class BLE extends IonicNativePlugin {
|
||||
* @returns {Promise<any>} Returns a promise with a list of peripheral objects
|
||||
*/
|
||||
@Cordova()
|
||||
peripheralsWithIdentifiers (uuids: string[]): Promise<any[]> {
|
||||
peripheralsWithIdentifiers(uuids: string[]): Promise<any[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -622,7 +621,7 @@ export class BLE extends IonicNativePlugin {
|
||||
* @returns {Promise<any>} Returns a promise with a list of peripheral objects
|
||||
*/
|
||||
@Cordova()
|
||||
bondedDevices (): Promise<any[]> {
|
||||
bondedDevices(): Promise<any[]> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import {
|
||||
Cordova,
|
||||
CordovaProperty,
|
||||
IonicNativePlugin,
|
||||
Plugin
|
||||
} from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/* Available status of device */
|
||||
@@ -67,7 +72,7 @@ export interface InitParams extends InitPeripheralParams {
|
||||
export interface ScanParams {
|
||||
/* An array of service IDs to filter the scan or empty array / null. This parameter is not supported on Windows platform yet */
|
||||
services?: string[];
|
||||
/** True/false to allow duplicate advertisement packets, defaults to false (iOS) */
|
||||
/* True/false to allow duplicate advertisement packets, defaults to false (iOS)*/
|
||||
allowDuplicates?: boolean;
|
||||
/** Defaults to Low Power. Available from API21 / API 23 (Android) */
|
||||
scanMode?: BluetoothScanMode;
|
||||
@@ -181,7 +186,7 @@ export interface MTU extends DeviceInfo {
|
||||
}
|
||||
|
||||
export interface BondedStatus extends CommonInfo {
|
||||
/** Bonded status */
|
||||
/* Bonded status*/
|
||||
isBonded: boolean;
|
||||
}
|
||||
|
||||
@@ -322,7 +327,7 @@ export interface DescriptorResult extends OperationResult {
|
||||
export interface Characteristics extends DeviceInfo {
|
||||
/** Service's id */
|
||||
service: string;
|
||||
/** Array of characteristic objects */
|
||||
/* Array of characteristic objects*/
|
||||
characteristics: Characteristic[];
|
||||
}
|
||||
|
||||
@@ -374,6 +379,15 @@ export interface Error {
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface AdapterInfo {
|
||||
name: string;
|
||||
address: string;
|
||||
isInitialized: boolean;
|
||||
isEnabled: boolean;
|
||||
isScanning: boolean;
|
||||
isDiscoverable: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name BluetoothLE
|
||||
* @description
|
||||
@@ -415,7 +429,7 @@ export interface Error {
|
||||
export class BluetoothLE extends IonicNativePlugin {
|
||||
/**
|
||||
* @name initialize
|
||||
* @description Initialize Bluetooth on the device
|
||||
* Initialize Bluetooth on the device
|
||||
* @param {InitParams} [params]
|
||||
* @returns {(Promise<{ status: 'enabled' | 'disabled'}>)} The callback that is passed initialize status (enabled/disabled)
|
||||
*/
|
||||
@@ -426,7 +440,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name enable (Android)
|
||||
* @description Enable Bluetooth on the device. Android support only
|
||||
* Enable Bluetooth on the device. Android support only
|
||||
* @returns {Promise<{ status: boolean }>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse', sync: true })
|
||||
@@ -436,7 +450,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name disable (Android)
|
||||
* @description Disable Bluetooth on the device. Android support only
|
||||
* Disable Bluetooth on the device. Android support only
|
||||
* @returns void
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse', sync: true })
|
||||
@@ -446,30 +460,26 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name getAdapterInfo (Android)
|
||||
* @description @todo
|
||||
* @returns {Promise<{ name: string, address: string, isInitialized: boolean, isEnabled: boolean, isScanning: boolean, isDiscoverable: boolean}>}
|
||||
* Retrieve useful information such as the address, name, and various states (initialized, enabled, scanning, discoverable).
|
||||
* This can be very useful when the general state of the adapter has been lost, and we would otherwise need to go through a series of callbacks to get the correct state (first initialized, then enabled, then isScanning, and so forth).
|
||||
* The result of this method allows us to take business logic decisions while avoiding a large part of the callback hell.
|
||||
* 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' })
|
||||
getAdapterInfo(): Promise<{
|
||||
name: string;
|
||||
address: string;
|
||||
isInitialized: boolean;
|
||||
isEnabled: boolean;
|
||||
isScanning: boolean;
|
||||
isDiscoverable: boolean;
|
||||
}> {
|
||||
getAdapterInfo(): Promise<AdapterInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name startScan
|
||||
* @description Scan for Bluetooth LE devices.
|
||||
* Scan for Bluetooth LE devices.
|
||||
* Since scanning is expensive, stop as soon as possible. The Cordova app should use a timer to limit the scan interval.
|
||||
* Android API >= 23 requires ACCESS_COARSE_LOCATION permissions to find unpaired devices.
|
||||
* Permissions can be requested by using the hasPermission and requestPermission functions.
|
||||
* Android API >= 23 also requires location services to be enabled. Use isLocationEnabled to determine whether location services are enabled.
|
||||
* If not enabled, use requestLocation to prompt the location services settings page.
|
||||
* @param params Scan params
|
||||
* @param {ScanParams} params Scan params
|
||||
* @returns {(Observable<{ status: ScanStatus }>)}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse', observable: true })
|
||||
@@ -479,7 +489,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name stopScan
|
||||
* @description Stop scan for Bluetooth LE devices. Since scanning is expensive, stop as soon as possible
|
||||
* Stop scan for Bluetooth LE devices. Since scanning is expensive, stop as soon as possible
|
||||
* The app should use a timer to limit the scanning time.
|
||||
* @returns {Promise<{status: 'scanStopped'}>}
|
||||
*/
|
||||
@@ -490,7 +500,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name retrieveConnected
|
||||
* @description Retrieved paired Bluetooth LE devices. In iOS, devices that are "paired" to will not return during a normal scan.
|
||||
* Retrieved paired Bluetooth LE devices. In iOS, devices that are "paired" to will not return during a normal scan.
|
||||
* Callback is "instant" compared to a scan.
|
||||
* @param {{ services: string[] }} An array of service IDs to filter the retrieval by. If no service IDs are specified, no devices will be returned.
|
||||
* @returns {Promise<{ devices: DeviceInfo[] }>}
|
||||
@@ -504,7 +514,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name bond (Android)
|
||||
* @description Bond with a device.
|
||||
* Bond with a device.
|
||||
* The device doesn't need to be connected to initiate bonding. Android support only.
|
||||
* @param {{ address: string }} params The address/identifier provided by the scan's return object
|
||||
* @returns {(Observable<{ status: DeviceInfo }>)}
|
||||
@@ -522,7 +532,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name unbond (Android)
|
||||
* @description Unbond with a device. The device doesn't need to be connected to initiate bonding. Android support only.
|
||||
* Unbond with a device. The device doesn't need to be connected to initiate bonding. Android support only.
|
||||
* @param {{address: string}} params The address/identifier
|
||||
* @returns {Promise<{ status: DeviceInfo }>}
|
||||
* success: The success callback should always return with status == unbonded, that is passed with device object
|
||||
@@ -535,7 +545,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name connect
|
||||
* @description Connect to a Bluetooth LE device
|
||||
* Connect to a Bluetooth LE device
|
||||
* @param connectSuccess The success callback that is passed with device object
|
||||
* @param connectError The callback that will be triggered when the connect operation fails
|
||||
* @param params The address/identifier
|
||||
@@ -555,7 +565,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name reconnect
|
||||
* @description Reconnect to a previously connected Bluetooth device
|
||||
* Reconnect to a previously connected Bluetooth device
|
||||
* @param {{address: string}} params The address/identifier
|
||||
* @returns {(Observable<{ status: DeviceInfo }>)}
|
||||
*/
|
||||
@@ -566,7 +576,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name disconnect
|
||||
* @description Disconnect from a Bluetooth LE device.
|
||||
* Disconnect from a Bluetooth LE device.
|
||||
* Note: It's simpler to just call close(). Starting with iOS 10, disconnecting before closing seems required!
|
||||
* @param {{address: string}} params The address/identifier
|
||||
* @returns {Promise<{ status: DeviceInfo }>}
|
||||
@@ -578,7 +588,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name close
|
||||
* @description Close/dispose a Bluetooth LE device.
|
||||
* Close/dispose a Bluetooth LE device.
|
||||
* Prior to 2.7.0, you needed to disconnect to the device before closing, but this is no longer the case.
|
||||
* Starting with iOS 10, disconnecting before closing seems required!
|
||||
* @param {{ address: string }} params The address/identifier
|
||||
@@ -591,7 +601,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name discover
|
||||
* @description Discover all the devices services, characteristics and descriptors.
|
||||
* Discover all the devices services, characteristics and descriptors.
|
||||
* Doesn't need to be called again after disconnecting and then reconnecting.
|
||||
* If using iOS, you shouldn't use discover and services/characteristics/descriptors on the same device.
|
||||
* There seems to be an issue with calling discover on iOS8 devices, so use with caution.
|
||||
@@ -613,7 +623,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name services (iOS)
|
||||
* @description Discover the device's services.
|
||||
* Discover the device's services.
|
||||
* Not providing an array of services will return all services and take longer to discover. iOS support only.
|
||||
* @param {{address: string, services: string[]}} params
|
||||
* @returns {Promise<{ services: Services }>}
|
||||
@@ -628,7 +638,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name characteristics (iOS)
|
||||
* @description Discover the service's characteristics.
|
||||
* Discover the service's characteristics.
|
||||
* Not providing an array of characteristics will return all characteristics and take longer to discover. iOS support only.
|
||||
* @param {CharacteristicParams} params Characteristic params
|
||||
* @returns {Promise<{ characteristics: Characteristics }>} The service id and an Array of characteristics
|
||||
@@ -642,7 +652,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name descriptors (iOS)
|
||||
* @description Discover the characteristic's descriptors. iOS support only.
|
||||
* Discover the characteristic's descriptors. iOS support only.
|
||||
* @param {DescriptorParams} params
|
||||
* @returns {Promise<{ descriptors: Descriptors }>}
|
||||
*/
|
||||
@@ -653,7 +663,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name read
|
||||
* @description Read a particular service's characteristic once
|
||||
* Read a particular service's characteristic once
|
||||
* @param {DescriptorParams} params
|
||||
* @returns {Promise<OperationResult>}
|
||||
*/
|
||||
@@ -664,11 +674,11 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name subscribe
|
||||
* @description Subscribe to a particular service's characteristic.
|
||||
* Subscribe to a particular service's characteristic.
|
||||
* 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 {Promise<OperationResult>}
|
||||
* @returns {Observable<OperationResult>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse', observable: true })
|
||||
subscribe(params: DescriptorParams): Observable<OperationResult> {
|
||||
@@ -677,7 +687,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name unsubscribe
|
||||
* @description Unsubscribe to a particular service's characteristic.
|
||||
* Unsubscribe to a particular service's characteristic.
|
||||
* @param {DescriptorParams} params
|
||||
* @returns {Promise<UnsubscribeResult>}
|
||||
*/
|
||||
@@ -688,7 +698,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name write (limitation on iOS, read below)
|
||||
* @description Write a particular service's characteristic
|
||||
* Write a particular service's characteristic
|
||||
* Note: no callback will occur on write without response on iOS.
|
||||
* @param {WriteCharacteristicParams} params
|
||||
* @returns {Promise<OperationResult>}
|
||||
@@ -700,7 +710,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name write (limitation on iOS, read below)
|
||||
* @description Write Quick / Queue, use this method to quickly execute write without response commands when writing more than 20 bytes at a time.
|
||||
* Write Quick / Queue, use this method to quickly execute write without response commands when writing more than 20 bytes at a time.
|
||||
* Note: no callback will occur on write without response on iOS.
|
||||
* @param {WriteCharacteristicParams} params
|
||||
* @returns {Promise<OperationResult>}
|
||||
@@ -712,7 +722,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name readDescriptor
|
||||
* @description Read a particular characterist's descriptor
|
||||
* Read a particular characterist's descriptor
|
||||
* @param {OperationDescriptorParams} params
|
||||
* @returns {Promise<DescriptorResult>}
|
||||
*/
|
||||
@@ -723,7 +733,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name writeDescriptor
|
||||
* @description Write a particular characteristic's descriptor. Unable to write characteristic configuration directly to keep in line with iOS implementation.
|
||||
* Write a particular characteristic's descriptor. Unable to write characteristic configuration directly to keep in line with iOS implementation.
|
||||
* Instead use subscribe/unsubscribe, which will automatically enable/disable notification.
|
||||
* @param {WriteDescriptorParams} params
|
||||
* @returns {Promise<DescriptorResult>}
|
||||
@@ -735,7 +745,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name rssi
|
||||
* @description Read RSSI of a connected device. RSSI is also returned with scanning.
|
||||
* Read RSSI of a connected device. RSSI is also returned with scanning.
|
||||
* @param {{ address: string }} params
|
||||
* @returns {Promise<{ rssi: RSSI }>}
|
||||
*/
|
||||
@@ -746,7 +756,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name mtu (Android, Android 5+)
|
||||
* @description Set MTU of a connected device. Android only.
|
||||
* Set MTU of a connected device. Android only.
|
||||
* @param {{ address: string, mtu: number }} params
|
||||
* @returns {Promise<{ mtu: MTU }>}
|
||||
*/
|
||||
@@ -757,7 +767,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name requestConnectionPriority (Android, Android 5+)
|
||||
* @description Request a change in the connection priority to improve throughput when transfer large amounts of data via BLE.
|
||||
* Request a change in the connection priority to improve throughput when transfer large amounts of data via BLE.
|
||||
* Android support only. iOS will return error.
|
||||
* @param {{ address: string, connectionPriority: ConnectionPriority }} params
|
||||
* @returns {Promise<DeviceInfo>}
|
||||
@@ -772,7 +782,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name isInitialized
|
||||
* @description Determine whether the adapter is initialized. No error callback. Returns true or false
|
||||
* Determine whether the adapter is initialized. No error callback. Returns true or false
|
||||
* @returns {Promise<{ isInitialized: boolean }>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
@@ -782,7 +792,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name isEnabled
|
||||
* @description Determine whether the adapter is enabled. No error callback
|
||||
* Determine whether the adapter is enabled. No error callback
|
||||
* @returns {Promise<{ isEnabled: boolean }>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
@@ -792,7 +802,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name isScanning
|
||||
* @description Determine whether the adapter is scanning. No error callback. Returns true or false
|
||||
* Determine whether the adapter is scanning. No error callback. Returns true or false
|
||||
* @returns {Promise<{ isScanning: boolean }>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
@@ -802,7 +812,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name isBonded (Android)
|
||||
* @description Determine whether the device is bonded or not, or error if not initialized. Android support only.
|
||||
* Determine whether the device is bonded or not, or error if not initialized. Android support only.
|
||||
* @param {{ address: string }} params
|
||||
* @returns {Promise<BondedStatus>}
|
||||
*/
|
||||
@@ -813,7 +823,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name wasConnected
|
||||
* @description Determine whether the device was connected, or error if not initialized.
|
||||
* Determine whether the device was connected, or error if not initialized.
|
||||
* @param {{ address: string }} params
|
||||
* @returns {Promise<PrevConnectionStatus>}
|
||||
*/
|
||||
@@ -824,7 +834,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name isConnected
|
||||
* @description Determine whether the device is connected, or error if not initialized or never connected to device
|
||||
* Determine whether the device is connected, or error if not initialized or never connected to device
|
||||
* @param {{ address: string }} params
|
||||
* @returns {Promise<CurrConnectionStatus>}
|
||||
*/
|
||||
@@ -835,7 +845,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name isDiscovered
|
||||
* @description Determine whether the device's characteristics and descriptors have been discovered, or error if not initialized or not connected to device.
|
||||
* Determine whether the device's characteristics and descriptors have been discovered, or error if not initialized or not connected to device.
|
||||
* @param {{ address: string }} params
|
||||
* @returns {Promise<DiscoverStatus>}
|
||||
*/
|
||||
@@ -846,7 +856,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name hasPermission (useful only for Android 6+ / API 23)
|
||||
* @description Determine whether coarse location privileges are granted since scanning for unpaired devices requires it in Android API 23
|
||||
* Determine whether coarse location privileges are granted since scanning for unpaired devices requires it in Android API 23
|
||||
* @returns {Promise<{ hasPermission: boolean }>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
@@ -856,7 +866,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name requestPermission (useful only for Android 6+ / API 23)
|
||||
* @description Request coarse location privileges since scanning for unpaired devices requires it in Android API 23.
|
||||
* Request coarse location privileges since scanning for unpaired devices requires it in Android API 23.
|
||||
* Will return an error if called on iOS or Android versions prior to 6.0.
|
||||
* @returns {Promise<{ requestPermission: boolean }>}
|
||||
*/
|
||||
@@ -867,7 +877,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name isLocationEnabled (useful only for Android 6+ / API 23)
|
||||
* @description Determine if location services are enabled or not. Location Services are required to find devices in Android API 23
|
||||
* Determine if location services are enabled or not. Location Services are required to find devices in Android API 23
|
||||
* @returns {Promise<{ isLocationEnabled: boolean }>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
@@ -877,7 +887,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name requestLocation (useful only for Android 6+ / API 23)
|
||||
* @description Prompt location services settings pages. requestLocation property returns whether location services are enabled or disabled.
|
||||
* Prompt location services settings pages. requestLocation property returns whether location services are enabled or disabled.
|
||||
* Location Services are required to find devices in Android API 23.
|
||||
* @returns {Promise<{ requestLocation: boolean }>}
|
||||
*/
|
||||
@@ -888,12 +898,12 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name initializePeripheral
|
||||
* @description Initialize Bluetooth on the device. Must be called before anything else.
|
||||
* Initialize Bluetooth on the device. Must be called before anything else.
|
||||
* Callback will continuously be used whenever Bluetooth is enabled or disabled.
|
||||
* @param {InitPeripheralParams} [params]
|
||||
* @returns {Observable<InitializeResult>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
@Cordova({ callbackOrder: 'reverse', observable: true })
|
||||
initializePeripheral(
|
||||
params?: InitPeripheralParams
|
||||
): Observable<InitializeResult> {
|
||||
@@ -902,7 +912,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name addService
|
||||
* @description Add a service with characteristics and descriptors. If more than one service is added, add them sequentially
|
||||
* Add a service with characteristics and descriptors. If more than one service is added, add them sequentially
|
||||
* @param {{ service: string, characteristics: Characteristic[] }} params
|
||||
* @returns {Promise<{ service: string, status: Status }>}
|
||||
*/
|
||||
@@ -916,7 +926,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name removeService
|
||||
* @description Remove a service
|
||||
* Remove a service
|
||||
* @param {{ service: string }} params
|
||||
* @returns {Promise<{ service: string, status: Status }>}
|
||||
*/
|
||||
@@ -929,7 +939,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name removeAllServices
|
||||
* @description Remove all services
|
||||
* Remove all services
|
||||
* @returns {Promise<{ status: Status }>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
@@ -939,7 +949,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name startAdvertising (different behavior on Android/iOS, read below)
|
||||
* @description Start advertising as a BLE device.
|
||||
* Start advertising as a BLE device.
|
||||
* Note: This needs to be improved so services can be used for both Android and iOS.
|
||||
* On iOS, the advertising devices likes to rename itself back to the name of the device, i.e. Rand' iPhone
|
||||
* @param {AdvertisingParams} params
|
||||
@@ -952,7 +962,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name stopAdvertising
|
||||
* @description Stop advertising
|
||||
* Stop advertising
|
||||
* @returns {Promise<{ status: Status }>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
@@ -962,7 +972,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name isAdvertising
|
||||
* @description Determine if app is advertising or not.
|
||||
* Determine if app is advertising or not.
|
||||
* @returns {Promise<{ status: boolean }>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
@@ -972,7 +982,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name respond
|
||||
* @description Respond to a read or write request
|
||||
* Respond to a read or write request
|
||||
* @param {RespondParams} params
|
||||
* @returns {Promise<{ status: Status }>}
|
||||
*/
|
||||
@@ -983,7 +993,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name notify
|
||||
* @description Update a value for a subscription. Currently all subscribed devices will receive update.
|
||||
* Update a value for a subscription. Currently all subscribed devices will receive update.
|
||||
* Device specific updates will be added in the future.
|
||||
* If sent equals false in the return value, you must wait for the peripheralManagerIsReadyToUpdateSubscribers event before sending more updates.
|
||||
* @param {NotifyParams} params
|
||||
@@ -996,7 +1006,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name encodedStringToBytes
|
||||
* @description Helper function to convert a base64 encoded string from a characteristic or descriptor value into a uint8Array object
|
||||
* Helper function to convert a base64 encoded string from a characteristic or descriptor value into a uint8Array object
|
||||
* @param {string} str
|
||||
* @returns {Uint8Array}
|
||||
*/
|
||||
@@ -1007,7 +1017,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name bytesToEncodedString
|
||||
* @description Helper function to convert a unit8Array to a base64 encoded string for a characteric or descriptor write
|
||||
* Helper function to convert a unit8Array to a base64 encoded string for a characteric or descriptor write
|
||||
* @param {Uint8Array} bytes
|
||||
* @returns {string}
|
||||
*/
|
||||
@@ -1018,18 +1028,18 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name stringToBytes
|
||||
* @description Helper function to convert a string to bytes
|
||||
* @param {Uint8Array} value
|
||||
* @returns {string}
|
||||
* Helper function to convert a string to bytes
|
||||
* @param {string} value
|
||||
* @returns {Uint8Array}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
stringToBytes(value: Uint8Array): string {
|
||||
stringToBytes(value: string): Uint8Array {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name bytesToString
|
||||
* @description Helper function to convert bytes to a string.
|
||||
* Helper function to convert bytes to a string.
|
||||
* @param {Uint8Array} value
|
||||
* @returns {string}
|
||||
*/
|
||||
|
||||
@@ -7,8 +7,8 @@ export interface CallDirectoryItem {
|
||||
}
|
||||
|
||||
export interface CallDirectoryLog {
|
||||
plugin: Array<string>;
|
||||
extension: Array<string>;
|
||||
plugin: string[];
|
||||
extension: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -62,21 +62,21 @@ 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()
|
||||
addIdentification(items: Array<CallDirectoryItem>): Promise<any> {
|
||||
addIdentification(items: CallDirectoryItem[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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()
|
||||
removeIdentification(items: Array<CallDirectoryItem>): Promise<any> {
|
||||
removeIdentification(items: CallDirectoryItem[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -91,10 +91,10 @@ 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<Array<CallDirectoryItem>> {
|
||||
getAllItems(): Promise<CallDirectoryItem[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface CallLogObject {
|
||||
name: string;
|
||||
value: string | Array<string>;
|
||||
value: string | string[];
|
||||
operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'like';
|
||||
}
|
||||
|
||||
|
||||
@@ -165,7 +165,6 @@ export enum Direction {
|
||||
})
|
||||
@Injectable()
|
||||
export class Camera extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Constant for possible destination types
|
||||
*/
|
||||
@@ -200,7 +199,6 @@ export class Camera extends IonicNativePlugin {
|
||||
ALLMEDIA: 2
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Convenience constant
|
||||
*/
|
||||
@@ -213,7 +211,6 @@ export class Camera extends IonicNativePlugin {
|
||||
SAVEDPHOTOALBUM: 2
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Convenience constant
|
||||
*/
|
||||
@@ -258,5 +255,4 @@ export class Camera extends IonicNativePlugin {
|
||||
cleanup(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface ChooserResult {
|
||||
data: Uint8Array;
|
||||
dataURI: string;
|
||||
mediaType: string;
|
||||
name: string;
|
||||
uri: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Chooser
|
||||
* @description
|
||||
* File chooser plugin for Cordova.
|
||||
*
|
||||
* The following must be added to config.xml to prevent crashing when selecting large files on Android:
|
||||
* ```xml
|
||||
* <platform name="android">
|
||||
* <edit-config
|
||||
* file="app/src/main/AndroidManifest.xml"
|
||||
* mode="merge"
|
||||
* target="/manifest/application">
|
||||
* <application android:largeHeap="true" />
|
||||
* </edit-config>
|
||||
* </platform>
|
||||
* ```
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Chooser } from '@ionic-native/chooser';
|
||||
*
|
||||
*
|
||||
* constructor(private chooser: Chooser) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.chooser.getFile()
|
||||
* .then(file => console.log(file ? file.name : 'canceled'))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*
|
||||
* @interfaces
|
||||
* ChooserResult
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Chooser',
|
||||
plugin: 'cordova-plugin-chooser',
|
||||
pluginRef: 'chooser',
|
||||
repo: 'https://github.com/cyph/cordova-plugin-chooser',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Chooser extends IonicNativePlugin {
|
||||
/**
|
||||
* Displays native prompt for user to select a file.
|
||||
* @param {string} [accept] Optional MIME type filter (e.g. 'image/gif,video/*').
|
||||
* @return {Promise<any>} Promise containing selected file's raw binary data,
|
||||
* base64-encoded data: URI, MIME type, display name, and original URI.
|
||||
*/
|
||||
@Cordova()
|
||||
getFile(accept: string): Promise<ChooserResult | undefined> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Clipboard
|
||||
* @description
|
||||
@@ -63,6 +62,7 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,23 +156,9 @@ interface NativeUpdateNotification {
|
||||
appVersion: string;
|
||||
}
|
||||
|
||||
export interface Callback<T> {
|
||||
(error: Error, parameter: T): void;
|
||||
}
|
||||
export interface SuccessCallback<T> {
|
||||
(result?: T): void;
|
||||
}
|
||||
export interface ErrorCallback {
|
||||
(error?: Error): void;
|
||||
}
|
||||
|
||||
export interface SuccessCallback<T> {
|
||||
(result?: T): void;
|
||||
}
|
||||
|
||||
export interface ErrorCallback {
|
||||
(error?: Error): void;
|
||||
}
|
||||
export type Callback<T> = (error: Error, parameter: T) => void;
|
||||
export type SuccessCallback<T> = (result?: T) => void;
|
||||
export type ErrorCallback = (error?: Error) => void;
|
||||
|
||||
interface Configuration {
|
||||
appVersion: string;
|
||||
@@ -189,18 +175,18 @@ declare class AcquisitionStatus {
|
||||
|
||||
declare class AcquisitionManager {
|
||||
constructor(httpRequester: Http.Requester, configuration: Configuration);
|
||||
public queryUpdateWithCurrentPackage(
|
||||
queryUpdateWithCurrentPackage(
|
||||
currentPackage: IPackage,
|
||||
callback?: Callback<IRemotePackage | NativeUpdateNotification>
|
||||
): void;
|
||||
public reportStatusDeploy(
|
||||
reportStatusDeploy(
|
||||
pkg?: IPackage,
|
||||
status?: string,
|
||||
previousLabelOrAppVersion?: string,
|
||||
previousDeploymentKey?: string,
|
||||
callback?: Callback<void>
|
||||
): void;
|
||||
public reportStatusDownload(pkg: IPackage, callback?: Callback<void>): void;
|
||||
reportStatusDownload(pkg: IPackage, callback?: Callback<void>): void;
|
||||
}
|
||||
|
||||
interface CodePushCordovaPlugin {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import {
|
||||
checkAvailability,
|
||||
CordovaCheck,
|
||||
CordovaInstance,
|
||||
getPromise,
|
||||
InstanceCheck,
|
||||
InstanceProperty,
|
||||
IonicNativePlugin,
|
||||
Plugin
|
||||
Plugin,
|
||||
checkAvailability,
|
||||
getPromise
|
||||
} from '@ionic-native/core';
|
||||
|
||||
declare const window: any, navigator: any;
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
Cordova,
|
||||
CordovaProperty,
|
||||
IonicNativePlugin,
|
||||
Plugin
|
||||
} from '@ionic-native/core';
|
||||
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Diagnostic
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name iOS DocumentPicker
|
||||
|
||||
@@ -78,7 +78,7 @@ export class DocumentViewer extends IonicNativePlugin {
|
||||
*
|
||||
* @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}
|
||||
|
||||
@@ -2,9 +2,9 @@ import { Injectable } from '@angular/core';
|
||||
import {
|
||||
Cordova,
|
||||
CordovaCheck,
|
||||
getPromise,
|
||||
IonicNativePlugin,
|
||||
Plugin
|
||||
Plugin,
|
||||
getPromise
|
||||
} from '@ionic-native/core';
|
||||
|
||||
export interface EmailComposerOptions {
|
||||
@@ -16,17 +16,17 @@ export interface EmailComposerOptions {
|
||||
/**
|
||||
* Email address(es) for To field
|
||||
*/
|
||||
to?: string | Array<string>;
|
||||
to?: string | string[];
|
||||
|
||||
/**
|
||||
* Email address(es) for CC field
|
||||
*/
|
||||
cc?: string | Array<string>;
|
||||
cc?: string | string[];
|
||||
|
||||
/**
|
||||
* Email address(es) for BCC field
|
||||
*/
|
||||
bcc?: string | Array<string>;
|
||||
bcc?: string | string[];
|
||||
|
||||
/**
|
||||
* File paths or base64 data streams
|
||||
@@ -118,6 +118,30 @@ export interface EmailComposerOptions {
|
||||
})
|
||||
@Injectable()
|
||||
export class EmailComposer extends IonicNativePlugin {
|
||||
/**
|
||||
* Checks if the app has a permission to access email accounts information
|
||||
* @return {Promise<boolean>} returns a promise that resolves with a boolean that indicates if the permission was granted
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 0,
|
||||
errorIndex: 2
|
||||
})
|
||||
hasPermission(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request permission to access email accounts information
|
||||
* @return {Promise<boolean>} returns a promise that resolves with a boolean that indicates if the permission was granted
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 0,
|
||||
errorIndex: 2
|
||||
})
|
||||
requestPermission(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verifies if sending emails is supported on the device.
|
||||
*
|
||||
@@ -147,39 +171,6 @@ export class EmailComposer extends IonicNativePlugin {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Request permission to access email accounts information
|
||||
* @return {Promise<boolean>} returns a promise that resolves with a boolean that indicates if the permission was granted
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 0,
|
||||
errorIndex: 2
|
||||
})
|
||||
requestPermission(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the app has a permission to access email accounts information
|
||||
* @return {Promise<boolean>} returns a promise that resolves with a boolean that indicates if the permission was granted
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 0,
|
||||
errorIndex: 2
|
||||
})
|
||||
hasPermission(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a new mail app alias.
|
||||
*
|
||||
* @param {string} alias The alias name
|
||||
* @param {string} packageName The package name
|
||||
*/
|
||||
@Cordova()
|
||||
addAlias(alias: string, packageName: string): void {}
|
||||
|
||||
/**
|
||||
* Displays the email composer pre-filled with data.
|
||||
*
|
||||
@@ -194,4 +185,13 @@ export class EmailComposer extends IonicNativePlugin {
|
||||
open(options: EmailComposerOptions, scope?: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a new mail app alias.
|
||||
*
|
||||
* @param {string} alias The alias name
|
||||
* @param {string} packageName The package name
|
||||
*/
|
||||
@Cordova()
|
||||
addAlias(alias: string, packageName: string): void {}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
checkAvailability,
|
||||
CordovaInstance,
|
||||
InstanceCheck,
|
||||
IonicNativePlugin,
|
||||
Plugin
|
||||
Plugin,
|
||||
checkAvailability
|
||||
} from '@ionic-native/core';
|
||||
|
||||
export interface FileUploadOptions {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { CordovaCheck, CordovaProperty, getPromise, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { CordovaCheck, CordovaProperty, IonicNativePlugin, Plugin, getPromise } from '@ionic-native/core';
|
||||
|
||||
export interface IFile extends Blob {
|
||||
/**
|
||||
@@ -405,84 +405,52 @@ export interface FileEntry extends Entry {
|
||||
/**
|
||||
* When requestFileSystem() succeeds, the following callback is made.
|
||||
*/
|
||||
export interface FileSystemCallback {
|
||||
/**
|
||||
* @param filesystem The file systems to which the app is granted access.
|
||||
*/
|
||||
(filesystem: FileSystem): void;
|
||||
}
|
||||
export type FileSystemCallback = (filesystem: FileSystem) => void;
|
||||
|
||||
/**
|
||||
* This export interface is the callback used to look up Entry objects.
|
||||
*/
|
||||
export interface EntryCallback {
|
||||
/**
|
||||
* @param entry
|
||||
*/
|
||||
(entry: Entry): void;
|
||||
}
|
||||
export type EntryCallback = (entry: Entry) => void;
|
||||
|
||||
/**
|
||||
* This export interface is the callback used to look up FileEntry objects.
|
||||
*/
|
||||
export interface FileEntryCallback {
|
||||
/**
|
||||
* @param entry
|
||||
*/
|
||||
(entry: FileEntry): void;
|
||||
}
|
||||
export type FileEntryCallback = (entry: FileEntry) => void;
|
||||
|
||||
/**
|
||||
* This export interface is the callback used to look up DirectoryEntry objects.
|
||||
*/
|
||||
export interface DirectoryEntryCallback {
|
||||
/**
|
||||
* @param entry
|
||||
*/
|
||||
(entry: DirectoryEntry): void;
|
||||
}
|
||||
export type DirectoryEntryCallback = (entry: DirectoryEntry) => void;
|
||||
|
||||
/**
|
||||
* When readEntries() succeeds, the following callback is made.
|
||||
*/
|
||||
export interface EntriesCallback {
|
||||
(entries: Entry[]): void;
|
||||
}
|
||||
export type EntriesCallback = (entries: Entry[]) => void;
|
||||
|
||||
/**
|
||||
* This export interface is the callback used to look up file and directory metadata.
|
||||
*/
|
||||
export interface MetadataCallback {
|
||||
(metadata: Metadata): void;
|
||||
}
|
||||
export type MetadataCallback = (metadata: Metadata) => void;
|
||||
|
||||
/**
|
||||
* This export interface is the callback used to create a FileWriter.
|
||||
*/
|
||||
export interface FileWriterCallback {
|
||||
(fileWriter: FileWriter): void;
|
||||
}
|
||||
export type FileWriterCallback = (fileWriter: FileWriter) => void;
|
||||
|
||||
/**
|
||||
* This export interface is the callback used to obtain a File.
|
||||
*/
|
||||
export interface FileCallback {
|
||||
(file: IFile): void;
|
||||
}
|
||||
export type FileCallback = (file: IFile) => void;
|
||||
|
||||
/**
|
||||
* This export interface is the generic callback used to indicate success of an asynchronous method.
|
||||
*/
|
||||
export interface VoidCallback {
|
||||
(): void;
|
||||
}
|
||||
export type VoidCallback = () => void;
|
||||
|
||||
/**
|
||||
* When an error occurs, the following callback is made.
|
||||
*/
|
||||
export interface ErrorCallback {
|
||||
(err: FileError): void;
|
||||
}
|
||||
export type ErrorCallback = (err: FileError) => void;
|
||||
|
||||
export interface RemoveResult {
|
||||
success: boolean;
|
||||
@@ -1118,8 +1086,8 @@ export class File extends IonicNativePlugin {
|
||||
});
|
||||
}
|
||||
|
||||
/* Write a new file to the desired location.
|
||||
*
|
||||
/**
|
||||
* Write a new file to the desired location.
|
||||
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
|
||||
* @param {string} fileName path relative to base path
|
||||
* @param {string | Blob | ArrayBuffer} text content, blob or ArrayBuffer to write
|
||||
@@ -1154,6 +1122,7 @@ export class File extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Write content to FileEntry.
|
||||
* @hidden
|
||||
* Write to an existing file.
|
||||
* @param {FileEntry} fe file entry object
|
||||
@@ -1213,6 +1182,7 @@ export class File extends IonicNativePlugin {
|
||||
* Read file and return data as a base64 encoded data url.
|
||||
* A data url is of the form:
|
||||
* data: [<mediatype>][;base64],<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 data URL or rejects
|
||||
@@ -1247,6 +1217,46 @@ export class File extends IonicNativePlugin {
|
||||
return this.readFile<ArrayBuffer>(path, file, 'ArrayBuffer');
|
||||
}
|
||||
|
||||
private readFile<T>(
|
||||
path: string,
|
||||
file: string,
|
||||
readAs: 'ArrayBuffer' | 'BinaryString' | 'DataURL' | 'Text'
|
||||
): Promise<T> {
|
||||
if (/^\//.test(file)) {
|
||||
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.
|
||||
*
|
||||
@@ -1361,7 +1371,7 @@ export class File extends IonicNativePlugin {
|
||||
resolveDirectoryUrl(directoryUrl: string): Promise<DirectoryEntry> {
|
||||
return this.resolveLocalFilesystemUrl(directoryUrl).then(de => {
|
||||
if (de.isDirectory) {
|
||||
return <DirectoryEntry>de;
|
||||
return de as DirectoryEntry;
|
||||
} else {
|
||||
const err = new FileError(13);
|
||||
err.message = 'input is not a directory';
|
||||
@@ -1449,7 +1459,7 @@ export class File extends IonicNativePlugin {
|
||||
return getPromise<T>((resolve, reject) => {
|
||||
reader.onloadend = () => {
|
||||
if (reader.result !== undefined || reader.result !== null) {
|
||||
resolve(<T>(<any>reader.result));
|
||||
resolve((reader.result as any) as T);
|
||||
} else if (reader.error !== undefined || reader.error !== null) {
|
||||
reject(reader.error);
|
||||
} else {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
export interface IDynamicLink {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
checkAvailability,
|
||||
CordovaInstance,
|
||||
IonicNativePlugin,
|
||||
Plugin
|
||||
Plugin,
|
||||
checkAvailability
|
||||
} from '@ionic-native/core';
|
||||
|
||||
export interface FlurryAnalyticsOptions {
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
Cordova,
|
||||
CordovaFunctionOverride,
|
||||
IonicNativePlugin,
|
||||
Plugin
|
||||
} from '@ionic-native/core';
|
||||
import { Cordova, CordovaFunctionOverride, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
declare const window: any;
|
||||
@@ -100,9 +95,7 @@ export class Geofence extends IonicNativePlugin {
|
||||
* @return {Observable<any>}
|
||||
*/
|
||||
@CordovaFunctionOverride()
|
||||
onTransitionReceived(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
onTransitionReceived(): Observable<any> { return; }
|
||||
|
||||
/**
|
||||
* Initializes the plugin. User will be prompted to allow the app to use location and notifications.
|
||||
@@ -110,9 +103,7 @@ export class Geofence extends IonicNativePlugin {
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
initialize(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
initialize(): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Adds a new geofence or array of geofences. For geofence object, see above.
|
||||
@@ -120,9 +111,7 @@ export class Geofence extends IonicNativePlugin {
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
addOrUpdate(geofences: Object | Array<Object>): Promise<void> {
|
||||
return;
|
||||
}
|
||||
addOrUpdate(geofences: Object | Object[]): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Removes a geofence or array of geofences. `geofenceID` corresponds to one or more IDs specified when the
|
||||
@@ -131,9 +120,7 @@ export class Geofence extends IonicNativePlugin {
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
remove(geofenceId: string | Array<string>): Promise<void> {
|
||||
return;
|
||||
}
|
||||
remove(geofenceId: string | string[]): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Removes all geofences.
|
||||
@@ -141,19 +128,15 @@ export class Geofence extends IonicNativePlugin {
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
removeAll(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
removeAll(): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Returns an array of geofences currently being monitored.
|
||||
*
|
||||
* @returns {Promise<Array<string>>}
|
||||
* @returns {Promise<string[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
getWatched(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
getWatched(): Promise<string> { return; }
|
||||
|
||||
/**
|
||||
* Called when the user clicks a geofence notification. iOS and Android only.
|
||||
|
||||
@@ -126,7 +126,7 @@ export class Globalization extends IonicNativePlugin {
|
||||
/**
|
||||
* Returns an array of the names of the months or days of the week, depending on the client's user preferences and calendar.
|
||||
* @param options Object with type (narrow or wide) and item (month or days).
|
||||
* @returns {Promise<{value: Array<string>}>} Returns a promise.
|
||||
* @returns {Promise<{value: string[]}>} Returns a promise.
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
@@ -134,7 +134,7 @@ export class Globalization extends IonicNativePlugin {
|
||||
getDateNames(options: {
|
||||
type: string;
|
||||
item: string;
|
||||
}): Promise<{ value: Array<string> }> {
|
||||
}): Promise<{ value: string[] }> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
* this.ga.startTrackerWithId('YOUR_TRACKER_ID')
|
||||
* .then(() => {
|
||||
* console.log('Google analytics is ready now');
|
||||
* this.ga.trackView('test');
|
||||
* this.ga.trackView('test');
|
||||
* // Tracker is ready
|
||||
* // You can now track pages or set additional information such as AppVersion or UserId
|
||||
* })
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/**
|
||||
|
||||
@@ -88,14 +88,12 @@ export class Gyroscope extends IonicNativePlugin {
|
||||
* @return {Observable<GyroscopeOrientation>} Returns an Observable that resolves GyroscopeOrientation
|
||||
*/
|
||||
watch(options?: GyroscopeOptions): Observable<GyroscopeOrientation> {
|
||||
return new Observable<GyroscopeOrientation>((observer: any) => {
|
||||
const watchId = navigator.gyroscope.watch(
|
||||
observer.next.bind(observer),
|
||||
observer.next.bind(observer),
|
||||
options
|
||||
);
|
||||
return () => navigator.gyroscope.clearWatch(watchId);
|
||||
});
|
||||
return new Observable<GyroscopeOrientation>(
|
||||
(observer: any) => {
|
||||
const watchId = navigator.gyroscope.watch(observer.next.bind(observer), observer.next.bind(observer), options);
|
||||
return () => navigator.gyroscope.clearWatch(watchId);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name hce
|
||||
@@ -77,9 +77,5 @@ export class HCE extends IonicNativePlugin {
|
||||
}
|
||||
}
|
||||
|
||||
export interface HCECommandEvent {
|
||||
(command: Uint8Array): void;
|
||||
}
|
||||
export interface HCEDeactivatedEvent {
|
||||
(command: number): void;
|
||||
}
|
||||
export type HCECommandEvent = (command: Uint8Array) => void;
|
||||
export type HCEDeactivatedEvent = (command: number) => void;
|
||||
|
||||
@@ -207,7 +207,6 @@ export interface HealthData {
|
||||
})
|
||||
@Injectable()
|
||||
export class Health extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Tells if either Google Fit or HealthKit are available.
|
||||
*
|
||||
@@ -254,11 +253,11 @@ export class Health extends IonicNativePlugin {
|
||||
* In Android 6 and over, this function will also ask for some dynamic permissions if needed
|
||||
* (e.g. in the case of "distance", it will need access to ACCESS_FINE_LOCATION).
|
||||
*
|
||||
* @param {Array<string | HealthDataType>} datatypes a list of data types you want to be granted access to.
|
||||
* @param {string[] | HealthDataType[]} datatypes a list of data types you want to be granted access to.
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
requestAuthorization(datatypes: Array<string | HealthDataType>): Promise<any> {
|
||||
requestAuthorization(datatypes: (string | HealthDataType)[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -270,11 +269,11 @@ export class Health extends IonicNativePlugin {
|
||||
* In iOS, this function will only check authorization status for writeable data.
|
||||
* Read-only data will always be considered as not authorized. This is an intended behaviour of HealthKit.
|
||||
*
|
||||
* @param {Array<string | HealthDataType>} datatypes a list of data types you want to check access of, same as in requestAuthorization
|
||||
* @param {string[] | HealthDataType[]} datatypes a list of data types you want to check access of, same as in requestAuthorization
|
||||
* @return {Promise<boolean>} Returns a promise that resolves with a boolean that indicates the authorization status
|
||||
*/
|
||||
@Cordova()
|
||||
isAuthorized(datatypes: Array<string | HealthDataType>): Promise<boolean> {
|
||||
isAuthorized(datatypes: (string | HealthDataType)[]): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -310,7 +309,9 @@ export class Health extends IonicNativePlugin {
|
||||
* @return {Promise<HealthData[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
query(queryOptions: HealthQueryOptions): Promise<HealthData[]> { return; }
|
||||
query(queryOptions: HealthQueryOptions): Promise<HealthData[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets aggregated data in a certain time window. Usually the sum is returned for the given quantity.
|
||||
@@ -334,7 +335,9 @@ export class Health extends IonicNativePlugin {
|
||||
* @return {Promise<HealthData[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
queryAggregated(queryOptionsAggregated: HealthQueryOptionsAggregated): Promise<HealthData[]> {
|
||||
queryAggregated(
|
||||
queryOptionsAggregated: HealthQueryOptionsAggregated
|
||||
): Promise<HealthData[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -356,5 +359,4 @@ export class Health extends IonicNativePlugin {
|
||||
store(storeOptions: HealthStoreOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
Cordova,
|
||||
Plugin,
|
||||
IonicNativePlugin,
|
||||
CordovaCheck
|
||||
} from '@ionic-native/core';
|
||||
import { Cordova, CordovaCheck, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
declare var chcp: any;
|
||||
|
||||
@@ -119,7 +119,7 @@ export interface HotspotDevice {
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.hotspot.scanWifi().then((networks: Array<HotspotNetwork>) => {
|
||||
* this.hotspot.scanWifi().then((networks: HotspotNetwork[]) => {
|
||||
* console.log(networks);
|
||||
* });
|
||||
*
|
||||
@@ -215,12 +215,10 @@ export class Hotspot extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Promise<Array<HotspotDevice>>}
|
||||
* @returns {Promise<HotspotDevice[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
getAllHotspotDevices(): Promise<Array<HotspotDevice>> {
|
||||
return;
|
||||
}
|
||||
getAllHotspotDevices(): Promise<HotspotDevice[]> { return; }
|
||||
|
||||
/**
|
||||
* Connect to a WiFi network
|
||||
@@ -254,9 +252,7 @@ export class Hotspot extends IonicNativePlugin {
|
||||
* Promise that connection to the WiFi network was successfull, rejected if unsuccessful
|
||||
*/
|
||||
@Cordova()
|
||||
connectToWifiAuthEncrypt(ssid: string, password: string, authentication: string, encryption: Array<string>): Promise<void> {
|
||||
return;
|
||||
}
|
||||
connectToWifiAuthEncrypt(ssid: string, password: string, authentication: string, encryption: string[]): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Add a WiFi network
|
||||
@@ -331,20 +327,16 @@ export class Hotspot extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Promise<Array<HotspotNetwork>>}
|
||||
* @returns {Promise<HotspotNetwork[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
scanWifi(): Promise<Array<HotspotNetwork>> {
|
||||
return;
|
||||
}
|
||||
scanWifi(): Promise<HotspotNetwork[]> { return; }
|
||||
|
||||
/**
|
||||
* @returns {Promise<Array<HotspotNetwork>>}
|
||||
* @returns {Promise<HotspotNetwork[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
scanWifiByLevel(): Promise<Array<HotspotNetwork>> {
|
||||
return;
|
||||
}
|
||||
scanWifiByLevel(): Promise<HotspotNetwork[]> { return; }
|
||||
|
||||
/**
|
||||
* @returns {Promise<any>}
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
Cordova,
|
||||
CordovaCheck,
|
||||
IonicNativePlugin,
|
||||
Plugin
|
||||
} from '@ionic-native/core';
|
||||
import { Cordova, CordovaCheck, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
declare const cordova: any;
|
||||
@@ -273,7 +268,7 @@ export interface IBeaconDelegate {
|
||||
*
|
||||
* this.ibeacon.startMonitoringForRegion(beaconRegion)
|
||||
* .then(
|
||||
* () => console.log('Native layer recieved the request to monitoring'),
|
||||
* () => console.log('Native layer received the request to monitoring'),
|
||||
* error => console.error('Native layer failed to begin monitoring: ', error)
|
||||
* );
|
||||
* ```
|
||||
@@ -304,79 +299,85 @@ export class IBeacon extends IonicNativePlugin {
|
||||
Delegate(): IBeaconDelegate {
|
||||
const delegate = new cordova.plugins.locationManager.Delegate();
|
||||
|
||||
delegate.didChangeAuthorizationStatus = (
|
||||
pluginResult?: IBeaconPluginResult
|
||||
) => {
|
||||
return new Observable<IBeaconPluginResult>((observer: any) => {
|
||||
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
return (delegate.didChangeAuthorizationStatus = cb);
|
||||
});
|
||||
delegate.didChangeAuthorizationStatus = (pluginResult?: IBeaconPluginResult) => {
|
||||
return new Observable<IBeaconPluginResult>(
|
||||
(observer: any) => {
|
||||
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
return delegate.didChangeAuthorizationStatus = cb;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
delegate.didDetermineStateForRegion = (
|
||||
pluginResult?: IBeaconPluginResult
|
||||
) => {
|
||||
return new Observable<IBeaconPluginResult>((observer: any) => {
|
||||
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
return (delegate.didDetermineStateForRegion = cb);
|
||||
});
|
||||
delegate.didDetermineStateForRegion = (pluginResult?: IBeaconPluginResult) => {
|
||||
return new Observable<IBeaconPluginResult>(
|
||||
(observer: any) => {
|
||||
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
return delegate.didDetermineStateForRegion = cb;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
delegate.didEnterRegion = (pluginResult?: IBeaconPluginResult) => {
|
||||
return new Observable<IBeaconPluginResult>((observer: any) => {
|
||||
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
return (delegate.didEnterRegion = cb);
|
||||
});
|
||||
return new Observable<IBeaconPluginResult>(
|
||||
(observer: any) => {
|
||||
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
return delegate.didEnterRegion = cb;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
delegate.didExitRegion = (pluginResult?: IBeaconPluginResult) => {
|
||||
return new Observable<IBeaconPluginResult>((observer: any) => {
|
||||
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
return (delegate.didExitRegion = cb);
|
||||
});
|
||||
return new Observable<IBeaconPluginResult>(
|
||||
(observer: any) => {
|
||||
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
return delegate.didExitRegion = cb;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
delegate.didRangeBeaconsInRegion = (pluginResult?: IBeaconPluginResult) => {
|
||||
return new Observable<IBeaconPluginResult>((observer: any) => {
|
||||
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
return (delegate.didRangeBeaconsInRegion = cb);
|
||||
});
|
||||
return new Observable<IBeaconPluginResult>(
|
||||
(observer: any) => {
|
||||
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
return delegate.didRangeBeaconsInRegion = cb;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
delegate.didStartMonitoringForRegion = (
|
||||
pluginResult?: IBeaconPluginResult
|
||||
) => {
|
||||
return new Observable<IBeaconPluginResult>((observer: any) => {
|
||||
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
return (delegate.didStartMonitoringForRegion = cb);
|
||||
});
|
||||
delegate.didStartMonitoringForRegion = (pluginResult?: IBeaconPluginResult) => {
|
||||
return new Observable<IBeaconPluginResult>(
|
||||
(observer: any) => {
|
||||
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
return delegate.didStartMonitoringForRegion = cb;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
delegate.monitoringDidFailForRegionWithError = (
|
||||
pluginResult?: IBeaconPluginResult
|
||||
) => {
|
||||
return new Observable<IBeaconPluginResult>((observer: any) => {
|
||||
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
return (delegate.monitoringDidFailForRegionWithError = cb);
|
||||
});
|
||||
delegate.monitoringDidFailForRegionWithError = (pluginResult?: IBeaconPluginResult) => {
|
||||
return new Observable<IBeaconPluginResult>(
|
||||
(observer: any) => {
|
||||
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
return delegate.monitoringDidFailForRegionWithError = cb;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
delegate.peripheralManagerDidStartAdvertising = (
|
||||
pluginResult?: IBeaconPluginResult
|
||||
) => {
|
||||
return new Observable<IBeaconPluginResult>((observer: any) => {
|
||||
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
return (delegate.peripheralManagerDidStartAdvertising = cb);
|
||||
});
|
||||
delegate.peripheralManagerDidStartAdvertising = (pluginResult?: IBeaconPluginResult) => {
|
||||
return new Observable<IBeaconPluginResult>(
|
||||
(observer: any) => {
|
||||
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
return delegate.peripheralManagerDidStartAdvertising = cb;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
delegate.peripheralManagerDidUpdateState = (
|
||||
pluginResult?: IBeaconPluginResult
|
||||
) => {
|
||||
return new Observable<IBeaconPluginResult>((observer: any) => {
|
||||
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
return (delegate.peripheralManagerDidUpdateState = cb);
|
||||
});
|
||||
delegate.peripheralManagerDidUpdateState = (pluginResult?: IBeaconPluginResult) => {
|
||||
return new Observable<IBeaconPluginResult>(
|
||||
(observer: any) => {
|
||||
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
return delegate.peripheralManagerDidUpdateState = cb;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
cordova.plugins.locationManager.setDelegate(delegate);
|
||||
|
||||
@@ -12,46 +12,36 @@ declare const cordova: Cordova & { InAppBrowser: any };
|
||||
export interface InAppBrowserOptions {
|
||||
/** Set to yes or no to turn the InAppBrowser's location bar on or off. */
|
||||
location?: 'yes' | 'no';
|
||||
/**
|
||||
* Set to yes to create the browser and load the page, but not show it. The loadstop event fires when loading is complete.
|
||||
* Omit or set to no (default) to have the browser open and load normally.
|
||||
*/
|
||||
/* Set to yes to create the browser and load the page, but not show it. The loadstop event fires when loading is complete.
|
||||
* Omit or set to no (default) to have the browser open and load normally. */
|
||||
hidden?: 'yes' | 'no';
|
||||
/** Set to yes to have the browser's cookie cache cleared before the new window is opened. */
|
||||
clearcache?: 'yes';
|
||||
/** Set to yes to have the session cookie cache cleared before the new window is opened. */
|
||||
/* Set to yes to have the session cookie cache cleared before the new window is opened. */
|
||||
clearsessioncache?: 'yes';
|
||||
/*
|
||||
* (Android) Set to a string to use as the close button's caption instead of a X. Note that you need to localize this value yourself.
|
||||
/* (Android) Set to a string to use as the close button's caption instead of a X. Note that you need to localize this value yourself.
|
||||
* (iOS) Set to a string to use as the Done button's caption. Note that you need to localize this value yourself. */
|
||||
closebuttoncaption?: string;
|
||||
/*
|
||||
* (Android) Set to a valid hex color string, for example: #00ff00, and it will change the close button color from default, regardless of being a text or default X. Only has effect if user has location set to yes.
|
||||
/* (Android) Set to a valid hex color string, for example: #00ff00, and it will change the close button color from default, regardless of being a text or default X. Only has effect if user has location set to yes.
|
||||
* (iOS) Set as a valid hex color string, for example: #00ff00, to change from the default Done button's color. Only applicable if toolbar is not disabled. */
|
||||
closebuttoncolor?: string;
|
||||
/*
|
||||
* (Android Only) Set to yes to show Android browser's zoom controls, set to no to hide them. Default value is yes. */
|
||||
/** (Android Only) Set to yes to show Android browser's zoom controls, set to no to hide them. Default value is yes. */
|
||||
zoom?: 'yes' | 'no';
|
||||
/*
|
||||
* (Android & Windows Phone Only) Set to yes to use the hardware back button to navigate backwards through the InAppBrowser's history.
|
||||
/* (Android & Windows Phone Only) Set to yes to use the hardware back button to navigate backwards through the InAppBrowser's history.
|
||||
* If there is no previous page, the InAppBrowser will close. The default value is yes, so you must set it to no if you want the back button to simply close the InAppBrowser. */
|
||||
hardwareback?: 'yes' | 'no';
|
||||
/*
|
||||
* Set to yes to prevent HTML5 audio or video from autoplaying (defaults to no). */
|
||||
mediaPlaybackRequiresUserAction?: 'yes' | 'no';
|
||||
/*
|
||||
* (Android) Set to yes to hide the navigation buttons on the location toolbar, only has effect if user has location set to yes. The default value is no.
|
||||
/* (Android) Set to yes to hide the navigation buttons on the location toolbar, only has effect if user has location set to yes. The default value is no.
|
||||
* (iOS) Set to yes or no to turn the toolbar navigation buttons on or off (defaults to no). Only applicable if toolbar is not disabled.*/
|
||||
hidenavigationbuttons?: 'yes' | 'no';
|
||||
/*
|
||||
* (Android) Set to yes to hide the url bar on the location toolbar, only has effect if user has location set to yes. The default value is no.*/
|
||||
/* (Android) Set to yes to hide the url bar on the location toolbar, only has effect if user has location set to yes. The default value is no.*/
|
||||
hideurlbar?: 'yes' | 'no';
|
||||
/*
|
||||
* (Android) Set to a valid hex color string, for example: #00ff00, and it will change the color of both navigation buttons from default. Only has effect if user has location set to yes and not hidenavigationbuttons set to yes.
|
||||
/* (Android) Set to a valid hex color string, for example: #00ff00, and it will change the color of both navigation buttons from default. Only has effect if user has location set to yes and not hidenavigationbuttons set to yes.
|
||||
* (iOS) Set as a valid hex color string, for example: #00ff00, to change from the default color. Only applicable if navigation buttons are visible. */
|
||||
navigationbuttoncolor?: string;
|
||||
/*
|
||||
* (Android) Set to a valid hex color string, for example: #00ff00, and it will change the color the toolbar from default. Only has effect if user has location set to yes.
|
||||
/* (Android) Set to a valid hex color string, for example: #00ff00, and it will change the color the toolbar from default. Only has effect if user has location set to yes.
|
||||
* (iOS) Set as a valid hex color string, for example: #00ff00, to change from the default color of the toolbar. Only applicable if toolbar is not disabled.*/
|
||||
toolbarcolor?: string;
|
||||
/** (Android Only) Set to yes to make InAppBrowser WebView to pause/resume with the app to stop background audio (this may be required to avoid Google Play issues) */
|
||||
@@ -68,8 +58,7 @@ export interface InAppBrowserOptions {
|
||||
toolbartranslucent?: 'yes' | 'no';
|
||||
/** (iOS Only) Set to yes or no to prevent viewport scaling through a meta tag (defaults to no). */
|
||||
enableViewportScale?: 'yes' | 'no';
|
||||
/*
|
||||
* (iOS Only) Set to yes or no to allow in-line HTML5 media playback, displaying within the browser window rather than a device-specific playback interface.
|
||||
/* (iOS Only) Set to yes or no to allow in-line HTML5 media playback, displaying within the browser window rather than a device-specific playback interface.
|
||||
* The HTML's video element must also include the webkit-playsinline attribute (defaults to no) */
|
||||
allowInlineMediaPlayback?: 'yes' | 'no';
|
||||
/** (iOS Only) Set to yes or no to open the keyboard when form elements receive focus via JavaScript's focus() call (defaults to yes). */
|
||||
@@ -86,10 +75,8 @@ export interface InAppBrowserOptions {
|
||||
* (iOS Only) Set to yes or no to change the visibility of the loading indicator (defaults to no).
|
||||
*/
|
||||
hidespinner?: 'yes' | 'no';
|
||||
/**
|
||||
* (Windows only) Set to yes to create the browser control without a border around it.
|
||||
* Please note that if location=no is also specified, there will be no control presented to user to close IAB window.
|
||||
*/
|
||||
/* (Windows only) Set to yes to create the browser control without a border around it.
|
||||
* Please note that if location=no is also specified, there will be no control presented to user to close IAB window. */
|
||||
fullscreen?: 'yes';
|
||||
/** (Android Only) Sets whether the WebView should enable support for the "viewport" HTML meta tag or should use a wide viewport. When the value of the setting is no, the layout width is always set to the width of the WebView control in device-independent (CSS) pixels. When the value is yes and the page contains the viewport meta tag, the value of the width specified in the tag is used. If the page does not contain the tag or does not provide a width, then a wide viewport will be used. (defaults to yes). */
|
||||
useWideViewPort?: 'yes' | 'no';
|
||||
@@ -134,7 +121,9 @@ export class InAppBrowserObject {
|
||||
try {
|
||||
if (options && typeof options !== 'string') {
|
||||
options = Object.keys(options)
|
||||
.map((key: string) => `${key}=${(<InAppBrowserOptions>options)[key]}`)
|
||||
.map(
|
||||
(key: string) => `${key}=${(options as InAppBrowserOptions)[key]}`
|
||||
)
|
||||
.join(',');
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ export interface IAPProductOptions {
|
||||
type: string;
|
||||
}
|
||||
|
||||
export type IAPProducts = Array<IAPProduct> & {
|
||||
export type IAPProducts = IAPProduct[] & {
|
||||
/**
|
||||
* Get product by ID
|
||||
*/
|
||||
@@ -387,8 +387,7 @@ export class InAppPurchase2 extends IonicNativePlugin {
|
||||
* @param product {IAPProductOptions}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
register(product: IAPProductOptions): void {
|
||||
}
|
||||
register(product: IAPProductOptions): void {}
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
/* tslint:disable */
|
||||
/**
|
||||
* @name In App Review
|
||||
* @description
|
||||
@@ -25,6 +25,7 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
/* tslint:enable */
|
||||
@Plugin({
|
||||
pluginName: 'InAppReview',
|
||||
plugin: 'com.omarben.inappreview',
|
||||
@@ -34,7 +35,6 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
})
|
||||
@Injectable()
|
||||
export class InAppReview extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Open the inApp review popup
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
@@ -43,5 +43,4 @@ export class InAppReview extends IonicNativePlugin {
|
||||
requestReview(): Promise<any> {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, CordovaFunctionOverride, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import {
|
||||
Cordova,
|
||||
CordovaFunctionOverride,
|
||||
IonicNativePlugin,
|
||||
Plugin
|
||||
} from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
export interface IndexItem {
|
||||
@@ -16,7 +21,7 @@ export interface IndexItem {
|
||||
/**
|
||||
* Item keywords
|
||||
*/
|
||||
keywords?: Array < string > ;
|
||||
keywords?: string[];
|
||||
|
||||
/**
|
||||
* Lifetime in minutes
|
||||
@@ -78,37 +83,37 @@ export class IndexAppContent extends IonicNativePlugin {
|
||||
* @return {Promise<boolean>} Returns a promise that resolves with true if indexing is available, false if not
|
||||
*/
|
||||
@Cordova()
|
||||
isIndexingAvailable(): Promise <boolean> {
|
||||
isIndexingAvailable(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add or change items to spotlight index
|
||||
* @param {Array<IndexItem>} items Array of items to index
|
||||
* @return {Promise<any>} Returns if index set was successfull
|
||||
* @param {IndexItem[]} items Array of items to index
|
||||
* @return {Promise<any>} Returns if index set was successfully
|
||||
*/
|
||||
@Cordova()
|
||||
setItems(items: Array <IndexItem> ): Promise < any > {
|
||||
setItems(items: IndexItem[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear all items stored for a given array of domains
|
||||
* @param {Array<string>} domains Array of domains to clear
|
||||
* @return {Promise<any>} Resolve if successfull
|
||||
* @param {string[]} domains Array of domains to clear
|
||||
* @return {Promise<any>} Resolve if successfully
|
||||
*/
|
||||
@Cordova()
|
||||
clearItemsForDomains(domains: Array <string> ): Promise < any > {
|
||||
clearItemsForDomains(domains: string[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear all items stored for a given array of identifiers
|
||||
* @param {Array<string>} identifiers Array of identifiers to clear
|
||||
* @return {Promise<any>} Resolve if successfull
|
||||
* @param {string[]} identifiers Array of identifiers to clear
|
||||
* @return {Promise<any>} Resolve if successfully
|
||||
*/
|
||||
@Cordova()
|
||||
clearItemsForIdentifiers(identifiers: Array < string > ): Promise < any > {
|
||||
clearItemsForIdentifiers(identifiers: string[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -118,7 +123,7 @@ export class IndexAppContent extends IonicNativePlugin {
|
||||
* @returns {Observable<any>} returns an observable that notifies you when he user presses on the home screen icon
|
||||
*/
|
||||
@CordovaFunctionOverride()
|
||||
onItemPressed(): Observable < any > {
|
||||
onItemPressed(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,67 @@ export interface IntelSecurityDataOptions {
|
||||
webOwners?: String[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Intel Security
|
||||
* @description
|
||||
* The App Security API enables the use of security properties and capabilities on the platform, using a new set of API defined for application developers. You are not required to be a security expert to make good use of the API. Key elements, such as encryption of data and establishments of capabilities, is abstracted and done by the API implementation, for you.
|
||||
*
|
||||
* For example:
|
||||
* - Use the API to store (E.g. cache) data locally, using the device non-volatile storage. Data protection/encryption will be done for you by the API implementation
|
||||
* - Establish a connection with remote server (E.g. XHR) using a protected channel. SSL/TLS establishment and usage will be done for you by the API implementation
|
||||
*
|
||||
* For more information please visit the [API documentation](https://software.intel.com/en-us/app-security-api/api).
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { IntelSecurity } from '@ionic-native/intel-security';
|
||||
* ...
|
||||
* constructor(private intelSecurity: IntelSecurity) { }
|
||||
* ...
|
||||
*
|
||||
* let storageID = 'id';
|
||||
*
|
||||
* this.intelSecurity.data.createFromData({ data: 'Sample Data' })
|
||||
* .then((instanceID: Number) => this.intelSecurity.storage.write({ id: storageId, instanceID: instanceID }))
|
||||
* .catch((error: any) => console.log(error));
|
||||
*
|
||||
* this.intelSecurity.storage.read({id: storageID })
|
||||
* .then((instanceID: number) => this.intelSecurity.data.getData(instanceID))
|
||||
* .then((data: string) => console.log(data)) // Resolves to 'Sample Data'
|
||||
* .catch((error: any) => console.log(error));
|
||||
*
|
||||
* this.intelSecurity.storage.delete({ id: storageID })
|
||||
* .then(() => console.log('Deleted Successfully'))
|
||||
* .catch((error: any) => console.log(error));
|
||||
* ```
|
||||
* @classes
|
||||
* IntelSecurityData
|
||||
* IntelSecurityStorage
|
||||
* @interfaces
|
||||
* IntelSecurityDataOptions
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'IntelSecurity',
|
||||
plugin: 'com-intel-security-cordova-plugin',
|
||||
pluginRef: 'intel.security',
|
||||
repo: 'https://github.com/AppSecurityApi/com-intel-security-cordova-plugin',
|
||||
platforms: ['Android', 'iOS', 'Windows', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable()
|
||||
export class IntelSecurity extends IonicNativePlugin {
|
||||
/**
|
||||
* returns an IntelSecurityStorage object
|
||||
* @type {IntelSecurityStorage}
|
||||
*/
|
||||
storage: IntelSecurityStorage = new IntelSecurityStorage();
|
||||
|
||||
/**
|
||||
* Returns an IntelSecurityData object
|
||||
* @type {IntelSecurityData}
|
||||
*/
|
||||
data: IntelSecurityData = new IntelSecurityData();
|
||||
}
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
@@ -37,7 +98,6 @@ export interface IntelSecurityDataOptions {
|
||||
pluginRef: 'intel.security.secureData'
|
||||
})
|
||||
export class IntelSecurityData {
|
||||
|
||||
/**
|
||||
* This creates a new instance of secure data using plain-text data.
|
||||
* @param options {IntelSecurityDataOptions}
|
||||
@@ -105,7 +165,7 @@ export class IntelSecurityData {
|
||||
* @returns {Promise<Array>} Returns a promise that resolves to an array of owners' unique IDs, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
getOwners(instanceID: any): Promise<Array<any>> {
|
||||
getOwners(instanceID: any): Promise<any[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -125,7 +185,7 @@ export class IntelSecurityData {
|
||||
* @returns {Promise<Array>} Returns a promise that resolves to a list of web owners, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
getWebOwners(instanceID: any): Promise<Array<any>> {
|
||||
getWebOwners(instanceID: any): Promise<any[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -150,7 +210,6 @@ export class IntelSecurityData {
|
||||
destroy(instanceID: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -162,7 +221,6 @@ export class IntelSecurityData {
|
||||
pluginRef: 'intel.security.secureStorage'
|
||||
})
|
||||
export class IntelSecurityStorage {
|
||||
|
||||
/**
|
||||
* This deletes a secure storage resource (indicated by id).
|
||||
* @param options {Object}
|
||||
@@ -171,10 +229,7 @@ export class IntelSecurityStorage {
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with no parameters, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
delete(options: {
|
||||
id: string,
|
||||
storageType?: Number
|
||||
}): Promise<any> {
|
||||
delete(options: { id: string; storageType?: Number }): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -188,9 +243,9 @@ export class IntelSecurityStorage {
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
read(options: {
|
||||
id: string,
|
||||
storageType?: Number,
|
||||
extraKey?: Number
|
||||
id: string;
|
||||
storageType?: Number;
|
||||
extraKey?: Number;
|
||||
}): Promise<Number> {
|
||||
return;
|
||||
}
|
||||
@@ -205,74 +260,10 @@ export class IntelSecurityStorage {
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
write(options: {
|
||||
id: String,
|
||||
instanceID: Number,
|
||||
storageType?: Number
|
||||
id: String;
|
||||
instanceID: Number;
|
||||
storageType?: Number;
|
||||
}): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Intel Security
|
||||
* @description
|
||||
* The App Security API enables the use of security properties and capabilities on the platform, using a new set of API defined for application developers. You are not required to be a security expert to make good use of the API. Key elements, such as encryption of data and establishments of capabilities, is abstracted and done by the API implementation, for you.
|
||||
*
|
||||
* For example:
|
||||
* - Use the API to store (E.g. cache) data locally, using the device non-volatile storage. Data protection/encryption will be done for you by the API implementation
|
||||
* - Establish a connection with remote server (E.g. XHR) using a protected channel. SSL/TLS establishment and usage will be done for you by the API implementation
|
||||
*
|
||||
* For more information please visit the [API documentation](https://software.intel.com/en-us/app-security-api/api).
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { IntelSecurity } from '@ionic-native/intel-security';
|
||||
* ...
|
||||
* constructor(private intelSecurity: IntelSecurity) { }
|
||||
* ...
|
||||
*
|
||||
* let storageID = 'id';
|
||||
*
|
||||
* this.intelSecurity.data.createFromData({ data: 'Sample Data' })
|
||||
* .then((instanceID: Number) => this.intelSecurity.storage.write({ id: storageId, instanceID: instanceID }))
|
||||
* .catch((error: any) => console.log(error));
|
||||
*
|
||||
* this.intelSecurity.storage.read({id: storageID })
|
||||
* .then((instanceID: number) => this.intelSecurity.data.getData(instanceID))
|
||||
* .then((data: string) => console.log(data)) // Resolves to 'Sample Data'
|
||||
* .catch((error: any) => console.log(error));
|
||||
*
|
||||
* this.intelSecurity.storage.delete({ id: storageID })
|
||||
* .then(() => console.log('Deleted Successfully'))
|
||||
* .catch((error: any) => console.log(error));
|
||||
* ```
|
||||
* @classes
|
||||
* IntelSecurityData
|
||||
* IntelSecurityStorage
|
||||
* @interfaces
|
||||
* IntelSecurityDataOptions
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'IntelSecurity',
|
||||
plugin: 'com-intel-security-cordova-plugin',
|
||||
pluginRef: 'intel.security',
|
||||
repo: 'https://github.com/AppSecurityApi/com-intel-security-cordova-plugin',
|
||||
platforms: ['Android', 'iOS', 'Windows', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable()
|
||||
export class IntelSecurity extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* returns an IntelSecurityStorage object
|
||||
* @type {IntelSecurityStorage}
|
||||
*/
|
||||
storage: IntelSecurityStorage = new IntelSecurityStorage();
|
||||
|
||||
/**
|
||||
* Returns an IntelSecurityData object
|
||||
* @type {IntelSecurityData}
|
||||
*/
|
||||
data: IntelSecurityData = new IntelSecurityData();
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Ionic Webview
|
||||
|
||||
@@ -57,7 +57,6 @@ export class JinsMeme extends IonicNativePlugin {
|
||||
setAppClientID(appClientId: string, clientSecret: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts scanning for JINS MEME.
|
||||
* @returns {Observable<any>}
|
||||
@@ -70,7 +69,6 @@ export class JinsMeme extends IonicNativePlugin {
|
||||
startScan(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stops scanning JINS MEME.
|
||||
* @returns {Promise<any>}
|
||||
@@ -79,7 +77,6 @@ export class JinsMeme extends IonicNativePlugin {
|
||||
stopScan(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Establishes connection to JINS MEME.
|
||||
* @param {string} target
|
||||
@@ -109,7 +106,6 @@ export class JinsMeme extends IonicNativePlugin {
|
||||
setAutoConnect(flag: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether a connection to JINS MEME has been established.
|
||||
* @returns {Promise<any>}
|
||||
@@ -118,7 +114,6 @@ export class JinsMeme extends IonicNativePlugin {
|
||||
isConnected(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Disconnects from JINS MEME.
|
||||
* @returns {Promise<any>}
|
||||
@@ -127,7 +122,6 @@ export class JinsMeme extends IonicNativePlugin {
|
||||
disconnect(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts receiving realtime data.
|
||||
* @returns {Observable<any>}
|
||||
@@ -140,7 +134,6 @@ export class JinsMeme extends IonicNativePlugin {
|
||||
startDataReport(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stops receiving data.
|
||||
* @returns {Promise<any>}
|
||||
@@ -149,7 +142,6 @@ export class JinsMeme extends IonicNativePlugin {
|
||||
stopDataReport(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns SDK version.
|
||||
*
|
||||
@@ -159,7 +151,6 @@ export class JinsMeme extends IonicNativePlugin {
|
||||
getSDKVersion(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns JINS MEME connected with other apps.
|
||||
* @returns {Promise<any>}
|
||||
@@ -168,7 +159,6 @@ export class JinsMeme extends IonicNativePlugin {
|
||||
getConnectedByOthers(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns calibration status
|
||||
* @returns {Promise<any>}
|
||||
@@ -177,7 +167,6 @@ export class JinsMeme extends IonicNativePlugin {
|
||||
isCalibrated(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns device type.
|
||||
* @returns {Promise<any>}
|
||||
@@ -186,7 +175,6 @@ export class JinsMeme extends IonicNativePlugin {
|
||||
getConnectedDeviceType(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns hardware version.
|
||||
* @returns {Promise<any>}
|
||||
@@ -195,7 +183,6 @@ export class JinsMeme extends IonicNativePlugin {
|
||||
getConnectedDeviceSubType(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns FW Version.
|
||||
* @returns {Promise<any>}
|
||||
@@ -204,7 +191,6 @@ export class JinsMeme extends IonicNativePlugin {
|
||||
getFWVersion(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns HW Version.
|
||||
* @returns {Promise<any>}
|
||||
@@ -213,7 +199,6 @@ export class JinsMeme extends IonicNativePlugin {
|
||||
getHWVersion(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns response about whether data was received or not.
|
||||
* @returns {Promise<any>}
|
||||
|
||||
@@ -7,7 +7,7 @@ import { Observable } from 'rxjs';
|
||||
* @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).
|
||||
* Requires Cordova plugin: `cordova-plugin-ionic-keyboard`. For more info, please see the [Keyboard plugin docs](https://github.com/ionic-team/cordova-plugin-ionic-keyboard).
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
@@ -19,16 +19,16 @@ import { Observable } from 'rxjs';
|
||||
*
|
||||
* this.keyboard.show();
|
||||
*
|
||||
* this.keyboard.close();
|
||||
* this.keyboard.hide();
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Keyboard',
|
||||
plugin: 'ionic-plugin-keyboard',
|
||||
pluginRef: 'cordova.plugins.Keyboard',
|
||||
repo: 'https://github.com/ionic-team/ionic-plugin-keyboard',
|
||||
platforms: ['Android', 'BlackBerry 10', 'iOS', 'Windows']
|
||||
plugin: 'cordova-plugin-ionic-keyboard',
|
||||
pluginRef: 'window.Keyboard',
|
||||
repo: 'https://github.com/ionic-team/cordova-plugin-ionic-keyboard',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Keyboard extends IonicNativePlugin {
|
||||
@@ -37,35 +37,35 @@ export class Keyboard extends IonicNativePlugin {
|
||||
* @param hide {boolean}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
hideKeyboardAccessoryBar(hide: boolean): void {}
|
||||
hideFormAccessoryBar(hide: boolean): void {}
|
||||
|
||||
/**
|
||||
* Hide the keyboard if shown.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
hide(): void {}
|
||||
|
||||
/**
|
||||
* Force keyboard to be shown.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
platforms: ['Android', 'BlackBerry 10', 'Windows']
|
||||
platforms: ['Android']
|
||||
})
|
||||
show(): void {}
|
||||
|
||||
/**
|
||||
* Close the keyboard if open.
|
||||
* Programatically set the resize mode
|
||||
* @param mode {string}
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
platforms: ['iOS', 'Android', 'BlackBerry 10', 'Windows']
|
||||
platforms: ['iOS']
|
||||
})
|
||||
close(): void {}
|
||||
|
||||
/**
|
||||
* Prevents the native UIScrollView from moving when an input is focused.
|
||||
* @param disable {boolean}
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
platforms: ['iOS', 'Windows']
|
||||
})
|
||||
disableScroll(disable: boolean): void {}
|
||||
setResizeMode(mode: string): void {}
|
||||
|
||||
/**
|
||||
* Creates an observable that notifies you when the keyboard is shown. Unsubscribe to observable to cancel event watch.
|
||||
@@ -74,12 +74,25 @@ export class Keyboard extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'native.keyboardshow',
|
||||
platforms: ['iOS', 'Android', 'BlackBerry 10', 'Windows']
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
onKeyboardShow(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an observable that notifies you when the keyboard will show. Unsubscribe to observable to cancel event watch.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'keyboardWillShow',
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
onKeyboardWillShow(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an observable that notifies you when the keyboard is hidden. Unsubscribe to observable to cancel event watch.
|
||||
* @returns {Observable<any>}
|
||||
@@ -87,9 +100,22 @@ export class Keyboard extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'native.keyboardhide',
|
||||
platforms: ['iOS', 'Android', 'BlackBerry 10', 'Windows']
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
onKeyboardHide(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an observable that notifies you when the keyboard will hide. Unsubscribe to observable to cancel event watch.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'keyboardWillHide',
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
onKeyboardWillHide(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
export enum ELocalNotificationTriggerUnit {
|
||||
@@ -483,14 +483,32 @@ export interface ILocalNotification {
|
||||
})
|
||||
@Injectable()
|
||||
export class LocalNotifications extends IonicNativePlugin {
|
||||
/**
|
||||
* Informs if the app has the permission to show notifications.
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@Cordova()
|
||||
hasPermission(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request permission to show notifications if not already granted.
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@Cordova()
|
||||
requestPermission(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Schedules a single or multiple notifications
|
||||
* @param options {Notification | Array<ILocalNotification>} optional
|
||||
* @param options {Notification | ILocalNotification[]} optional
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
schedule(options?: ILocalNotification | Array<ILocalNotification>): void {}
|
||||
schedule(options?: ILocalNotification | ILocalNotification[]): void {}
|
||||
|
||||
/**
|
||||
* Updates a previously scheduled notification. Must include the id in the options parameter.
|
||||
@@ -569,12 +587,41 @@ export class LocalNotifications extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a notification has a given type.
|
||||
* @param {number} id The ID of the notification.
|
||||
* @param {string} type The type of the notification.
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@Cordova()
|
||||
hasType(id: number, type: string): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the type (triggered, scheduled) for the notification.
|
||||
* @param {number} id The ID of the notification.
|
||||
*/
|
||||
@Cordova()
|
||||
getType(id: number): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all the notification ids
|
||||
* @returns {Promise<Array<number>>}
|
||||
*/
|
||||
@Cordova()
|
||||
getIds(): Promise<Array<number>> {
|
||||
getIds(): Promise<number[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the ids of scheduled notifications
|
||||
* @returns {Promise<number[]>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
getScheduledIds(): Promise<number[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -583,16 +630,7 @@ export class LocalNotifications extends IonicNativePlugin {
|
||||
* @returns {Promise<Array<number>>}
|
||||
*/
|
||||
@Cordova()
|
||||
getTriggeredIds(): Promise<Array<number>> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the ids of scheduled notifications
|
||||
* @returns {Promise<Array<number>>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
getScheduledIds(): Promise<Array<number>> {
|
||||
getTriggeredIds(): Promise<number[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -606,6 +644,15 @@ export class LocalNotifications extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all notification objects
|
||||
* @returns {Promise<ILocalNotification[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
getAll(): Promise<ILocalNotification[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a scheduled notification object
|
||||
* @param notificationId {any} The id of the notification to get
|
||||
@@ -626,51 +673,6 @@ export class LocalNotifications extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all notification objects
|
||||
* @returns {Promise<Array<ILocalNotification>>}
|
||||
*/
|
||||
@Cordova()
|
||||
getAll(): Promise<Array<ILocalNotification>> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all scheduled notification objects
|
||||
* @returns {Promise<Array<ILocalNotification>>}
|
||||
*/
|
||||
@Cordova()
|
||||
getAllScheduled(): Promise<Array<ILocalNotification>> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all triggered notification objects
|
||||
* @returns {Promise<Array<ILocalNotification>>}
|
||||
*/
|
||||
@Cordova()
|
||||
getAllTriggered(): Promise<Array<ILocalNotification>> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request permission to show notifications if not already granted.
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@Cordova()
|
||||
requestPermission(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Informs if the app has the permission to show notifications.
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@Cordova()
|
||||
hasPermission(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a group of actions
|
||||
* @param groupId The id of the action group
|
||||
@@ -678,10 +680,7 @@ export class LocalNotifications extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
addActions(
|
||||
groupId: any,
|
||||
actions: Array<ILocalNotificationAction>
|
||||
): Promise<any> {
|
||||
addActions(groupId: any, actions: ILocalNotificationAction[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -727,6 +726,24 @@ export class LocalNotifications extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all scheduled notification objects
|
||||
* @returns {Promise<Array<ILocalNotification>>}
|
||||
*/
|
||||
@Cordova()
|
||||
getAllScheduled(): Promise<ILocalNotification[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all triggered notification objects
|
||||
* @returns {Promise<Array<ILocalNotification>>}
|
||||
*/
|
||||
@Cordova()
|
||||
getAllTriggered(): Promise<ILocalNotification[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a callback for a specific event
|
||||
* @param eventName {string} The name of the event. Available events: schedule, trigger, click, update, clear, clearall, cancel, cancelall. Custom event names are possible for actions
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Market
|
||||
* @description
|
||||
|
||||
@@ -167,19 +167,22 @@ export class MediaCapture extends IonicNativePlugin {
|
||||
* The recording image sizes and formats supported by the device.
|
||||
* @returns {ConfigurationData[]}
|
||||
*/
|
||||
@CordovaProperty() supportedImageModes: ConfigurationData[];
|
||||
@CordovaProperty()
|
||||
supportedImageModes: ConfigurationData[];
|
||||
|
||||
/**
|
||||
* The audio recording formats supported by the device.
|
||||
* @returns {ConfigurationData[]}
|
||||
*/
|
||||
@CordovaProperty() supportedAudioModes: ConfigurationData[];
|
||||
@CordovaProperty()
|
||||
supportedAudioModes: ConfigurationData[];
|
||||
|
||||
/**
|
||||
* The recording video resolutions and formats supported by the device.
|
||||
* @returns {ConfigurationData[]}
|
||||
*/
|
||||
@CordovaProperty() supportedVideoModes: ConfigurationData[];
|
||||
@CordovaProperty()
|
||||
supportedVideoModes: ConfigurationData[];
|
||||
|
||||
/**
|
||||
* Start the audio recorder application and return information about captured audio clip files.
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
checkAvailability,
|
||||
CordovaInstance,
|
||||
InstanceProperty,
|
||||
IonicNativePlugin,
|
||||
Plugin
|
||||
} from '@ionic-native/core';
|
||||
import { CordovaInstance, InstanceProperty, IonicNativePlugin, Plugin, checkAvailability } from '@ionic-native/core';
|
||||
import { Observable, Observer } from 'rxjs';
|
||||
|
||||
/**
|
||||
|
||||
@@ -251,7 +251,7 @@ export class MixpanelPeople extends IonicNativePlugin {
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
unset(propertiesArray: Array<string>): Promise<any> {
|
||||
unset(propertiesArray: string[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import { Injectable } from '@angular/core';
|
||||
@Plugin({
|
||||
pluginName: 'MobileAccessibility',
|
||||
plugin: 'phonegap-plugin-mobile-accessibility',
|
||||
pluginRef: 'MobileAccessibility',
|
||||
pluginRef: 'window.MobileAccessibility',
|
||||
repo: 'https://github.com/phonegap/phonegap-mobile-accessibility',
|
||||
platforms: ['Android Fire OS', 'Android', 'iOS', 'Windows']
|
||||
})
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { checkAvailability, CordovaInstance, InstanceProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { checkAvailability, CordovaInstance, InstanceProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { CordovaInstance, InstanceProperty, IonicNativePlugin, Plugin, checkAvailability } from '@ionic-native/core';
|
||||
|
||||
export interface AuthenticationResult {
|
||||
accessToken: string;
|
||||
|
||||
@@ -71,7 +71,6 @@ export interface MusicControlsOptions {
|
||||
* // text displayed in the status bar when the notification (and the ticker) are updated, optional
|
||||
* ticker : 'Now playing "Time is Running Out"',
|
||||
* // All icons default to their built-in android equivalents
|
||||
* // The supplied drawable name, e.g. 'media_play', is the name of a drawable found under 'android/res/drawable*' folders
|
||||
* playIcon: 'media_play',
|
||||
* pauseIcon: 'media_pause',
|
||||
* prevIcon: 'media_prev',
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Native Audio
|
||||
* @description Native Audio Playback
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
IonicNativePlugin,
|
||||
Plugin
|
||||
} from '@ionic-native/core';
|
||||
import { merge, Observable } from 'rxjs';
|
||||
import { Observable, merge } from 'rxjs';
|
||||
|
||||
declare const navigator: any;
|
||||
|
||||
@@ -36,7 +36,7 @@ declare const navigator: any;
|
||||
* let connectSubscription = this.network.onConnect().subscribe(() => {
|
||||
* console.log('network connected!');
|
||||
* // We just got a connection but we need to wait briefly
|
||||
* // before we determine the connection type. Might need to wait.
|
||||
* // before we determine the connection type. Might need to wait.
|
||||
* // prior to doing any api requests as well.
|
||||
* setTimeout(() => {
|
||||
* if (this.network.type === 'wifi') {
|
||||
|
||||
@@ -6,7 +6,6 @@ import {
|
||||
Plugin
|
||||
} from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
declare let window: any;
|
||||
|
||||
export interface NdefEvent {
|
||||
@@ -183,7 +182,6 @@ export class NFC extends IonicNativePlugin {
|
||||
write(message: any[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes a NFC tag read only. **Warning** this is permanent.
|
||||
* @returns {Promise<any>}
|
||||
@@ -256,7 +254,6 @@ export class NFC extends IonicNativePlugin {
|
||||
enabled(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @{ NFC } class utility methods
|
||||
* for use with
|
||||
@@ -270,7 +267,6 @@ export class NFC extends IonicNativePlugin {
|
||||
bytesToString(bytes: number[]): string {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert string to byte array.
|
||||
* @param str {string}
|
||||
@@ -280,7 +276,6 @@ export class NFC extends IonicNativePlugin {
|
||||
stringToBytes(str: string): number[] {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert byte array to hex string
|
||||
*
|
||||
@@ -292,7 +287,6 @@ export class NFC extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
@@ -302,7 +296,6 @@ export class NFC extends IonicNativePlugin {
|
||||
pluginRef: 'ndef'
|
||||
})
|
||||
/**
|
||||
* @{ Ndef } class methods
|
||||
* @description
|
||||
* Utility methods for creating ndef records for the ndef tag format.
|
||||
* Move records into array before usage. Then pass an array to methods as parameters.
|
||||
@@ -311,24 +304,22 @@ export class NFC extends IonicNativePlugin {
|
||||
*/
|
||||
@Injectable()
|
||||
export class Ndef extends IonicNativePlugin {
|
||||
@CordovaProperty() TNF_EMPTY: number;
|
||||
@CordovaProperty() TNF_WELL_KNOWN: number;
|
||||
@CordovaProperty() TNF_MIME_MEDIA: number;
|
||||
@CordovaProperty() TNF_ABSOLUTE_URI: number;
|
||||
@CordovaProperty() TNF_EXTERNAL_TYPE: number;
|
||||
@CordovaProperty() TNF_UNKNOWN: number;
|
||||
@CordovaProperty() TNF_UNCHANGED: number;
|
||||
@CordovaProperty() TNF_RESERVED: number;
|
||||
|
||||
@CordovaProperty() RTD_TEXT: number[];
|
||||
@CordovaProperty() RTD_URI: number[];
|
||||
@CordovaProperty() RTD_SMART_POSTER: number[];
|
||||
@CordovaProperty() RTD_ALTERNATIVE_CARRIER: number[];
|
||||
@CordovaProperty() RTD_HANDOVER_CARRIER: number[];
|
||||
@CordovaProperty() RTD_HANDOVER_REQUEST: number[];
|
||||
@CordovaProperty() RTD_HANDOVER_SELECT: number[];
|
||||
@CordovaProperty() textHelper: TextHelper;
|
||||
@CordovaProperty() uriHelper: UriHelper;
|
||||
@CordovaProperty()
|
||||
TNF_EMPTY: number;
|
||||
@CordovaProperty()
|
||||
TNF_WELL_KNOWN: number;
|
||||
@CordovaProperty()
|
||||
TNF_MIME_MEDIA: number;
|
||||
@CordovaProperty()
|
||||
TNF_ABSOLUTE_URI: number;
|
||||
@CordovaProperty()
|
||||
TNF_EXTERNAL_TYPE: number;
|
||||
@CordovaProperty()
|
||||
TNF_UNKNOWN: number;
|
||||
@CordovaProperty()
|
||||
TNF_UNCHANGED: number;
|
||||
@CordovaProperty()
|
||||
TNF_RESERVED: number;
|
||||
|
||||
@Cordova({ sync: true })
|
||||
record(
|
||||
@@ -341,13 +332,27 @@ export class Ndef extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
@Cordova({ sync: true })
|
||||
textRecord(text: string, languageCode?: string, id?: number[] | string): NdefRecord { return; }
|
||||
textRecord(
|
||||
text: string,
|
||||
languageCode?: string,
|
||||
id?: number[] | string
|
||||
): NdefRecord {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({ sync: true })
|
||||
uriRecord(uri: string, id?: number[] | string): NdefRecord { return; }
|
||||
uriRecord(uri: string, id?: number[] | string): NdefRecord {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({ sync: true })
|
||||
absoluteUriRecord(uri: string, payload: number[] | string, id?: number[] | string): NdefRecord { return; }
|
||||
absoluteUriRecord(
|
||||
uri: string,
|
||||
payload: number[] | string,
|
||||
id?: number[] | string
|
||||
): NdefRecord {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({ sync: true })
|
||||
mimeMediaRecord(mimeType: string, payload: string): NdefRecord {
|
||||
@@ -393,6 +398,12 @@ export class Ndef extends IonicNativePlugin {
|
||||
tnfToString(tnf: any): string {
|
||||
return;
|
||||
}
|
||||
|
||||
@CordovaProperty()
|
||||
textHelper: TextHelper;
|
||||
|
||||
@CordovaProperty()
|
||||
uriHelper: UriHelper;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -440,7 +451,6 @@ export class TextHelper extends IonicNativePlugin {
|
||||
decodePayload(data: number[]): string {
|
||||
return;
|
||||
}
|
||||
|
||||
encodePayload(text: string, lang: string): number[] {
|
||||
return;
|
||||
}
|
||||
@@ -450,7 +460,6 @@ export class UriHelper extends IonicNativePlugin {
|
||||
decodePayload(data: number[]): string {
|
||||
return;
|
||||
}
|
||||
|
||||
encodePayload(uri: string): number[] {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -418,6 +418,7 @@ export enum OSActionType {
|
||||
export class OneSignal extends IonicNativePlugin {
|
||||
/**
|
||||
* constants to use in inFocusDisplaying()
|
||||
* @hidden
|
||||
*/
|
||||
OSInFocusDisplayOption = {
|
||||
None: 0,
|
||||
@@ -563,7 +564,7 @@ export class OneSignal extends IonicNativePlugin {
|
||||
/**
|
||||
* Deletes tags that were previously set on a user with `sendTag` or `sendTags`.
|
||||
*
|
||||
* @param {Array<string>} Keys to remove.
|
||||
* @param {string[]} Keys to remove.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
deleteTags(keys: string[]): void {}
|
||||
@@ -671,6 +672,13 @@ export class OneSignal extends IonicNativePlugin {
|
||||
@Cordova({ sync: true })
|
||||
setLogLevel(logLevel: { logLevel: number; visualLevel: number }): void {}
|
||||
|
||||
/**
|
||||
* Disable or enable location collection (Defaults to enabled) if your app has location permission.
|
||||
* @param shared {boolean}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setLocationShared(shared: boolean): void {}
|
||||
|
||||
/**
|
||||
* The passed in function will be fired when a notification permission setting changes.
|
||||
* This includes the following events:
|
||||
@@ -702,9 +710,64 @@ export class OneSignal extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears all OneSignal notifications
|
||||
*/
|
||||
@Cordova()
|
||||
setEmail(email: string, emailAuthToken?: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* If your app implements logout functionality, you can call logoutEmail to dissociate the email from the device
|
||||
*/
|
||||
@Cordova()
|
||||
logoutEmail(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* The passed in function will be fired when a notification subscription property changes.
|
||||
* This includes the following events:
|
||||
* - Getting a push token from Apple / Google.
|
||||
* - Getting a player / user id from OneSignal
|
||||
* - OneSignal.setSubscription is called
|
||||
* - User disables or enables notifications
|
||||
* @return {Observable<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true
|
||||
})
|
||||
addEmailSubscriptionObserver(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears all OneSignal notifications
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
clearOneSignalNotifications(): void {}
|
||||
|
||||
/**
|
||||
* Allows you to delay the initialization of the SDK until the user provides privacy consent.
|
||||
* The SDK will not be fully initialized until the provideUserConsent(true) method is called.
|
||||
* @param {boolean} required
|
||||
*/
|
||||
@Cordova()
|
||||
setRequiresUserPrivacyConsent(required: boolean): void {}
|
||||
|
||||
/**
|
||||
* If your application is set to require the user's privacy consent, you can provide this consent using this method.
|
||||
* Until you call provideUserConsent(true), the SDK will not fully initialize and will not send any data to OneSignal.
|
||||
* @param {boolean} granted
|
||||
*/
|
||||
@Cordova()
|
||||
provideUserConsent(granted: boolean): void {}
|
||||
|
||||
/**
|
||||
* Accepts a callback, which returns a boolean variable indicating if the user has given privacy consent yet.
|
||||
* @param {Function} callback
|
||||
*/
|
||||
@Cordova()
|
||||
userProvidedPrivacyConsent(callback: Function): void {}
|
||||
}
|
||||
|
||||
@@ -8,31 +8,31 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
* @usage
|
||||
* You can open any of these settings:
|
||||
* ```
|
||||
* "about", // ios
|
||||
* "accessibility", // ios, android
|
||||
* "account", // ios, android
|
||||
* "airplane_mode", // ios, android
|
||||
* "apn", // android
|
||||
* "application_details", // ios, android
|
||||
* "application_development", // android
|
||||
* "application", // android
|
||||
* "autolock", // ios
|
||||
* "battery_optimization", // android
|
||||
* "bluetooth", // ios, android
|
||||
* "castle", // ios
|
||||
* "captioning", // android
|
||||
* "cast", // android
|
||||
* "cellular_usage", // ios
|
||||
* "configuration_list", // ios
|
||||
* "data_roaming", // android
|
||||
* "date", // ios, android
|
||||
* "display", // ios, android
|
||||
* "dream", // android
|
||||
* "facetime", // ios
|
||||
* "home", // android
|
||||
* "keyboard", // ios, android
|
||||
* "keyboard_subtype", // android
|
||||
* "locale", // ios, android
|
||||
* "about", // ios
|
||||
* "accessibility", // ios, android
|
||||
* "account", // ios, android
|
||||
* "airplane_mode", // ios, android
|
||||
* "apn", // android
|
||||
* "application_details", // ios, android
|
||||
* "application_development", // android
|
||||
* "application", // android
|
||||
* "autolock", // ios
|
||||
* "battery_optimization", // android
|
||||
* "bluetooth", // ios, android
|
||||
* "castle", // ios
|
||||
* "captioning", // android
|
||||
* "cast", // android
|
||||
* "cellular_usage", // ios
|
||||
* "configuration_list", // ios
|
||||
* "data_roaming", // android
|
||||
* "date", // ios, android
|
||||
* "display", // ios, android
|
||||
* "dream", // android
|
||||
* "facetime", // ios
|
||||
* "home", // android
|
||||
* "keyboard", // ios, android
|
||||
* "keyboard_subtype", // android
|
||||
* "locale", // ios, android
|
||||
* "location", // ios, android
|
||||
* "locations", // ios
|
||||
* "manage_all_applications", // android
|
||||
@@ -78,7 +78,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
* "wifi_ip", // android
|
||||
* "wifi", // ios, android
|
||||
* "wireless" // android
|
||||
* ```
|
||||
* ```
|
||||
* ```typescript
|
||||
* import { OpenNativeSettings } from '@ionic-native/open-native-settings';
|
||||
*
|
||||
|
||||
@@ -106,7 +106,10 @@ export class PayPal extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
prepareToRender(environment: string, configuration: PayPalConfiguration): Promise<any> {
|
||||
prepareToRender(
|
||||
environment: string,
|
||||
configuration: PayPalConfiguration
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -150,7 +153,7 @@ export class PayPal extends IonicNativePlugin {
|
||||
/**
|
||||
* Please Read Docs on Profile Sharing at https://github.com/paypal/PayPal-iOS-SDK#profile-sharing
|
||||
*
|
||||
* @param {Array<string>} scopes scopes Set of requested scope-values. Accepted scopes are: openid, profile, address, email, phone, futurepayments and paypalattributes
|
||||
* @param {string[]} scopes scopes Set of requested scope-values. Accepted scopes are: openid, profile, address, email, phone, futurepayments and paypalattributes
|
||||
* See https://developer.paypal.com/docs/integration/direct/identity/attributes/ for more details
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@@ -169,6 +172,20 @@ export interface PayPalEnvironment {
|
||||
* @hidden
|
||||
*/
|
||||
export class PayPalPayment {
|
||||
constructor(
|
||||
amount: string,
|
||||
currency: string,
|
||||
shortDescription: string,
|
||||
intent: string,
|
||||
details?: PayPalPaymentDetails
|
||||
) {
|
||||
this.amount = amount;
|
||||
this.currency = currency;
|
||||
this.shortDescription = shortDescription;
|
||||
this.intent = intent;
|
||||
this.details = details;
|
||||
}
|
||||
|
||||
/**
|
||||
* The amount of the payment.
|
||||
*/
|
||||
@@ -205,7 +222,8 @@ export class PayPalPayment {
|
||||
/**
|
||||
* Optional array of PayPalItem objects.
|
||||
*/
|
||||
items: Array<PayPalItem>;
|
||||
items: PayPalItem[];
|
||||
|
||||
/**
|
||||
* Optional payee email, if your app is paying a third-party merchant.
|
||||
* The payee's email. It must be a valid PayPal email address.
|
||||
@@ -233,6 +251,29 @@ export class PayPalPayment {
|
||||
* @hidden
|
||||
*/
|
||||
export class PayPalItem {
|
||||
/**
|
||||
* The PayPalItem class defines an optional itemization for a payment.
|
||||
* @see https://developer.paypal.com/docs/api/#item-object for more details.
|
||||
* @param {String} name: Name of the item. 127 characters max
|
||||
* @param {Number} quantity: Number of units. 10 characters max.
|
||||
* @param {String} price: Unit price for this item 10 characters max.
|
||||
* May be negative for "coupon" etc
|
||||
* @param {String} currency: ISO standard currency code.
|
||||
* @param {String} sku: The stock keeping unit for this item. 50 characters max (optional)
|
||||
*/
|
||||
constructor(
|
||||
name: string,
|
||||
quantity: number,
|
||||
price: string,
|
||||
currency: string,
|
||||
sku?: string
|
||||
) {
|
||||
this.name = name;
|
||||
this.quantity = quantity;
|
||||
this.price = price;
|
||||
this.currency = currency;
|
||||
this.sku = sku;
|
||||
}
|
||||
/**
|
||||
* Name of the item. 127 characters max
|
||||
*/
|
||||
@@ -416,7 +457,6 @@ export class PayPalConfiguration implements PayPalConfigurationOptions {
|
||||
* see defaults for options available
|
||||
*/
|
||||
constructor(options?: PayPalConfigurationOptions) {
|
||||
|
||||
const defaults: PayPalConfigurationOptions = {
|
||||
defaultUserEmail: null,
|
||||
defaultUserPhoneCountryCode: null,
|
||||
@@ -451,6 +491,33 @@ export class PayPalConfiguration implements PayPalConfigurationOptions {
|
||||
* @hidden
|
||||
*/
|
||||
export class PayPalShippingAddress {
|
||||
/**
|
||||
* See the documentation of the individual properties for more detail.
|
||||
* @param {String} recipientName: Name of the recipient at this address. 50 characters max.
|
||||
* @param {String} line1: Line 1 of the address (e.g., Number, street, etc). 100 characters max.
|
||||
* @param {String} line2: Line 2 of the address (e.g., Suite, apt #, etc). 100 characters max. Optional.
|
||||
* @param {String} city: City name. 50 characters max.
|
||||
* @param {String} state: 2-letter code for US states, and the equivalent for other countries. 100 characters max. Required in certain countries.
|
||||
* @param {String} postalCode: ZIP code or equivalent is usually required for countries that have them. 20 characters max. Required in certain countries.
|
||||
* @param {String} countryCode: 2-letter country code. 2 characters max.
|
||||
*/
|
||||
constructor(
|
||||
recipientName: string,
|
||||
line1: string,
|
||||
line2: string,
|
||||
city: string,
|
||||
state: string,
|
||||
postalCode: string,
|
||||
countryCode: string
|
||||
) {
|
||||
this.recipientName = recipientName;
|
||||
this.line1 = line1;
|
||||
this.line2 = line2;
|
||||
this.city = city;
|
||||
this.state = state;
|
||||
this.postalCode = postalCode;
|
||||
this.countryCode = countryCode;
|
||||
}
|
||||
/**
|
||||
* Name of the recipient at this address. 50 characters max.
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { checkAvailability, Cordova, CordovaInstance, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import {
|
||||
Cordova,
|
||||
CordovaInstance,
|
||||
IonicNativePlugin,
|
||||
Plugin,
|
||||
checkAvailability
|
||||
} from '@ionic-native/core';
|
||||
|
||||
declare const Notification: any;
|
||||
|
||||
@@ -7,23 +13,25 @@ declare const Notification: any;
|
||||
* @hidden
|
||||
*/
|
||||
export class PLNObject {
|
||||
|
||||
private _objectInstance: any;
|
||||
|
||||
constructor(title: string, options: LocalNotificationOptions) {
|
||||
if (checkAvailability(PhonegapLocalNotification.pluginRef, null, PhonegapLocalNotification.pluginName) === true) {
|
||||
if (
|
||||
checkAvailability(
|
||||
PhonegapLocalNotification.pluginRef,
|
||||
null,
|
||||
PhonegapLocalNotification.pluginName
|
||||
) === true
|
||||
) {
|
||||
this._objectInstance = new Notification(title, options);
|
||||
}
|
||||
}
|
||||
|
||||
@CordovaInstance({ sync: true })
|
||||
close(): void {
|
||||
}
|
||||
|
||||
close(): void {}
|
||||
}
|
||||
|
||||
export interface LocalNotificationOptions {
|
||||
|
||||
/**
|
||||
* Sets the direction of the notification. One of "auto", "ltr" or "rtl"
|
||||
*/
|
||||
@@ -48,7 +56,6 @@ export interface LocalNotificationOptions {
|
||||
* Sets the icon of the notification
|
||||
*/
|
||||
icon?: string;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -95,7 +102,6 @@ export interface LocalNotificationOptions {
|
||||
})
|
||||
@Injectable()
|
||||
export class PhonegapLocalNotification extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* A global object that lets you interact with the Notification API.
|
||||
* @param title {string} Title of the local notification.
|
||||
@@ -114,5 +120,4 @@ export class PhonegapLocalNotification extends IonicNativePlugin {
|
||||
requestPermission(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,13 +1,73 @@
|
||||
import {
|
||||
Cordova,
|
||||
CordovaCheck,
|
||||
CordovaOptions,
|
||||
IonicNativePlugin,
|
||||
Plugin,
|
||||
wrap
|
||||
} from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Observable, Observer } from 'rxjs';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
export interface CordovaFiniteObservableOptions extends CordovaOptions {
|
||||
/**
|
||||
* Function that gets a result returned from plugin's success callback, and decides whether it is last value and observable should complete.
|
||||
*/
|
||||
resultFinalPredicate?: string;
|
||||
/**
|
||||
* Function that gets called after resultFinalPredicate, and removes service data that indicates end of stream from the result.
|
||||
*/
|
||||
resultTransform?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*
|
||||
* Wraps method that returns an observable that can be completed. Provided opts.resultFinalPredicate dictates when the observable completes.
|
||||
*/
|
||||
export function CordovaFiniteObservable(
|
||||
opts: CordovaFiniteObservableOptions = {}
|
||||
) {
|
||||
opts.observable = true;
|
||||
return (
|
||||
target: Object,
|
||||
methodName: string,
|
||||
descriptor: TypedPropertyDescriptor<any>
|
||||
) => {
|
||||
return {
|
||||
value(...args: any[]) {
|
||||
const wrappedObservable: Observable<any> = wrap(
|
||||
this,
|
||||
methodName,
|
||||
opts
|
||||
).apply(this, args);
|
||||
return new Observable<any>((observer: Observer<any>) => {
|
||||
const wrappedSubscription = wrappedObservable.subscribe({
|
||||
next: (x: any) => {
|
||||
observer.next(opts.resultTransform ? x[opts.resultTransform] : x);
|
||||
if (opts.resultFinalPredicate && x[opts.resultFinalPredicate]) {
|
||||
observer.complete();
|
||||
}
|
||||
},
|
||||
error: (err: any) => {
|
||||
observer.error(err);
|
||||
},
|
||||
complete: () => {
|
||||
observer.complete();
|
||||
}
|
||||
});
|
||||
return () => {
|
||||
wrappedSubscription.unsubscribe();
|
||||
};
|
||||
});
|
||||
},
|
||||
enumerable: true
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Photo Library
|
||||
* @description
|
||||
@@ -66,34 +126,7 @@ export class PhotoLibrary extends IonicNativePlugin {
|
||||
observable: true
|
||||
})
|
||||
getLibrary(options?: GetLibraryOptions): Observable<LibraryItem[]> {
|
||||
const wrappedObservable: Observable<any> = wrap(this, 'getLibrary', {
|
||||
callbackOrder: 'reverse'
|
||||
}).apply(this, [options]);
|
||||
return new Observable<any>(observer => {
|
||||
const wrappedSubscription = wrappedObservable.subscribe({
|
||||
next: x => {
|
||||
observer.next((result: { library: LibraryItem[] }) => {
|
||||
return result.library;
|
||||
});
|
||||
if (
|
||||
(result: { isLastChunk: boolean }) => {
|
||||
return result.isLastChunk;
|
||||
}
|
||||
) {
|
||||
observer.complete();
|
||||
}
|
||||
},
|
||||
error: err => {
|
||||
observer.error(err);
|
||||
},
|
||||
complete: () => {
|
||||
observer.complete();
|
||||
}
|
||||
});
|
||||
return () => {
|
||||
wrappedSubscription.unsubscribe();
|
||||
};
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -40,6 +40,5 @@ export class PhotoViewer extends IonicNativePlugin {
|
||||
* @param options {PhotoViewerOptions}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
show(url: string, title?: string, options?: PhotoViewerOptions): void {
|
||||
}
|
||||
show(url: string, title?: string, options?: PhotoViewerOptions): void {}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
|
||||
/**
|
||||
* @name Pin Dialog
|
||||
* @description
|
||||
@@ -49,8 +48,11 @@ export class PinDialog extends IonicNativePlugin {
|
||||
successIndex: 1,
|
||||
errorIndex: 4 // no error callback
|
||||
})
|
||||
prompt(message: string, title: string, buttons: string[]): Promise<{ buttonIndex: number, input1: string }> {
|
||||
prompt(
|
||||
message: string,
|
||||
title: string,
|
||||
buttons: string[]
|
||||
): Promise<{ buttonIndex: number; input1: string }> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import {
|
||||
Cordova,
|
||||
CordovaProperty,
|
||||
IonicNativePlugin,
|
||||
Plugin
|
||||
} from '@ionic-native/core';
|
||||
|
||||
export interface PinterestUser {
|
||||
/**
|
||||
@@ -152,14 +157,14 @@ export interface PinterestPin {
|
||||
* .catch(err => console.error('Error loggin in', err));
|
||||
*
|
||||
* this.pinterest.getMyPins()
|
||||
* .then((pins: Array<PinterestPin>) => console.log(pins))
|
||||
* .then((pins: PinterestPin[]) => console.log(pins))
|
||||
* .catch(err => console.error(err));
|
||||
*
|
||||
* this.pinterest.getMe()
|
||||
* .then((user: PinterestUser) => console.log(user));
|
||||
*
|
||||
* this.pinterest.getMyBoards()
|
||||
* .then((boards: Array<PinterestBoard>) => console.log(boards));
|
||||
* .then((boards: PinterestBoard[]) => console.log(boards));
|
||||
*
|
||||
* ```
|
||||
* @interfaces
|
||||
@@ -172,13 +177,13 @@ export interface PinterestPin {
|
||||
plugin: 'cordova-plugin-pinterest',
|
||||
pluginRef: 'cordova.plugins.Pinterest',
|
||||
repo: 'https://github.com/zyramedia/cordova-plugin-pinterest',
|
||||
install: 'ionic cordova plugin add cordova-plugin-pinterest --variable APP_ID=YOUR_APP_ID',
|
||||
install:
|
||||
'ionic cordova plugin add cordova-plugin-pinterest --variable APP_ID=YOUR_APP_ID',
|
||||
installVariables: ['APP_ID'],
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Pinterest extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Convenience constant for authentication scopes
|
||||
*/
|
||||
@@ -192,7 +197,7 @@ export class Pinterest extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Logs the user in using their Pinterest account.
|
||||
* @param scopes {Array<string>} Array of scopes that you need access to. You can use Pinterest.SCOPES constant for convenience.
|
||||
* @param scopes {string[]} Array of scopes that you need access to. You can use Pinterest.SCOPES constant for convenience.
|
||||
* @returns {Promise<any>} The response object will contain the user's profile data, as well as the access token (if you need to use it elsewhere, example: send it to your server and perform actions on behalf of the user).
|
||||
*/
|
||||
@Cordova()
|
||||
@@ -216,12 +221,12 @@ export class Pinterest extends IonicNativePlugin {
|
||||
*
|
||||
* @param fields {string} Optional fields separated by comma
|
||||
* @param limit {number} Optional limit, defaults to 100, maximum is 100.
|
||||
* @returns {Promise<Array<PinterestPin>>}
|
||||
* @returns {Promise<PinterestPin[]>}
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
getMyPins(fields?: string, limit?: number): Promise<Array<PinterestPin>> {
|
||||
getMyPins(fields?: string, limit?: number): Promise<PinterestPin[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -229,12 +234,12 @@ export class Pinterest extends IonicNativePlugin {
|
||||
*
|
||||
* @param fields {string} Optional fields separated by comma
|
||||
* @param limit {number} Optional limit, defaults to 100, maximum is 100.
|
||||
* @returns {Promise<Array<PinterestBoard>>}
|
||||
* @returns {Promise<PinterestBoard[]>}
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
getMyBoards(fields?: string, limit?: number): Promise<Array<PinterestBoard>> {
|
||||
getMyBoards(fields?: string, limit?: number): Promise<PinterestBoard[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -242,12 +247,12 @@ export class Pinterest extends IonicNativePlugin {
|
||||
* Get the authenticated user's likes.
|
||||
* @param fields {string} Optional fields separated by comma
|
||||
* @param limit {number} Optional limit, defaults to 100, maximum is 100.
|
||||
* @returns {Promise<Array<PinterestPin>>}
|
||||
* @returns {Promise<PinterestPin[]>}
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
getMyLikes(fields?: string, limit?: number): Promise<Array<PinterestPin>> {
|
||||
getMyLikes(fields?: string, limit?: number): Promise<PinterestPin[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -255,12 +260,15 @@ export class Pinterest extends IonicNativePlugin {
|
||||
* Get the authenticated user's followers.
|
||||
* @param fields {string} Optional fields separated by comma
|
||||
* @param limit {number} Optional limit, defaults to 100, maximum is 100.
|
||||
* @returns {Promise<Array<PinterestUser>>}
|
||||
* @returns {Promise<PinterestUser[]>}
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
getMyFollowers(fields?: string, limit?: number): Promise<Array<PinterestUser>> {
|
||||
getMyFollowers(
|
||||
fields?: string,
|
||||
limit?: number
|
||||
): Promise<PinterestUser[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -268,12 +276,15 @@ export class Pinterest extends IonicNativePlugin {
|
||||
* Get the authenticated user's followed boards.
|
||||
* @param fields {string} Optional fields separated by comma
|
||||
* @param limit {number} Optional limit, defaults to 100, maximum is 100.
|
||||
* @returns {Promise<Array<PinterestBoard>>}
|
||||
* @returns {Promise<PinterestBoard[]>}
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
getMyFollowedBoards(fields?: string, limit?: number): Promise<Array<PinterestBoard>> {
|
||||
getMyFollowedBoards(
|
||||
fields?: string,
|
||||
limit?: number
|
||||
): Promise<PinterestBoard[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -323,13 +334,17 @@ export class Pinterest extends IonicNativePlugin {
|
||||
* @param boardId {string} The ID of the board
|
||||
* @param fields {string} Optional fields separated by comma
|
||||
* @param limit {number} Optional limit, defaults to 100, maximum is 100.
|
||||
* @returns {Promise<Array<PinterestPin>>}
|
||||
* @returns {Promise<PinterestPin[]>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2
|
||||
})
|
||||
getBoardPins(boardId: string, fields?: string, limit?: number): Promise<Array<PinterestPin>> {
|
||||
getBoardPins(
|
||||
boardId: string,
|
||||
fields?: string,
|
||||
limit?: number
|
||||
): Promise<PinterestPin[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -393,8 +408,12 @@ export class Pinterest extends IonicNativePlugin {
|
||||
successIndex: 4,
|
||||
errorIndex: 5
|
||||
})
|
||||
createPin(note: string, boardId: string, imageUrl: string, link?: string): Promise<PinterestPin> {
|
||||
createPin(
|
||||
note: string,
|
||||
boardId: string,
|
||||
imageUrl: string,
|
||||
link?: string
|
||||
): Promise<PinterestPin> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Power Management
|
||||
* @description
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
Plugin,
|
||||
Cordova,
|
||||
CordovaCheck,
|
||||
CordovaInstance,
|
||||
IonicNativePlugin
|
||||
} from '@ionic-native/core';
|
||||
import { Cordova, CordovaCheck, CordovaInstance, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { checkAvailability, Cordova, CordovaInstance, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, CordovaInstance, IonicNativePlugin, Plugin, checkAvailability } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
declare const window: any;
|
||||
@@ -221,12 +221,15 @@ export interface PushOptions {
|
||||
}
|
||||
|
||||
export type Priority = 1 | 2 | 3 | 4 | 5;
|
||||
export type Visibility = 0 | 1 | -1;
|
||||
|
||||
export interface Channel {
|
||||
id: string;
|
||||
description: string;
|
||||
importance: Priority;
|
||||
sound?: string;
|
||||
vibration?: boolean | number[];
|
||||
visibility?: Visibility;
|
||||
}
|
||||
|
||||
export type PushEvent = string;
|
||||
@@ -428,7 +431,6 @@ export class PushObject {
|
||||
setApplicationIconBadgeNumber(count?: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current badge count visible when the app is not running
|
||||
* successHandler gets called with an integer which is the current badge count
|
||||
|
||||
@@ -76,11 +76,6 @@ export class ScreenOrientation extends IonicNativePlugin {
|
||||
LANDSCAPE: 'landscape',
|
||||
ANY: 'any'
|
||||
};
|
||||
/**
|
||||
* Get the current orientation of the device.
|
||||
*/
|
||||
@CordovaProperty() type: string;
|
||||
|
||||
/**
|
||||
* Listen to orientation change event
|
||||
* @return {Observable<void>}
|
||||
@@ -109,4 +104,10 @@ export class ScreenOrientation extends IonicNativePlugin {
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
unlock(): void {}
|
||||
|
||||
/**
|
||||
* Get the current orientation of the device.
|
||||
*/
|
||||
@CordovaProperty()
|
||||
type: string;
|
||||
}
|
||||
|
||||
@@ -5,9 +5,7 @@ import { CordovaCheck, CordovaInstance, IonicNativePlugin, Plugin, getPromise }
|
||||
* @hidden
|
||||
*/
|
||||
export class SecureStorageObject {
|
||||
|
||||
constructor(private _objectInstance: any) {
|
||||
}
|
||||
constructor(private _objectInstance: any) {}
|
||||
|
||||
/**
|
||||
* Gets a stored item
|
||||
@@ -76,7 +74,6 @@ export class SecureStorageObject {
|
||||
secureDevice(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -134,7 +131,6 @@ export class SecureStorageObject {
|
||||
})
|
||||
@Injectable()
|
||||
export class SecureStorage extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Creates a namespaced storage.
|
||||
* @param store {string}
|
||||
@@ -143,8 +139,11 @@ export class SecureStorage extends IonicNativePlugin {
|
||||
@CordovaCheck()
|
||||
create(store: string): Promise<SecureStorageObject> {
|
||||
return getPromise<SecureStorageObject>((res: Function, rej: Function) => {
|
||||
const instance = new (SecureStorage.getPlugin())(() => res(new SecureStorageObject(instance)), rej, store);
|
||||
const instance = new (SecureStorage.getPlugin())(
|
||||
() => res(new SecureStorageObject(instance)),
|
||||
rej,
|
||||
store
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/**
|
||||
* @name Shake
|
||||
* @description Handles shake gesture
|
||||
|
||||
@@ -2,22 +2,26 @@ 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;
|
||||
persistentIdentifier: string;
|
||||
title: string;
|
||||
userInfo: { [key: string]: string };
|
||||
suggestedInvocationPhrase: string;
|
||||
}
|
||||
|
||||
export interface SiriShortcutOptions extends SiriShortcut {
|
||||
isEligibleForSearch?: boolean;
|
||||
isEligibleForPrediction?: boolean;
|
||||
isEligibleForSearch?: boolean;
|
||||
isEligibleForPrediction?: boolean;
|
||||
}
|
||||
|
||||
export interface ActivatedShortcutOptions {
|
||||
clear?: 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 only works when your app is built with XCode 10. 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
|
||||
@@ -71,6 +75,7 @@ export interface SiriShortcutOptions extends SiriShortcut {
|
||||
* @interfaces
|
||||
* SiriShortcut
|
||||
* SiriShortcutOptions
|
||||
* ActivatedShortcutOptions
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'SiriShortcuts',
|
||||
@@ -81,63 +86,65 @@ export interface SiriShortcutOptions extends SiriShortcut {
|
||||
})
|
||||
@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;
|
||||
}
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
/**
|
||||
* 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 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;
|
||||
}
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
/**
|
||||
* Get the current clicked user activity, and return `null` if none
|
||||
* @param {ActivatedShortcutOptions|null} options Options to specify for getting the shortcut
|
||||
* @param {boolean} options.clear Clear the currently activated shortcut, defaults to true
|
||||
* @return Promise<SiriShortcut|null>
|
||||
*/
|
||||
@Cordova()
|
||||
getActivatedShortcut(options?: ActivatedShortcutOptions): Promise<SiriShortcut | null> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ export interface SmsOptionsAndroid {
|
||||
export class SMS extends IonicNativePlugin {
|
||||
/**
|
||||
* Sends sms to a number
|
||||
* @param phoneNumber {string|Array<string>} Phone number
|
||||
* @param phoneNumber {string|string[]} Phone number
|
||||
* @param message {string} Message
|
||||
* @param options {SmsOptions} Options
|
||||
* @returns {Promise<any>} Resolves promise when the SMS has been sent
|
||||
|
||||
@@ -72,7 +72,7 @@ export interface SpeechRecognitionListeningOptionsAndroid {
|
||||
* // Start the recognition process
|
||||
* this.speechRecognition.startListening(options)
|
||||
* .subscribe(
|
||||
* (matches: Array<string>) => console.log(matches),
|
||||
* (matches: string[]) => console.log(matches),
|
||||
* (onerror) => console.log('error:', onerror)
|
||||
* )
|
||||
*
|
||||
@@ -82,7 +82,7 @@ export interface SpeechRecognitionListeningOptionsAndroid {
|
||||
* // Get the list of supported languages
|
||||
* this.speechRecognition.getSupportedLanguages()
|
||||
* .then(
|
||||
* (languages: Array<string>) => console.log(languages),
|
||||
* (languages: string[]) => console.log(languages),
|
||||
* (error) => console.log(error)
|
||||
* )
|
||||
*
|
||||
@@ -119,7 +119,7 @@ export class SpeechRecognition extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Start the recognition process
|
||||
* @return {Promise< Array<string> >} list of recognized terms
|
||||
* @return {Promise< string[] >} list of recognized terms
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse',
|
||||
@@ -127,7 +127,7 @@ export class SpeechRecognition extends IonicNativePlugin {
|
||||
})
|
||||
startListening(
|
||||
options?: SpeechRecognitionListeningOptions
|
||||
): Observable<Array<string>> {
|
||||
): Observable<string[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -141,10 +141,10 @@ export class SpeechRecognition extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Get the list of supported languages
|
||||
* @return {Promise< Array<string> >} list of languages
|
||||
* @return {Promise< string[] >} list of languages
|
||||
*/
|
||||
@Cordova()
|
||||
getSupportedLanguages(): Promise<Array<string>> {
|
||||
getSupportedLanguages(): Promise<string[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name SpeechKit
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Sqlite Db Copy
|
||||
* @description
|
||||
* This plugin does something
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { SqliteDbCopy } from '@ionic-native/sqlite-db-copy';
|
||||
*
|
||||
*
|
||||
* constructor(private sqliteDbCopy: SqliteDbCopy) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.sqliteDbCopy.copy('sample.db', 0)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'cordova-plugin-dbcopy',
|
||||
plugin: 'cordova-plugin-dbcopy',
|
||||
pluginRef: 'window.plugins.sqlDB',
|
||||
repo: 'https://github.com/an-rahulpandey/cordova-plugin-dbcopy',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class SqliteDbCopy extends IonicNativePlugin {
|
||||
/**
|
||||
* Copy database from www directory to device SQLite DB location
|
||||
* (for ios only, use 0 for Android)
|
||||
* location = 0; // (Disable iCloud Backup) If set will copy the database to Library/LocalDatabase. The database will not be synced by the iCloud Backup.
|
||||
* or
|
||||
* location = 1; // If set will copy the database to Library folder instead of Documents folder.
|
||||
* or
|
||||
* location = 2; // It will copy the database in the default SQLite Database directory. This is the default location for database
|
||||
* @param dbname {string} Database file name available in www diretory with extension.The plugin will look for and copy the file according to the filename provided here. And the same file name should be used while opening the database via SQLitePlugin
|
||||
* @param location {number} Location where to copy the database for app (only applicable for ios).For Android pass 0.
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 2,
|
||||
errorIndex: 3
|
||||
})
|
||||
copy(dbname: string, location: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Check if database is available at external storage. Useful when trying to copying the database from device sdcard.
|
||||
* @param dbname {string} Name of the database file which is available on external or intenral storage
|
||||
* @param source {string} Full native path for the folder in which db file is present. The "/" must be added at the end of path. For.eg. /sdcard/mydb/. Should not include dbname.
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 2,
|
||||
errorIndex: 3
|
||||
})
|
||||
checkDbOnStorage(dbname: string, source: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Copy database which is available on the device external/internal storage to app default db location
|
||||
* (for ios only, use 0 for Android)
|
||||
* location = 0; // (Disable iCloud Backup) If set will copy the database to Library/LocalDatabase. The database will not be synced by the iCloud Backup.
|
||||
* or
|
||||
* location = 1; // If set will copy the database to Library folder instead of Documents folder.
|
||||
* or
|
||||
* location = 2; // It will copy the database in the default SQLite Database directory. This is the default location for database
|
||||
* @param dbname {string} Is the name of the database you want to copy. The plugin will look for and copy the file according to the filename provided here. And the same file name should be used while opening the database via SQLitePlugin
|
||||
* @param location {number} Location where to copy the database for app (only applicable for ios). For Android pass 0.
|
||||
* @param source {string} Source File location like /sdcard/mydb/db.db. Please provide a valid existing location and the dbname should be present in the path.
|
||||
* @param deleteolddb {boolean} A boolean value if set to true, will delete the existing db from the local app database folder before copying the new db. Please provide proper boolean value true or false;
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 4,
|
||||
errorIndex: 5
|
||||
})
|
||||
copyDbFromStorage(
|
||||
dbname: string,
|
||||
location: number,
|
||||
source: string,
|
||||
deleteolddb: boolean
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Copy the app database to external/internal storage on the device.
|
||||
* (for ios only, use 0 for Android)
|
||||
* location = 0; //It will copy the database from Library/LocalDatabase location.
|
||||
* or
|
||||
* location = 1; // It will copy the database from Library folder instead.
|
||||
* or
|
||||
* location = 2; // It will copy the database from the default SQLite Database directory. This is the default location for database
|
||||
* @param dbname {string} Is the name of the database you want to copy. The plugin will look for and copy the file according to the filename provided here. And the same file name should be used while opening the database via SQLitePlugin.
|
||||
* @param location {number} Location where to copy the database for app (only applicable for ios). For Android pass 0.
|
||||
* @param destination {string} Destination File location like /sdcard/mydb/ Please provide a valid existing location and "/" should be present at the end of the path. Do not append db name in the path.
|
||||
* @param overwrite {boolean} If set to true, then will replace the file at the destination. Otherwise will throw an error, if destination file already exists.
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 4,
|
||||
errorIndex: 5
|
||||
})
|
||||
copyDbToStorage(
|
||||
dbname: string,
|
||||
location: number,
|
||||
destination: string,
|
||||
overwrite: boolean
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* This method allows you to remove the database from the apps default database storage location.
|
||||
* (for ios only, use 0 for Android)
|
||||
* location = 0; // (Disable iCloud Backup) If set will copy the database to Library/LocalDatabase. The database will not be synced by the iCloud Backup.
|
||||
* or
|
||||
* location = 1; // If set will copy the database to Library folder instead of Documents folder.
|
||||
* or
|
||||
* location = 2; // It will copy the database in the default SQLite Database directory. This is the default location for database
|
||||
* @param dbname {string} Is the name of the database you want to remove. If the database file is having any extension, please provide that also.
|
||||
* @param location {number} Location where to copy the database for app (only applicable for ios).For Android pass 0.
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 2,
|
||||
errorIndex: 3
|
||||
})
|
||||
remove(dbname: string, location: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -125,11 +125,11 @@ export class SQLiteObject {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param sqlStatements {Array<string | string[] | any>}
|
||||
* @param sqlStatements {string[] | string[][] | any[]}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@CordovaInstance()
|
||||
sqlBatch(sqlStatements: Array<string | string[] | any>): Promise<any> {
|
||||
sqlBatch(sqlStatements: (string | string[] | any)[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -136,13 +136,13 @@ export interface PrintCommand {
|
||||
* Data (Command) is added to the command buffer. Takes an array of bytes.
|
||||
* Example: {appendBytes:[0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x2e]}
|
||||
*/
|
||||
appendBytes?: Array<number>;
|
||||
appendBytes?: number[];
|
||||
|
||||
/**
|
||||
* Data (Command) is added to the command buffer. Takes an array of bytes.
|
||||
* Example: {appendRawBytes:[0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x2e]}
|
||||
*/
|
||||
appendRawBytes?: Array<number>;
|
||||
appendRawBytes?: number[];
|
||||
|
||||
/**
|
||||
* Set command of the character space is generated and added to the command buffer. Character Spacs (Unit: Dots) Example: 4
|
||||
@@ -241,7 +241,7 @@ export interface PrintCommand {
|
||||
* Example: {appendHorizontalTabPosition:[15, 35]}
|
||||
* Delete positions Example: {appendHorizontalTabPosition:[]}
|
||||
*/
|
||||
appendHorizontalTabPosition?: Array<number>;
|
||||
appendHorizontalTabPosition?: number[];
|
||||
|
||||
/**
|
||||
* Print command of the logo is generated and added to the command buffer. The logo has to be uploaded to the printer using the Star Print utility.
|
||||
@@ -955,7 +955,11 @@ export class StarPRNT extends IonicNativePlugin {
|
||||
observable: true,
|
||||
callbackStyle: 'node'
|
||||
})
|
||||
connect(port: string, emulation: string): Observable<any> {
|
||||
connect(
|
||||
port: string,
|
||||
emulation: string,
|
||||
hasBarcodeReader: boolean
|
||||
): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import {
|
||||
Cordova,
|
||||
CordovaProperty,
|
||||
IonicNativePlugin,
|
||||
Plugin
|
||||
} from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Status Bar
|
||||
@@ -48,8 +53,7 @@ export class StatusBar extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
overlaysWebView(doesOverlay: boolean) {
|
||||
}
|
||||
overlaysWebView(doesOverlay: boolean) {}
|
||||
|
||||
/**
|
||||
* Use the default statusbar (dark text, for light backgrounds).
|
||||
@@ -57,8 +61,7 @@ export class StatusBar extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
styleDefault() {
|
||||
}
|
||||
styleDefault() {}
|
||||
|
||||
/**
|
||||
* Use the lightContent statusbar (light text, for dark backgrounds).
|
||||
@@ -66,8 +69,7 @@ export class StatusBar extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
styleLightContent() {
|
||||
}
|
||||
styleLightContent() {}
|
||||
|
||||
/**
|
||||
* Use the blackTranslucent statusbar (light text, for dark backgrounds).
|
||||
@@ -75,8 +77,7 @@ export class StatusBar extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
styleBlackTranslucent() {
|
||||
}
|
||||
styleBlackTranslucent() {}
|
||||
|
||||
/**
|
||||
* Use the blackOpaque statusbar (light text, for dark backgrounds).
|
||||
@@ -84,8 +85,7 @@ export class StatusBar extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
styleBlackOpaque() {
|
||||
}
|
||||
styleBlackOpaque() {}
|
||||
|
||||
/**
|
||||
* Set the status bar to a specific named color. Valid options:
|
||||
@@ -98,8 +98,7 @@ export class StatusBar extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
backgroundColorByName(colorName: string) {
|
||||
}
|
||||
backgroundColorByName(colorName: string) {}
|
||||
|
||||
/**
|
||||
* Set the status bar to a specific hex color (CSS shorthand supported!).
|
||||
@@ -111,8 +110,7 @@ export class StatusBar extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
backgroundColorByHexString(hexString: string) {
|
||||
}
|
||||
backgroundColorByHexString(hexString: string) {}
|
||||
|
||||
/**
|
||||
* Hide the StatusBar
|
||||
@@ -120,8 +118,7 @@ export class StatusBar extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
hide() {
|
||||
}
|
||||
hide() {}
|
||||
|
||||
/**
|
||||
* Show the StatusBar
|
||||
@@ -129,7 +126,5 @@ export class StatusBar extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
show() {
|
||||
}
|
||||
|
||||
show() {}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Stepcounter
|
||||
* @description
|
||||
|
||||
@@ -33,7 +33,6 @@ import { Injectable } from '@angular/core';
|
||||
})
|
||||
@Injectable()
|
||||
export class TapticEngine extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Use selection feedback generators to indicate a change in selection.
|
||||
* @returns {Promise<any>} Returns a promise that resolves on success and rejects on error
|
||||
@@ -46,7 +45,7 @@ export class TapticEngine extends IonicNativePlugin {
|
||||
/**
|
||||
* Use this to indicate success/failure/warning to the user.
|
||||
* @param options {Object} should be of the type { type: 'success' } (or 'warning'/'error')
|
||||
* @param options.type {string}
|
||||
* @param {'success' | 'warning' | 'error'} options.type
|
||||
* @returns {Promise<any>} Returns a promise that resolves on success and rejects on error
|
||||
*/
|
||||
@Cordova()
|
||||
@@ -57,7 +56,7 @@ export class TapticEngine extends IonicNativePlugin {
|
||||
/**
|
||||
* Use this to indicate success/failure/warning to the user.
|
||||
* @param options {Object} should be of the type { style: 'light' } (or 'medium'/'heavy')
|
||||
* @param options.type {string}
|
||||
* @param {'light' | 'medium' | 'heavy'} options.type
|
||||
* @returns {Promise<any>} Returns a promise that resolves on success and rejects on error
|
||||
*/
|
||||
@Cordova()
|
||||
@@ -65,4 +64,30 @@ export class TapticEngine extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tell the taptic engine that a gesture for a selection change is starting.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
gestureSelectionStart(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tell the taptic engine that a selection changed during a gesture.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
gestureSelectionChanged(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tell the taptic engine we are done with a gesture. This needs to be called lest resources are not properly recycled.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
gestureSelectionEnd(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
/**
|
||||
* @paid
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
export interface TealConfig {
|
||||
/**
|
||||
@@ -198,7 +198,6 @@ export class Tealium extends IonicNativePlugin {
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function retrieves a value from the Tealium Volatile data store
|
||||
* @param keyName {string} The key name that this data will retrieved from the Tealium data store
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
CordovaInstance,
|
||||
InstanceCheck,
|
||||
IonicNativePlugin,
|
||||
Plugin
|
||||
} from '@ionic-native/core';
|
||||
import { CordovaInstance, InstanceCheck, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
declare const cordova: any;
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
Cordova,
|
||||
CordovaFunctionOverride,
|
||||
IonicNativePlugin,
|
||||
Plugin
|
||||
} from '@ionic-native/core';
|
||||
import { Cordova, CordovaFunctionOverride, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
export interface ThreeDeeTouchQuickAction {
|
||||
@@ -85,7 +80,7 @@ export interface ThreeDeeTouchForceTouch {
|
||||
* );
|
||||
*
|
||||
*
|
||||
* let actions: Array<ThreeDeeTouchQuickAction> = [
|
||||
* let actions: ThreeDeeTouchQuickAction[] = [
|
||||
* {
|
||||
* type: 'checkin',
|
||||
* title: 'Check in',
|
||||
@@ -164,7 +159,7 @@ export class ThreeDeeTouch extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
configureQuickActions(quickActions: Array<ThreeDeeTouchQuickAction>): void {}
|
||||
configureQuickActions(quickActions: ThreeDeeTouchQuickAction[]): void { }
|
||||
|
||||
/**
|
||||
* When a home icon is pressed, your app launches and this JS callback is invoked.
|
||||
|
||||
@@ -40,12 +40,11 @@ export class Vibration extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Vibrates the device for given amount of time.
|
||||
* @param time {number|Array<number>} Milliseconds to vibrate the device. If passed an array of numbers, it will define a vibration pattern. Pass 0 to stop any vibration immediately.
|
||||
* @param time {number|number[]} Milliseconds to vibrate the device. If passed an array of numbers, it will define a vibration pattern. Pass 0 to stop any vibration immediately.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
vibrate(time: number | Array<number>) {
|
||||
}
|
||||
vibrate(time: number | number[]) { }
|
||||
|
||||
}
|
||||
|
||||
@@ -30,7 +30,10 @@ export interface MediaFile {
|
||||
* @param {Function} successCallback
|
||||
* @param {Function} [errorCallback]
|
||||
*/
|
||||
getFormatData(successCallback: (data: MediaFileData) => any, errorCallback?: (err: any) => any): any;
|
||||
getFormatData(
|
||||
successCallback: (data: MediaFileData) => any,
|
||||
errorCallback?: (err: any) => any
|
||||
): any;
|
||||
}
|
||||
|
||||
export interface MediaFileData {
|
||||
@@ -57,7 +60,6 @@ export interface MediaFileData {
|
||||
}
|
||||
|
||||
export interface VideoCapturePlusOptions {
|
||||
|
||||
/**
|
||||
* The number of videos to record, default 1 (on iOS always 1)
|
||||
*/
|
||||
@@ -93,7 +95,6 @@ export interface VideoCapturePlusOptions {
|
||||
* iOS only
|
||||
*/
|
||||
overlayText?: string;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -138,7 +139,6 @@ export interface VideoCapturePlusOptions {
|
||||
})
|
||||
@Injectable()
|
||||
export class VideoCapturePlus extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Starts recordings
|
||||
* @param [options] {VideoCapturePlusOptions} Configure options
|
||||
@@ -150,5 +150,4 @@ export class VideoCapturePlus extends IonicNativePlugin {
|
||||
captureVideo(options?: VideoCapturePlusOptions): Promise<MediaFile[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user