mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-02-04 00:06:19 +08:00
Compare commits
89 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c99c3be03 | ||
|
|
9b2374b3bc | ||
|
|
b4227f2114 | ||
|
|
0932e113b2 | ||
|
|
bbb96ed765 | ||
|
|
31ee7efc22 | ||
|
|
2f69dd88cb | ||
|
|
f32da73a87 | ||
|
|
cc79a1edb7 | ||
|
|
4fb07fa809 | ||
|
|
3d7b777b19 | ||
|
|
2cb5f5c010 | ||
|
|
46d0cecb27 | ||
|
|
ca190db829 | ||
|
|
d698d5985b | ||
|
|
8dcb6be4ea | ||
|
|
158bf637cd | ||
|
|
9b7db588a1 | ||
|
|
5d71d0d2bb | ||
|
|
c6ad5e41ff | ||
|
|
b8de7f0721 | ||
|
|
e5f710c8bb | ||
|
|
239ae32ad3 | ||
|
|
f7a3c7127a | ||
|
|
80a537c0db | ||
|
|
2ae986727a | ||
|
|
7a4df59189 | ||
|
|
337bba62c5 | ||
|
|
a96faf1378 | ||
|
|
0467787085 | ||
|
|
0efa33f257 | ||
|
|
182b403f69 | ||
|
|
ddd269e7ab | ||
|
|
6b18c3d061 | ||
|
|
bd8fbb3e1f | ||
|
|
3d1a73ebcb | ||
|
|
96890c7b92 | ||
|
|
26fd76dad0 | ||
|
|
72c99603db | ||
|
|
e7bc1b6709 | ||
|
|
3e92f64484 | ||
|
|
de6dee7de4 | ||
|
|
bed8797a60 | ||
|
|
b4f0f07064 | ||
|
|
e4b171930d | ||
|
|
4a796cafe9 | ||
|
|
2950ff14d7 | ||
|
|
376501ef7e | ||
|
|
6b468662b6 | ||
|
|
a209c61547 | ||
|
|
07d7ace97d | ||
|
|
13f6da69ef | ||
|
|
bb1064225d | ||
|
|
78e92422ab | ||
|
|
46853b4212 | ||
|
|
f71b65d6a7 | ||
|
|
e486cfd9bf | ||
|
|
7897f28d26 | ||
|
|
0f197ad9fc | ||
|
|
d7c6f8628d | ||
|
|
af114f48e4 | ||
|
|
fd0cddc9d0 | ||
|
|
b3d5baa46e | ||
|
|
68d245ef2c | ||
|
|
4dda714761 | ||
|
|
ba39f7e9f2 | ||
|
|
52da729b8c | ||
|
|
46e0d6d396 | ||
|
|
5fc4ceada4 | ||
|
|
f04f1f479f | ||
|
|
da72795081 | ||
|
|
f3ce3c4930 | ||
|
|
5a77eabf76 | ||
|
|
99e6a5398f | ||
|
|
14ec32b83c | ||
|
|
7b0195bdf4 | ||
|
|
1f48c31a8e | ||
|
|
c62c137723 | ||
|
|
3340e9a694 | ||
|
|
4766ec7a35 | ||
|
|
a37ea81488 | ||
|
|
b5f7f952df | ||
|
|
5d1b5d5fda | ||
|
|
b2e82bea62 | ||
|
|
d2a6b13059 | ||
|
|
ce9db34e24 | ||
|
|
36ae7dcad9 | ||
|
|
adca021f39 | ||
|
|
308e0f3f33 |
2
.github/workflows/nodejs.yml
vendored
2
.github/workflows/nodejs.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x]
|
||||
node-version: [14.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
4
.github/workflows/npmpublish.yml
vendored
4
.github/workflows/npmpublish.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12
|
||||
node-version: 14
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Lint
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12
|
||||
node-version: 14
|
||||
registry-url: https://registry.npmjs.org/
|
||||
- run: npm ci
|
||||
- run: npm run shipit
|
||||
|
||||
17
.github/workflows/rebase.yml
vendored
17
.github/workflows/rebase.yml
vendored
@@ -1,17 +0,0 @@
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
name: Automatic Rebase
|
||||
jobs:
|
||||
rebase:
|
||||
name: Rebase
|
||||
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Automatic Rebase
|
||||
uses: cirrus-actions/rebase@1.3
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
124
CHANGELOG.md
124
CHANGELOG.md
@@ -1,3 +1,127 @@
|
||||
# [5.32.0](https://github.com/ionic-team/ionic-native/compare/v5.31.1...v5.32.0) (2021-04-05)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **app-rate:** add missing types for onButtonClicked callback ([#3616](https://github.com/ionic-team/ionic-native/issues/3616)) ([4fb07fa](https://github.com/ionic-team/ionic-native/commit/4fb07fa8095419178fb0867940c47ea9a85b0f94))
|
||||
* **bluetooth-le:** add missing status type value and add missing (optional) address property to NotifyParams interface ([#3613](https://github.com/ionic-team/ionic-native/issues/3613)) ([f32da73](https://github.com/ionic-team/ionic-native/commit/f32da73a875f87c5c3add3ddb9abb274bec6e0e5))
|
||||
* **build:** publish Node (server) friendly bundles ([#3483](https://github.com/ionic-team/ionic-native/issues/3483)) ([b4227f2](https://github.com/ionic-team/ionic-native/commit/b4227f2114706276d63fcd5303ab992710d58472))
|
||||
* **in-app-purchase-2:** fix typings for refresh ([#3632](https://github.com/ionic-team/ionic-native/issues/3632)) ([8dcb6be](https://github.com/ionic-team/ionic-native/commit/8dcb6be4ea76f650c16e38c573f18a8f56d16911)), closes [/github.com/j3k0/cordova-plugin-purchase/blob/dd6bf6f/doc/api.md#return-value-3](https://github.com//github.com/j3k0/cordova-plugin-purchase/blob/dd6bf6f/doc/api.md/issues/return-value-3)
|
||||
* **unvired-cordova-sdk:** changes to the property names and updated documentation ([#3633](https://github.com/ionic-team/ionic-native/issues/3633)) ([158bf63](https://github.com/ionic-team/ionic-native/commit/158bf637cdf0ee6776ff82dc2109c6d11d2e1d33))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **adjust:** add missing wrappers for cordova api ([#3528](https://github.com/ionic-team/ionic-native/issues/3528)) ([0932e11](https://github.com/ionic-team/ionic-native/commit/0932e113b266e835acf34a2ae09ce0f75a3890ee))
|
||||
* **in-app-purchase-2:** adds typings for transaction ([#3621](https://github.com/ionic-team/ionic-native/issues/3621)) ([46d0cec](https://github.com/ionic-team/ionic-native/commit/46d0cecb271ed425856a08453a94e4568ce83878))
|
||||
* **network:** declare connection enum with strings([#3630](https://github.com/ionic-team/ionic-native/issues/3630)) ([d698d59](https://github.com/ionic-team/ionic-native/commit/d698d5985b764f7ab8e143b163c45a3617da5e0e))
|
||||
* **network:** update Network plugin ([#3608](https://github.com/ionic-team/ionic-native/issues/3608)) ([31ee7ef](https://github.com/ionic-team/ionic-native/commit/31ee7efc22faf8276db5d64a579b8ec44a29f457))
|
||||
* **plugin:** add MS App Center LowMemory plugin ([#3619](https://github.com/ionic-team/ionic-native/issues/3619)) ([2cb5f5c](https://github.com/ionic-team/ionic-native/commit/2cb5f5c01065987c900f413dbb306c052bd1de86))
|
||||
* **plugin:** add MS App Center shared plugin ([#3618](https://github.com/ionic-team/ionic-native/issues/3618)) ([3d7b777](https://github.com/ionic-team/ionic-native/commit/3d7b777b19183cbf9d274b24ac0106e3f45fce88))
|
||||
* **plugin:** Text to Speech Advanced ([#3627](https://github.com/ionic-team/ionic-native/issues/3627)) ([ca190db](https://github.com/ionic-team/ionic-native/commit/ca190db829ae125d2da6d79e2c8673d5c7f5da9d))
|
||||
* **power-optimization:** plugin initial wrapper ([#3642](https://github.com/ionic-team/ionic-native/issues/3642)) ([9b7db58](https://github.com/ionic-team/ionic-native/commit/9b7db588a1f7608e7a7c9e8b4db7951dc98bd816))
|
||||
* **preview-any-file:** add new methods for preview-any-file cordova ([#3643](https://github.com/ionic-team/ionic-native/issues/3643)) ([b8de7f0](https://github.com/ionic-team/ionic-native/commit/b8de7f0721da32faa67a1aa0d8a72846737018c7))
|
||||
* **purchases:** bump cordova-plugin-purchases from 2.0.0 to 2.1.1 ([#3639](https://github.com/ionic-team/ionic-native/issues/3639)) ([5d71d0d](https://github.com/ionic-team/ionic-native/commit/5d71d0d2bbbbf8696a0d42e1e8b99fc1ee63ce16))
|
||||
* **shortcuts-android:** add cordova-plugin-shortcuts-android ([#3609](https://github.com/ionic-team/ionic-native/issues/3609)) ([2f69dd8](https://github.com/ionic-team/ionic-native/commit/2f69dd88cbb798f7fdc21c98f99f55bc6a8e88a7))
|
||||
|
||||
|
||||
|
||||
## [5.31.1](https://github.com/ionic-team/ionic-native/compare/v5.31.0...v5.31.1) (2021-01-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **build:** add correct build script typings ([f7a3c71](https://github.com/ionic-team/ionic-native/commit/f7a3c7127a17a53e911119fc87c7149d356315bb))
|
||||
|
||||
|
||||
|
||||
# [5.31.0](https://github.com/ionic-team/ionic-native/compare/v5.30.0...v5.31.0) (2021-01-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **firebase-messaging:** adjust deleteToken/removeToken signature ([72c9960](https://github.com/ionic-team/ionic-native/commit/72c99603db5b1b2998c3d1e9a920e38f75e0f47b))
|
||||
* **launch-navigator:** enableGeolocation and enableGeocoding typings ([#3584](https://github.com/ionic-team/ionic-native/issues/3584)) ([6b18c3d](https://github.com/ionic-team/ionic-native/commit/6b18c3d0614db1f525aaecfb9e09067537061ba9))
|
||||
* **launchnavigator:** make appSelection accessible ([#3594](https://github.com/ionic-team/ionic-native/issues/3594)) ([26fd76d](https://github.com/ionic-team/ionic-native/commit/26fd76dad06764c288e2902c0edbe0dbb5e668c7))
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* **package:** upgrade to angular 11 ([a96faf1](https://github.com/ionic-team/ionic-native/commit/a96faf13784ed30a5fc645dc769e44960242cb4f))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **advanced-http:** duplicate methods sync to be able to abort requests ([#3575](https://github.com/ionic-team/ionic-native/issues/3575)) ([0efa33f](https://github.com/ionic-team/ionic-native/commit/0efa33f25746437cd3dc97585d380f177ed40e0b))
|
||||
* **android-notch:** add cordova plugin wrapper ([#3592](https://github.com/ionic-team/ionic-native/issues/3592)) ([96890c7](https://github.com/ionic-team/ionic-native/commit/96890c7b92f34cf8d87eb98c0e4b5ddf9b68c6dc))
|
||||
* **app-rate:** update plugin functions ([#3598](https://github.com/ionic-team/ionic-native/issues/3598)) ([3e92f64](https://github.com/ionic-team/ionic-native/commit/3e92f64484be0c949896b5fac7023ef0bd2fc746))
|
||||
* **facebook:** add setAutoLogAppEventsEnabled method ([#3606](https://github.com/ionic-team/ionic-native/issues/3606)) ([b4f0f07](https://github.com/ionic-team/ionic-native/commit/b4f0f0706400f6500e48cd1305c20371977a6869))
|
||||
* **facebook:** update api and logPurchase methods to include additional arguments([#3607](https://github.com/ionic-team/ionic-native/issues/3607)) ([e4b1719](https://github.com/ionic-team/ionic-native/commit/e4b171930dca0ebd3824cfa08861cfb80bf715d3))
|
||||
* **firebase-authentication:** add signInWithApple method ([#3597](https://github.com/ionic-team/ionic-native/issues/3597)) ([e7bc1b6](https://github.com/ionic-team/ionic-native/commit/e7bc1b67095fc0c0dbb96b98f3dd39ecb255ec88))
|
||||
* **in-app-purchase-2:** add redeem() for opening redeem code dialog in iOS ([#3581](https://github.com/ionic-team/ionic-native/issues/3581)) ([ddd269e](https://github.com/ionic-team/ionic-native/commit/ddd269e7ab2df69555ad7eec29bf0ed5a6c8fd04))
|
||||
* **mobile-messaging:** add Lists and date time for customAttributes ([#3586](https://github.com/ionic-team/ionic-native/issues/3586)) ([bd8fbb3](https://github.com/ionic-team/ionic-native/commit/bd8fbb3e1fb4bfc84a7c9ba67e879d18868db8b5))
|
||||
* **purchases:** bump cordova-plugin-purchases from 1.3.2 to 2.0.0 ([#3601](https://github.com/ionic-team/ionic-native/issues/3601)) ([bed8797](https://github.com/ionic-team/ionic-native/commit/bed8797a603398a047a97070fadd99b36e65a9be))
|
||||
* **wonderpush:** remove isReady method. ([#3580](https://github.com/ionic-team/ionic-native/issues/3580)) ([182b403](https://github.com/ionic-team/ionic-native/commit/182b403f69492b96375a7be895da4ff486eccf7b))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* **package:** ionic-native now requires at least Angular 10 with ts-lib 2.0
|
||||
|
||||
Co-Authored-By: Daniel Sogl <mytechde@outlook.com>
|
||||
|
||||
|
||||
|
||||
# [5.30.0](https://github.com/ionic-team/ionic-native/compare/v5.29.0...v5.30.0) (2020-11-20)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **clevertap:** remove duplicated methods ([ba39f7e](https://github.com/ionic-team/ionic-native/commit/ba39f7e9f217ebe72e78bcfeae3d7e9ac07187ae)), closes [#3517](https://github.com/ionic-team/ionic-native/issues/3517) [#3491](https://github.com/ionic-team/ionic-native/issues/3491)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **AllInOneSDK:** add check to restrict app invocation ([#3570](https://github.com/ionic-team/ionic-native/issues/3570)) ([fd0cddc](https://github.com/ionic-team/ionic-native/commit/fd0cddc9d0abdc3006e6cf16c1f80d0551b71cd2))
|
||||
* **AppsFlyer:** update to 6.x.x ([#3563](https://github.com/ionic-team/ionic-native/issues/3563)) ([e486cfd](https://github.com/ionic-team/ionic-native/commit/e486cfd9bff2fd0bdd4ccfc9cb91b450b7218aef))
|
||||
* **background-upload:** add plugin ([#3539](https://github.com/ionic-team/ionic-native/issues/3539)) ([13f6da6](https://github.com/ionic-team/ionic-native/commit/13f6da69ef622923bf2c746fbecb18a7cf959b82))
|
||||
* **bluetooth-le:** Allow specifying transport mode for Android ([#3571](https://github.com/ionic-team/ionic-native/issues/3571)) ([b3d5baa](https://github.com/ionic-team/ionic-native/commit/b3d5baa46ed695344b08bd3e27be3b9f84bf6f0d))
|
||||
* **core:** add `methodName` to Cordova Decorator ([#3558](https://github.com/ionic-team/ionic-native/issues/3558)) ([46853b4](https://github.com/ionic-team/ionic-native/commit/46853b42120b4b34b727ef0ae0274d1c8cb7bcd1)), closes [#3557](https://github.com/ionic-team/ionic-native/issues/3557)
|
||||
* **CustomUiSDK:** add plugin for Paytm Custom UI SDK ([#3546](https://github.com/ionic-team/ionic-native/issues/3546)) ([bb10642](https://github.com/ionic-team/ionic-native/commit/bb1064225d276cffcd40ff9176b77ffb9d56ed8a))
|
||||
* **dfu-update:** add DfuUpdate Plugin Wrapper ([#3514](https://github.com/ionic-team/ionic-native/issues/3514)) ([07d7ace](https://github.com/ionic-team/ionic-native/commit/07d7ace97d1b122424964f6e7330bf97710dcc8f))
|
||||
* **firebase-dynamic-links:** Add missing method getDynamicLink() ([#3567](https://github.com/ionic-team/ionic-native/issues/3567)) ([d7c6f86](https://github.com/ionic-team/ionic-native/commit/d7c6f8628d176119cabae444c02f285a8c36997d))
|
||||
* **firebase-vision:** add image labelling ([#3569](https://github.com/ionic-team/ionic-native/issues/3569)) ([af114f4](https://github.com/ionic-team/ionic-native/commit/af114f48e46b4f7f1ce66bb2906585158aa5cff0))
|
||||
* **intercom:** added displayCarousel, displayArticle, setBottomPadding ([#3572](https://github.com/ionic-team/ionic-native/issues/3572)) ([68d245e](https://github.com/ionic-team/ionic-native/commit/68d245ef2c85dfff0aedb444db629d59986e06b4))
|
||||
* **multiple-document-picker:** add plugin ([#3551](https://github.com/ionic-team/ionic-native/issues/3551)) ([78e9242](https://github.com/ionic-team/ionic-native/commit/78e92422abb5a645ed09bf61b7dc250462ccc742))
|
||||
* **purchases:** update to plugin version 1.3.2 ([#3566](https://github.com/ionic-team/ionic-native/issues/3566)) ([0f197ad](https://github.com/ionic-team/ionic-native/commit/0f197ad9fcd4e56c0c61bd87c6aec76889af6ab2))
|
||||
* **smartlook:** update to 1.6.0 ([#3562](https://github.com/ionic-team/ionic-native/issues/3562)) ([f71b65d](https://github.com/ionic-team/ionic-native/commit/f71b65d6a79d22175c27b960f27ef51ea6a87ed4))
|
||||
|
||||
|
||||
|
||||
# [5.29.0](https://github.com/ionic-team/ionic-native/compare/v5.28.0...v5.29.0) (2020-10-16)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **diagnostics:** locationAccuracyAuthorization Property missing in build ([#3540](https://github.com/ionic-team/ionic-native/issues/3540)) ([c62c137](https://github.com/ionic-team/ionic-native/commit/c62c13772307c02e7581c15ec6f5c94309927cc6))
|
||||
* **http:** add missing type to serialiser property ([#3532](https://github.com/ionic-team/ionic-native/issues/3532)) ([7b0195b](https://github.com/ionic-team/ionic-native/commit/7b0195bdf441532106df6eb2baf5a9ada1068761))
|
||||
* **in-app-purchase-2:** change in-app-purchase-2 plugin id ([#3553](https://github.com/ionic-team/ionic-native/issues/3553)) ([ce9db34](https://github.com/ionic-team/ionic-native/commit/ce9db34e2439d4fefd1b4071bffb6e5c8daab634))
|
||||
* **music-controls:** update associated cordova plugin ([#3543](https://github.com/ionic-team/ionic-native/issues/3543)) ([4766ec7](https://github.com/ionic-team/ionic-native/commit/4766ec7a35d7e7b0ab31d3db8953f2ef4bdcb6df))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **adjust:** updating to match official typings ([#3523](https://github.com/ionic-team/ionic-native/issues/3523)) ([5a77eab](https://github.com/ionic-team/ionic-native/commit/5a77eabf7644a79369da40eb929b6edfcb83de07))
|
||||
* **all-in-one-sdk:** add plugin for Paytm All-in-One SDK ([#3536](https://github.com/ionic-team/ionic-native/issues/3536)) ([1f48c31](https://github.com/ionic-team/ionic-native/commit/1f48c31a8eaf5079ec8e391b21ea5ce3fa9e1446))
|
||||
* **appsfyler:** add property waitForATTUserAuthorization to AppsflyerOptions ([#3541](https://github.com/ionic-team/ionic-native/issues/3541)) ([3340e9a](https://github.com/ionic-team/ionic-native/commit/3340e9a6949f798d5ec540a78c7ac46a5dc884b2))
|
||||
* **fingerprint-air:** add new functions ([#3530](https://github.com/ionic-team/ionic-native/issues/3530)) ([99e6a53](https://github.com/ionic-team/ionic-native/commit/99e6a5398fb2923991d7236475913eb17e8640c0))
|
||||
* **firebase-x:** add setLanguageCode method for auth ([#3548](https://github.com/ionic-team/ionic-native/issues/3548)) ([5d1b5d5](https://github.com/ionic-team/ionic-native/commit/5d1b5d5fda311003d0ae20e27a06d6bd443554be))
|
||||
* **mobile-messaging:** add new fields to Message type and new method to display chat view ([#3531](https://github.com/ionic-team/ionic-native/issues/3531)) ([14ec32b](https://github.com/ionic-team/ionic-native/commit/14ec32b83c603fc5a079eabf794b7dadce867358))
|
||||
* **purchases:** update to plugin version 1.3.0 ([#3547](https://github.com/ionic-team/ionic-native/issues/3547)) ([b5f7f95](https://github.com/ionic-team/ionic-native/commit/b5f7f952df06828a07f4ab013ce52fddc8ccafdf))
|
||||
* **social-sharing:** Add missing method shareViaWhatsAppToPhone([#3513](https://github.com/ionic-team/ionic-native/issues/3513)) ([f3ce3c4](https://github.com/ionic-team/ionic-native/commit/f3ce3c4930f87f6f2dd023dc28ef924faee05a84))
|
||||
|
||||
|
||||
|
||||
# [5.28.0](https://github.com/ionic-team/ionic-native/compare/v5.27.0...v5.28.0) (2020-08-14)
|
||||
|
||||
|
||||
|
||||
@@ -168,6 +168,7 @@ A decorator to wrap the main plugin class, and any other classes that will use `
|
||||
Checks if the plugin and the method are available before executing. By default, the decorator will wrap the callbacks of the function and return a Promise. This decorator takes the following configuration options:
|
||||
|
||||
- **observable**: set to true to return an Observable
|
||||
- **methodName**: an optional name of the cordova plugins method name (if different from wrappers method name)
|
||||
- **clearFunction**: an optional name of a method to clear the observable we returned
|
||||
- **clearWithArgs**: This can be used if clearFunction is set. Set this to true to call the clearFunction with the same arguments used in the initial function.
|
||||
- **sync**: set to true if the method should return the value as-is without wrapping with Observable/Promise
|
||||
|
||||
@@ -3,7 +3,7 @@ jobs:
|
||||
build:
|
||||
working_directory: ~/ionic-native/
|
||||
docker:
|
||||
- image: node:12
|
||||
- image: node:14
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
|
||||
3769
package-lock.json
generated
3769
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
62
package.json
62
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ionic-native",
|
||||
"version": "5.28.0",
|
||||
"version": "5.32.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)",
|
||||
@@ -22,51 +22,54 @@
|
||||
"shipit": "npm run build && npm run readmes && npm run npmpub",
|
||||
"prettier": "prettier --write \"**/*.{js,json,css,scss,less,md,ts,html,component.html}\""
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": "^2.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/common": "^9.1.12",
|
||||
"@angular/compiler": "^9.1.12",
|
||||
"@angular/compiler-cli": "^9.1.12",
|
||||
"@angular/core": "^9.1.12",
|
||||
"@angular/common": "^11.2.8",
|
||||
"@angular/compiler": "^11.2.8",
|
||||
"@angular/compiler-cli": "^11.2.8",
|
||||
"@angular/core": "^11.2.8",
|
||||
"@types/cordova": "0.0.34",
|
||||
"@types/fs-extra": "^9.0.1",
|
||||
"@types/jest": "^26.0.9",
|
||||
"@types/lodash": "^4.14.159",
|
||||
"@types/node": "^12.12.54",
|
||||
"@types/fs-extra": "^9.0.10",
|
||||
"@types/jest": "^26.0.22",
|
||||
"@types/lodash": "^4.14.168",
|
||||
"@types/node": "^12.20.7",
|
||||
"@types/rimraf": "^3.0.0",
|
||||
"@types/webpack": "^4.41.21",
|
||||
"ajv": "^6.12.3",
|
||||
"@types/webpack": "^4.41.27",
|
||||
"async-promise-queue": "^1.0.5",
|
||||
"conventional-changelog-cli": "^2.1.0",
|
||||
"cz-conventional-changelog": "^3.2.0",
|
||||
"dgeni": "^0.4.12",
|
||||
"conventional-changelog-cli": "^2.1.1",
|
||||
"cz-conventional-changelog": "^3.3.0",
|
||||
"dgeni": "^0.4.14",
|
||||
"dgeni-packages": "0.16.10",
|
||||
"fs-extra": "^9.0.1",
|
||||
"fs-extra": "^9.1.0",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-rename": "^2.0.0",
|
||||
"gulp-replace": "^1.0.0",
|
||||
"gulp-tslint": "^8.1.4",
|
||||
"husky": "^4.2.5",
|
||||
"jest": "^26.4.0",
|
||||
"lint-staged": "^10.2.11",
|
||||
"lodash": "^4.17.20",
|
||||
"husky": "^4.3.8",
|
||||
"jest": "^26.6.3",
|
||||
"lint-staged": "^10.5.4",
|
||||
"lodash": "^4.17.21",
|
||||
"minimist": "^1.2.5",
|
||||
"natives": "^1.1.6",
|
||||
"prettier": "^2.0.5",
|
||||
"prettier": "^2.2.1",
|
||||
"rimraf": "^3.0.2",
|
||||
"rxjs": "^6.6.2",
|
||||
"ts-jest": "^26.2.0",
|
||||
"ts-node": "^8.10.2",
|
||||
"tslint": "^5.20.1",
|
||||
"rollup": "^2.44.0",
|
||||
"rxjs": "^6.6.7",
|
||||
"ts-jest": "^26.5.4",
|
||||
"ts-node": "~8.3.0",
|
||||
"tslint": "~6.1.0",
|
||||
"tslint-config-prettier": "^1.18.0",
|
||||
"tslint-ionic-rules": "0.0.21",
|
||||
"typedoc": "^0.18.0",
|
||||
"typescript": "~3.8.3",
|
||||
"typescript-tslint-plugin": "0.5.5",
|
||||
"typescript": "~4.1.5",
|
||||
"typescript-tslint-plugin": "^1.0.1",
|
||||
"uglifyjs-webpack-plugin": "^2.2.0",
|
||||
"unminified-webpack-plugin": "^2.0.0",
|
||||
"webpack": "^4.44.1",
|
||||
"webpack": "^4.46.0",
|
||||
"winston": "^3.3.3",
|
||||
"zone.js": "^0.10.3"
|
||||
"zone.js": "^0.11.4"
|
||||
},
|
||||
"jest": {
|
||||
"transform": {
|
||||
@@ -93,9 +96,6 @@
|
||||
"path": "./node_modules/cz-conventional-changelog"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": "^1.13.0"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged"
|
||||
|
||||
@@ -2,6 +2,7 @@ import * as ts from 'typescript';
|
||||
import * as fs from 'fs-extra';
|
||||
import * as path from 'path';
|
||||
import * as rimraf from 'rimraf';
|
||||
import * as rollup from 'rollup';
|
||||
import { generateDeclarations } from './transpile';
|
||||
import { clone } from 'lodash';
|
||||
import { EmitFlags, createCompilerHost, CompilerOptions, CompilerHost, createProgram } from '@angular/compiler-cli';
|
||||
@@ -54,6 +55,31 @@ export function generateDeclarationFiles() {
|
||||
generateDeclarations(PLUGIN_PATHS.map(p => p.replace('index.ts', 'ngx/index.ts')));
|
||||
}
|
||||
|
||||
export function generateLegacyBundles() {
|
||||
[
|
||||
path.resolve(ROOT, 'dist/@ionic-native/core/index.js'),
|
||||
...PLUGIN_PATHS.map(p =>
|
||||
p.replace(path.join(ROOT, 'src'), path.join(ROOT, 'dist')).replace('index.ts', 'ngx/index.js')
|
||||
),
|
||||
].forEach(p =>
|
||||
rollup
|
||||
.rollup({
|
||||
input: p,
|
||||
onwarn(warning, warn) {
|
||||
if (warning.code === 'UNUSED_EXTERNAL_IMPORT') return;
|
||||
warn(warning);
|
||||
},
|
||||
external: ['@angular/core', '@ionic-native/core', 'rxjs', 'tslib'],
|
||||
})
|
||||
.then(bundle =>
|
||||
bundle.write({
|
||||
file: path.join(path.dirname(p), 'bundle.js'),
|
||||
format: 'cjs',
|
||||
})
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// remove reference to @ionic-native/core decorators
|
||||
export function modifyMetadata() {
|
||||
debugger;
|
||||
|
||||
@@ -4,6 +4,7 @@ import { getMethodsForDecorator } from '../helpers';
|
||||
function transformImports(file: ts.SourceFile, ctx: ts.TransformationContext, ngcBuild?: boolean) {
|
||||
// remove angular imports
|
||||
if (!ngcBuild) {
|
||||
// @ts-expect-error
|
||||
file.statements = (file.statements as any).filter(
|
||||
(s: any) => !(s.kind === ts.SyntaxKind.ImportDeclaration && s.moduleSpecifier.text === '@angular/core')
|
||||
);
|
||||
|
||||
@@ -54,7 +54,7 @@ function getMethodBlock(method: ts.MethodDeclaration, decoratorName: string, dec
|
||||
default:
|
||||
return ts.createCall(ts.createIdentifier(decoratorMethod), undefined, [
|
||||
ts.createThis(),
|
||||
ts.createLiteral((method.name as any).text),
|
||||
ts.createLiteral(decoratorArgs?.methodName || (method.name as any).text),
|
||||
convertValueToLiteral(decoratorArgs),
|
||||
ts.createIdentifier('arguments'),
|
||||
]);
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
import { cleanupNgx, generateDeclarationFiles, modifyMetadata, transpileNgx, transpileNgxCore } from '../build/ngx';
|
||||
import {
|
||||
cleanupNgx,
|
||||
generateLegacyBundles,
|
||||
generateDeclarationFiles,
|
||||
modifyMetadata,
|
||||
transpileNgx,
|
||||
transpileNgxCore,
|
||||
} from '../build/ngx';
|
||||
|
||||
transpileNgxCore();
|
||||
transpileNgx();
|
||||
generateLegacyBundles();
|
||||
generateDeclarationFiles();
|
||||
modifyMetadata();
|
||||
cleanupNgx();
|
||||
|
||||
@@ -15,6 +15,7 @@ const FLAGS = '--access public';
|
||||
|
||||
const PACKAGE_JSON_BASE = {
|
||||
description: 'Ionic Native - Native plugins for ionic apps',
|
||||
main: 'bundle.js',
|
||||
module: 'index.js',
|
||||
typings: 'index.d.ts',
|
||||
author: 'ionic',
|
||||
@@ -78,7 +79,7 @@ async function publish(ignoreErrors = false) {
|
||||
// upload 1 package per CPU thread at a time
|
||||
const worker = Queue.async.asyncify(
|
||||
(pkg: any) =>
|
||||
new Promise<any>((resolve, reject) => {
|
||||
new Promise<string | void>((resolve, reject) => {
|
||||
exec(`npm publish ${pkg} ${FLAGS}`, (err, stdout) => {
|
||||
if (stdout) {
|
||||
Logger.verbose(stdout.trim());
|
||||
|
||||
@@ -33,6 +33,10 @@ export interface PluginConfig {
|
||||
|
||||
export interface CordovaOptions {
|
||||
destruct?: boolean;
|
||||
/**
|
||||
* If the method-name of the cordova plugin is different from the wrappers one, it can be defined here
|
||||
*/
|
||||
methodName?: string;
|
||||
/**
|
||||
* Set to true if the wrapped method is a sync function
|
||||
*/
|
||||
|
||||
@@ -45,17 +45,24 @@ export class AdjustConfig {
|
||||
private delayStart = 0.0;
|
||||
private logLevel: AdjustLogLevel = null;
|
||||
private defaultTracker: string = null;
|
||||
private urlStrategy: AdjustUrlStrategy = null;
|
||||
private externalDeviceId: string = null;
|
||||
private sendInBackground: boolean = null;
|
||||
private shouldLaunchDeeplink: boolean = null;
|
||||
private eventBufferingEnabled: boolean = null;
|
||||
private userAgent: string = null;
|
||||
private isDeviceKnown: boolean = null;
|
||||
private needsCost: boolean = null;
|
||||
private secretId: number = null;
|
||||
private info1: number = null;
|
||||
private info2: number = null;
|
||||
private info3: number = null;
|
||||
private info4: number = null;
|
||||
private processName: string = null; // Android only
|
||||
private preinstallTrackingEnabled: boolean = null; // Android only
|
||||
private allowiAdInfoReading: boolean = null; // iOS only
|
||||
private allowIdfaReading: boolean = null; // iOS only
|
||||
private allowAdServicesInfoReading: boolean = null; // iOS only
|
||||
|
||||
private attributionCallback: (attribution: AdjustAttribution) => void = null;
|
||||
private eventTrackingSucceededCallback: (event: AdjustEventSuccess) => void = null;
|
||||
@@ -89,6 +96,14 @@ export class AdjustConfig {
|
||||
this.defaultTracker = defaultTracker;
|
||||
}
|
||||
|
||||
setExternalDeviceId(externalDeviceId: string) {
|
||||
this.externalDeviceId = externalDeviceId;
|
||||
}
|
||||
|
||||
setUrlStrategy(urlStrategy: AdjustUrlStrategy) {
|
||||
this.urlStrategy = urlStrategy;
|
||||
}
|
||||
|
||||
setSendInBackground(sendInBackground: boolean) {
|
||||
this.sendInBackground = sendInBackground;
|
||||
}
|
||||
@@ -109,10 +124,30 @@ export class AdjustConfig {
|
||||
this.isDeviceKnown = isDeviceKnown;
|
||||
}
|
||||
|
||||
setNeedsCost(needsCost: boolean) {
|
||||
this.needsCost = needsCost;
|
||||
}
|
||||
|
||||
setProcessName(processName: string) {
|
||||
this.processName = processName;
|
||||
}
|
||||
|
||||
setPreinstallTrackingEnabled(preinstallTrackingEnabled: boolean) {
|
||||
this.preinstallTrackingEnabled = preinstallTrackingEnabled;
|
||||
}
|
||||
|
||||
setAllowiAdInfoReading(allowiAdInfoReading: boolean) {
|
||||
this.allowiAdInfoReading = allowiAdInfoReading;
|
||||
}
|
||||
|
||||
setAllowIdfaReading(allowIdfaReading: boolean) {
|
||||
this.allowIdfaReading = allowIdfaReading;
|
||||
}
|
||||
|
||||
setAllowAdServicesInfoReading(allowAdServicesInfoReading: boolean) {
|
||||
this.allowAdServicesInfoReading = allowAdServicesInfoReading;
|
||||
}
|
||||
|
||||
setAttributionCallbackListener(attributionCallback: (attribution: AdjustAttribution) => void) {
|
||||
this.attributionCallback = attributionCallback;
|
||||
}
|
||||
@@ -125,9 +160,7 @@ export class AdjustConfig {
|
||||
this.eventTrackingFailedCallback = eventTrackingFailedCallback;
|
||||
}
|
||||
|
||||
setSessionTrackingSucceededCallbackListener(
|
||||
sessionTrackingSucceededCallback: (session: AdjustSessionSuccess) => void
|
||||
) {
|
||||
setSessionTrackingSucceededCallbackListener(sessionTrackingSucceededCallback: (session: AdjustSessionSuccess) => void) {
|
||||
this.sessionTrackingSucceededCallback = sessionTrackingSucceededCallback;
|
||||
}
|
||||
|
||||
@@ -188,6 +221,99 @@ export class AdjustConfig {
|
||||
}
|
||||
}
|
||||
|
||||
export class AdjustAppStoreSubscription {
|
||||
private price: string;
|
||||
private currency: string;
|
||||
private transactionId: string;
|
||||
private receipt: string;
|
||||
private transactionDate: string;
|
||||
private salesRegion: string;
|
||||
private callbackParameters: string[] = [];
|
||||
private partnerParameters: string[] = [];
|
||||
|
||||
constructor(price: string, currency: string, transactionId: string, receipt: string) {
|
||||
this.price = price;
|
||||
this.currency = currency;
|
||||
this.transactionId = transactionId;
|
||||
this.receipt = receipt;
|
||||
}
|
||||
|
||||
setTransactionDate(transactionDate: string): void {
|
||||
this.transactionDate = transactionDate;
|
||||
}
|
||||
|
||||
setSalesRegion(salesRegion: string): void {
|
||||
this.salesRegion = salesRegion;
|
||||
}
|
||||
|
||||
addCallbackParameter(key: string, value: string): void {
|
||||
this.callbackParameters.push(key);
|
||||
this.callbackParameters.push(value);
|
||||
}
|
||||
|
||||
addPartnerParameter(key: string, value: string): void {
|
||||
this.partnerParameters.push(key);
|
||||
this.partnerParameters.push(value);
|
||||
}
|
||||
}
|
||||
|
||||
export class AdjustPlayStoreSubscription {
|
||||
private price: string;
|
||||
private currency: string;
|
||||
private sku: string;
|
||||
private orderId: string;
|
||||
private signature: string;
|
||||
private purchaseToken: string;
|
||||
private purchaseTime: string;
|
||||
private callbackParameters: string[] = [];
|
||||
private partnerParameters: string[] = [];
|
||||
|
||||
constructor(
|
||||
price: string,
|
||||
currency: string,
|
||||
sku: string,
|
||||
orderId: string,
|
||||
signature: string,
|
||||
purchaseToken: string
|
||||
) {
|
||||
this.price = price;
|
||||
this.currency = currency;
|
||||
this.sku = sku;
|
||||
this.orderId = orderId;
|
||||
this.signature = signature;
|
||||
this.purchaseToken = purchaseToken;
|
||||
}
|
||||
|
||||
setPurchaseTime(purchaseTime: string): void {
|
||||
this.purchaseTime = purchaseTime;
|
||||
}
|
||||
|
||||
addCallbackParameter(key: string, value: string): void {
|
||||
this.callbackParameters.push(key);
|
||||
this.callbackParameters.push(value);
|
||||
}
|
||||
|
||||
addPartnerParameter(key: string, value: string): void {
|
||||
this.partnerParameters.push(key);
|
||||
this.partnerParameters.push(value);
|
||||
}
|
||||
}
|
||||
|
||||
export class AdjustThirdPartySharing {
|
||||
private isEnabled: boolean;
|
||||
private granularOptions: string[] = [];
|
||||
|
||||
constructor(isEnabled: boolean) {
|
||||
this.isEnabled = isEnabled;
|
||||
}
|
||||
|
||||
addGranularOption(partnerName: string, key: string, value: string): void {
|
||||
this.granularOptions.push(partnerName);
|
||||
this.granularOptions.push(key);
|
||||
this.granularOptions.push(value);
|
||||
}
|
||||
}
|
||||
|
||||
export interface AdjustAttribution {
|
||||
trackerToken: string;
|
||||
trackerName: string;
|
||||
@@ -197,6 +323,9 @@ export interface AdjustAttribution {
|
||||
creative: string;
|
||||
clickLabel: string;
|
||||
adid: string;
|
||||
costType: string;
|
||||
costAmount: string;
|
||||
costCurrency: string;
|
||||
}
|
||||
|
||||
export interface AdjustSessionSuccess {
|
||||
@@ -235,7 +364,7 @@ export interface AdjustEventFailure {
|
||||
|
||||
export enum AdjustEnvironment {
|
||||
Sandbox = 'sandbox',
|
||||
Production = 'production',
|
||||
Production = 'production'
|
||||
}
|
||||
|
||||
export enum AdjustLogLevel {
|
||||
@@ -245,7 +374,34 @@ export enum AdjustLogLevel {
|
||||
Warn = 'WARN',
|
||||
Error = 'ERROR',
|
||||
Assert = 'ASSERT',
|
||||
Suppress = 'SUPPRESS',
|
||||
Suppress = 'SUPPRESS'
|
||||
}
|
||||
|
||||
export enum AdjustUrlStrategy {
|
||||
India = 'India',
|
||||
China = 'China'
|
||||
}
|
||||
|
||||
export enum AdjustAdRevenueSource {
|
||||
AdRevenueSourceMopub = 'mopub',
|
||||
AdRevenueSourceAdmob = 'admob',
|
||||
AdRevenueSourceFbNativeAd = 'facebook_native_ad',
|
||||
AdRevenueSourceFbAudienceNetwork = 'facebook_audience_network',
|
||||
AdRevenueSourceIronsource = 'ironsource',
|
||||
AdRevenueSourceFyber = 'fyber',
|
||||
AdRevenueSourceAerserv = 'aerserv',
|
||||
AdRevenueSourceAppodeal = 'appodeal',
|
||||
AdRevenueSourceAdincube = 'adincube',
|
||||
AdRevenueSourceFusePowered = 'fusepowered',
|
||||
AdRevenueSourceAddapptr = 'addapptr',
|
||||
AdRevenueSourceMillennialMediation = 'millennial_mediation',
|
||||
AdRevenueSourceFlurry = 'flurry',
|
||||
AdRevenueSourceAdmost = 'admost',
|
||||
AdRevenueSourceDeltadna = 'deltadna',
|
||||
AdRevenueSourceUpsight = 'upsight',
|
||||
AdRevenueSourceUnityAds = 'unityads',
|
||||
AdRevenueSourceAdtoapp = 'adtoapp',
|
||||
AdRevenueSourceTapdaq = 'tapdaq'
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -257,7 +413,7 @@ export enum AdjustLogLevel {
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Adjust, AdjustConfig, AdjustEnvironment } from '@ionic-native/adjust/ngx';
|
||||
* import { Adjust, AdjustConfig, AdjustEnvironment } from '@ionic-native/adjust';
|
||||
*
|
||||
* constructor(private adjust: Adjust) { }
|
||||
*
|
||||
@@ -278,19 +434,25 @@ export enum AdjustLogLevel {
|
||||
* @classes
|
||||
* AdjustEvent
|
||||
* AdjustConfig
|
||||
* AdjustAppStoreSubscription
|
||||
* AdjustPlayStoreSubscription
|
||||
* AdjustThirdPartySharing
|
||||
* @enums
|
||||
* AdjustEnvironment
|
||||
* AdjustLogLevel
|
||||
* AdjustUrlStrategy
|
||||
* AdjustAdRevenueSource
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Adjust',
|
||||
plugin: 'com.adjust.sdk',
|
||||
pluginRef: 'Adjust',
|
||||
repo: 'https://github.com/adjust/cordova_sdk',
|
||||
platforms: ['Android', 'iOS'],
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Adjust extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* This method initializes Adjust SDK
|
||||
* @param {AdjustConig} config Adjust config object used as starting options
|
||||
@@ -305,6 +467,42 @@ export class Adjust extends IonicNativePlugin {
|
||||
@Cordova({ sync: true })
|
||||
trackEvent(event: AdjustEvent): void {}
|
||||
|
||||
/**
|
||||
* This method tracks App Store subscription
|
||||
* @param {AdjustAppStoreSubscription} subscription Adjust App Store subscription object to be tracked
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
trackAppStoreSubscription(subscription: AdjustAppStoreSubscription): void {}
|
||||
|
||||
/**
|
||||
* This method tracks Play Store subscription
|
||||
* @param {AdjustPlayStoreSubscription} subscription Adjust Play Store subscription object to be tracked
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
trackPlayStoreSubscription(subscription: AdjustPlayStoreSubscription): void {}
|
||||
|
||||
/**
|
||||
* This method tracks third party sharing choice
|
||||
* @param {AdjustThirdPartySharing} thirdPartySharing Adjust third party sharing object to be tracked
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
trackThirdPartySharing(thirdPartySharing: AdjustThirdPartySharing): void {}
|
||||
|
||||
/**
|
||||
* This method tracks ad revenue data
|
||||
* @param {AdjustAdRevenueSource} source Ad revenue source
|
||||
* @param {string} payload Ad revenue JSON string payload
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
trackAdRevenue(source: AdjustAdRevenueSource, payload: string): void {}
|
||||
|
||||
/**
|
||||
* This method tracks measurement consent choice
|
||||
* @param {boolean} measurementConsent set measurement consent to true or false
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
trackMeasurementConsent(measurementConsent: boolean): void {}
|
||||
|
||||
/**
|
||||
* This method sets offline mode on or off
|
||||
* @param {boolean} enabled set to true for offline mode on
|
||||
@@ -339,9 +537,7 @@ export class Adjust extends IonicNativePlugin {
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@Cordova()
|
||||
isEnabled(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
isEnabled(): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* In accordance with article 17 of the EU's General Data Protection Regulation (GDPR), you can notify Adjust when a user has exercised their right to be forgotten.
|
||||
@@ -350,32 +546,33 @@ export class Adjust extends IonicNativePlugin {
|
||||
@Cordova({ sync: true })
|
||||
gdprForgetMe(): void {}
|
||||
|
||||
/**
|
||||
* You can now notify Adjust when a user has exercised their right to stop sharing their data with partners for marketing purposes, but has allowed it to be shared for statistics purposes.
|
||||
* Calling the following method will instruct the Adjust SDK to communicate the user's choice to disable data sharing to the Adjust backend
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
disableThirdPartySharing(): void {}
|
||||
|
||||
/**
|
||||
* Function used to get Google AdId
|
||||
* @return {Promise<string>} Returns a promise with google AdId value
|
||||
*/
|
||||
@Cordova()
|
||||
getGoogleAdId(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
getGoogleAdId(): Promise<string> { return; }
|
||||
|
||||
/**
|
||||
* If you need to obtain the Amazon Advertising ID, you can make a call to this function.
|
||||
* @return {Promise<string>} Returns a promise with anazib adv. ID
|
||||
*/
|
||||
@Cordova()
|
||||
getAmazonAdId(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
getAmazonAdId(): Promise<string> { return; }
|
||||
|
||||
/**
|
||||
* To obtain the IDFA, call this function
|
||||
* @return {Promise<string>} Returns a promise with IDFA string value
|
||||
*/
|
||||
@Cordova()
|
||||
getIdfa(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
getIdfa(): Promise<string> { return; }
|
||||
|
||||
/**
|
||||
* For every device with your app installed on it, the Adjust backend generates a unique Adjust device identifier (adid).
|
||||
@@ -383,27 +580,21 @@ export class Adjust extends IonicNativePlugin {
|
||||
* @return {Promise<string>} Returns a promise with adid value
|
||||
*/
|
||||
@Cordova()
|
||||
getAdid(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
getAdid(): Promise<string> { return; }
|
||||
|
||||
/**
|
||||
* If you want to access information about a user's current attribution whenever you need it, you can make a call to this function
|
||||
* @return {Promise<AdjustAttribution>} Returns a promise with AdjustAttribution object
|
||||
*/
|
||||
@Cordova()
|
||||
getAttribution(): Promise<AdjustAttribution> {
|
||||
return;
|
||||
}
|
||||
getAttribution(): Promise<AdjustAttribution> { return; }
|
||||
|
||||
/**
|
||||
* Get the information about version of the SDK used
|
||||
* @return {Promise<string>} Returns a promise with sdk version information
|
||||
*/
|
||||
@Cordova()
|
||||
getSdkVersion(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
getSdkVersion(): Promise<string> { return; }
|
||||
|
||||
/**
|
||||
* Method used to add session callback parameters
|
||||
@@ -452,4 +643,26 @@ export class Adjust extends IonicNativePlugin {
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
sendFirstPackages(): void {}
|
||||
}
|
||||
|
||||
/**
|
||||
* Request Adjust SDK to show pop up dialog for asking user's consent to be tracked.
|
||||
* In order to do this, call this function
|
||||
* @return {Promise<number>} Returns a promise with user's consent value
|
||||
*/
|
||||
@Cordova()
|
||||
requestTrackingAuthorizationWithCompletionHandler(): Promise<number> { return; }
|
||||
|
||||
/**
|
||||
* You can update SKAdNetwork conversion value with calling this method
|
||||
* @param {number} conversionValue conversion value for the user
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
updateConversionValue(conversionValue: number): void {}
|
||||
|
||||
/**
|
||||
* To obtain the app tracking authorization status in iOS, call this function
|
||||
* @return {Promise<number>} Returns a promise with app tracking authorization status
|
||||
*/
|
||||
@Cordova()
|
||||
getAppTrackingAuthorizationStatus(): Promise<number> { return; }
|
||||
}
|
||||
79
src/@ionic-native/plugins/all-in-one-sdk/index.ts
Normal file
79
src/@ionic-native/plugins/all-in-one-sdk/index.ts
Normal file
@@ -0,0 +1,79 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, CordovaProperty, CordovaInstance, InstanceProperty, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/**
|
||||
* @name AllInOneSDK
|
||||
* @description
|
||||
* Paytm All-in-One SDK plugin for Cordova/Ionic Applications
|
||||
* Paytm All-in-One SDK provides a swift, secure and seamless payment experience to your users by invoking the Paytm app (if installed on your user’s smartphone) to complete payment for your order.
|
||||
* Paytm All-in-One SDK enables payment acceptance via Paytm wallet, Paytm Payments Bank, saved Debit/Credit cards, Net Banking, BHIM UPI and EMI as available in your customer’s Paytm account. If Paytm app is not installed on a customer's device, the transaction will be processed via web view within the All-in-One SDK.
|
||||
* For more information about Paytm All-in-One SDK, please visit https://developer.paytm.com/docs/all-in-one-sdk/hybrid-apps/cordova/
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { AllInOneSDK } from '@ionic-native/all-in-one-sdk/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private allInOneSDK: AllInOneSDK) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* For below parameters see [documentation](https://developer.paytm.com/docs/all-in-one-sdk/hybrid-apps/cordova/)
|
||||
* let paymentIntent = { mid : merchantID, orderId: orderId, txnToken: transactionToken, amount: amount, isStaging: isStaging, callbackUrl:callBackURL, restrictAppInvoke:restrictAppInvoke }
|
||||
*
|
||||
* this.allInOneSDK.startTransaction(paymentIntent)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*
|
||||
* For iOS:
|
||||
* After adding the plugin, open the iOS project, you can find the same at <projectName>/platforms/ios.
|
||||
* In case merchant don’t have callback URL, Add an entry into Info.plist LSApplicationQueriesSchemes(Array) Item 0 (String)-> paytm
|
||||
* Add a URL Scheme “paytm”+”MID”
|
||||
*
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'AllInOneSDK',
|
||||
plugin: 'cordova-paytm-allinonesdk',
|
||||
pluginRef: 'AllInOneSDK',
|
||||
repo: 'https://github.com/paytm/paytm-allinonesdk-ionic-cordova.git',
|
||||
platforms: ['Android','iOS']
|
||||
})
|
||||
export class AllInOneSDK extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* This function checks if Paytm Application is available on the device.
|
||||
* If Paytm exists then it invokes Paytm Application with the parameters sent and creates an order.
|
||||
* If the Paytm Application is not available the transaction is continued on a webView within All-in-One SDK.
|
||||
* @param options {PaymentIntentModel} These parameters are required and will be used to create an order.
|
||||
* @return {Promise<PaytmResponse>} Returns a promise that resolves when a transaction completes(both failed and successful).
|
||||
*/
|
||||
@Cordova()
|
||||
startTransaction(options : PaymentIntentModel): Promise<PaytmResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* The response that will be recieved when any transaction is completed
|
||||
*/
|
||||
export interface PaytmResponse{
|
||||
message : string;
|
||||
response : string; // A stringified response of a hashmap returned from All-in-One SDK
|
||||
}
|
||||
|
||||
/**
|
||||
* For below parameters see [documentation](https://developer.paytm.com/docs/all-in-one-sdk/hybrid-apps/cordova/)
|
||||
*/
|
||||
export interface PaymentIntentModel{
|
||||
mid : string; // Merchant ID
|
||||
orderId : string; // Order ID
|
||||
txnToken : string; // Transaction Token
|
||||
amount : string; // Amount
|
||||
isStaging: boolean; // Environment
|
||||
callbackUrl: string; // Callback URL
|
||||
restrictAppInvoke: boolean; // To enable or disable the paytm app invocation
|
||||
}
|
||||
99
src/@ionic-native/plugins/android-notch/index.ts
Normal file
99
src/@ionic-native/plugins/android-notch/index.ts
Normal file
@@ -0,0 +1,99 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Android Notch
|
||||
* @description
|
||||
* This plugin enables developers to get the cutout and android devices inset sizes
|
||||
* It is based on the cordova plugin developed by @tobspr: https://github.com/tobspr/cordova-plugin-android-notch
|
||||
* This plugin works on all android versions, but we can only detect notches starting from Android 9.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { AndroidNotch } from '@ionic-native/android-notch/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private androidNotch: AndroidNotch) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.androidNotch.hasCutout()
|
||||
* .then((px: number) => console.log('Inset size: '), px)
|
||||
* .catch((error: any) => console.log('Error: ', error))
|
||||
*
|
||||
* this.androidNotch.getInsetTop()
|
||||
* .then((px: number) => console.log('Inset size: '), px)
|
||||
* .catch((error: any) => console.log('Error: ', error))
|
||||
*
|
||||
* this.androidNotch.getInsetRight()
|
||||
* .then((px: number) => console.log('Inset size: '), px)
|
||||
* .catch((error: any) => console.log('Error: ', error))
|
||||
*
|
||||
* this.androidNotch.getInsetBottom()
|
||||
* .then((px: number) => console.log('Inset size: '), px)
|
||||
* .catch((error: any) => console.log('Error: ', error))
|
||||
*
|
||||
* this.androidNotch.getInsetLeft()
|
||||
* .then((px: number) => console.log('Inset size: '), px)
|
||||
* .catch((error: any) => console.log('Error: ', error))
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'AndroidNotch',
|
||||
plugin: 'cordova-plugin-android-notch',
|
||||
pluginRef: 'AndroidNotch',
|
||||
repo: 'https://github.com/tobspr/cordova-plugin-android-notch.git',
|
||||
platforms: ['Android'],
|
||||
})
|
||||
@Injectable()
|
||||
export class AndroidNotch extends IonicNativePlugin {
|
||||
/**
|
||||
* Returns true if the android device has cutout
|
||||
*
|
||||
* @return {Promise<boolean>}
|
||||
*/
|
||||
@Cordova()
|
||||
hasCutout(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the heigth of the top inset
|
||||
*
|
||||
* @return {Promise<number>}
|
||||
*/
|
||||
@Cordova()
|
||||
getInsetTop(): Promise<number> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the heigth of the right inset
|
||||
*
|
||||
* @return {Promise<number>}
|
||||
*/
|
||||
@Cordova()
|
||||
getInsetRight(): Promise<number> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the heigth of the bottom inset
|
||||
* @return {Promise<number>}
|
||||
*/
|
||||
@Cordova()
|
||||
getInsetBottom(): Promise<number> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the heigth of the left inset
|
||||
* @return {Promise<number>}
|
||||
*/
|
||||
@Cordova()
|
||||
getInsetLeft(): Promise<number> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
41
src/@ionic-native/plugins/app-center-low-memory/index.ts
Normal file
41
src/@ionic-native/plugins/app-center-low-memory/index.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name App Center Low Memory
|
||||
* @description
|
||||
* Generates a low memory warning.
|
||||
* For more info, please see: https://github.com/Microsoft/appcenter-sdk-cordova/tree/master/cordova-plugin-appcenter-generate-low-memory
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { LowMemory } from '@ionic-native/app-center-low-memory/ngx';
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* constructor(private lowMemory: LowMemory) { }
|
||||
*
|
||||
* async warning() {
|
||||
* await this.lowMemory.generateLowMemory();
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'LowMemory',
|
||||
plugin: 'https://github.com/Microsoft/appcenter-sdk-cordova/tree/master/cordova-plugin-appcenter-generate-low-memory',
|
||||
pluginRef: 'LowMemory',
|
||||
repo: 'https://github.com/Microsoft/appcenter-sdk-cordova/tree/master/cordova-plugin-appcenter-generate-low-memory',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class LowMemory extends IonicNativePlugin {
|
||||
/**
|
||||
* Generates a low memory warning.
|
||||
* For more info, please see: https://github.com/Microsoft/appcenter-sdk-cordova/tree/master/cordova-plugin-appcenter-generate-low-memory
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
generateLowMemory(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
62
src/@ionic-native/plugins/app-center-shared/index.ts
Normal file
62
src/@ionic-native/plugins/app-center-shared/index.ts
Normal file
@@ -0,0 +1,62 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name App Center Shared
|
||||
* @capacitorincompatible true
|
||||
* @description
|
||||
* Exposes additional shared APIs for App Center.
|
||||
*
|
||||
* For more info, please see https://docs.microsoft.com/en-us/appcenter/sdk/other-apis/cordova
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { AppCenter } from '@ionic-native/app-center-shared/ngx';
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* constructor(private appCenterShared: AppCenter) { }
|
||||
*
|
||||
* async getInstallId() {
|
||||
* const id = await this.appCenter.getInstallId();
|
||||
* }
|
||||
*
|
||||
* async setUserId() {
|
||||
* try{
|
||||
* await this.appCenter.setUserId('i-am-john');
|
||||
* } catch (e){
|
||||
* console.log(e);
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'AppCenter',
|
||||
plugin: 'cordova-plugin-appcenter-shared',
|
||||
pluginRef: 'AppCenter',
|
||||
repo: 'https://github.com/Microsoft/appcenter-sdk-cordova/tree/master/cordova-plugin-appcenter-shared',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class AppCenter extends IonicNativePlugin {
|
||||
/**
|
||||
* Returns AppCenter UUID.
|
||||
* For more info, please see: https://docs.microsoft.com/en-us/appcenter/sdk/other-apis/cordova#identify-installations
|
||||
* @returns {Promise<string>} Install ID
|
||||
*/
|
||||
@Cordova()
|
||||
getInstallId(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a user ID that's used to augment crash reports.
|
||||
* For more info, please see: https://docs.microsoft.com/en-us/appcenter/sdk/other-apis/cordova#identify-users
|
||||
* @param {string} userId Ex. "your-user-id"
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
setUserId(userId: string): Promise<void> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,50 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export enum AppRateReviewTypeIos {
|
||||
/**
|
||||
* Write review directly in your application (iOS 10.3+), limited to 3 prompts per year.
|
||||
* Will fallback to 'AppStoreReview' for other iOS versions
|
||||
*/
|
||||
InAppReview = 'InAppReview',
|
||||
/**
|
||||
* Open the store within the app. Use this option as an alternative to inAppReview to avoid the rate action from doing nothing
|
||||
*/
|
||||
AppStoreReview = 'AppStoreReview',
|
||||
/**
|
||||
* Open the store using the openUrl preference (defaults to InAppBrowser). Be advised that WKWebView might not open the app store links
|
||||
*/
|
||||
InAppBrowser = 'InAppBrowser',
|
||||
}
|
||||
|
||||
export enum AppRateReviewTypeAndroid {
|
||||
/**
|
||||
* Write review directly in your application. Will fallback to InAppBrowser if not available
|
||||
*/
|
||||
InAppReview = 'InAppReview',
|
||||
/**
|
||||
* Open the store using the openUrl preference (defaults to InAppBrowser)
|
||||
*/
|
||||
InAppBrowser = 'InAppBrowser',
|
||||
}
|
||||
|
||||
export enum AppRatePromptType {
|
||||
/**
|
||||
* Prompt asking to rate the app.
|
||||
*/
|
||||
AppRatingPrompt = 'AppRatingPrompt',
|
||||
|
||||
/**
|
||||
* Prompt asking to rate the app within the store.
|
||||
*/
|
||||
StoreRatingPrompt = 'StoreRatingPrompt',
|
||||
|
||||
/**
|
||||
* Prompt asking to give feedback.
|
||||
*/
|
||||
FeedbackPrompt = 'FeedbackPrompt',
|
||||
}
|
||||
|
||||
export interface AppRatePreferences {
|
||||
/**
|
||||
* Custom BCP 47 language tag
|
||||
@@ -22,11 +66,29 @@ export interface AppRatePreferences {
|
||||
*/
|
||||
usesUntilPrompt?: number;
|
||||
|
||||
reviewType?: {
|
||||
/**
|
||||
* the type of review display to show the user on iOS
|
||||
* Default: AppStoreReview
|
||||
*/
|
||||
ios?: AppRateReviewTypeIos;
|
||||
/**
|
||||
* the type of review display to show the user on Android
|
||||
* Default: InAppBrowser
|
||||
*/
|
||||
android?: AppRateReviewTypeAndroid;
|
||||
};
|
||||
|
||||
/**
|
||||
* Simple Mode to display the rate dialog directly and bypass negative feedback filtering flow
|
||||
*/
|
||||
simpleMode?: boolean;
|
||||
|
||||
/**
|
||||
* Disabling would skip displaying a rate dialog if in app review is set and available. Defaults to `true`
|
||||
*/
|
||||
showPromptForInAppReview?: boolean;
|
||||
|
||||
/**
|
||||
* leave app or no when application page opened in app store (now supported only for iOS). Defaults to `false`
|
||||
*/
|
||||
@@ -93,20 +155,30 @@ export interface AppRateCustomLocale {
|
||||
feedbackPromptMessage?: string;
|
||||
}
|
||||
|
||||
export interface AppRateLocales {
|
||||
addLocale(localeObject: AppRateCustomLocale): AppRateCustomLocale;
|
||||
|
||||
getLocale(language: string, applicationTitle?: string, customLocale?: AppRateCustomLocale);
|
||||
|
||||
getLocalesNames(): { [prop: string]: AppRateCustomLocale };
|
||||
}
|
||||
|
||||
export interface AppRateCallbacks {
|
||||
/**
|
||||
* call back function. called when user clicked on rate-dialog buttons
|
||||
*/
|
||||
onButtonClicked?: Function;
|
||||
onButtonClicked?: (buttonIndex: number, buttonLabel: string, promptType: AppRatePromptType) => void;
|
||||
|
||||
/**
|
||||
* call back function. called when rate-dialog showing
|
||||
*/
|
||||
onRateDialogShow?: Function;
|
||||
onRateDialogShow?: (rateCallback: (buttonIndex: number) => void) => void;
|
||||
/**
|
||||
* call back function. called when user clicked on negative feedback
|
||||
*/
|
||||
handleNegativeFeedback?: Function;
|
||||
handleNegativeFeedback?: () => void;
|
||||
|
||||
done?: () => void;
|
||||
}
|
||||
|
||||
export interface AppUrls {
|
||||
@@ -196,12 +268,38 @@ export class AppRate extends IonicNativePlugin {
|
||||
@CordovaProperty()
|
||||
preferences: AppRatePreferences;
|
||||
|
||||
/**
|
||||
* Manager custom locales
|
||||
*/
|
||||
@CordovaProperty()
|
||||
locales: AppRateLocales;
|
||||
|
||||
/**
|
||||
* Set preferences
|
||||
* @return void
|
||||
*/
|
||||
@Cordova()
|
||||
setPreferences(pref: AppRatePreferences): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get preferences
|
||||
* @return AppRatePreferences
|
||||
*/
|
||||
@Cordova()
|
||||
getPreferences(): AppRatePreferences {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prompts the user for rating
|
||||
* @param {boolean} immediately Show the rating prompt immediately.
|
||||
*/
|
||||
@Cordova()
|
||||
promptForRating(immediately: boolean): void {}
|
||||
promptForRating(immediately?: boolean): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Immediately send the user to the app store rating page
|
||||
|
||||
@@ -33,7 +33,6 @@ export interface WatchExistData {
|
||||
|
||||
/**
|
||||
* @name Apple Wallet
|
||||
* @premier apple-payment-pass
|
||||
* @description
|
||||
* A Cordova plugin that enables users from Add Payment Cards to their Apple Wallet.
|
||||
*
|
||||
|
||||
@@ -31,6 +31,11 @@ export interface AppsflyerOptions {
|
||||
* 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;
|
||||
|
||||
/**
|
||||
* time for the sdk to wait before launch - IOS 14 ONLY!
|
||||
*/
|
||||
waitForATTUserAuthorization?: number;
|
||||
}
|
||||
|
||||
export interface AppsflyerEvent {
|
||||
@@ -94,8 +99,8 @@ export class Appsflyer extends IonicNativePlugin {
|
||||
* @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 {}
|
||||
@Cordova()
|
||||
logEvent(eventName: string, eventValues: AppsflyerEvent): void {}
|
||||
|
||||
/**
|
||||
* Setting your own Custom ID enables you to cross-reference your own unique ID with AppsFlyer’s 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.
|
||||
@@ -109,7 +114,7 @@ export class Appsflyer extends IonicNativePlugin {
|
||||
* @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 {}
|
||||
Stop(isStopTracking: boolean): void {}
|
||||
|
||||
/**
|
||||
* Get the data from Attribution
|
||||
@@ -120,7 +125,9 @@ export class Appsflyer extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* Enables app uninstall tracking
|
||||
* @param {string} token GCM/FCM ProjectNumber
|
||||
* @returns {Promise<any>}
|
||||
@@ -157,7 +164,7 @@ export class Appsflyer extends IonicNativePlugin {
|
||||
* @param {boolean} disable Set to true to opt-out user from tracking
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
deviceTrackingDisabled(disable: boolean): void {}
|
||||
anonymizeUser(disable: boolean): void {}
|
||||
|
||||
/**
|
||||
* Set AppsFlyer’s 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.
|
||||
@@ -182,7 +189,7 @@ export class Appsflyer extends IonicNativePlugin {
|
||||
* @param {string} campaign Promoted Campaign
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
trackCrossPromotionImpression(appId: string, campaign: string): void {}
|
||||
logCrossPromotionImpression(appId: string, campaign: string): void {}
|
||||
|
||||
/**
|
||||
* Use this call to track the click and launch the app store's app page (via Browser)
|
||||
@@ -191,5 +198,5 @@ export class Appsflyer extends IonicNativePlugin {
|
||||
* @param {Object} options Additional Parameters to track
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
trackAndOpenStore(appId: string, campaign: string, options: Object): void {}
|
||||
logCrossPromotionAndOpenStore(appId: string, campaign: string, options: Object): void {}
|
||||
}
|
||||
|
||||
112
src/@ionic-native/plugins/background-upload/index.ts
Normal file
112
src/@ionic-native/plugins/background-upload/index.ts
Normal file
@@ -0,0 +1,112 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, CordovaInstance, IonicNativePlugin, } from '@ionic-native/core';
|
||||
|
||||
declare const window: any;
|
||||
|
||||
export enum UploadState {
|
||||
UPLOADED = 'UPLOADED',
|
||||
FAILED = 'FAILED',
|
||||
UPLOADING = 'UPLOADING',
|
||||
}
|
||||
|
||||
export type UploadStateType = keyof typeof UploadState;
|
||||
|
||||
export interface UploadEvent{
|
||||
id?: string, // id of the upload
|
||||
state?: UploadStateType, // state of the upload (either UPLOADING, UPLOADED or FAILED)
|
||||
statusCode?: number, // response code returned by server after upload is completed
|
||||
serverResponse?: any, // server response received after upload is completed
|
||||
error?: any, // error message in case of failure
|
||||
errorCode?: number, // error code for any exception encountered
|
||||
progress?: any, // progress for ongoing upload
|
||||
eventId?: string // id of the event
|
||||
}
|
||||
|
||||
export interface FTMPayloadOptions {
|
||||
id: string,
|
||||
filePath: string,
|
||||
fileKey?: string,
|
||||
serverUrl: string,
|
||||
notificationTitle?: string,
|
||||
headers?: {
|
||||
[name: string]: string
|
||||
},
|
||||
parameters?: {
|
||||
[name: string]: string
|
||||
}
|
||||
[prop: string]: any;
|
||||
}
|
||||
|
||||
export interface FTMOptions {
|
||||
callBack: (event: UploadEvent) => any;
|
||||
config?: {
|
||||
parallelUploadsLimit?: number;
|
||||
}
|
||||
}
|
||||
|
||||
export class FileTransferManager {
|
||||
private _objectInstance: any;
|
||||
|
||||
constructor(options: FTMOptions ) {
|
||||
this._objectInstance = window.FileTransferManager.init(options.config, options.callBack);
|
||||
}
|
||||
|
||||
@CordovaInstance()
|
||||
startUpload(payload: FTMPayloadOptions): void {
|
||||
return;
|
||||
}
|
||||
|
||||
@CordovaInstance()
|
||||
removeUpload(id: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@CordovaInstance()
|
||||
acknowledgeEvent(id: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@CordovaInstance()
|
||||
destroy(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @name BackgroundUpload
|
||||
* @description
|
||||
* This plugin does something
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { BackgroundUpload } from '@ionic-native/background-upload/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private backgroundUpload: BackgroundUpload) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.backgroundUpload.init({})
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'BackgroundUpload',
|
||||
plugin: 'cordova-plugin-background-upload',
|
||||
pluginRef: 'FileTransferManager',
|
||||
repo: 'https://github.com/spoonconsulting/cordova-plugin-background-upload',
|
||||
install: 'ionic cordova plugin add cordova-plugin-background-upload',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class BackgroundUpload extends IonicNativePlugin {
|
||||
FileTransferManager = FileTransferManager;
|
||||
|
||||
init(options: FTMOptions): FileTransferManager {
|
||||
return new FileTransferManager(options)
|
||||
}
|
||||
}
|
||||
@@ -2646,6 +2646,35 @@ export interface UsdlCombinedRecognizer extends Recognizer<UsdlCombinedRecognize
|
||||
}
|
||||
export interface UsdlCombinedRecognizerCtor extends RecognizerCtor<UsdlCombinedRecognizer> {}
|
||||
|
||||
export interface BlinkIdRecognizerCtor extends RecognizerCtor<BlinkIdRecognizer> {}
|
||||
|
||||
export interface BlinkIdRecognizer extends Recognizer<BlinkIdRecognizerResult> {
|
||||
returnFaceImage: boolean;
|
||||
returnFullDocumentImage: boolean;
|
||||
anonymizationMode: number;
|
||||
}
|
||||
|
||||
export interface BlinkIdRecognizerResult extends RecognizerResult {
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
fullName: string;
|
||||
localizedName: string;
|
||||
additionalNameInformation: string;
|
||||
placeOfBirth: string;
|
||||
documentNumber: string;
|
||||
dateOfBirth: Date;
|
||||
sex: string;
|
||||
nationality: string;
|
||||
fullDocumentImage: string;
|
||||
mrzResult: MrzResult;
|
||||
}
|
||||
|
||||
export interface BlinkIdOverlaySettingsCtor {
|
||||
new (): BlinkIdOverlaySettings;
|
||||
}
|
||||
export interface BlinkIdOverlaySettings extends OverlaySettings {}
|
||||
|
||||
export interface BlinkIdRecognizerResultCtor extends RecognizerResultCtor<BlinkIdRecognizerResult> {}
|
||||
/**
|
||||
* @name BlinkId
|
||||
* @description
|
||||
@@ -2922,4 +2951,7 @@ export class BlinkId extends IonicNativePlugin {
|
||||
@CordovaProperty() UsdlRecognizer: UsdlRecognizerCtor;
|
||||
@CordovaProperty() UsdlCombinedRecognizerResult: UsdlCombinedRecognizerResultCtor;
|
||||
@CordovaProperty() UsdlCombinedRecognizer: UsdlCombinedRecognizerCtor;
|
||||
@CordovaProperty() BlinkIdRecognizer: BlinkIdRecognizerCtor;
|
||||
@CordovaProperty() BlinkIdOverlaySettings: BlinkIdOverlaySettingsCtor;
|
||||
@CordovaProperty() BlinkIdRecognizerResult: BlinkIdRecognizerResultCtor;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,8 @@ export type Status =
|
||||
| 'advertisingStarted'
|
||||
| 'advertisingStopped'
|
||||
| 'responded'
|
||||
| 'notified';
|
||||
| 'notified'
|
||||
| 'notificationSent';
|
||||
|
||||
/** Available connection priorities */
|
||||
export type ConnectionPriority = 'low' | 'balanced' | 'high';
|
||||
@@ -88,6 +89,8 @@ export interface NotifyParams {
|
||||
characteristic: string;
|
||||
/** Base64 encoded string, number or string */
|
||||
value: string;
|
||||
/** Android only: address of the device the notification should be sent to. */
|
||||
address?: string;
|
||||
}
|
||||
|
||||
export interface RespondParams {
|
||||
@@ -99,6 +102,38 @@ export interface RespondParams {
|
||||
offset?: number;
|
||||
}
|
||||
|
||||
export interface ConnectionParams {
|
||||
/** The address/identifier provided by the scan's return object */
|
||||
address: string;
|
||||
/** Automatically connect as soon as the remote device becomes available (Android) */
|
||||
autoConnect?: boolean;
|
||||
/**
|
||||
* Transport mode. Available from API 23 (Android).
|
||||
* If none is specified the default behavior is TRANSPORT_AUTO
|
||||
*
|
||||
* Note: On Android 10, TRANSPORT_AUTO can lead to connection errors with Status code 133.
|
||||
* In this case TRANSPORT_LE can be used.
|
||||
*/
|
||||
transport?: AndroidGattTransportMode;
|
||||
}
|
||||
|
||||
export enum AndroidGattTransportMode {
|
||||
/**
|
||||
* No preference of physical transport for GATT connections to remote dual-mode devices
|
||||
*/
|
||||
TRANSPORT_AUTO = 0,
|
||||
|
||||
/**
|
||||
* Prefer BR/EDR transport for GATT connections to remote dual-mode devices
|
||||
*/
|
||||
TRANSPORT_BREDR = 1,
|
||||
|
||||
/**
|
||||
* Prefer LE transport for GATT connections to remote dual-mode devices
|
||||
*/
|
||||
TRANSPORT_LE = 2,
|
||||
}
|
||||
|
||||
export interface CharacteristicParams extends Params {
|
||||
/** An array of characteristic IDs to discover or empty array / null */
|
||||
characteristics?: string[];
|
||||
@@ -543,15 +578,15 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
* Connect to a Bluetooth LE device
|
||||
* @param connectSuccess The success callback that is passed with device object
|
||||
* @param connectError The callback that will be triggered when the connect operation fails
|
||||
* @param params The address/identifier
|
||||
* @param params The connection params
|
||||
*
|
||||
* @param {{address: string, autoConnect: boolean}} params
|
||||
* @param {ConnectionParams} params
|
||||
* @returns {(Observable<{ status: DeviceInfo }>)}
|
||||
* success: device object with status
|
||||
* error: The callback that will be triggered when the unbond operation fails
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse', observable: true })
|
||||
connect(params: { address: string; autoConnect?: boolean }): Observable<DeviceInfo> {
|
||||
connect(params: ConnectionParams): Observable<DeviceInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -149,9 +149,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
createNotification(
|
||||
extras: any
|
||||
): Promise<any> {
|
||||
createNotification(extras: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -662,42 +660,6 @@ export class CleverTap extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/****************************
|
||||
* Notification Inbox methods
|
||||
****************************/
|
||||
/**
|
||||
* Call this method to initialize the App Inbox
|
||||
*/
|
||||
@Cordova()
|
||||
initializeInbox(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this method to get the count of unread Inbox messages
|
||||
*/
|
||||
@Cordova()
|
||||
getInboxMessageUnreadCount(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this method to get the count of total Inbox messages
|
||||
*/
|
||||
@Cordova()
|
||||
getInboxMessageCount(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this method to open the App Inbox
|
||||
* @param styleConfig : any or empty object
|
||||
*/
|
||||
@Cordova()
|
||||
showInbox(styleConfig: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Fetch all Inbox Messages
|
||||
* @returns {Promise<any>}
|
||||
@@ -896,7 +858,6 @@ export class CleverTap extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Call this to Get Boolean Variable
|
||||
* @param varName {string}
|
||||
@@ -904,10 +865,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getBooleanVariable(
|
||||
varName: string,
|
||||
defaultValue: boolean
|
||||
): Promise<any> {
|
||||
getBooleanVariable(varName: string, defaultValue: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -918,10 +876,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getDoubleVariable(
|
||||
varName: string,
|
||||
defaultValue: number
|
||||
): Promise<any> {
|
||||
getDoubleVariable(varName: string, defaultValue: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -932,10 +887,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getIntegerVariable(
|
||||
varName: string,
|
||||
defaultValue: number
|
||||
): Promise<any> {
|
||||
getIntegerVariable(varName: string, defaultValue: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -946,10 +898,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getStringVariable(
|
||||
varName: string,
|
||||
defaultValue: string
|
||||
): Promise<any> {
|
||||
getStringVariable(varName: string, defaultValue: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -960,10 +909,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getListOfBooleanVariable(
|
||||
varName: string,
|
||||
defaultValue: any
|
||||
): Promise<any> {
|
||||
getListOfBooleanVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -974,10 +920,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getListOfDoubleVariable(
|
||||
varName: string,
|
||||
defaultValue: any
|
||||
): Promise<any> {
|
||||
getListOfDoubleVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -988,10 +931,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getListOfIntegerVariable(
|
||||
varName: string,
|
||||
defaultValue: any
|
||||
): Promise<any> {
|
||||
getListOfIntegerVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1002,10 +942,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getListOfStringVariable(
|
||||
varName: string,
|
||||
defaultValue: any
|
||||
): Promise<any> {
|
||||
getListOfStringVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1016,10 +953,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getMapOfBooleanVariable(
|
||||
varName: string,
|
||||
defaultValue: any
|
||||
): Promise<any> {
|
||||
getMapOfBooleanVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1030,10 +964,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getMapOfDoubleVariable(
|
||||
varName: string,
|
||||
defaultValue: any
|
||||
): Promise<any> {
|
||||
getMapOfDoubleVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1044,10 +975,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getMapOfIntegerVariable(
|
||||
varName: string,
|
||||
defaultValue: any
|
||||
): Promise<any> {
|
||||
getMapOfIntegerVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1058,10 +986,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getMapOfStringVariable(
|
||||
varName: string,
|
||||
defaultValue: any
|
||||
): Promise<any> {
|
||||
getMapOfStringVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1111,10 +1036,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getFeatureFlag(
|
||||
key: string,
|
||||
defaultValue: string
|
||||
): Promise<any> {
|
||||
getFeatureFlag(key: string, defaultValue: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1124,9 +1046,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setDefaultsMap(
|
||||
defaults: any
|
||||
): Promise<any> {
|
||||
setDefaultsMap(defaults: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
306
src/@ionic-native/plugins/custom-uisdk/index.ts
Executable file
306
src/@ionic-native/plugins/custom-uisdk/index.ts
Executable file
@@ -0,0 +1,306 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
Plugin,
|
||||
Cordova,
|
||||
CordovaProperty,
|
||||
CordovaInstance,
|
||||
InstanceProperty,
|
||||
IonicNativePlugin,
|
||||
} from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name CustomUISDK
|
||||
* @description
|
||||
* This plugin is used to access Paytm's native CustomUISDK framework's apis.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { CustomUISDK } from '@ionic-native/custom-uisdk/ngx';
|
||||
*
|
||||
* constructor(private customuisdk: CustomUISDK) { }
|
||||
*
|
||||
* ...
|
||||
* this.customuisdk.functionName('Hello', 123)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'cordova-paytm-customuisdk',
|
||||
plugin: 'cordova-paytm-customuisdk',
|
||||
pluginRef: 'paytm.customuisdk',
|
||||
repo: 'https://github.com/paytm/paytm-customuisdk-cordova',
|
||||
install: '',
|
||||
installVariables: [],
|
||||
platforms: ['Android, iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class CustomUISDK extends IonicNativePlugin {
|
||||
/**
|
||||
* This function show dialog to ask user permision to fetch authcode
|
||||
* @param clientId {string} unique id give to each merchant
|
||||
* @param mid {string} merchant id
|
||||
* @return {Promise<string>} Returns authcode
|
||||
*/
|
||||
@Cordova()
|
||||
fetchAuthCode(clientId: string, mid: string): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function check that paytm app is installed or not
|
||||
* @return {Promise<boolean>} Returns installed - true or not -false
|
||||
*/
|
||||
@Cordova()
|
||||
isPaytmAppInstalled(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mid {string} merchant id
|
||||
* @return {Promise<boolean>} Returns if has payment methods - true or not -false
|
||||
*/
|
||||
@Cordova()
|
||||
checkHasInstrument(mid: string): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mid {string} merchant id
|
||||
* @param orderId {string} order id
|
||||
* @param txnToken {string} transaction token
|
||||
* @param amount {string} transaction amount
|
||||
* @param isStaging {boolean} staging or production
|
||||
* @param callbackUrl {string} callback url only required for custom url page
|
||||
*/
|
||||
@Cordova()
|
||||
initPaytmSDK(
|
||||
mid: string,
|
||||
orderId: string,
|
||||
txnToken: string,
|
||||
amount: string,
|
||||
isStaging: boolean,
|
||||
callbackUrl: string
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param paymentFlow {string} payment type NONE, ADDANDPAY
|
||||
* @return {Promise<any>} Returns object of response
|
||||
*/
|
||||
@Cordova()
|
||||
goForWalletTransaction(paymentFlow: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cardNumber {string} card number
|
||||
* @param cardExpiry {string} card expiry
|
||||
* @param cardCvv {string} card cvv
|
||||
* @param cardType {string} card type debit or credit
|
||||
* @param paymentFlow {string} payment type NONE, ADDANDPAY
|
||||
* @param channelCode {string} bank channel code
|
||||
* @param issuingBankCode {string} issuing bank code
|
||||
* @param emiChannelId {string} emi plan id
|
||||
* @param authMode {string} authentication mode 'otp' 'pin'
|
||||
* @param saveCard {boolean} save card for next time
|
||||
* @return {Promise<any>} Returns object of response
|
||||
*/
|
||||
@Cordova()
|
||||
goForNewCardTransaction(
|
||||
cardNumber: string,
|
||||
cardExpiry: string,
|
||||
cardCvv: string,
|
||||
cardType: string,
|
||||
paymentFlow: string,
|
||||
channelCode: string,
|
||||
issuingBankCode: string,
|
||||
emiChannelId: string,
|
||||
authMode: string,
|
||||
saveCard: boolean
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cardId {string} card id of saved card
|
||||
* @param cardCvv {string} card cvv
|
||||
* @param cardType {string} card type debit or credit
|
||||
* @param paymentFlow {string} payment type NONE, ADDANDPAY
|
||||
* @param channelCode {string} bank channel code
|
||||
* @param issuingBankCode {string} issuing bank code
|
||||
* @param emiChannelId {string} emi plan id
|
||||
* @param authMode {string} authentication mode 'otp' 'pin'
|
||||
* @return {Promise<any>} Returns object of response
|
||||
*/
|
||||
@Cordova()
|
||||
goForSavedCardTransaction(
|
||||
cardId: string,
|
||||
cardCvv: string,
|
||||
cardType: string,
|
||||
paymentFlow: string,
|
||||
channelCode: string,
|
||||
issuingBankCode: string,
|
||||
emiChannelId: string,
|
||||
authMode: string
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param netBankingCode {string} bank channel code
|
||||
* @param paymentFlow {string} payment type NONE, ADDANDPAY
|
||||
* @return {Promise<any>} Returns object of response
|
||||
*/
|
||||
@Cordova()
|
||||
goForNetBankingTransaction(netBankingCode: string, paymentFlow: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param upiCode {string} upi code
|
||||
* @param paymentFlow {string} payment type NONE, ADDANDPAY
|
||||
* @param saveVPA {boolean} save vpa for future transaction
|
||||
* @return {Promise<any>} Returns object of response
|
||||
*/
|
||||
@Cordova()
|
||||
goForUpiCollectTransaction(upiCode: string, paymentFlow: string, saveVPA: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {Promise<any>} Returns upi app list names
|
||||
*/
|
||||
@Cordova()
|
||||
getUpiIntentList(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param appName {string} upi app name
|
||||
* @param paymentFlow {string} payment type NONE, ADDANDPAY
|
||||
* @return {Promise<any>} Returns object of response
|
||||
*/
|
||||
@Cordova()
|
||||
goForUpiIntentTransaction(appName: string, paymentFlow: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param vpaName {string} vpa name
|
||||
* @param paymentFlow {string} payment type NONE, ADDANDPAY
|
||||
* @param bankAccountJson {{}} bank account json object
|
||||
* @param merchantDetailsJson {{}} merchant detail json
|
||||
* @return {Promise<any>} Returns object of response
|
||||
*/
|
||||
@Cordova()
|
||||
goForUpiPushTransaction(
|
||||
paymentFlow: string,
|
||||
bankAccountJson: {},
|
||||
vpaName: string,
|
||||
merchantDetailsJson: {}
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param vpaName {string} vpa name
|
||||
* @param bankAccountJson {{}} bank account json object
|
||||
* @return {Promise<any>} Returns object of response
|
||||
*/
|
||||
@Cordova()
|
||||
fetchUpiBalance(bankAccountJson: {}, vpaName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param vpaName {string} vpa name
|
||||
* @param bankAccountJson {{}} bank account json object
|
||||
* @return {Promise<any>} Returns object of response
|
||||
*/
|
||||
@Cordova()
|
||||
setUpiMpin(bankAccountJson: {}, vpaName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cardSixDigit {string} card starting six digit
|
||||
* @param tokenType {string} token type ACCESS or TXN_TOKEN
|
||||
* @param token {string} token fetch from api
|
||||
* @param mid {string} merchant id
|
||||
* @param referenceId {string} reference id
|
||||
* @return {Promise<any>} Returns object of response
|
||||
*/
|
||||
@Cordova()
|
||||
getBin(cardSixDigit: string, tokenType: string, token: string, mid: string, referenceId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param tokenType {string} token type ACCESS or TXN_TOKEN
|
||||
* @param token {string} token fetch from api
|
||||
* @param mid {string} merchant id
|
||||
* @param orderId {string} order id required only if token type is TXN_TOKEN
|
||||
* @param referenceId {string} reference id required only if token type is ACCESS
|
||||
* @return {Promise<any>} Returns object of response
|
||||
*/
|
||||
@Cordova()
|
||||
fetchNBList(tokenType: string, token: string, mid: string, orderId: string, referenceId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param channelCode {string} bank channel code
|
||||
* @param cardType {string} card type debit or credit
|
||||
* @return {Promise<any>} Returns object of response
|
||||
*/
|
||||
@Cordova()
|
||||
fetchEmiDetails(channelCode: string, cardType: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {Promise<any>} Returns last successfully used net backing code
|
||||
*/
|
||||
|
||||
@Cordova()
|
||||
getLastNBSavedBank(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {Promise<any>} Returns last successfully used vpa code
|
||||
*/
|
||||
|
||||
@Cordova()
|
||||
getLastSavedVPA(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param clientId {string} unique id give to each merchant
|
||||
* @param authCode {string} fetched auth code
|
||||
* @return {Promise<any>} Returns last successfully used vpa code
|
||||
*/
|
||||
@Cordova()
|
||||
isAuthCodeValid(clientId: string, authCode: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {Promise<any>} Returns current environment
|
||||
*/
|
||||
@Cordova()
|
||||
getEnvironment(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param environment {string} setting environment PRODUCTION or STAGING
|
||||
*/
|
||||
@Cordova()
|
||||
setEnvironment(environment: string): void {
|
||||
return;
|
||||
}
|
||||
}
|
||||
66
src/@ionic-native/plugins/dfu-update/index.ts
Normal file
66
src/@ionic-native/plugins/dfu-update/index.ts
Normal file
@@ -0,0 +1,66 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
export interface UpdateOptions {
|
||||
/**
|
||||
* A string that contains the identifier for the Bluetooth LE device to update. It will either be a MAC address (on Android) or a UUID (on iOS).
|
||||
*/
|
||||
deviceId: string;
|
||||
|
||||
/**
|
||||
* A string that is the path to the file to use in the update. It can be either in either `cdvfile://` or `file://` format.
|
||||
*/
|
||||
fileUrl: string;
|
||||
|
||||
/**
|
||||
* The PacketReceiptNotificationsValue (Default to 10)
|
||||
*/
|
||||
packetReceiptNotificationsValue?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Dfu Update
|
||||
* @description
|
||||
* This plugin is a Wrapper to use Nordic Semiconductor's Device Firmware Update (DFU) service to update a Bluetooth LE device.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { DfuUpdate } from '@ionic-native/dfu-update/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private dfuUpdate: DfuUpdate) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.dfuUpdate.updateFirmware('fileURL', 'deviceIdentifier')
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'DfuUpdate',
|
||||
plugin: 'cordova-plugin-dfu-update',
|
||||
pluginRef: 'window.DfuUpdate',
|
||||
repo: 'https://github.com/EinfachHans/cordova-plugin-dfu-update',
|
||||
install: 'ionic cordova plugin add cordova-plugin-dfu-update --variable ANDROID_NORDIC_VERSION="1.11.0"',
|
||||
installVariables: ['ANDROID_NORDIC_VERSION'],
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class DfuUpdate extends IonicNativePlugin {
|
||||
/**
|
||||
* Start the Firmware-Update-Process
|
||||
* @param options - Options for the process
|
||||
* @return {Observable<any>} Returns a Observable that emits when something happens
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
callbackOrder: 'reverse',
|
||||
})
|
||||
updateFirmware(options: UpdateOptions): Observable<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -94,8 +94,8 @@ export class Diagnostic extends IonicNativePlugin {
|
||||
* Location accuracy authorization
|
||||
*/
|
||||
locationAccuracyAuthorization: {
|
||||
FULL: 'full';
|
||||
REDUCED: 'reduced';
|
||||
FULL: 'full',
|
||||
REDUCED: 'reduced',
|
||||
};
|
||||
|
||||
permissionGroups = {
|
||||
|
||||
@@ -24,7 +24,7 @@ export interface FacebookLoginResponse {
|
||||
* @description
|
||||
* Use the Facebook Connect plugin to obtain access to the native FB application on iOS and Android.
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-facebook4`. For more info, please see the [Facebook Connect](https://github.com/jeduan/cordova-plugin-facebook4).
|
||||
* Requires Cordova plugin: `cordova-plugin-facebook-connect`. For more info, please see the [Facebook Connect](https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect).
|
||||
*
|
||||
* #### Installation
|
||||
*
|
||||
@@ -39,7 +39,7 @@ export interface FacebookLoginResponse {
|
||||
* Then type in the following command in your Terminal, where APP_ID and APP_NAME are the values from the Facebook Developer portal.
|
||||
*
|
||||
* ```bash
|
||||
* ionic cordova plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="myApplication"
|
||||
* ionic cordova plugin add cordova-plugin-facebook-connect --variable APP_ID="123456789" --variable APP_NAME="myApplication"
|
||||
* ```
|
||||
*
|
||||
* After, you'll need to add the native platforms you'll be using to your app in the Facebook Developer portal under your app's Settings:
|
||||
@@ -107,11 +107,11 @@ export interface FacebookLoginResponse {
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Facebook',
|
||||
plugin: 'cordova-plugin-facebook4',
|
||||
plugin: 'cordova-plugin-facebook-connect',
|
||||
pluginRef: 'facebookConnectPlugin',
|
||||
repo: 'https://github.com/jeduan/cordova-plugin-facebook4',
|
||||
repo: 'https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect',
|
||||
install:
|
||||
'ionic cordova plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="myApplication"',
|
||||
'ionic cordova plugin add cordova-plugin-facebook-connect --variable APP_ID="123456789" --variable APP_NAME="myApplication"',
|
||||
installVariables: ['APP_ID', 'APP_NAME'],
|
||||
platforms: ['Android', 'iOS', 'Browser'],
|
||||
})
|
||||
@@ -243,7 +243,7 @@ export class Facebook extends IonicNativePlugin {
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* For more options see the [Cordova plugin docs](https://github.com/jeduan/cordova-plugin-facebook4#show-a-dialog) and the [Facebook docs](https://developers.facebook.com/docs/javascript/reference/FB.ui)
|
||||
* For more options see the [Cordova plugin docs](https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect#show-a-dialog) and the [Facebook docs](https://developers.facebook.com/docs/javascript/reference/FB.ui)
|
||||
* @param {Object} options The dialog options
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with success data, or rejects with an error
|
||||
*/
|
||||
@@ -263,10 +263,11 @@ export class Facebook extends IonicNativePlugin {
|
||||
*
|
||||
* @param {string} requestPath Graph API endpoint you want to call
|
||||
* @param {string[]} permissions List of [permissions](https://developers.facebook.com/docs/facebook-login/permissions) for this request.
|
||||
* @param {string} httpMethod HTTP method for the request, one of "GET", "POST", or "DELETE" (default is "GET")
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the result of the request, or rejects with an error
|
||||
*/
|
||||
@Cordova()
|
||||
api(requestPath: string, permissions: string[]): Promise<any> {
|
||||
api(requestPath: string, permissions: string[], httpMethod?: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -286,15 +287,29 @@ export class Facebook extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable or disable the auto log app event feature - https://developers.facebook.com/docs/app-events/gdpr-compliance/
|
||||
*
|
||||
* @param {boolean} enabled value to be set
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
})
|
||||
setAutoLogAppEventsEnabled(enabled: boolean): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Log a purchase. For more information see the Events section above.
|
||||
*
|
||||
* @param {number} value Value of the purchase.
|
||||
* @param {string} currency The currency, as an [ISO 4217 currency code](http://en.wikipedia.org/wiki/ISO_4217)
|
||||
* @param {Object} params An object containing extra data to log with the event
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
logPurchase(value: number, currency: string): Promise<any> {
|
||||
logPurchase(value: number, currency: string, params?: Object): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -105,11 +105,7 @@ export interface FileTransferError {
|
||||
*
|
||||
* @description
|
||||
* This plugin allows you to upload and download files.
|
||||
*
|
||||
* @deprecated
|
||||
* This plugin has been deprecated in favor of XHR2
|
||||
* https://cordova.apache.org/blog/2017/10/18/from-filetransfer-to-xhr2.html
|
||||
*
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { FileTransfer, FileUploadOptions, FileTransferObject } from '@ionic-native/file-transfer/ngx';
|
||||
|
||||
@@ -39,6 +39,19 @@ export interface FingerprintOptions {
|
||||
disableBackup?: boolean;
|
||||
}
|
||||
|
||||
export interface FingerprintSecretOptions extends FingerprintOptions {
|
||||
/**
|
||||
* String secret to encrypt and save, use simple strings matching the regex [a-zA-Z0-9\-]+
|
||||
*/
|
||||
secret: string;
|
||||
|
||||
/**
|
||||
* If `true` secret will be deleted when biometry items are deleted or enrolled
|
||||
* @default false
|
||||
*/
|
||||
invalidateOnEnrollment?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Fingerprint AIO
|
||||
* @description
|
||||
@@ -68,9 +81,30 @@ export interface FingerprintOptions {
|
||||
* .then((result: any) => console.log(result))
|
||||
* .catch((error: any) => console.log(error));
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.faio.registerBiometricSecret({
|
||||
* description: "Some biometric description", // optional | Default: null
|
||||
* secret: "my-super-secret", // mandatory
|
||||
* invalidateOnEnrollment: true, // optional | Default: false
|
||||
* disableBackup: true, // (Android Only) | optional | always `true` on Android
|
||||
* })
|
||||
* .then((result: any) => console.log(result))
|
||||
* .catch((error: any) => console.log(error));
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.faio.loadBiometricSecret({
|
||||
* description: "Some biometric description", // optional | Default: null
|
||||
* disableBackup: true, // always disabled on Android
|
||||
* })
|
||||
* .then((result: string) => console.log(result))
|
||||
* .catch((error: any) => console.log(error));
|
||||
*
|
||||
* ```
|
||||
* @interfaces
|
||||
* FingerprintOptions
|
||||
* FingerprintSecretOptions
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'FingerprintAIO',
|
||||
@@ -146,6 +180,11 @@ export class FingerprintAIO extends IonicNativePlugin {
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_LOCKED_OUT_PERMANENT = -112;
|
||||
/**
|
||||
* Convenience constant
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_SECRET_NOT_FOUND = -113;
|
||||
|
||||
/**
|
||||
* Check if fingerprint authentication is available
|
||||
@@ -156,6 +195,26 @@ export class FingerprintAIO extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show authentication dialogue and register secret
|
||||
* @param {FingerprintSecretOptions} options Options for platform specific fingerprint API
|
||||
* @return {Promise<any>} Returns a promise that resolves when authentication was successful
|
||||
*/
|
||||
@Cordova()
|
||||
registerBiometricSecret(options: FingerprintSecretOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show authentication dialogue and load secret
|
||||
* @param {FingerprintOptions} options Options for platform specific fingerprint API
|
||||
* @return {Promise<any>} Returns a promise that resolves when authentication was successful
|
||||
*/
|
||||
@Cordova()
|
||||
loadBiometricSecret(options: FingerprintOptions): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show authentication dialogue
|
||||
* @param {FingerprintOptions} options Options for platform specific fingerprint API
|
||||
|
||||
@@ -11,6 +11,22 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
*
|
||||
* NOTE: on iOS in order to collect demographic, age, gender data etc. you should additionally include AdSupport.framework into your project.
|
||||
*
|
||||
* ## Using capacitor?
|
||||
* For Android you'll have to add in __android/app/src/main/AndroidManfiest.xml__ under `<application>`
|
||||
* ```
|
||||
* <meta-data
|
||||
* tools:replace="android:value"
|
||||
* android:name="firebase_analytics_collection_enabled"
|
||||
* android:value="true"/>
|
||||
*
|
||||
* <meta-data
|
||||
* tools:replace="android:value"
|
||||
* android:name="google_analytics_automatic_screen_reporting_enabled"
|
||||
* android:value="false"/>
|
||||
* ```
|
||||
*
|
||||
* And in the same file, you'll have to add `xmlns:tools="http://schemas.android.com/tools"` to your _manifest_ tag.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { FirebaseAnalytics } from '@ionic-native/firebase-analytics/ngx';
|
||||
|
||||
@@ -126,6 +126,16 @@ export class FirebaseAuthentication extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Uses Apples's idToken and rawNonce (optional) to sign-in into firebase account. In order to retrieve those tokens follow instructions for Android and iOS
|
||||
* @param idToken ID Token
|
||||
* @param rawNonce Access Token
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
signInWithApple(identityToken: string, rawNonce?: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Uses Facebook's accessToken to sign-in into firebase account. In order to retrieve those tokens follow instructions for Android and iOS.
|
||||
* @param accessToken Access Token
|
||||
|
||||
@@ -97,6 +97,17 @@ export interface ILinkOptions {
|
||||
})
|
||||
@Injectable()
|
||||
export class FirebaseDynamicLinks extends IonicNativePlugin {
|
||||
/**
|
||||
* Determines if the app has a pending dynamic link and provides access to the dynamic link parameters.
|
||||
* @return {Promise<IDynamicLink>} Returns a promise
|
||||
*/
|
||||
@Cordova({
|
||||
otherPromise: true,
|
||||
})
|
||||
getDynamicLink(): Promise<IDynamicLink> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers callback that is triggered on each dynamic link click.
|
||||
* @return {Observable<IDynamicLink>} Returns an observable
|
||||
|
||||
@@ -183,7 +183,7 @@ export class FirebaseMessaging extends IonicNativePlugin {
|
||||
* @returns {Promise<null>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
revokeToken(): Promise<null> {
|
||||
deleteToken(): Promise<null> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,40 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
export interface Text {
|
||||
text: string;
|
||||
blocks: TextLine[];
|
||||
imageHeight: number;
|
||||
imageWidth: number;
|
||||
}
|
||||
|
||||
export interface TextLine extends TextBlock {
|
||||
lines: TextElement[]
|
||||
}
|
||||
|
||||
export interface TextElement extends TextBlock {
|
||||
elements: TextBlock[]
|
||||
}
|
||||
|
||||
export interface TextBlock {
|
||||
text: string;
|
||||
cornerPoints: TextPoint[]
|
||||
frame: TextFrame
|
||||
recognizedLanguages: string
|
||||
}
|
||||
|
||||
export interface TextPoint {
|
||||
x: number,
|
||||
y: number
|
||||
}
|
||||
|
||||
export interface TextFrame {
|
||||
x: number,
|
||||
y: number,
|
||||
width: number,
|
||||
height: number
|
||||
}
|
||||
|
||||
export enum BarcodeFormat {
|
||||
UNKNOWN = -1,
|
||||
ALL_FORMATS = 0,
|
||||
@@ -96,6 +130,8 @@ export interface Barcode {
|
||||
rawValue: string
|
||||
displayValue: string
|
||||
cornerPoints: any
|
||||
imageHeight: number
|
||||
imageWidth: number
|
||||
email: BarcodeEmail
|
||||
phone: BarcodePhone
|
||||
sms: BarcodeSms
|
||||
@@ -180,6 +216,11 @@ export interface BarcodeDriverLicense {
|
||||
issuingCountry: string
|
||||
}
|
||||
|
||||
export interface ImageLabel {
|
||||
index: number,
|
||||
confidence: number,
|
||||
text: string
|
||||
}
|
||||
/**
|
||||
* @name Firebase Vision
|
||||
* @description
|
||||
@@ -203,6 +244,10 @@ export interface BarcodeDriverLicense {
|
||||
* .then((res: Barcode[]) => console.log(res))
|
||||
* .catch((error: string) => console.error(error));
|
||||
*
|
||||
* this.firebaseVision.imageLabeler(FILE_URI)
|
||||
* .then((res: ImageLabel[]) => console.log(res))
|
||||
* .catch((error: string) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
@@ -220,12 +265,25 @@ export class FirebaseVision extends IonicNativePlugin {
|
||||
* @return {Promise<string>} Returns a promise that fulfills with the text in the image
|
||||
*/
|
||||
@Cordova()
|
||||
onDeviceTextRecognizer(file_uri: string): Promise<string> {
|
||||
onDeviceTextRecognizer(file_uri: string): Promise<Text> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read data from Barcode
|
||||
* @param file_uri {string} Image URI
|
||||
* @return {Promise<Barcode[]>} Returns a promise that fulfills with the data in barcode
|
||||
*/
|
||||
@Cordova()
|
||||
barcodeDetector(file_uri: string): Promise<Barcode[]> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Recognize object in image
|
||||
* @param file_uri {string} Image URI
|
||||
* @return {Promise<ImageLabel[]>} Returns a promise that fulfills with the information about entities in an image
|
||||
*/
|
||||
@Cordova()
|
||||
imageLabeler(file_uri: string): Promise<ImageLabel[]> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,6 +179,15 @@ export class FirebaseX extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reload the current FCM user.
|
||||
* @return {Promise<FirebaseUser | string>}
|
||||
*/
|
||||
@Cordova()
|
||||
reloadCurrentUser(): Promise<FirebaseUser | string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get notified when a token is refreshed.
|
||||
* @return {Observable<any>}
|
||||
@@ -517,13 +526,18 @@ export class FirebaseX extends IonicNativePlugin {
|
||||
* code {string} - verification code. Will only be present if instantVerification is true. Always undefined on iOS.
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
callbackOrder: 'reverse',
|
||||
})
|
||||
verifyPhoneNumber(
|
||||
phoneNumber: string,
|
||||
timeOutDuration: number,
|
||||
fakeVerificationCode?: string
|
||||
): Promise<any> {
|
||||
verifyPhoneNumber(phoneNumber: string, timeOutDuration: number, fakeVerificationCode?: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Switch current authentification system language, for example, the phone sms code.
|
||||
* @param lang - language to change, ex: 'fr' for french
|
||||
*/
|
||||
@Cordova()
|
||||
setLanguageCode(lang: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,10 @@ export interface HTTPResponse {
|
||||
error?: string;
|
||||
}
|
||||
|
||||
interface AbortedResponse {
|
||||
aborted: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name HTTP
|
||||
* @description
|
||||
@@ -84,6 +88,7 @@ export class HTTP extends IonicNativePlugin {
|
||||
UNSUPPORTED_URL: number;
|
||||
NOT_CONNECTED: number;
|
||||
POST_PROCESSING_FAILED: number;
|
||||
ABORTED: number;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -230,6 +235,29 @@ export class HTTP extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a sync POST request
|
||||
* @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 success {function} A callback that is called when the request succeed
|
||||
* @param failure {function} A callback that is called when the request failed
|
||||
* @returns {string} returns a string that represents the requestId
|
||||
*/
|
||||
@Cordova({
|
||||
methodName: 'post',
|
||||
sync: true,
|
||||
})
|
||||
postSync(
|
||||
url: string,
|
||||
body: any,
|
||||
headers: any,
|
||||
success: (result: HTTPResponse) => void,
|
||||
failure: (error: any) => void
|
||||
): string {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a GET request
|
||||
* @param url {string} The url to send the request to
|
||||
@@ -242,6 +270,29 @@ export class HTTP extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a sync GET request
|
||||
* @param url {string} The url to send the request to
|
||||
* @param parameters {Object} Parameters to send with the request
|
||||
* @param headers {Object} The headers to set for this request
|
||||
* @param success {function} A callback that is called when the request succeed
|
||||
* @param failure {function} A callback that is called when the request failed
|
||||
* @returns {string} returns a string that represents the requestId
|
||||
*/
|
||||
@Cordova({
|
||||
methodName: 'get',
|
||||
sync: true,
|
||||
})
|
||||
getSync(
|
||||
url: string,
|
||||
parameters: any,
|
||||
headers: any,
|
||||
success: (result: HTTPResponse) => void,
|
||||
failure: (error: any) => void
|
||||
): string {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a PUT request
|
||||
* @param url {string} The url to send the request to
|
||||
@@ -254,6 +305,29 @@ export class HTTP extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a sync PUT request
|
||||
* @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 success {function} A callback that is called when the request succeed
|
||||
* @param failure {function} A callback that is called when the request failed
|
||||
* @returns {string} returns a string that represents the requestId
|
||||
*/
|
||||
@Cordova({
|
||||
methodName: 'put',
|
||||
sync: true,
|
||||
})
|
||||
putSync(
|
||||
url: string,
|
||||
body: any,
|
||||
headers: any,
|
||||
success: (result: HTTPResponse) => void,
|
||||
failure: (error: any) => void
|
||||
): string {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a PATCH request
|
||||
* @param url {string} The url to send the request to
|
||||
@@ -266,6 +340,29 @@ export class HTTP extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a sync PATCH request
|
||||
* @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 success {function} A callback that is called when the request succeed
|
||||
* @param failure {function} A callback that is called when the request failed
|
||||
* @returns {string} returns a string that represents the requestId
|
||||
*/
|
||||
@Cordova({
|
||||
methodName: 'patch',
|
||||
sync: true,
|
||||
})
|
||||
patchSync(
|
||||
url: string,
|
||||
body: any,
|
||||
headers: any,
|
||||
success: (result: HTTPResponse) => void,
|
||||
failure: (error: any) => void
|
||||
): string {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a DELETE request
|
||||
* @param url {string} The url to send the request to
|
||||
@@ -278,6 +375,29 @@ export class HTTP extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a sync DELETE request
|
||||
* @param url {string} The url to send the request to
|
||||
* @param parameters {Object} Parameters to send with the request
|
||||
* @param headers {Object} The headers to set for this request
|
||||
* @param success {function} A callback that is called when the request succeed
|
||||
* @param failure {function} A callback that is called when the request failed
|
||||
* @returns {string} returns a string that represents the requestId
|
||||
*/
|
||||
@Cordova({
|
||||
methodName: 'delete',
|
||||
sync: true,
|
||||
})
|
||||
deleteSync(
|
||||
url: string,
|
||||
parameters: any,
|
||||
headers: any,
|
||||
success: (result: HTTPResponse) => void,
|
||||
failure: (error: any) => void
|
||||
): string {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a HEAD request
|
||||
* @param url {string} The url to send the request to
|
||||
@@ -290,6 +410,29 @@ export class HTTP extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a sync HEAD request
|
||||
* @param url {string} The url to send the request to
|
||||
* @param parameters {Object} Parameters to send with the request
|
||||
* @param headers {Object} The headers to set for this request
|
||||
* @param success {function} A callback that is called when the request succeed
|
||||
* @param failure {function} A callback that is called when the request failed
|
||||
* @returns {string} returns a string that represents the requestId
|
||||
*/
|
||||
@Cordova({
|
||||
methodName: 'head',
|
||||
sync: true,
|
||||
})
|
||||
headSync(
|
||||
url: string,
|
||||
parameters: any,
|
||||
headers: any,
|
||||
success: (result: HTTPResponse) => void,
|
||||
failure: (error: any) => void
|
||||
): string {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make an OPTIONS request
|
||||
* @param url {string} The url to send the request to
|
||||
@@ -302,6 +445,29 @@ export class HTTP extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make an sync OPTIONS request
|
||||
* @param url {string} The url to send the request to
|
||||
* @param parameters {Object} Parameters to send with the request
|
||||
* @param headers {Object} The headers to set for this request
|
||||
* @param success {function} A callback that is called when the request succeed
|
||||
* @param failure {function} A callback that is called when the request failed
|
||||
* @returns {string} returns a string that represents the requestId
|
||||
*/
|
||||
@Cordova({
|
||||
methodName: 'options',
|
||||
sync: true,
|
||||
})
|
||||
optionsSync(
|
||||
url: string,
|
||||
parameters: any,
|
||||
headers: any,
|
||||
success: (result: HTTPResponse) => void,
|
||||
failure: (error: any) => void
|
||||
): string {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param url {string} The url to send the request to
|
||||
@@ -316,6 +482,33 @@ export class HTTP extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @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 local path(s) of the file(s) to upload
|
||||
* @param name {string} The name(s) of the parameter to pass the file(s) along as
|
||||
* @param success {function} A callback that is called when the request succeed
|
||||
* @param failure {function} A callback that is called when the request failed
|
||||
* @returns {string} returns a string that represents the requestId
|
||||
*/
|
||||
@Cordova({
|
||||
methodName: 'uploadFile',
|
||||
sync: true,
|
||||
})
|
||||
uploadFileSync(
|
||||
url: string,
|
||||
body: any,
|
||||
headers: any,
|
||||
filePath: string | string[],
|
||||
name: string | string[],
|
||||
success: (result: any) => void,
|
||||
failure: (error: any) => void
|
||||
): string {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param url {string} The url to send the request to
|
||||
@@ -329,6 +522,31 @@ export class HTTP extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @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 download the file to, including the file name.
|
||||
* @param success {function} A callback that is called when the request succeed
|
||||
* @param failure {function} A callback that is called when the request failed
|
||||
* @returns {string} returns a string that represents the requestId
|
||||
*/
|
||||
@Cordova({
|
||||
methodName: 'downloadFile',
|
||||
sync: true,
|
||||
})
|
||||
downloadFileSync(
|
||||
url: string,
|
||||
body: any,
|
||||
headers: any,
|
||||
filePath: string,
|
||||
success: (result: any) => void,
|
||||
failure: (error: any) => void
|
||||
): string {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param url {string} The url to send the request to
|
||||
@@ -352,7 +570,7 @@ export class HTTP extends IonicNativePlugin {
|
||||
method: 'get' | 'post' | 'put' | 'patch' | 'head' | 'delete' | 'options' | 'upload' | 'download';
|
||||
data?: { [index: string]: any };
|
||||
params?: { [index: string]: string | number };
|
||||
serializer?: 'json' | 'urlencoded' | 'utf8' | 'multipart';
|
||||
serializer?: 'json' | 'urlencoded' | 'utf8' | 'multipart' | 'raw';
|
||||
timeout?: number;
|
||||
headers?: { [index: string]: string };
|
||||
filePath?: string | string[];
|
||||
@@ -362,4 +580,53 @@ export class HTTP extends IonicNativePlugin {
|
||||
): Promise<HTTPResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param url {string} The url to send the request to
|
||||
* @param options {Object} options for individual request
|
||||
* @param options.method {string} request method
|
||||
* @param options.data {Object} payload to be send to the server (only applicable on post, put or patch methods)
|
||||
* @param options.params {Object} query params to be appended to the URL (only applicable on get, head, delete, upload or download methods)
|
||||
* @param options.serializer {string} data serializer to be used (only applicable on post, put or patch methods), defaults to global serializer value, see setDataSerializer for supported values
|
||||
* @param options.timeout {number} timeout value for the request in seconds, defaults to global timeout value
|
||||
* @param options.headers {Object} headers object (key value pair), will be merged with global values
|
||||
* @param options.filePath {string} file path(s) to be used during upload and download see uploadFile and downloadFile for detailed information
|
||||
* @param options.name {string} name(s) to be used during upload see uploadFile for detailed information
|
||||
* @param options.responseType {string} response type, defaults to text
|
||||
* @param success {function} A callback that is called when the request succeed
|
||||
* @param failure {function} A callback that is called when the request failed
|
||||
*
|
||||
* @returns {string} returns a string that represents the requestId
|
||||
*/
|
||||
@Cordova({
|
||||
methodName: 'sendRequest',
|
||||
sync: true,
|
||||
})
|
||||
sendRequestSync(
|
||||
url: string,
|
||||
options: {
|
||||
method: 'get' | 'post' | 'put' | 'patch' | 'head' | 'delete' | 'options' | 'upload' | 'download';
|
||||
data?: { [index: string]: any };
|
||||
params?: { [index: string]: string | number };
|
||||
serializer?: 'json' | 'urlencoded' | 'utf8' | 'multipart';
|
||||
timeout?: number;
|
||||
headers?: { [index: string]: string };
|
||||
filePath?: string | string[];
|
||||
name?: string | string[];
|
||||
responseType?: 'text' | 'arraybuffer' | 'blob' | 'json';
|
||||
},
|
||||
success: (result: HTTPResponse) => void,
|
||||
failure: (error: any) => void
|
||||
): string {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param requestId {string} The RequestId of the request to abort
|
||||
*/
|
||||
@Cordova()
|
||||
abort(requestId: string): Promise<AbortedResponse> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
480
src/@ionic-native/plugins/imap/index.ts
Normal file
480
src/@ionic-native/plugins/imap/index.ts
Normal file
@@ -0,0 +1,480 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
export interface Config {
|
||||
/**
|
||||
* Hostname or IP address of the IMAP service, for example: imap.gmail.com, imap-mail.outlook.com....
|
||||
*/
|
||||
host: string;
|
||||
/**
|
||||
* Username or email address for authentication.
|
||||
*/
|
||||
user: string;
|
||||
/**
|
||||
* Password for authentication.
|
||||
*/
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface Connection {
|
||||
/**
|
||||
* Connection Status: true or false, "true" means connected successfully; "false" means failed to connect.
|
||||
*/
|
||||
status: boolean;
|
||||
/**
|
||||
* Optional parameter. A connection string, returned as a confirmation for successful connection.
|
||||
*/
|
||||
connection?: string;
|
||||
/**
|
||||
* Optional parameter. Error, returned if the connecting process has failed.
|
||||
*/
|
||||
exception?: string;
|
||||
}
|
||||
|
||||
export interface Message {
|
||||
/**
|
||||
* Message consecutive number.
|
||||
*/
|
||||
messageNumber: number;
|
||||
/**
|
||||
* The name of the folder where the message is contained.
|
||||
*/
|
||||
folder: string;
|
||||
/**
|
||||
* Sender's data.
|
||||
*/
|
||||
from: Address[];
|
||||
/**
|
||||
* Optional. All recipients data.
|
||||
*/
|
||||
allRecipients?: Address[];
|
||||
/**
|
||||
* TO recipients data.
|
||||
*/
|
||||
toRecipients: Address[];
|
||||
/**
|
||||
* CC recipients data.
|
||||
*/
|
||||
ccRecipients: Address[];
|
||||
/**
|
||||
* BCC recipients data.
|
||||
*/
|
||||
bccRecipients: Address[];
|
||||
/**
|
||||
* Optional. Reply data.
|
||||
*/
|
||||
replyTo?: Address[];
|
||||
/**
|
||||
* Optional. Date when the message was sent.
|
||||
*/
|
||||
sentDate?: string;
|
||||
/**
|
||||
* The date when the message was received.
|
||||
*/
|
||||
receivedDate: string;
|
||||
/**
|
||||
* Message's subject header.
|
||||
*/
|
||||
subject: string;
|
||||
/**
|
||||
* Optional. Short description for the message.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Optional.
|
||||
*/
|
||||
fileName?: string;
|
||||
/**
|
||||
* Optional.
|
||||
*/
|
||||
disposition?: string;
|
||||
/**
|
||||
* Message's active flags.
|
||||
*/
|
||||
flags: string;
|
||||
/**
|
||||
* Optional.
|
||||
*/
|
||||
lineCount?: number;
|
||||
/**
|
||||
* Optional. All Headers available on a message.
|
||||
*/
|
||||
allMessageHeaders?: object;
|
||||
/**
|
||||
* Optional. Type of message's content.
|
||||
*/
|
||||
contentType?: string;
|
||||
/**
|
||||
* Optional. Message's body with its content and attachments.
|
||||
*/
|
||||
bodyContent?: Content[];
|
||||
/**
|
||||
* Optional. Message's memory size.
|
||||
*/
|
||||
size?: number;
|
||||
}
|
||||
|
||||
export interface Address {
|
||||
/**
|
||||
* Email address.
|
||||
*/
|
||||
address: string;
|
||||
/**
|
||||
* Optional. Name of the email address's owner.
|
||||
*/
|
||||
personal?: string;
|
||||
/**
|
||||
* Data type.
|
||||
*/
|
||||
type: string;
|
||||
}
|
||||
|
||||
export interface Content {
|
||||
/**
|
||||
* Content data type.
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
* Optional. The name of the file.
|
||||
*/
|
||||
fileName?: string;
|
||||
/**
|
||||
* Message's content.
|
||||
*/
|
||||
content: string;
|
||||
}
|
||||
|
||||
export interface ModificationResult {
|
||||
/**
|
||||
* Status of the applied changes. "True" success; "False" failure
|
||||
*/
|
||||
status: boolean;
|
||||
/**
|
||||
* Array with consecutive numbers of modified messages.
|
||||
*/
|
||||
modifiedMessages: number[];
|
||||
}
|
||||
|
||||
export enum Comparison {
|
||||
/**
|
||||
* The less than or equal to operator.
|
||||
*/
|
||||
LE = 'LE',
|
||||
/**
|
||||
* The less than operator.
|
||||
*/
|
||||
LT = 'LT',
|
||||
/**
|
||||
* The equality operator.
|
||||
*/
|
||||
EQ = 'EQ',
|
||||
/**
|
||||
* The not equal to operator.
|
||||
*/
|
||||
NE = 'NE',
|
||||
/**
|
||||
* The greater than operator.
|
||||
*/
|
||||
GT = 'GT',
|
||||
/**
|
||||
* The greater than or equal to operator.
|
||||
*/
|
||||
GE = 'GE',
|
||||
}
|
||||
|
||||
/**
|
||||
* All available message flags. Set or remove flag using "setFlag()".
|
||||
*/
|
||||
export enum FlagEnum {
|
||||
/**
|
||||
* "ANSWERED" message flag
|
||||
*/
|
||||
ANSWERED = 'ANSWERED',
|
||||
/**
|
||||
* "DRAFT" message flag
|
||||
*/
|
||||
DRAFT = 'DRAFT',
|
||||
/**
|
||||
* "FLAGGED" message flag
|
||||
*/
|
||||
FLAGGED = 'FLAGGED',
|
||||
/**
|
||||
* "RECENT" message flag
|
||||
*/
|
||||
RECENT = 'RECENT',
|
||||
/**
|
||||
* "SEEN" message flag
|
||||
*/
|
||||
SEEN = 'SEEN',
|
||||
/**
|
||||
* "USER" message flag
|
||||
*/
|
||||
USER = 'USER',
|
||||
/**
|
||||
* "DELETED" message flag. Note: Add this flag to delete the message from the mailbox
|
||||
*/
|
||||
DELETED = 'DELETED',
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Imap
|
||||
* @description
|
||||
* This plugin will enable an Ionic application to use the IMAP (Internet Message Access Protocol) features.
|
||||
* This plugin is in Beta version and it offers support only for Android.
|
||||
* The plugin uses Java Mail API.
|
||||
* Planned improvements and support for iOS.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Imap } from '@ionic-native/imap/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private imap: Imap) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.imap.connect({
|
||||
* host: 'imap.gmail.com',
|
||||
* user: 'my_email@gmail.com',
|
||||
* password: 'my-pass'
|
||||
* })
|
||||
* .then((res: Connection) => console.log(res))
|
||||
* .catch((error) => console.error(error));
|
||||
*
|
||||
*
|
||||
*
|
||||
* this.imap.disconnect()
|
||||
* .then((res: boolean) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
*
|
||||
*
|
||||
* this.imap.isConnected()
|
||||
* .then((res: boolean) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* Note: Connected to an IMAP service is REQUIRED to be able to get data from the below functions.
|
||||
*
|
||||
*
|
||||
* this.imap.listMailFolders()
|
||||
* .then((res: boolean) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
*
|
||||
* this.imap.getMessageCountByFolderName('INBOX')
|
||||
* .then((res: number) => {
|
||||
* // Returns the count of the messages in the folder as a result
|
||||
* console.log(res)
|
||||
* })
|
||||
* .catch((error: any) => {
|
||||
* console.error(error)
|
||||
* });
|
||||
*
|
||||
*
|
||||
*
|
||||
* this.imap.searchMessagesByDatePeriod('INBOX', 1601503200000, Comparison.GE)
|
||||
* .then((res: number[]) => {
|
||||
* // Returns array with messages' consecutive numbers
|
||||
* // ex. [1207, 1208, 1209]
|
||||
* console.log(res)
|
||||
* })
|
||||
* .catch((error: any) => {
|
||||
* console.error(error)
|
||||
* });
|
||||
*
|
||||
*
|
||||
* this.imap.listMessagesHeadersByConsecutiveNumber('INBOX', 1200, 1280)
|
||||
* .then((res: Message[]) => {
|
||||
* // Returns array with messages' headers data
|
||||
* console.log(res)
|
||||
* })
|
||||
* .catch((error: any) => {
|
||||
* console.error(error)
|
||||
* });
|
||||
*
|
||||
*
|
||||
* this.imap.listMessagesHeadersByDate('INBOX', 1601503200000, Comparison.GE)
|
||||
* .then((res: Message[]) => {
|
||||
* // Returns array with messages' headers data
|
||||
* console.log(res)
|
||||
* })
|
||||
* .catch((error: any) => {
|
||||
* console.error(error)
|
||||
* });
|
||||
*
|
||||
*
|
||||
* this.imap.getFullMessageData('INBOX', 1205)
|
||||
* .then((res: Message) => {
|
||||
* // Returns "Message" object with the full message data including attachments.
|
||||
* console.log(res)
|
||||
* })
|
||||
* .catch((error: any) => {
|
||||
* console.error(error)
|
||||
* });
|
||||
*
|
||||
*
|
||||
* this.imap.copyToFolder('INBOX', 'Spam', [1204, 1205, 1206, 1207])
|
||||
* .then((res: boolean) => {
|
||||
* // Returns "true" if the process is successful, else returns "false".
|
||||
* console.log(res)
|
||||
* })
|
||||
* .catch((error: any) => {
|
||||
* console.error(error)
|
||||
* });
|
||||
*
|
||||
*
|
||||
* * Sets a flag on a message
|
||||
* * "setFlag()" can be used for deleting messages setting the Delete flag to "FlagEnum.DELETED"
|
||||
* this.imap.setFlag('INBOX', [1206, 1205, 1204], FlagEnum.SEEN, true)
|
||||
* .then((res: ModificationResult) => {
|
||||
*
|
||||
* // res.status - return true or false based on the deletion success
|
||||
*
|
||||
* //res.modifiedMessages - for ex.[1206, 1205, 1204];
|
||||
*
|
||||
* })
|
||||
* .catch((error: any) => {
|
||||
* console.error(error)
|
||||
* });
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Imap',
|
||||
plugin: 'cordova-plugin-imap',
|
||||
pluginRef: 'imap',
|
||||
repo: 'https://github.com/aleksandar888/cordova-plugin-imap.git',
|
||||
platforms: ['Android'],
|
||||
})
|
||||
@Injectable()
|
||||
export class Imap extends IonicNativePlugin {
|
||||
/**
|
||||
* This function "connect(clientData: Config)" tries to connect and authenticate with the IMAP server.
|
||||
* @param clientData {Config} Connection configuration
|
||||
* @return {Promise<Connection>} Returns a promise with the connection data
|
||||
*/
|
||||
@Cordova()
|
||||
connect(clientData: Config): Promise<Connection> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* "disconnect()" Closes the connection with the server.
|
||||
* @return {Promise<boolean>} Returns a promise status.
|
||||
*/
|
||||
@Cordova()
|
||||
disconnect(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* "isConnected()" Checks the current state of the connection.
|
||||
* @return {Promise<boolean>} Returns a promise with connection status
|
||||
*/
|
||||
@Cordova()
|
||||
isConnected(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/** Note: Connected to an IMAP service is REQUIRED to be able to get data from the below functions. */
|
||||
|
||||
/**
|
||||
* "listMailFolders()" Lists the name of all the mail folders in the mailbox.
|
||||
* @return {Promise<string[]>} Returns array with all folder names.
|
||||
*/
|
||||
@Cordova()
|
||||
listMailFolders(): Promise<string[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* "getMessageCountByFolderName(folderName: string)" Gets the count of the messages in the folder.
|
||||
* @param folderName {string} The name of the desired folder.
|
||||
* @return {Promise<number>} Returns the consecutive number of the last message.
|
||||
*/
|
||||
@Cordova()
|
||||
getMessageCountByFolderName(folderName: string): Promise<number> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* "searchMessagesByDatePeriod(folderName: string, dateInMilliseconds: number, comparison: Comparison)" Returns the messages' consecutive number.
|
||||
* @param folderName {string} The name of the desired folder
|
||||
* @param dateInMilliseconds {number} Date in milliseconds
|
||||
* @param comparison {Comparison} A comparison operator
|
||||
* @return {Promise<number[]>} Returns array with the messages' consecutive numbers.
|
||||
*/
|
||||
@Cordova()
|
||||
searchMessagesByDatePeriod(
|
||||
folderName: string,
|
||||
dateInMilliseconds: number,
|
||||
comparison: Comparison
|
||||
): Promise<number[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* "listMessagesHeadersByConsecutiveNumber(folderName: string, start: number, end: number)" Returns messages' headers data based on a "start" and "end" message consecutive number.
|
||||
* @param folderName {string} The name of the desired folder
|
||||
* @param start {number} Consecutive number of the first message.
|
||||
* @param end {number} Consecutive number of the last message
|
||||
* @return {Promise<Message[]>} Returns array with the messages' headers data.
|
||||
*/
|
||||
@Cordova()
|
||||
listMessagesHeadersByConsecutiveNumber(folderName: string, start: number, end: number): Promise<Message[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* "listMessagesHeadersByDate(folderName: string, dateInMilliseconds: number, comparison: Comparison)" Returns messages' headers data based on a date.
|
||||
* @param folderName {string} The name of the desired folder
|
||||
* @param dateInMilliseconds {number} Date in milliseconds.
|
||||
* @param comparison {Comparison} A comparison operator
|
||||
* @return {Promise<Message[]>} Returns array messages' headers data.
|
||||
*/
|
||||
@Cordova()
|
||||
listMessagesHeadersByDate(
|
||||
folderName: string,
|
||||
dateInMilliseconds: number,
|
||||
comparison: Comparison
|
||||
): Promise<Message[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* "getFullMessageData(folderName: string, messageNumber: number)" Returns the full message's data including its attachments.
|
||||
* @param folderName {string} The name the message's folder
|
||||
* @param messageNumber {number} Message's consecutive number.
|
||||
* @return {Promise<Message>} Returns "Message" object with full message data.
|
||||
*/
|
||||
@Cordova()
|
||||
getFullMessageData(folderName: string, messageNumber: number): Promise<Message> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* "copyToFolder(sourceFolder: string, destinationFolder: string, messageNums: number[])" Copy messages to a desired folder.
|
||||
* @param sourceFolder {string} The name of the source folder.
|
||||
* @param destinationFolder {string} The name of the destination folder.
|
||||
* @param messageNums {number[]} Array with messages' consecutive numbers or array with single message consecutive number.
|
||||
* @return {Promise<Message>} Returns boolean status of the process.
|
||||
*/
|
||||
@Cordova()
|
||||
copyToFolder(sourceFolder: string, destinationFolder: string, messageNums: number[]): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* "setFlag(folderName: string, messageNums: number[], flag: FlagEnum, status: boolean)" Set or remove flag from a message
|
||||
* @param folderName {string} The name of the source folder where the messages are contained.
|
||||
* @param messageNums {number[]} Array with messages' consecutive numbers or array with single message consecutive number
|
||||
* @param flag {FlagEnum} Desired message flag.
|
||||
* @param status {boolean} Set status to "true" to set the flag on a message; or to "false" to remove the flag from the message
|
||||
* @return {Promise<ModificationResult>} Returns object with status and array with messages' consecutive numbers of the modified messages
|
||||
*/
|
||||
@Cordova()
|
||||
setFlag(folderName: string, messageNums: number[], flag: FlagEnum, status: boolean): Promise<ModificationResult> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,13 @@ export interface IAPProductOptions {
|
||||
type: string;
|
||||
}
|
||||
|
||||
export interface IRefeshResult {
|
||||
cancelled(fn: () => void): void;
|
||||
failed(fn: () => void): void;
|
||||
completed(fn: () => void): void;
|
||||
finished(fn: () => void): void;
|
||||
}
|
||||
|
||||
export type IAPProducts = IAPProduct[] & {
|
||||
/**
|
||||
* Get product by ID
|
||||
@@ -55,9 +62,9 @@ export interface IAPProduct {
|
||||
|
||||
downloaded?: boolean;
|
||||
|
||||
lastRenewalDate?: string;
|
||||
lastRenewalDate?: Date;
|
||||
|
||||
expiryDate?: string;
|
||||
expiryDate?: Date;
|
||||
|
||||
introPrice?: string;
|
||||
|
||||
@@ -81,7 +88,7 @@ export interface IAPProduct {
|
||||
|
||||
additionalData?: any;
|
||||
|
||||
transaction?: any;
|
||||
transaction?: PlayStoreReceipt | AppStoreReceipt;
|
||||
|
||||
/**
|
||||
* Call `product.finish()` to confirm to the store that an approved order has been delivered.
|
||||
@@ -190,6 +197,23 @@ export interface IAPProductEvents {
|
||||
downloaded: (callback: IAPQueryCallback) => IAPProductEvents;
|
||||
}
|
||||
|
||||
export type PlayStoreReceipt = {
|
||||
id: string;
|
||||
purchaseState: number;
|
||||
purchaseToken: string;
|
||||
receipt: string;
|
||||
signature: string;
|
||||
type: "android-playstore";
|
||||
};
|
||||
|
||||
export type AppStoreReceipt = {
|
||||
id: string;
|
||||
appStoreReceipt: string;
|
||||
original_transaction_id: string;
|
||||
type: "ios-appstore";
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
@@ -541,11 +565,11 @@ export class IAPError {
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'InAppPurchase2',
|
||||
plugin: 'cc.fovea.cordova.purchase',
|
||||
plugin: 'cordova-plugin-purchase',
|
||||
pluginRef: 'store',
|
||||
repo: 'https://github.com/j3k0/cordova-plugin-purchase',
|
||||
platforms: ['iOS', 'Android', 'Windows'],
|
||||
install: 'ionic cordova plugin add cc.fovea.cordova.purchase --variable BILLING_KEY="<ANDROID_BILLING_KEY>"',
|
||||
install: 'ionic cordova plugin add cordova-plugin-purchase --variable BILLING_KEY="<ANDROID_BILLING_KEY>"',
|
||||
})
|
||||
@Injectable()
|
||||
export class InAppPurchase2 extends IonicNativePlugin {
|
||||
@@ -865,7 +889,9 @@ export class InAppPurchase2 extends IonicNativePlugin {
|
||||
* and in the callback `product.finish()` should be called.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
refresh(): void {}
|
||||
refresh(): IRefeshResult {
|
||||
return;
|
||||
}
|
||||
|
||||
/** Lightweight method like refresh but do not relogin user */
|
||||
@Cordova({ sync: true })
|
||||
@@ -874,4 +900,8 @@ export class InAppPurchase2 extends IonicNativePlugin {
|
||||
/** Opens the Manage Subscription page (AppStore, Play, Microsoft, ...). */
|
||||
@Cordova({ sync: true })
|
||||
manageSubscriptions(): void {}
|
||||
|
||||
/** Opens the Code Redemption Sheet on iOS. (AppStore). */
|
||||
@Cordova({ sync: true })
|
||||
redeem(): void {}
|
||||
}
|
||||
|
||||
@@ -214,4 +214,35 @@ export class Intercom extends IonicNativePlugin {
|
||||
sendPushTokenToIntercom(token: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param carouselId {string}
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
displayCarousel(carouselId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param articleId {string}
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
displayArticle(articleId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param bottomPadding {string | number}
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
setBottomPadding(bottomPadding: string | number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export type BiometryType = 'face' | 'touch';
|
||||
|
||||
/**
|
||||
* @name Keychain Touch Id
|
||||
* @description
|
||||
@@ -37,7 +39,7 @@ export class KeychainTouchId extends IonicNativePlugin {
|
||||
* @return {Promise<any>} Returns a promise that resolves when there is hardware support
|
||||
*/
|
||||
@Cordova()
|
||||
isAvailable(): Promise<any> {
|
||||
isAvailable(): Promise<BiometryType> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -46,10 +48,10 @@ export class KeychainTouchId extends IonicNativePlugin {
|
||||
* successful authentication using fingerprint
|
||||
* @param key {string} the key you want to store
|
||||
* @param password {string} the password you want to encrypt and store
|
||||
* @return {Promise<any>} Returns a promise that resolves when there is a result
|
||||
* @return {Promise<void>} Returns a promise that resolves when there is a result
|
||||
*/
|
||||
@Cordova()
|
||||
save(key: string, password: string, userAuthenticationRequired: boolean): Promise<any> {
|
||||
save(key: string, password: string, userAuthenticationRequired: boolean): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -58,30 +60,30 @@ export class KeychainTouchId extends IonicNativePlugin {
|
||||
* with the password stored in keychain or will resolve an error code, where -1 indicated not available.
|
||||
* @param key {string} the key you want to retrieve from keychain
|
||||
* @param message {string} a message to the user
|
||||
* @return {Promise<any>} Returns a promise that resolves when the key value is successfully retrieved or an error
|
||||
* @return {Promise<string>} Returns a promise that resolves when the key value is successfully retrieved or an error
|
||||
*/
|
||||
@Cordova()
|
||||
verify(key: string, message: string): Promise<any> {
|
||||
verify(key: string, message: string): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if there is a password stored within the keychain for the given key.
|
||||
* @param key {string} the key you want to check from keychain
|
||||
* @return {Promise<any>} Returns a promise that resolves with success if the key is available or failure if key is not.
|
||||
* @return {Promise<void>} Returns a promise that resolves with success if the key is available or failure if key is not.
|
||||
*/
|
||||
@Cordova()
|
||||
has(key: string): Promise<any> {
|
||||
has(key: string): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes the password stored under given key from the keychain.
|
||||
* @param key {string} the key you want to delete from keychain
|
||||
* @return {Promise<any>} Returns a promise that resolves with success if the key is deleted or failure if key is not
|
||||
* @return {Promise<void>} Returns a promise that resolves with success if the key is deleted or failure if key is not
|
||||
*/
|
||||
@Cordova()
|
||||
delete(key: string): Promise<any> {
|
||||
delete(key: string): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface PromptsOptions {
|
||||
/**
|
||||
@@ -168,10 +168,15 @@ export interface LaunchNavigatorOptions {
|
||||
launchModeAppleMaps?: string;
|
||||
|
||||
/**
|
||||
* If true, and input location type(s) doesn't match those required by the app, use geocoding to obtain the address/coords as required. Defaults to true.
|
||||
* (Windows only) If false, the plugin will NOT attempt to use the geolocation plugin to determine the current device position when the start location parameter is omitted. Defaults to true.
|
||||
*/
|
||||
enableGeolocation?: boolean;
|
||||
|
||||
/**
|
||||
* (Android and iOS only) If true, and input location type(s) doesn't match those required by the app, use geocoding to obtain the address/coords as required. Defaults to true.
|
||||
*/
|
||||
enableGeocoding?: boolean;
|
||||
|
||||
/**
|
||||
* options related to the default native actionsheet picker which enables user to select which navigation app to launch if `app` is not specified.
|
||||
*/
|
||||
@@ -297,6 +302,8 @@ export class LaunchNavigator extends IonicNativePlugin {
|
||||
BICYCLING: 'bicycling',
|
||||
TRANSIT: 'transit',
|
||||
};
|
||||
|
||||
@CordovaProperty()
|
||||
appSelection: AppSelection;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,11 +2,11 @@ import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface LuxandConfig {
|
||||
/** The licence key got from Luxand */
|
||||
/** The licence key gotten from Luxand */
|
||||
licence: string;
|
||||
/** The internal database name the tracker should use */
|
||||
dbname: string;
|
||||
/** the number of retry when registering of identifying a face */
|
||||
/** the number of retries when registering or identifying a face */
|
||||
loginTryCount: number;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ export interface OMLFacialData {
|
||||
message: string;
|
||||
/** The unique name generated and associated to a face when registering */
|
||||
name: string;
|
||||
/** The unique id Luxand Face SDK tracker associate to a face in it's internal database */
|
||||
/** The unique id Luxand Face SDK tracker associates to a face in it's internal database */
|
||||
id: number;
|
||||
/** Extra information about the face including age, expressions */
|
||||
extra: {
|
||||
@@ -31,7 +31,7 @@ export interface OMLFacialData {
|
||||
/**
|
||||
* @name Luxand
|
||||
* @description
|
||||
* This plugin let you integrat Luxand Face SDK into your ionic projects, so you can implements face authentication easily in your applications.
|
||||
* This plugin let you integrate Luxand Face SDK into your ionic projects, so you can implement face authentication easily in your application.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
|
||||
@@ -14,7 +14,8 @@ export type Event =
|
||||
| 'installationUpdated'
|
||||
| 'userUpdated'
|
||||
| 'personalized'
|
||||
| 'depersonalized';
|
||||
| 'depersonalized'
|
||||
| 'deeplink';
|
||||
|
||||
export interface CustomEvent {
|
||||
definitionId: string;
|
||||
@@ -27,6 +28,7 @@ export interface Configuration {
|
||||
*/
|
||||
applicationCode: string;
|
||||
geofencingEnabled?: boolean;
|
||||
inAppChatEnabled?: boolean;
|
||||
/**
|
||||
* Message storage save callback
|
||||
*/
|
||||
@@ -74,11 +76,11 @@ export interface UserData {
|
||||
lastName?: string;
|
||||
middleName?: string;
|
||||
gender?: Gender;
|
||||
birthday?: Date;
|
||||
birthday?: string;
|
||||
phones?: string[];
|
||||
emails?: string[];
|
||||
tags?: string[];
|
||||
customAttributes?: Record<string, string | number | boolean>;
|
||||
customAttributes?: Record<string, string | number | boolean | any[]>;
|
||||
}
|
||||
|
||||
export interface Installation {
|
||||
@@ -108,7 +110,7 @@ export interface UserIdentity {
|
||||
|
||||
export interface PersonalizeContext {
|
||||
userIdentity: UserIdentity;
|
||||
userAttributes?: Record<string, string>;
|
||||
userAttributes?: Record<string, string | number | boolean | any[]>;
|
||||
forceDepersonalize?: boolean;
|
||||
}
|
||||
|
||||
@@ -129,6 +131,11 @@ export interface Message {
|
||||
vibrate?: boolean; // Android only
|
||||
icon?: string; // Android only
|
||||
category?: string; // Android only
|
||||
chat?: string;
|
||||
browserUrl?: string;
|
||||
deeplink?: string;
|
||||
webViewUrl?: string;
|
||||
inAppDismissTitle?: string;
|
||||
}
|
||||
|
||||
export interface MobileMessagingError {
|
||||
@@ -136,6 +143,12 @@ export interface MobileMessagingError {
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface ChatConfig {
|
||||
ios?: {
|
||||
showModally: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export class DefaultMessageStorage {
|
||||
@Cordova({ sync: true })
|
||||
find(messageId: string, callback: (message: Message) => void) {
|
||||
@@ -437,4 +450,15 @@ export class MobileMessaging extends IonicNativePlugin {
|
||||
defaultMessageStorage(): DefaultMessageStorage | undefined {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays chat view.
|
||||
*
|
||||
* @name showChat
|
||||
* @param {ChatConfig} chat config
|
||||
*/
|
||||
@Cordova()
|
||||
showChat(config?: ChatConfig): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
47
src/@ionic-native/plugins/multiple-document-picker/index.ts
Normal file
47
src/@ionic-native/plugins/multiple-document-picker/index.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* This is a wrapper for MultipleDocumentsPicker plugin
|
||||
*
|
||||
*/
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Multiple Documents Picker
|
||||
* @description
|
||||
* This plugin allows users to pick multiple documents/images at once
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { MultipleDocumentsPicker } from '@ionic-native/multiple-document-picker/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private multipleDocumentsPicker: MultipleDocumentsPicker) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.multipleDocumentsPicker.pick(1)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'MultipleDocumentsPicker',
|
||||
plugin: 'cordova-plugin-multiple-documents-picker',
|
||||
pluginRef: 'multipleDocumentsPicker',
|
||||
repo: 'https://github.com/akeotech/cordova-plugin-multiple-documents-picker',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class MultipleDocumentsPicker extends IonicNativePlugin {
|
||||
/**
|
||||
* This function allow user to show native file picker
|
||||
* @param type {number} To pick type of files: for images send 1, for all files send 2
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
pick(type: number): Promise<any> {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
}
|
||||
@@ -148,9 +148,9 @@ export interface MusicControlsOptions {
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'MusicControls',
|
||||
plugin: 'cordova-plugin-music-controls',
|
||||
plugin: 'cordova-plugin-music-controls2',
|
||||
pluginRef: 'MusicControls',
|
||||
repo: 'https://github.com/homerours/cordova-music-controls-plugin',
|
||||
repo: 'https://github.com/ghenry22/cordova-plugin-music-controls2',
|
||||
platforms: ['Android', 'iOS', 'Windows'],
|
||||
})
|
||||
@Injectable()
|
||||
|
||||
@@ -5,14 +5,14 @@ import { Observable, merge } from 'rxjs';
|
||||
declare const navigator: any;
|
||||
|
||||
export enum Connection {
|
||||
UNKNOWN = 0,
|
||||
ETHERNET,
|
||||
WIFI,
|
||||
CELL_2G,
|
||||
CELL_3G,
|
||||
CELL_4G,
|
||||
CELL,
|
||||
NONE,
|
||||
UNKNOWN = 'unknown',
|
||||
ETHERNET = 'ethernet',
|
||||
WIFI = 'wifi',
|
||||
CELL_2G = '2g',
|
||||
CELL_3G = '3g',
|
||||
CELL_4G = '4g',
|
||||
CELL = 'cellular',
|
||||
NONE = 'none',
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -95,11 +95,11 @@ export class Network extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Returns an observable to watch connection changes
|
||||
* @return {Observable<any>}
|
||||
* @return {Observable<'connected' | 'disconnected'>}
|
||||
*/
|
||||
@CordovaCheck()
|
||||
onChange(): Observable<any> {
|
||||
return merge(this.onConnect(), this.onDisconnect());
|
||||
onChange(): Observable<'connected' | 'disconnected'> {
|
||||
return merge(this.onConnect().pipe(mapTo('connected')), this.onDisconnect().pipe(mapTo('disconnected'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
95
src/@ionic-native/plugins/power-optimization/index.ts
Normal file
95
src/@ionic-native/plugins/power-optimization/index.ts
Normal file
@@ -0,0 +1,95 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
/**
|
||||
* @name Power Optimization
|
||||
* @description
|
||||
* Android Custom Roms made sometimes your apps unfunctional due to being killed in the background, notification messages do not appearing or your services being killed by agressive power saving mode.
|
||||
* The Power Optimization plugin give you android PowerManager methods with cordova.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { PowerOptimization } from '@ionic-native/power-optimization/ngx';
|
||||
*
|
||||
* constructor(private powerOptimization: PowerOptimization) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.powerOptimization.IsIgnoringBatteryOptimizations()
|
||||
* .then(onSuccess)
|
||||
* .catch(onError);
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'PowerOptimization',
|
||||
plugin: 'cordova-plugin-power-optimization',
|
||||
pluginRef: 'cordova.plugins.PowerOptimization',
|
||||
repo: 'https://github.com/snt1017/cordova-plugin-power-optimization',
|
||||
platforms: ['Android'],
|
||||
})
|
||||
@Injectable()
|
||||
export class PowerOptimization extends IonicNativePlugin {
|
||||
/**
|
||||
* Check if the battery optimization is ignoring
|
||||
* For more info, please check https://github.com/snt1017/cordova-plugin-power-optimization
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
IsIgnoringBatteryOptimizations(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Request permisson to ignore optimizations:
|
||||
* For more info, please check https://github.com/snt1017/cordova-plugin-power-optimization
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
RequestOptimizations(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Go to battery optimizations configurations menu:
|
||||
* For more info, please check https://github.com/snt1017/cordova-plugin-power-optimization
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
RequestOptimizationsMenu(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Check if have any data restrictions in background:
|
||||
* For more info, please check https://github.com/snt1017/cordova-plugin-power-optimization
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
IsIgnoringDataSaver(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Go to data restrictions in background configurations menu:
|
||||
* For more info, please check https://github.com/snt1017/cordova-plugin-power-optimization
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
RequestDataSaverMenu(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Check if have another battery restriction is present into phone (like huawei, xiaomi, etc):
|
||||
* For more info, please check https://github.com/snt1017/cordova-plugin-power-optimization
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
HaveProtectedAppsCheck(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Go to configurations menu if another battery restriction is present into phone (like huawei, xiaomi, etc). You can send true into params if you want to force show the menu (is only show the fist time without params):
|
||||
* For more info, please check https://github.com/snt1017/cordova-plugin-power-optimization
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
ProtectedAppCheck(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,18 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
export interface PreviewAnyFileOptions {
|
||||
/**
|
||||
* The name of the file to preview.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* The mime type of the file to preview.
|
||||
*/
|
||||
mimeType: string;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @name PreviewAnyFile
|
||||
* @description
|
||||
@@ -22,7 +35,18 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.previewAnyFile.previewPath('http://www.domain.com/samplefile')
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
|
||||
@Plugin({
|
||||
pluginName: 'PreviewAnyFile',
|
||||
plugin: 'cordova-plugin-preview-any-file', // npm package name, example: cordova-plugin-camera
|
||||
@@ -43,4 +67,34 @@ export class PreviewAnyFile extends IonicNativePlugin {
|
||||
preview(url: string): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* previewPath function will return success callback if the file successfully opened, if the content is base64 you have to use previewBase64 method
|
||||
* @param base64 {String} base64 string content
|
||||
* @param options {PreviewAnyFileOptions} define the name of the file with extension or it's mimeType, if the correct extension not exist in the path
|
||||
*/
|
||||
@Cordova()
|
||||
previewBase64(base64: string,options?: PreviewAnyFileOptions): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* previewPath function will return success callback if the file successfully opened, if the content is base64 you have to use previewBase64 method
|
||||
* @param url {String} full absolute URL -> file://, content://, http://, https, ... etc, if extension not exist, you must define it in the opt param
|
||||
* @param options {PreviewAnyFileOptions} define the name of the file with extension or it's mimeType, if the correct extension not exist in the path
|
||||
*/
|
||||
@Cordova()
|
||||
previewPath(url: string,options?: PreviewAnyFileOptions): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* previewPath function will return success callback if the file successfully opened, if the content is base64 you have to use previewBase64 method
|
||||
* @param url {String} full absolute URL -> file://, content://, http://, https, ... etc, if extension not exist, you must define it in the opt param
|
||||
* @param options {PreviewAnyFileOptions} define the name of the file with extension or it's mimeType, if the correct extension not exist in the path
|
||||
*/
|
||||
@Cordova()
|
||||
previewAsset(url: string,options?: PreviewAnyFileOptions): Promise<string> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,11 +203,11 @@ export enum INTRO_ELIGIBILITY_STATUS {
|
||||
* PurchaserInfo
|
||||
* PurchasesEntitlementInfos
|
||||
* PurchasesEntitlementInfo
|
||||
*
|
||||
* PurchasesTransaction
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Purchases',
|
||||
plugin: 'cordova-plugin-purchases@1.2.0',
|
||||
plugin: 'cordova-plugin-purchases@2.1.1',
|
||||
pluginRef: 'Purchases', // the variable reference to call the plugin, example: navigator.geolocation
|
||||
repo: 'https://github.com/RevenueCat/cordova-plugin-purchases', // the github repository URL for the plugin
|
||||
platforms: ['Android', 'iOS'], // Array of platforms supported, example: ['Android', 'iOS']
|
||||
@@ -259,8 +259,8 @@ export class Purchases extends IonicNativePlugin {
|
||||
* @param {boolean} observerMode An optional boolean. Set this to TRUE if you have your own IAP implementation and
|
||||
* want to use only RevenueCat's backend. Default is FALSE. If you are on Android and setting this to ON, you will have
|
||||
* to acknowledge the purchases yourself.
|
||||
* @param {string?} userDefaultsSuiteName An optional string. iOS-only, will be ignored for Android.
|
||||
* Set this if you would like the RevenueCat SDK to store its preferences in a different NSUserDefaults
|
||||
* @param {string?} userDefaultsSuiteName An optional string. iOS-only, will be ignored for Android.
|
||||
* Set this if you would like the RevenueCat SDK to store its preferences in a different NSUserDefaults
|
||||
* suite, otherwise it will use standardUserDefaults. Default is null, which will make the SDK use standardUserDefaults.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
@@ -277,6 +277,9 @@ export class Purchases extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Add a dict of attribution information
|
||||
*
|
||||
* @deprecated Use the set<NetworkId> functions instead.
|
||||
*
|
||||
* @param {object} data Attribution data from any of the attribution networks in Purchases.ATTRIBUTION_NETWORKS
|
||||
* @param {ATTRIBUTION_NETWORK} network Which network, see Purchases.ATTRIBUTION_NETWORK
|
||||
* @param {string?} networkUserId An optional unique id for identifying the user. Needs to be a string.
|
||||
@@ -315,31 +318,6 @@ export class Purchases extends IonicNativePlugin {
|
||||
* @property {PurchaserInfo} purchaserInfo - The new PurchaserInfo after the successful purchase
|
||||
*/
|
||||
|
||||
/**
|
||||
* Make a purchase
|
||||
*
|
||||
* @deprecated Use purchaseProduct instead.
|
||||
*
|
||||
* @param {string} productIdentifier The product identifier of the product you want to purchase.
|
||||
* @param {string?} oldSKU Optional sku you wish to upgrade from.
|
||||
* @param {PURCHASE_TYPE} type Optional type of product, can be inapp or subs. Subs by default
|
||||
*
|
||||
* @return {Promise<MakePurchaseResponse>} A [PurchasesError] is triggered after an error or when the user cancels the purchase.
|
||||
* If user cancelled, userCancelled will be true
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
observable: true,
|
||||
})
|
||||
makePurchase(
|
||||
productIdentifier: string,
|
||||
oldSKU?: string | null,
|
||||
type: PURCHASE_TYPE = PURCHASE_TYPE.SUBS
|
||||
): Promise<{ productIdentifier: string; purchaserInfo: PurchaserInfo }> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a purchase
|
||||
*
|
||||
@@ -476,11 +454,27 @@ export class Purchases extends IonicNativePlugin {
|
||||
* This method will send all the purchases to the RevenueCat backend. Call this when using your own implementation
|
||||
* for subscriptions anytime a sync is needed, like after a successful purchase.
|
||||
*
|
||||
* @warning This function should only be called if you're not calling makePurchase.
|
||||
* @warning This function should only be called if you're not calling purchaseProduct.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
syncPurchases(): void {}
|
||||
|
||||
/**
|
||||
* iOS only. Presents a code redemption sheet, useful for redeeming offer codes
|
||||
* Refer to https://docs.revenuecat.com/docs/ios-subscription-offers#offer-codes for more information on how
|
||||
* to configure and use offer codes.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
presentCodeRedemptionSheet(): void {}
|
||||
|
||||
/**
|
||||
* iOS only.
|
||||
* @param {Boolean} enabled Set this property to true *only* when testing the ask-to-buy / SCA purchases flow.
|
||||
* More information: http://errors.rev.cat/ask-to-buy
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setSimulatesAskToBuyInSandbox(enabled: boolean): void {}
|
||||
|
||||
/**
|
||||
* Enable automatic collection of Apple Search Ads attribution. Disabled by default.
|
||||
* @param {Boolean} enabled Enable or not automatic collection
|
||||
@@ -542,11 +536,11 @@ export class Purchases extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Invalidates the cache for purchaser information.
|
||||
*
|
||||
*
|
||||
* Most apps will not need to use this method; invalidating the cache can leave your app in an invalid state.
|
||||
* Refer to https://docs.revenuecat.com/docs/purchaserinfo#section-get-user-information for more information on
|
||||
* using the cache properly.
|
||||
*
|
||||
*
|
||||
* This is useful for cases where purchaser information might have been updated outside of the
|
||||
* app, like if a promotional subscription is granted through the RevenueCat dashboard.
|
||||
*/
|
||||
@@ -573,37 +567,137 @@ export class Purchases extends IonicNativePlugin {
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setEmail(email: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the phone number for the user
|
||||
*
|
||||
* @param phoneNumber Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
|
||||
@Cordova({ sync: true })
|
||||
setPhoneNumber(phoneNumber: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the display name for the user
|
||||
*
|
||||
* @param displayName Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
|
||||
@Cordova({ sync: true })
|
||||
setDisplayName(displayName: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the push token for the user
|
||||
*
|
||||
* @param pushToken null will delete the subscriber attribute.
|
||||
* @param pushToken Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
|
||||
@Cordova({ sync: true })
|
||||
setPushToken(pushToken: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the install media source for the user
|
||||
*
|
||||
* @param mediaSource Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setMediaSource(mediaSource: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the install campaign for the user
|
||||
*
|
||||
* @param campaign Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setCampaign(campaign: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the install ad group for the user
|
||||
*
|
||||
* @param adGroup Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setAdGroup(adGroup: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the install ad for the user
|
||||
*
|
||||
* @param ad Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setAd(ad: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the install keyword for the user
|
||||
*
|
||||
* @param keyword Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setKeyword(keyword: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the install ad creative for the user
|
||||
*
|
||||
* @param creative Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setCreative(creative: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the Adjust Id for the user
|
||||
* Required for the RevenueCat Adjust integration
|
||||
*
|
||||
* @param adjustID Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setAdjustId(adjustId: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the AppsFlyer Id for the user
|
||||
* Required for the RevenueCat AppsFlyer integration
|
||||
* @param appsflyerID Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setAppsflyerId(appsflyerId: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the Facebook SDK Anonymous Id for the user
|
||||
* Recommended for the RevenueCat Facebook integration
|
||||
*
|
||||
* @param fbAnonymousID Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setFbAnonymousId(fbAnonymousId: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the mParticle Id for the user
|
||||
* Recommended for the RevenueCat mParticle integration
|
||||
*
|
||||
* @param mparticleID Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setMparticleId(mparticleId: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the OneSignal Player Id for the user
|
||||
* Required for the RevenueCat OneSignal integration
|
||||
*
|
||||
* @param onesignalID Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setOnesignalId(onesignalId: string | null): void {}
|
||||
|
||||
/**
|
||||
* Automatically collect subscriber attributes associated with the device identifiers.
|
||||
* $idfa, $idfv, $ip on iOS
|
||||
* $gpsAdId, $androidId, $ip on Android
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
collectDeviceIdentifiers(): void {}
|
||||
|
||||
/**
|
||||
* Set this property to your proxy URL before configuring Purchases *only* if you've received a proxy key value from your RevenueCat contact.
|
||||
* @param url Proxy URL as a string.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setProxyURL(url: string): void {}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -708,6 +802,11 @@ export interface PurchaserInfo {
|
||||
* Set of purchased skus, active and inactive
|
||||
*/
|
||||
readonly allPurchasedProductIdentifiers: [string];
|
||||
/**
|
||||
* Returns all the non-subscription purchases a user has made.
|
||||
* The purchases are ordered by purchase date in ascending order.
|
||||
*/
|
||||
readonly nonSubscriptionTransactions: [PurchasesTransaction];
|
||||
/**
|
||||
* The latest expiration date of all purchased skus
|
||||
*/
|
||||
@@ -756,6 +855,21 @@ export interface PurchaserInfo {
|
||||
readonly managementURL: string | null;
|
||||
}
|
||||
|
||||
export interface PurchasesTransaction {
|
||||
/**
|
||||
* RevenueCat Id associated to the transaction.
|
||||
*/
|
||||
readonly revenueCatId: string;
|
||||
/**
|
||||
* Product Id associated with the transaction.
|
||||
*/
|
||||
readonly productId: string;
|
||||
/**
|
||||
* Purchase date of the transaction in ISO 8601 format.
|
||||
*/
|
||||
readonly purchaseDate: string;
|
||||
}
|
||||
|
||||
export interface PurchasesProduct {
|
||||
/**
|
||||
* Product Id.
|
||||
|
||||
144
src/@ionic-native/plugins/shortcuts-android/index.ts
Normal file
144
src/@ionic-native/plugins/shortcuts-android/index.ts
Normal file
@@ -0,0 +1,144 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
export interface Intent {
|
||||
// Defaults to currently running activity
|
||||
activityClass?: string;
|
||||
|
||||
// Defaults to currently running package
|
||||
activityPackage?: string;
|
||||
|
||||
// Defaults to ACTION_VIEW
|
||||
action?: string;
|
||||
|
||||
// Defaults to FLAG_ACTIVITY_NEW_TASK + FLAG_ACTIVITY_CLEAR_TOP
|
||||
flags?: number;
|
||||
|
||||
categories?: string[];
|
||||
|
||||
data?: string;
|
||||
|
||||
extras?: { [key: string]: any };
|
||||
}
|
||||
|
||||
export interface Shortcut {
|
||||
id: string;
|
||||
shortLabel?: string;
|
||||
longLabel?: string;
|
||||
iconFromResource?: string;
|
||||
iconBitmap?: string;
|
||||
intent?: Intent;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name ShortcutsAndroid
|
||||
* @description
|
||||
* Use this plugin to create shortcuts in Android. Use this plugin to handle Intents on your application.
|
||||
* For more information on Android App Shortcuts: https://developer.android.com/guide/topics/ui/shortcuts.html
|
||||
* For more information on Android Intents: https://developer.android.com/guide/components/intents-filters.html
|
||||
*
|
||||
* The work that went into creating this plug-in was inspired by the existing plugins: cordova-plugin-shortcut and cordova-plugin-webintent2.
|
||||
*
|
||||
* @usage
|
||||
* Please do refer to the original plugin's repo for detailed usage. The usage example here might not be sufficient.
|
||||
*
|
||||
* ```typescript
|
||||
* import { ShortcutsAndroid } from '@ionic-native/shortcuts-android/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private shortcutsAndroid: ShortcutsAndroid) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.shortcutsAndroid.supportsDynamic()
|
||||
* .then((supported: boolean) => console.log(`Dynamic shortcuts are ${supported ? '' : 'not'} supported`))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Shortcuts',
|
||||
plugin: 'cordova-plugin-shortcuts-android',
|
||||
pluginRef: 'plugins.Shortcuts',
|
||||
repo: 'https://github.com/avargaskun/cordova-plugin-shortcuts-android',
|
||||
platforms: ['Android'],
|
||||
})
|
||||
@Injectable()
|
||||
export class Shortcuts extends IonicNativePlugin {
|
||||
/**
|
||||
* Checking if Dynamic Shortcuts are supported
|
||||
*
|
||||
* Dynamic shortcuts require SDK 25 or later. Use supportsDynamic to check whether the current device meets those requirements.
|
||||
* @return {Promise<boolean>} returns a promise that resolves with a boolean that indicates if dynamic shortcuts are supported
|
||||
*/
|
||||
@Cordova()
|
||||
supportsDynamic(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checking if Pinned Shortcuts are supported
|
||||
*
|
||||
* Pinned shortcuts require SDK 26 or later. Use supportsPinned to check whether the current device meets those requirements.
|
||||
* @return {Promise<boolean>} returns a promise that resolves with a boolean that indicates if pinned shortcuts are supported
|
||||
*/
|
||||
@Cordova()
|
||||
supportsPinned(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setting the application Dynamic Shortcuts
|
||||
*
|
||||
* Use `setDynamic` to set the Dynamic Shortcuts for the application, all at once. The shortcuts provided as a parameter will override any existing shortcut. Use an empty array to clear out existing shortcuts.
|
||||
* @param {Shortcut[]} [shortcut] Array of shortcuts to add.
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
})
|
||||
setDynamic(shortcuts: Shortcut[]): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adding a Pinned Shortcut to the launcher
|
||||
*
|
||||
* Use `addPinned` to add a new Pinned Shortcut to the launcher.
|
||||
* @param {Shortcut[]} [shortcut] Array of shortcuts to add.
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
})
|
||||
addPinned(shortcut: Shortcut): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Querying current Intent
|
||||
*
|
||||
* Use `getIntent` to get the Intent that was used to launch the current instance of the Cordova activity.
|
||||
* @return {Promise<Intent>} returns the Intent that was used to launch the current instance of the Cordova activity
|
||||
*/
|
||||
@Cordova()
|
||||
getIntent(): Promise<Intent> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Subscribe to new Intents
|
||||
*
|
||||
* Use onNewIntent to trigger your code every time a new Intent is sent to your Cordova activity. Note that in some conditions this subscription may not be executed.
|
||||
* @return {Observable<Intent>} emits the new Intent each time a shortcut is activated
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
})
|
||||
onNewIntent(): Observable<Intent> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -13,8 +13,8 @@ export class SmartlookSetupConfigBuilder {
|
||||
return this;
|
||||
}
|
||||
|
||||
renderingMode(renderingMode: string): SmartlookSetupConfigBuilder {
|
||||
this._smartlookSetupConfig.renderingMode = renderingMode;
|
||||
renderingMode(renderingMode: SmartlookRenderingMode): SmartlookSetupConfigBuilder {
|
||||
this._smartlookSetupConfig.renderingMode = renderingMode.getRenderingModeString();
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -28,6 +28,11 @@ export class SmartlookSetupConfigBuilder {
|
||||
return this;
|
||||
}
|
||||
|
||||
eventTrackingModes(eventTrackingModes: SmartlookEventTrackingModes): SmartlookSetupConfigBuilder {
|
||||
this._smartlookSetupConfig.eventTrackingModes = eventTrackingModes.getEventTrackingModeStringArray();
|
||||
return this;
|
||||
}
|
||||
|
||||
build(): SmartlookSetupConfig {
|
||||
return this._smartlookSetupConfig;
|
||||
}
|
||||
@@ -39,6 +44,7 @@ export class SmartlookSetupConfig {
|
||||
renderingMode: string;
|
||||
startNewSession: boolean;
|
||||
startNewSessionAndUser: boolean;
|
||||
eventTrackingModes: string[];
|
||||
|
||||
constructor(smartlookAPIKey: string) {
|
||||
this.smartlookAPIKey = smartlookAPIKey;
|
||||
@@ -74,15 +80,41 @@ export class SmartlookEventTrackingMode {
|
||||
return new SmartlookEventTrackingMode('ignore_user_interaction');
|
||||
}
|
||||
|
||||
static IGNORE_NAVIGATION_INTERACTION(): SmartlookEventTrackingMode {
|
||||
return new SmartlookEventTrackingMode('ignore_navigation_interaction');
|
||||
}
|
||||
|
||||
static IGNORE_RAGE_CLICKS(): SmartlookEventTrackingMode {
|
||||
return new SmartlookEventTrackingMode('ignore_rage_clicks');
|
||||
}
|
||||
|
||||
static NO_TRACKING(): SmartlookEventTrackingMode {
|
||||
return new SmartlookEventTrackingMode('no_tracking');
|
||||
}
|
||||
|
||||
getEventTrackingModeString(): string {
|
||||
return this.eventTrackingMode;
|
||||
}
|
||||
|
||||
constructor(eventTrackingMode: string) {
|
||||
this.eventTrackingMode = eventTrackingMode;
|
||||
}
|
||||
}
|
||||
|
||||
export class SmartlookEventTrackingModes {
|
||||
private eventTrackingModes: string[];
|
||||
|
||||
constructor(eventTrackingModes: SmartlookEventTrackingMode[]) {
|
||||
this.eventTrackingModes = eventTrackingModes.map(eventTrackingMode =>
|
||||
eventTrackingMode.getEventTrackingModeString()
|
||||
);
|
||||
}
|
||||
|
||||
getEventTrackingModeStringArray(): string[] {
|
||||
return this.eventTrackingModes;
|
||||
}
|
||||
}
|
||||
|
||||
export class SmartlookViewState {
|
||||
static START = 'start';
|
||||
static STOP = 'stop';
|
||||
@@ -204,6 +236,10 @@ export class SmartlookRenderingMode {
|
||||
return new SmartlookRenderingMode('native');
|
||||
}
|
||||
|
||||
getRenderingModeString(): string {
|
||||
return this.renderingMode;
|
||||
}
|
||||
|
||||
constructor(renderingMode: string) {
|
||||
this.renderingMode = renderingMode;
|
||||
}
|
||||
@@ -248,6 +284,8 @@ export class SmartlookRenderingMode {
|
||||
* SmartlookReferrer
|
||||
* SmartlookDashboardSessionUrl
|
||||
* SmartlookRenderingMode
|
||||
* SmartlookEventTrackingMode
|
||||
* SmartlookEventTrackingModes
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Smartlook',
|
||||
@@ -361,16 +399,27 @@ export class Smartlook extends IonicNativePlugin {
|
||||
/**
|
||||
* You can configure which events are being tracked by setting eventTrackingMode.
|
||||
* @param eventTrackingMode Can be on of:
|
||||
* - SmartlookEventTrackingMode.FULL_TRACKING() tracks everything.
|
||||
* - SmartlookEventTrackingMode.IGNORE_USER_INTERACTION() will not track touches,
|
||||
* focus, keyboard, selector events.
|
||||
* - SmartlookEventTrackingMode.NO_TRACKING() not gonna track any events .
|
||||
* - EventTrackingMode.FULL_TRACKING ... track everything
|
||||
* - EventTrackingMode.IGNORE_USER_INTERACTION ... will not track touches
|
||||
* focus, keyboard, selector events
|
||||
* - EventTrackingMode.IGNORE_NAVIGATION_INTERACTION ... will not track screen names
|
||||
* - EventTrackingMode.IGNORE_RAGE_CLICKS ... will not track rage clicks
|
||||
* - EventTrackingMode.NO_TRACKING ... not gonna track any events
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setEventTrackingMode(eventTrackingMode: SmartlookEventTrackingMode): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* You can configure which events are being tracked by setting eventTrackingMode.
|
||||
* @param eventTrackingModes Array of EventTrackingModes.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setEventTrackingModes(eventTrackingModes: SmartlookEventTrackingModes): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Track custom navigation event.
|
||||
* @param navigationEvent SmartlookNavigationEvent object.
|
||||
|
||||
@@ -282,4 +282,21 @@ export class SocialSharing extends IonicNativePlugin {
|
||||
saveToPhotoAlbum(fileOrFileArray: string | string[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shares directly to a WhatsApp Contact with phone number.
|
||||
* @param phone {string} Pass phone number
|
||||
* @param message {string} Message to send
|
||||
* @param fileOrFileArray fileOrFileArray Single or multiple files
|
||||
* @param url {string} Link to send
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 5,
|
||||
errorIndex: 6,
|
||||
platforms: ['iOS', 'Android'],
|
||||
})
|
||||
shareViaWhatsAppToPhone(phone: string, message: string, fileOrFileArray: string | string[], url?: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,10 @@ export interface SQLiteDatabaseConfig {
|
||||
* iOS Database Location. Example: 'Library'
|
||||
*/
|
||||
iosDatabaseLocation?: string;
|
||||
/**
|
||||
* support arbitrary database location on android with https://github.com/litehelpers/cordova-sqlite-evcore-extbuild-free
|
||||
*/
|
||||
androidDatabaseLocation?: string;
|
||||
/**
|
||||
* support opening pre-filled databases with https://github.com/litehelpers/cordova-sqlite-ext
|
||||
*/
|
||||
|
||||
89
src/@ionic-native/plugins/text-to-speech-advanced/index.ts
Normal file
89
src/@ionic-native/plugins/text-to-speech-advanced/index.ts
Normal file
@@ -0,0 +1,89 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface TTSOptions {
|
||||
/** text to speak */
|
||||
text: string;
|
||||
/** cancel, boolean: true/false */
|
||||
identifier: string;
|
||||
/** voice identifier (iOS / Android) from getVoices */
|
||||
locale?: string;
|
||||
/** speed rate, 0 ~ 1 */
|
||||
rate?: number;
|
||||
/** pitch, 0 ~ 1 */
|
||||
pitch?: number;
|
||||
/** cancel, boolean: true/false */
|
||||
cancel?: boolean;
|
||||
}
|
||||
|
||||
export interface TTSVoice {
|
||||
/** Voice name */
|
||||
name: string;
|
||||
/** Voice language */
|
||||
language: string;
|
||||
/** Voice identifier string */
|
||||
identifier: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Text To Speech Advanced
|
||||
* @description
|
||||
* Text to Speech plugin
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { TextToSpeechAdvanced } from '@ionic-native/text-to-speech-advanced/ngx';
|
||||
*
|
||||
* constructor(private tts: TextToSpeechAdvanced) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.tts.speak('Hello World')
|
||||
* .then(() => console.log('Success'))
|
||||
* .catch((reason: any) => console.log(reason));
|
||||
*
|
||||
* ```
|
||||
* @interfaces
|
||||
* TTSOptions
|
||||
* TTSVoice
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Text To Speech Advanced',
|
||||
plugin: 'cordova-plugin-tts-advanced',
|
||||
pluginRef: 'TTS',
|
||||
repo: 'https://github.com/spasma/cordova-plugin-tts-advanced',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class TextToSpeechAdvanced extends IonicNativePlugin {
|
||||
/**
|
||||
* This function speaks
|
||||
* @param textOrOptions {string | TTSOptions} Text to speak or TTSOptions
|
||||
* @return {Promise<any>} Returns a promise that resolves when the speaking finishes
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
})
|
||||
speak(textOrOptions: string | TTSOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop any current TTS playback
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
stop(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all voices
|
||||
* @return {Promise<TTSVoice[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
getVoices(): Promise<TTSVoice[]> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -138,9 +138,9 @@ export enum RequestType {
|
||||
*/
|
||||
RQST = 'RQST',
|
||||
/**
|
||||
* Set this type if the data exchange with UMP is 1:N pr 0:N. Sending a datastructure is optional and is dependent on the process agent function.
|
||||
* If the process agent function is marked with metadata delete flag, then server data replaces the data in database.
|
||||
* If the process agent function is NOT marked with metadata delete flag, then this request type behaves the same as QUERY
|
||||
* Set this type if the data exchange with UMP is 1:N pr 0:N. Sending a datastructure is optional and is dependent on the Process Agent function.
|
||||
* If the Process Agent function is marked with metadata delete flag, then server data replaces the data in database.
|
||||
* If the Process Agent function is NOT marked with metadata delete flag, then this request type behaves the same as QUERY
|
||||
*/
|
||||
PULL = 'PULL',
|
||||
/**
|
||||
@@ -148,7 +148,7 @@ export enum RequestType {
|
||||
*/
|
||||
PUSH = 'PUSH',
|
||||
/**
|
||||
* Set this type if the data exchange with UMP is 1:N pr 0:N. Sending a datastructure is optional and is dependent on the process agent function.
|
||||
* Set this type if the data exchange with UMP is 1:N pr 0:N. Sending a datastructure is optional and is dependent on the Process Agent function.
|
||||
* Unlike PULL, this request type updates the data in database without deleting existing entries.
|
||||
*/
|
||||
QUERY = 'QUERY',
|
||||
@@ -203,6 +203,10 @@ export enum NotificationListenerType {
|
||||
* Notify attachment downloads completed
|
||||
*/
|
||||
attachmentDownloadCompleted = 10,
|
||||
/**
|
||||
* Notify when the sent item count changes.
|
||||
*/
|
||||
SentItemChanged = 11,
|
||||
}
|
||||
|
||||
export enum AttachmentItemStatus {
|
||||
@@ -225,7 +229,7 @@ export class Settings {
|
||||
ADS_USER_ID: string;
|
||||
SAP_USER_ID: string;
|
||||
FULL_NAME: string;
|
||||
URL: string;
|
||||
SERVER_URL: string;
|
||||
USER_ID: string;
|
||||
}
|
||||
|
||||
@@ -310,7 +314,7 @@ export class LoginParameters {
|
||||
password: string;
|
||||
|
||||
/**
|
||||
* UMP URL. For example: http://192.168.98.160:8080/UMP
|
||||
* UMP URL. For example: https://umpdev.unvired.io/UMP
|
||||
*/
|
||||
url: string;
|
||||
|
||||
@@ -384,12 +388,19 @@ export class LoginParameters {
|
||||
* Set this value to true to persist web application database. By default, this value is false.
|
||||
*/
|
||||
persistWebDb: boolean;
|
||||
|
||||
/*
|
||||
* Optional jwt token parameter. Please check with your Unvired Admin for this value.
|
||||
* For Example:
|
||||
* loginParameters.jwtOptions = {"app": "myapp"};
|
||||
*/
|
||||
jwtOptions: object;
|
||||
|
||||
/**
|
||||
* Language code to be sent to UMP. Specify a two-letter language code.
|
||||
* The default value of this is 'en'.
|
||||
*/
|
||||
languageCode: string;
|
||||
}
|
||||
export class LoginResult extends UnviredResult {
|
||||
type: LoginListenerType;
|
||||
@@ -410,10 +421,19 @@ export class AuthenticateLocalResult extends UnviredResult {
|
||||
* -
|
||||
* iOS Requirements
|
||||
* -
|
||||
* This plugin uses Cocoapods to install dependent libraries. Please make sure you have a valid Cocoapods installation.
|
||||
* Once you have it ready, do update the cocoapods repo by running the following command before you install this plugin.
|
||||
* Update your Cocoapods repo before you install the plugin.
|
||||
* ```
|
||||
* pod repo update
|
||||
* $ pod repo update
|
||||
* ```
|
||||
* -
|
||||
* Browser Requirements
|
||||
* -
|
||||
* After you install the plugin, for Ionic/Angular projects, please add a reference to the following JS files within <head></head> section of index.html.
|
||||
* ```
|
||||
* <script src="assets/js/sql.js"></script>
|
||||
* <script src="assets/js/kernel.js"></script>
|
||||
* <script src="assets/js/winstore-jscompat.js"></script>
|
||||
* <script src="assets/js/jquery-3.2.1.js"></script>
|
||||
* ```
|
||||
* @usage
|
||||
* ```typescript
|
||||
@@ -496,11 +516,26 @@ export class AuthenticateLocalResult extends UnviredResult {
|
||||
*
|
||||
*
|
||||
* // Synchronization APIs
|
||||
* // Make sync call.
|
||||
* let result = await this.unviredSDK.syncForeground(RequestType.QUERY, null, {"CUSTOMER_HEADER": {"field1" : "value1", "field2" : "value2"}}, 'UNVIRED_DIGITAL_FORMS_PA_MOBILE_GET_USERS', true)
|
||||
* // Example 1: Make a Sync RQST call
|
||||
* ```
|
||||
* await this.unviredSDK.syncForeground(RequestType.RQST, {"CUSTOMER_HEADER": {"CUST_NO" : "007", "CUST_NAME" : "James Bond"}}, '', 'PA_GET_CUSTOMER_DETAILS', true)
|
||||
* ```
|
||||
*
|
||||
* // Example 2: Make a Sync QUERY / PULL call
|
||||
* ```
|
||||
* await this.unviredSDK.syncForeground(RequestType.QUERY, '', {"CUSTOMER_SEARCH_CONTEXT":[{"CUSTOMER_SEARCH_HEADER":{"CUST_NO":"007"}}]}, 'PA_SEARCH_CUSTOMER', true)
|
||||
* ```
|
||||
*
|
||||
* Example 3: Make a Async RQST call
|
||||
* ```
|
||||
* await this.unviredSDK.syncBackground(RequestType.RQST, {"CUSTOMER_HEADER": {"CUST_NO" : "007", "CUST_NAME" : "James Bond"}}, '', 'PA_GET_CUSTOMER_DETAILS', 'CUSTOMER', beLID, false)
|
||||
* ```
|
||||
*
|
||||
* Example 4: Make a Async QUERY / PULL call
|
||||
* ```
|
||||
* await this.unviredSDK.syncBackground(RequestType.QUERY, '', {"CUSTOMER_SEARCH_CONTEXT":[{"CUSTOMER_SEARCH_HEADER":{"CUST_NO":"007"}}]}, 'PA_SEARCH_CUSTOMER', '', '', true)
|
||||
* ```
|
||||
*
|
||||
* // Make async call.
|
||||
* let result = await this.unviredSDK.syncBackground(RequestType.QUERY, null, inputObj, 'UNVIRED_DIGITAL_FORMS_PA_MOBILE_GET_USERS', 'INPUT_GET_USERS', 'GUID', false)
|
||||
* // Note: Subscribe to NotificationListener to get updates on data processing in background
|
||||
* // However, only one screen can listen to background data updates at any point of time.
|
||||
* this.unviredSDK.registerNotifListener().subscribe( data => {
|
||||
@@ -522,20 +557,20 @@ export class AuthenticateLocalResult extends UnviredResult {
|
||||
*
|
||||
* // Database APIs
|
||||
* // Insert a record onto database
|
||||
* this.unviredsdk.dbInsert("CUSTOMER_HEADER", {"NAME":"USER","NO":"0039"}, true);
|
||||
* this.unviredsdk.dbInsert("CUSTOMER_HEADER", {"NAME":"James Bond","CUST_NO":"007"}, true);
|
||||
*
|
||||
* // Update a record in database
|
||||
* this.unviredSDK.dbUpdate('CUSTOMER_HEADER', {"NAME":"UPDATED_USER","NO":"UPDATED_NO"}, "FORM_ID = '5caed815892215034dacad56'")
|
||||
* this.unviredSDK.dbUpdate('CUSTOMER_HEADER', {"NAME":"John Doe","CUST_NO":"008"}, "CUST_NO = '007'")
|
||||
*
|
||||
* // Delete a record in database
|
||||
* this.unviredSDK.dbDelete('CUSTOMER_HEADER', "FORM_ID = '5caed815892215034dacad56'")
|
||||
* this.unviredSDK.dbDelete('CUSTOMER_HEADER', "CUST_NO = '007'")
|
||||
*
|
||||
* // Execute a SQL Query
|
||||
* this.unviredSDK.dbExecuteStatement('SELECT * FROM CUSTOMER_HEADER WHERE CUSTOMER_ID = "0039"')
|
||||
* this.unviredSDK.dbExecuteStatement('SELECT * FROM CUSTOMER_HEADER WHERE CUSTOMER_ID = "007"')
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'UnviredCordovaSDK',
|
||||
plugin: 'https://github.com/unvired/cordova-plugin-unvired-sdk', // npm package name, example: cordova-plugin-camera
|
||||
plugin: 'cordova-plugin-unvired-sdk', // npm package name, example: cordova-plugin-camera
|
||||
pluginRef: 'ump', // the variable reference to call the plugin, example: navigator.geolocation
|
||||
repo: 'https://github.com/unvired/cordova-plugin-unvired-sdk/', // the github repository URL for the plugin
|
||||
install: 'ionic cordova plugin add @ionic-native/unvired-cordova-sdk', // OPTIONAL install command, in case the plugin requires variables
|
||||
@@ -774,6 +809,21 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Get User settings.
|
||||
* Returns User setting in the following format:
|
||||
* ```
|
||||
* {
|
||||
* "UNVIRED_ID": "", // The Unvired ID configured in UMP
|
||||
* "USER_ID": "", // Deprecated. Select among UNVIRED_ID / EMAIL / ADS_USER_ID / SAP_USER_ID depending on the LoginType
|
||||
* "FULL_NAME": "FirstName LastName",
|
||||
* "EMAIL": "abc@example.com", // Email id of the user as configurd in UMP
|
||||
* "SERVER_URL": "https://umpdev.unvired.io/UMP", // UMP Server's URL
|
||||
* "SAP_USER_ID": "SAP_ID", // If LoginType is SAP
|
||||
* "SAP_PORT_NAME": "", // If LoginType is SAP
|
||||
* "LOGIN_TYPE": "", // @see LoginType
|
||||
* "ADS_USER_ID": "ADS_USER_ID", // If LoginType is ADS
|
||||
* "ADS_DOMAIN": "ADS_DOMAIN" // If LoginType is ADS
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
@Cordova()
|
||||
userSettings(): Promise<SettingsResult> {
|
||||
@@ -1057,14 +1107,14 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
|
||||
* attachmentObject.LID = guid(); // Random id
|
||||
* attachmentObject.FID = lid // LID of the header.
|
||||
* attachmentObject.UID = guid(); // Random id
|
||||
* attachmentObject.EXTERNAL_URL = ""; // Optional: Check with your Unvired Process agent developer.
|
||||
* attachmentObject.EXTERNAL_URL = ""; // Optional: Check with your Unvired Process Agent developer.
|
||||
* attachmentObject.FILE_NAME = 'myfile.jpg'; // Name of the file as stored in the device.
|
||||
* attachmentObject.LOCAL_PATH = /<folder_location>/myfile.jpg // File path. Please make sure that the path starts with a '/'
|
||||
* attachmentObject.TAG1 = '' // Optional: Check with your Unvired Process agent developer.
|
||||
* attachmentObject.TAG2 = '' // Optional: Check with your Unvired Process agent developer.
|
||||
* attachmentObject.TAG2 = '' // Optional: Check with your Unvired Process agent developer.
|
||||
* attachmentObject.TAG4 = '' // Optional: Check with your Unvired Process agent developer.
|
||||
* attachmentObject.TAG5 = '' // Optional: Check with your Unvired Process agent developer.
|
||||
* attachmentObject.TAG1 = '' // Optional: Check with your Unvired Process Agent developer.
|
||||
* attachmentObject.TAG2 = '' // Optional: Check with your Unvired Process Agent developer.
|
||||
* attachmentObject.TAG2 = '' // Optional: Check with your Unvired Process Agent developer.
|
||||
* attachmentObject.TAG4 = '' // Optional: Check with your Unvired Process Agent developer.
|
||||
* attachmentObject.TAG5 = '' // Optional: Check with your Unvired Process Agent developer.
|
||||
* await this.unviredCordovaSDK.createAttachmentItem('INSPECTION_ATTACHMENT', attachmentObject)
|
||||
* ```
|
||||
*/
|
||||
@@ -1095,24 +1145,50 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends data to UMP in SYNC mode. This means user has to wait until the duration of SYNC call. Only one SYNC call can be active at any point of time. Once the call completes, the result data would be available in the Promise.
|
||||
* Apps typically block UI during a SYNC call so that there are user-actions when the SYNC call is active.
|
||||
* Sends data to UMP in Sync mode. This means user has to wait until the duration of SYNC call. Only one SYNC call can be active at any point of time. Once the call completes, the result would be available in the Promise.
|
||||
* Apps typically block UI during a SYNC call so that there are no user-actions possible until the call completes.
|
||||
*
|
||||
* Example 1: Make a RQST call
|
||||
* ```
|
||||
* await this.unviredSDK.syncForeground(RequestType.RQST, {"CUSTOMER_HEADER": {"CUST_NO" : "007", "CUST_NAME" : "James Bond"}}, '', 'PA_GET_CUSTOMER_DETAILS', true)
|
||||
* ```
|
||||
*
|
||||
* Example 2: Make a QUERY / PULL call
|
||||
* ```
|
||||
* await this.unviredSDK.syncForeground(RequestType.QUERY, '', {"CUSTOMER_SEARCH_CONTEXT":[{"CUSTOMER_SEARCH_HEADER":{"CUST_NO":"007"}}]}, 'PA_SEARCH_CUSTOMER', true)
|
||||
* ```
|
||||
*
|
||||
* @param reqype RequestType for the message. Please check RequestType to select the right request type.
|
||||
* @param header {Object} Header datastructure to be sent to UMP. Header datastructure is mandatory of the request type is RQST.
|
||||
* For PA functions which do not accept any input, set an empty string for this parameter.
|
||||
* Example: If Header datastructure needs to be sent, make sure the header datastructure is in the following format:
|
||||
* ```
|
||||
* {"CUSTOMER_HEADER": {"field1" : "value1", "field2" : "value2"}}
|
||||
* ```
|
||||
* @param customData {Object} This depends on the PA function. This is useful if you want to send custom data to a PA function.
|
||||
* Example: You can also use this parameter to send header datastrucrture provided the data structure is formatted like this.
|
||||
* ```
|
||||
* @param header {Object} Send a value for this parameter only if RequestType is RQST. For others, send an empty string. This parameter represents the header datastructure of the Business Entity which needs to be sent as input to a Process Agent function.
|
||||
* Before you make this call, ensure that the object statuses are updated for header and child tables.
|
||||
* Framework builds the input by considering only those child entities whose object status is one among ADD, MODIFY or DELETE.
|
||||
* Example:
|
||||
* ```json
|
||||
* {
|
||||
* "CATEGORY_BE": [{
|
||||
* "CATEGORY_HEADER": {"field1" : "value1", "field2" : "value2"}
|
||||
* }]
|
||||
* "NAME_OF_HEADER": {
|
||||
* "FIELD1": "FIELD_1_VALUE",
|
||||
* "FIELD2": "FIELD_2_VALUE"
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @param customData {Object} Send a value for this parameter only if |reqType| is QUERY or PULL. For others, send an empty string.
|
||||
* This parameter represents the actual input which need to be sent to the server. Usually this is an input entity, but check with your Process Agent developer on the type of input.
|
||||
*
|
||||
* Example:
|
||||
* ```json
|
||||
* {
|
||||
* "BE_NAME": [
|
||||
* {
|
||||
* "NAME_OF_HEADER": {
|
||||
* "FIELD1": "FIELD_1_VALUE",
|
||||
* "FIELD2": "FIELD_2_VALUE"
|
||||
* }
|
||||
* }
|
||||
* ]
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @param paFunction Name of the Process Agent function to be executed. Example: PA_MOBILE_EXECUTE_SALES_ORDER.
|
||||
* @param autoSave This defines whether to save the response to database.
|
||||
*/
|
||||
@@ -1128,28 +1204,63 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends data to UMP in ASYNC mode. This means user can make this call and continue with other program execution.
|
||||
* Make an async call to UMP.
|
||||
* The result of the call would be notified through the observable returned for the function registerNotifListener().
|
||||
*
|
||||
* Pre-requisites:
|
||||
* 1. Object status is updated for header and items which need to be synced with the server.
|
||||
* 2. Updated header and items are saved in database.
|
||||
* 3. The LID of the header. This value needs to be passed for the parameter `belid`.
|
||||
*
|
||||
* Example 1: Make a RQST call
|
||||
* ```
|
||||
* let customerHeader = new CUSTOMER_HEADER()
|
||||
* customerHeader.LID = // TODO
|
||||
* customerHeader.CUST_NO = '007'
|
||||
* customerHeader.CUST_NAME = 'James Bond'
|
||||
*
|
||||
* await this.unviredSDK.syncBackground(RequestType.RQST, {"CUSTOMER_HEADER": customerHeader}, '', 'PA_GET_CUSTOMER_DETAILS', 'CUSTOMER', customerHeader.LID, false)
|
||||
* ```
|
||||
* Example 2: Make a QUERY / PULL call
|
||||
* ```
|
||||
* await this.unviredSDK.syncBackground(RequestType.QUERY, '', {"CUSTOMER_SEARCH_CONTEXT":[{"CUSTOMER_SEARCH_HEADER":{"CUST_NO":"007"}}]}, 'PA_SEARCH_CUSTOMER', '', '', true)
|
||||
* ```
|
||||
*
|
||||
* @param reqype RequestType for the message. Please check RequestType to select the right request type.
|
||||
* @param header {Object} Header datastructure to be sent to UMP. Header datastructure is mandatory of the request type is RQST.
|
||||
* For PA functions which do not accept any input, set an empty string for this parameter.
|
||||
* Example: If Header datastructure needs to be sent, make sure the header datastructure is in the following format:
|
||||
* ```
|
||||
* {"CUSTOMER_HEADER": {"field1" : "value1", "field2" : "value2"}}
|
||||
* ```
|
||||
* @param customData {Object} This depends on the PA function. This is useful if you want to send custom data to a PA function.
|
||||
* Example: You can also use this parameter to send header datastrucrture provided the data structure is formatted like this.
|
||||
* ```
|
||||
* @param header {Object} Send a value for this parameter only if RequestType is RQST. For others, send an empty string. This parameter represents the header datastructure of the Business Entity which needs to be sent as input to a Process Agent function.
|
||||
* Before you make this call, ensure that the object statuses are updated for header and child tables.
|
||||
* Framework builds the input by considering only those child entities whose object status is one among ADD, MODIFY or DELETE.
|
||||
* Example:
|
||||
* ```json
|
||||
* {
|
||||
* "CATEGORY_BE": [{
|
||||
* "CATEGORY_HEADER": {"field1" : "value1", "field2" : "value2"}
|
||||
* }]
|
||||
* "NAME_OF_HEADER": {
|
||||
* "FIELD1": "FIELD_1_VALUE",
|
||||
* "FIELD2": "FIELD_2_VALUE"
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @param customData {Object} Send a value for this parameter only if |reqType| is QUERY or PULL. For others, send an empty string.
|
||||
* This parameter represents the actual input which need to be sent to the server. Usually this is an input entity, but check with your Process Agent developer on the type of input.
|
||||
*
|
||||
* Example:
|
||||
* ```json
|
||||
* {
|
||||
* "BE_NAME": [
|
||||
* {
|
||||
* "NAME_OF_HEADER": {
|
||||
* "FIELD1": "FIELD_1_VALUE",
|
||||
* "FIELD2": "FIELD_2_VALUE"
|
||||
* }
|
||||
* }
|
||||
* ]
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @param paFunction Name of the Process Agent function to be executed. Example: PA_MOBILE_EXECUTE_SALES_ORDER.
|
||||
* @param beName Name of the Business Entity
|
||||
* @param belid LID of the Header datastructure
|
||||
* @param bypassAttachment Set this flag to false if you want to upload attachments first and then make the server call.
|
||||
* @param beName Name of the Business Entity. Required for the RequestType RQST only. For others, send empty string.
|
||||
* @param belid LID of the Header datastructure. Required for the RequestType RQST only. For others, send empty string.
|
||||
* @param bypassAttachment a true value would upload the data to the server followed by attachments. A false value would do the reverse.
|
||||
*/
|
||||
@Cordova()
|
||||
syncBackground(
|
||||
@@ -1233,7 +1344,7 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Subscribe to this observable to listen for life-cyle events in the case of an async message.
|
||||
* Only one class can subscribe to notifications are any point of time.
|
||||
* Only one class can subscribe to notifications at any point of time.
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
@@ -1372,4 +1483,35 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
|
||||
unlockDataSender(): Promise<UnviredResult> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mobile Platform only.
|
||||
* Delete an outbox item based on header's lid.
|
||||
*/
|
||||
@Cordova()
|
||||
removeOutObjectBasedOnLid(lid: string): Promise<UnviredResult> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an observable to return the UMP URLs which are discoverable within the network.
|
||||
* Clients can use this information to allow users to select UMP servers in login page.
|
||||
* ```
|
||||
* this.unviredSDK.startDiscoveryService().subscribe( (result) => {
|
||||
* if (result.type == ResultType.success) {
|
||||
* console.log('Discovered URLs: ' + JSON.stringify(result.data))
|
||||
* // {"name":"Chyme 98","url":"http://192.168.98.98:8080/UMP/","root":"UNVIRED","type":"DEVELOPMENT"}
|
||||
* }
|
||||
* else {
|
||||
* console.log('Error in discovering URLs: ' + result.error)
|
||||
* }
|
||||
* })
|
||||
* ```
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
})
|
||||
startDiscoveryService(): Observable<UnviredResult> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,17 +239,6 @@ export class WonderPush extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the SDK is ready to operate.
|
||||
*
|
||||
* The SDK is ready when it is initialized and has fetched an access token.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
isReady(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Controls native SDK logging.
|
||||
* @param {boolean} enabled - Whether to enable logs.
|
||||
|
||||
Reference in New Issue
Block a user