diff --git a/.gitignore b/.gitignore
index fc1d176b3..5d38fa0d1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@ dist/
src/@ionic-native/plugins/**/ngx
*.d.ts
injectable-classes.json
+
diff --git a/CHANGELOG.md b/CHANGELOG.md
index de6904ed9..04552bed1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,53 @@
# [5.0.0-beta.14](https://github.com/ionic-team/ionic-native/compare/v4.10.0...v5.0.0-beta.14) (2018-07-18)
+### Bug Fixes
+
+* **extended-device-information:** Fixed Memory Display Bug ([#2641](https://github.com/ionic-team/ionic-native/issues/2641)) ([2ac5282](https://github.com/ionic-team/ionic-native/commit/2ac5282))
+* **network:** bind listener to document instead of window ([#2622](https://github.com/ionic-team/ionic-native/issues/2622)) ([d10777a](https://github.com/ionic-team/ionic-native/commit/d10777a))
+* **photo-library:** interface missing includeVideos ([3f415f9](https://github.com/ionic-team/ionic-native/commit/3f415f9)), closes [#2624](https://github.com/ionic-team/ionic-native/issues/2624)
+
+
+### Features
+
+* **fabric:** add fabric plugin ([#2618](https://github.com/ionic-team/ionic-native/issues/2618)) ([9b4fd02](https://github.com/ionic-team/ionic-native/commit/9b4fd02))
+* **local-notifications:** add new foreground property ([#2633](https://github.com/ionic-team/ionic-native/issues/2633)) ([229b62c](https://github.com/ionic-team/ionic-native/commit/229b62c))
+* **webengage:** add optional config with initialization ([#2637](https://github.com/ionic-team/ionic-native/issues/2637)) ([ca9a702](https://github.com/ionic-team/ionic-native/commit/ca9a702))
+
+
+
+
+# [4.11.0](https://github.com/ionic-team/ionic-native/compare/v4.10.1...v4.11.0) (2018-07-29)
+
+
+### Bug Fixes
+
+* **http:** add correct return types for downloadFile and uploadFile ([4092831](https://github.com/ionic-team/ionic-native/commit/4092831)), closes [#2615](https://github.com/ionic-team/ionic-native/issues/2615)
+
+
+### Features
+
+* **clevertap:** add CleverTap plugin ([#2609](https://github.com/ionic-team/ionic-native/issues/2609)) ([27d380e](https://github.com/ionic-team/ionic-native/commit/27d380e))
+* **facebook:** add getDeferredApplink function ([3b32e19](https://github.com/ionic-team/ionic-native/commit/3b32e19)), closes [#2510](https://github.com/ionic-team/ionic-native/issues/2510)
+* **webengage:** add webengage plugin ([#2604](https://github.com/ionic-team/ionic-native/issues/2604)) ([bd5bd7e](https://github.com/ionic-team/ionic-native/commit/bd5bd7e))
+
+
+
+
+## [4.10.1](https://github.com/ionic-team/ionic-native/compare/v5.0.0-beta.14...v4.10.1) (2018-07-25)
+
+
+### Bug Fixes
+
+* **nfs:** Optional arguments for records like textRecord ([#2605](https://github.com/ionic-team/ionic-native/issues/2605)) ([b635ba9](https://github.com/ionic-team/ionic-native/commit/b635ba9))
+* **user-agent:** Plugin not installed ([#2607](https://github.com/ionic-team/ionic-native/issues/2607)) ([79cb478](https://github.com/ionic-team/ionic-native/commit/79cb478))
+
+
+
+
+# [5.0.0-beta.14](https://github.com/ionic-team/ionic-native/compare/v4.10.0...v5.0.0-beta.14) (2018-07-18)
+
+
### Features
* **abbyy-rtr:** add ABBYY Real-Time Recognition plugin ([#2580](https://github.com/ionic-team/ionic-native/issues/2580)) ([ecc698e](https://github.com/ionic-team/ionic-native/commit/ecc698e))
diff --git a/README.md b/README.md
index 976c5d4d6..8672989b2 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,5 @@
[](https://circleci.com/gh/ionic-team/ionic-native) [](http://commitizen.github.io/cz-cli/) 
-
# Ionic Native
Ionic Native is a curated set of wrappers for Cordova plugins that make adding any native functionality you need to your [Ionic](https://ionicframework.com/) mobile app easy.
@@ -10,6 +9,7 @@ Ionic Native wraps plugin callbacks in a Promise or Observable, providing a comm
## Installation
Run following command to install Ionic Native in your project.
+
```bash
npm install @ionic-native/core@beta --save
```
@@ -72,9 +72,9 @@ export class MyComponent {
// to stop watching
watch.unsubscribe();
});
-
+
}
-
+
}
```
@@ -151,8 +151,8 @@ Then create a new class that extends the `Camera` class with a mock implementati
class CameraMock extends Camera {
getPicture(options) {
return new Promise((resolve, reject) => {
- resolve("BASE_64_ENCODED_DATA_GOES_HERE");
- })
+ resolve('BASE_64_ENCODED_DATA_GOES_HERE');
+ });
}
}
```
@@ -160,9 +160,7 @@ class CameraMock extends Camera {
Finally, override the previous `Camera` class in your `providers` for this module:
```typescript
-providers: [
- { provide: Camera, useClass: CameraMock }
-]
+providers: [{ provide: Camera, useClass: CameraMock }];
```
Here's the full example:
@@ -188,37 +186,26 @@ class CameraMock extends Camera {
}
@NgModule({
- declarations: [
- MyApp,
- HomePage
- ],
- imports: [
- BrowserModule,
- IonicModule.forRoot(MyApp)
- ],
+ declarations: [MyApp, HomePage],
+ imports: [BrowserModule, IonicModule.forRoot(MyApp)],
bootstrap: [IonicApp],
- entryComponents: [
- MyApp,
- HomePage
- ],
+ entryComponents: [MyApp, HomePage],
providers: [
{ provide: ErrorHandler, useClass: IonicErrorHandler },
{ provide: Camera, useClass: CameraMock }
]
})
export class AppModule {}
-
```
-
### Runtime Diagnostics
Spent way too long diagnosing an issue only to realize a plugin wasn't firing or installed? Ionic Native lets you know what the issue is and how you can resolve it.

-
## Plugin Missing?
+
Let us know or submit a PR! Take a look at [the Developer Guide](https://github.com/ionic-team/ionic-native/blob/master/DEVELOPER.md) for more on how to contribute. :heart:
diff --git a/gulpfile.js b/gulpfile.js
index 95ec30094..673537f1e 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -1,8 +1,8 @@
-"use strict";
+'use strict';
const gulp = require('gulp'),
minimist = require('minimist'),
- rename = require("gulp-rename"),
+ rename = require('gulp-rename'),
tslint = require('gulp-tslint'),
replace = require('gulp-replace'),
_ = require('lodash');
@@ -10,41 +10,44 @@ const gulp = require('gulp'),
const flagConfig = {
string: ['port', 'version', 'ngVersion', 'animations'],
boolean: ['dry-run'],
- alias: {'p': 'port', 'v': 'version', 'a': 'ngVersion'},
+ alias: { p: 'port', v: 'version', a: 'ngVersion' },
default: { port: 8000 }
},
-
flags = minimist(process.argv.slice(2), flagConfig);
/* Docs tasks */
require('./scripts/docs/gulp-tasks')(gulp, flags);
gulp.task('lint', () => {
- return gulp.src('src/**/*.ts')
- .pipe(tslint({
- formatter: "verbose",
- configuration: 'tslint.json'
- }))
+ return gulp
+ .src('src/**/*.ts')
+ .pipe(
+ tslint({
+ formatter: 'verbose',
+ configuration: 'tslint.json'
+ })
+ )
.pipe(tslint.report());
});
gulp.task('plugin:create', () => {
- if (flags.n && flags.n !== ''){
-
- const src = flags.m ? './scripts/templates/wrap-min.tmpl':'./scripts/templates/wrap.tmpl',
+ if (flags.n && flags.n !== '') {
+ const src = flags.m
+ ? './scripts/templates/wrap-min.tmpl'
+ : './scripts/templates/wrap.tmpl',
pluginName = flags.n,
spaced = pluginName.replace(/(?!^)([A-Z])/g, ' $1'),
kebabCase = _.kebabCase(pluginName);
- return gulp.src(src)
+ return gulp
+ .src(src)
.pipe(replace('{{ PluginName }}', pluginName))
.pipe(replace('{{ Plugin_Name }}', spaced))
.pipe(replace('{{ pluginName }}', _.lowerFirst(pluginName)))
.pipe(replace('{{ plugin-name }}', kebabCase))
.pipe(rename('index.ts'))
.pipe(gulp.dest('./src/@ionic-native/plugins/' + kebabCase));
-
} else {
- console.log("Usage is: gulp plugin:create -n PluginName");
+ console.log('Usage is: gulp plugin:create -n PluginName');
}
});
diff --git a/package-lock.json b/package-lock.json
index 9ad808079..1315646ec 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2017,14 +2017,23 @@
}
},
"browserify-des": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.1.tgz",
- "integrity": "sha512-zy0Cobe3hhgpiOM32Tj7KQ3Vl91m0njwsjzZQK1L+JDf11dzP9qIvjreVinsvXrgfjhStXwUWAEpB9D7Gwmayw==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz",
+ "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==",
"dev": true,
"requires": {
"cipher-base": "^1.0.1",
"des.js": "^1.0.0",
- "inherits": "^2.0.1"
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.1.2"
+ },
+ "dependencies": {
+ "safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true
+ }
}
},
"browserify-rsa": {
@@ -2081,9 +2090,9 @@
}
},
"buffer": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.1.0.tgz",
- "integrity": "sha512-YkIRgwsZwJWTnyQrsBTWefizHh+8GYj3kbL1BTiAQ/9pwpino0G7B2gp5tx/FUBqUlvtxV85KNR3mwfAtv15Yw==",
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.0.tgz",
+ "integrity": "sha512-nUJyfChH7PMJy75eRDCCKtszSEFokUNXC1hNVSe+o+VdcgvDPLs20k3v8UXI8ruRYAJiYtyRea8mYyqPxoHWDw==",
"dev": true,
"requires": {
"base64-js": "^1.0.2",
@@ -2700,6 +2709,149 @@
"lodash": "^4.2.1",
"meow": "^4.0.0",
"tempfile": "^1.1.1"
+ },
+ "dependencies": {
+ "camelcase": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
+ "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
+ "dev": true
+ },
+ "camelcase-keys": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz",
+ "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=",
+ "dev": true,
+ "requires": {
+ "camelcase": "^4.1.0",
+ "map-obj": "^2.0.0",
+ "quick-lru": "^1.0.0"
+ }
+ },
+ "find-up": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
+ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
+ "dev": true,
+ "requires": {
+ "locate-path": "^2.0.0"
+ }
+ },
+ "indent-string": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz",
+ "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=",
+ "dev": true
+ },
+ "load-json-file": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
+ "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.2",
+ "parse-json": "^4.0.0",
+ "pify": "^3.0.0",
+ "strip-bom": "^3.0.0"
+ }
+ },
+ "map-obj": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz",
+ "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=",
+ "dev": true
+ },
+ "meow": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz",
+ "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==",
+ "dev": true,
+ "requires": {
+ "camelcase-keys": "^4.0.0",
+ "decamelize-keys": "^1.0.0",
+ "loud-rejection": "^1.0.0",
+ "minimist": "^1.1.3",
+ "minimist-options": "^3.0.1",
+ "normalize-package-data": "^2.3.4",
+ "read-pkg-up": "^3.0.0",
+ "redent": "^2.0.0",
+ "trim-newlines": "^2.0.0"
+ }
+ },
+ "parse-json": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
+ "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
+ "dev": true,
+ "requires": {
+ "error-ex": "^1.3.1",
+ "json-parse-better-errors": "^1.0.1"
+ }
+ },
+ "path-type": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
+ "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
+ "dev": true,
+ "requires": {
+ "pify": "^3.0.0"
+ }
+ },
+ "pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+ "dev": true
+ },
+ "read-pkg": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
+ "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=",
+ "dev": true,
+ "requires": {
+ "load-json-file": "^4.0.0",
+ "normalize-package-data": "^2.3.2",
+ "path-type": "^3.0.0"
+ }
+ },
+ "read-pkg-up": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz",
+ "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=",
+ "dev": true,
+ "requires": {
+ "find-up": "^2.0.0",
+ "read-pkg": "^3.0.0"
+ }
+ },
+ "redent": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz",
+ "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=",
+ "dev": true,
+ "requires": {
+ "indent-string": "^3.0.0",
+ "strip-indent": "^2.0.0"
+ }
+ },
+ "strip-bom": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
+ "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
+ "dev": true
+ },
+ "strip-indent": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz",
+ "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=",
+ "dev": true
+ },
+ "trim-newlines": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz",
+ "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=",
+ "dev": true
+ }
}
},
"conventional-changelog-codemirror": {
@@ -2730,6 +2882,20 @@
"read-pkg": "^1.1.0",
"read-pkg-up": "^1.0.1",
"through2": "^2.0.0"
+ },
+ "dependencies": {
+ "dateformat": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz",
+ "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==",
+ "dev": true
+ },
+ "q": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
+ "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
+ "dev": true
+ }
}
},
"conventional-changelog-ember": {
@@ -2848,6 +3014,149 @@
"split2": "^2.0.0",
"through2": "^2.0.0",
"trim-off-newlines": "^1.0.0"
+ },
+ "dependencies": {
+ "camelcase": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
+ "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
+ "dev": true
+ },
+ "camelcase-keys": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz",
+ "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=",
+ "dev": true,
+ "requires": {
+ "camelcase": "^4.1.0",
+ "map-obj": "^2.0.0",
+ "quick-lru": "^1.0.0"
+ }
+ },
+ "find-up": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
+ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
+ "dev": true,
+ "requires": {
+ "locate-path": "^2.0.0"
+ }
+ },
+ "indent-string": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz",
+ "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=",
+ "dev": true
+ },
+ "load-json-file": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
+ "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.2",
+ "parse-json": "^4.0.0",
+ "pify": "^3.0.0",
+ "strip-bom": "^3.0.0"
+ }
+ },
+ "map-obj": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz",
+ "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=",
+ "dev": true
+ },
+ "meow": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz",
+ "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==",
+ "dev": true,
+ "requires": {
+ "camelcase-keys": "^4.0.0",
+ "decamelize-keys": "^1.0.0",
+ "loud-rejection": "^1.0.0",
+ "minimist": "^1.1.3",
+ "minimist-options": "^3.0.1",
+ "normalize-package-data": "^2.3.4",
+ "read-pkg-up": "^3.0.0",
+ "redent": "^2.0.0",
+ "trim-newlines": "^2.0.0"
+ }
+ },
+ "parse-json": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
+ "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
+ "dev": true,
+ "requires": {
+ "error-ex": "^1.3.1",
+ "json-parse-better-errors": "^1.0.1"
+ }
+ },
+ "path-type": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
+ "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
+ "dev": true,
+ "requires": {
+ "pify": "^3.0.0"
+ }
+ },
+ "pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+ "dev": true
+ },
+ "read-pkg": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
+ "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=",
+ "dev": true,
+ "requires": {
+ "load-json-file": "^4.0.0",
+ "normalize-package-data": "^2.3.2",
+ "path-type": "^3.0.0"
+ }
+ },
+ "read-pkg-up": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz",
+ "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=",
+ "dev": true,
+ "requires": {
+ "find-up": "^2.0.0",
+ "read-pkg": "^3.0.0"
+ }
+ },
+ "redent": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz",
+ "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=",
+ "dev": true,
+ "requires": {
+ "indent-string": "^3.0.0",
+ "strip-indent": "^2.0.0"
+ }
+ },
+ "strip-bom": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
+ "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
+ "dev": true
+ },
+ "strip-indent": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz",
+ "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=",
+ "dev": true
+ },
+ "trim-newlines": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz",
+ "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=",
+ "dev": true
+ }
}
},
"convert-source-map": {
@@ -5497,6 +5806,149 @@
"meow": "^4.0.0",
"split2": "^2.0.0",
"through2": "^2.0.0"
+ },
+ "dependencies": {
+ "camelcase": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
+ "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
+ "dev": true
+ },
+ "camelcase-keys": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz",
+ "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=",
+ "dev": true,
+ "requires": {
+ "camelcase": "^4.1.0",
+ "map-obj": "^2.0.0",
+ "quick-lru": "^1.0.0"
+ }
+ },
+ "find-up": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
+ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
+ "dev": true,
+ "requires": {
+ "locate-path": "^2.0.0"
+ }
+ },
+ "indent-string": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz",
+ "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=",
+ "dev": true
+ },
+ "load-json-file": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
+ "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.2",
+ "parse-json": "^4.0.0",
+ "pify": "^3.0.0",
+ "strip-bom": "^3.0.0"
+ }
+ },
+ "map-obj": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz",
+ "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=",
+ "dev": true
+ },
+ "meow": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz",
+ "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==",
+ "dev": true,
+ "requires": {
+ "camelcase-keys": "^4.0.0",
+ "decamelize-keys": "^1.0.0",
+ "loud-rejection": "^1.0.0",
+ "minimist": "^1.1.3",
+ "minimist-options": "^3.0.1",
+ "normalize-package-data": "^2.3.4",
+ "read-pkg-up": "^3.0.0",
+ "redent": "^2.0.0",
+ "trim-newlines": "^2.0.0"
+ }
+ },
+ "parse-json": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
+ "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
+ "dev": true,
+ "requires": {
+ "error-ex": "^1.3.1",
+ "json-parse-better-errors": "^1.0.1"
+ }
+ },
+ "path-type": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
+ "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
+ "dev": true,
+ "requires": {
+ "pify": "^3.0.0"
+ }
+ },
+ "pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+ "dev": true
+ },
+ "read-pkg": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
+ "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=",
+ "dev": true,
+ "requires": {
+ "load-json-file": "^4.0.0",
+ "normalize-package-data": "^2.3.2",
+ "path-type": "^3.0.0"
+ }
+ },
+ "read-pkg-up": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz",
+ "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=",
+ "dev": true,
+ "requires": {
+ "find-up": "^2.0.0",
+ "read-pkg": "^3.0.0"
+ }
+ },
+ "redent": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz",
+ "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=",
+ "dev": true,
+ "requires": {
+ "indent-string": "^3.0.0",
+ "strip-indent": "^2.0.0"
+ }
+ },
+ "strip-bom": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
+ "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
+ "dev": true
+ },
+ "strip-indent": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz",
+ "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=",
+ "dev": true
+ },
+ "trim-newlines": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz",
+ "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=",
+ "dev": true
+ }
}
},
"git-remote-origin-url": {
@@ -6177,13 +6629,13 @@
}
},
"hash.js": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.4.tgz",
- "integrity": "sha512-A6RlQvvZEtFS5fLU43IDu0QUmBy+fDO9VMdTXvufKwIkt/rFfvICAViCax5fbDO4zdNzaC3/27ZhKUok5bAJyw==",
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.5.tgz",
+ "integrity": "sha512-eWI5HG9Np+eHV1KQhisXWwM+4EPPYe5dFX1UZZH7k/E3JzDEazVH+VGlZi6R94ZqImq+A3D1mCEtrFIfg/E7sA==",
"dev": true,
"requires": {
"inherits": "^2.0.3",
- "minimalistic-assert": "^1.0.0"
+ "minimalistic-assert": "^1.0.1"
}
},
"hawk": {
@@ -6296,12 +6748,6 @@
"integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=",
"dev": true
},
- "iconv-lite": {
- "version": "0.4.19",
- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz",
- "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==",
- "dev": true
- },
"ieee754": {
"version": "1.1.12",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz",
@@ -12246,9 +12692,9 @@
}
},
"semver": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
- "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=",
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",
+ "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==",
"dev": true
},
"semver-diff": {
@@ -12522,6 +12968,11 @@
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
"integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
"dev": true
+ },
+ "socks": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/socks/-/socks-2.2.1.tgz",
+ "integrity": "sha512-0GabKw7n9mI46vcNrVfs0o6XzWzjVa3h6GaSo2UPxtWAROXUWavfJWh1M4PR5tnE0dcnQXZIDFP4yrAysLze/w=="
}
}
},
@@ -16001,6 +16452,14 @@
"dev": true,
"requires": {
"iconv-lite": "0.4.19"
+ },
+ "dependencies": {
+ "iconv-lite": {
+ "version": "0.4.19",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz",
+ "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==",
+ "dev": true
+ }
}
},
"whatwg-mimetype": {
diff --git a/src/@ionic-native/plugins/clevertap/index.ts b/src/@ionic-native/plugins/clevertap/index.ts
new file mode 100644
index 000000000..cb2bf0cb5
--- /dev/null
+++ b/src/@ionic-native/plugins/clevertap/index.ts
@@ -0,0 +1,592 @@
+import { Injectable } from '@angular/core';
+import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
+
+declare var clevertap: any;
+
+/**
+ * @name CleverTap
+ * @description
+ * Cordova Plugin that wraps CleverTap SDK for Android and iOS
+ *
+ * @usage
+ * ```typescript
+ * import { CleverTap } from '@ionic-native/clevertap';
+
+ * constructor(private clevertap: CleverTap) { }
+ *
+ * ```
+ */
+@Plugin({
+ pluginName: 'CleverTap',
+ plugin: 'clevertap-cordova',
+ pluginRef: 'CleverTap',
+ repo: 'https://github.com/CleverTap/clevertap-cordova',
+ platforms: ['Android', 'iOS']
+})
+@Injectable()
+export class CleverTap extends IonicNativePlugin {
+ /**
+ * notify device ready
+ * NOTE: in iOS use to be notified of launch Push Notification or Deep Link
+ * in Android use only in android phonegap build projects
+ * @returns {Promise}
+ */
+ @Cordova()
+ notifyDeviceReady(): Promise {
+ return;
+ }
+
+ /*******************
+ * Personalization
+ ******************/
+
+ /**
+ * Personalization
+ * Enables the Personalization API
+ * @returns {Promise}
+ */
+ @Cordova()
+ enablePersonalization(): Promise {
+ return;
+ }
+
+ /**
+ * Enables tracking opt out for the currently active user.
+ * @param optOut {boolean}
+ * @returns {Promise}
+ */
+ @Cordova()
+ setOptOut(optOut: boolean): Promise {
+ return;
+ }
+
+ /**
+ * Enables the reporting of device network related information, including IP address. This reporting is disabled by default.
+ * @param enable {boolean}
+ * @returns {Promise}
+ */
+ @Cordova()
+ enableDeviceNetworkInfoReporting(enable: boolean): Promise {
+ return;
+ }
+
+ /*******************
+ * Push
+ ******************/
+
+ /**
+ * Registers for push notifications
+ * @returns {Promise}
+ */
+ @Cordova()
+ registerPush(): Promise {
+ return;
+ }
+
+ /**
+ * Sets the device's push token
+ * @param token {string}
+ * @returns {Promise}
+ */
+ @Cordova()
+ setPushToken(token: string): Promise {
+ return;
+ }
+
+ /**
+ * Create Notification Channel for Android O+
+ * @param channelID {string}
+ * @param channelName {string}
+ * @param channelDescription {string}
+ * @param importance {number}
+ * @param showBadge {boolean}
+ * @returns {Promise}
+ */
+ @Cordova()
+ createNotificationChannel(
+ channelID: string,
+ channelName: string,
+ channelDescription: string,
+ importance: number,
+ showBadge: boolean
+ ): Promise {
+ return;
+ }
+
+ /**
+ * Create Notification Channel for Android O+
+ * @param channelID {string}
+ * @param channelName {string}
+ * @param channelDescription {string}
+ * @param importance {number}
+ * @param showBadge {boolean}
+ * @param sound {string}
+ * @returns {Promise}
+ */
+ @Cordova()
+ createNotificationChannelWithSound(
+ channelID: string,
+ channelName: string,
+ channelDescription: string,
+ importance: number,
+ showBadge: boolean,
+ sound: string
+ ): Promise {
+ return;
+ }
+
+ /**
+ * Create Notification Channel with Group ID for Android O+
+ * @param channelID {string}
+ * @param channelName {string}
+ * @param channelDescription {string}
+ * @param importance {number}
+ * @param groupId {string}
+ * @param showBadge {boolean}
+ * @param sound {string}
+ * @returns {Promise}
+ */
+ @Cordova()
+ createNotificationChannelWithGroupId(
+ channelID: string,
+ channelName: string,
+ channelDescription: string,
+ importance: number,
+ groupId: string,
+ showBadge: boolean
+ ): Promise {
+ return;
+ }
+
+ /**
+ * Create Notification Channel with Group ID for Android O+
+ * @param channelID {string}
+ * @param channelName {string}
+ * @param channelDescription {string}
+ * @param importance {number}
+ * @param groupId {string}
+ * @param showBadge {boolean}
+ * @returns {Promise}
+ */
+ @Cordova()
+ createNotificationChannelWithGroupIdAndSound(
+ channelID: string,
+ channelName: string,
+ channelDescription: string,
+ importance: number,
+ groupId: string,
+ showBadge: boolean,
+ sound: string
+ ): Promise {
+ return;
+ }
+
+ /**
+ * Create Notification Channel Group for Android O+
+ * @param groupID {string}
+ * @param groupName {string}
+ * @returns {Promise}
+ */
+ @Cordova()
+ createNotificationChannelGroup(
+ groupID: string,
+ groupName: string
+ ): Promise {
+ return;
+ }
+
+ /**
+ * Delete Notification Channel for Android O+
+ * @param channelID {string}
+ * @returns {Promise}
+ */
+ @Cordova()
+ deleteNotificationChannel(channelID: string): Promise {
+ return;
+ }
+
+ /**
+ * Delete Notification Group for Android O+
+ * @param groupID {string}
+ * @returns {Promise}
+ */
+ @Cordova()
+ deleteNotificationChannelGroup(groupID: string): Promise {
+ return;
+ }
+
+ /*******************
+ * Events
+ ******************/
+
+ /**
+ * Record Screen View
+ * @param screenName {string}
+ * @returns {Promise}
+ */
+ @Cordova()
+ recordScreenView(screenName: string): Promise {
+ return;
+ }
+
+ /**
+ * Record Event with Name
+ * @param eventName {string}
+ * @returns {Promise}
+ */
+ @Cordova()
+ recordEventWithName(eventName: string): Promise {
+ return;
+ }
+
+ /**
+ * Record Event with Name and Event properties
+ * @param eventName {string}
+ * @param eventProps {any}
+ * @returns {Promise}
+ */
+ @Cordova()
+ recordEventWithNameAndProps(
+ eventName: string,
+ eventProps: any
+ ): Promise {
+ return;
+ }
+
+ /**
+ * Record Charged Event with Details and Items
+ * @param details {any} object with transaction details
+ * @param items {any} array of items purchased
+ * @returns {Promise}
+ */
+ @Cordova()
+ recordChargedEventWithDetailsAndItems(
+ details: any,
+ items: any
+ ): Promise {
+ return;
+ }
+
+ /**
+ * Get Event First Time
+ * @param eventName {string}
+ * callback returns epoch seconds or -1
+ * @returns {Promise}
+ */
+ @Cordova()
+ eventGetFirstTime(eventName: string): Promise {
+ return;
+ }
+
+ /**
+ * Get Event Last Time
+ * @param eventName {string}
+ * callback returns epoch seconds or -1
+ * @returns {Promise}
+ */
+ @Cordova()
+ eventGetLastTime(eventName: string): Promise {
+ return;
+ }
+
+ /**
+ * Get Event Number of Occurrences
+ * @param eventName {string}
+ * calls back with int or -1
+ * @returns {Promise}
+ */
+ @Cordova()
+ eventGetOccurrences(eventName: string): Promise {
+ return;
+ }
+
+ /**
+ * Get Event Details
+ * @param eventName {string}
+ * calls back with object {"eventName": , "firstTime":, "lastTime": , "count": } or empty object
+ * @returns {Promise}
+ */
+ @Cordova()
+ eventGetDetails(eventName: string): Promise {
+ return;
+ }
+
+ /**
+ * Get Event History
+ * calls back with object {"eventName1":, "eventName2":}
+ * @returns {Promise}
+ */
+ @Cordova()
+ getEventHistory(): Promise {
+ return;
+ }
+
+ /*******************
+ * Profiles
+ ******************/
+
+ /**
+ * Get the device location if available.
+ * On iOS:
+ * Calling this will prompt the user location permissions dialog.
+ * Please be sure to include the NSLocationWhenInUseUsageDescription key in your Info.plist.
+ * Uses desired accuracy of kCLLocationAccuracyHundredMeters.
+ * If you need background location updates or finer accuracy please implement your own location handling.
+ * On Android:
+ * Requires Location Permission in AndroidManifest e.g. "android.permission.ACCESS_COARSE_LOCATION"
+ * You can use location to pass it to CleverTap via the setLocation API
+ * for, among other things, more fine-grained geo-targeting and segmentation purposes.
+ * Note: on iOS the call to CleverTapSDK must be made on the main thread due to LocationManager restrictions, but the CleverTapSDK method itself is non-blocking.
+ * calls back with {lat:lat, lon:lon} lat and lon are floats
+ * @returns {Promise}
+ */
+ @Cordova()
+ getLocation(): Promise {
+ return;
+ }
+
+ /**
+ * Set location
+ * @param lat {number}
+ * @param lon {number}
+ * @returns {Promise}
+ */
+ @Cordova()
+ setLocation(lat: number, lon: number): Promise {
+ return;
+ }
+
+ /**
+ * Creates a separate and distinct user profile identified by one or more of Identity, Email, FBID or GPID values,
+ * and populated with the key-values included in the profile dictionary.
+ * If your app is used by multiple users, you can use this method to assign them each a unique profile to track them separately.
+ * If instead you wish to assign multiple Identity, Email, FBID and/or GPID values to the same user profile,
+ * use profileSet rather than this method.
+ * If none of Identity, Email, FBID or GPID is included in the profile dictionary,
+ * all properties values will be associated with the current user profile.
+ * When initially installed on this device, your app is assigned an "anonymous" profile.
+ * The first time you identify a user on this device (whether via onUserLogin or profileSet),
+ * the "anonymous" history on the device will be associated with the newly identified user.
+ * Then, use this method to switch between subsequent separate identified users.
+ * Please note that switching from one identified user to another is a costly operation
+ * in that the current session for the previous user is automatically closed
+ * and data relating to the old user removed, and a new session is started
+ * for the new user and data for that user refreshed via a network call to CleverTap.
+ * In addition, any global frequency caps are reset as part of the switch.
+ * @param profile {any} object
+ * @returns {Promise}
+ */
+ @Cordova()
+ onUserLogin(profile: any): Promise {
+ return;
+ }
+
+ /**
+ * Set profile attributes
+ * @param profile {any} object
+ * @returns {Promise}
+ */
+ @Cordova()
+ profileSet(profile: any): Promise {
+ return;
+ }
+
+ /**
+ * Set profile attributes from facebook user
+ * @param profile {any} facebook graph user object
+ * @returns {Promise}
+ */
+ @Cordova()
+ profileSetGraphUser(profile: any): Promise {
+ return;
+ }
+
+ /**
+ * Set profile attributes rom google plus user
+ * @param profile {any} google plus user object
+ * @returns {Promise}
+ */
+ @Cordova()
+ profileGooglePlusUser(profile: any): Promise {
+ return;
+ }
+
+ /**
+ * Get User Profile Property
+ * @param propertyName {string}
+ * calls back with value of propertyName or false
+ * @returns {Promise}
+ */
+ @Cordova()
+ profileGetProperty(propertyName: string): Promise {
+ return;
+ }
+
+ /**
+ * Get a unique CleverTap identifier suitable for use with install attribution providers.
+ * calls back with unique CleverTap attribution identifier
+ * @returns {Promise}
+ */
+ @Cordova()
+ profileGetCleverTapAttributionIdentifier(): Promise {
+ return;
+ }
+
+ /**
+ * Get User Profile CleverTapID
+ * calls back with CleverTapID or false
+ * @returns {Promise}
+ */
+ @Cordova()
+ profileGetCleverTapID(): Promise {
+ return;
+ }
+
+ /**
+ * Remove the property specified by key from the user profile
+ * @param key {string}
+ * @returns {Promise}
+ */
+ @Cordova()
+ profileRemoveValueForKey(key: string): Promise {
+ return;
+ }
+
+ /**
+ * Method for setting a multi-value user profile property
+ * @param key {string}
+ * @param values {any} array of strings
+ * @returns {Promise}
+ */
+ @Cordova()
+ profileSetMultiValues(key: string, values: any): Promise {
+ return;
+ }
+
+ /**
+ * Method for adding a value to a multi-value user profile property
+ * @param key {string}
+ * @param value {string}
+ * @returns {Promise}
+ */
+ @Cordova()
+ profileAddMultiValue(key: string, value: string): Promise {
+ return;
+ }
+
+ /**
+ * Method for adding values to a multi-value user profile property
+ * @param key {string}
+ * @param values {any} array of strings
+ * @returns {Promise}
+ */
+ @Cordova()
+ profileAddMultiValues(key: string, values: any): Promise {
+ return;
+ }
+
+ /**
+ * Method for removing a value from a multi-value user profile property
+ * @param key {string}
+ * @param value {string}
+ * @returns {Promise}
+ */
+ @Cordova()
+ profileRemoveMultiValue(key: string, value: string): Promise {
+ return;
+ }
+
+ /**
+ * Method for removing a value from a multi-value user profile property
+ * @param key {string}
+ * @param values {any} array of strings
+ * @returns {Promise}
+ */
+ @Cordova()
+ profileRemoveMultiValues(key: string, values: any): Promise {
+ return;
+ }
+
+ /*******************
+ * Session
+ ******************/
+
+ /**
+ * Get Session Elapsed Time
+ * calls back with seconds
+ * @returns {Promise}
+ */
+ @Cordova()
+ sessionGetTimeElapsed(): Promise {
+ return;
+ }
+
+ /**
+ * Get Session Total Visits
+ * calls back with with int or -1
+ * @returns {Promise}
+ */
+ @Cordova()
+ sessionGetTotalVisits(): Promise {
+ return;
+ }
+
+ /**
+ * Get Session Screen Count
+ * calls back with with int
+ * @returns {Promise}
+ */
+ @Cordova()
+ sessionGetScreenCount(): Promise {
+ return;
+ }
+
+ /**
+ * Get Session Previous Visit Time
+ * calls back with with epoch seconds or -1
+ * @returns {Promise}
+ */
+ @Cordova()
+ sessionGetPreviousVisitTime(): Promise {
+ return;
+ }
+
+ /**
+ * Get Sesssion Referrer UTM details
+ * object {"source": , "medium": , "campaign": } or empty object
+ * @returns {Promise}
+ */
+ @Cordova()
+ sessionGetUTMDetails(): Promise {
+ return;
+ }
+
+ /**
+ * Call this to manually track the utm details for an incoming install referrer
+ * @param source {string}
+ * @param medium {string}
+ * @param campaign {string}
+ * @returns {Promise}
+ */
+ @Cordova()
+ pushInstallReferrer(
+ source: string,
+ medium: string,
+ campaign: string
+ ): Promise {
+ return;
+ }
+
+ /*******************
+ * Developer Options
+ ******************/
+ /**
+ * 0 is off, 1 is info, 2 is debug, default is 1
+ * @param level {number}
+ * @returns {Promise}
+ */
+ @Cordova()
+ setDebugLevel(level: number): Promise {
+ return;
+ }
+}
diff --git a/src/@ionic-native/plugins/extended-device-information/index.ts b/src/@ionic-native/plugins/extended-device-information/index.ts
index 9f8660231..280b4b62d 100644
--- a/src/@ionic-native/plugins/extended-device-information/index.ts
+++ b/src/@ionic-native/plugins/extended-device-information/index.ts
@@ -4,7 +4,11 @@ import { CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Extended Device Information
* @description
- * Retrieves additional device information that is not provided by other plugins
+ * Retrieves additional device information from the Device Hardware
+ * - memory
+ * - cpumhz
+ * - totalstorage
+ * - freestorage
*
* @usage
* ```typescript
@@ -22,12 +26,12 @@ import { CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
pluginName: 'ExtendedDeviceInformation',
plugin: 'cordova-plugin-extended-device-information',
pluginRef: 'extended-device-information',
- repo: 'https://github.com/danielehrhardt/cordova-plugin-extended-device-information',
+ repo:
+ 'https://github.com/danielehrhardt/cordova-plugin-extended-device-information',
platforms: ['Android']
})
@Injectable()
export class ExtendedDeviceInformation extends IonicNativePlugin {
-
/**
* Get the device's memory size
*/
@@ -46,4 +50,9 @@ export class ExtendedDeviceInformation extends IonicNativePlugin {
@CordovaProperty()
totalstorage: string;
+ /**
+ * Get the total storage
+ */
+ @CordovaProperty
+ freestorage: number;
}
diff --git a/src/@ionic-native/plugins/fabric/index.ts b/src/@ionic-native/plugins/fabric/index.ts
new file mode 100644
index 000000000..2629ed738
--- /dev/null
+++ b/src/@ionic-native/plugins/fabric/index.ts
@@ -0,0 +1,425 @@
+import { Injectable } from '@angular/core';
+import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
+
+export interface Attributes {
+ [index: string]: String;
+}
+
+/**
+ * @name Crashlytics
+ * @description
+ * API for interacting with the Crashlytics kit.
+ *
+ * https://docs.fabric.io/crashlytics/index.html
+ *
+ * @usage
+ * ```typescript
+ * import { Crashlytics } from '@ionic-native/fabric';
+ *
+ *
+ * constructor(private crashlytics: Crashlytics) { }
+ *
+ * ...
+ *
+ * try {
+ * await this.loadData();
+ * } catch (e) {
+ * this.crashlytics.addLog("Error while loading data");
+ * this.crashlytics.sendNonFatalCrash(e.message || e);
+ * }
+ *
+ * ```
+ */
+@Plugin({
+ pluginName: 'Crashlytics',
+ plugin: 'cordova-fabric-plugin',
+ pluginRef: 'window.fabric.Crashlytics',
+ repo: 'https://www.npmjs.com/package/cordova-fabric-plugin',
+ install:
+ 'ionic cordova plugin add cordova-fabric-plugin --variable FABRIC_API_KEY=XXX --variable FABRIC_API_SECRET=xxx',
+ installVariables: ['FABRIC_API_KEY', 'FABRIC_API_SECRET'],
+ platforms: ['Android', 'iOS']
+})
+@Injectable()
+export class Crashlytics extends IonicNativePlugin {
+ /**
+ * Add logging that will be sent with your crash data. This logging will not show up
+ * in the system.log and will only be visible in your Crashlytics dashboard.
+ * @param message {string}
+ */
+ @Cordova({ sync: true })
+ addLog(message: string): void {
+ return;
+ }
+
+ /**
+ * Used to simulate a native platform crash (useful for testing Crashlytics logging).
+ */
+ @Cordova({ sync: true })
+ sendCrash(): void {
+ return;
+ }
+
+ /**
+ * Used to log a non-fatal error message (Android only).
+ */
+ @Cordova({ sync: true })
+ sendNonFatalCrash(message: string, stacktrace?: any): void {
+ return;
+ }
+
+ /**
+ * Used to record a non-fatal error message (iOS only).
+ */
+ @Cordova({ sync: true })
+ recordError(message: string, code: number): void {
+ return;
+ }
+
+ /**
+ * Sets the user's identifier for logging to Crashlytics backend.
+ */
+ @Cordova({ sync: true })
+ setUserIdentifier(userId: string): void {
+ return;
+ }
+
+ /**
+ * Sets the user's name for logging to Crashlytics backend.
+ */
+ @Cordova({ sync: true })
+ setUserName(userName: string): void {
+ return;
+ }
+
+ /**
+ * Sets the user's email address for logging to Crashlytics backend.
+ */
+ @Cordova({ sync: true })
+ setUserEmail(email: string): void {
+ return;
+ }
+
+ /**
+ * Sets a custom key/value pair for logging to Crashlytics backend.
+ */
+ @Cordova({ sync: true })
+ setStringValueForKey(value: string, key: string): void {
+ return;
+ }
+
+ /**
+ * Sets a custom key/value pair for logging to Crashlytics backend.
+ */
+ @Cordova({ sync: true })
+ setIntValueForKey(value: number, key: string): void {
+ return;
+ }
+
+ /**
+ * Sets a custom key/value pair for logging to Crashlytics backend.
+ */
+ @Cordova({ sync: true })
+ setBoolValueForKey(value: boolean, key: string): void {
+ return;
+ }
+
+ /**
+ * Sets a custom key/value pair for logging to Crashlytics backend.
+ */
+ @Cordova({ sync: true })
+ setFloatValueForKey(value: number, key: string): void {
+ return;
+ }
+}
+
+/**
+ * @name Answers
+ * @description
+ * API for interacting with the Answers kit.
+ *
+ * https://docs.fabric.io/crashlytics/index.html
+ *
+ * @usage
+ * ```typescript
+ * import { Answers } from '@ionic-native/fabric';
+ *
+ *
+ * constructor(private answers: Answers) { }
+ *
+ * ...
+ *
+ * this.answers.sendCustomEvent('SomeCustomEvent', { some: "attributes" })
+ *
+ * ```
+ */
+@Plugin({
+ pluginName: 'Answers',
+ plugin: 'cordova-fabric-plugin',
+ pluginRef: 'window.fabric.Answers',
+ repo: 'https://www.npmjs.com/package/cordova-fabric-plugin',
+ install:
+ 'ionic cordova plugin add cordova-fabric-plugin --variable FABRIC_API_KEY=XXX --variable FABRIC_API_SECRET=xxx',
+ installVariables: ['FABRIC_API_KEY', 'FABRIC_API_SECRET'],
+ platforms: ['Android', 'iOS']
+})
+@Injectable()
+export class Answers extends IonicNativePlugin {
+ /**
+ * Sends the Purchase tracking event.
+ *
+ * All parameters are optional.
+ *
+ * https://docs.fabric.io/android/answers/answers-events.html#purchase
+ *
+ * @param itemPrice The item's amount in the currency specified.
+ * @param currency The ISO4217 currency code.
+ * @param success Was the purchase completed succesfully?
+ * @param itemName The human-readable name for the item.
+ * @param itemType The category the item falls under.
+ * @param itemId A unique identifier used to track the item.
+ * @param attributes Any additional user-defined attributes to be logged.
+ */
+ @Cordova({ sync: true })
+ sendPurchase(
+ itemPrice?: number,
+ currency?: string,
+ success?: boolean,
+ itemName?: string,
+ itemType?: string,
+ itemId?: string,
+ attributes?: Attributes
+ ): void {
+ return;
+ }
+
+ /**
+ * Sends the Add To Cart tracking event.
+ *
+ * All parameters are optional.
+ *
+ * https://docs.fabric.io/android/answers/answers-events.html#add-to-cart
+ *
+ * @param itemPrice The item's amount in the currency specified.
+ * @param currency The ISO4217 currency code.
+ * @param itemName The human-readable name for the item.
+ * @param itemType The category the item falls under.
+ * @param itemId A unique identifier used to track the item.
+ * @param attributes Any additional user-defined attributes to be logged.
+ */
+ @Cordova({ sync: true })
+ sendAddToCart(
+ itemPrice?: number,
+ currency?: string,
+ itemName?: string,
+ itemType?: string,
+ itemId?: string,
+ attributes?: Attributes
+ ): void {
+ return;
+ }
+
+ /**
+ * Sends the Start Checkout tracking event.
+ *
+ * All parameters are optional.
+ *
+ * https://docs.fabric.io/android/answers/answers-events.html#start-checkout
+ *
+ * @param totalPrice The total price of all items in cart in the currency specified.
+ * @param currency The ISO4217 currency code.
+ * @param itemCount The count of items in cart.
+ * @param attributes Any additional user-defined attributes to be logged.
+ */
+ @Cordova({ sync: true })
+ sendStartCheckout(
+ totalPrice?: number,
+ currency?: string,
+ itemCount?: number,
+ attributes?: Attributes
+ ): void {
+ return;
+ }
+
+ /**
+ * Sends the Search tracking event.
+ *
+ * https://docs.fabric.io/android/answers/answers-events.html#search
+ *
+ * @param query What the user is searching for.
+ * @param attributes Any additional user-defined attributes to be logged.
+ */
+ @Cordova({ sync: true })
+ sendSearch(query: string, attributes?: Attributes): void {
+ return;
+ }
+
+ /**
+ * Sends the Share tracking event.
+ *
+ * All parameters are optional.
+ *
+ * https://docs.fabric.io/android/answers/answers-events.html#share
+ *
+ * @param method The method used to share content.
+ * @param contentName The description of the content.
+ * @param contentType The type or genre of content.
+ * @param contentId A unique key identifying the content.
+ * @param attributes Any additional user-defined attributes to be logged.
+ */
+ @Cordova({ sync: true })
+ sendShare(
+ method?: string,
+ contentName?: string,
+ contentType?: string,
+ contentId?: string,
+ attributes?: Attributes
+ ): void {
+ return;
+ }
+
+ /**
+ * Sends the Rated Content tracking event.
+ *
+ * All parameters are optional.
+ *
+ * https://docs.fabric.io/android/answers/answers-events.html#rated-content
+ *
+ * @param rating An integer rating of the content.
+ * @param contentName The human-readable name of content.
+ * @param contentType The category your item falls under.
+ * @param contentId A unique identifier used to track the item.
+ * @param attributes Any additional user-defined attributes to be logged.
+ */
+ @Cordova({ sync: true })
+ sendRatedContent(
+ rating?: number,
+ contentName?: string,
+ contentType?: string,
+ contentId?: string,
+ attributes?: Attributes
+ ): void {
+ return;
+ }
+
+ /**
+ * Sends the Sign Up tracking event.
+ *
+ * All parameters are optional.
+ *
+ * https://docs.fabric.io/android/answers/answers-events.html#sign-up
+ *
+ * @param method An optional description of the sign up method (Twitter, Facebook, etc.); defaults to "Direct".
+ * @param success An optional flag that indicates sign up success; defaults to true.
+ * @param attributes Any additional user-defined attributes to be logged.
+ */
+ @Cordova({ sync: true })
+ sendSignUp(
+ method?: string,
+ success?: boolean,
+ attributes?: Attributes
+ ): void {
+ return;
+ }
+
+ /**
+ * Sends the Log In tracking event.
+ *
+ * All parameters are optional.
+ *
+ * https://docs.fabric.io/android/answers/answers-events.html#log-in
+ *
+ * @param method An optional description of the sign in method (Twitter, Facebook, etc.); defaults to "Direct".
+ * @param success An optional flag that indicates sign in success; defaults to true.
+ * @param attributes Any additional user-defined attributes to be logged.
+ */
+ @Cordova({ sync: true })
+ sendLogIn(method?: string, success?: boolean, attributes?: Attributes): void {
+ return;
+ }
+
+ /**
+ * Sends the Invite tracking event.
+ *
+ * All parameters are optional.
+ *
+ * https://docs.fabric.io/android/answers/answers-events.html#invite
+ *
+ * @param method An optional description of the sign in method (Twitter, Facebook, etc.); defaults to "Direct".
+ * @param attributes Any additional user-defined attributes to be logged.
+ */
+ @Cordova({ sync: true })
+ sendInvite(method?: string, attributes?: Attributes): void {
+ return;
+ }
+
+ /**
+ * Sends the Level Start tracking event.
+ *
+ * All parameters are optional.
+ *
+ * https://docs.fabric.io/android/answers/answers-events.html#level-start
+ *
+ * @param levelName String key describing the level.
+ * @param attributes Any additional user-defined attributes to be logged.
+ */
+ @Cordova({ sync: true })
+ sendLevelStart(levelName?: string, attributes?: Attributes): void {
+ return;
+ }
+
+ /**
+ * Sends the Level End tracking event.
+ *
+ * All parameters are optional.
+ *
+ * https://docs.fabric.io/android/answers/answers-events.html#level-end
+ *
+ * @param levelName String key describing the level.
+ * @param score The score for this level.
+ * @param success Completed the level or failed trying.
+ * @param attributes Any additional user-defined attributes to be logged.
+ */
+ @Cordova({ sync: true })
+ sendLevelEnd(
+ levelName?: string,
+ score?: number,
+ success?: boolean,
+ attributes?: Attributes
+ ): void {
+ return;
+ }
+
+ /**
+ * Send the Content View tracking event.
+ *
+ * https://docs.fabric.io/android/answers/answers-events.html#content-view
+ */
+ @Cordova({ sync: true })
+ sendContentView(
+ name: string,
+ type?: string,
+ id?: string,
+ attributes?: Attributes
+ ): void {
+ return;
+ }
+
+ /**
+ * Shortcut for sendContentView(...) using type of "Screen".
+ */
+ @Cordova({ sync: true })
+ sendScreenView(name: string, id: string, attributes?: Attributes): void {
+ return;
+ }
+
+ /**
+ * Send a custom tracking event with the given name.
+ *
+ * https://docs.fabric.io/android/answers/answers-events.html#custom-event
+ */
+ @Cordova({ sync: true })
+ sendCustomEvent(name: string, attributes?: Attributes): void {
+ return;
+ }
+}
diff --git a/src/@ionic-native/plugins/facebook/index.ts b/src/@ionic-native/plugins/facebook/index.ts
index 7d6dc7308..b5903a7a8 100644
--- a/src/@ionic-native/plugins/facebook/index.ts
+++ b/src/@ionic-native/plugins/facebook/index.ts
@@ -2,11 +2,9 @@ import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface FacebookLoginResponse {
-
status: string;
authResponse: {
-
session_key: boolean;
accessToken: string;
@@ -18,9 +16,7 @@ export interface FacebookLoginResponse {
secret: string;
userID: string;
-
};
-
}
/**
@@ -114,46 +110,46 @@ export interface FacebookLoginResponse {
plugin: 'cordova-plugin-facebook4',
pluginRef: 'facebookConnectPlugin',
repo: 'https://github.com/jeduan/cordova-plugin-facebook4',
- install: 'ionic cordova plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="myApplication"',
+ install:
+ 'ionic cordova plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="myApplication"',
installVariables: ['APP_ID', 'APP_NAME'],
platforms: ['Android', 'iOS', 'Browser']
})
@Injectable()
export class Facebook extends IonicNativePlugin {
-
EVENTS: {
- EVENT_NAME_ACTIVATED_APP: 'fb_mobile_activate_app',
- EVENT_NAME_DEACTIVATED_APP: 'fb_mobile_deactivate_app',
- EVENT_NAME_SESSION_INTERRUPTIONS: 'fb_mobile_app_interruptions',
- EVENT_NAME_TIME_BETWEEN_SESSIONS: 'fb_mobile_time_between_sessions',
- EVENT_NAME_COMPLETED_REGISTRATION: 'fb_mobile_complete_registration',
- EVENT_NAME_VIEWED_CONTENT: 'fb_mobile_content_view',
- EVENT_NAME_SEARCHED: 'fb_mobile_search',
- EVENT_NAME_RATED: 'fb_mobile_rate',
- EVENT_NAME_COMPLETED_TUTORIAL: 'fb_mobile_tutorial_completion',
- EVENT_NAME_PUSH_TOKEN_OBTAINED: 'fb_mobile_obtain_push_token',
- EVENT_NAME_ADDED_TO_CART: 'fb_mobile_add_to_cart',
- EVENT_NAME_ADDED_TO_WISHLIST: 'fb_mobile_add_to_wishlist',
- EVENT_NAME_INITIATED_CHECKOUT: 'fb_mobile_initiated_checkout',
- EVENT_NAME_ADDED_PAYMENT_INFO: 'fb_mobile_add_payment_info',
- EVENT_NAME_PURCHASED: 'fb_mobile_purchase',
- EVENT_NAME_ACHIEVED_LEVEL: 'fb_mobile_level_achieved',
- EVENT_NAME_UNLOCKED_ACHIEVEMENT: 'fb_mobile_achievement_unlocked',
- EVENT_NAME_SPENT_CREDITS: 'fb_mobile_spent_credits',
- EVENT_PARAM_CURRENCY: 'fb_currency',
- EVENT_PARAM_REGISTRATION_METHOD: 'fb_registration_method',
- EVENT_PARAM_CONTENT_TYPE: 'fb_content_type',
- EVENT_PARAM_CONTENT_ID: 'fb_content_id',
- EVENT_PARAM_SEARCH_STRING: 'fb_search_string',
- EVENT_PARAM_SUCCESS: 'fb_success',
- EVENT_PARAM_MAX_RATING_VALUE: 'fb_max_rating_value',
- EVENT_PARAM_PAYMENT_INFO_AVAILABLE: 'fb_payment_info_available',
- EVENT_PARAM_NUM_ITEMS: 'fb_num_items',
- EVENT_PARAM_LEVEL: 'fb_level',
- EVENT_PARAM_DESCRIPTION: 'fb_description',
- EVENT_PARAM_SOURCE_APPLICATION: 'fb_mobile_launch_source',
- EVENT_PARAM_VALUE_YES: '1',
- EVENT_PARAM_VALUE_NO: '0'
+ EVENT_NAME_ACTIVATED_APP: 'fb_mobile_activate_app';
+ EVENT_NAME_DEACTIVATED_APP: 'fb_mobile_deactivate_app';
+ EVENT_NAME_SESSION_INTERRUPTIONS: 'fb_mobile_app_interruptions';
+ EVENT_NAME_TIME_BETWEEN_SESSIONS: 'fb_mobile_time_between_sessions';
+ EVENT_NAME_COMPLETED_REGISTRATION: 'fb_mobile_complete_registration';
+ EVENT_NAME_VIEWED_CONTENT: 'fb_mobile_content_view';
+ EVENT_NAME_SEARCHED: 'fb_mobile_search';
+ EVENT_NAME_RATED: 'fb_mobile_rate';
+ EVENT_NAME_COMPLETED_TUTORIAL: 'fb_mobile_tutorial_completion';
+ EVENT_NAME_PUSH_TOKEN_OBTAINED: 'fb_mobile_obtain_push_token';
+ EVENT_NAME_ADDED_TO_CART: 'fb_mobile_add_to_cart';
+ EVENT_NAME_ADDED_TO_WISHLIST: 'fb_mobile_add_to_wishlist';
+ EVENT_NAME_INITIATED_CHECKOUT: 'fb_mobile_initiated_checkout';
+ EVENT_NAME_ADDED_PAYMENT_INFO: 'fb_mobile_add_payment_info';
+ EVENT_NAME_PURCHASED: 'fb_mobile_purchase';
+ EVENT_NAME_ACHIEVED_LEVEL: 'fb_mobile_level_achieved';
+ EVENT_NAME_UNLOCKED_ACHIEVEMENT: 'fb_mobile_achievement_unlocked';
+ EVENT_NAME_SPENT_CREDITS: 'fb_mobile_spent_credits';
+ EVENT_PARAM_CURRENCY: 'fb_currency';
+ EVENT_PARAM_REGISTRATION_METHOD: 'fb_registration_method';
+ EVENT_PARAM_CONTENT_TYPE: 'fb_content_type';
+ EVENT_PARAM_CONTENT_ID: 'fb_content_id';
+ EVENT_PARAM_SEARCH_STRING: 'fb_search_string';
+ EVENT_PARAM_SUCCESS: 'fb_success';
+ EVENT_PARAM_MAX_RATING_VALUE: 'fb_max_rating_value';
+ EVENT_PARAM_PAYMENT_INFO_AVAILABLE: 'fb_payment_info_available';
+ EVENT_PARAM_NUM_ITEMS: 'fb_num_items';
+ EVENT_PARAM_LEVEL: 'fb_level';
+ EVENT_PARAM_DESCRIPTION: 'fb_description';
+ EVENT_PARAM_SOURCE_APPLICATION: 'fb_mobile_launch_source';
+ EVENT_PARAM_VALUE_YES: '1';
+ EVENT_PARAM_VALUE_NO: '0';
};
/**
@@ -302,4 +298,12 @@ export class Facebook extends IonicNativePlugin {
return;
}
+ /**
+ * Returns the deferred app link
+ * @returns {Promise}
+ */
+ @Cordova()
+ getDeferredApplink(): Promise {
+ return;
+ }
}
diff --git a/src/@ionic-native/plugins/firebase-dynamic-links/index.ts b/src/@ionic-native/plugins/firebase-dynamic-links/index.ts
index 6602641a1..2af06662b 100644
--- a/src/@ionic-native/plugins/firebase-dynamic-links/index.ts
+++ b/src/@ionic-native/plugins/firebase-dynamic-links/index.ts
@@ -38,10 +38,9 @@ export interface IDynamicLink {
* constructor(private firebaseDynamicLinks: FirebaseDynamicLinks) { }
*
* ...
- *
+ * // Handle the logic here after opening the app with the Dynamic link
* this.firebaseDynamicLinks.onDynamicLink()
- * .then((res: any) => console.log(res)) //Handle the logic here after opening the app with the Dynamic link
- * .catch((error:any) => console.log(error));
+ * .subscribe((res: any) => console.log(res), (error:any) => console.log(error));
* ```
*
* @interfaces
diff --git a/src/@ionic-native/plugins/http/index.ts b/src/@ionic-native/plugins/http/index.ts
index c55d2e461..3407f22f8 100644
--- a/src/@ionic-native/plugins/http/index.ts
+++ b/src/@ionic-native/plugins/http/index.ts
@@ -74,7 +74,7 @@ export class HTTP extends IonicNativePlugin {
* This returns an object representing a basic HTTP Authorization header of the form.
* @param username {string} Username
* @param password {string} Password
- * @returns {Object} an object representing a basic HTTP Authorization header of the form {'Authorization': 'Basic base64encodedusernameandpassword'}
+ * @returns {Object} an object representing a basic HTTP Authorization header of the form {'Authorization': 'Basic base64EncodedUsernameAndPassword'}
*/
@Cordova({ sync: true })
getBasicAuthHeader(
@@ -283,7 +283,7 @@ export class HTTP extends IonicNativePlugin {
* @param headers {Object} The headers to set for this request
* @param filePath {string} The local path of the file to upload
* @param name {string} The name of the parameter to pass the file along as
- * @returns {Promise} returns a promise that resolve on success, and reject on failure
+ * @returns {Promise} returns a FileEntry promise that resolve on success, and reject on failure
*/
@Cordova()
uploadFile(
@@ -292,7 +292,7 @@ export class HTTP extends IonicNativePlugin {
headers: any,
filePath: string,
name: string
- ): Promise {
+ ): Promise {
return;
}
@@ -301,8 +301,8 @@ export class HTTP extends IonicNativePlugin {
* @param url {string} The url to send the request to
* @param body {Object} The body of the request
* @param headers {Object} The headers to set for this request
- * @param filePath {string} The path to donwload the file to, including the file name.
- * @returns {Promise} returns a promise that resolve on success, and reject on failure
+ * @param filePath {string} The path to download the file to, including the file name.
+ * @returns {Promise} returns a FileEntry promise that resolve on success, and reject on failure
*/
@Cordova()
downloadFile(
@@ -310,7 +310,7 @@ export class HTTP extends IonicNativePlugin {
body: any,
headers: any,
filePath: string
- ): Promise {
+ ): Promise {
return;
}
}
diff --git a/src/@ionic-native/plugins/local-notifications/index.ts b/src/@ionic-native/plugins/local-notifications/index.ts
index 470646c6d..691c55f56 100755
--- a/src/@ionic-native/plugins/local-notifications/index.ts
+++ b/src/@ionic-native/plugins/local-notifications/index.ts
@@ -394,8 +394,12 @@ export interface ILocalNotification {
* ANDROID ONLY
* Set the token for the media session
*/
- mediaSession?: string;
+ mediaSession?: string;
+ /**
+ * Make this notification show when app in foreground.
+ */
+ foreground?: boolean;
}
/**
diff --git a/src/@ionic-native/plugins/network/index.ts b/src/@ionic-native/plugins/network/index.ts
index b8f8b9ffa..99f3b9062 100644
--- a/src/@ionic-native/plugins/network/index.ts
+++ b/src/@ionic-native/plugins/network/index.ts
@@ -88,7 +88,8 @@ export class Network extends IonicNativePlugin {
*/
@Cordova({
eventObservable: true,
- event: 'offline'
+ event: 'offline',
+ element: document
})
onDisconnect(): Observable {
return;
@@ -100,7 +101,8 @@ export class Network extends IonicNativePlugin {
*/
@Cordova({
eventObservable: true,
- event: 'online'
+ event: 'online',
+ element: document
})
onConnect(): Observable {
return;
diff --git a/src/@ionic-native/plugins/nfc/index.ts b/src/@ionic-native/plugins/nfc/index.ts
index e94c28a09..78bdbc170 100644
--- a/src/@ionic-native/plugins/nfc/index.ts
+++ b/src/@ionic-native/plugins/nfc/index.ts
@@ -341,27 +341,13 @@ 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 {
diff --git a/src/@ionic-native/plugins/onesignal/index.ts b/src/@ionic-native/plugins/onesignal/index.ts
index 94faaf332..f10b5e37e 100644
--- a/src/@ionic-native/plugins/onesignal/index.ts
+++ b/src/@ionic-native/plugins/onesignal/index.ts
@@ -703,7 +703,7 @@ export class OneSignal extends IonicNativePlugin {
}
/**
- * Clears all OneSignla notifications
+ * Clears all OneSignal notifications
*/
@Cordova({ sync: true })
clearOneSignalNotifications(): void {}
diff --git a/src/@ionic-native/plugins/photo-library/index.ts b/src/@ionic-native/plugins/photo-library/index.ts
index 6b68d1002..f8016d53c 100644
--- a/src/@ionic-native/plugins/photo-library/index.ts
+++ b/src/@ionic-native/plugins/photo-library/index.ts
@@ -263,6 +263,7 @@ export interface GetLibraryOptions {
chunkTimeSec?: number;
useOriginalFileNames?: boolean;
includeAlbumData?: boolean;
+ includeVideos?: boolean;
maxItems?: number;
}
diff --git a/src/@ionic-native/plugins/user-agent/index.ts b/src/@ionic-native/plugins/user-agent/index.ts
index c00c253cb..f8274ef6f 100644
--- a/src/@ionic-native/plugins/user-agent/index.ts
+++ b/src/@ionic-native/plugins/user-agent/index.ts
@@ -35,7 +35,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
@Plugin({
pluginName: 'UserAgent',
plugin: 'cordova-plugin-useragent',
- pluginRef: 'plugins.useragent',
+ pluginRef: 'UserAgent',
repo: 'https://github.com/danielsogl/cordova-plugin-useragent',
platforms: ['Android', 'iOS']
})
diff --git a/src/@ionic-native/plugins/webengage/index.ts b/src/@ionic-native/plugins/webengage/index.ts
new file mode 100644
index 000000000..d9d09f0ed
--- /dev/null
+++ b/src/@ionic-native/plugins/webengage/index.ts
@@ -0,0 +1,197 @@
+import { Injectable } from '@angular/core';
+import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
+
+/**
+ * @name Webengage
+ * @description
+ * Ionic-Native wrapper that wraps Webengage Cordova plugin for Android and iOS
+ *
+ * @usage
+ * ```typescript
+ * import { Webengage, WebengageUser, WebengagePush, WebengageNotification } from '@ionic-native/webengage';
+ *
+ *
+ * constructor(private webengage: Webengage, private webengageUser: WebengageUser, private webengagePush: WebengagePush, private webengageNotification: WebengageNotification ) { }
+ *
+ * ...
+ *
+ * this.webengage.engage();
+ * ```
+ */
+@Plugin({
+ pluginName: 'Webengage',
+ plugin: 'cordova-plugin-webengage',
+ pluginRef: 'webengage',
+ repo: 'https://github.com/WebEngage/cordova-plugin',
+ platforms: ['Android', 'iOS']
+})
+@Injectable()
+export class Webengage extends IonicNativePlugin {
+ /**
+ * Initializes WebEngage SDK
+ * @param {any} [config]
+ * @return {Promise}
+ */
+ @Cordova()
+ engage(config?: any): Promise {
+ return;
+ }
+
+ /**
+ * Sets WebEngage SDK configuration
+ * @param {string} key
+ * @param {any} value
+ * @return {Promise}
+ */
+ @Cordova()
+ options(key: string, value: any): Promise {
+ return;
+ }
+
+ /**
+ * Tracks event
+ * @param {string} eventName
+ * @param {any} [attributes]
+ * @return {Promise}
+ */
+ @Cordova()
+ track(eventName: string, attributes?: any): Promise {
+ return;
+ }
+
+ /**
+ * Tracks screen
+ * @param {string} eventName
+ * @param {any} [screenData]
+ * @return {Promise}
+ */
+ @Cordova()
+ screen(screenName: string, screenData?: any): Promise {
+ return;
+ }
+}
+
+/**
+ * @hidden
+ */
+@Plugin({
+ pluginName: 'Webengage',
+ plugin: 'cordova-plugin-webengage',
+ pluginRef: 'webengage.user'
+})
+@Injectable()
+export class WebengageUser extends IonicNativePlugin {
+ /**
+ * Logs user in
+ * @param {string} userId
+ * @return {Promise}
+ */
+ @Cordova()
+ login(userId: string): Promise {
+ return;
+ }
+
+ /**
+ * Logs user out
+ * @return {Promise}
+ */
+ @Cordova()
+ logout(): Promise {
+ return;
+ }
+
+ /**
+ * Sets user attribute
+ * @param {string} key
+ * @param {any} value
+ * @return {Promise}
+ */
+ @Cordova()
+ setAttribute(key: string, value: any): Promise {
+ return;
+ }
+}
+
+/**
+ * @hidden
+ */
+@Plugin({
+ pluginName: 'Webengage',
+ plugin: 'cordova-plugin-webengage',
+ pluginRef: 'webengage.push'
+})
+@Injectable()
+export class WebengagePush extends IonicNativePlugin {
+ /**
+ * Callback function is invoked when a push notification is clicked
+ * @param {any} callback
+ * @return {Promise}
+ */
+ @Cordova()
+ onClick(callback: any): Promise {
+ return;
+ }
+
+ /**
+ * Sets push notification configuration
+ * @param {string} key
+ * @param {any} value
+ * @return {Promise}
+ */
+ @Cordova()
+ options(key: string, value: any): Promise {
+ return;
+ }
+}
+
+/**
+ * @hidden
+ */
+@Plugin({
+ pluginName: 'Webengage',
+ plugin: 'cordova-plugin-webengage',
+ pluginRef: 'webengage.notification'
+})
+@Injectable()
+export class WebengageNotification extends IonicNativePlugin {
+ /**
+ * Callback function is invoked when a in-app notification is shown
+ * @param {any} callback
+ * @return {Promise}
+ */
+ @Cordova()
+ onShown(callback: any): Promise {
+ return;
+ }
+
+ /**
+ * Callback function is invoked when a in-app notification is clicked
+ * @param {any} callback
+ * @return {Promise}
+ */
+ @Cordova()
+ onClick(callback: any): Promise {
+ return;
+ }
+
+ /**
+ * Callback function is invoked when a in-app notification is dismissed
+ * @param {any} callback
+ * @return {Promise}
+ */
+ @Cordova()
+ onDismiss(callback: any): Promise {
+ return;
+ }
+
+ /**
+ * Sets in-app notification configuration
+ * @param {string} key
+ * @param {any} value
+ * @return {Promise}
+ */
+ @Cordova()
+ options(key: string, value: any): Promise {
+ return;
+ }
+}