Compare commits

...

30 Commits

Author SHA1 Message Date
Daniel b60d5d4851 chore(): update changelog 2018-09-15 11:15:09 +02:00
Daniel 0c4aeddd1b 4.13.0 2018-09-15 11:15:04 +02:00
Daniel 667de5ba26 Revert "chore(): update changelog"
This reverts commit 2c2c1e482c.
2018-09-15 11:14:49 +02:00
Daniel 2dc7ee8916 Revert "4.12.3"
This reverts commit 7c419b48ad.
2018-09-15 11:14:41 +02:00
Daniel 2c2c1e482c chore(): update changelog 2018-09-15 11:05:56 +02:00
Daniel 7c419b48ad 4.12.3 2018-09-15 11:05:48 +02:00
弄潮儿 0b9717636c feat(janalytics): add plugin (#2711)
* add janalytics native plugin

* add new plugin of wechat

* rm plugin wechat

* Update index.ts
2018-09-15 11:02:53 +02:00
弄潮儿 10ac9ff9de feat(wechat): add plugin (#2716)
* add janalytics native plugin

* add new plugin of wechat

* rm janalytics plugin

* Update index.ts

* Update index.ts

* Update index.ts
2018-09-15 11:01:10 +02:00
Paul Stelzer 90d75af9d1 feat(branch-io): Add branch.io attribution and invitation plugin (#2691)
* feat(branch-io): Add branch.io attribution and invitation plugin

* Update index.ts
2018-09-15 10:55:01 +02:00
Paul Stelzer 3b3f942ed5 feat(appsflyer): Added Appsflyer Cordova SDK as ionic native plugin (#2690)
* feat(appsflyer): Added Appsflyer Cordova SDK

* fix(appsflyer): Corrected promises

* fix(appsflyer): Add description

* fix(appsflyer): Missing semicolon

* Update index.ts
2018-09-15 10:48:17 +02:00
Niklas Merz 9601a64227 feat(calldirectory): add log function (#2708)
* feat(calldirectory): add log function

* Update index.ts
2018-09-15 10:43:11 +02:00
Paul Stelzer 22fd49b5d3 fix(in-app-review): Transfer Plugin to the correct folder (#2688) 2018-09-15 10:41:20 +02:00
ratnakar24 890129bfda fix(ms-adal): Update createAuthenticationContext (#2705)
* Update createAuthenticationContext

Update createAuthenticationContext to include validateAuthority flag since it is throwing Error: Fail to valid authority with errors: [50049].
Without the flag it is throwing Error: Fail to valid authority with errors: [50049].

* Update index.ts
2018-09-15 10:39:41 +02:00
Tyler Hall 6a9a871758 docs(onesignal): update incorrect path to hook file (#2715) 2018-09-15 10:39:14 +02:00
Todd Vrba ac467c50ac feat(mixpanel): Update/add functions (#2697)
* Update mixpanel typings for Ionic native.

* Update index.ts
2018-09-15 10:37:52 +02:00
iAmMrHands 267149b16f feat(local-notifications): Added local additional local notification action fields (#2713) 2018-09-15 10:37:24 +02:00
somq 7047920a2a fix(bluetooth-le): Various methods fixes (#2707)
* feat(bluetooth-le): implemented all available methods and refactored existing ones

* fix(bluetooth-le): Removed @memberof jsdoc annotations to avoid ci check failure

* fix(bluetooth-le): Fixed multiple jsdocs typos/misformats preventing CI to pass checks while generating readmes

* fix(bluetooth-le): Removed package-lock.json

* Update index.ts

* fix(bluetooth-le): Fixed stringToBytes method, now properly takes a string as arg and return an Uint8Array

* fix(bluetooth-le): getAdapterInfo now returns an Observable for easier tracking of adapter states

* fix(bluetooth-le): Fixed missing cordova param (observable: true) in initializePeripheral method, fixed getAdapterInfo method, now return an adapterInfo object

* chore(bluetooth-le): Removed @description markup to allow a proper doc auto-format

* fix(bluetooth-le): Reverted getAdapterInfo method to a Promise return
2018-09-15 10:37:03 +02:00
Daniel aad814fcf1 chore(): update changelog 2018-08-31 19:09:35 +02:00
Daniel 03d6b2373c 4.12.2 2018-08-31 19:09:24 +02:00
Daniel Kasper d82e675442 fix(in-app-browser): fix mandatory options (#2684)
fix(in-app-browser): fix mandatory options
2018-08-31 19:05:33 +02:00
Daniel 1e84e23fd9 chore(): update changelog 2018-08-31 14:26:00 +02:00
Daniel f3f12cb306 4.12.1 2018-08-31 14:25:53 +02:00
Daniel b3bd0a83c7 chore(package): bump deps 2018-08-31 14:24:28 +02:00
rvdleun 03e4f0e439 feat(push): Added voip property to IOSPushOptions (#2681)
* feat(push): Added missing voip property to IOSPushOptions

* Update index.ts
2018-08-31 14:23:40 +02:00
Pandiarajan Nagarajan a73146648f feat(aes256): Added new utility methods to generate secure key and secure IV (#2675) 2018-08-31 14:21:30 +02:00
Daniel Kasper d90724ef70 feat(in-app-browser): Add missing InAppBrowserOptions-properties (#2669) 2018-08-31 14:21:19 +02:00
Brad Mallow be0dc3dac4 fix(open-native-settings): allow supported input (#2666)
* allow supported input

* Update index.ts
2018-08-31 14:21:07 +02:00
Daniel a0a64da518 chore(package): bump deps 2018-08-25 12:02:03 +02:00
somq 591ee87e05 feat(bluetooth-le): add bluetooth-le plugin (#2651)
* feat(bluetooth-le): implemented all available methods and refactored existing ones

* fix(bluetooth-le): Removed @memberof jsdoc annotations to avoid ci check failure

* fix(bluetooth-le): Fixed multiple jsdocs typos/misformats preventing CI to pass checks while generating readmes

* fix(bluetooth-le): Removed package-lock.json

* Update index.ts
2018-08-25 12:01:05 +02:00
Daniel 8db1dbef71 feat(http): add setSSLCertMode function 2018-08-21 20:39:21 +02:00
19 changed files with 2167 additions and 196 deletions
+61
View File
@@ -1,3 +1,64 @@
<a name="4.13.0"></a>
# [4.13.0](https://github.com/ionic-team/ionic-native/compare/v5.0.0-beta.17...v4.13.0) (2018-09-15)
### Bug Fixes
* **bluetooth-le:** Various methods fixes ([#2707](https://github.com/ionic-team/ionic-native/issues/2707)) ([7047920](https://github.com/ionic-team/ionic-native/commit/7047920))
* **in-app-review:** Transfer Plugin to the correct folder ([#2688](https://github.com/ionic-team/ionic-native/issues/2688)) ([22fd49b](https://github.com/ionic-team/ionic-native/commit/22fd49b))
* **ms-adal:** Update createAuthenticationContext ([#2705](https://github.com/ionic-team/ionic-native/issues/2705)) ([890129b](https://github.com/ionic-team/ionic-native/commit/890129b))
### Features
* **appsflyer:** Added Appsflyer Cordova SDK as ionic native plugin ([#2690](https://github.com/ionic-team/ionic-native/issues/2690)) ([3b3f942](https://github.com/ionic-team/ionic-native/commit/3b3f942))
* **branch-io:** Add branch.io attribution and invitation plugin ([#2691](https://github.com/ionic-team/ionic-native/issues/2691)) ([90d75af](https://github.com/ionic-team/ionic-native/commit/90d75af))
* **calldirectory:** add log function ([#2708](https://github.com/ionic-team/ionic-native/issues/2708)) ([9601a64](https://github.com/ionic-team/ionic-native/commit/9601a64))
* **janalytics:** add plugin ([#2711](https://github.com/ionic-team/ionic-native/issues/2711)) ([0b97176](https://github.com/ionic-team/ionic-native/commit/0b97176))
* **local-notifications:** Added local additional local notification action fields ([#2713](https://github.com/ionic-team/ionic-native/issues/2713)) ([267149b](https://github.com/ionic-team/ionic-native/commit/267149b))
* **mixpanel:** Update/add functions ([#2697](https://github.com/ionic-team/ionic-native/issues/2697)) ([ac467c5](https://github.com/ionic-team/ionic-native/commit/ac467c5))
* **wechat:** add plugin ([#2716](https://github.com/ionic-team/ionic-native/issues/2716)) ([10ac9ff](https://github.com/ionic-team/ionic-native/commit/10ac9ff))
<a name="5.0.0-beta.17"></a>
# [5.0.0-beta.17](https://github.com/ionic-team/ionic-native/compare/v5.0.0-beta.16...v5.0.0-beta.17) (2018-08-31)
### Bug Fixes
* **in-app-browser:** fix mandatory options ([#2684](https://github.com/ionic-team/ionic-native/issues/2684)) ([d82e675](https://github.com/ionic-team/ionic-native/commit/d82e675))
<a name="4.12.1"></a>
## [4.12.1](https://github.com/ionic-team/ionic-native/compare/v5.0.0-beta.15...v4.12.1) (2018-08-31)
### Bug Fixes
* **open-native-settings:** allow supported input ([#2666](https://github.com/ionic-team/ionic-native/issues/2666)) ([be0dc3d](https://github.com/ionic-team/ionic-native/commit/be0dc3d))
### Features
* **aes256:** Added new utility methods to generate secure key and secure IV ([#2675](https://github.com/ionic-team/ionic-native/issues/2675)) ([a731466](https://github.com/ionic-team/ionic-native/commit/a731466))
* **in-app-browser:** Add missing InAppBrowserOptions-properties ([#2669](https://github.com/ionic-team/ionic-native/issues/2669)) ([d90724e](https://github.com/ionic-team/ionic-native/commit/d90724e))
* **push:** Added voip property to IOSPushOptions ([#2681](https://github.com/ionic-team/ionic-native/issues/2681)) ([03e4f0e](https://github.com/ionic-team/ionic-native/commit/03e4f0e))
<a name="5.0.0-beta.15"></a>
# [5.0.0-beta.15](https://github.com/ionic-team/ionic-native/compare/v4.12.0...v5.0.0-beta.15) (2018-08-25)
### Features
* **bluetooth-le:** add bluetooth-le plugin ([#2651](https://github.com/ionic-team/ionic-native/issues/2651)) ([591ee87](https://github.com/ionic-team/ionic-native/commit/591ee87))
* **http:** add setSSLCertMode function ([8db1dbe](https://github.com/ionic-team/ionic-native/commit/8db1dbe))
<a name="4.12.0"></a>
# [4.12.0](https://github.com/ionic-team/ionic-native/compare/v4.11.0...v4.12.0) (2018-08-16)
+32 -94
View File
@@ -1,6 +1,6 @@
{
"name": "ionic-native",
"version": "4.12.0",
"version": "4.13.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -53,9 +53,9 @@
"dev": true
},
"JSONStream": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.3.tgz",
"integrity": "sha512-3Sp6WZZ/lXl+nTDoGpGWHEpTnnC6X5fnkolYZR6nwIfzbxxvA8utPWe1gCt7i0m9uVGsSz2IS8K8mJ7HmlduMg==",
"version": "1.3.4",
"resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.4.tgz",
"integrity": "sha512-Y7vfi3I5oMOYIr+WxV8NZxDSwcbNgzdKYsTNInmycOq9bUYwGg9ryu57Wg5NLmCjqdFPNUmpMBo3kSJN9tCbXg==",
"dev": true,
"requires": {
"jsonparse": "^1.2.0",
@@ -1916,22 +1916,22 @@
"dev": true
},
"conventional-changelog": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-2.0.1.tgz",
"integrity": "sha512-WeWcEcR7uBtRZ/uG6DRIlVqsm7UTnxrixaAPoPvfQP7FRPf1qIXL76nGKy4wXq+wO3zOpqYubWUqrYLIL3+xww==",
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-2.0.3.tgz",
"integrity": "sha512-4bcII9cJHSKb2qi9e8qGF6aJHLf/AB0dokhyR+X6QILTMl77s4l163vK+reXhajvfOYbbHQvsrWybr5+PKZwNA==",
"dev": true,
"requires": {
"conventional-changelog-angular": "^1.6.6",
"conventional-changelog-atom": "^2.0.0",
"conventional-changelog-codemirror": "^2.0.0",
"conventional-changelog-core": "^3.0.0",
"conventional-changelog-ember": "^2.0.0",
"conventional-changelog-core": "^3.1.0",
"conventional-changelog-ember": "^2.0.1",
"conventional-changelog-eslint": "^3.0.0",
"conventional-changelog-express": "^2.0.0",
"conventional-changelog-jquery": "^0.1.0",
"conventional-changelog-jscs": "^0.1.0",
"conventional-changelog-jshint": "^2.0.0",
"conventional-changelog-preset-loader": "^2.0.0"
"conventional-changelog-preset-loader": "^2.0.1"
}
},
"conventional-changelog-angular": {
@@ -1942,14 +1942,6 @@
"requires": {
"compare-func": "^1.3.1",
"q": "^1.5.1"
},
"dependencies": {
"q": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
"dev": true
}
}
},
"conventional-changelog-atom": {
@@ -1959,24 +1951,16 @@
"dev": true,
"requires": {
"q": "^1.5.1"
},
"dependencies": {
"q": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
"dev": true
}
}
},
"conventional-changelog-cli": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/conventional-changelog-cli/-/conventional-changelog-cli-2.0.1.tgz",
"integrity": "sha512-gQzMbLyPNYymbzJncJNBapLZTXEtXrq6qmQOJH0w/jVX9fxIli4sLalQgzEPjD7M1noLJd1cIdQAP1R++TkGxg==",
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/conventional-changelog-cli/-/conventional-changelog-cli-2.0.5.tgz",
"integrity": "sha512-StqCVo10g194UhyLIhg+M/tTVu6YjGnON/IiQ9Ty/h+dgi9obYAkknwpmmgGJMQ3P3vNRljuZBupz0N2tpdxXg==",
"dev": true,
"requires": {
"add-stream": "^1.0.0",
"conventional-changelog": "^2.0.1",
"conventional-changelog": "^2.0.3",
"lodash": "^4.2.1",
"meow": "^4.0.0",
"tempfile": "^1.1.1"
@@ -2132,20 +2116,12 @@
"dev": true,
"requires": {
"q": "^1.5.1"
},
"dependencies": {
"q": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
"dev": true
}
}
},
"conventional-changelog-core": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-3.0.0.tgz",
"integrity": "sha512-D2hApWWsdh4tkNgDjn1KtRapxUJ70Sd+V84btTVJJJ96S3cVRES8Ty3ih0TRkOZmDkw/uS0mxrHSskQ/P/Gvsg==",
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-3.1.0.tgz",
"integrity": "sha512-bcZkcFXkqVgG2W8m/1wjlp2wn/BKDcrPgw3/mvSEQtzs8Pax8JbAPFpEQReHY92+EKNNXC67wLA8y2xcNx0rDA==",
"dev": true,
"requires": {
"conventional-changelog-writer": "^4.0.0",
@@ -2168,30 +2144,16 @@
"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": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-2.0.0.tgz",
"integrity": "sha512-s9ZYf3VMdYe8ca8bw1X+he050HZNy9Pm3dBpYA+BunDGFE4Fy7whOvYhWah2U9+j9l6y/whfa0+eHANvZytE9A==",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-2.0.1.tgz",
"integrity": "sha512-Ym1xLi7YLGooLUpHCJhlXJW5V7u/g+hlYD/+HKt0KqG2qbiBi7e7/HO9aScXTEKUBGMm7m4C443R+eCWQI2ynA==",
"dev": true,
"requires": {
"q": "^1.5.1"
},
"dependencies": {
"q": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
"dev": true
}
}
},
"conventional-changelog-eslint": {
@@ -2201,14 +2163,6 @@
"dev": true,
"requires": {
"q": "^1.5.1"
},
"dependencies": {
"q": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
"dev": true
}
}
},
"conventional-changelog-express": {
@@ -2218,14 +2172,6 @@
"dev": true,
"requires": {
"q": "^1.5.1"
},
"dependencies": {
"q": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
"dev": true
}
}
},
"conventional-changelog-jquery": {
@@ -2254,20 +2200,12 @@
"requires": {
"compare-func": "^1.3.1",
"q": "^1.5.1"
},
"dependencies": {
"q": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
"dev": true
}
}
},
"conventional-changelog-preset-loader": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.0.0.tgz",
"integrity": "sha512-hEWm9o6TxjS9aO1AKaHpl8avSXaUHiUXBT25vJ4ToaDi/gPDqt3OnZkwhIgubADUF+lPqcXpjFTOYcOL4AwyvA==",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.0.1.tgz",
"integrity": "sha512-HiSfhXNzAzG9klIqJaA97MMiNBR4js+53g4Px0k7tgKeCNVXmrDrm+CY+nIqcmG5NVngEPf8rAr7iji1TWW7zg==",
"dev": true
},
"conventional-changelog-writer": {
@@ -9544,9 +9482,9 @@
"dev": true
},
"queue": {
"version": "4.4.2",
"resolved": "https://registry.npmjs.org/queue/-/queue-4.4.2.tgz",
"integrity": "sha512-fSMRXbwhMwipcDZ08enW2vl+YDmAmhcNcr43sCJL8DIg+CFOsoRLG23ctxA+fwNk1w55SePSiS7oqQQSgQoVJQ==",
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/queue/-/queue-4.5.0.tgz",
"integrity": "sha512-DwxpAnqJuoQa+wyDgQuwkSshkhlqIlWEvwvdAY27fDPunZ2cVJzXU4JyjY+5l7zs7oGLaYAQm4MbLOVFAHFBzA==",
"dev": true,
"requires": {
"inherits": "~2.0.0"
@@ -10061,9 +9999,9 @@
}
},
"rxjs": {
"version": "5.5.11",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.11.tgz",
"integrity": "sha512-3bjO7UwWfA2CV7lmwYMBzj4fQ6Cq+ftHc2MvUe+WMS7wcdJ1LosDWmdjPQanYp2dBRj572p7PeU81JUxHKOcBA==",
"version": "5.5.12",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz",
"integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==",
"dev": true,
"requires": {
"symbol-observable": "1.0.1"
@@ -10091,9 +10029,9 @@
"dev": true
},
"semver": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",
"integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==",
"version": "5.5.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz",
"integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==",
"dev": true
},
"sentence-case": {
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "ionic-native",
"version": "4.12.0",
"version": "4.13.0",
"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)",
@@ -14,7 +14,7 @@
"@types/node": "8.10.20",
"canonical-path": "0.0.2",
"child-process-promise": "2.2.1",
"conventional-changelog-cli": "^2.0.1",
"conventional-changelog-cli": "^2.0.5",
"cz-conventional-changelog": "^2.1.0",
"dgeni": "0.4.7",
"dgeni-packages": "0.16.10",
@@ -35,10 +35,10 @@
"minimist": "1.2.0",
"node-html-encoder": "0.0.2",
"q": "^1.5.1",
"queue": "^4.4.2",
"queue": "^4.5.0",
"rimraf": "^2.6.2",
"rxjs": "^5.5.11",
"semver": "^5.5.0",
"rxjs": "^5.5.12",
"semver": "^5.5.1",
"tslint": "3.15.1",
"tslint-ionic-rules": "0.0.8",
"typescript": "~2.4.2",
+44 -4
View File
@@ -12,20 +12,38 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
* ```typescript
* import { AES256 } from '@ionic-native/aes-256';
*
*
* constructor(private aES256: AES256) { }
* private secureKey: string;
* private secureIV: string;
*
* constructor(private aes256: AES256) {
* this.generateSecureKeyAndIV(); // To generate the random secureKey and secureIV
* }
*
* ...
*
* async generateSecureKeyAndIV() {
* this.secureKey = await this.aes256.generateSecureKey('random password 12345'); // Returns a 32 bytes string
* this.secureIV = await this.aes256.generateSecureIV('random password 12345'); // Returns a 16 bytes string
* }
*
* this.aES256.encrypt('12345678123456781234567812345678', '1234567812345678', 'testdata')
* this.aes256.encrypt(this.secureKey, this.secureIV, 'testdata')
* .then(res => console.log('Encrypted Data: ',res))
* .catch((error: any) => console.error(error));
*
* this.aES256.decrypt('12345678123456781234567812345678', '1234567812345678', 'encryptedData')
* this.aes256.decrypt(this.secureKey, this.secureIV, 'encryptedData')
* .then(res => console.log('Decrypted Data : ',res))
* .catch((error: any) => console.error(error));
*
*
* * this.aes256.generateSecureKey('random password 12345')
* .then(res => console.log('Secure Key : ',res))
* .catch((error: any) => console.error(error));
*
*
* * this.aes256.generateSecureIV('random password 12345')
* .then(res => console.log('Secure IV : ',res))
* .catch((error: any) => console.error(error));
*
* ```
*/
@Plugin({
@@ -63,4 +81,26 @@ export class AES256 extends IonicNativePlugin {
return;
}
/**
* This function used to generate a secure key based on an password. Perfect if you want to delegate the key generation for encryption to the plugin.
* Make sure to save the return value of this function somewhere so your encrypted data can be decrypted in the future.
* @param {string} password A random string, which will be used as input for a PBKDF2 function
* @return {Promise<string>} Returns a promise that resolves when key is generated.
*/
@Cordova()
generateSecureKey(password: string): Promise<string> {
return;
}
/**
* This function used to generate a secure IV based on an password. Perfect if you want to delegate the IV generation for encryption to the plugin.
* Make sure to save the return value of this function somewhere so your encrypted data can be decrypted in the future.
* @param {string} password A random string, which will be used as input for a PBKDF2 function
* @return {Promise<string>} Returns a promise that resolves when IV is generated.
*/
@Cordova()
generateSecureIV(password: string): Promise<string> {
return;
}
}
@@ -0,0 +1,188 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface AppsflyerOptions {
/**
* Appsflyer Dev key
*/
devKey: string;
/**
* Apple Application ID(for iOS only)
*/
appId?: string;
/**
* debug mode
*/
isDebug?: boolean;
/**
* optout of collection of IMEI
*/
collectIMEI?: boolean;
/**
* optout of collection of collectAndroidID
*/
collectAndroidID?: boolean;
/**
* default false Accessing AppsFlyer Attribution / Conversion Data from the SDK (Deferred Deeplinking). Read more: Android, iOS. AppsFlyer plugin will return attribution data in onSuccess callback.
*/
onInstallConversionDataListener?: boolean;
}
export interface AppsflyerEvent {
[x: string]: any;
}
export interface AppsflyerInviteOptions {
channel?: string;
campaign?: string;
userParams?: {
[x: string]: any;
};
}
/**
* @name Appsflyer
* @description
* Appsflyer Cordova SDK support for Attribution
*
* @usage
* ```typescript
* import { Appsflyer } from '@ionic-native/appsflyer';
*
*
* constructor(private appsflyer: Appsflyer) { }
*
* ...
*
*
* this.appsflyer.initSdk(options);
*
* ```
*
* @interfaces
* AppsflyerOptions
* AppsflyerEvent
* AppsflyerInviteOptions
*/
@Plugin({
pluginName: 'Appsflyer',
plugin: 'cordova-plugin-appsflyer-sdk',
pluginRef: 'window.plugins.appsFlyer',
repo: 'https://github.com/AppsFlyerSDK/cordova-plugin-appsflyer-sdk',
platforms: ['iOS', 'Android'],
install: 'Add to config.xml like stated on github and then start'
})
@Injectable()
export class Appsflyer extends IonicNativePlugin {
/**
* initialize the SDK
* @param {AppsflyerOptions} options
* @returns {Promise<any>}
*/
@Cordova()
initSdk(options: AppsflyerOptions): Promise<any> {
return;
}
/**
* These in-app events help you track how loyal users discover your app, and attribute them to specific campaigns/media-sources. Please take the time define the event/s you want to measure to allow you to track ROI (Return on Investment) and LTV (Lifetime Value).
* @param {string} eventName custom event name, is presented in your dashboard
* @param {AppsflyerEvent} eventValues event details
*/
@Cordova({ sync: true })
trackEvent(eventName: string, eventValues: AppsflyerEvent): void {}
/**
* Setting your own Custom ID enables you to cross-reference your own unique ID with AppsFlyers user ID and the other devices IDs. This ID is available in AppsFlyer CSV reports along with postbacks APIs for cross-referencing with you internal IDs.
* @param {string} customerUserId user id
*/
@Cordova({ sync: true })
setAppUserId(customerUserId: string): void {}
/**
* Setting your own Custom ID enables you to cross-reference your own unique ID with AppsFlyers user ID and the other devices IDs. This ID is available in AppsFlyer CSV reports along with postbacks APIs for cross-referencing with you internal IDs.
* @param {boolean} customerUserId In some extreme cases you might want to shut down all SDK tracking due to legal and privacy compliance. This can be achieved with the isStopTracking API. Once this API is invoked, our SDK will no longer communicate with our servers and stop functioning.
*/
@Cordova({ sync: true })
stopTracking(isStopTracking: boolean): void {}
/**
* Get the data from Attribution
* @returns {Promise<any>}
*/
@Cordova()
registerOnAppOpenAttribution(): Promise<any> {
return;
}
/**
* Enables app uninstall tracking
* @param {string} token GCM/FCM ProjectNumber
* @returns {Promise<any>}
*/
@Cordova()
enableUninstallTracking(token: string): Promise<any> {
return;
}
/**
* Allows to pass GCM/FCM Tokens that where collected by third party plugins to the AppsFlyer server. Can be used for Uninstall Tracking.
* @param {string} token GCM/FCM ProjectNumber
*/
@Cordova({ sync: true })
updateServerUninstallToken(token: string): void {}
/**
* Get AppsFlyers proprietary Device ID. The AppsFlyer Device ID is the main ID used by AppsFlyer in Reports and APIs.
*/
@Cordova()
getAppsFlyerUID(): Promise<any> {
return;
}
/**
* End User Opt-Out (Optional) AppsFlyer provides you a method to optout specific users from AppsFlyer analytics. This method complies with the latest privacy requirements and complies with Facebook data and privacy policies. Default is FALSE, meaning tracking is enabled by default.
* @param {boolean} disable Set to true to opt-out user from tracking
*/
@Cordova({ sync: true })
deviceTrackingDisabled(disable: boolean): void {}
/**
* Set AppsFlyers OneLink ID. Setting a valid OneLink ID will result in shortened User Invite links, when one is generated. The OneLink ID can be obtained on the AppsFlyer Dashboard.
* @param {string} oneLinkId OneLink ID
*/
@Cordova({ sync: true })
setAppInviteOneLinkID(oneLinkId: string): void {}
/**
* Allowing your existing users to invite their friends and contacts as new users to your app can be a key growth factor for your app. AppsFlyer allows you to track and attribute new installs originating from user invites within your app.
* @param {AppsflyerInviteOptions} options Parameters for Invite link
* @returns {Promise<any>}
*/
@Cordova()
generateInviteLink(options: AppsflyerInviteOptions): Promise<any> {
return;
}
/**
* Use this call to track an impression use the following API call. Make sure to use the promoted App ID as it appears within the AppsFlyer dashboard.
* @param {string} appId Promoted Application ID
* @param {string} campaign Promoted Campaign
*/
@Cordova({ sync: true })
trackCrossPromotionImpression(appId: string, campaign: string): void {}
/**
* Use this call to track the click and launch the app store's app page (via Browser)
* @param {string} appId Promoted Application ID
* @param {string} campaign Promoted Campaign
* @param {Object} options Additional Parameters to track
*/
@Cordova({ sync: true })
trackAndOpenStore(appId: string, campaign: string, options: Object): void {}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,235 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface BranchIoPromise {
$identity_id?: number;
$one_time_use?: boolean;
'+click_timestamp'?: number;
'+clicked_branch_link'?: boolean;
'+is_first_session'?: boolean;
'+match_guaranteed'?: boolean;
contentMetadata?: string;
source?: string;
'~campaign'?: string;
'~channel'?: string;
'~creation_source'?: string;
'~feature'?: string;
'~id'?: number;
'~referring_link:'?: string;
[x: string]: any;
}
export interface BranchIoAnalytics {
channel?: string;
feature?: string;
campaign?: string;
stage?: string;
tags?: string[];
[x: string]: any;
}
export interface BranchIoProperties {
contentMetadata?: {
[x: string]: any;
};
[x: string]: any;
}
export interface BranchUniversalObject {
generateShortUrl(
analytics: BranchIoAnalytics,
properties: BranchIoProperties
): Promise<any>;
registerView(): Promise<any>;
showShareSheet(
analytics: BranchIoAnalytics,
properties: BranchIoProperties,
shareText: string
): Promise<any>;
onShareSheetLaunched(callback: any): void;
onShareSheetDismissed(callback: any): void;
onLinkShareResponse(callback: any): void;
onChannelSelected(callback: any): void;
listOnSpotlight(): Promise<any>;
}
/**
* @name BranchIo
* @description
* Branch.io is an attribution service for deeplinking and invitation links
*
* @usage
* ```
* import { BranchIo } from '@ionic-native/branch-io';
*
*
* constructor(private branch: BranchIo) { }
*
* ```
*
* @interfaces
* BranchIoPromise
* BranchIoAnalytics
* BranchIoProperties
* BranchUniversalObject
*
*/
@Plugin({
pluginName: 'BranchIo',
plugin: 'branch-cordova-sdk',
pluginRef: 'Branch',
repo:
'https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking',
platforms: ['iOS', 'Android']
})
@Injectable()
export class BranchIo extends IonicNativePlugin {
/**
* for development and debugging only
* @param {boolean} enable Enable debug
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
setDebug(enable: boolean): Promise<any> {
return;
}
/**
* Disable tracking
* @param {boolean} disable disable tracking
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
disableTracking(disable: boolean): Promise<any> {
return;
}
/**
* Initializes Branch
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
initSession(): Promise<BranchIoPromise> {
return;
}
/**
* Set Request Metadata
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
setRequestMetadata(): Promise<any> {
return;
}
/**
* for better Android matching
* @param {string} linkDomain LinkDomain at branch
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
setCookieBasedMatching(linkDomain: string): Promise<any> {
return;
}
/**
* First data
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
getFirstReferringParams(): Promise<any> {
return;
}
/**
* Latest data
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
getLatestReferringParams(): Promise<any> {
return;
}
/**
* Set identy of user
* @param {string} userId
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
setIdentity(userId: string): Promise<any> {
return;
}
/**
* Logout user
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
logout(): Promise<any> {
return;
}
/**
* Registers a custom event
* @param {string} eventName
* @param {any} metaData
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
userCompletedAction(eventName: string, metaData: any): Promise<any> {
return;
}
/**
* Send Commerce Event
* @param {string} event
* @param {any} metaData
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
sendCommerceEvent(event: string, metaData: any): Promise<any> {
return;
}
/**
* create a branchUniversalObj variable to reference with other Branch methods
* @param {BranchIoProperties} properties
* @return {Promise<BranchUniversalObject>}
*/
@Cordova({ otherPromise: true })
createBranchUniversalObject(
properties: BranchIoProperties
): Promise<BranchUniversalObject> {
return;
}
/**
* Load credits
* @param {any} bucket
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
loadRewards(bucket: any): Promise<any> {
return;
}
/**
* Redeem Rewards
* @param {string} value
* @param {any} bucket
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
redeemRewards(value: string, bucket: any): Promise<any> {
return;
}
/**
* Show credit history
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
creditHistory(): Promise<any> {
return;
}
}
@@ -6,6 +6,11 @@ export interface CallDirectoryItem {
number: string;
}
export interface CallDirectoryLog {
plugin: Array<string>;
extension: Array<string>;
}
/**
* @name Call Directory
* @description
@@ -29,6 +34,10 @@ export interface CallDirectoryItem {
* .then(res: string) => console.log(res))
* .catch((error: any) => console.error(error));
* ```
*
* @Interfaces
* CallDirectoryItem
* CallDirectoryLog
*/
@Plugin({
pluginName: 'CallDirectory',
@@ -97,4 +106,13 @@ export class CallDirectory extends IonicNativePlugin {
reloadExtension(): Promise<string> {
return;
}
/**
* Get log from plugin and call directory extension
* @return {Promise<CallDirectoryLog>} Returns a promise with an object of log messages
*/
@Cordova()
getLog(): Promise<CallDirectoryLog> {
return;
}
}
+13 -20
View File
@@ -154,7 +154,9 @@ export class HTTP extends IonicNativePlugin {
* @param url {string}
*/
@Cordova({ sync: true })
getCookieString(url: string): string { return; }
getCookieString(url: string): string {
return;
}
/**
* Get global request timeout value in seconds.
@@ -173,26 +175,15 @@ export class HTTP extends IonicNativePlugin {
setRequestTimeout(timeout: number): void {}
/**
* Enable or disable SSL Pinning. This defaults to false.
*
* To use SSL pinning you must include at least one .cer SSL certificate in your app project. You can pin to your server certificate or to one of the issuing CA certificates. For ios include your certificate in the root level of your bundle (just add the .cer file to your project/target at the root level). For android include your certificate in your project's platforms/android/assets folder. In both cases all .cer files found will be loaded automatically. If you only have a .pem certificate see this [stackoverflow answer](https://stackoverflow.com/questions/16583428/how-to-convert-an-ssl-certificate-in-linux/16583429#16583429). You want to convert it to a DER encoded certificate with a .cer extension.
*
* As an alternative, you can store your .cer files in the www/certificates folder.
* @param enable {boolean} Set to true to enable
* @returns {Promise<void>} returns a promise that will resolve on success, and reject on failure
* Set SSL Cert handling mode, being one of the following values
* default: default SSL cert handling using system's CA certs
* nocheck: disable SSL cert checking, trusting all certs (meant to be used only for testing purposes)
* pinned: trust only provided certs
* @see https://github.com/silkimen/cordova-plugin-advanced-http#setsslcertmode
* @param {'default' | 'nocheck' | 'pinned'} mode SSL Cert handling mode
*/
@Cordova()
enableSSLPinning(enable: boolean): Promise<void> {
return;
}
/**
* Accept all SSL certificates. Or disabled accepting all certificates. Defaults to false.
* @param accept {boolean} Set to true to accept
* @returns {Promise<void>} returns a promise that will resolve on success, and reject on failure
*/
@Cordova()
acceptAllCerts(accept: boolean): Promise<void> {
setSSLCertMode(mode: 'default' | 'nocheck' | 'pinned'): Promise<void> {
return;
}
@@ -202,7 +193,9 @@ export class HTTP extends IonicNativePlugin {
* @returns {Promise<void>} returns a promise that will resolve on success, and reject on failure
*/
@Cordova()
disableRedirect(disable: boolean): Promise<void> { return; }
disableRedirect(disable: boolean): Promise<void> {
return;
}
/**
* Make a POST request
@@ -15,25 +15,42 @@ export interface InAppBrowserOptions {
clearcache?: 'yes';
/** Set to yes to have the session cookie cache cleared before the new window is opened. */
clearsessioncache?: 'yes';
/** (Android Only) set to yes to show Android browser's zoom controls, set to no to hide them. Default value is 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.
* (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.
* (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. */
zoom?: 'yes' | 'no';
/** 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.
* (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.*/
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.
* (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.
* (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) */
shouldPauseOnSuspend?: 'yes' | 'no';
/** (Android Only) Set to yes to show a close button in the footer similar to the iOS Done button. The close button will appear the same as for the header hence use closebuttoncaption and closebuttoncolor to set its properties */
footer?: 'yes' | 'no';
/** (Android Only) Set to a valid hex color string, for example #00ff00 or #CC00ff00 (#aarrggbb) , and it will change the footer color from default. Only has effect if user has footer set to yes */
/** (Android Only) Set to a valid hex color string, for example #00ff00 or #CC00ff00 (#aarrggbb), and it will change the footer color from default. Only has effect if user has footer set to yes */
footercolor?: string;
/** (iOS Only) Set to a string to use as the Done button's caption. Note that you need to localize this value yourself. */
closebuttoncaption?: string;
/** (iOS Only) Set to yes or no (default is no). Turns on/off the UIWebViewBounce property. */
disallowoverscroll?: 'yes' | 'no';
/** (iOS Only) Set to yes or no to turn the toolbar on or off for the InAppBrowser (defaults to yes) */
toolbar?: 'yes' | 'no';
/** (iOS Only) Set to yes or no to make the toolbar translucent(semi-transparent) (defaults to yes). Only applicable if toolbar is not disabled. */
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.
@@ -54,7 +71,8 @@ export interface InAppBrowserOptions {
/** (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';
/**
* @hidden
*/
@@ -0,0 +1,95 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name jAnalytics
* @description
* This plugin does something
*
* @usage
* ```typescript
* import { JAnalytics } from '@ionic-native/JAnalytics';
*
*
* constructor(private jAnalytics: JAnalytics) { }
*
* ...
*
*
* this.jAnalytics.functionName('Hello', 123)
* .then((res: any) => console.log(res))
* .catch((error: any) => console.error(error));
*
* ```
*/
@Plugin({
pluginName: 'JAnalytics',
plugin: 'cordova-plugin-janalytics',
pluginRef: 'JAnalytics',
repo: 'https://github.com/jpush/cordova-plugin-janalytics',
install:
'ionic cordova plugin add cordova-plugin-janalytics --variable APP_KEY=YOUR_APP_KEY',
installVariables: ['APP_KEY'],
platforms: ['Android', 'iOS']
})
@Injectable()
export class JAnalytics extends IonicNativePlugin {
/**
* This function does something
* @return {Promise<any>} Returns a promise that resolves when something happens
*/
@Cordova()
init(): Promise<any> {
return;
}
@Cordova()
initCrashHandler(): Promise<any> {
return;
}
@Cordova()
stopCrashHandler(): Promise<any> {
return;
}
@Cordova()
onPageStart(params: any): Promise<any> {
return;
}
@Cordova()
onPageEnd(params: any): Promise<any> {
return;
}
@Cordova()
addCountEvent(params: any): Promise<any> {
return;
}
@Cordova()
addCalculateEvent(params: any): Promise<any> {
return;
}
@Cordova()
addLoginEvent(params: any): Promise<any> {
return;
}
@Cordova()
addRegisterEvent(params: any): Promise<any> {
return;
}
@Cordova()
addBrowseEvent(params: any): Promise<any> {
return;
}
@Cordova()
addPurchaseEvent(params: any): Promise<any> {
return;
}
}
@@ -122,10 +122,15 @@ export interface ILocalNotificationAction {
title?: string;
/**
* Specifies whether the action causes the app to launch in the foreground
* Make this notification show when app in foreground.
*/
foreground?: boolean;
/**
* Specifies whether the action causes the app to launch in the foreground
*/
launch?: boolean;
/**
* If the value is 'decline' the action is displayed with special highlighting to indicate that it performs a destructive task
*/
@@ -143,6 +148,24 @@ export interface ILocalNotificationAction {
*/
icon?: string;
/**
* ANDROID ONLY
* An array of pre-defined choices for users input
*/
choices?: string[];
/**
* ANDROID ONLY
* Specifies whether the user can provide arbitrary text values
*/
editable?: boolean;
/**
* IOS ONLY
* The title of the text input button that is displayed to the user.
*/
submitTitle?: string;
/**
* The type of the action. If omitted 'button' is used.
*/
+104 -23
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
declare var mixpanel: any;
@@ -33,36 +33,44 @@ declare var mixpanel: any;
})
@Injectable()
export class Mixpanel extends IonicNativePlugin {
/**
*
* If originalId is omitted, aliasId will be used as originalId.
* @param aliasId {string}
* @param originalId {string}
* @returns {Promise<any>}
*/
@Cordova()
alias(aliasId: string, originalId: string): Promise<any> { return; }
alias(aliasId: string, originalId?: string): Promise<any> {
return;
}
/**
*
* @returns {Promise<any>}
*/
@Cordova()
distinctId(): Promise<any> { return; }
distinctId(): Promise<any> {
return;
}
/**
* @returns {Promise<any>}
*/
@Cordova()
flush(): Promise<any> { return; }
flush(): Promise<any> {
return;
}
/**
*
* The usePeople parameter is used for the iOS Mixpanel SDK.
* @param distinctId {string}
* @param usePeople {boolean}
* @returns {Promise<any>}
*/
@Cordova()
identify(distinctId: string): Promise<any> { return; }
identify(distinctId: string, usePeople?: boolean): Promise<any> {
return;
}
/**
*
@@ -70,14 +78,18 @@ export class Mixpanel extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
init(token: string): Promise<any> { return; }
init(token: string): Promise<any> {
return;
}
/**
*
* @returns {Promise<any>}
*/
@Cordova()
getSuperProperties(): Promise<any> { return; }
getSuperProperties(): Promise<any> {
return;
}
/**
*
@@ -85,7 +97,9 @@ export class Mixpanel extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
registerSuperProperties(superProperties: any): Promise<any> { return; }
registerSuperProperties(superProperties: any): Promise<any> {
return;
}
/**
*
@@ -93,7 +107,9 @@ export class Mixpanel extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
registerSuperPropertiesOnce(superProperties: any): Promise<any> { return; }
registerSuperPropertiesOnce(superProperties: any): Promise<any> {
return;
}
/**
*
@@ -101,14 +117,18 @@ export class Mixpanel extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
unregisterSuperProperty(superPropertyName: string): Promise<any> { return; }
unregisterSuperProperty(superPropertyName: string): Promise<any> {
return;
}
/**
*
* @returns {Promise<any>}
*/
@Cordova()
reset(): Promise<any> { return; }
reset(): Promise<any> {
return;
}
/**
*
@@ -116,7 +136,9 @@ export class Mixpanel extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
timeEvent(eventName: string): Promise<any> { return; }
timeEvent(eventName: string): Promise<any> {
return;
}
/**
*
@@ -128,8 +150,9 @@ export class Mixpanel extends IonicNativePlugin {
successIndex: 2,
errorIndex: 3
})
track(eventName: string, eventProperties?: any): Promise<any> { return; }
track(eventName: string, eventProperties?: any): Promise<any> {
return;
}
}
/**
* @hidden
@@ -141,6 +164,24 @@ export class Mixpanel extends IonicNativePlugin {
})
@Injectable()
export class MixpanelPeople extends IonicNativePlugin {
/**
*
* @param appendObject {any}
* @return {Promise<any>}
*/
@Cordova()
append(appendObject: any): Promise<any> {
return;
}
/**
*
* @return {Promise<any>}
*/
@Cordova()
deleteUser(): Promise<any> {
return;
}
/**
*
@@ -148,7 +189,9 @@ export class MixpanelPeople extends IonicNativePlugin {
* @return {Promise<any>}
*/
@Cordova()
identify(distinctId: string): Promise<any> { return; }
identify(distinctId: string): Promise<any> {
return;
}
/**
*
@@ -156,7 +199,9 @@ export class MixpanelPeople extends IonicNativePlugin {
* @return {Promise<any>}
*/
@Cordova()
increment(peopleProperties: any): Promise<any> { return; }
increment(peopleProperties: any): Promise<any> {
return;
}
/**
*
@@ -164,7 +209,9 @@ export class MixpanelPeople extends IonicNativePlugin {
* @return {Promise<any>}
*/
@Cordova()
setPushId(pushId: string): Promise<any> { return; }
setPushId(pushId: string): Promise<any> {
return;
}
/**
*
@@ -172,14 +219,48 @@ export class MixpanelPeople extends IonicNativePlugin {
* @return {Promise<any>}
*/
@Cordova()
set(peopleProperties: any): Promise<any> { return; }
set(peopleProperties: any): Promise<any> {
return;
}
/**
*
* @param peopleProperties
* @param peopleProperties {any}
* @return {Promise<any>}
*/
@Cordova()
setOnce(peopleProperties: any): Promise<any> { return; }
setOnce(peopleProperties: any): Promise<any> {
return;
}
/**
*
* @param amount {number}
* @param chargeProperties
* @return {Promise<any>}
*/
@Cordova()
trackCharge(amount: number, chargeProperties: any): Promise<any> {
return;
}
/**
*
* @param propertiesArray
* @return {Promise<any>}
*/
@Cordova()
unset(propertiesArray: Array<string>): Promise<any> {
return;
}
/**
*
* @param unionObject {any}
* @return {Promise<any>}
*/
@Cordova()
union(unionObject: any): Promise<any> {
return;
}
}
+29 -13
View File
@@ -1,8 +1,7 @@
import { Plugin, IonicNativePlugin, checkAvailability, InstanceProperty, CordovaInstance } from '@ionic-native/core';
import { Injectable } from '@angular/core';
import { checkAvailability, CordovaInstance, InstanceProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface AuthenticationResult {
accessToken: string;
accesSTokenType: string;
expiresOn: Date;
@@ -18,7 +17,6 @@ export interface AuthenticationResult {
* @returns {String} The authorization header.
*/
createAuthorizationHeader(): string;
}
export interface TokenCache {
@@ -50,7 +48,6 @@ export interface UserInfo {
uniqueId: string;
}
/**
* @name MS ADAL
* @description
@@ -96,22 +93,28 @@ export interface UserInfo {
})
@Injectable()
export class MSAdal extends IonicNativePlugin {
createAuthenticationContext(authority: string, validateAuthority: boolean = true) {
createAuthenticationContext(
authority: string,
validateAuthority: boolean = true
) {
let authContext: any;
if (checkAvailability(MSAdal.getPluginRef(), null, MSAdal.getPluginName()) === true) {
authContext = new (MSAdal.getPlugin()).AuthenticationContext(authority);
if (
checkAvailability(MSAdal.getPluginRef(), null, MSAdal.getPluginName()) ===
true
) {
authContext = new (MSAdal.getPlugin()).AuthenticationContext(
authority,
validateAuthority
);
}
return new AuthenticationContext(authContext);
}
}
/**
* @hidden
*/
export class AuthenticationContext {
@InstanceProperty
authority: string;
@@ -138,7 +141,15 @@ export class AuthenticationContext {
@CordovaInstance({
otherPromise: true
})
acquireTokenAsync(resourceUrl: string, clientId: string, redirectUrl: string, userId?: string, extraQueryParameters?: any): Promise<AuthenticationResult> { return; }
acquireTokenAsync(
resourceUrl: string,
clientId: string,
redirectUrl: string,
userId?: string,
extraQueryParameters?: any
): Promise<AuthenticationResult> {
return;
}
/**
* Acquires token WITHOUT using interactive flow. It checks the cache to return existing result
@@ -153,6 +164,11 @@ export class AuthenticationContext {
@CordovaInstance({
otherPromise: true
})
acquireTokenSilentAsync(resourceUrl: string, clientId: string, userId?: string): Promise<AuthenticationResult> { return; }
acquireTokenSilentAsync(
resourceUrl: string,
clientId: string,
userId?: string
): Promise<AuthenticationResult> {
return;
}
}
+1 -1
View File
@@ -369,7 +369,7 @@ export enum OSActionType {
* ```
*
* 3. From the root of your project make the file executable:
* `$ chmod +x hooks/after_prepare/030_copy_android_notification_icons.js`
* `$ chmod +x hooks/copy_android_notification_icons.js`
*
*
* @usage
@@ -1,11 +1,11 @@
import { Plugin, IonicNativePlugin, Cordova } from '@ionic-native/core';
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Open Native Settings
* @description
* Plugin to open native screens of iOS/android settings
* @usage
* Plugin to open native screens of iOS/android settings
* @usage
* You can open any of these settings:
* ```
* "about", // ios
@@ -78,7 +78,7 @@ import { Injectable } from '@angular/core';
"wifi_ip", // android
"wifi", // ios, android
"wireless" // android
```
```
* ```typescript
* import { OpenNativeSettings } from '@ionic-native/open-native-settings';
*
@@ -99,13 +99,13 @@ import { Injectable } from '@angular/core';
})
@Injectable()
export class OpenNativeSettings extends IonicNativePlugin {
/**
* Opens a setting dialog
* @param setting {string} setting name
* @param setting {string|array} setting name
* @return {Promise<any>}
*/
@Cordova()
open(setting: string): Promise<any> { return; }
open(setting: string | [string, boolean]): Promise<any> {
return;
}
}
+50 -21
View File
@@ -1,10 +1,12 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, CordovaInstance, checkAvailability, IonicNativePlugin } from '@ionic-native/core';
import { checkAvailability, Cordova, CordovaInstance, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
declare const window: any;
export type EventResponse = RegistrationEventResponse & NotificationEventResponse & Error;
export type EventResponse = RegistrationEventResponse &
NotificationEventResponse &
Error;
export interface RegistrationEventResponse {
/**
@@ -13,7 +15,6 @@ export interface RegistrationEventResponse {
registrationId: string;
}
export interface NotificationEventResponse {
/**
* The text of the push message sent from the 3rd party service.
@@ -111,6 +112,13 @@ export interface IOSPushOptions {
* Action Buttons on iOS - https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/PAYLOAD.md#action-buttons-1
*/
categories?: CategoryArray;
/**
* If true the device will be set up to receive VoIP Push notifications and the
* other options will be ignored since VoIP notifications are silent
* notifications that should be handled in the "notification" event.
*/
voip?: boolean | string;
}
export interface CategoryArray {
@@ -203,7 +211,6 @@ export interface BrowserPushOptions {
* Default: http://push.api.phonegap.com/v1/push Optional.
*/
pushServiceURL?: string;
}
export interface PushOptions {
@@ -314,7 +321,6 @@ export type PushEvent = string;
})
@Injectable()
export class Push extends IonicNativePlugin {
/**
* Init push notifications
* @param options {PushOptions}
@@ -329,7 +335,9 @@ export class Push extends IonicNativePlugin {
* @return {Promise<{isEnabled: boolean}>} Returns a Promise that resolves with an object with one property: isEnabled, a boolean that indicates if permission has been granted.
*/
@Cordova()
hasPermission(): Promise<{ isEnabled: boolean }> { return; }
hasPermission(): Promise<{ isEnabled: boolean }> {
return;
}
/**
* Create a new notification channel for Android O and above.
@@ -338,7 +346,9 @@ export class Push extends IonicNativePlugin {
@Cordova({
callbackOrder: 'reverse'
})
createChannel(channel?: Channel): Promise<any> { return; }
createChannel(channel?: Channel): Promise<any> {
return;
}
/**
* Delete a notification channel for Android O and above.
@@ -347,15 +357,18 @@ export class Push extends IonicNativePlugin {
@Cordova({
callbackOrder: 'reverse'
})
deleteChannel(id?: string): Promise<any> { return; }
deleteChannel(id?: string): Promise<any> {
return;
}
/**
* Returns a list of currently configured channels.
* @return {Promise<Channel[]>}
*/
@Cordova()
listChannels(): Promise<Channel[]> { return; }
listChannels(): Promise<Channel[]> {
return;
}
}
/**
@@ -367,11 +380,12 @@ export class Push extends IonicNativePlugin {
pluginRef: 'PushNotification'
})
export class PushObject {
private _objectInstance: any;
constructor(options: PushOptions) {
if (checkAvailability('PushNotification', 'init', 'PushNotification') === true) {
if (
checkAvailability('PushNotification', 'init', 'PushNotification') === true
) {
this._objectInstance = window.PushNotification.init(options);
}
}
@@ -386,7 +400,9 @@ export class PushObject {
clearFunction: 'off',
clearWithArgs: true
})
on(event: PushEvent): Observable<EventResponse> { return; }
on(event: PushEvent): Observable<EventResponse> {
return;
}
/**
* The unregister method is used when the application no longer wants to receive push notifications.
@@ -394,7 +410,9 @@ export class PushObject {
* so you will need to re-register them if you want them to function again without an application reload.
*/
@CordovaInstance()
unregister(): Promise<any> { return; }
unregister(): Promise<any> {
return;
}
/**
* Set the badge count visible when the app is not running
@@ -407,13 +425,17 @@ export class PushObject {
@CordovaInstance({
callbackOrder: 'reverse'
})
setApplicationIconBadgeNumber(count?: number): Promise<any> { return; };
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
*/
@CordovaInstance()
getApplicationIconBadgeNumber(): Promise<number> { return; }
getApplicationIconBadgeNumber(): Promise<number> {
return;
}
/**
* iOS only
@@ -424,13 +446,17 @@ export class PushObject {
@CordovaInstance({
callbackOrder: 'reverse'
})
finish(id?: string): Promise<any> { return; }
finish(id?: string): Promise<any> {
return;
}
/**
* Tells the OS to clear all notifications from the Notification Center
*/
@CordovaInstance()
clearAllNotifications(): Promise<any> { return; }
clearAllNotifications(): Promise<any> {
return;
}
/**
* The subscribe method is used when the application wants to subscribe a new topic to receive push notifications.
@@ -438,7 +464,9 @@ export class PushObject {
* @return {Promise<any>}
*/
@CordovaInstance()
subscribe(topic: string): Promise<any> { return; }
subscribe(topic: string): Promise<any> {
return;
}
/**
* The unsubscribe method is used when the application no longer wants to receive push notifications from a specific topic but continue to receive other push messages.
@@ -446,6 +474,7 @@ export class PushObject {
* @return {Promise<any>}
*/
@CordovaInstance()
unsubscribe(topic: string): Promise<any> { return; }
unsubscribe(topic: string): Promise<any> {
return;
}
}
+166
View File
@@ -0,0 +1,166 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Wechat
* @description
* A cordova plugin, a JS version of Wechat SDK
*
* @usage
* ```typescript
* import { Wechat } from '@ionic-native/wechat';
*
*
* constructor(private wechat: Wechat) { }
*
* ...
*
*
* this.wechat.functionName('Hello', 123)
* .then((res: any) => console.log(res))
* .catch((error: any) => console.error(error));
*
* ```
*/
@Plugin({
pluginName: 'Wechat',
plugin: 'cordova-plugin-wechat',
pluginRef: 'Wechat',
repo: 'https://github.com/xu-li/cordova-plugin-wechat.git',
install: 'cordova plugin add cordova-plugin-wechat --variable wechatappid=YOUR_WECHAT_APPID',
installVariables: ['wechatappid'],
platforms: ['Android', 'iOS']
})
@Injectable()
export class Wechat extends IonicNativePlugin {
Scene: {
SESSION: 0; // 聊天界面
TIMELINE: 1; // 朋友圈
FAVORITE: 2; // 收藏
};
Type: {
APP: 1;
EMOTION: 2;
FILE: 3;
IMAGE: 4;
MUSIC: 5;
VIDEO: 6;
WEBPAGE: 7;
};
@Cordova()
isInstalled(): Promise<any> {
return;
}
/**
* Share a message to wechat app
*
* @example
* <code>
* this.wechat.share({
* message: {
* title: "Message Title",
* description: "Message Description(optional)",
* mediaTagName: "Media Tag Name(optional)",
* thumb: "http://YOUR_THUMBNAIL_IMAGE",
* media: {
* type: Wechat.Type.WEBPAGE, // webpage
* webpageUrl: "https://github.com/xu-li/cordova-plugin-wechat" // webpage
* }
* },
* scene: this.wechat.Scene.TIMELINE // share to Timeline
* }.then(() => {
* console.log('share success');
* })
* .catch(error => {
* console.log(error);
* });
* </code>
*/
@Cordova()
share(params: any): Promise<any> {
return;
}
/**
* Sending an auth request to Wechat
*
* @example
* <code>
* this.wechat.auth.then((res) => { alert(res.code); });
* </code>
*/
auth(scope: any, state: any): Promise<any> {
return;
}
/**
* Send a payment request
*
* @link https://pay.weixin.qq.com/wiki/doc/api/app.php?chapter=9_1
* @example
* <code>
* var params = {
* mch_id: '10000100', // merchant id
* prepay_id: 'wx201411101639507cbf6ffd8b0779950874', // prepay id returned from server
* nonce: '1add1a30ac87aa2db72f57a2375d8fec', // nonce string returned from server
* timestamp: '1439531364', // timestamp
* sign: '0CB01533B8C1EF103065174F50BCA001', // signed string
* };
* this.wechat.sendPaymentRequest(params).then(() => {
* console.log("Success");
* }).catch(error => {
* console.log(error);
* });
* </code>
*/
sendPaymentRequest(params: any): Promise<any> {
return;
}
/**
* jumpToBizProfile (跳转到某个微信公众号)2016-11-11 测试是失效的,囧
*
* @link https://segmentfault.com/a/1190000007204624
* @link https://segmentfault.com/q/1010000003907796
* @example
* <code>
* var params = {
* info: 'gh_xxxxxxx', // 公众帐号原始ID
* type: 'Normal' // 普通号
* }
* or
* var params = {
* info: 'extMsg', // 相关的硬件二维码串
* type: 'Device' // 硬件号
* };
* this.wechat.jumpToBizProfile(params).then(()=> {
* console.log("Success");
* }).catch(error => {
* console.log(error);
* });
* </code>
*/
jumpToWechat(url: string): Promise<any> {
return;
}
/**
* chooseInvoiceFromWX exq:choose invoices from Wechat card list
*
* @example
* <code>
* params: signType, cardSign, nonceStr, timeStamp all required
* this.wechat.chooseInvoiceFromWX(params).then(() => {
* console.log("Success");
* }).catch(error => {
* console.log(error);
* });
* </code>
*/
chooseInvoiceFromWX(params: any): Promise<any> {
return;
}
}