mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-02-16 00:00:02 +08:00
Compare commits
1 Commits
v5.35.0
...
docs-premi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f678a0ad8 |
71
.github/workflows/codeql-analysis.yml
vendored
71
.github/workflows/codeql-analysis.yml
vendored
@@ -1,71 +0,0 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ master ]
|
||||
schedule:
|
||||
- cron: '37 7 * * 2'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'javascript' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
|
||||
# Learn more:
|
||||
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
19
.github/workflows/nodejs.yml
vendored
19
.github/workflows/nodejs.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [14.x]
|
||||
node-version: [12.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
@@ -17,17 +17,6 @@ jobs:
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Cache ionic site
|
||||
id: ionic-site
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/ionic-site/
|
||||
key: ionic-site-${{ hashFiles('**/package-lock.json') }}
|
||||
- name: Setup git
|
||||
run: bash ./scripts/git/config.sh
|
||||
- name: Prepare ionic-site repo
|
||||
if: github.ref == 'refs/heads/master'
|
||||
run: bash ./scripts/docs/prepare.sh
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Lint
|
||||
@@ -38,9 +27,5 @@ jobs:
|
||||
run: npm run test
|
||||
- name: Readmes
|
||||
run: npm run readmes
|
||||
- name: Deploy doc
|
||||
if: github.ref == 'refs/heads/master'
|
||||
run: bash ./scripts/docs/update_docs.sh
|
||||
env:
|
||||
GITHUB_PROJECT_REPONAME: ${{ github.repository }}
|
||||
GITHUB_SHA1: ${{ github.sha }}
|
||||
CI: true
|
||||
|
||||
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: 14
|
||||
node-version: 12
|
||||
- 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: 14
|
||||
node-version: 12
|
||||
registry-url: https://registry.npmjs.org/
|
||||
- run: npm ci
|
||||
- run: npm run shipit
|
||||
|
||||
17
.github/workflows/rebase.yml
vendored
Normal file
17
.github/workflows/rebase.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
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 }}
|
||||
1
.husky/.gitignore
vendored
1
.husky/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
_
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx --no-install lint-staged
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npm test
|
||||
@@ -4,6 +4,3 @@ node_modules
|
||||
.vscode
|
||||
dist
|
||||
CHANGELOG.md
|
||||
.husky
|
||||
.prettierignore
|
||||
LICENSE
|
||||
251
CHANGELOG.md
251
CHANGELOG.md
@@ -1,254 +1,3 @@
|
||||
# [5.35.0](https://github.com/ionic-team/ionic-native/compare/v5.34.0...v5.35.0) (2021-08-02)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **checkout:** Update npm cordova plugin name ([#3694](https://github.com/ionic-team/ionic-native/issues/3694)) ([104cad1](https://github.com/ionic-team/ionic-native/commit/104cad14a31437816b5e272d5de4550eb1452311))
|
||||
* **purchases:** remove duplicated imports ([1ff54f6](https://github.com/ionic-team/ionic-native/commit/1ff54f64da88d12b6f2bd48ef1d6b462fa6e1665))
|
||||
* **webserver:** update to maintained repo ([#3696](https://github.com/ionic-team/ionic-native/issues/3696)) ([d506795](https://github.com/ionic-team/ionic-native/commit/d50679571598405893d02911e84b0f283d525e5f))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **approov-advanced-http:** add plugin ([#3682](https://github.com/ionic-team/ionic-native/issues/3682)) ([b206b42](https://github.com/ionic-team/ionic-native/commit/b206b42f85c6603ccb125f57ff5c0cc839d78e2c))
|
||||
* **CustomUiSDK:** added app invoke method ([#3699](https://github.com/ionic-team/ionic-native/issues/3699)) ([72335bf](https://github.com/ionic-team/ionic-native/commit/72335bfd59e061270a62dae33c9a258e8f0d3f7d))
|
||||
* **hyper-track:** add interfaces to access new cordova plugin APIs ([#3698](https://github.com/ionic-team/ionic-native/issues/3698)) ([aae484d](https://github.com/ionic-team/ionic-native/commit/aae484dfe96bf36ece91f7aca617faa3c0650e28))
|
||||
* **pollfish:** add plugin ([#3693](https://github.com/ionic-team/ionic-native/issues/3693)) ([8a00ccc](https://github.com/ionic-team/ionic-native/commit/8a00ccc43bf8aa0e90737e9ed8180be6f8005899))
|
||||
* **purchases:** update to 2.3.0, add identity v3 ([#3702](https://github.com/ionic-team/ionic-native/issues/3702)) ([93b1e11](https://github.com/ionic-team/ionic-native/commit/93b1e1189849715af0f823675dda4c4587b7ed13))
|
||||
* **unvired-cordova-sdk:** add ability to receive the JWT token ([#3671](https://github.com/ionic-team/ionic-native/issues/3671)) ([50d9110](https://github.com/ionic-team/ionic-native/commit/50d91103cc53afd91c42c78e549bf17e5d00dac7))
|
||||
* **urbanairship:** add new methods: onDeepLink, onRegistration, onInboxUpdated, onShowInbox, onPushReceived, onNotificationOpened, onNotificationOptInStatus; fix return type for reattach method ([#3705](https://github.com/ionic-team/ionic-native/issues/3705)) ([815d1bb](https://github.com/ionic-team/ionic-native/commit/815d1bb1f8c6128203d2b0e2be70765718f88d7d))
|
||||
|
||||
|
||||
|
||||
# [5.34.0](https://github.com/ionic-team/ionic-native/compare/v5.33.1...v5.34.0) (2021-06-29)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **android-full-screen:** add correct return type ([#3677](https://github.com/ionic-team/ionic-native/issues/3677)) ([c5d6066](https://github.com/ionic-team/ionic-native/commit/c5d606633e0ce69c94eb99d205c655c5a0d94523)), closes [/github.com/mesmotronic/cordova-plugin-fullscreen/blob/master/src/android/com/mesmotronic/plugins/FullScreenPlugin.java#L129](https://github.com//github.com/mesmotronic/cordova-plugin-fullscreen/blob/master/src/android/com/mesmotronic/plugins/FullScreenPlugin.java/issues/L129)
|
||||
* **mobile-messaging:** revision of optional parameters ([#3667](https://github.com/ionic-team/ionic-native/issues/3667)) ([944d251](https://github.com/ionic-team/ionic-native/commit/944d25147f2c0b89d0e7acb1fa1a6fe7fa4941f7))
|
||||
* **smartlook:** fix SmartlookResetSession.resetUser type to boolean ([#3692](https://github.com/ionic-team/ionic-native/issues/3692)) ([5a42e8c](https://github.com/ionic-team/ionic-native/commit/5a42e8cadfc0d5269c4e06149c2d1ecf4ad721f7))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **branch-io:** add sendBranchEvent method; deprecated sendCommerceEvent ([#3675](https://github.com/ionic-team/ionic-native/issues/3675)) ([4f13426](https://github.com/ionic-team/ionic-native/commit/4f13426a6dd820880f21c6e52a30a4db5f0c5c0a))
|
||||
* **checkout:** add plugin ([#3687](https://github.com/ionic-team/ionic-native/issues/3687)) ([0dcbace](https://github.com/ionic-team/ionic-native/commit/0dcbace8223c5c9a4c3474c7bff291e00da06b0b))
|
||||
* **in-app-purchase-2:** added manageBilling method ([#3690](https://github.com/ionic-team/ionic-native/issues/3690)) ([383a884](https://github.com/ionic-team/ionic-native/commit/383a88463a16b47da8aeb79707f342411028f889))
|
||||
* **paytabs:** add plugin ([#3678](https://github.com/ionic-team/ionic-native/issues/3678)) ([9dd719b](https://github.com/ionic-team/ionic-native/commit/9dd719bb07a1278f38e188fa075283e54e0654d1))
|
||||
|
||||
|
||||
|
||||
## [5.33.1](https://github.com/ionic-team/ionic-native/compare/v5.33.0...v5.33.1) (2021-05-28)
|
||||
|
||||
|
||||
|
||||
# [5.33.0](https://github.com/ionic-team/ionic-native/compare/v5.32.1...v5.33.0) (2021-05-11)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **unvired-cordova-sdk:** Update the return type for startDiscoveryService api ([#3647](https://github.com/ionic-team/ionic-native/issues/3647)) ([b2da307](https://github.com/ionic-team/ionic-native/commit/b2da3078372c336864ab78528c5ae0c13a81a27b))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **background-upload:** add INITIALIZED state ([#3658](https://github.com/ionic-team/ionic-native/issues/3658)) ([065e80c](https://github.com/ionic-team/ionic-native/commit/065e80cccf142d283075a800bdd46656cb613a0f))
|
||||
* **ble:** update with setPin to allow set device pin ([#3652](https://github.com/ionic-team/ionic-native/issues/3652)) ([da4ce96](https://github.com/ionic-team/ionic-native/commit/da4ce96be4fc0dd763405f53498b11b00974f771))
|
||||
* **branch-io:** add initSessionWithCallback method ([#3660](https://github.com/ionic-team/ionic-native/issues/3660)) ([4435155](https://github.com/ionic-team/ionic-native/commit/443515582b380fe6643c6db19a5f17999e979d5b))
|
||||
* **facebook:** add new methods ([#3654](https://github.com/ionic-team/ionic-native/issues/3654)) ([826f808](https://github.com/ionic-team/ionic-native/commit/826f8085a45c39eb2c43d60bd98d34ff5619ce82))
|
||||
* **local-backup:** add plugin ([#3656](https://github.com/ionic-team/ionic-native/issues/3656)) ([c05b3e9](https://github.com/ionic-team/ionic-native/commit/c05b3e96722ee85c4771aa70236a77e1b60f60e2))
|
||||
* **restart:** add plugin ([#3657](https://github.com/ionic-team/ionic-native/issues/3657)) ([5752294](https://github.com/ionic-team/ionic-native/commit/575229412b335a720a284ffe67839488f3de2996))
|
||||
* **system-alert-window-permission:** add plugin ([#3659](https://github.com/ionic-team/ionic-native/issues/3659)) ([50f8a45](https://github.com/ionic-team/ionic-native/commit/50f8a452ad4e36e3554a417d2051f0389bf7d7d2))
|
||||
|
||||
|
||||
|
||||
## [5.32.1](https://github.com/ionic-team/ionic-native/compare/v5.32.0...v5.32.1) (2021-04-15)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **network:** onChange no longer causes error ([#3651](https://github.com/ionic-team/ionic-native/issues/3651)) ([16fee22](https://github.com/ionic-team/ionic-native/commit/16fee2268aed8c8bf26ef36f236349e222da3375)), closes [#3649](https://github.com/ionic-team/ionic-native/issues/3649)
|
||||
|
||||
|
||||
|
||||
# [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)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **ble:** add missing method "isLocationEnabled" ([#3495](https://github.com/ionic-team/ionic-native/issues/3495)) ([b4462d5](https://github.com/ionic-team/ionic-native/commit/b4462d5e6c12f144412001cade1020b5f88b4ae5))
|
||||
* **geolocation:** [#3303](https://github.com/ionic-team/ionic-native/issues/3303) geolocation watchPosition return type ([#3470](https://github.com/ionic-team/ionic-native/issues/3470)) ([579170a](https://github.com/ionic-team/ionic-native/commit/579170a99ea8a53634631b76ffa19b6b635c1d03))
|
||||
* **hyper-track:** update to the modern sdk ([#3508](https://github.com/ionic-team/ionic-native/issues/3508)) ([44f86f3](https://github.com/ionic-team/ionic-native/commit/44f86f3ce5f6912f1cc0b4596e43066571c96b44))
|
||||
* **ibeacon:** undefined locationManager ([#3505](https://github.com/ionic-team/ionic-native/issues/3505)) ([1ffad79](https://github.com/ionic-team/ionic-native/commit/1ffad79320f83038d1fc09e9112c40c86d948416))
|
||||
* **metrix:** change firebase api ([#3473](https://github.com/ionic-team/ionic-native/issues/3473)) ([b0ffb0e](https://github.com/ionic-team/ionic-native/commit/b0ffb0ec4a035097c8a413f31b2382dae1eda4c7))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **clover-go:** add support to pass signature and void payment ([#3485](https://github.com/ionic-team/ionic-native/issues/3485)) ([26d10ef](https://github.com/ionic-team/ionic-native/commit/26d10ef63346782e6d8ed37ca89bd2dd7402aa0a))
|
||||
* **diagnostics:** Add support for new iOS14-LocationAccuracy Permission ([#3490](https://github.com/ionic-team/ionic-native/issues/3490)) ([ccca644](https://github.com/ionic-team/ionic-native/commit/ccca644134999365a729b4a7d554da6a011eb693))
|
||||
* **nfc:** update to phonegap-nfc@1.2.0 ([#3486](https://github.com/ionic-team/ionic-native/issues/3486)) ([d7ccd45](https://github.com/ionic-team/ionic-native/commit/d7ccd454fb757d8d3be57a70bfa7fb3c269e3318))
|
||||
* **onesignal:** add in-app messages methods ([#3481](https://github.com/ionic-team/ionic-native/issues/3481)) ([eec3fec](https://github.com/ionic-team/ionic-native/commit/eec3fec7ff820e96443e6e3f0d7bf96dac359038))
|
||||
* **purchases:** update to plugin version 1.2.0 ([#3482](https://github.com/ionic-team/ionic-native/issues/3482)) ([a010bb1](https://github.com/ionic-team/ionic-native/commit/a010bb186964b8b825ab80f9cf6092794ee2e4b1))
|
||||
* **smartlook:** update to 1.5.2 ([#3498](https://github.com/ionic-team/ionic-native/issues/3498)) ([5aa5757](https://github.com/ionic-team/ionic-native/commit/5aa57577956c13e8fe34d2c658690df7daf86ef4))
|
||||
|
||||
|
||||
|
||||
# [5.27.0](https://github.com/ionic-team/ionic-native/compare/v5.26.0...v5.27.0) (2020-06-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **app-rate:** Add missing "openUrl" property to AppRatePreferences object ([#3456](https://github.com/ionic-team/ionic-native/issues/3456)) ([fe21b5b](https://github.com/ionic-team/ionic-native/commit/fe21b5b97c150e16740b91bf958f7110b2e35664))
|
||||
* **camera-preview:** tapFocus ([#3467](https://github.com/ionic-team/ionic-native/issues/3467)) ([7c95e66](https://github.com/ionic-team/ionic-native/commit/7c95e660215e96ce238c0194bbe91ba16886a78a))
|
||||
* **firebase-x:** add fakeVerificationCode param to verifyPhoneNumber ([#3451](https://github.com/ionic-team/ionic-native/issues/3451)) ([191c7a0](https://github.com/ionic-team/ionic-native/commit/191c7a044d15c31a4bba4c23010cdd728398eb89))
|
||||
* **firebase-x:** indicate callback methods to verifyPhoneNumber ([#3457](https://github.com/ionic-team/ionic-native/issues/3457)) ([66896b2](https://github.com/ionic-team/ionic-native/commit/66896b2632250ee8a33af909f7c0e008c6abc872))
|
||||
* **jumio:** update plugin reference and source ([#3428](https://github.com/ionic-team/ionic-native/issues/3428)) ([389a3fb](https://github.com/ionic-team/ionic-native/commit/389a3fb215711deb5e5404fd5b268b20825af958))
|
||||
* **launch-review:** Allow rating() callback to be invoked multiple times ([#3455](https://github.com/ionic-team/ionic-native/issues/3455)) ([40b9295](https://github.com/ionic-team/ionic-native/commit/40b9295de64e27c652f58fa37a4bb50c6bc2cdc4))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **admob:** add interfaces and method typings ([#3461](https://github.com/ionic-team/ionic-native/issues/3461)) ([b2afc13](https://github.com/ionic-team/ionic-native/commit/b2afc131caeea56b9e01edc6169fdce9b57e9569))
|
||||
* **broadcaster:** align plugin API to version 4.1.0 ([#3432](https://github.com/ionic-team/ionic-native/issues/3432)) ([324334e](https://github.com/ionic-team/ionic-native/commit/324334eb287dd8e3e82b2d5d64e8fb06b496a1f0))
|
||||
* **build-info:** add plugin ([#3465](https://github.com/ionic-team/ionic-native/issues/3465)) ([7b998b9](https://github.com/ionic-team/ionic-native/commit/7b998b96449cdc1abf90548115caa0435ee89a84))
|
||||
* **camera-preview:** add record video functions ([#3463](https://github.com/ionic-team/ionic-native/issues/3463)) ([7ae1df2](https://github.com/ionic-team/ionic-native/commit/7ae1df2489b8ff524c1ba1bfa7624dcb50247905))
|
||||
* **chooser:** add getFileMetadata ([#3425](https://github.com/ionic-team/ionic-native/issues/3425)) ([79c3284](https://github.com/ionic-team/ionic-native/commit/79c3284434fbb580642b44d3d91cf01c82e52d0f))
|
||||
* **CleverTap:** Update Plugin for Parity Support ([#3435](https://github.com/ionic-team/ionic-native/issues/3435)) ([3df35b4](https://github.com/ionic-team/ionic-native/commit/3df35b40ce49b1a176ae03a3516df37ceb7cdec6))
|
||||
* **fcm:** add requestPushPermissionIOS and createNotificationChannelAndroid functions ([#3430](https://github.com/ionic-team/ionic-native/issues/3430)) ([ef17dc5](https://github.com/ionic-team/ionic-native/commit/ef17dc5d07e401369fa8353913a80b36f3cfdc4c))
|
||||
* **firebase-dynamic-links:** Update plugin for parity ([#3437](https://github.com/ionic-team/ionic-native/issues/3437)) ([7f09758](https://github.com/ionic-team/ionic-native/commit/7f0975803f2e84ed536922dde542e4d50549f919))
|
||||
* **firebase-vision:** add barcodeDetector ([#3426](https://github.com/ionic-team/ionic-native/issues/3426)) ([1aacb48](https://github.com/ionic-team/ionic-native/commit/1aacb487a4577e2f6854e59f30f215c301ad60ee))
|
||||
* **firebase-x:** add missing methods from plugin, incl. authenticateUserWithApple ([#3458](https://github.com/ionic-team/ionic-native/issues/3458)) ([32203e9](https://github.com/ionic-team/ionic-native/commit/32203e9ac1a0ca5368b320d1b05f44da3addd2bf))
|
||||
* **ios-aswebauthenticationsession:** add plugin ([#3421](https://github.com/ionic-team/ionic-native/issues/3421)) ([742ff65](https://github.com/ionic-team/ionic-native/commit/742ff655968c908911b3174d8a9893c6716b20d8))
|
||||
* **vibes:** add support for inbox messaging ([#3466](https://github.com/ionic-team/ionic-native/issues/3466)) ([9bf1eaf](https://github.com/ionic-team/ionic-native/commit/9bf1eafc4eb1e3562dfeff54f87f1da95d0a9fe4))
|
||||
|
||||
|
||||
|
||||
# [5.26.0](https://github.com/ionic-team/ionic-native/compare/v5.25.0...v5.26.0) (2020-05-16)
|
||||
|
||||
|
||||
|
||||
@@ -168,7 +168,6 @@ 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,30 +3,30 @@ jobs:
|
||||
build:
|
||||
working_directory: ~/ionic-native/
|
||||
docker:
|
||||
- image: node:14
|
||||
- image: node:12
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: ionic-site-{{ checksum "package.json" }}
|
||||
key: ionic-site-{{ checksum "package.json" }}
|
||||
- run:
|
||||
name: Prepare ionic-site repo
|
||||
command: |
|
||||
if [ "${CIRCLE_BRANCH}" == "master" ]; then
|
||||
./scripts/docs/prepare.sh
|
||||
fi
|
||||
name: Prepare ionic-site repo
|
||||
command: |
|
||||
if [ "${CIRCLE_BRANCH}" == "master" ]; then
|
||||
./scripts/docs/prepare.sh
|
||||
fi
|
||||
- save_cache:
|
||||
key: ionic-site-{{ checksum "package.json" }}
|
||||
paths:
|
||||
- ~/ionic-site/
|
||||
key: ionic-site-{{ checksum "package.json" }}
|
||||
paths:
|
||||
- ~/ionic-site/
|
||||
- restore_cache:
|
||||
key: node_modules_{{ checksum "package.json" }}
|
||||
key: node_modules_{{ checksum "package.json" }}
|
||||
- run:
|
||||
name: Install node modules
|
||||
command: npm ci
|
||||
name: Install node modules
|
||||
command: npm ci
|
||||
- save_cache:
|
||||
key: node_modules_{{ checksum "package.json" }}
|
||||
paths:
|
||||
- ~/ionic-native/node_modules/
|
||||
key: node_modules_{{ checksum "package.json" }}
|
||||
paths:
|
||||
- ~/ionic-native/node_modules/
|
||||
- run:
|
||||
name: Run tslint
|
||||
command: npm run lint
|
||||
7929
package-lock.json
generated
7929
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
84
package.json
84
package.json
@@ -1,12 +1,11 @@
|
||||
{
|
||||
"name": "ionic-native",
|
||||
"version": "5.35.0",
|
||||
"version": "5.26.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)",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"prepare": "is-ci || husky install",
|
||||
"test": "jest",
|
||||
"test:watch": "jest --watch",
|
||||
"build:core": "tsc -p tsconfig.core.json",
|
||||
@@ -21,60 +20,55 @@
|
||||
"docs-json": "ts-node -P scripts/tsconfig.json scripts/docs-json",
|
||||
"version": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md",
|
||||
"shipit": "npm run build && npm run readmes && npm run npmpub",
|
||||
"prettier": "prettier src/**/* --write"
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0"
|
||||
"prettier": "prettier --write \"**/*.{js,json,css,scss,less,md,ts,html,component.html}\""
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/common": "^11.2.14",
|
||||
"@angular/compiler": "^11.2.14",
|
||||
"@angular/compiler-cli": "^11.2.14",
|
||||
"@angular/core": "^11.2.14",
|
||||
"@angular/common": "^9.1.7",
|
||||
"@angular/compiler": "^9.1.7",
|
||||
"@angular/compiler-cli": "^9.1.7",
|
||||
"@angular/core": "^9.1.7",
|
||||
"@types/cordova": "0.0.34",
|
||||
"@types/fs-extra": "^9.0.12",
|
||||
"@types/jest": "^26.0.24",
|
||||
"@types/lodash": "^4.14.171",
|
||||
"@types/node": "^12.20.18",
|
||||
"@types/rimraf": "^3.0.1",
|
||||
"@types/webpack": "^5.28.0",
|
||||
"@types/fs-extra": "^9.0.1",
|
||||
"@types/jest": "^25.2.3",
|
||||
"@types/lodash": "^4.14.152",
|
||||
"@types/node": "^12.12.41",
|
||||
"@types/rimraf": "^3.0.0",
|
||||
"@types/webpack": "^4.41.13",
|
||||
"ajv": "^6.12.2",
|
||||
"async-promise-queue": "^1.0.5",
|
||||
"conventional-changelog-cli": "^2.1.1",
|
||||
"cz-conventional-changelog": "^3.3.0",
|
||||
"dgeni": "^0.4.14",
|
||||
"conventional-changelog-cli": "^2.0.34",
|
||||
"cz-conventional-changelog": "^3.2.0",
|
||||
"dgeni": "^0.4.12",
|
||||
"dgeni-packages": "0.16.10",
|
||||
"fs-extra": "^10.0.0",
|
||||
"fs-extra": "^9.0.0",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-rename": "^2.0.0",
|
||||
"gulp-replace": "^1.1.3",
|
||||
"gulp-replace": "^1.0.0",
|
||||
"gulp-tslint": "^8.1.4",
|
||||
"husky": "^7.0.1",
|
||||
"is-ci": "^3.0.0",
|
||||
"jest": "^27.0.6",
|
||||
"lint-staged": "^11.1.1",
|
||||
"lodash": "^4.17.21",
|
||||
"husky": "^4.2.5",
|
||||
"jest": "^26.0.1",
|
||||
"lint-staged": "^10.2.4",
|
||||
"lodash": "^4.17.15",
|
||||
"minimist": "^1.2.5",
|
||||
"natives": "^1.1.6",
|
||||
"prettier": "^2.3.2",
|
||||
"prettier": "^2.0.5",
|
||||
"rimraf": "^3.0.2",
|
||||
"rollup": "^2.55.1",
|
||||
"rxjs": "^6.6.7",
|
||||
"ts-jest": "^27.0.4",
|
||||
"ts-node": "^10.1.0",
|
||||
"tslint": "~6.1.0",
|
||||
"rxjs": "^6.5.5",
|
||||
"ts-jest": "^26.0.0",
|
||||
"ts-node": "^8.10.1",
|
||||
"tslint": "^5.20.1",
|
||||
"tslint-config-prettier": "^1.18.0",
|
||||
"tslint-ionic-rules": "0.0.21",
|
||||
"typedoc": "^0.18.0",
|
||||
"typescript": "4.1.6",
|
||||
"typescript-tslint-plugin": "^1.0.1",
|
||||
"typedoc": "^0.17.7",
|
||||
"typescript": "~3.8.3",
|
||||
"typescript-tslint-plugin": "0.5.5",
|
||||
"uglifyjs-webpack-plugin": "^2.2.0",
|
||||
"unminified-webpack-plugin": "^3.0.0",
|
||||
"webpack": "^5.48.0",
|
||||
"winston": "^3.3.3",
|
||||
"zone.js": "^0.11.4"
|
||||
"unminified-webpack-plugin": "^2.0.0",
|
||||
"webpack": "^4.43.0",
|
||||
"winston": "^3.2.1",
|
||||
"zone.js": "^0.10.3"
|
||||
},
|
||||
"jest": {
|
||||
"testEnvironment": "jsdom",
|
||||
"transform": {
|
||||
"^.+\\.tsx?$": "ts-jest"
|
||||
},
|
||||
@@ -99,9 +93,17 @@
|
||||
"path": "./node_modules/cz-conventional-changelog"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": "^1.13.0"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"*": [
|
||||
"prettier src/**/* --write"
|
||||
"prettier --write"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ 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';
|
||||
@@ -55,31 +54,6 @@ 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,7 +4,6 @@ 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(decoratorArgs?.methodName || (method.name as any).text),
|
||||
ts.createLiteral((method.name as any).text),
|
||||
convertValueToLiteral(decoratorArgs),
|
||||
ts.createIdentifier('arguments'),
|
||||
]);
|
||||
|
||||
@@ -31,11 +31,11 @@ function run {
|
||||
if [ $CHANGED -eq 0 ];
|
||||
then
|
||||
echo "-- No changes detected for the following commit, docs not updated."
|
||||
echo "https://github.com/ionic-team/$GITHUB_PROJECT_REPONAME/commit/$GITHUB_SHA1"
|
||||
echo "https://github.com/ionic-team/$CIRCLE_PROJECT_REPONAME/commit/$CIRCLE_SHA1"
|
||||
else
|
||||
git config --global user.email "hi@ionicframework.com"
|
||||
git config --global user.name "Ionitron"
|
||||
git commit -am "Automated build of native docs ionic-team/$GITHUB_PROJECT_REPONAME@$GITHUB_SHA1"
|
||||
git commit -am "Automated build of native docs ionic-team/$CIRCLE_PROJECT_REPONAME@$CIRCLE_SHA1"
|
||||
# in case a different commit was pushed to ionic-site during doc/demo gen,
|
||||
# try to rebase around it before pushing
|
||||
git fetch
|
||||
|
||||
@@ -48,6 +48,7 @@ const webpackConfig: webpack.Configuration = {
|
||||
new webpack.ProvidePlugin({
|
||||
__extends: ['tslib', '__extends'],
|
||||
}),
|
||||
new webpack.optimize.OccurrenceOrderPlugin(true),
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': JSON.stringify('production'),
|
||||
}),
|
||||
|
||||
@@ -1,15 +1,7 @@
|
||||
import {
|
||||
cleanupNgx,
|
||||
generateLegacyBundles,
|
||||
generateDeclarationFiles,
|
||||
modifyMetadata,
|
||||
transpileNgx,
|
||||
transpileNgxCore,
|
||||
} from '../build/ngx';
|
||||
import { cleanupNgx, generateDeclarationFiles, modifyMetadata, transpileNgx, transpileNgxCore } from '../build/ngx';
|
||||
|
||||
transpileNgxCore();
|
||||
transpileNgx();
|
||||
generateLegacyBundles();
|
||||
generateDeclarationFiles();
|
||||
modifyMetadata();
|
||||
cleanupNgx();
|
||||
|
||||
@@ -15,7 +15,6 @@ 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',
|
||||
@@ -79,7 +78,7 @@ async function publish(ignoreErrors = false) {
|
||||
// upload 1 package per CPU thread at a time
|
||||
const worker = Queue.async.asyncify(
|
||||
(pkg: any) =>
|
||||
new Promise<string | void>((resolve, reject) => {
|
||||
new Promise<any>((resolve, reject) => {
|
||||
exec(`npm publish ${pkg} ${FLAGS}`, (err, stdout) => {
|
||||
if (stdout) {
|
||||
Logger.verbose(stdout.trim());
|
||||
|
||||
@@ -33,10 +33,6 @@ 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,24 +45,17 @@ 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;
|
||||
@@ -96,14 +89,6 @@ export class AdjustConfig {
|
||||
this.defaultTracker = defaultTracker;
|
||||
}
|
||||
|
||||
setExternalDeviceId(externalDeviceId: string) {
|
||||
this.externalDeviceId = externalDeviceId;
|
||||
}
|
||||
|
||||
setUrlStrategy(urlStrategy: AdjustUrlStrategy) {
|
||||
this.urlStrategy = urlStrategy;
|
||||
}
|
||||
|
||||
setSendInBackground(sendInBackground: boolean) {
|
||||
this.sendInBackground = sendInBackground;
|
||||
}
|
||||
@@ -124,30 +109,10 @@ 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;
|
||||
}
|
||||
@@ -223,92 +188,6 @@ 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;
|
||||
@@ -318,9 +197,6 @@ export interface AdjustAttribution {
|
||||
creative: string;
|
||||
clickLabel: string;
|
||||
adid: string;
|
||||
costType: string;
|
||||
costAmount: string;
|
||||
costCurrency: string;
|
||||
}
|
||||
|
||||
export interface AdjustSessionSuccess {
|
||||
@@ -372,33 +248,6 @@ export enum AdjustLogLevel {
|
||||
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',
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Adjust
|
||||
* @description
|
||||
@@ -408,7 +257,7 @@ export enum AdjustAdRevenueSource {
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Adjust, AdjustConfig, AdjustEnvironment } from '@ionic-native/adjust';
|
||||
* import { Adjust, AdjustConfig, AdjustEnvironment } from '@ionic-native/adjust/ngx';
|
||||
*
|
||||
* constructor(private adjust: Adjust) { }
|
||||
*
|
||||
@@ -429,14 +278,9 @@ export enum AdjustAdRevenueSource {
|
||||
* @classes
|
||||
* AdjustEvent
|
||||
* AdjustConfig
|
||||
* AdjustAppStoreSubscription
|
||||
* AdjustPlayStoreSubscription
|
||||
* AdjustThirdPartySharing
|
||||
* @enums
|
||||
* AdjustEnvironment
|
||||
* AdjustLogLevel
|
||||
* AdjustUrlStrategy
|
||||
* AdjustAdRevenueSource
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Adjust',
|
||||
@@ -461,42 +305,6 @@ 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
|
||||
@@ -542,13 +350,6 @@ 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
|
||||
@@ -651,30 +452,4 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,42 +2,41 @@ import { Injectable } from '@angular/core';
|
||||
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
export interface AdmobBaseOptions {
|
||||
export interface AdmobOptions {
|
||||
/**
|
||||
* (Optional) Your interstitial id code from your AdMob account. Defaults to bannerAdId
|
||||
* Your publisher id code from your AdMob account
|
||||
*/
|
||||
interstitialAdId?: string;
|
||||
publisherId: string;
|
||||
|
||||
/**
|
||||
* (Optional) Indicates whether to put banner ads at top when set to true or at bottom when set to false. Defaults to false
|
||||
* (Optional) Your interstitial id code from your AdMob account. Defaults to publisherId
|
||||
*/
|
||||
bannerAtTop?: boolean;
|
||||
interstitiaAdlId?: string;
|
||||
|
||||
/**
|
||||
* (Optional) Set to true to receive test ads (do not test with real ads as your account may be banned). Defaults to false
|
||||
* (Optional) Your rewarded id code from your AdMob account. Defaults to publisherId
|
||||
*/
|
||||
isTesting?: boolean;
|
||||
rewardedAdId?: string;
|
||||
|
||||
/**
|
||||
* (Optional) Auto show banner ads when available (onAdLoaded event is called). Defaults to true
|
||||
* (Optional) Your ad slot code from your AdSense account. Only for browser platform
|
||||
*/
|
||||
autoShowBanner?: boolean;
|
||||
adSlot?: string;
|
||||
|
||||
/**
|
||||
* (Optional) Auto show interstitial ads when available (onAdLoaded event is called). Defaults to true
|
||||
* (Optional) Indicates if show a close button on interstitial browser ads. Only for browser platform
|
||||
*/
|
||||
autoShowInterstitial?: boolean;
|
||||
}
|
||||
export interface AdmobOptions extends AdmobBaseOptions {
|
||||
/**
|
||||
* Your banner id code from your AdMob account (https://support.google.com/admob/answer/7356431?hl=en)
|
||||
*/
|
||||
bannerAdId: string;
|
||||
interstitialShowCloseButton?: boolean;
|
||||
|
||||
/**
|
||||
* Deprecated. Now is only used in web. It will be used as a bannerAdId only in case it is undefined.
|
||||
* (Optional) Indicates the number of seconds that the interstitial ad waits before show the close button. Only for browser platform
|
||||
*/
|
||||
publisherId?: string;
|
||||
secondsToShowCloseButton?: number;
|
||||
|
||||
/**
|
||||
* (Optional) Indicates the number of seconds that the interstitial ad waits before close the ad. Only for browser platform
|
||||
*/
|
||||
secondsToCloseInterstitial?: number;
|
||||
|
||||
/**
|
||||
* (Optional) Your tappx id for iOS apps. If Admob is configured, it is also used to backfill your lost inventory (when there are no Admob ads available)
|
||||
@@ -49,21 +48,16 @@ export interface AdmobOptions extends AdmobBaseOptions {
|
||||
*/
|
||||
tappxIdAndroid?: string;
|
||||
|
||||
/**
|
||||
* AdMob rewarded id (https://support.google.com/admob/answer/7356431?hl=en)
|
||||
*/
|
||||
rewardedAdId?: string;
|
||||
|
||||
/**
|
||||
* (Optional) Auto show rewarded ads when available (onAdLoaded event is called). Defaults to true
|
||||
*/
|
||||
autoShowRewarded?: boolean;
|
||||
|
||||
/**
|
||||
* (Optional) If any of tappxId is present, it tells the percentage of traffic diverted to tappx. Defaults to 0.5 (50% of the traffic will be requested to Tappx)
|
||||
*/
|
||||
tappxShare?: number;
|
||||
|
||||
/**
|
||||
* (Optional) Indicates whether to put banner ads at top when set to true or at bottom when set to false. Defaults to false
|
||||
*/
|
||||
bannerAtTop?: boolean;
|
||||
|
||||
/**
|
||||
* (Optional) Indicates the size of banner ads
|
||||
*/
|
||||
@@ -79,58 +73,34 @@ export interface AdmobOptions extends AdmobBaseOptions {
|
||||
*/
|
||||
offsetStatusBar?: boolean;
|
||||
|
||||
/**
|
||||
* (Optional) Set to true to receive test ads (do not test with real ads as your account may be banned). Defaults to false
|
||||
*/
|
||||
isTesting?: boolean;
|
||||
|
||||
/**
|
||||
* (Options) A JSON object with additional {key: value} pairs
|
||||
*/
|
||||
adExtras?: any;
|
||||
}
|
||||
|
||||
export interface AdmobWebOptions extends AdmobBaseOptions {
|
||||
/**
|
||||
* (Required) AdSense Publisher ID (https://support.google.com/adsense/answer/105516)
|
||||
*/
|
||||
publisherId: string;
|
||||
|
||||
/**
|
||||
* (Required) Your ad slot code from your AdSense account. Only for browser platform https://support.google.com/adsense/answer/105516
|
||||
* (Optional) Auto show banner ads when available (onAdLoaded event is called). Defaults to true
|
||||
*/
|
||||
adSlot: string;
|
||||
autoShowBanner?: boolean;
|
||||
|
||||
/**
|
||||
* (Optional) Indicates if show a close button on interstitial browser ads. Only for browser platform
|
||||
* (Optional) Auto show interstitial asd when available (onAdLoaded event is called). Defaults to true
|
||||
*/
|
||||
interstitialShowCloseButton?: boolean;
|
||||
autoShowInterstitial?: boolean;
|
||||
|
||||
/**
|
||||
* (Optional) Indicates the number of seconds that the interstitial ad waits before show the close button. Only for browser platform
|
||||
* (Optional) Auto show rewarded ads when available (onAdLoaded event is called). Defaults to true
|
||||
*/
|
||||
secondsToShowCloseButton?: number;
|
||||
|
||||
/**
|
||||
* (Optional) Indicates the number of seconds that the interstitial ad waits before close the ad. Only for browser platform
|
||||
*/
|
||||
secondsToCloseInterstitial?: number;
|
||||
}
|
||||
|
||||
export interface AdMobEvent {
|
||||
/**
|
||||
* (Optional) AdMob supported type as seen in AD_TYPE
|
||||
*/
|
||||
adType?: string;
|
||||
|
||||
/**
|
||||
* (Optional) AdMob error code
|
||||
*/
|
||||
error?: number;
|
||||
|
||||
/**
|
||||
* (Optional) AdMob error reason
|
||||
*/
|
||||
reason?: string;
|
||||
autoShowRewarded?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name AdMob
|
||||
* @name Admob
|
||||
* @description
|
||||
* Most complete Admob plugin with support for [Tappx](http://www.tappx.com/?h=dec334d63287772de859bdb4e977fce6) ads.
|
||||
* Monetize your apps and games with AdMob ads, using latest Google AdMob SDK. With this plugin you can show AdMob ads easily!
|
||||
@@ -142,16 +112,15 @@ export interface AdMobEvent {
|
||||
* - [Tappx](http://www.tappx.com/?h=dec334d63287772de859bdb4e977fce6) ads
|
||||
*
|
||||
* @usage
|
||||
* **Note:** No ads will be served on apps with package name `io.ionic.starter`. This is the default package name for new `ionic` apps. Make sure to rename the package name so ads can be displayed.
|
||||
* ```typescript
|
||||
* import { Admob, AdmobOptions } from '@ionic-native/admob';
|
||||
* import { Admob, AdmobOptions } from '@ionic-native/admob/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private admob: Admob) {
|
||||
* // Admob options config
|
||||
* const admobOptions: AdmobOptions = {
|
||||
* bannerAdId: 'XXX-XXXX-XXXX',
|
||||
* interstitialAdId: 'XXX-XXXX-XXXX',
|
||||
* publisherId: 'XXX-XXXX-XXXX',
|
||||
* interstitialId: 'XXX-XXXX-XXXX',
|
||||
* rewardedAdId: 'XXX-XXXX-XXXX',
|
||||
* isTesting: true,
|
||||
* autoShowBanner: false,
|
||||
@@ -284,11 +253,11 @@ export interface AdMobEvent {
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'AdMob',
|
||||
pluginName: 'Admob',
|
||||
plugin: 'cordova-admob',
|
||||
pluginRef: 'admob',
|
||||
repo: 'https://github.com/appfeel/admob-google-cordova',
|
||||
platforms: ['Android', 'iOS', 'Browser'],
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class Admob extends IonicNativePlugin {
|
||||
@@ -324,7 +293,7 @@ export class Admob extends IonicNativePlugin {
|
||||
* @return {Promise<any>} Returns a promise that resolves when the options are set
|
||||
*/
|
||||
@Cordova()
|
||||
setOptions(options: AdmobOptions | AdmobWebOptions): Promise<any> {
|
||||
setOptions(options: AdmobOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -334,7 +303,7 @@ export class Admob extends IonicNativePlugin {
|
||||
* @return {Promise<any>} Returns a promise that resolves when the banner view is created
|
||||
*/
|
||||
@Cordova()
|
||||
createBannerView(options?: AdmobOptions | AdmobWebOptions): Promise<any> {
|
||||
createBannerView(options?: AdmobOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -364,7 +333,7 @@ export class Admob extends IonicNativePlugin {
|
||||
* @return {Promise<any>} Returns a promise that resolves when the interstitial ad is loaded
|
||||
*/
|
||||
@Cordova()
|
||||
requestInterstitialAd(options?: AdmobOptions | AdmobWebOptions): Promise<any> {
|
||||
requestInterstitialAd(options?: AdmobOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -386,7 +355,7 @@ export class Admob extends IonicNativePlugin {
|
||||
* @return {Promise<any>} Returns a promise that resolves when the rewarded ad is loaded
|
||||
*/
|
||||
@Cordova()
|
||||
requestRewardedAd(options?: AdmobOptions | AdmobWebOptions): Promise<any> {
|
||||
requestRewardedAd(options?: AdmobOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -400,173 +369,108 @@ export class Admob extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when an ad is received.
|
||||
*
|
||||
* *WARNING*: only **ionic^4**. Older versions of ionic, use:
|
||||
*
|
||||
* ```js
|
||||
* document.addEventListener(window.admob.events.onAdLoaded, () => { });
|
||||
* ```
|
||||
*
|
||||
* Please refer to the documentation on https://admob-ionic.com/Events.
|
||||
* @returns {Observable<AdMobEvent>} Returns an observable when an ad is received
|
||||
* Called when an ad is received
|
||||
* @returns {Observable<any>} Returns an observable when an ad is received
|
||||
*/
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'appfeel.cordova.admob.onAdLoaded',
|
||||
element: document,
|
||||
})
|
||||
onAdLoaded(): Observable<AdMobEvent> {
|
||||
onAdLoaded(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when an ad request failed.
|
||||
*
|
||||
* *WARNING*: only **ionic^4**. Older versions of ionic, use:
|
||||
*
|
||||
* ```js
|
||||
* document.addEventListener(window.admob.events.onAdFailedToLoad, () => { });
|
||||
* ```
|
||||
*
|
||||
* Please refer to the documentation on https://admob-ionic.com/Events.
|
||||
* @returns {Observable<AdMobEvent>} Returns an observable when an ad request is failed
|
||||
* Called when an ad request failed
|
||||
* @returns {Observable<any>} Returns an observable when an ad request is failed
|
||||
*/
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'appfeel.cordova.admob.onAdFailedToLoad',
|
||||
element: document,
|
||||
})
|
||||
onAdFailedToLoad(): Observable<AdMobEvent> {
|
||||
onAdFailedToLoad(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when an ad opens an overlay that covers the screen.
|
||||
* Please note that onPause cordova event is raised when an interstitial is shown.
|
||||
*
|
||||
* *WARNING*: only **ionic^4**. Older versions of ionic, use:
|
||||
*
|
||||
* ```js
|
||||
* document.addEventListener(window.admob.events.onAdOpened, () => { });
|
||||
* ```
|
||||
*
|
||||
* Please refer to the documentation on https://admob-ionic.com/Events.
|
||||
* @returns {Observable<AdMobEvent>} Returns an observable when an ad is opened
|
||||
* Please note that onPause cordova event is raised when an interstitial is shown
|
||||
* @returns {Observable<any>} Returns an observable when an ad is opened
|
||||
*/
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'appfeel.cordova.admob.onAdOpened',
|
||||
element: document,
|
||||
})
|
||||
onAdOpened(): Observable<AdMobEvent> {
|
||||
onAdOpened(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the user is about to return to the application after clicking on an ad.
|
||||
* Please note that onResume cordova event is raised when an interstitial is closed.
|
||||
*
|
||||
* *WARNING*: only **ionic^4**. Older versions of ionic, use:
|
||||
*
|
||||
* ```js
|
||||
* document.addEventListener(window.admob.events.onAdClosed, () => { });
|
||||
* ```
|
||||
*
|
||||
* Please refer to the documentation on https://admob-ionic.com/Events.
|
||||
* @returns {Observable<AdMobEvent>} Returns an observable when an ad is closed
|
||||
* Please note that onResume cordova event is raised when an interstitial is closed
|
||||
* @returns {Observable<any>} Returns an observable when an ad is closed
|
||||
*/
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'appfeel.cordova.admob.onAdClosed',
|
||||
element: document,
|
||||
})
|
||||
onAdClosed(): Observable<AdMobEvent> {
|
||||
onAdClosed(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the user leaves the application after clicking an ad (e.g., to go to the browser)
|
||||
* @returns {Observable<AdMobEvent>} Returns an observable when an ad leaves the application.
|
||||
*
|
||||
* *WARNING*: only **ionic^4**. Older versions of ionic, use:
|
||||
*
|
||||
* ```js
|
||||
* document.addEventListener(window.admob.events.onAdLeftApplication, () => { });
|
||||
* ```
|
||||
*
|
||||
* Please refer to the documentation on https://admob-ionic.com/Events.
|
||||
* @returns {Observable<AdMobEvent>} Returns an observable when application is left due to an ad click
|
||||
* @returns {Observable<any>} Returns an observable when an ad leaves the application
|
||||
*/
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'appfeel.cordova.admob.onAdLeftApplication',
|
||||
element: document,
|
||||
})
|
||||
onAdLeftApplication(): Observable<AdMobEvent> {
|
||||
onAdLeftApplication(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the user has been rewarded by an ad.
|
||||
*
|
||||
* *WARNING*: only **ionic^4**. Older versions of ionic, use:
|
||||
*
|
||||
* ```js
|
||||
* document.addEventListener(window.admob.events.onRewardedAd, () => { });
|
||||
* ```
|
||||
*
|
||||
* Please refer to the documentation on https://admob-ionic.com/Events.
|
||||
* @returns {Observable<AdMobEvent>} Returns an observable when the user rewards an ad
|
||||
* Called when the user has been rewarded by an ad
|
||||
* @returns {Observable<any>} Returns an observable when the user rewards an ad
|
||||
*/
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'appfeel.cordova.admob.onRewardedAd',
|
||||
element: document,
|
||||
})
|
||||
onRewardedAd(): Observable<AdMobEvent> {
|
||||
onRewardedAd(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the video of a rewarded ad started.
|
||||
*
|
||||
* *WARNING*: only **ionic^4**. Older versions of ionic, use:
|
||||
*
|
||||
* ```js
|
||||
* document.addEventListener(window.admob.events.onRewardedAdVideoStarted, () => { });
|
||||
* ```
|
||||
*
|
||||
* Please refer to the documentation on https://admob-ionic.com/Events.
|
||||
* @returns {Observable<AdMobEvent>} Returns an observable when the video is started
|
||||
* Called when the video of a rewarded ad started
|
||||
* @returns {Observable<any>} Returns an observable when the video is started
|
||||
*/
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'appfeel.cordova.admob.onRewardedAdVideoStarted',
|
||||
element: document,
|
||||
})
|
||||
onRewardedAdVideoStarted(): Observable<AdMobEvent> {
|
||||
onRewardedAdVideoStarted(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the video of a rewarded ad has completed.
|
||||
*
|
||||
* *WARNING*: only **ionic^4**. Older versions of ionic, use:
|
||||
*
|
||||
* ```js
|
||||
* document.addEventListener(window.admob.events.onRewardedAdVideoCompleted, () => { });
|
||||
* ```
|
||||
*
|
||||
* Please refer to the documentation on https://admob-ionic.com/Events.
|
||||
* @returns {Observable<AdMobEvent>} Returns an observable when the video is completed
|
||||
* Called when the video of a rewarded ad has completed
|
||||
* @returns {Observable<any>} Returns an observable when the video is completed
|
||||
*/
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'appfeel.cordova.admob.onRewardedAdVideoCompleted',
|
||||
element: document,
|
||||
})
|
||||
onRewardedAdVideoCompleted(): Observable<AdMobEvent> {
|
||||
onRewardedAdVideoCompleted(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
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
|
||||
}
|
||||
@@ -71,7 +71,7 @@ export class AndroidFullScreen extends IonicNativePlugin {
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
isImmersiveModeSupported(): Promise<boolean> {
|
||||
isImmersiveModeSupported(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
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,50 +1,6 @@
|
||||
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
|
||||
@@ -66,28 +22,20 @@ 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`
|
||||
* leave app or no when application page opened in app store (now supported only for iOS). Defaults to `false`
|
||||
*/
|
||||
showPromptForInAppReview?: boolean;
|
||||
inAppReview?: boolean;
|
||||
|
||||
/**
|
||||
* use custom view for rate dialog. Defaults to `false`
|
||||
*/
|
||||
useCustomRateDialog?: boolean;
|
||||
|
||||
/**
|
||||
* Custom locale object
|
||||
@@ -103,11 +51,6 @@ export interface AppRatePreferences {
|
||||
* App Store URLS
|
||||
*/
|
||||
storeAppURL?: AppUrls;
|
||||
|
||||
/**
|
||||
* Open URL function
|
||||
*/
|
||||
openUrl?: (url: string) => void;
|
||||
}
|
||||
|
||||
export interface AppRateCustomLocale {
|
||||
@@ -145,30 +88,20 @@ export interface AppRateCustomLocale {
|
||||
feedbackPromptMessage?: string;
|
||||
}
|
||||
|
||||
export interface AppRateLocales {
|
||||
addLocale(localeObject: AppRateCustomLocale): AppRateCustomLocale;
|
||||
|
||||
getLocale(language: string, applicationTitle?: string, customLocale?: AppRateCustomLocale): AppRateCustomLocale;
|
||||
|
||||
getLocalesNames(): { [prop: string]: AppRateCustomLocale };
|
||||
}
|
||||
|
||||
export interface AppRateCallbacks {
|
||||
/**
|
||||
* call back function. called when user clicked on rate-dialog buttons
|
||||
*/
|
||||
onButtonClicked?: (buttonIndex: number, buttonLabel: string, promptType: AppRatePromptType) => void;
|
||||
onButtonClicked?: Function;
|
||||
|
||||
/**
|
||||
* call back function. called when rate-dialog showing
|
||||
*/
|
||||
onRateDialogShow?: (rateCallback: (buttonIndex: number) => void) => void;
|
||||
onRateDialogShow?: Function;
|
||||
/**
|
||||
* call back function. called when user clicked on negative feedback
|
||||
*/
|
||||
handleNegativeFeedback?: () => void;
|
||||
|
||||
done?: () => void;
|
||||
handleNegativeFeedback?: Function;
|
||||
}
|
||||
|
||||
export interface AppUrls {
|
||||
@@ -258,38 +191,12 @@ 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 {
|
||||
return;
|
||||
}
|
||||
promptForRating(immediately: boolean): void {}
|
||||
|
||||
/**
|
||||
* Immediately send the user to the app store rating page
|
||||
|
||||
@@ -33,6 +33,7 @@ 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.
|
||||
*
|
||||
|
||||
@@ -1,747 +0,0 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface HTTPResponse {
|
||||
/**
|
||||
* The HTTP status number of the response or a negative internal error code.
|
||||
*/
|
||||
status: number;
|
||||
/**
|
||||
* The headers of the response.
|
||||
*/
|
||||
headers: { [key: string]: string };
|
||||
/**
|
||||
* The URL of the response. This property will be the final URL obtained after any redirects.
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* The data that is in the response. This property usually exists when a promise returned by a request method resolves.
|
||||
*/
|
||||
data?: any;
|
||||
/**
|
||||
* Error response from the server. This property usually exists when a promise returned by a request method rejects.
|
||||
*/
|
||||
error?: string;
|
||||
}
|
||||
|
||||
interface AbortedResponse {
|
||||
aborted: boolean;
|
||||
}
|
||||
|
||||
export interface ApproovLoggableToken {
|
||||
/**
|
||||
* Expiry
|
||||
* The only mandatory claim for Approov tokens. It specifies the expiry time for the token as a Unix timestamp.
|
||||
*/
|
||||
exp: number;
|
||||
|
||||
/**
|
||||
* Device ID
|
||||
* This claim identifies the device for which the token was issued. This is a base64 encoded string representing a 128-bit device identifier.
|
||||
* Note that this is not, strictly speaking, a device identifier as it is also influenced by the app identifier
|
||||
* and may change if the same app is uninstalled and then reinstalled on the same device.
|
||||
*/
|
||||
did?: string;
|
||||
|
||||
/**
|
||||
* Attestation Response Code
|
||||
* This is an optional claim that encodes information about a subset of the device property flags and also whether the attestation was a pass or fail.
|
||||
* The claim is encoded in base32 and is typically 10 characters long (although it may be longer in some circumstances).
|
||||
* This claim is not included by tokens from the failover.
|
||||
*/
|
||||
arc?: string;
|
||||
|
||||
/**
|
||||
* IP Address
|
||||
* This holds the IP address of the device as seen by the Approov cloud service. It is provided in a human readable IP address format (in either IPv4 or IPv6 format).
|
||||
* In practice this value can often change between the time a token is issued and the time it is sent to your backend, so you should never block if it differs, but you may include it as a signal that tokens have somehow been stolen and are being replayed.
|
||||
* This claim is not included by tokens from the failover or if the IP Tracking Policy for the account has been set to none.
|
||||
*/
|
||||
ip?: string;
|
||||
|
||||
/**
|
||||
* Issuer
|
||||
* An optional claim that is added if the issuer inclusion option is enabled. This provides the Approov account ID that was used to issue the token (suffixed with approov.io).
|
||||
* It can be used as an additional layer of backend verification if signing keys are shared between multiple accounts.
|
||||
* It indicates that tokens were issued from the expected Approov account. This claim may also be set to an explicit value for long lived Approov tokens.
|
||||
* This flexibility is designed for use with server-to-server communication (which may only be signed with the account specific secret keys).
|
||||
*/
|
||||
iss?: string;
|
||||
|
||||
/**
|
||||
* Annotation
|
||||
* This is an embedded JSON array of strings showing the list of flags that are set and are in the annotation set for the security policy that is selected.
|
||||
* This allows additional information to be collected about the state of a particular device without necessarily causing an attestation failure.
|
||||
* Note that if there are no possible annotations then this claim is not present at all. This claim is not included by tokens from the failover.
|
||||
*/
|
||||
anno?: string[];
|
||||
|
||||
/**
|
||||
* Payload Hash
|
||||
* An optional claim that is added if the protected app passes a token binding argument to the setDataHashInToken method.
|
||||
* The claim value is set to the base64 encoded SHA256 hash of the provided payload string.
|
||||
* This is typically used to bind an Approov token to some other data used by your app to enhance security (like a user auth token).
|
||||
*/
|
||||
pay?: string;
|
||||
|
||||
/**
|
||||
* Audience
|
||||
* An optional claim that is added if the audience inclusion option is enabled. This provides the domain for which the token was issued.
|
||||
* It can be used as an additional layer of backend verification to ensure that tokens intended for one domain cannot be used on to access a different one.
|
||||
*/
|
||||
aud?: string;
|
||||
|
||||
/**
|
||||
* Message Siging Key ID
|
||||
* This is an optional claim that encodes the ID of a key being used for Message Signing.
|
||||
* This is only present in Approov tokens for which message signing is active. This claim is not included by tokens from the failover.
|
||||
*/
|
||||
mskid?: string;
|
||||
|
||||
/**
|
||||
* Measurement Proof Key
|
||||
* An optional claim to provide the measurement proof key if a measurement has been requested by the SDK on the domain for which the token is issued.
|
||||
* This is a base64 encoded 128-bit proof key value. Note that if measurement is being used, then JWE tokens will be used to keep this claim secret.
|
||||
*/
|
||||
mpk?: string;
|
||||
|
||||
/**
|
||||
* Integrity Measurement Hash
|
||||
* An optional claim to provide the integrity measurement hash if a measurement has been requested by the SDK on the domain for which the token is issued.
|
||||
* This is a base64 encoded 256-bit SHA256 measurement value. Note that if measurement is being used, then JWE tokens will be used to keep this claim secret.
|
||||
*/
|
||||
imh?: string;
|
||||
|
||||
/**
|
||||
* Device Measurement Hash
|
||||
* An optional claim to provide the device measurement hash if a measurement has been requested by the SDK on the domain for which the token is issued.
|
||||
* This is a base64 encoded 256-bit SHA256 measurement value. Note that if measurement is being used, then JWE tokens will be used to keep this claim secret
|
||||
*/
|
||||
dmh?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name HTTP
|
||||
* @description
|
||||
* Cordova / Phonegap plugin for communicating with HTTP servers. Supports iOS and Android.
|
||||
*
|
||||
* Advantages over Javascript requests:
|
||||
* - SSL / TLS Pinning
|
||||
* - CORS restrictions do not apply
|
||||
* - Handling of HTTP code 401 - read more at [Issue CB-2415](https://issues.apache.org/jira/browse/CB-2415)
|
||||
*
|
||||
* Note: This plugin extends the pre-existing [cordova-advanced-http-plugin](https://github.com/silkimen/cordova-plugin-advanced-http),
|
||||
* we have only added approov functionality on top of it. All credit goes to the actual plugin developer.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { ApproovHttp } from '@ionic-native/http/ngx';
|
||||
*
|
||||
* constructor(private http: ApproovHttp) {}
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.http.get('http://ionic.io', {}, {})
|
||||
* .then(data => {
|
||||
*
|
||||
* console.log(data.status);
|
||||
* console.log(data.data); // data received by server
|
||||
* console.log(data.headers);
|
||||
*
|
||||
* })
|
||||
* .catch(error => {
|
||||
*
|
||||
* console.log(error.status);
|
||||
* console.log(error.error); // error message as string
|
||||
* console.log(error.headers);
|
||||
*
|
||||
* });
|
||||
*
|
||||
* ```
|
||||
* @interfaces
|
||||
* HTTPResponse
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'ApproovHttp',
|
||||
plugin: 'cordova-approov-advanced-http',
|
||||
pluginRef: 'cordova.plugin.ApproovHttp',
|
||||
repo: 'https://github.com/approov/quickstart-ionic-advancedhttp',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class ApproovHttp extends IonicNativePlugin {
|
||||
/**
|
||||
* This enum represents the internal error codes which can be returned in a HTTPResponse object.
|
||||
* @readonly
|
||||
*/
|
||||
@CordovaProperty()
|
||||
readonly ErrorCode: {
|
||||
GENERIC: number;
|
||||
SSL_EXCEPTION: number;
|
||||
SERVER_NOT_FOUND: number;
|
||||
TIMEOUT: number;
|
||||
UNSUPPORTED_URL: number;
|
||||
NOT_CONNECTED: number;
|
||||
POST_PROCESSING_FAILED: number;
|
||||
ABORTED: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* This returns an object representing a basic HTTP Authorization header of the form.
|
||||
* @param username {string} Username
|
||||
* @param password {string} Password
|
||||
* @returns {Object} an object representing a basic HTTP Authorization header of the form {'Authorization': 'Basic base64EncodedUsernameAndPassword'}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
getBasicAuthHeader(username: string, password: string): { Authorization: string } {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This sets up all future requests to use Basic HTTP authentication with the given username and password.
|
||||
* @param username {string} Username
|
||||
* @param password {string} Password
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
useBasicAuth(username: string, password: string): void {}
|
||||
|
||||
/**
|
||||
* Get all headers defined for a given hostname.
|
||||
* @param host {string} The hostname
|
||||
* @returns {string} return all headers defined for the hostname
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
getHeaders(host: string): string {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a header for all future requests. Takes a hostname, a header and a value.
|
||||
* @param host {string} The hostname to be used for scoping this header
|
||||
* @param header {string} The name of the header
|
||||
* @param value {string} The value of the header
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setHeader(host: string, header: string, value: string): void {}
|
||||
|
||||
/**
|
||||
* Get the name of the data serializer which will be used for all future POST and PUT requests.
|
||||
* @returns {string} returns the name of the configured data serializer
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
getDataSerializer(): string {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the data serializer which will be used for all future POST, PUT and PATCH requests. Takes a string representing the name of the serializer.
|
||||
* @param serializer {string} The name of the serializer.
|
||||
* @see https://github.com/silkimen/cordova-plugin-advanced-http#setdataserializer
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setDataSerializer(serializer: 'urlencoded' | 'json' | 'utf8' | 'multipart' | 'raw'): void {}
|
||||
|
||||
/**
|
||||
* Add a custom cookie.
|
||||
* @param url {string} Scope of the cookie
|
||||
* @param cookie {string} RFC compliant cookie string
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setCookie(url: string, cookie: string): void {}
|
||||
|
||||
/**
|
||||
* Clear all cookies.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
clearCookies(): void {}
|
||||
|
||||
/**
|
||||
* Remove cookies for given URL.
|
||||
* @param url {string}
|
||||
* @param cb
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
removeCookies(url: string, cb: () => void): void {}
|
||||
|
||||
/**
|
||||
* Resolve cookie string for given URL.
|
||||
* @param url {string}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
getCookieString(url: string): string {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get global request timeout value in seconds.
|
||||
* @returns {number} returns the global request timeout value
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
getRequestTimeout(): number {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set global request timeout value in seconds.
|
||||
* @param timeout {number} The timeout in seconds. Default 60
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setRequestTimeout(timeout: number): void {}
|
||||
|
||||
/**
|
||||
* Resolve if it should follow redirects automatically.
|
||||
* @returns {boolean} returns true if it is configured to follow redirects automatically
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
getFollowRedirect(): boolean {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure if it should follow redirects automatically.
|
||||
* @param follow {boolean} Set to false to disable following redirects automatically
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setFollowRedirect(follow: boolean): void {}
|
||||
|
||||
/**
|
||||
* Set server trust mode, being one of the following values:
|
||||
* default: default SSL trustship and hostname verification handling using system's CA certs;
|
||||
* legacy: use legacy default behavior (< 2.0.3), excluding user installed CA certs (only for Android);
|
||||
* nocheck: disable SSL certificate checking and hostname verification, trusting all certs (meant to be used only for testing purposes);
|
||||
* pinned: trust only provided certificates;
|
||||
* @see https://github.com/silkimen/cordova-plugin-advanced-http#setservertrustmode
|
||||
* @param {string} mode server trust mode
|
||||
*/
|
||||
@Cordova()
|
||||
setServerTrustMode(mode: 'default' | 'legacy' | 'nocheck' | 'pinned'): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a 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
|
||||
* @returns {Promise<HTTPResponse>} returns a promise that will resolve on success, and reject on failure
|
||||
*/
|
||||
@Cordova()
|
||||
post(url: string, body: any, headers: any): Promise<HTTPResponse> {
|
||||
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
|
||||
* @param parameters {Object} Parameters to send with the request
|
||||
* @param headers {Object} The headers to set for this request
|
||||
* @returns {Promise<HTTPResponse>} returns a promise that will resolve on success, and reject on failure
|
||||
*/
|
||||
@Cordova()
|
||||
get(url: string, parameters: any, headers: any): Promise<HTTPResponse> {
|
||||
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
|
||||
* @param body {Object} The body of the request
|
||||
* @param headers {Object} The headers to set for this request
|
||||
* @returns {Promise<HTTPResponse>} returns a promise that will resolve on success, and reject on failure
|
||||
*/
|
||||
@Cordova()
|
||||
put(url: string, body: any, headers: any): Promise<HTTPResponse> {
|
||||
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
|
||||
* @param body {Object} The body of the request
|
||||
* @param headers {Object} The headers to set for this request
|
||||
* @returns {Promise<HTTPResponse>} returns a promise that will resolve on success, and reject on failure
|
||||
*/
|
||||
@Cordova()
|
||||
patch(url: string, body: any, headers: any): Promise<HTTPResponse> {
|
||||
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
|
||||
* @param parameters {Object} Parameters to send with the request
|
||||
* @param headers {Object} The headers to set for this request
|
||||
* @returns {Promise<HTTPResponse>} returns a promise that will resolve on success, and reject on failure
|
||||
*/
|
||||
@Cordova()
|
||||
delete(url: string, parameters: any, headers: any): Promise<HTTPResponse> {
|
||||
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
|
||||
* @param parameters {Object} Parameters to send with the request
|
||||
* @param headers {Object} The headers to set for this request
|
||||
* @returns {Promise<HTTPResponse>} returns a promise that will resolve on success, and reject on failure
|
||||
*/
|
||||
@Cordova()
|
||||
head(url: string, parameters: any, headers: any): Promise<HTTPResponse> {
|
||||
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
|
||||
* @param parameters {Object} Parameters to send with the request
|
||||
* @param headers {Object} The headers to set for this request
|
||||
* @returns {Promise<HTTPResponse>} returns a promise that will resolve on success, and reject on failure
|
||||
*/
|
||||
@Cordova()
|
||||
options(url: string, parameters: any, headers: any): Promise<HTTPResponse> {
|
||||
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
|
||||
* @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
|
||||
* @returns {Promise<any>} returns a FileEntry promise that will resolve on success, and reject on failure
|
||||
*/
|
||||
@Cordova()
|
||||
uploadFile(url: string, body: any, headers: any, filePath: string | string[], name: string | string[]): Promise<any> {
|
||||
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
|
||||
* @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.
|
||||
* @returns {Promise<any>} returns a FileEntry promise that will resolve on success, and reject on failure
|
||||
*/
|
||||
@Cordova()
|
||||
downloadFile(url: string, body: any, headers: any, filePath: string): Promise<any> {
|
||||
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
|
||||
* @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
|
||||
*
|
||||
* @returns {Promise<HTTPResponse>} returns a promise that will resolve on success, and reject on failure
|
||||
*/
|
||||
@Cordova()
|
||||
sendRequest(
|
||||
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' | 'raw';
|
||||
timeout?: number;
|
||||
headers?: { [index: string]: string };
|
||||
filePath?: string | string[];
|
||||
name?: string | string[];
|
||||
responseType?: 'text' | 'arraybuffer' | 'blob' | 'json';
|
||||
}
|
||||
): 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;
|
||||
}
|
||||
|
||||
@Cordova({ sync: true })
|
||||
initializeApproov(): void {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({ sync: true })
|
||||
approovSetDataHashInToken(dataHash: string): void {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({ sync: true })
|
||||
approovSetBindingHeader(header: string): void {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
getApproovLoggableToken(host: string): Promise<ApproovLoggableToken> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -31,11 +31,6 @@ 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 {
|
||||
@@ -99,8 +94,8 @@ export class Appsflyer extends IonicNativePlugin {
|
||||
* @param {string} eventName custom event name, is presented in your dashboard
|
||||
* @param {AppsflyerEvent} eventValues event details
|
||||
*/
|
||||
@Cordova()
|
||||
logEvent(eventName: string, eventValues: AppsflyerEvent): void {}
|
||||
@Cordova({ sync: true })
|
||||
trackEvent(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.
|
||||
@@ -114,7 +109,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 })
|
||||
Stop(isStopTracking: boolean): void {}
|
||||
stopTracking(isStopTracking: boolean): void {}
|
||||
|
||||
/**
|
||||
* Get the data from Attribution
|
||||
@@ -126,7 +121,6 @@ export class Appsflyer extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* Enables app uninstall tracking
|
||||
* @param {string} token GCM/FCM ProjectNumber
|
||||
* @returns {Promise<any>}
|
||||
@@ -163,7 +157,7 @@ export class Appsflyer extends IonicNativePlugin {
|
||||
* @param {boolean} disable Set to true to opt-out user from tracking
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
anonymizeUser(disable: boolean): void {}
|
||||
deviceTrackingDisabled(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.
|
||||
@@ -188,7 +182,7 @@ export class Appsflyer extends IonicNativePlugin {
|
||||
* @param {string} campaign Promoted Campaign
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
logCrossPromotionImpression(appId: string, campaign: string): void {}
|
||||
trackCrossPromotionImpression(appId: string, campaign: string): void {}
|
||||
|
||||
/**
|
||||
* Use this call to track the click and launch the app store's app page (via Browser)
|
||||
@@ -197,5 +191,5 @@ export class Appsflyer extends IonicNativePlugin {
|
||||
* @param {Object} options Additional Parameters to track
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
logCrossPromotionAndOpenStore(appId: string, campaign: string, options: Object): void {}
|
||||
trackAndOpenStore(appId: string, campaign: string, options: Object): void {}
|
||||
}
|
||||
|
||||
@@ -1,112 +0,0 @@
|
||||
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',
|
||||
INITIALIZED = 'INITIALIZED',
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -9,8 +9,6 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
*
|
||||
* Requires Cordova plugin: cordova-plugin-badge. For more info, please see the [Badge plugin docs](https://github.com/katzer/cordova-plugin-badge).
|
||||
*
|
||||
* Android Note: Badges have historically only been a feature implemented by third party launchers and not visible unless one of those launchers was being used (E.G. Samsung or Nova Launcher) and if enabled by the user. As of Android 8 (Oreo), [notification badges](https://developer.android.com/training/notify-user/badges) were introduced officially to reflect unread notifications. This plugin is unlikely to work as expected on devices running Android 8 or newer. Please see the [local notifications plugin docs](https://github.com/katzer/cordova-plugin-local-notifications) for more information on badge use with notifications.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Badge } from '@ionic-native/badge/ngx';
|
||||
|
||||
@@ -263,27 +263,6 @@ export class BLE extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set device pin.
|
||||
* @usage
|
||||
* ```
|
||||
* BLE.setPin(pin).subscribe(success => {
|
||||
* console.log(success);
|
||||
* },
|
||||
* failure => {
|
||||
* console.log('failure');
|
||||
* });
|
||||
* ```
|
||||
* @param {string} pin Pin of the device as a string
|
||||
* @return {Observable<any>} Returns an Observable that notifies of success/failure.
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
})
|
||||
setPin(pin: string): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Connect to a peripheral.
|
||||
* @usage
|
||||
@@ -476,12 +455,9 @@ export class BLE extends IonicNativePlugin {
|
||||
* @param {string} serviceUUID UUID of the BLE service
|
||||
* @param {string} characteristicUUID UUID of the BLE characteristic
|
||||
* @return {Observable<any>} Returns an Observable that notifies of characteristic changes.
|
||||
* The observer emit an array with data at index 0 and sequence order at index 1.
|
||||
* The sequence order is always undefined on iOS. On android it leave the client to check the sequence order and reorder if needed
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
destruct: true,
|
||||
clearFunction: 'stopNotification',
|
||||
clearWithArgs: true,
|
||||
})
|
||||
@@ -628,15 +604,4 @@ export class BLE extends IonicNativePlugin {
|
||||
bondedDevices(): Promise<any[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reports if location services are enabled.
|
||||
* Android only
|
||||
*
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
isLocationEnabled(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2646,35 +2646,6 @@ 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
|
||||
@@ -2951,7 +2922,4 @@ export class BlinkId extends IonicNativePlugin {
|
||||
@CordovaProperty() UsdlRecognizer: UsdlRecognizerCtor;
|
||||
@CordovaProperty() UsdlCombinedRecognizerResult: UsdlCombinedRecognizerResultCtor;
|
||||
@CordovaProperty() UsdlCombinedRecognizer: UsdlCombinedRecognizerCtor;
|
||||
@CordovaProperty() BlinkIdRecognizer: BlinkIdRecognizerCtor;
|
||||
@CordovaProperty() BlinkIdOverlaySettings: BlinkIdOverlaySettingsCtor;
|
||||
@CordovaProperty() BlinkIdRecognizerResult: BlinkIdRecognizerResultCtor;
|
||||
}
|
||||
|
||||
@@ -40,8 +40,7 @@ export type Status =
|
||||
| 'advertisingStarted'
|
||||
| 'advertisingStopped'
|
||||
| 'responded'
|
||||
| 'notified'
|
||||
| 'notificationSent';
|
||||
| 'notified';
|
||||
|
||||
/** Available connection priorities */
|
||||
export type ConnectionPriority = 'low' | 'balanced' | 'high';
|
||||
@@ -89,8 +88,6 @@ 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 {
|
||||
@@ -102,38 +99,6 @@ 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[];
|
||||
@@ -578,15 +543,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 connection params
|
||||
* @param params The address/identifier
|
||||
*
|
||||
* @param {ConnectionParams} params
|
||||
* @param {{address: string, autoConnect: boolean}} 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: ConnectionParams): Observable<DeviceInfo> {
|
||||
connect(params: { address: string; autoConnect?: boolean }): Observable<DeviceInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
export interface BranchIoPromise {
|
||||
$identity_id?: number;
|
||||
@@ -106,15 +105,6 @@ export class BranchIo extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes Branch with callback
|
||||
* @return {Observable<any>}
|
||||
*/
|
||||
@Cordova({ observable: true })
|
||||
initSessionWithCallback(): Observable<BranchIoPromise> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Request Metadata
|
||||
* @return {Promise<any>}
|
||||
@@ -184,7 +174,6 @@ export class BranchIo extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Send Commerce Event
|
||||
* @deprecated since v.3.1.0. As of https://help.branch.io/developers-hub/docs/cordova-phonegap-ionic#track-commerce
|
||||
* @param {string} event
|
||||
* @param {any} metaData
|
||||
* @return {Promise<any>}
|
||||
@@ -194,17 +183,6 @@ export class BranchIo extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send Branch Event
|
||||
* @param {string} event
|
||||
* @param {any} metaData
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
sendBranchEvent(event: string, metaData: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* create a branchUniversalObj variable to reference with other Branch methods
|
||||
* @param {BranchIoProperties} properties
|
||||
|
||||
@@ -2,20 +2,6 @@ import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/**
|
||||
* Specific data for Android implementation
|
||||
*/
|
||||
export interface AndroidData {
|
||||
extras: object;
|
||||
flags: number;
|
||||
category: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Possibly Event Data types
|
||||
*/
|
||||
export type EventData = object | AndroidData | null;
|
||||
|
||||
/**
|
||||
* @name Broadcaster
|
||||
* @description
|
||||
@@ -49,7 +35,6 @@ export class Broadcaster extends IonicNativePlugin {
|
||||
/**
|
||||
* This function listen to an event sent from the native code
|
||||
* @param {string} eventName
|
||||
* @param {boolean} isGlobal Valid only for Android. It allows to listen for global messages(i.e. intents)
|
||||
* @return {Observable<any>} Returns an observable to watch when an event is received
|
||||
*/
|
||||
@Cordova({
|
||||
@@ -57,22 +42,18 @@ export class Broadcaster extends IonicNativePlugin {
|
||||
clearFunction: 'removeEventListener',
|
||||
clearWithArgs: true,
|
||||
})
|
||||
addEventListener(eventName: string, isGlobal = false): Observable<any> {
|
||||
addEventListener(eventName: string): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function sends data to the native code
|
||||
* @param {string} eventName
|
||||
* @param {boolean} isGlobalOrEventData means that message is global (valid only on Android)
|
||||
* @param {AndroidData} isGlobalOrEventData allows to specify 'flags` and 'category' (valid only on Android)
|
||||
* @param {object} isGlobalOrEventData allows to specify a generic object containing custom event data (all platform)
|
||||
* @param {AndroidData} [data] if isGlobal is set, allows to specify 'flags` and 'category' if isGlobal is set (valid only on Android)
|
||||
* @param {object} [data] if isGlobal is set, allows to specify a generic object containing custom event data (all platform)
|
||||
* @param {any} eventData
|
||||
* @return {Promise<any>} Returns a promise that resolves when an event is successfully fired
|
||||
*/
|
||||
@Cordova()
|
||||
fireNativeEvent(eventName: string, isGlobalOrEventData: boolean | EventData, data?: EventData): Promise<any> {
|
||||
fireNativeEvent(eventName: string, eventData: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,330 +0,0 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, CordovaProperty, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Build Info
|
||||
* @description
|
||||
* This plugin provides build information.
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* import { BuildInfo } from '@ionic-native/build-info/ngx';
|
||||
*
|
||||
* this.platform.ready().then(() => {
|
||||
* console.log('BuildInfo.baseUrl =' + BuildInfo.baseUrl)
|
||||
* console.log('BuildInfo.packageName =' + BuildInfo.packageName)
|
||||
* console.log('BuildInfo.basePackageName=' + BuildInfo.basePackageName)
|
||||
* console.log('BuildInfo.displayName =' + BuildInfo.displayName)
|
||||
* console.log('BuildInfo.name =' + BuildInfo.name)
|
||||
* console.log('BuildInfo.version =' + BuildInfo.version)
|
||||
* console.log('BuildInfo.versionCode =' + BuildInfo.versionCode)
|
||||
* console.log('BuildInfo.debug =' + BuildInfo.debug)
|
||||
* console.log('BuildInfo.buildType =' + BuildInfo.buildType)
|
||||
* console.log('BuildInfo.flavor =' + BuildInfo.flavor)
|
||||
* console.log('BuildInfo.buildDate =' + BuildInfo.buildDate)
|
||||
* console.log('BuildInfo.installDate =' + BuildInfo.installDate)
|
||||
* })
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'BuildInfo',
|
||||
plugin: 'cordova-plugin-buildinfo',
|
||||
pluginRef: 'BuildInfo',
|
||||
repo: 'https://github.com/lynrin/cordova-plugin-buildinfo',
|
||||
platforms: ['Android', 'iOS', 'Windows', 'macOS', 'browser', 'Electron'],
|
||||
})
|
||||
@Injectable()
|
||||
export class BuildInfo extends IonicNativePlugin {
|
||||
/**
|
||||
* The baseUrl where cordova.js was loaded.
|
||||
*/
|
||||
@CordovaProperty()
|
||||
baseUrl: string;
|
||||
|
||||
/**
|
||||
* Get the packageName of Application ID.
|
||||
*
|
||||
* |Platform|Value|Type|
|
||||
* |--------|-----|----|
|
||||
* |Android|Package Name|String|
|
||||
* |iOS|Bundle Identifier|String|
|
||||
* |Windows|Identity name|String|
|
||||
* |macOS(OS X)|Bundle Identifier|String|
|
||||
* |Browser|Get the id attribute of the widget element in config.xml file.|String|
|
||||
* |Electron|Get the id attribute of the widget element in config.xml file.|String|
|
||||
*/
|
||||
@CordovaProperty()
|
||||
packageName: string;
|
||||
|
||||
/**
|
||||
* Android only.
|
||||
*
|
||||
* Get the packageName of BuildConfig class.
|
||||
*
|
||||
* If you use the configure of "build types" or "product flavors", because you can specify a different package name is the id attribute of the widget element of config.xml, is the property to get the package name that BuildConfig class belongs.
|
||||
* (ought be the same as the id attribute of the widget element of config.xml)
|
||||
*
|
||||
*
|
||||
* |Platform|Value|Type|
|
||||
* |--------|-----|----|
|
||||
* |Android|Package name of BuildConfig class|String|
|
||||
* |iOS|Bundle Identifier(equals BuildInfo.packageName)|String|
|
||||
* |Windows|Identity name(equals BuildInfo.packageName)|String|
|
||||
* |macOS(OS X)|Bundle Identifier(equals BuildInfo.packageName)|String|
|
||||
* |Browser|equals BuildInfo.packageName|String|
|
||||
* |Electron|equals BuildInfo.packageName|String|
|
||||
*/
|
||||
@CordovaProperty()
|
||||
basePackageName: string;
|
||||
|
||||
/**
|
||||
* Get the displayName.
|
||||
*
|
||||
* |Platform|Value|Type|
|
||||
* |--------|-----|----|
|
||||
* |Android|Application Label|String|
|
||||
* |iOS|CFBundleDisplayName (CFBundleName if not present)|String|
|
||||
* |Windows|Get the DisplayName attribute of the VisualElements element in AppxManifest.xml file.|String|
|
||||
* |macOS(OS X)|CFBundleDisplayName (CFBundleName if not present)|String|
|
||||
* |Browser|Get the short attribute of the name element in config.xml file.|String|
|
||||
* |Electron|Get the short attribute of the name element in config.xml file.|String|
|
||||
*/
|
||||
@CordovaProperty()
|
||||
displayName: string;
|
||||
|
||||
/**
|
||||
* Get the name.
|
||||
*
|
||||
* |Platform|Value|Type|
|
||||
* |--------|-----|----|
|
||||
* |Android|Application Label(equal BuildInfo.displayName)|String|
|
||||
* |iOS|CFBundleName|String|
|
||||
* |Windows|Windows Store display name|String|
|
||||
* |macOS(OS X)|CFBundleName|String|
|
||||
* |Browser|Get value of the name element in config.xml file.|String|
|
||||
* |Electron|Get value of the name element in config.xml file.|String|
|
||||
*/
|
||||
@CordovaProperty()
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* Get the version.
|
||||
*
|
||||
* |Platform|Value|Type|
|
||||
* |--------|-----|----|
|
||||
* |Android|BuildConfig.VERSION_NAME|String|
|
||||
* |iOS|CFBundleShortVersionString|String|
|
||||
* |Windows|Major.Minor.Build ex) "1.2.3"|String|
|
||||
* |macOS(OS X)|CFBundleShortVersionString|String|
|
||||
* |Browser|Get the version attribute of the widget element in config.xml file.|String|
|
||||
* |Electron|Get the version attribute of the widget element in config.xml file.|String|
|
||||
*/
|
||||
@CordovaProperty()
|
||||
version: string;
|
||||
|
||||
/**
|
||||
* Get the version code.
|
||||
*
|
||||
* |Platform|Value|Type|
|
||||
* |--------|-----|----|
|
||||
* |Android|BuildConfig.VERSION_CODE|integer|
|
||||
* |iOS|CFBundleVersion|String|
|
||||
* |Windows|Major.Minor.Build.Revision ex) "1.2.3.4"|String|
|
||||
* |macOS(OS X)|CFBundleVersion|String|
|
||||
* |Browser|equals BuildInfo.version|String|
|
||||
* |Electron|equals BuildInfo.version|String|
|
||||
*/
|
||||
@CordovaProperty()
|
||||
versionCode: string | number;
|
||||
|
||||
/**
|
||||
* Get the debug flag.
|
||||
*
|
||||
* |Platform|Value|Type|
|
||||
* |--------|-----|----|
|
||||
* |Android|BuildConfig.DEBUG|Boolean|
|
||||
* |iOS|defined "DEBUG" is true|Boolean|
|
||||
* |Windows|isDevelopmentMode is true|Boolean|
|
||||
* |macOS(OS X)|defined "DEBUG" is true|Boolean|
|
||||
* |Browser|Always false|Boolean|
|
||||
* |Electron|True when ```cordova build electron --debug``` is executed with the "--debug" flag.|Boolean|
|
||||
*/
|
||||
@CordovaProperty()
|
||||
debug: boolean;
|
||||
|
||||
/**
|
||||
* Android , Windows Only.
|
||||
*
|
||||
* Get the build type.
|
||||
*
|
||||
* |Platform|Value|Type|
|
||||
* |--------|-----|----|
|
||||
* |Android|BuildConfig.BUILD_TYPE|String|
|
||||
* |iOS|empty string|String|
|
||||
* |Windows|"release" or "debug"|String|
|
||||
* |macOS(OS X)|empty string|String|
|
||||
* |Browser|empty string|String|
|
||||
* |Electron|empty string|String|
|
||||
*
|
||||
*/
|
||||
@CordovaProperty()
|
||||
buildType: string;
|
||||
/**
|
||||
* Android Only.
|
||||
*
|
||||
* Get the flavor.
|
||||
*
|
||||
* |Platform|Value|Type|
|
||||
* |--------|-----|----|
|
||||
* |Android|BuildConfig.FLAVOR|String|
|
||||
* |iOS|empty string|String|
|
||||
* |Windows|empty string|String|
|
||||
* |macOS(OS X)|empty string|String|
|
||||
* |Browser|empty string|String|
|
||||
* |Electron|empty string|String|
|
||||
*/
|
||||
@CordovaProperty()
|
||||
flavor: string;
|
||||
|
||||
/**
|
||||
* Get the build date and time in the Date object returns.
|
||||
*
|
||||
* Attention:
|
||||
* - Android: Add the BuildInfo.gradle file to your Android project.
|
||||
* The BuildInfo.gradle file contains the setting to add the _BUILDINFO_TIMESTAMP field to the BuildConfig class.
|
||||
* - Windows: Add the buildinfo.resjson file to your Windows project.
|
||||
* The buildinfo.resjson file into the "strings" folder.
|
||||
* And also add a task to rewrite buildinfo.resjson in the CordovaApp.projitems file.
|
||||
* - Browser and Electron: When ```cordova prepare``` is executed Build date and time is embedded in
|
||||
* platforms/**browser**\/www/plugins/cordova-plugin-buildinfo/src/browser/BuildInfoProxy.js file.
|
||||
* (Or platforms/**electron**\/www/plugins/cordova-plugin-buildinfo/src/browser/BuildInfoProxy.js file.)
|
||||
* ```cordova prepare``` is also executed for ```cordova build```, ```cordova run``` and ```cordova platform add```.
|
||||
* (Reference: [Hooks Guide - Apache Cordova](https://cordova.apache.org/docs/en/9.x/guide/appdev/hooks/index.html))
|
||||
*
|
||||
* |Platform|Value|Type|
|
||||
* |--------|-----|----|
|
||||
* |Android|BuildConfig.\_BUILDINFO\_TIMESTAMP value|Date|
|
||||
* |iOS|Get the modification date and time of the Info.plist file acquired from the executionPath property of the main bundle.|Date|
|
||||
* |Windows|Resource value of "/buildinfo/Timestamp" string.|Date|
|
||||
* |macOS(OS X)|Get the modification date and time of the config.xml file acquired from the resource of the main bundle.|Date|
|
||||
* |Browser|The date and time when ```cordova prepare``` was executed.|Date|
|
||||
* |Electron|The date and time when ```cordova prepare``` was executed.|Date|
|
||||
*
|
||||
*/
|
||||
@CordovaProperty()
|
||||
buildDate: Date;
|
||||
|
||||
/**
|
||||
* Get the install date and time in the Date object returns.
|
||||
*
|
||||
* Attention:
|
||||
* - Browser and Electron: Installation date and time is unknown.
|
||||
*
|
||||
* |Platform|Value|Type|
|
||||
* |--------|-----|----|
|
||||
* |Android|The firstInstallTime property of PackageInfo|Date|
|
||||
* |iOS|Get the creation date and time of the document directory.|Date|
|
||||
* |Windows|The installedDate property of Windows.ApplicatinoModel.Package.current|Date|
|
||||
* |macOS(OS X)|Date and time of kMDItemDateAdded recorded in File Metadata of application package.|Date|
|
||||
* |Browser|Not available.|null|
|
||||
* |Electron|Not available.|null|
|
||||
*/
|
||||
@CordovaProperty()
|
||||
installDate: Date | null;
|
||||
|
||||
/**
|
||||
* Windows Only.
|
||||
*
|
||||
* Get the windows extra information.
|
||||
*/
|
||||
@CordovaProperty()
|
||||
windows?: {
|
||||
/**
|
||||
* indows.ApplicationModel.Package.current.id.architecture|
|
||||
*/
|
||||
architecture: number;
|
||||
/**
|
||||
* Windows.ApplicationModel.Package.current.description|
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* Windows.ApplicationModel.Package.current.displayName|
|
||||
*/
|
||||
displayName: string;
|
||||
/**
|
||||
* Windows.ApplicationModel.Package.current.id.familyName|
|
||||
*/
|
||||
familyName: string;
|
||||
/**
|
||||
* Windows.ApplicationModel.Package.current.id.fullName|
|
||||
*/
|
||||
fullName: string;
|
||||
logo: WindowsLogo;
|
||||
/**
|
||||
* Windows.ApplicationModel.Package.current.id.publisher|
|
||||
*/
|
||||
publisher: string;
|
||||
/**
|
||||
* Windows.ApplicationModel.Package.current.id.publisherId|
|
||||
*/
|
||||
publisherId: string;
|
||||
/**
|
||||
* Windows.ApplicationModel.Package.current.publisherDisplayName|
|
||||
*/
|
||||
publisherDisplayName: string;
|
||||
/**
|
||||
* Windows.ApplicationModel.Package.current.id.resourceId|
|
||||
*/
|
||||
resourceId: string;
|
||||
/**
|
||||
* Windows.ApplicationModel.Package.current.id.version|
|
||||
*/
|
||||
version: WindowsVersionInfo;
|
||||
};
|
||||
}
|
||||
|
||||
export interface WindowsLogo {
|
||||
/**
|
||||
* Windows.ApplicationModel.Package.logo.absoluteCanonicalUri
|
||||
*/
|
||||
absoluteCannonicalUri: string;
|
||||
/**
|
||||
* Windows.ApplicationModel.Package.logo.absoluteUri
|
||||
*/
|
||||
absoluteUri: string;
|
||||
/**
|
||||
* Windows.ApplicationModel.Package.logo.displayIri
|
||||
*/
|
||||
displayIri: string;
|
||||
/**
|
||||
* Windows.ApplicationModel.Package.logo.displayUri
|
||||
*/
|
||||
displayUri: string;
|
||||
/**
|
||||
* Windows.ApplicationModel.Package.logo.path
|
||||
*/
|
||||
path: string;
|
||||
/**
|
||||
* Windows.ApplicationModel.Package.logo.rawUri
|
||||
*/
|
||||
rawUri: string;
|
||||
}
|
||||
|
||||
export interface WindowsVersionInfo {
|
||||
/**
|
||||
* Windows.ApplicationModel.Package.current.id.version.major
|
||||
*/
|
||||
major: number;
|
||||
/**
|
||||
* Windows.ApplicationModel.Package.current.id.version.minor
|
||||
*/
|
||||
minor: number;
|
||||
/**
|
||||
* Windows.ApplicationModel.Package.current.id.version.build
|
||||
*/
|
||||
build: number;
|
||||
/**
|
||||
* Windows.ApplicationModel.Package.current.id.version.revision
|
||||
*/
|
||||
revision: number;
|
||||
}
|
||||
@@ -38,7 +38,7 @@ export interface CameraPreviewOptions {
|
||||
alpha?: number;
|
||||
|
||||
/** Tap to set specific focus point. Note, this assumes the camera is full-screen. default false */
|
||||
tapFocus?: boolean;
|
||||
tapToFocus?: boolean;
|
||||
|
||||
/** On Android disable automatic rotation of the image and stripping of Exit header. default false */
|
||||
disableExifHeaderStripping?: boolean;
|
||||
@@ -203,19 +203,6 @@ export class CameraPreview extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the camera video instance.
|
||||
* @param {any} options
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
})
|
||||
startRecordVideo(options: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stops the camera preview instance. (iOS & Android)
|
||||
* @return {Promise<any>}
|
||||
@@ -225,15 +212,6 @@ export class CameraPreview extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stops the camera video instance. (iOS & Android)
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
stopRecordVideo(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Switch from the rear camera and front camera, if available.
|
||||
* @return {Promise<any>}
|
||||
|
||||
@@ -1,221 +0,0 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
export interface CkoCardTokenRequest {
|
||||
/**
|
||||
* The card number
|
||||
*/
|
||||
number: string;
|
||||
/**
|
||||
* The expiry month of the card
|
||||
*/
|
||||
expiry_month: string;
|
||||
/**
|
||||
* The expiry year of the card
|
||||
*/
|
||||
expiry_year: string;
|
||||
/**
|
||||
* The card verification value/code. 3 digits, except for Amex (4 digits)
|
||||
*/
|
||||
cvv?: string;
|
||||
/**
|
||||
* The cardholder's name
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* The cardholder's billing address
|
||||
*/
|
||||
billing_address?: Address;
|
||||
/**
|
||||
* The cardholder's phone number
|
||||
*/
|
||||
phone?: Phone;
|
||||
}
|
||||
|
||||
export interface CkoCardTokenResponse {
|
||||
/**
|
||||
* The token type
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
* The token value
|
||||
*/
|
||||
token: string;
|
||||
/**
|
||||
* The expiration datetime of the token
|
||||
*/
|
||||
expires_on: string;
|
||||
/**
|
||||
* The expiry month of the card
|
||||
*/
|
||||
expiry_month: number;
|
||||
/**
|
||||
* The expiry year of the card
|
||||
*/
|
||||
expiry_year: number;
|
||||
/**
|
||||
* The cardholder's name
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The card scheme
|
||||
*/
|
||||
scheme: string;
|
||||
/**
|
||||
* The last 4 digit of the card number
|
||||
*/
|
||||
last4: string;
|
||||
/**
|
||||
* The bin range of the card
|
||||
*/
|
||||
bin: string;
|
||||
/**
|
||||
* The card type
|
||||
*/
|
||||
card_type: string;
|
||||
/**
|
||||
* The card category
|
||||
*/
|
||||
card_category: string;
|
||||
/**
|
||||
* The card issuer name
|
||||
*/
|
||||
issuer: string;
|
||||
/**
|
||||
* The card issuer country (two-letter ISO)
|
||||
*/
|
||||
issuer_country: string;
|
||||
/**
|
||||
* The card product id
|
||||
*/
|
||||
product_id: string;
|
||||
/**
|
||||
* The card product type
|
||||
*/
|
||||
product_type: string;
|
||||
/**
|
||||
* The cardholder's billing address
|
||||
*/
|
||||
billing_address: Address;
|
||||
/**
|
||||
* The cardholder's phone number
|
||||
*/
|
||||
phone: Phone;
|
||||
}
|
||||
|
||||
export interface Address {
|
||||
/**
|
||||
* The first line of the address
|
||||
*/
|
||||
address_line1?: string;
|
||||
/**
|
||||
* The second line of the address
|
||||
*/
|
||||
address_line2?: string;
|
||||
/**
|
||||
* The address city
|
||||
*/
|
||||
city?: string;
|
||||
/**
|
||||
* The address state
|
||||
*/
|
||||
state?: string;
|
||||
/**
|
||||
* The address zip/postal code
|
||||
*/
|
||||
zip?: string;
|
||||
/**
|
||||
* The two-letter ISO country code of the address
|
||||
*/
|
||||
country?: string;
|
||||
}
|
||||
|
||||
export interface Phone {
|
||||
/**
|
||||
* The international country calling code. Required for some risk checks
|
||||
*/
|
||||
country_code: string;
|
||||
/**
|
||||
* The phone number
|
||||
*/
|
||||
number: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Checkout
|
||||
* @description
|
||||
* Checkout.com cordova plugin
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Checkout } from '@ionic-native/checkout/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private checkout: Checkout) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.checkout.initSandboxClient("pk_test_7d395871-0d66-4b62-85b6-8424df78b125")
|
||||
* .then(() => this.label = "CKO init completed")
|
||||
* .catch(err => this.label = err)
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* let tokenRequest: CkoCardTokenRequest = {
|
||||
* number: "4543474002249996",
|
||||
* cvv: "010",
|
||||
* expiry_month: "08",
|
||||
* expiry_year: "2025",
|
||||
* billing_address: {
|
||||
* country: "FR"
|
||||
* }
|
||||
* }
|
||||
*
|
||||
*
|
||||
* this.cko.generateToken(tokenRequest)
|
||||
* .then(tokenResponse => this.label = "Token: " + tokenResponse.token)
|
||||
* .catch(err => this.label = err)
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Checkout',
|
||||
plugin: '@checkout.com/cordova-plugin-checkout',
|
||||
pluginRef: 'cordova.plugins.Checkout',
|
||||
repo: 'https://github.com/checkout/frames-cordova',
|
||||
install: '',
|
||||
installVariables: [],
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class Checkout extends IonicNativePlugin {
|
||||
/**
|
||||
* Initialize Frames plugin in Sandbox mode
|
||||
* @param publicKey {string} Merchant's sandbox public key
|
||||
* @return {Promise<any>} Returns a promise that resolves when Frames initiation is completed
|
||||
*/
|
||||
@Cordova()
|
||||
initSandboxClient(publicKey: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize Frames plugin in Live mode
|
||||
* @param publicKey {string} Merchant's live public key
|
||||
* @return {Promise<any>} Returns a promise that resolves when Frames initiation is completed
|
||||
*/
|
||||
@Cordova()
|
||||
initLiveClient(publicKey: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Exchange card details for a reference token that can be used later to request a card payment from your backend. Tokens are single use and expire after 15 minutes.
|
||||
* @param ckoCardTokenRequest {CkoCardTokenRequest} Card tokenization request object
|
||||
* @return {Promise<CkoCardTokenResponse>} Returns a promise that resolves when Token response object
|
||||
*/
|
||||
@Cordova()
|
||||
generateToken(ckoCardTokenRequest: CkoCardTokenRequest): Promise<CkoCardTokenResponse> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,8 @@ import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface ChooserResult {
|
||||
data?: Uint8Array;
|
||||
dataURI?: string;
|
||||
data: Uint8Array;
|
||||
dataURI: string;
|
||||
mediaType: string;
|
||||
name: string;
|
||||
uri: string;
|
||||
@@ -64,15 +64,4 @@ export class Chooser extends IonicNativePlugin {
|
||||
getFile(accept?: string): Promise<ChooserResult | undefined> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Displays native prompt for user to select a file.
|
||||
* @param {string} [accept] Optional MIME type filter (e.g. 'image/gif,video/*').
|
||||
* @returns {Promise<any>} Promise containing selected file's MIME type, display name, and original URI.
|
||||
* If user cancels, promise will be resolved as undefined.
|
||||
* If error occurs, promise will be rejected.
|
||||
*/
|
||||
@Cordova()
|
||||
getFileMetadata(accept?: string): Promise<ChooserResult | undefined> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,16 +50,6 @@ export class CleverTap extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Personalization
|
||||
* Disables the Personalization API
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
disablePersonalization(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables tracking opt out for the currently active user.
|
||||
* @param optOut {boolean}
|
||||
@@ -70,16 +60,6 @@ export class CleverTap extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets CleverTap SDK to offline mode.
|
||||
* @param offline {boolean}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setOffline(offline: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables the reporting of device network related information, including IP address. This reporting is disabled by default.
|
||||
* @param enable {boolean}
|
||||
@@ -113,46 +93,6 @@ export class CleverTap extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the device's Xiaomi push token
|
||||
* @param token {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setPushXiaomiToken(token: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the device's Baidu push token
|
||||
* @param token {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setPushBaiduToken(token: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the device's Huawei push token
|
||||
* @param token {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setPushHuaweiToken(token: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Notification Channel for Android O+
|
||||
* @param extras {any}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
createNotification(extras: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Notification Channel for Android O+
|
||||
* @param channelID {string}
|
||||
@@ -660,502 +600,6 @@ export class CleverTap extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Fetch all Inbox Messages
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getAllInboxMessages(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Fetch all Unread Inbox Messages
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getUnreadInboxMessages(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Fetch Inbox Message For Id
|
||||
* @param messageId {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getInboxMessageForId(messageId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Delete Inbox Message For Id
|
||||
* @param messageId {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
deleteInboxMessageForId(messageId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Mark Read Inbox Message For Id
|
||||
* @param messageId {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
markReadInboxMessageForId(messageId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Mark Push Inbox Notification Viewed Event for Id
|
||||
* @param messageId {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
pushInboxNotificationViewedEventForId(messageId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Mark Push Inbox Notification Clicked Event for Id
|
||||
* @param messageId {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
pushInboxNotificationClickedEventForId(messageId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to SetUIEditor Connection
|
||||
* @param enabled {boolean}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setUIEditorConnectionEnabled(enabled: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Register Boolean Variable
|
||||
* @param varName {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
registerBooleanVariable(varName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Register Double Variable
|
||||
* @param varName {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
registerDoubleVariable(varName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Register Integer Variable
|
||||
* @param varName {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
registerIntegerVariable(varName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Register String Variable
|
||||
* @param varName {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
registerStringVariable(varName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Register List of Boolean Variable
|
||||
* @param varName {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
registerListOfBooleanVariable(varName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Register List of Double Variable
|
||||
* @param varName {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
registerListOfDoubleVariable(varName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Register List of Integer Variable
|
||||
* @param varName {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
registerListOfIntegerVariable(varName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Register List of String Variable
|
||||
* @param varName {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
registerListOfStringVariable(varName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Register Map of Boolean Variable
|
||||
* @param varName {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
registerMapOfBooleanVariable(varName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Register Map of Double Variable
|
||||
* @param varName {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
registerMapOfDoubleVariable(varName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Register Map of Integer Variable
|
||||
* @param varName {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
registerMapOfIntegerVariable(varName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Register Map of String Variable
|
||||
* @param varName {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
registerMapOfStringVariable(varName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get Boolean Variable
|
||||
* @param varName {string}
|
||||
* @param defaultValue {boolean}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getBooleanVariable(varName: string, defaultValue: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get Double Variable
|
||||
* @param varName {string}
|
||||
* @param defaultValue {number}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getDoubleVariable(varName: string, defaultValue: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get Integer Variable
|
||||
* @param varName {string}
|
||||
* @param defaultValue {number}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getIntegerVariable(varName: string, defaultValue: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get String Variable
|
||||
* @param varName {string}
|
||||
* @param defaultValue {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getStringVariable(varName: string, defaultValue: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get List of Boolean Variable
|
||||
* @param varName {string}
|
||||
* @param defaultValue {any}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getListOfBooleanVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get List of Double Variable
|
||||
* @param varName {string}
|
||||
* @param defaultValue {any}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getListOfDoubleVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get List of Integer Variable
|
||||
* @param varName {string}
|
||||
* @param defaultValue {any}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getListOfIntegerVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get List of String Variable
|
||||
* @param varName {string}
|
||||
* @param defaultValue {any}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getListOfStringVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to get Map of Boolean Variable
|
||||
* @param varName {string}
|
||||
* @param defaultValue {any}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getMapOfBooleanVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get Map of Double Variable
|
||||
* @param varName {string}
|
||||
* @param defaultValue {any}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getMapOfDoubleVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get Map of Integer Variable
|
||||
* @param varName {string}
|
||||
* @param defaultValue {any}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getMapOfIntegerVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get Map of String Variable
|
||||
* @param varName {string}
|
||||
* @param defaultValue {any}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getMapOfStringVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get All Display Units
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getAllDisplayUnits(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get Display Unit For Id
|
||||
* @param id {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getDisplayUnitForId(id: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Push DisplayUnit Viewed Event for ID
|
||||
* @param id {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
pushDisplayUnitViewedEventForID(id: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Push DisplayUnit Clicked Event for ID
|
||||
* @param id {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
pushDisplayUnitClickedEventForID(id: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get Feature Flag for key
|
||||
* @param key {string}
|
||||
* @param defaultValue {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getFeatureFlag(key: string, defaultValue: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Set Defaults for Product Config
|
||||
* @param defaults {any}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setDefaultsMap(defaults: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this for Product Config Fetch
|
||||
* @param defaults {any}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
fetch(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this for Product Config Fetch with Min Interval
|
||||
* @param timeInterval {number}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
fetchWithMinimumFetchIntervalInSeconds(timeInterval: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this for Product Config Activate
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
activate(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this for Product Config Fetch and Activate
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
fetchAndActivate(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to set Product Config Fetch with Min Interval
|
||||
* @param timeInterval {number}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setMinimumFetchIntervalInSeconds(timeInterval: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get Last Fetch Time Interval
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getLastFetchTimeStampInMillis(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get String
|
||||
* @param key {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getString(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get Boolean
|
||||
* @param key {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getBoolean(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get Long
|
||||
* @param key {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getLong(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get Double
|
||||
* @param key {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getDouble(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Reset Product Config
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
reset(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/*******************
|
||||
* Developer Options
|
||||
******************/
|
||||
|
||||
@@ -24,9 +24,6 @@ export interface SaleResponse extends Response {
|
||||
cardFirst6?: string;
|
||||
cardLast4?: string;
|
||||
}
|
||||
export interface VoidPaymentResponse extends Response {
|
||||
paymentId?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Clover Go
|
||||
@@ -59,14 +56,6 @@ export interface VoidPaymentResponse extends Response {
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* this.cloverGo.sign(signInfo)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* this.cloverGo.voidPayment(paymentInfo)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
@@ -75,7 +64,7 @@ export interface VoidPaymentResponse extends Response {
|
||||
pluginRef: 'clovergo',
|
||||
repo: 'https://github.com/hotwax/cordova-plugin-clovergo',
|
||||
install: 'ionic plugin add cordova-plugin-clovergo',
|
||||
platforms: ['Android'],
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class CloverGo extends IonicNativePlugin {
|
||||
@@ -118,27 +107,4 @@ export class CloverGo extends IonicNativePlugin {
|
||||
sale(saleInfo: object): Promise<SaleResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is used to pass signature as two
|
||||
* dimensional number array that represents points
|
||||
* of signature on screen.
|
||||
* The list is passed as signature in SignInfo object.
|
||||
* @param signInfo {object}
|
||||
* @return {Promise<SaleResponse>}
|
||||
*/
|
||||
@Cordova()
|
||||
sign(signInfo: object): Promise<SaleResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function void any payment done through the device
|
||||
* @param saleInfo {object}
|
||||
* @return {Promise<VoidPaymentResponse>}
|
||||
*/
|
||||
@Cordova()
|
||||
voidPayment(paymentInfo: object): Promise<VoidPaymentResponse> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,314 +0,0 @@
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {Promise<any>} Returns object of response
|
||||
*/
|
||||
@Cordova()
|
||||
appInvoke(): 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;
|
||||
}
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -89,15 +89,6 @@ export class Diagnostic extends IonicNativePlugin {
|
||||
WHEN_IN_USE: 'when_in_use',
|
||||
};
|
||||
|
||||
/**
|
||||
* iOS ONLY
|
||||
* Location accuracy authorization
|
||||
*/
|
||||
locationAccuracyAuthorization: {
|
||||
FULL: 'full';
|
||||
REDUCED: 'reduced';
|
||||
};
|
||||
|
||||
permissionGroups = {
|
||||
CALENDAR: ['READ_CALENDAR', 'WRITE_CALENDAR'],
|
||||
CAMERA: ['CAMERA'],
|
||||
@@ -938,36 +929,4 @@ export class Diagnostic extends IonicNativePlugin {
|
||||
getMotionAuthorizationStatus(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the location accuracy authorization for the application on iOS 14+. Note: calling on iOS <14 will result in the Promise being rejected.
|
||||
*
|
||||
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#getlocationaccuracyauthorization)
|
||||
*
|
||||
* @return {Promise<string>}
|
||||
*/
|
||||
@Cordova({ platform: ['iOS'] })
|
||||
getLocationAccuracyAuthorization(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Requests temporary access to full location accuracy for the application on iOS 14+.
|
||||
*
|
||||
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#requesttemporaryfullaccuracyauthorization)
|
||||
*
|
||||
* @return {Promise<string>}
|
||||
*/
|
||||
@Cordova({ platforms: ['iOS'] })
|
||||
requestTemporaryFullAccuracyAuthorization(purpose: string): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a function to be called when a change in location accuracy authorization occurs on iOS 14+.
|
||||
*
|
||||
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#registerLocationAccuracyAuthorizationChangeHandler)
|
||||
*/
|
||||
@Cordova({ platforms: ['iOS'], sync: true })
|
||||
registerLocationAccuracyAuthorizationChangeHandler(handler: Function): void {}
|
||||
}
|
||||
|
||||
@@ -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-facebook-connect`. For more info, please see the [Facebook Connect](https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect).
|
||||
* Requires Cordova plugin: `cordova-plugin-facebook4`. For more info, please see the [Facebook Connect](https://github.com/jeduan/cordova-plugin-facebook4).
|
||||
*
|
||||
* #### 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-facebook-connect --variable APP_ID="123456789" --variable APP_NAME="myApplication"
|
||||
* ionic cordova plugin add cordova-plugin-facebook4 --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-facebook-connect',
|
||||
plugin: 'cordova-plugin-facebook4',
|
||||
pluginRef: 'facebookConnectPlugin',
|
||||
repo: 'https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect',
|
||||
repo: 'https://github.com/jeduan/cordova-plugin-facebook4',
|
||||
install:
|
||||
'ionic cordova plugin add cordova-plugin-facebook-connect --variable APP_ID="123456789" --variable APP_NAME="myApplication"',
|
||||
'ionic cordova plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="myApplication"',
|
||||
installVariables: ['APP_ID', 'APP_NAME'],
|
||||
platforms: ['Android', 'iOS', 'Browser'],
|
||||
})
|
||||
@@ -178,60 +178,6 @@ export class Facebook extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Login to Facebook using Limited Login (iOS Only)
|
||||
*
|
||||
* ```typescript
|
||||
* {
|
||||
* status: 'connected',
|
||||
* authResponse: {
|
||||
* authenticationToken: 'kgkh3g42kh4g23kh4g2kh34g2kg4k2h4gkh3g4k2h4gk23h4gk2h34gk234gk2h34AndSoOn',
|
||||
* nonce: 'foo',
|
||||
* userID: '634565435'
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* ```
|
||||
*
|
||||
* @param {string[]} permissions List of [permissions](https://developers.facebook.com/docs/facebook-login/limited-login/permissions) this app has upon logging in.
|
||||
* @returns {Promise<FacebookLoginResponse>} Returns a Promise that resolves with a status object if login succeeds, and rejects if login fails.
|
||||
*/
|
||||
@Cordova()
|
||||
loginWithLimitedTracking(permissions: string[]): Promise<FacebookLoginResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the user has approved all necessary permissions
|
||||
*
|
||||
* @param {string[]} permissions List of [permissions](https://developers.facebook.com/docs/facebook-login/permissions) to check for
|
||||
* @returns {Promise<string>} Returns a Promise that resolves with a success string if all passed permissions are granted, or an error string if any permissions are not granted
|
||||
*/
|
||||
@Cordova()
|
||||
checkHasCorrectPermissions(permissions: string[]): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if data access has expired for the user
|
||||
*
|
||||
* @returns {Promise<string>} Returns a Promise that resolves with a success string if data access is expired, or rejects with an error
|
||||
*/
|
||||
@Cordova()
|
||||
isDataAccessExpired(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reauthorize data access after it has expired
|
||||
*
|
||||
* @returns {Promise<FacebookLoginResponse>} Returns a Promise that resolves with a status object if login succeeds, and rejects if login fails.
|
||||
*/
|
||||
@Cordova()
|
||||
reauthorizeDataAccess(): Promise<FacebookLoginResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Logout of Facebook.
|
||||
*
|
||||
@@ -284,16 +230,6 @@ export class Facebook extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get profile information for the currently logged in user
|
||||
*
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with success data, or rejects with an error
|
||||
*/
|
||||
@Cordova()
|
||||
getCurrentProfile(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show one of various Facebook dialogs. Example of options for a Share dialog:
|
||||
*
|
||||
@@ -307,7 +243,7 @@ export class Facebook extends IonicNativePlugin {
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* 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)
|
||||
* 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)
|
||||
* @param {Object} options The dialog options
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with success data, or rejects with an error
|
||||
*/
|
||||
@@ -327,11 +263,10 @@ 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[], httpMethod?: string): Promise<any> {
|
||||
api(requestPath: string, permissions: string[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -351,49 +286,15 @@ 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable or disable collection of advertiser-id
|
||||
*
|
||||
* @param {boolean} enabled value to be set
|
||||
*/
|
||||
@Cordova()
|
||||
setAdvertiserIDCollectionEnabled(enabled: boolean): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable or disable advertiser tracking (iOS Only)
|
||||
*
|
||||
* @param {boolean} enabled value to be set
|
||||
*/
|
||||
@Cordova()
|
||||
setAdvertiserTrackingEnabled(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, params?: Object): Promise<any> {
|
||||
logPurchase(value: number, currency: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,60 +16,6 @@ export interface NotificationData {
|
||||
[name: string]: any;
|
||||
}
|
||||
|
||||
export interface IRequestPushPermissionIOSOptions {
|
||||
/**
|
||||
* Options exclusive for iOS 9 support
|
||||
*/
|
||||
ios9Support?: {
|
||||
/**
|
||||
* How long it will wait for a decision from the user before returning `false`, defaults to 10
|
||||
*/
|
||||
timeout?: number;
|
||||
/**
|
||||
* How long between each permission verification, defaults to 0.3
|
||||
*/
|
||||
interval?: number;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IChannelConfiguration {
|
||||
/**
|
||||
* Channel id, used in the android_channel_id push payload key
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Channel name, visible for the user
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Channel description, visible for the user
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Importance for notifications of this channel
|
||||
* https://developer.android.com/guide/topics/ui/notifiers/notifications#importance
|
||||
*/
|
||||
importance?: 'none' | 'min' | 'low' | 'default' | 'high';
|
||||
/**
|
||||
* Visibility for notifications of this channel
|
||||
* https://developer.android.com/training/notify-user/build-notification#lockscreenNotification
|
||||
*/
|
||||
visibility?: 'public' | 'private' | 'secret';
|
||||
/**
|
||||
* Default sound resource for notifications of this channel
|
||||
* The file should located as resources/raw/[resource name].mp3
|
||||
*/
|
||||
sound?: string;
|
||||
/**
|
||||
* Enable lights for notifications of this channel
|
||||
*/
|
||||
lights?: boolean;
|
||||
/**
|
||||
* Enable vibration for notifications of this channel
|
||||
*/
|
||||
vibration?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name FCM
|
||||
* @capacitorincompatible true
|
||||
@@ -115,8 +61,6 @@ export interface IChannelConfiguration {
|
||||
* ```
|
||||
* @interfaces
|
||||
* NotificationData
|
||||
* IRequestPushPermissionIOSOptions
|
||||
* IChannelConfiguration
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'FCM',
|
||||
@@ -219,32 +163,4 @@ export class FCM extends IonicNativePlugin {
|
||||
clearAllNotifications(): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request push notification permission, alerting the user if it not have yet decided
|
||||
*
|
||||
* @param {IRequestPushPermissionIOSOptions} options Options for push request
|
||||
*
|
||||
* @returns {Promise<boolean>} Returns a Promise that resolves with the permission status
|
||||
*/
|
||||
@Cordova()
|
||||
requestPushPermissionIOS(options?: IRequestPushPermissionIOSOptions): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* For Android, some notification properties are only defined programmatically.
|
||||
*
|
||||
* Channel can define the default behavior for notifications on Android 8.0+.
|
||||
*
|
||||
* Once a channel is created, it stays unchangeable until the user uninstalls the app.
|
||||
*
|
||||
* @param channelConfig
|
||||
*
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
createNotificationChannelAndroid(channelConfig: IChannelConfiguration): void {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,6 +106,10 @@ 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';
|
||||
|
||||
@@ -1341,7 +1341,7 @@ export class File extends IonicNativePlugin {
|
||||
return getPromise<T>((resolve, reject) => {
|
||||
reader.onloadend = () => {
|
||||
if (reader.result !== undefined || reader.result !== null) {
|
||||
resolve(reader.result as any as T);
|
||||
resolve((reader.result as any) as T);
|
||||
} else if (reader.error !== undefined || reader.error !== null) {
|
||||
reject(reader.error);
|
||||
} else {
|
||||
|
||||
@@ -39,19 +39,6 @@ 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
|
||||
@@ -81,30 +68,9 @@ export interface FingerprintSecretOptions extends 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',
|
||||
@@ -180,11 +146,6 @@ 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
|
||||
@@ -195,26 +156,6 @@ 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,22 +11,6 @@ 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';
|
||||
|
||||
@@ -34,15 +34,6 @@ import { Observable } from 'rxjs';
|
||||
})
|
||||
@Injectable()
|
||||
export class FirebaseAuthentication extends IonicNativePlugin {
|
||||
/**
|
||||
* Returns the current user logged in Firebase service
|
||||
* @return {Promise<any>} Returns the user info
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
getCurrentUser(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a JWT token used to identify the user to a Firebase service.
|
||||
* @param forceRefresh {boolean} Force Refresh
|
||||
@@ -135,16 +126,6 @@ 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
|
||||
|
||||
@@ -16,7 +16,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* const crashlytics = this.firebaseCrashlytics.initialise();
|
||||
* const crashlytics = this.firebaseCrashlytics.initialize();
|
||||
* crashlytics.logException('my caught exception');
|
||||
*
|
||||
* ```
|
||||
|
||||
@@ -7,45 +7,6 @@ export interface IDynamicLink {
|
||||
deepLink: string;
|
||||
}
|
||||
|
||||
export interface ILinkOptions {
|
||||
domainUriPrefix?: string;
|
||||
link?: string;
|
||||
androidInfo?: {
|
||||
androidPackageName?: string;
|
||||
androidFallbackLink?: string;
|
||||
androidMinPackageVersionCode?: number;
|
||||
};
|
||||
iosInfo?: {
|
||||
iosBundleId?: string;
|
||||
iosFallbackLink?: string;
|
||||
iosIpadFallbackLink?: string;
|
||||
iosIpadBundleId?: string;
|
||||
iosAppStoreId?: string;
|
||||
};
|
||||
navigationInfo?: {
|
||||
enableForcedRedirect?: boolean;
|
||||
};
|
||||
analyticsInfo?: {
|
||||
googlePlayAnalytics?: {
|
||||
utmSource?: string;
|
||||
utmMedium?: string;
|
||||
utmCampaign?: string;
|
||||
utmTerm?: string;
|
||||
utmContent?: string;
|
||||
};
|
||||
itunesConnectAnalytics?: {
|
||||
at?: string;
|
||||
ct?: string;
|
||||
pt?: string;
|
||||
};
|
||||
};
|
||||
socialMetaTagInfo?: {
|
||||
socialTitle?: string;
|
||||
socialDescription?: string;
|
||||
socialImageLink?: string;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* @name Firebase Dynamic Links
|
||||
@@ -97,17 +58,6 @@ 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
|
||||
@@ -119,40 +69,4 @@ export class FirebaseDynamicLinks extends IonicNativePlugin {
|
||||
onDynamicLink(): Observable<IDynamicLink> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a Dynamic Link from the parameters. Returns a promise fulfilled with the new dynamic link url.
|
||||
* @param {ILinkOptions} opt [Dynamic Link Parameters](https://github.com/chemerisuk/cordova-plugin-firebase-dynamiclinks#dynamic-link-parameters)
|
||||
* @return {Promise<string>} Returns a promise with the url
|
||||
*/
|
||||
@Cordova({
|
||||
otherPromise: true,
|
||||
})
|
||||
createDynamicLink(opts: ILinkOptions): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a shortened Dynamic Link from the parameters. Shorten the path to a string that is only as long as needed to be unique, with a minimum length of 4 characters. Use this method if sensitive information would not be exposed if a short Dynamic Link URL were guessed.
|
||||
* @param {ILinkOptions} opt [Dynamic Link Parameters](https://github.com/chemerisuk/cordova-plugin-firebase-dynamiclinks#dynamic-link-parameters)
|
||||
* @return {Promise<string>} Returns a promise with the url
|
||||
*/
|
||||
@Cordova({
|
||||
otherPromise: true,
|
||||
})
|
||||
createShortDynamicLink(opts: ILinkOptions): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a Dynamic Link from the parameters. Shorten the path to an unguessable string. Such strings are created by base62-encoding randomly generated 96-bit numbers, and consist of 17 alphanumeric characters. Use unguessable strings to prevent your Dynamic Links from being crawled, which can potentially expose sensitive information.
|
||||
* @param {ILinkOptions} opt [Dynamic Link Parameters](https://github.com/chemerisuk/cordova-plugin-firebase-dynamiclinks#dynamic-link-parameters)
|
||||
* @return {Promise<string>} Returns a promise with the url
|
||||
*/
|
||||
@Cordova({
|
||||
otherPromise: true,
|
||||
})
|
||||
createUnguessableDynamicLink(opts: ILinkOptions): Promise<string> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ export class FirebaseMessaging extends IonicNativePlugin {
|
||||
* @returns {Promise<null>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
deleteToken(): Promise<null> {
|
||||
revokeToken(): Promise<null> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,226 +1,6 @@
|
||||
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,
|
||||
CODE_128 = 1,
|
||||
CODE_39 = 2,
|
||||
CODE_93 = 4,
|
||||
CODABAR = 8,
|
||||
DATA_MATRIX = 16,
|
||||
EAN_13 = 32,
|
||||
EAN_8 = 64,
|
||||
ITF = 128,
|
||||
QR_CODE = 256,
|
||||
UPC_A = 512,
|
||||
UPC_E = 1024,
|
||||
PDF417 = 2048,
|
||||
AZTEC = 4096,
|
||||
}
|
||||
|
||||
export enum BarcodeValueType {
|
||||
/** Unknown Barcode value types. */
|
||||
Unknown,
|
||||
/** Barcode value type for contact info. */
|
||||
ContactInfo,
|
||||
/** Barcode value type for email addresses. */
|
||||
Email,
|
||||
/** Barcode value type for ISBNs. */
|
||||
ISBN,
|
||||
/** Barcode value type for phone numbers. */
|
||||
Phone,
|
||||
/** Barcode value type for product codes. */
|
||||
Product,
|
||||
/** Barcode value type for SMS details. */
|
||||
SMS,
|
||||
/** Barcode value type for plain text. */
|
||||
Text,
|
||||
/** Barcode value type for URLs/bookmarks. */
|
||||
URL,
|
||||
/** Barcode value type for Wi-Fi access point details. */
|
||||
WiFi,
|
||||
/** Barcode value type for geographic coordinates. */
|
||||
GeographicCoordinates,
|
||||
/** Barcode value type for calendar events. */
|
||||
CalendarEvent,
|
||||
/** Barcode value type for driver's license data. */
|
||||
DriversLicense,
|
||||
}
|
||||
|
||||
export enum BarcodeEmailType {
|
||||
/** Unknown email type. */
|
||||
Unknown,
|
||||
/** Barcode work email type. */
|
||||
Work,
|
||||
/** Barcode home email type. */
|
||||
Home,
|
||||
}
|
||||
|
||||
export enum BarcodePhoneType {
|
||||
/** Unknown phone type. */
|
||||
Unknown,
|
||||
/** Barcode work phone type. */
|
||||
Work,
|
||||
/** Barcode home phone type. */
|
||||
Home,
|
||||
/** Barcode fax phone type. */
|
||||
Fax,
|
||||
/** Barcode mobile phone type. */
|
||||
Mobile,
|
||||
}
|
||||
|
||||
export enum BarcodeWiFiEncryptionType {
|
||||
/** Barcode unknown Wi-Fi encryption type. */
|
||||
Unknown,
|
||||
/** Barcode open Wi-Fi encryption type. */
|
||||
Open,
|
||||
/** Barcode WPA Wi-Fi encryption type. */
|
||||
WPA,
|
||||
/** Barcode WEP Wi-Fi encryption type. */
|
||||
WEP,
|
||||
}
|
||||
|
||||
export enum BarcodeAddressType {
|
||||
/** Barcode unknown address type. */
|
||||
Unknown,
|
||||
/** Barcode work address type. */
|
||||
Work,
|
||||
/** Barcode home address type. */
|
||||
Home,
|
||||
}
|
||||
|
||||
export interface Barcode {
|
||||
valueType: BarcodeValueType;
|
||||
format: BarcodeFormat;
|
||||
rawValue: string;
|
||||
displayValue: string;
|
||||
cornerPoints: any;
|
||||
imageHeight: number;
|
||||
imageWidth: number;
|
||||
email: BarcodeEmail;
|
||||
phone: BarcodePhone;
|
||||
sms: BarcodeSms;
|
||||
url: BarcodeUrl;
|
||||
wifi: BarcodeWifi;
|
||||
geoPoint: BarcodeGeoPoint;
|
||||
calendarEvent: BarcodeCalendarEvent;
|
||||
contactInfo: BarcodeContactInfo;
|
||||
driverLicense: BarcodeDriverLicense;
|
||||
}
|
||||
|
||||
export interface BarcodeEmail {
|
||||
address: string;
|
||||
body: string;
|
||||
subject: string;
|
||||
type: BarcodeEmailType;
|
||||
}
|
||||
|
||||
export interface BarcodePhone {
|
||||
number: string;
|
||||
type: BarcodePhoneType;
|
||||
}
|
||||
|
||||
export interface BarcodeSms {
|
||||
phoneNumber: string;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface BarcodeUrl {
|
||||
title: string;
|
||||
url: string;
|
||||
}
|
||||
export interface BarcodeWifi {
|
||||
ssid: string;
|
||||
password: string;
|
||||
type: BarcodeWiFiEncryptionType;
|
||||
}
|
||||
export interface BarcodeGeoPoint {
|
||||
latitude: number;
|
||||
longitude: number;
|
||||
}
|
||||
|
||||
export interface BarcodeCalendarEvent {
|
||||
eventDescription: string;
|
||||
location: string;
|
||||
organizer: string;
|
||||
status: string;
|
||||
summary: string;
|
||||
start: any;
|
||||
end: any;
|
||||
}
|
||||
|
||||
export interface BarcodeContactInfo {
|
||||
title: string;
|
||||
name: string;
|
||||
addresses: BarcodeAddress[];
|
||||
phones: BarcodePhone[];
|
||||
emails: BarcodeEmail[];
|
||||
organization: string;
|
||||
urls: string;
|
||||
}
|
||||
|
||||
export interface BarcodeAddress {
|
||||
addressLine: string;
|
||||
type: BarcodeAddressType;
|
||||
}
|
||||
|
||||
export interface BarcodeDriverLicense {
|
||||
firstName: string;
|
||||
middleName: string;
|
||||
lastName: string;
|
||||
gender: string;
|
||||
addressCity: string;
|
||||
addressState: string;
|
||||
addressStreet: string;
|
||||
addressZip: string;
|
||||
birthDate: string;
|
||||
documentType: string;
|
||||
licenseNumber: string;
|
||||
expiryDate: string;
|
||||
issuingDate: string;
|
||||
issuingCountry: string;
|
||||
}
|
||||
|
||||
export interface ImageLabel {
|
||||
index: number;
|
||||
confidence: number;
|
||||
text: string;
|
||||
}
|
||||
/**
|
||||
* @name Firebase Vision
|
||||
* @description
|
||||
@@ -240,14 +20,6 @@ export interface ImageLabel {
|
||||
* .then((res: string) => console.log(res))
|
||||
* .catch((error: string) => console.error(error));
|
||||
*
|
||||
* this.firebaseVision.barcodeDetector(FILE_URI)
|
||||
* .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({
|
||||
@@ -265,25 +37,7 @@ 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<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[]> {
|
||||
onDeviceTextRecognizer(file_uri: string): Promise<string> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,15 +179,6 @@ 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>}
|
||||
@@ -313,23 +304,6 @@ export class FirebaseX extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether autoinit is currently enabled. If so, new FCM tokens will be automatically generated.
|
||||
*/
|
||||
@Cordova()
|
||||
isAutoInitEnabled(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets whether to autoinit new FCM tokens. By default, a new token will be generated as soon as the old one is removed.
|
||||
* To prevent a new token being generated, by sure to disable autoinit using setAutoInitEnabled() before calling unregister().
|
||||
*/
|
||||
@Cordova()
|
||||
setAutoInitEnabled(enabled: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Android 8+ only. Creates a custom channel to be used by notification messages which have the channel property set in the message payload to the id of the created channel:
|
||||
* - for background (system) notifications: android.notification.channel_id
|
||||
@@ -516,8 +490,10 @@ export class FirebaseX extends IonicNativePlugin {
|
||||
* the verification code along with the verification ID. In this case, the user doesn't need to do anything in order for you
|
||||
* to sign them in.
|
||||
*
|
||||
* @param {function} success - callback function to pass {object} credentials to as an argument
|
||||
* @param {function} error - callback function which will be passed a {string} error message as an argument
|
||||
* @param {string} phoneNumber - phone number to verify
|
||||
* @param {integer} timeOutDuration - time to wait in seconds before timing out
|
||||
* @param {integer} timeOutDuration - (optional) time to wait in seconds before timing out
|
||||
* @param {string} fakeVerificationCode - (optional) to test instant verification on Android ,specify a fake verification code to return for whitelisted phone numbers.
|
||||
*
|
||||
* The success callback will be passed a credential object with the following properties:
|
||||
@@ -525,19 +501,13 @@ export class FirebaseX extends IonicNativePlugin {
|
||||
* verificationId {string} - the verification ID you'll need to pass along with the verification code to sign the user in. Always returned on both Android & iOS.
|
||||
* code {string} - verification code. Will only be present if instantVerification is true. Always undefined on iOS.
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse',
|
||||
})
|
||||
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> {
|
||||
verifyPhoneNumber(
|
||||
success: (value: string | object) => void,
|
||||
error: (err: string) => void,
|
||||
phoneNumber: string,
|
||||
timeoutDuration = 0
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -545,66 +515,11 @@ export class FirebaseX extends IonicNativePlugin {
|
||||
* Signs the user into Firebase with credentials obtained using verifyPhoneNumber().
|
||||
* See the Android- and iOS-specific Firebase documentation for more info.
|
||||
* @param {object} credential - a credential object returned by the success callback of an authentication method
|
||||
* @param {function} success - callback function to call on successful sign-in using credentials
|
||||
* @param {function} error - callback function which will be passed a {string} error message as an argument
|
||||
*/
|
||||
@Cordova()
|
||||
signInWithCredential(credential: object): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new email/password-based user account. If account creation is successful, user will be automatically signed in.
|
||||
* @param email
|
||||
* @param password
|
||||
*/
|
||||
@Cordova()
|
||||
createUserWithEmailAndPassword(email: string, password: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Signs in to an email/password-based user account.
|
||||
* @param email
|
||||
* @param password
|
||||
*/
|
||||
@Cordova()
|
||||
signInUserWithEmailAndPassword(email: string, password: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Signs in user with custom token.
|
||||
* @param customToken
|
||||
*/
|
||||
@Cordova()
|
||||
signInUserWithCustomToken(customToken: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Signs in user anonymously.
|
||||
*/
|
||||
@Cordova()
|
||||
signInUserAnonymously(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Authenticates the user with a Google account to obtain a credential that can be used to sign the user in/link to an existing user account/reauthenticate the user.
|
||||
* @param clientId
|
||||
*/
|
||||
@Cordova()
|
||||
authenticateUserWithGoogle(clientId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Authenticates the user with an Apple account using Sign In with Apple to obtain a credential that can be used to sign the user in/link to an existing user account/reauthenticate the user.
|
||||
* @param locale
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse',
|
||||
})
|
||||
authenticateUserWithApple(locale?: string): Promise<any> {
|
||||
signInWithCredential(credential: object, success: () => void, error: (err: string) => void): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -631,76 +546,6 @@ export class FirebaseX extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if there is a current Firebase user signed into the app.
|
||||
*/
|
||||
@Cordova()
|
||||
isUserSignedIn(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Signs current Firebase user out of the app.
|
||||
*/
|
||||
@Cordova()
|
||||
signOutUser(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the display name and/or photo URL of the current Firebase user signed into the app.
|
||||
* @param profile
|
||||
*/
|
||||
@Cordova()
|
||||
updateUserProfile(profile: { name: string; photoUri: string }): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates/sets the email address of the current Firebase user signed into the app.
|
||||
* @param email
|
||||
*/
|
||||
@Cordova()
|
||||
updateUserEmail(email: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a verification email to the currently configured email address of the current Firebase user signed into the app.
|
||||
* When the user opens the contained link, their email address will have been verified.
|
||||
*/
|
||||
@Cordova()
|
||||
sendUserEmailVerification(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates/sets the account password for the current Firebase user signed into the app.
|
||||
* @param password
|
||||
*/
|
||||
@Cordova()
|
||||
updateUserPassword(password: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a password reset email to the specified user email address.
|
||||
* Note: doesn't require the Firebase user to be signed in to the app.
|
||||
* @param email
|
||||
*/
|
||||
@Cordova()
|
||||
sendUserPasswordResetEmail(email: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes the account of the current Firebase user signed into the app.
|
||||
*/
|
||||
@Cordova()
|
||||
deleteUser(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a Javascript function to invoke when Firebase Authentication state changes between user signed in/signed out.
|
||||
* @param {function} fn - callback function to invoke when authentication state changes
|
||||
|
||||
@@ -192,10 +192,10 @@ export class Geolocation extends IonicNativePlugin {
|
||||
* ```
|
||||
*
|
||||
* @param {GeolocationOptions} options The [geolocation options](https://developer.mozilla.org/en-US/docs/Web/API/PositionOptions).
|
||||
* @returns {Observable<Geoposition | PositionError>} Returns an Observable that notifies with the [position](https://developer.mozilla.org/en-US/docs/Web/API/Position) of the device, or errors.
|
||||
* @returns {Observable<Geoposition>} Returns an Observable that notifies with the [position](https://developer.mozilla.org/en-US/docs/Web/API/Position) of the device, or errors.
|
||||
*/
|
||||
watchPosition(options?: GeolocationOptions): Observable<Geoposition | PositionError> {
|
||||
return new Observable<Geoposition | PositionError>((observer: any) => {
|
||||
watchPosition(options?: GeolocationOptions): Observable<Geoposition> {
|
||||
return new Observable<Geoposition>((observer: any) => {
|
||||
const watchId = navigator.geolocation.watchPosition(
|
||||
observer.next.bind(observer),
|
||||
observer.next.bind(observer),
|
||||
|
||||
@@ -109,7 +109,9 @@ export class Globalization extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse',
|
||||
})
|
||||
getDatePattern(options: GlobalizationOptions): Promise<{
|
||||
getDatePattern(
|
||||
options: GlobalizationOptions
|
||||
): Promise<{
|
||||
pattern: string;
|
||||
timezone: string;
|
||||
iana_timezone: string;
|
||||
@@ -185,7 +187,9 @@ export class Globalization extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse',
|
||||
})
|
||||
getNumberPattern(options: { type: string }): Promise<{
|
||||
getNumberPattern(options: {
|
||||
type: string;
|
||||
}): Promise<{
|
||||
pattern: string;
|
||||
symbol: string;
|
||||
fraction: number;
|
||||
@@ -204,7 +208,9 @@ export class Globalization extends IonicNativePlugin {
|
||||
* @returns {Promise<{ pattern: string, code: string, fraction: number, rounding: number, decimal: number, grouping: string }>}
|
||||
*/
|
||||
@Cordova()
|
||||
getCurrencyPattern(currencyCode: string): Promise<{
|
||||
getCurrencyPattern(
|
||||
currencyCode: string
|
||||
): Promise<{
|
||||
pattern: string;
|
||||
code: string;
|
||||
fraction: number;
|
||||
|
||||
@@ -24,10 +24,6 @@ export interface HTTPResponse {
|
||||
error?: string;
|
||||
}
|
||||
|
||||
interface AbortedResponse {
|
||||
aborted: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name HTTP
|
||||
* @description
|
||||
@@ -88,7 +84,6 @@ export class HTTP extends IonicNativePlugin {
|
||||
UNSUPPORTED_URL: number;
|
||||
NOT_CONNECTED: number;
|
||||
POST_PROCESSING_FAILED: number;
|
||||
ABORTED: number;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -235,29 +230,6 @@ 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
|
||||
@@ -270,29 +242,6 @@ 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
|
||||
@@ -305,29 +254,6 @@ 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
|
||||
@@ -340,29 +266,6 @@ 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
|
||||
@@ -375,29 +278,6 @@ 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
|
||||
@@ -410,29 +290,6 @@ 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
|
||||
@@ -445,29 +302,6 @@ 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
|
||||
@@ -482,33 +316,6 @@ 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
|
||||
@@ -522,31 +329,6 @@ 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
|
||||
@@ -570,7 +352,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' | 'raw';
|
||||
serializer?: 'json' | 'urlencoded' | 'utf8' | 'multipart';
|
||||
timeout?: number;
|
||||
headers?: { [index: string]: string };
|
||||
filePath?: string | string[];
|
||||
@@ -580,53 +362,4 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,287 +1,212 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
Plugin,
|
||||
Cordova,
|
||||
CordovaProperty,
|
||||
CordovaInstance,
|
||||
InstanceProperty,
|
||||
IonicNativePlugin,
|
||||
} from '@ionic-native/core';
|
||||
import { kMaxLength } from 'buffer';
|
||||
import { resolve } from 'dns';
|
||||
import { reject } from 'lodash';
|
||||
import { error } from 'console';
|
||||
|
||||
@Plugin({
|
||||
pluginName: 'cordova-plugin-hypertrack-v3',
|
||||
plugin: 'cordova-plugin-hypertrack-v3',
|
||||
pluginRef: 'hypertrack',
|
||||
repo: 'https://github.com/hypertrack/cordova-plugin-hypertrack.git',
|
||||
platforms: ['Android, iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class HyperTrackPlugin extends IonicNativePlugin {
|
||||
@Cordova()
|
||||
initialize(publishableKey: string): Promise<HyperTrackCordova> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
getBlockers(): Promise<Set<Blocker>> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
enableDebugLogging(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Interfaces for Cordova Plugin callbacks
|
||||
interface DeviceIdReceiver {
|
||||
(deviceId: string): any;
|
||||
}
|
||||
interface TrackingStateReceiver {
|
||||
(isRunning: boolean): any;
|
||||
}
|
||||
interface FailureHandler {
|
||||
(error: Error): any;
|
||||
}
|
||||
interface SuccessHandler {
|
||||
(): any;
|
||||
}
|
||||
|
||||
// SDK instance that exposed from Cordova utilizes usage of callbacks, so we
|
||||
// wrap it with adapter to avoid mix of callbacks and Promises
|
||||
interface HyperTrackCordova {
|
||||
getDeviceId(success: DeviceIdReceiver, error: FailureHandler): void;
|
||||
isRunning(success: TrackingStateReceiver, error: FailureHandler): void;
|
||||
setDeviceName(name: string, success: SuccessHandler, error: FailureHandler): void;
|
||||
setDeviceMetadata(metadata: Object, success: SuccessHandler, error: FailureHandler): void;
|
||||
setTrackingNotificationProperties(
|
||||
title: string,
|
||||
message: string,
|
||||
success: SuccessHandler,
|
||||
error: FailureHandler
|
||||
): void;
|
||||
addGeoTag(
|
||||
geotagData: Object,
|
||||
expectedLocation: Coordinates | undefined,
|
||||
success: SuccessHandler,
|
||||
error: FailureHandler
|
||||
): void;
|
||||
requestPermissionsIfNecessary(success: SuccessHandler, error: FailureHandler): void;
|
||||
allowMockLocations(success: SuccessHandler, error: FailureHandler): void;
|
||||
syncDeviceSettings(success: SuccessHandler, error: FailureHandler): void;
|
||||
start(success: SuccessHandler, error: FailureHandler): void;
|
||||
stop(success: SuccessHandler, error: FailureHandler): void;
|
||||
}
|
||||
|
||||
export class CoordinatesValidationError extends Error {}
|
||||
|
||||
/** Wrapper class for passing spatial geoposition as a geotag's expected location */
|
||||
export class Coordinates {
|
||||
constructor(latitude: number, longitude: number) {
|
||||
if (latitude < -90.0 || latitude > 90.0 || longitude < -180.0 || longitude > 180.0) {
|
||||
throw new CoordinatesValidationError('latitude and longitude should be of correct valaues');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** A blocker is an obstacle that needs to be resolved to achieve reliable tracking. */
|
||||
export interface Blocker {
|
||||
/** Recommended name for a user action, that needs to be performed to resolve the blocker. */
|
||||
userActionTitle: String;
|
||||
/** Recommended name for a button, that will navigate user to the place where he can resolve the blocker */
|
||||
userActionCTA: String;
|
||||
/** User action explanation */
|
||||
userActionExplanation: String;
|
||||
/** An action that navigates user to the dedicated settings menu. */
|
||||
resolve: () => void;
|
||||
}
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* @name HyperTrack
|
||||
* @description
|
||||
* HyperTrack cordova plugin wrapper for Ionic Native. Location-based services provider.
|
||||
* Make sure to include your publishable key at config.xml (see [HyperTrack Cordova Setup](https://docs.hypertrack.com/sdks/cordova/setup.html#step-2-configure-the-sdk)).
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { HyperTrack } from '@ionic-native/hyper-track';
|
||||
* import { HyperTrack } from '@ionic-native/hyper-track/ngx';
|
||||
*
|
||||
* initializeHypertrack() {
|
||||
* HyperTrack.enableDebugLogging();
|
||||
* HyperTrack.initialize('YOUR_PUBLISHING_KEY')
|
||||
* .then( this.onSdkInstanceReceived )
|
||||
* .catch( (err) => console.error("HyperTrack init failed with error " + err) );
|
||||
* }
|
||||
* onSdkInstanceReceived(sdkInstance: HyperTrack) {
|
||||
* sdkInstance.getDeviceId()
|
||||
* .then((id) => console.log("Got device id " + id))
|
||||
* .then(() => sdkInstance.setDeviceName("Elvis Ionic"))
|
||||
* .then(() => console.log("Device name was changed"))
|
||||
* .then(() => sdkInstance.setDeviceMetadata({platform: "Ionic Android"}))
|
||||
* .then(() => console.log("Device metadata was changed"))
|
||||
* .then(() => sdkInstance.setTrackingNotificationProperties("Tracking On", "Ionic SDK is tracking"))
|
||||
* .then(() => console.log("Notification properties were changed"))
|
||||
* .catch((err) => console.error("Got error in HyperTrack " + err));
|
||||
* }
|
||||
* constructor(private hyperTrack: HyperTrack) { }
|
||||
*
|
||||
* // Check if app has location permissions enabled
|
||||
* this.hyperTrack.checkLocationPermission().then(response => {
|
||||
* // response (String) can be "true" or "false"
|
||||
* if (response != "true") {
|
||||
* // Ask for permissions
|
||||
* this.hyperTrack.requestPermissions().then(response => {}, error => {});
|
||||
* }
|
||||
* }, error => {});
|
||||
*
|
||||
* // Check if app has location services enabled
|
||||
* this.hyperTrack.checkLocationServices().then(response => {
|
||||
* // response (String) can be "true" or "false"
|
||||
* if (response != "true") {
|
||||
* // Request services to be enabled
|
||||
* this.hyperTrack.requestLocationServices().then(response => {}, error => {});
|
||||
* }
|
||||
* }, error => {});
|
||||
*
|
||||
* // First set the current user. This can be done via getOrCreateUser() or setUserId()
|
||||
* this.hyperTrack.setUserId("xxx").then(user => {
|
||||
* // user (String) is a String representation of a User's JSON
|
||||
*
|
||||
* this.hyperTrack.startTracking().then(userId => {}, trackingError => {});
|
||||
*
|
||||
* this.hyperTrack.createAndAssignAction('visit', 'lookupId','address', 20.12, -100.3).then(action => {
|
||||
* // Handle action. It's a String representation of the Action's JSON. For example:
|
||||
* // '{"eta":"Jul 17, 2017 12:50:03 PM","assigned_at":"Jul 17, 2017 12:34:38 PM",,"distance":"0.0",...}'
|
||||
* }, error => {});
|
||||
*
|
||||
* // You can complete an action with completeAction() or completeActionWithLookupId()
|
||||
* this.hyperTrack.completeAction('action-id').then(response => {
|
||||
* // Handle response (String). Should be "OK".
|
||||
* }, error => {});
|
||||
*
|
||||
* this.hyperTrack.getCurrentLocation().then(location => {
|
||||
* // Handle location. It's a String representation of a Location's JSON.For example:
|
||||
* // '{"mAccuracy":22.601,,"mLatitude":23.123456, "mLongitude":-100.1234567, ...}'
|
||||
* }, error => {});
|
||||
*
|
||||
* this.hyperTrack.stopTracking().then(success => {
|
||||
* // Handle success (String). Should be "OK".
|
||||
* }, error => {});
|
||||
*
|
||||
* }, error => {});*
|
||||
* ```
|
||||
*
|
||||
*/
|
||||
export class HyperTrack {
|
||||
/** Enables debug log in native HyperTrack SDK. */
|
||||
static enableDebugLogging(): void {
|
||||
new HyperTrackPlugin().enableDebugLogging();
|
||||
@Plugin({
|
||||
pluginName: 'HyperTrack',
|
||||
plugin: 'cordova-plugin-hypertrack',
|
||||
pluginRef: 'cordova.plugins.HyperTrack',
|
||||
repo: 'https://github.com/hypertrack/hypertrack-cordova',
|
||||
platforms: ['Android'],
|
||||
})
|
||||
@Injectable()
|
||||
export class HyperTrack extends IonicNativePlugin {
|
||||
/**
|
||||
* Returns given text. For testing purposes.
|
||||
* @param {String} text Given text to print
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the result text (which is the same as the given text) if successful, or it gets rejected if an error ocurred.
|
||||
*/
|
||||
@Cordova()
|
||||
helloWorld(text: String): Promise<String> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Entry point into SDK.
|
||||
*
|
||||
* Initializes SDK. Also resolves SDK instance that could be used to query deviceId or set
|
||||
* various data.
|
||||
* @param publishableKey account-specific secret from the HyperTrack dashborad.
|
||||
*
|
||||
* @see {@link https://dashboard.hypertrack.com/setup}.
|
||||
* Create a new user to identify the current device or get a user from a lookup id.
|
||||
* @param {String} name User's name
|
||||
* @param {String} phone User's phone
|
||||
* @param {String} photo User's photo as URL or a Base64 converted string
|
||||
* @param {String} lookupId User's lookupId, which is used to check if a new user is to be created (in this case you could set it to an internal reference for the user that you can use later to identify it), or if one with an existing lookupId is to be used.
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with a string representation of the User's JSON, or it gets rejected if an error ocurred.
|
||||
*/
|
||||
static initialize(publishableKey: string): Promise<HyperTrack> {
|
||||
return new Promise((resolve, reject) => {
|
||||
new HyperTrackPlugin()
|
||||
.initialize(publishableKey)
|
||||
.then((cordovaInstance: HyperTrackCordova) => {
|
||||
resolve(new HyperTrack(cordovaInstance));
|
||||
})
|
||||
.catch((err: Error) => reject(err));
|
||||
});
|
||||
@Cordova()
|
||||
getOrCreateUser(name: String, phone: String, photo: String, lookupId: String): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of blockers that needs to be resolved for reliable tracking.
|
||||
*
|
||||
* @see {Blocker}
|
||||
* Set UserId for the SDK created using HyperTrack APIs. This is useful if you already have a user previously created.
|
||||
* @param {String} userId User's ID
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with an "OK" string if successful, or it gets rejected if an error ocurred. An "OK" response doesn't necessarily mean that the userId was found. It just means that it was set correctly.
|
||||
*/
|
||||
static getBlockers(): Promise<Set<Blocker>> {
|
||||
return new HyperTrackPlugin().getBlockers();
|
||||
}
|
||||
|
||||
/** Resolves device ID that could be used to identify the device. */
|
||||
getDeviceId(): Promise<string> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.getDeviceId(
|
||||
deviceId => resolve(deviceId),
|
||||
err => reject(err)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/** Resolves to true if tracking service is running and false otherwise */
|
||||
isRunning(): Promise<boolean> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.isRunning(
|
||||
isRunning => resolve(isRunning),
|
||||
err => reject(err)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/** Sets device name that could be used to identify the device in HyperTrack dashboard */
|
||||
setDeviceName(name: string): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.setDeviceName(
|
||||
name,
|
||||
() => resolve(),
|
||||
err => reject(err)
|
||||
);
|
||||
});
|
||||
@Cordova()
|
||||
setUserId(userId: String): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this to set additional properties, like segments, teams etc.
|
||||
* @param metadata key-value pais of properties.
|
||||
* Enable the SDK and start tracking. This will fail if there is no user set.
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the userId (String) of the User being tracked if successful, or it gets rejected if an error ocurred. One example of an error is not setting a User with getOrCreateUser() or setUserId() before calling this function.
|
||||
*/
|
||||
setDeviceMetadata(metadata: Object): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.setDeviceMetadata(
|
||||
metadata,
|
||||
() => resolve(),
|
||||
err => reject(err)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/** Updates title and text in persistent notification, that appears when tracking is active. */
|
||||
setTrackingNotificationProperties(title: string, message: string): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.setTrackingNotificationProperties(
|
||||
title,
|
||||
message,
|
||||
() => resolve(),
|
||||
err => reject(err)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/** Adds special marker-like object to device timeline. */
|
||||
addGeotag(geotagData: Object, expectedLocation?: Coordinates): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.addGeoTag(
|
||||
geotagData,
|
||||
expectedLocation,
|
||||
() => resolve(),
|
||||
err => reject(err)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/** Pops up permission request dialog, if permissions weren't granted before or does nothing otherwise. */
|
||||
requestPermissionsIfNecessary(): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.requestPermissionsIfNecessary(
|
||||
() => resolve(),
|
||||
err => reject(err)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/** Allows injecting false locations into the SDK, which ignores them by default. */
|
||||
allowMockLocations(): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.allowMockLocations(
|
||||
() => resolve(),
|
||||
err => reject(err)
|
||||
);
|
||||
});
|
||||
@Cordova()
|
||||
startTracking(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Synchronizes tracking state with platform model. This method is used to
|
||||
* harden platform2device communication channel.
|
||||
* Create and assign an action to the current user using specified parameters
|
||||
* @param {String} type The action type. Can be one from "pickup", "delivery", "dropoff", "visit", "stopover" or "task"
|
||||
* @param {String} lookupId The Action's desired lookupId
|
||||
* @param {String} expectedPlaceAddress The address of the Action
|
||||
* @param {Number} expectedPlaceLatitude The latitude of the Action
|
||||
* @param {Number} expectedPlaceLongitude The longitude of the Action
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with a string representation of the Action's JSON, or it gets rejected if an error ocurred.
|
||||
*/
|
||||
syncDeviceSettings(): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.syncDeviceSettings(
|
||||
() => resolve(),
|
||||
err => reject(err)
|
||||
);
|
||||
});
|
||||
@Cordova()
|
||||
createAndAssignAction(
|
||||
type: String,
|
||||
lookupId: String,
|
||||
expectedPlaceAddress: String,
|
||||
expectedPlaceLatitude: Number,
|
||||
expectedPlaceLongitude: Number
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/** Start tracking. */
|
||||
start(): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.start(
|
||||
() => resolve(),
|
||||
err => reject(err)
|
||||
);
|
||||
});
|
||||
/**
|
||||
* Complete an action from the SDK by its ID
|
||||
* @param {String} actionId ID of the Action that will be marked as completed
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with an "OK" string if successful, or it gets rejected if an error ocurred.
|
||||
*/
|
||||
@Cordova()
|
||||
completeAction(actionId: String): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/** Stop tracking. */
|
||||
stop(): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.stop(
|
||||
() => resolve(),
|
||||
err => reject(err)
|
||||
);
|
||||
});
|
||||
/**
|
||||
* Complete an action from the SDK using Action's lookupId as parameter
|
||||
* @param {String} lookupId Lookup ID of the Action that will be marked as completed
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with an "OK" string if successful, or it gets rejected if an error ocurred.
|
||||
*/
|
||||
@Cordova()
|
||||
completeActionWithLookupId(lookupId: String): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
private constructor(private cordovaInstanceHandle: HyperTrackCordova) {}
|
||||
/**
|
||||
* Disable the SDK and stop tracking.
|
||||
* Needs user setting (via getOrCreateUser() or setUserId()) first.
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the an "OK" string if successful, or it gets rejected if an error ocurred. One example of an error is not setting a User with getOrCreateUser() or setUserId() before calling this function.
|
||||
*/
|
||||
@Cordova()
|
||||
stopTracking(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user's current location from the SDK
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with a string representation of the Location's JSON, or it gets rejected if an error ocurred.
|
||||
*/
|
||||
@Cordova()
|
||||
getCurrentLocation(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if Location permission has been granted to the app (for Android).
|
||||
* Returns "true" or "false" in success method accordingly.
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the a string that can be "true" or "false", depending if location permission was granted, or it gets rejected if an error ocurred.
|
||||
*/
|
||||
@Cordova()
|
||||
checkLocationPermission(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request user to grant Location access to the app (for Anrdoid).
|
||||
* For Android Marshmallow and above. In other platforms, the Promise is never resolved.
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the a string that can be "true" or "false", depending if Location access was given to the app, or it gets rejected if an error ocurred.
|
||||
*/
|
||||
@Cordova()
|
||||
requestPermissions(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if Location services are enabled on the device (for Android).
|
||||
* Returns "true" or "false" in success method accordingly.
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the a string that can be "true" or "false", depending if location services are enabled, or it gets rejected if an error ocurred.
|
||||
*/
|
||||
@Cordova()
|
||||
checkLocationServices(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request user to enable Location services on the device.
|
||||
* For Android Marshmallow and above. In other platforms, the Promise is never resolved.
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the a string that can be "true" or "false", depending if Location services were enabled, or it gets rejected if an error ocurred.
|
||||
*/
|
||||
@Cordova()
|
||||
requestLocationServices(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -293,7 +293,7 @@ export class IBeacon extends IonicNativePlugin {
|
||||
*/
|
||||
@CordovaCheck({ sync: true })
|
||||
Delegate(): IBeaconDelegate {
|
||||
const delegate = new window.cordova.plugins.locationManager.Delegate();
|
||||
const delegate = new cordova.plugins.locationManager.Delegate();
|
||||
|
||||
delegate.didChangeAuthorizationStatus = (pluginResult?: IBeaconPluginResult) => {
|
||||
return new Observable<IBeaconPluginResult>((observer: any) => {
|
||||
@@ -358,7 +358,7 @@ export class IBeacon extends IonicNativePlugin {
|
||||
});
|
||||
};
|
||||
|
||||
window.cordova.plugins.locationManager.setDelegate(delegate);
|
||||
cordova.plugins.locationManager.setDelegate(delegate);
|
||||
return delegate;
|
||||
}
|
||||
|
||||
@@ -382,13 +382,7 @@ export class IBeacon extends IonicNativePlugin {
|
||||
minor?: number,
|
||||
notifyEntryStateOnDisplay?: boolean
|
||||
): BeaconRegion {
|
||||
return new window.cordova.plugins.locationManager.BeaconRegion(
|
||||
identifer,
|
||||
uuid,
|
||||
major,
|
||||
minor,
|
||||
notifyEntryStateOnDisplay
|
||||
);
|
||||
return new cordova.plugins.locationManager.BeaconRegion(identifer, uuid, major, minor, notifyEntryStateOnDisplay);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,480 +0,0 @@
|
||||
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,13 +7,6 @@ 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
|
||||
@@ -62,9 +55,9 @@ export interface IAPProduct {
|
||||
|
||||
downloaded?: boolean;
|
||||
|
||||
lastRenewalDate?: Date;
|
||||
lastRenewalDate?: string;
|
||||
|
||||
expiryDate?: Date;
|
||||
expiryDate?: string;
|
||||
|
||||
introPrice?: string;
|
||||
|
||||
@@ -88,7 +81,7 @@ export interface IAPProduct {
|
||||
|
||||
additionalData?: any;
|
||||
|
||||
transaction?: PlayStoreReceipt | AppStoreReceipt;
|
||||
transaction?: any;
|
||||
|
||||
/**
|
||||
* Call `product.finish()` to confirm to the store that an approved order has been delivered.
|
||||
@@ -197,22 +190,6 @@ 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
|
||||
*/
|
||||
@@ -564,11 +541,11 @@ export class IAPError {
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'InAppPurchase2',
|
||||
plugin: 'cordova-plugin-purchase',
|
||||
plugin: 'cc.fovea.cordova.purchase',
|
||||
pluginRef: 'store',
|
||||
repo: 'https://github.com/j3k0/cordova-plugin-purchase',
|
||||
platforms: ['iOS', 'Android', 'Windows'],
|
||||
install: 'ionic cordova plugin add cordova-plugin-purchase --variable BILLING_KEY="<ANDROID_BILLING_KEY>"',
|
||||
install: 'ionic cordova plugin add cc.fovea.cordova.purchase --variable BILLING_KEY="<ANDROID_BILLING_KEY>"',
|
||||
})
|
||||
@Injectable()
|
||||
export class InAppPurchase2 extends IonicNativePlugin {
|
||||
@@ -888,9 +865,7 @@ export class InAppPurchase2 extends IonicNativePlugin {
|
||||
* and in the callback `product.finish()` should be called.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
refresh(): IRefeshResult {
|
||||
return;
|
||||
}
|
||||
refresh(): void {}
|
||||
|
||||
/** Lightweight method like refresh but do not relogin user */
|
||||
@Cordova({ sync: true })
|
||||
@@ -899,12 +874,4 @@ 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 {}
|
||||
|
||||
/** Opens the Manage Billing page (AppStore, Play, Microsoft, ...), where the user can update his/her payment methods. */
|
||||
@Cordova({ sync: true })
|
||||
manageBilling(): void {}
|
||||
}
|
||||
|
||||
@@ -214,34 +214,4 @@ 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,45 +0,0 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name ios-aswebauthenticationsession-api
|
||||
* @description
|
||||
* Plugin for iOS 12 ASWebAuthenticationSession API
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { IosASWebauthenticationSession } from '@ionic-native/ios-aswebauthenticationsession-api/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private IosASWebauthenticationSession: ios-aswebauthenticationsession-api) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.IosASWebauthenticationSession.start(callbackUrl, authorizeURL)
|
||||
* .then((redirectUrl: string) => console.log(redirectUrl))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
|
||||
@Plugin({
|
||||
pluginName: 'IosASWebauthenticationSession',
|
||||
plugin: 'cordova-plugin-ios-aswebauthenticationsession-api',
|
||||
pluginRef: 'plugins.ASWebAuthSession',
|
||||
repo: 'https://github.com/jwelker110/cordova-plugin-ios-aswebauthenticationsession-api',
|
||||
platforms: ['iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class IosASWebauthenticationSession extends IonicNativePlugin {
|
||||
/**
|
||||
* This function start an authentication flow in ASWebauthenticationSession
|
||||
* @param callbackUrl {string} Callback URL of your App
|
||||
* @param authorizeURL {number} Authorization URL
|
||||
* @return {Promise<string>} Returns a promise that resolves a string containing the redirect URL after finishing ASWebauthenticationSession
|
||||
*/
|
||||
@Cordova()
|
||||
start(callbackUrl: string, authorizeURL: string): Promise<string> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -407,11 +407,13 @@ export class BAMCardInformation {
|
||||
|
||||
/**
|
||||
* @name Jumio
|
||||
* @description Check out [example with Angular 9.1 & Capacitor 2.1](https://github.com/zendigital/jumio-ionic-demo)
|
||||
* @description
|
||||
* [Jumio mobile-cordova](https://github.com/Jumio/mobile-cordova) Plugin for Ionic
|
||||
*
|
||||
* [Platform Customization](https://github.com/Jumio/mobile-cordova#customization) is possible
|
||||
* Read this for [Platform Customization](https://github.com/Jumio/mobile-cordova#customization) is possible
|
||||
*
|
||||
* To get Jumio Cordova working on Android check out this [FAQ](https://github.com/Jumio/mobile-cordova#faq)
|
||||
*
|
||||
* Original source: [Jumio mobile-cordova](https://github.com/Jumio/mobile-cordova) Plugin for Apache Cordova
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import {
|
||||
@@ -443,9 +445,10 @@ export class BAMCardInformation {
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Jumio',
|
||||
plugin: 'jumio-cordova',
|
||||
plugin: 'cordova-plugin-jumio-mobilesdk',
|
||||
pluginRef: 'Jumio',
|
||||
repo: 'https://github.com/danielzen/jumio-cordova',
|
||||
repo: 'https://github.com/Jumio/mobile-cordova',
|
||||
install: 'npm install git://github.com/Jumio/mobile-cordova.git',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export type BiometryType = 'face' | 'touch';
|
||||
|
||||
/**
|
||||
* @name Keychain Touch Id
|
||||
* @description
|
||||
@@ -39,7 +37,7 @@ export class KeychainTouchId extends IonicNativePlugin {
|
||||
* @return {Promise<any>} Returns a promise that resolves when there is hardware support
|
||||
*/
|
||||
@Cordova()
|
||||
isAvailable(): Promise<BiometryType> {
|
||||
isAvailable(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -48,10 +46,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<void>} Returns a promise that resolves when there is a result
|
||||
* @return {Promise<any>} Returns a promise that resolves when there is a result
|
||||
*/
|
||||
@Cordova()
|
||||
save(key: string, password: string, userAuthenticationRequired: boolean): Promise<void> {
|
||||
save(key: string, password: string, userAuthenticationRequired: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -60,30 +58,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<string>} Returns a promise that resolves when the key value is successfully retrieved or an error
|
||||
* @return {Promise<any>} Returns a promise that resolves when the key value is successfully retrieved or an error
|
||||
*/
|
||||
@Cordova()
|
||||
verify(key: string, message: string): Promise<string> {
|
||||
verify(key: string, message: string): Promise<any> {
|
||||
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<void>} Returns a promise that resolves with success if the key is available or failure if key is not.
|
||||
* @return {Promise<any>} Returns a promise that resolves with success if the key is available or failure if key is not.
|
||||
*/
|
||||
@Cordova()
|
||||
has(key: string): Promise<void> {
|
||||
has(key: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes the password stored under given key from the keychain.
|
||||
* @param key {string} the key you want to delete from keychain
|
||||
* @return {Promise<void>} Returns a promise that resolves with success if the key is deleted or failure if key is not
|
||||
* @return {Promise<any>} Returns a promise that resolves with success if the key is deleted or failure if key is not
|
||||
*/
|
||||
@Cordova()
|
||||
delete(key: string): Promise<void> {
|
||||
delete(key: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface PromptsOptions {
|
||||
/**
|
||||
@@ -168,15 +168,10 @@ export interface LaunchNavigatorOptions {
|
||||
launchModeAppleMaps?: string;
|
||||
|
||||
/**
|
||||
* (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.
|
||||
* 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.
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
@@ -302,8 +297,6 @@ export class LaunchNavigator extends IonicNativePlugin {
|
||||
BICYCLING: 'bicycling',
|
||||
TRANSIT: 'transit',
|
||||
};
|
||||
|
||||
@CordovaProperty()
|
||||
appSelection: AppSelection;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/**
|
||||
* @name Launch Review
|
||||
@@ -56,10 +55,10 @@ export class LaunchReview extends IonicNativePlugin {
|
||||
* - First: after `LaunchReview.rating()` is called and the request to show the dialog is successful. Will be passed the value `requested`.
|
||||
* - Second: if and when the Rating dialog is actually displayed. Will be passed the value `shown`.
|
||||
* - Third: if and when the Rating dialog is dismissed. Will be passed the value `dismissed`.
|
||||
* @returns {Observable<string>}
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
@Cordova({ observable: true })
|
||||
rating(): Observable<string> {
|
||||
@Cordova({ platforms: ['iOS'] })
|
||||
rating(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name LocalBackup
|
||||
* @description
|
||||
* This plugin to create local backup
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { LocalBackup } from '@ionic-native/local-backup/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private localBackup: LocalBackup) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.localBackup.create({data: {key: 'value'}})
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'LocalBackup',
|
||||
plugin: 'cordova-plugin-local-backup',
|
||||
pluginRef: 'LocalBackup',
|
||||
repo: 'https://github.com/MaximBelov/cordova-plugin-local-backup',
|
||||
install: 'ionic cordova plugin add cordova-plugin-local-backup',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class LocalBackup extends IonicNativePlugin {
|
||||
@Cordova()
|
||||
create(data: any): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
read(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
exists(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
remove(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -2,11 +2,11 @@ import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface LuxandConfig {
|
||||
/** The licence key gotten from Luxand */
|
||||
/** The licence key got from Luxand */
|
||||
licence: string;
|
||||
/** The internal database name the tracker should use */
|
||||
dbname: string;
|
||||
/** the number of retries when registering or identifying a face */
|
||||
/** the number of retry when registering of 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 associates to a face in it's internal database */
|
||||
/** The unique id Luxand Face SDK tracker associate 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 integrate Luxand Face SDK into your ionic projects, so you can implement face authentication easily in your application.
|
||||
* This plugin let you integrat Luxand Face SDK into your ionic projects, so you can implements face authentication easily in your applications.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
|
||||
@@ -11,8 +11,6 @@ export class MetrixConfig {
|
||||
private defaultTrackerToken: string = null;
|
||||
private shouldLaunchDeeplink = false;
|
||||
private firebaseAppId: string = null;
|
||||
private firebaseProjectId: string = null;
|
||||
private firebaseApiKey: string = null;
|
||||
private isLocationListeningEnable = false;
|
||||
private eventUploadThreshold: number = null;
|
||||
private eventUploadMaxBatchSize: number = null;
|
||||
@@ -34,10 +32,8 @@ export class MetrixConfig {
|
||||
this.defaultTrackerToken = defaultTrackerToken;
|
||||
}
|
||||
|
||||
setFirebaseId(firebaseAppId: string, firebaseProjectId: string, firebaseApiKey: string) {
|
||||
setFirebaseAppId(firebaseAppId: string) {
|
||||
this.firebaseAppId = firebaseAppId;
|
||||
this.firebaseProjectId = firebaseProjectId;
|
||||
this.firebaseApiKey = firebaseApiKey;
|
||||
}
|
||||
|
||||
setAppSecret(secretId: number, info1: number, info2: number, info3: number, info4: number) {
|
||||
|
||||
@@ -188,7 +188,6 @@ export class MixpanelPeople extends IonicNativePlugin {
|
||||
*
|
||||
* @param distinctId {string}
|
||||
* @return {Promise<any>}
|
||||
* @deprecated since 2016-11-21 - Use Mixpanel.identify instead.
|
||||
*/
|
||||
@Cordova()
|
||||
identify(distinctId: string): Promise<any> {
|
||||
|
||||
@@ -14,8 +14,7 @@ export type Event =
|
||||
| 'installationUpdated'
|
||||
| 'userUpdated'
|
||||
| 'personalized'
|
||||
| 'depersonalized'
|
||||
| 'deeplink';
|
||||
| 'depersonalized';
|
||||
|
||||
export interface CustomEvent {
|
||||
definitionId: string;
|
||||
@@ -28,21 +27,20 @@ export interface Configuration {
|
||||
*/
|
||||
applicationCode: string;
|
||||
geofencingEnabled?: boolean;
|
||||
inAppChatEnabled?: boolean;
|
||||
/**
|
||||
* Message storage save callback
|
||||
*/
|
||||
messageStorage?: string;
|
||||
defaultMessageStorage?: boolean;
|
||||
ios?: {
|
||||
notificationTypes?: string[]; // ['alert', 'badge', 'sound']
|
||||
notificationTypes?: string[];
|
||||
forceCleanup?: boolean;
|
||||
logging?: boolean;
|
||||
};
|
||||
android?: {
|
||||
notificationIcon?: string; // a resource name for a status bar icon (without extension), located in '/platforms/android/app/src/main/res/mipmap'
|
||||
multipleNotifications?: boolean; // set to 'true' to enable multiple notifications
|
||||
notificationAccentColor?: string; // set to hex color value in format '#RRGGBB' or '#AARRGGBB'
|
||||
notificationIcon: string; // a resource name for a status bar icon (without extension), located in '/platforms/android/app/src/main/res/mipmap'
|
||||
multipleNotifications: boolean;
|
||||
notificationAccentColor: string;
|
||||
};
|
||||
privacySettings?: {
|
||||
applicationCodePersistingDisabled?: boolean;
|
||||
@@ -76,11 +74,11 @@ export interface UserData {
|
||||
lastName?: string;
|
||||
middleName?: string;
|
||||
gender?: Gender;
|
||||
birthday?: string;
|
||||
birthday?: Date;
|
||||
phones?: string[];
|
||||
emails?: string[];
|
||||
tags?: string[];
|
||||
customAttributes?: Record<string, string | number | boolean | any[]>;
|
||||
customAttributes?: Record<string, string | number | boolean>;
|
||||
}
|
||||
|
||||
export interface Installation {
|
||||
@@ -91,7 +89,7 @@ export interface Installation {
|
||||
sdkVersion?: string;
|
||||
appVersion?: string;
|
||||
os?: OS;
|
||||
osVersion?: string;
|
||||
osVersion: string;
|
||||
deviceManufacturer?: string;
|
||||
deviceModel?: string;
|
||||
deviceSecure?: boolean;
|
||||
@@ -102,18 +100,15 @@ export interface Installation {
|
||||
customAttributes?: Record<string, string | number | boolean>;
|
||||
}
|
||||
|
||||
/**
|
||||
* User's unique ID. One UserIdentity parameter must be provided if used.
|
||||
*/
|
||||
export interface UserIdentity {
|
||||
phones?: string[];
|
||||
emails?: string[];
|
||||
externalUserId?: string;
|
||||
externalUserId: string;
|
||||
}
|
||||
|
||||
export interface PersonalizeContext {
|
||||
userIdentity: UserIdentity;
|
||||
userAttributes?: Record<string, string | number | boolean | any[]>;
|
||||
userAttributes?: Record<string, string>;
|
||||
forceDepersonalize?: boolean;
|
||||
}
|
||||
|
||||
@@ -134,11 +129,6 @@ 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 {
|
||||
@@ -146,12 +136,6 @@ export interface MobileMessagingError {
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface ChatConfig {
|
||||
ios?: {
|
||||
showModally: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export class DefaultMessageStorage {
|
||||
@Cordova({ sync: true })
|
||||
find(messageId: string, callback: (message: Message) => void) {
|
||||
@@ -453,15 +437,4 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
/**
|
||||
* 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-controls2',
|
||||
plugin: 'cordova-plugin-music-controls',
|
||||
pluginRef: 'MusicControls',
|
||||
repo: 'https://github.com/ghenry22/cordova-plugin-music-controls2',
|
||||
repo: 'https://github.com/homerours/cordova-music-controls-plugin',
|
||||
platforms: ['Android', 'iOS', 'Windows'],
|
||||
})
|
||||
@Injectable()
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, CordovaCheck, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable, merge } from 'rxjs';
|
||||
import { mapTo } from 'rxjs/operators';
|
||||
|
||||
declare const navigator: any;
|
||||
|
||||
export enum Connection {
|
||||
UNKNOWN = 'unknown',
|
||||
ETHERNET = 'ethernet',
|
||||
WIFI = 'wifi',
|
||||
CELL_2G = '2g',
|
||||
CELL_3G = '3g',
|
||||
CELL_4G = '4g',
|
||||
CELL = 'cellular',
|
||||
NONE = 'none',
|
||||
UNKNOWN = 0,
|
||||
ETHERNET,
|
||||
WIFI,
|
||||
CELL_2G,
|
||||
CELL_3G,
|
||||
CELL_4G,
|
||||
CELL,
|
||||
NONE,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -96,14 +95,11 @@ export class Network extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Returns an observable to watch connection changes
|
||||
* @return {Observable<'connected' | 'disconnected'>}
|
||||
* @return {Observable<any>}
|
||||
*/
|
||||
@CordovaCheck()
|
||||
onChange(): Observable<'connected' | 'disconnected'> {
|
||||
return merge(
|
||||
this.onConnect().pipe(mapTo('connected')),
|
||||
this.onDisconnect().pipe(mapTo('disconnected')) as Observable<'disconnected'>
|
||||
);
|
||||
onChange(): Observable<any> {
|
||||
return merge(this.onConnect(), this.onDisconnect());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -38,14 +38,6 @@ export interface NfcTag {
|
||||
type?: string;
|
||||
}
|
||||
|
||||
export interface ScanOptions {
|
||||
/**
|
||||
* If true, keep the scan session open so write can be called
|
||||
* after reading. The default value is false.
|
||||
*/
|
||||
keepSessionOpen?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name NFC
|
||||
* @description
|
||||
@@ -93,7 +85,7 @@ export interface ScanOptions {
|
||||
plugin: 'phonegap-nfc',
|
||||
pluginRef: 'nfc',
|
||||
repo: 'https://github.com/chariotsolutions/phonegap-nfc',
|
||||
platforms: ['Android', 'iOS', 'Windows'],
|
||||
platforms: ['Android', 'BlackBerry 10', 'Windows', 'Windows Phone 8', 'iOS'],
|
||||
})
|
||||
/**
|
||||
* @{ NFC } class methods
|
||||
@@ -138,7 +130,7 @@ export class NFC extends IonicNativePlugin {
|
||||
* https://github.com/chariotsolutions/phonegap-nfc#nfcscanndef
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
scanNdef(options?: ScanOptions): Promise<NfcTag> {
|
||||
scanNdef(): Promise<NfcTag> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -149,7 +141,7 @@ export class NFC extends IonicNativePlugin {
|
||||
* https://github.com/chariotsolutions/phonegap-nfc#nfcscantag
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
scanTag(options?: ScanOptions): Promise<NfcTag> {
|
||||
scanTag(): Promise<NfcTag> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -119,9 +119,7 @@ export interface OCRResult {
|
||||
* @name OCR
|
||||
* @description
|
||||
* This plugin attempts to identify and extract text from an image.
|
||||
* Please note: This plugin depends on the GoogleMobileVision pod which is referencing UIWebview, that has been deprecated by Apple.
|
||||
* Don't use this plugin in an app intended for App Store as you will get a review rejection from Apple: `Deprecated API Usage — Apple will stop accepting submissions of apps that use UIWebView APIs`
|
||||
* For more info, please see the following Github issue [Google Mobile Vision relying on deprecated UIWebview](https://github.com/NeutrinosPlatform/cordova-plugin-mobile-ocr/issues/27).
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { OCR, OCRSourceType } from '@ionic-native/ocr/ngx';
|
||||
|
||||
@@ -303,28 +303,6 @@ export enum OSActionType {
|
||||
ActionTake = 1,
|
||||
}
|
||||
|
||||
/**
|
||||
* Details about the In-App Message action element (button or image) that was tapped on.
|
||||
*/
|
||||
export interface OSInAppMessageAction {
|
||||
/**
|
||||
* An optional click name defined for the action element. null or nil (iOS) if not set.
|
||||
*/
|
||||
click_name: string;
|
||||
/**
|
||||
* An optional URL that opens when the action takes place. null or nil (iOS) if not set.
|
||||
*/
|
||||
click_url: string;
|
||||
/**
|
||||
* `true` if this is the first time the user has pressed any action on the In-App Message.
|
||||
*/
|
||||
first_click: boolean;
|
||||
/**
|
||||
* If `true`, the In-App Message will animate off the screen. If `false`, the In-App Message will stay on screen until the user dismisses it.
|
||||
*/
|
||||
closes_message: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name OneSignal
|
||||
* @description
|
||||
@@ -428,7 +406,6 @@ export interface OSInAppMessageAction {
|
||||
* OSBackgroundImageLayout
|
||||
* OSNotificationOpenedResult
|
||||
* OSActionType
|
||||
* OSInAppMessageAction
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'OneSignal',
|
||||
@@ -487,18 +464,6 @@ export class OneSignal extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use to process an In-App Message the user just tapped on.
|
||||
*
|
||||
* @return {Observable<OSInAppMessageAction>}
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
})
|
||||
handleInAppMessageClicked(): Observable<OSInAppMessageAction> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* **iOS** - Settings for iOS apps
|
||||
*
|
||||
@@ -816,67 +781,4 @@ export class OneSignal extends IonicNativePlugin {
|
||||
*/
|
||||
@Cordova()
|
||||
removeExternalUserId(): void {}
|
||||
|
||||
/**
|
||||
* Add a trigger. May show an In-App Message if its trigger conditions were met.
|
||||
*
|
||||
* @param {string} key Key for the trigger.
|
||||
* @param {string | number | Object} value Value for the trigger. String or number recommended. Object passed in will be converted to a string.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
addTrigger(key: string, value: string | number | Object): void {}
|
||||
|
||||
/**
|
||||
* Add a map of triggers. May show an In-App Message if its trigger conditions were met.
|
||||
*
|
||||
* @param {Object.<string, string | number | Object>} triggers Allows you to set multiple trigger key/value pairs simultaneously. Pass a json object with key/value pairs like: `{"key": "value", "key2": "value2"}`.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
addTriggers(triggers: Object): void {}
|
||||
|
||||
/**
|
||||
* Removes a single trigger for the given key. May show an In-App Message if its trigger conditions were met.
|
||||
*
|
||||
* @param {string} key Key for trigger to remove.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
removeTriggerForKey(key: string): void {}
|
||||
|
||||
/**
|
||||
* Removes a list of triggers based on a collection (array) of keys. May show an In-App Message if its trigger conditions were met.
|
||||
*
|
||||
* @param {string[]} keys Removes a collection of triggers from their keys. Pass an array of trigger keys like: `["key1", "key2", "key3"]`.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
removeTriggersForKeys(keys: string[]): void {}
|
||||
|
||||
/**
|
||||
* Gets a trigger value for a provided trigger key.
|
||||
*
|
||||
* @param {string} key Key for trigger to get value.
|
||||
* @returns {Promise<string | number | Object>} Return value set with `addTrigger`, or `null`/`nil` (iOS) if never set or removed.
|
||||
*/
|
||||
@Cordova()
|
||||
getTriggerValueForKey(key: string): Promise<string | number | Object> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows you to temporarily pause all In-App Messages. You may want to do this while the user is engaged in an activity that you don't want a message to interrupt (such as watching a video).
|
||||
* An In-App Message that would display if not paused will display right after resume if its conditions to display remains satisfied.
|
||||
*
|
||||
* @param {boolean} pause To pause, set `true`. To resume, set `false`.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
pauseInAppMessages(pause: boolean): void {}
|
||||
}
|
||||
|
||||
@@ -1,481 +0,0 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* PaymentSDKConfiguration: payment request configuration
|
||||
*/
|
||||
export interface PaymentSDKConfiguration {
|
||||
/**
|
||||
* merchant profile id
|
||||
*/
|
||||
profileID: string;
|
||||
/**
|
||||
* merchant server key
|
||||
*/
|
||||
serverKey: string;
|
||||
/**
|
||||
* merchant client key
|
||||
*/
|
||||
clientKey: string;
|
||||
/**
|
||||
* transaction type: refer to TransactionType enum
|
||||
*/
|
||||
transactionType?: string;
|
||||
/**
|
||||
* transaction class: refer to TransactionClass enum
|
||||
*/
|
||||
transactionClass?: string;
|
||||
/**
|
||||
* order or cart id
|
||||
*/
|
||||
cartID: string;
|
||||
/**
|
||||
* payment currency
|
||||
*/
|
||||
currency: string;
|
||||
/**
|
||||
* amount
|
||||
*/
|
||||
amount: number;
|
||||
/**
|
||||
* order or cart description
|
||||
*/
|
||||
cartDescription: string;
|
||||
/**
|
||||
* user interface language code(en, ar, ..)
|
||||
*/
|
||||
languageCode?: string;
|
||||
/**
|
||||
* validate shipping info
|
||||
*/
|
||||
forceShippingInfo?: boolean;
|
||||
/**
|
||||
* validate billing info
|
||||
*/
|
||||
showBillingInfo?: boolean;
|
||||
/**
|
||||
* handle missing shipping info by showing shipping info section
|
||||
*/
|
||||
showShippingInfo?: boolean;
|
||||
/**
|
||||
* configured billing details
|
||||
*/
|
||||
billingDetails?: PaymentSDKBillingDetails;
|
||||
/**
|
||||
* configured shipping details
|
||||
*/
|
||||
shippingDetails?: PaymentSDKShippingDetails;
|
||||
/**
|
||||
* merchant country code
|
||||
*/
|
||||
merchantCountryCode: string;
|
||||
/**
|
||||
* title of the screen
|
||||
*/
|
||||
screenTitle?: string;
|
||||
/**
|
||||
* merchant name
|
||||
*/
|
||||
merchantName?: string;
|
||||
/**
|
||||
* server ip
|
||||
*/
|
||||
serverIP?: string;
|
||||
/**
|
||||
* tokenise type: refer to TokeiseType enum
|
||||
*/
|
||||
tokeniseType?: string;
|
||||
/**
|
||||
* token format: refer to TokeiseFormat enum
|
||||
*/
|
||||
tokenFormat?: string;
|
||||
/**
|
||||
* option to hide or show card scanner button
|
||||
*/
|
||||
hideCardScanner?: string;
|
||||
/**
|
||||
* merchant apple pay bundle id
|
||||
*/
|
||||
merchantApplePayIdentifier?: string;
|
||||
/**
|
||||
* minize the vlaidation on apple pay billing and shipping info
|
||||
*/
|
||||
simplifyApplePayValidation?: string;
|
||||
/**
|
||||
* supported apple pay networks
|
||||
*/
|
||||
supportedApplePayNetworks?: [string];
|
||||
/**
|
||||
* returned token
|
||||
*/
|
||||
token?: string;
|
||||
/**
|
||||
* returned transaction reference
|
||||
*/
|
||||
transactionReference?: string;
|
||||
/**
|
||||
* samsung Token
|
||||
*/
|
||||
samsungToken?: string;
|
||||
/**
|
||||
* customized theme
|
||||
*/
|
||||
theme?: PaymentSDKTheme;
|
||||
/**
|
||||
* list of alternative payment methods
|
||||
*/
|
||||
alternativePaymentMethods?: [string];
|
||||
}
|
||||
|
||||
/**
|
||||
* PaymentSDKBillingDetails
|
||||
*/
|
||||
export interface PaymentSDKBillingDetails {
|
||||
/**
|
||||
* billing: customer name
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* billing: customer email
|
||||
*/
|
||||
email?: string;
|
||||
/**
|
||||
* billing: customer phone
|
||||
*/
|
||||
phone?: string;
|
||||
/**
|
||||
* billing: customer address line
|
||||
*/
|
||||
addressLine?: string;
|
||||
/**
|
||||
* billing: customer city
|
||||
*/
|
||||
city?: string;
|
||||
/**
|
||||
* billing: customer state
|
||||
*/
|
||||
state?: string;
|
||||
/**
|
||||
* billing: customer country code
|
||||
*/
|
||||
countryCode?: string;
|
||||
/**
|
||||
* billing: customer zip code
|
||||
*/
|
||||
zip?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* PaymentSDKShippingDetails
|
||||
*/
|
||||
export interface PaymentSDKShippingDetails {
|
||||
/**
|
||||
* shipping: customer name
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* shipping: customer email
|
||||
*/
|
||||
email?: string;
|
||||
/**
|
||||
* shipping: customer phone
|
||||
*/
|
||||
phone?: string;
|
||||
/**
|
||||
* shipping: customer address line
|
||||
*/
|
||||
addressLine?: string;
|
||||
/**
|
||||
* shipping: customer city
|
||||
*/
|
||||
city?: string;
|
||||
/**
|
||||
* shipping: customer state
|
||||
*/
|
||||
state?: string;
|
||||
/**
|
||||
* shipping: customer country code
|
||||
*/
|
||||
countryCode?: string;
|
||||
/**
|
||||
* shipping: customer zip code
|
||||
*/
|
||||
zip?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* PaymentSDKTheme
|
||||
*/
|
||||
export interface PaymentSDKTheme {
|
||||
/**
|
||||
* theme: primary color
|
||||
*/
|
||||
primaryColor?: string;
|
||||
/**
|
||||
* theme: primary font color
|
||||
*/
|
||||
primaryFontColor?: string;
|
||||
/**
|
||||
* theme: primary font
|
||||
*/
|
||||
primaryFont?: string;
|
||||
/**
|
||||
* theme: secondary color
|
||||
*/
|
||||
secondaryColor?: string;
|
||||
/**
|
||||
* theme: secondary font color
|
||||
*/
|
||||
secondaryFontColor?: string;
|
||||
/**
|
||||
* theme: secondary font
|
||||
*/
|
||||
secondaryFont?: string;
|
||||
/**
|
||||
* theme: stroke color
|
||||
*/
|
||||
strokeColor?: string;
|
||||
/**
|
||||
* theme: primary color
|
||||
*/
|
||||
strokeThinckness?: number;
|
||||
/**
|
||||
* theme: input corner radius
|
||||
*/
|
||||
inputsCornerRadius?: number;
|
||||
/**
|
||||
* theme: button color
|
||||
*/
|
||||
buttonColor?: string;
|
||||
/**
|
||||
* theme: button font color
|
||||
*/
|
||||
buttonFontColor?: string;
|
||||
/**
|
||||
* theme: button font
|
||||
*/
|
||||
buttonFont?: string;
|
||||
/**
|
||||
* theme: title font color
|
||||
*/
|
||||
titleFontColor?: string;
|
||||
/**
|
||||
* theme: title font
|
||||
*/
|
||||
titleFont?: string;
|
||||
/**
|
||||
* theme: background color
|
||||
*/
|
||||
backgroundColor?: string;
|
||||
/**
|
||||
* theme: placeholder color
|
||||
*/
|
||||
placeholderColor?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* TokeniseType: define the behaviour of of saving card option inside the SDKs.
|
||||
*/
|
||||
export enum TokeniseType {
|
||||
/**
|
||||
* none: tokenise is off
|
||||
*/
|
||||
none = 'none',
|
||||
/**
|
||||
* merchantMandatory: tokenise is forced
|
||||
*/
|
||||
merchantMandatory = 'merchantMandatory',
|
||||
/**
|
||||
* userMandatory: tokenise is forced as per user approval
|
||||
*/
|
||||
userMandatory = 'userMandatory',
|
||||
/**
|
||||
* userOptinoal: tokenise if optional as per user approval
|
||||
*/
|
||||
userOptinoal = 'userOptinoal',
|
||||
}
|
||||
|
||||
/**
|
||||
* TokeniseFromat: the returned token format
|
||||
*/
|
||||
export enum TokeniseFromat {
|
||||
/**
|
||||
* none: no format
|
||||
*/
|
||||
none = '1',
|
||||
/**
|
||||
* hex32: Hex with 32 length
|
||||
*/
|
||||
hex32 = '2',
|
||||
/**
|
||||
* alphaNum20: alpha numeric 20 length
|
||||
*/
|
||||
alphaNum20 = '3',
|
||||
/**
|
||||
* digit22: digits with 22 length
|
||||
*/
|
||||
digit22 = '3',
|
||||
/**
|
||||
* digit16: digits with 16 length
|
||||
*/
|
||||
digit16 = '5',
|
||||
/**
|
||||
* alphaNum32: alpha numeric 32 length
|
||||
*/
|
||||
alphaNum32 = '6',
|
||||
}
|
||||
|
||||
/**
|
||||
* TransactionType
|
||||
*/
|
||||
export enum TransactionType {
|
||||
/**
|
||||
* sale
|
||||
*/
|
||||
sale = 'sale',
|
||||
/**
|
||||
* authorize / capture option
|
||||
*/
|
||||
authorize = 'auth',
|
||||
}
|
||||
|
||||
/**
|
||||
* TransactionClass
|
||||
*/
|
||||
export enum TransactionClass {
|
||||
/**
|
||||
* ecom: default transaction
|
||||
*/
|
||||
ecom = 'ecom',
|
||||
/**
|
||||
* recurring: recurring transaction
|
||||
*/
|
||||
recurring = 'recur',
|
||||
}
|
||||
|
||||
/**
|
||||
* AlternativePaymentMethod
|
||||
*/
|
||||
export enum AlternativePaymentMethod {
|
||||
/**
|
||||
* unionpay: for supporting payment with unionpay
|
||||
*/
|
||||
unionPay = 'unionpay',
|
||||
/**
|
||||
* stcpay: for supporting payment with stcpay
|
||||
*/
|
||||
stcPay = 'stcpay',
|
||||
/**
|
||||
* valu: for supporting payment with valu
|
||||
*/
|
||||
valu = 'valu',
|
||||
/**
|
||||
* meezaqr: for supporting payment with meezaqr
|
||||
*/
|
||||
meezaQR = 'meezaqr',
|
||||
/**
|
||||
* omannet: for supporting payment with omannet
|
||||
*/
|
||||
omannet = 'omannet',
|
||||
/**
|
||||
* knetcredit: for supporting payment with knetcredit
|
||||
*/
|
||||
knetCredit = 'knetcredit',
|
||||
/**
|
||||
* knetdebit: for supporting payment with knetdebit
|
||||
*/
|
||||
knetDebit = 'knetdebit',
|
||||
/**
|
||||
* fawry: for supporting payment with fawry
|
||||
*/
|
||||
fawry = 'fawry',
|
||||
}
|
||||
|
||||
/**
|
||||
* @name PayTabs
|
||||
* @description
|
||||
* A plugin that allows you to use PayTabs's Native SDKs for Android and iOS.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { PayTabs } from '@ionic-native/paytabs/ngx';
|
||||
*
|
||||
* constructor(private paytabs: PayTabs) { }
|
||||
*
|
||||
* ...
|
||||
* let billingDetails: PaymentSDKBillingDetails = {
|
||||
* name: "John Smith",
|
||||
* email: "email@domain.com",
|
||||
* phone: "+201111111111",
|
||||
* addressLine: "Address line",
|
||||
* city: "Dubai",
|
||||
* state: "Dubai",
|
||||
* countryCode: "AE",
|
||||
* zip: "1234"
|
||||
* };
|
||||
*
|
||||
* var configuration: PaymentSDKConfiguration = {
|
||||
* profileID: "*profile id*",
|
||||
* serverKey: "*server key*",
|
||||
* clientKey: "*cleint key*",
|
||||
* cartID: "12345",
|
||||
* currency: "USD",
|
||||
* cartDescription: "Flowers",
|
||||
* merchantCountryCode: "ae",
|
||||
* merchantName: "Flowers Store",
|
||||
* amount: 20,
|
||||
* screenTitle:"Pay with Card",
|
||||
* billingDetails: billingDetails
|
||||
* }
|
||||
*
|
||||
* this.paytabs.startCardPayment(configuration)
|
||||
* .then(result => console.log(result))
|
||||
* .catch(error => console.error(error));
|
||||
*
|
||||
* this.paytabs.startApplePayPayment(configuration)
|
||||
* .then(result => console.log(result))
|
||||
* .catch(error => console.error(error));
|
||||
*
|
||||
* this.paytabs.startAlternativePaymentMethod(configuration)
|
||||
* .then(result => console.log(result))
|
||||
* .catch(error => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'PayTabs',
|
||||
plugin: 'com.paytabs.cordova.plugin',
|
||||
pluginRef: 'com.paytabs.cordova.plugin',
|
||||
repo: 'https://github.com/paytabscom/paytabs-cordova',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class PayTabs extends IonicNativePlugin {
|
||||
/**
|
||||
* Start Card Payment
|
||||
* @param params {PaymentSDKConfiguration} payment request configuration
|
||||
* @return {Promise<any>} returns a promise that resolves with transaction details, or rejects with an error
|
||||
*/
|
||||
@Cordova()
|
||||
startCardPayment(configuration: PaymentSDKConfiguration): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Start ApplePay Payment
|
||||
* @param params {PaymentSDKConfiguration} payment request configuration
|
||||
* @return {Promise<any>} returns a promise that resolves with transaction details, or rejects with an error
|
||||
*/
|
||||
@Cordova()
|
||||
startApplePayPayment(configuration: PaymentSDKConfiguration): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Start Alternative Payment Method
|
||||
* @param params {PaymentSDKConfiguration} payment request configuration
|
||||
* @return {Promise<any>} returns a promise that resolves with transaction details, or rejects with an error
|
||||
*/
|
||||
@Cordova()
|
||||
startAlternativePaymentMethod(configuration: PaymentSDKConfiguration): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1,170 +0,0 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, CordovaProperty, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Pollfish
|
||||
* @description
|
||||
* Pollfish Ionic Native plugin wrapper
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Pollfish } from '@ionic-native/pollfish/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private pollfish: Pollfish) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.pollfish.init(false, false, 'YOUR_API_KEY', 1, 8, 'REQUEST_UUID', false);
|
||||
*
|
||||
* this.pollfish.initWithUserAttributes(false, false, 'YOUR_API_KEY', 1, 8, 'REQUEST_UUID', false, {
|
||||
* 'gender': '1',
|
||||
* ...
|
||||
* });
|
||||
*
|
||||
* this.pollfish.showPollfish();
|
||||
*
|
||||
* this.pollfish.hidePollfish();
|
||||
*
|
||||
* // Event Listeners
|
||||
*
|
||||
* this.pollfish.setEventCallback(pollfish.EventListener.OnPollfishSurveyReceived, (surveyInfo) => {
|
||||
* console.log("Survey Received: " + JSON.stringify(surveyInfo));
|
||||
* });
|
||||
*
|
||||
* this.pollfish.setEventCallback(pollfish.EventListener.OnPollfishSurveyCompleted, (result) => {
|
||||
* console.log("Survey Completed: " + JSON.stringify(surveyInfo));
|
||||
* });
|
||||
*
|
||||
* this.pollfish.setEventCallback(pollfish.EventListener.OnPollfishUserNotEligible, (_) => {
|
||||
* console.log("Pollfish User Not Eligible");
|
||||
* });
|
||||
*
|
||||
* this.pollfish.setEventCallback(pollfish.EventListener.OnPollfishSurveyNotAvailable, (_) => {
|
||||
* console.log("Pollfish Survey not available");
|
||||
* });
|
||||
*
|
||||
* this.pollfish.setEventCallback(pollfish.EventListener.OnPollfishOpened, (_) => {
|
||||
* console.log("Pollfish Survey panel is open");
|
||||
* });
|
||||
*
|
||||
* this.pollfish.setEventCallback(pollfish.EventListener.OnPollfishClosed, (_) => {
|
||||
* console.log("Pollfish Survey panel is closed");
|
||||
* });
|
||||
*
|
||||
* this.pollfish.setEventCallback(pollfish.EventListener.OnPollfishUserRejectedSurvey, (_) => {
|
||||
* console.log("Pollfish User Rejected Survey");
|
||||
* });
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Pollfish',
|
||||
plugin: 'com.pollfish.cordova_plugin',
|
||||
pluginRef: 'pollfishplugin',
|
||||
repo: 'https://github.com/pollfish/cordova-plugin-pollfish',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class Pollfish extends IonicNativePlugin {
|
||||
@CordovaProperty()
|
||||
EventListener: {
|
||||
OnPollfishClosed: string;
|
||||
OnPollfishOpened: string;
|
||||
OnPollfishSurveyReceived: string;
|
||||
OnPollfishSurveyCompleted: string;
|
||||
OnPollfishUserNotEligible: string;
|
||||
OnPollfishUserRejectedSurvey: string;
|
||||
OnPollfishSurveyNotAvailable: string;
|
||||
};
|
||||
|
||||
@CordovaProperty()
|
||||
Position: {
|
||||
TOP_LEFT: number;
|
||||
TOP_RIGHT: number;
|
||||
MIDDLE_LEFT: number;
|
||||
MIDDLE_RIGHT: number;
|
||||
BOTTOM_LEFT: number;
|
||||
BOTTOM_RIGHT: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* Function to init Pollfish
|
||||
* @param releaseMode {boolean}
|
||||
* @param rewardMode {boolean}
|
||||
* @param apiKey {string}
|
||||
* @param position {number}
|
||||
* @param padding {number}
|
||||
* @param requestUUID {string}
|
||||
* @param offerwallMode {boolean}
|
||||
*/
|
||||
@Cordova()
|
||||
init(
|
||||
releaseMode: boolean,
|
||||
rewardMode: boolean,
|
||||
apiKey: string,
|
||||
position: number,
|
||||
padding: number,
|
||||
requestUUID: string,
|
||||
offerwallMode: boolean
|
||||
): any {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to init Pollfish with user attributes
|
||||
* @param releaseMode {boolean}
|
||||
* @param rewardMode {boolean}
|
||||
* @param apiKey {string}
|
||||
* @param position {number}
|
||||
* @param padding {number}
|
||||
* @param requestUUID {string}
|
||||
* @param offerwallMode {boolean}
|
||||
* @param userAttributes {Json}
|
||||
*/
|
||||
|
||||
@Cordova()
|
||||
initWithUserAttributes(
|
||||
releaseMode: boolean,
|
||||
rewardMode: boolean,
|
||||
apiKey: string,
|
||||
position: number,
|
||||
padding: number,
|
||||
requestUUID: string,
|
||||
offerwallMode: boolean,
|
||||
userAttributes: {}
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to manually show Pollfish
|
||||
*/
|
||||
|
||||
@Cordova()
|
||||
showPollfish() {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to manually hide Pollfish
|
||||
*/
|
||||
|
||||
@Cordova()
|
||||
hidePollfish() {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to set event callbacks
|
||||
* @param eventName
|
||||
* @param callback
|
||||
*/
|
||||
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
setEventCallback(eventName: string, callback: (info?: any) => void) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
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,17 +1,5 @@
|
||||
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
|
||||
@@ -34,18 +22,7 @@ export interface PreviewAnyFileOptions {
|
||||
* .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
|
||||
@@ -66,34 +43,4 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,38 +39,6 @@ export enum PURCHASE_TYPE {
|
||||
SUBS = 'subs',
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum for billing features.
|
||||
* Currently, these are only relevant for Google Play Android users:
|
||||
* https://developer.android.com/reference/com/android/billingclient/api/BillingClient.FeatureType
|
||||
*/
|
||||
export enum BILLING_FEATURE {
|
||||
/**
|
||||
* Purchase/query for subscriptions.
|
||||
*/
|
||||
SUBSCRIPTIONS,
|
||||
|
||||
/**
|
||||
* Subscriptions update/replace.
|
||||
*/
|
||||
SUBSCRIPTIONS_UPDATE,
|
||||
|
||||
/**
|
||||
* Purchase/query for in-app items on VR.
|
||||
*/
|
||||
IN_APP_ITEMS_ON_VR,
|
||||
|
||||
/**
|
||||
* Purchase/query for subscriptions on VR.
|
||||
*/
|
||||
SUBSCRIPTIONS_ON_VR,
|
||||
|
||||
/**
|
||||
* Launch a price change confirmation flow.
|
||||
*/
|
||||
PRICE_CHANGE_CONFIRMATION,
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use PURCHASE_TYPE instead
|
||||
*
|
||||
@@ -235,11 +203,11 @@ export enum INTRO_ELIGIBILITY_STATUS {
|
||||
* PurchaserInfo
|
||||
* PurchasesEntitlementInfos
|
||||
* PurchasesEntitlementInfo
|
||||
* PurchasesTransaction
|
||||
*
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Purchases',
|
||||
plugin: 'cordova-plugin-purchases@2.3.0',
|
||||
plugin: 'cordova-plugin-purchases@1.1.0',
|
||||
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']
|
||||
@@ -263,13 +231,6 @@ export class Purchases extends IonicNativePlugin {
|
||||
*/
|
||||
static PURCHASE_TYPE = PURCHASE_TYPE;
|
||||
|
||||
/**
|
||||
* Enum for billing features.
|
||||
* Currently, these are only relevant for Google Play Android users:
|
||||
* https://developer.android.com/reference/com/android/billingclient/api/BillingClient.FeatureType
|
||||
*/
|
||||
static BILLING_FEATURE = BILLING_FEATURE;
|
||||
|
||||
/**
|
||||
* Replace SKU's ProrationMode.
|
||||
* @readonly
|
||||
@@ -298,12 +259,9 @@ 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
|
||||
* suite, otherwise it will use standardUserDefaults. Default is null, which will make the SDK use standardUserDefaults.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setup(apiKey: string, appUserID?: string | null, observerMode = false, userDefaultsSuiteName?: string): void {}
|
||||
setup(apiKey: string, appUserID?: string | null, observerMode = false): void {}
|
||||
|
||||
/**
|
||||
* Set this to true if you are passing in an appUserID but it is anonymous, this is true by default if you didn't pass an appUserID
|
||||
@@ -316,9 +274,6 @@ 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.
|
||||
@@ -329,7 +284,7 @@ export class Purchases extends IonicNativePlugin {
|
||||
/**
|
||||
* Gets the Offerings configured in the dashboard
|
||||
*
|
||||
* @return {Promise<PurchasesOfferings>} Will return a [PurchasesError] if the offerings are not properly configured in RevenueCat or if there is another error retrieving them.
|
||||
* @return {Observable<PurchasesOfferings>} Will return a [PurchasesError] if the offerings are not properly configured in RevenueCat or if there is another error retrieving them.
|
||||
*/
|
||||
@Cordova()
|
||||
getOfferings(): Promise<PurchasesOfferings> {
|
||||
@@ -357,6 +312,31 @@ 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
|
||||
*
|
||||
@@ -422,30 +402,6 @@ export class Purchases extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* This function will logIn the current user with an appUserID. Typically this would be used after a log in
|
||||
* to identify a user without calling configure.
|
||||
* @param {String} appUserID The appUserID that should be linked to the currently user
|
||||
*
|
||||
* @return {Promise<LogInResult>} an object that contains the purchaserInfo after logging in, as well as a boolean indicating
|
||||
* whether the user has just been created for the first time in the RevenueCat backend.
|
||||
*/
|
||||
@Cordova()
|
||||
static logIn(appUserID: string): Promise<LogInResult> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out the Purchases client clearing the saved appUserID. This will generate a random user id and save it in the cache.
|
||||
* If the current user is already anonymous, this will produce a PurchasesError.
|
||||
* @return {Promise<PurchaserInfo>} new purchaser info after resetting.
|
||||
*/
|
||||
@Cordova()
|
||||
static logOut(): Promise<PurchaserInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated, use logIn instead.
|
||||
* This function will alias two appUserIDs together.
|
||||
* @param newAppUserID {String} The new appUserID that should be linked to the currently identified appUserID. Needs to be a string.
|
||||
*
|
||||
@@ -458,7 +414,6 @@ export class Purchases extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated, use logIn instead.
|
||||
* This function will identify the current user with an appUserID. Typically this would be used after a logout to identify a new user without calling configure
|
||||
* @param newAppUserID {String} The new appUserID that should be linked to the currently identified appUserID. Needs to be a string.
|
||||
*
|
||||
@@ -471,7 +426,6 @@ export class Purchases extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated, use logOut instead.
|
||||
* Resets the Purchases client clearing the saved appUserID. This will generate a random user id and save it in the cache.
|
||||
*
|
||||
* @return {Promise<PurchaserInfo>} Errors are of type [PurchasesError] and get normally triggered if there
|
||||
@@ -519,19 +473,11 @@ 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 purchaseProduct.
|
||||
* @warning This function should only be called if you're not calling makePurchase.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
syncPurchases(): 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
|
||||
@@ -593,25 +539,12 @@ 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.
|
||||
* 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.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
invalidatePurchaserInfoCache(): 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 {}
|
||||
|
||||
/**
|
||||
* Subscriber attributes are useful for storing additional, structured information on a user.
|
||||
* Since attributes are writable using a public key they should not be used for
|
||||
@@ -632,152 +565,30 @@ 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 Empty String or null will delete the subscriber attribute.
|
||||
* @param pushToken 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 {}
|
||||
|
||||
/**
|
||||
* Check if billing is supported for the current user (meaning IN-APP purchases are supported)
|
||||
* and optionally, whether a list of specified feature types are supported.
|
||||
*
|
||||
* Note: Billing features are only relevant to Google Play Android users.
|
||||
* For other stores and platforms, billing features won't be checked.
|
||||
* @param feature An array of feature types to check for support. Feature types must be one of
|
||||
* [BILLING_FEATURE]. By default, is an empty list and no specific feature support will be checked.
|
||||
* @return {Promise<boolean>} Or [PurchasesError] if there is an error.
|
||||
*/
|
||||
@Cordova()
|
||||
canMakePayments(features: BILLING_FEATURE[] = []): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 {}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -882,11 +693,6 @@ 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
|
||||
*/
|
||||
@@ -921,33 +727,6 @@ export interface PurchaserInfo {
|
||||
* in Android
|
||||
*/
|
||||
readonly originalApplicationVersion: string | null;
|
||||
/**
|
||||
* Returns the purchase date for the version of the application when the user bought the app.
|
||||
* Use this for grandfathering users when migrating to subscriptions.
|
||||
*/
|
||||
readonly originalPurchaseDate: string | null;
|
||||
/**
|
||||
* URL to manage the active subscription of the user. If this user has an active iOS
|
||||
* subscription, this will point to the App Store, if the user has an active Play Store subscription
|
||||
* it will point there. If there are no active subscriptions it will be null.
|
||||
* If there are multiple for different platforms, it will point to the device store.
|
||||
*/
|
||||
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 {
|
||||
@@ -1040,7 +819,7 @@ export interface PurchasesOffering {
|
||||
/**
|
||||
* Array of `Package` objects available for purchase.
|
||||
*/
|
||||
readonly availablePackages: PurchasesPackage[];
|
||||
readonly availablePackages: [PurchasesPackage];
|
||||
/**
|
||||
* Lifetime package type configured in the RevenueCat dashboard, if available.
|
||||
*/
|
||||
@@ -1121,18 +900,4 @@ export interface IntroEligibility {
|
||||
readonly description: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds the logIn result
|
||||
*/
|
||||
export interface LogInResult {
|
||||
/**
|
||||
* The Purchaser Info for the user.
|
||||
*/
|
||||
readonly purchaserInfo: PurchaserInfo;
|
||||
/**
|
||||
* True if the call resulted in a new user getting created in the RevenueCat backend.
|
||||
*/
|
||||
readonly created: boolean;
|
||||
}
|
||||
|
||||
export type ShouldPurchasePromoProductListener = (deferredPurchase: () => void) => void;
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Restart
|
||||
* @description
|
||||
* This plugin to restart android application
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Restart } from '@ionic-native/restart';
|
||||
*
|
||||
*
|
||||
* constructor(private restart: Restart) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.restart.restart(true)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Restart',
|
||||
plugin: 'cordova-plugin-restart',
|
||||
pluginRef: 'RestartPlugin',
|
||||
repo: 'https://github.com/MaximBelov/cordova-plugin-restart',
|
||||
install: 'ionic cordova plugin add cordova-plugin-restart',
|
||||
platforms: ['Android'],
|
||||
})
|
||||
@Injectable()
|
||||
export class Restart extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
errorIndex: 0,
|
||||
successIndex: 2,
|
||||
})
|
||||
restart(cold: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({
|
||||
errorIndex: 0,
|
||||
})
|
||||
enableDebug(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1,144 +0,0 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -1,61 +1,13 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
export class SmartlookSetupConfigBuilder {
|
||||
private readonly _smartlookSetupConfig: SmartlookSetupConfig;
|
||||
|
||||
constructor(smartlookAPIKey: string) {
|
||||
this._smartlookSetupConfig = new SmartlookSetupConfig(smartlookAPIKey);
|
||||
}
|
||||
|
||||
fps(fps: number): SmartlookSetupConfigBuilder {
|
||||
this._smartlookSetupConfig.fps = fps;
|
||||
return this;
|
||||
}
|
||||
|
||||
renderingMode(renderingMode: SmartlookRenderingMode): SmartlookSetupConfigBuilder {
|
||||
this._smartlookSetupConfig.renderingMode = renderingMode.getRenderingModeString();
|
||||
return this;
|
||||
}
|
||||
|
||||
startNewSession(startNewSession: boolean): SmartlookSetupConfigBuilder {
|
||||
this._smartlookSetupConfig.startNewSession = startNewSession;
|
||||
return this;
|
||||
}
|
||||
|
||||
startNewSessionAndUser(startNewSessionAndUser: boolean): SmartlookSetupConfigBuilder {
|
||||
this._smartlookSetupConfig.startNewSessionAndUser = startNewSessionAndUser;
|
||||
return this;
|
||||
}
|
||||
|
||||
eventTrackingModes(eventTrackingModes: SmartlookEventTrackingModes): SmartlookSetupConfigBuilder {
|
||||
this._smartlookSetupConfig.eventTrackingModes = eventTrackingModes.getEventTrackingModeStringArray();
|
||||
return this;
|
||||
}
|
||||
|
||||
build(): SmartlookSetupConfig {
|
||||
return this._smartlookSetupConfig;
|
||||
}
|
||||
}
|
||||
|
||||
export class SmartlookSetupConfig {
|
||||
private smartlookAPIKey: string;
|
||||
fps: number;
|
||||
renderingMode: string;
|
||||
startNewSession: boolean;
|
||||
startNewSessionAndUser: boolean;
|
||||
eventTrackingModes: string[];
|
||||
private fps: number;
|
||||
|
||||
constructor(smartlookAPIKey: string) {
|
||||
constructor(smartlookAPIKey: string, fps?: number) {
|
||||
this.smartlookAPIKey = smartlookAPIKey;
|
||||
}
|
||||
}
|
||||
|
||||
export class SmartlookResetSession {
|
||||
private resetUser: boolean;
|
||||
|
||||
constructor(resetUser: boolean) {
|
||||
this.resetUser = resetUser;
|
||||
this.fps = fps;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,41 +32,15 @@ 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';
|
||||
@@ -212,19 +138,6 @@ export class SmartlookReferrer {
|
||||
}
|
||||
}
|
||||
|
||||
export class SmartlookDashboardSessionUrl {
|
||||
private withCurrentTimestamp: boolean;
|
||||
|
||||
constructor(withCurrentTimestamp: boolean) {
|
||||
this.withCurrentTimestamp = withCurrentTimestamp;
|
||||
}
|
||||
}
|
||||
|
||||
export interface SmartlookIntegrationListener {
|
||||
onSessionReady: (dashboardSessionUrl: string) => any;
|
||||
onVisitorReady: (dashboardVisitorUrl: string) => any;
|
||||
}
|
||||
|
||||
export class SmartlookRenderingMode {
|
||||
private renderingMode: string;
|
||||
|
||||
@@ -236,10 +149,6 @@ export class SmartlookRenderingMode {
|
||||
return new SmartlookRenderingMode('native');
|
||||
}
|
||||
|
||||
getRenderingModeString(): string {
|
||||
return this.renderingMode;
|
||||
}
|
||||
|
||||
constructor(renderingMode: string) {
|
||||
this.renderingMode = renderingMode;
|
||||
}
|
||||
@@ -267,9 +176,7 @@ export class SmartlookRenderingMode {
|
||||
* }
|
||||
* ```
|
||||
* @classes
|
||||
* SmartlookSetupConfigBuilder
|
||||
* SmartlookSetupConfig
|
||||
* SmartlookResetSession
|
||||
* SmartlookUserIdentifier
|
||||
* SmartlookEventTrackingMode
|
||||
* SmartlookNavigationEvent
|
||||
@@ -282,10 +189,7 @@ export class SmartlookRenderingMode {
|
||||
* SmartlookGlobalEventProperty
|
||||
* SmartlookGlobalEventPropertyKey
|
||||
* SmartlookReferrer
|
||||
* SmartlookDashboardSessionUrl
|
||||
* SmartlookRenderingMode
|
||||
* SmartlookEventTrackingMode
|
||||
* SmartlookEventTrackingModes
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Smartlook',
|
||||
@@ -301,9 +205,6 @@ export class Smartlook extends IonicNativePlugin {
|
||||
* @param config SmartlookSetupConfig object.
|
||||
* @param config.smartlookAPIKey (required) Smartlook API key (you can obtain it in your dashboard).
|
||||
* @param config.fps (optional) recorded video framerate (allowed values 2-10 fps).
|
||||
* @param options.renderingMode (optional) Mode defining the video output of recording.
|
||||
* @param options.startNewSession (optional) If true new session is going to be created
|
||||
* @param options.startNewSessionAndUser (optional) If true new session and visitor is going to be created
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setupAndStartRecording(config: SmartlookSetupConfig): void {
|
||||
@@ -315,9 +216,6 @@ export class Smartlook extends IonicNativePlugin {
|
||||
* @param config SmartlookSetupConfig object.
|
||||
* @param config.smartlookAPIKey (required) Smartlook API key (you can obtain it in your dashboard).
|
||||
* @param config.fps (optional) recorded video framerate (allowed values 2-10 fps).
|
||||
* @param options.renderingMode (optional) Mode defining the video output of recording.
|
||||
* @param options.startNewSession (optional) If true new session is going to be created
|
||||
* @param options.startNewSessionAndUser (optional) If true new session and visitor is going to be created
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setup(config: SmartlookSetupConfig): void {
|
||||
@@ -349,16 +247,6 @@ export class Smartlook extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets current session and new session in dashboard is created.
|
||||
* @param resetSession SmartlookResetSession object.
|
||||
* @param resetSession.resetUser If set to TRUE new visitor is created in the dashboard.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
resetSession(resetSession: SmartlookResetSession): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* When you start sensitive mode SDK records blank videos (single color) but SDK still sends analytic events.
|
||||
*/
|
||||
@@ -399,27 +287,16 @@ export class Smartlook extends IonicNativePlugin {
|
||||
/**
|
||||
* You can configure which events are being tracked by setting eventTrackingMode.
|
||||
* @param eventTrackingMode Can be on of:
|
||||
* - 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
|
||||
* - 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 .
|
||||
*/
|
||||
@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.
|
||||
@@ -536,36 +413,11 @@ export class Smartlook extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain session URL leading to our dashboard.
|
||||
* @param smartlookDashboardSessionUrl SmartlookDashboardSessionUrl object.
|
||||
* @param smartlookDashboardSessionUrl.withCurrentTimestamp If set to TRUE record will start at current timestamp.
|
||||
* @return {Promise<string>} Returns a promise with dashboard session URL string.
|
||||
* Obtain sharable url to user's session leading to our dashboard.
|
||||
* @return {Promise<string>} Returns a promise with dashboard URL string.
|
||||
*/
|
||||
@Cordova()
|
||||
getDashboardSessionUrl(smartlookDashboardSessionUrl: SmartlookDashboardSessionUrl): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain visitor URL leading to our dashboard.
|
||||
* @return {Promise<string>} Returns a promise with dashboard visitor URL string.
|
||||
*/
|
||||
@Cordova()
|
||||
getDashboardVisitorUrl(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Integration listener can be used to obtain dashboard URL for current session and visitor.
|
||||
* These URLs can be propagated to various analytic tools/SDKs.
|
||||
* @param integrationListener SmartlookIntegrationListener object.
|
||||
* @param integrationListener.onSessionReady Called when dashboard session URL is ready. Note that this URL can be accesed only by user
|
||||
* that has access to Smartlook dashboard (it is not public share link).
|
||||
* @param integrationListener.onVisitorReady Called when dashboard visitor URL is ready. Note that this URL can be accesed only by user
|
||||
* that has access to Smartlook dashboard (it is not public share link).
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
registerIntegrationListener(integrationListener: SmartlookIntegrationListener): void {
|
||||
getDashboardSessionUrl(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -578,12 +430,4 @@ export class Smartlook extends IonicNativePlugin {
|
||||
setRenderingMode(renderingMode: SmartlookRenderingMode): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregister Integration listener (@see registerIntegrationListener())
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
unregisterIntegrationListener(): void {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,26 +282,4 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ export interface AuthorizationData {
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { SpotifyAuth } from '@ionic-native/spotify-auth/ngx';
|
||||
* import { SpotifyAuth } from '@ionic-native/spotify-auth';
|
||||
*
|
||||
* // [...]
|
||||
*
|
||||
@@ -82,7 +82,7 @@ export interface AuthorizationData {
|
||||
*
|
||||
* // [...]
|
||||
*
|
||||
* this.spotifyAuth.forget();
|
||||
* this.spotifyAuth.forget().then(() => console.log("We're logged out!"));
|
||||
*
|
||||
* // [...]
|
||||
* ```
|
||||
|
||||
@@ -23,10 +23,6 @@ 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
|
||||
*/
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name System Alert Window Permission
|
||||
* @description
|
||||
* This plugin does something
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { SystemAlertWindowPermission } from '@ionic-native/system-alert-window-permission/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private systemAlertWindowPermission: SystemAlertWindowPermission) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.systemAlertWindowPermission.hasPermission()
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* this.systemAlertWindowPermission.requestPermission()
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
|
||||
@Plugin({
|
||||
pluginName: 'SystemAlertWindowPermission',
|
||||
plugin: 'cordova-plugin-system-alert-window-permission',
|
||||
pluginRef: 'window.systemAlertWindowPermission',
|
||||
repo: 'https://github.com/MaximBelov/cordova-plugin-system-alert-window-permission.git',
|
||||
install: 'ionic cordova plugin add cordova-plugin-system-alert-window-permission',
|
||||
platforms: ['Android'],
|
||||
})
|
||||
@Injectable()
|
||||
export class SystemAlertWindowPermission extends IonicNativePlugin {
|
||||
/**
|
||||
* Check permission
|
||||
* @return {Promise<any>} return 0 when dont have SYSTEM_ALERT_WINDOW permission, 1 when have SYSTEM_ALERT_WINDOW permission
|
||||
*/
|
||||
@Cordova()
|
||||
hasPermission(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request permission
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
requestPermission(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Open notification Settings
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
openNotificationSettings(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -114,10 +114,6 @@ export enum LoginType {
|
||||
* Set the type to email to login based on email id.
|
||||
*/
|
||||
email = 'EMAIL',
|
||||
/**
|
||||
* SAML 2.0 Login Type
|
||||
*/
|
||||
saml2 = 'SAML2',
|
||||
/**
|
||||
* TODO:
|
||||
*/
|
||||
@@ -142,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',
|
||||
/**
|
||||
@@ -152,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',
|
||||
@@ -207,14 +203,6 @@ export enum NotificationListenerType {
|
||||
* Notify attachment downloads completed
|
||||
*/
|
||||
attachmentDownloadCompleted = 10,
|
||||
/**
|
||||
* Notify when the sent item count changes.
|
||||
*/
|
||||
SentItemChanged = 11,
|
||||
/**
|
||||
* Notify that the JWT token is received
|
||||
*/
|
||||
JWTTokenReceived = 12,
|
||||
}
|
||||
|
||||
export enum AttachmentItemStatus {
|
||||
@@ -237,7 +225,7 @@ export class Settings {
|
||||
ADS_USER_ID: string;
|
||||
SAP_USER_ID: string;
|
||||
FULL_NAME: string;
|
||||
SERVER_URL: string;
|
||||
URL: string;
|
||||
USER_ID: string;
|
||||
}
|
||||
|
||||
@@ -322,7 +310,7 @@ export class LoginParameters {
|
||||
password: string;
|
||||
|
||||
/**
|
||||
* UMP URL. For example: https://umpdev.unvired.io/UMP
|
||||
* UMP URL. For example: http://192.168.98.160:8080/UMP
|
||||
*/
|
||||
url: string;
|
||||
|
||||
@@ -396,30 +384,12 @@ export class LoginParameters {
|
||||
* Set this value to true to persist web application database. By default, this value is false.
|
||||
*/
|
||||
persistWebDb: boolean;
|
||||
|
||||
/*
|
||||
* JWT options.
|
||||
* 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'.
|
||||
*/
|
||||
loginLanguage: string;
|
||||
|
||||
/**
|
||||
* Applicable for browser only. Set this flag to indicate that saved data should be reloaded upon launch.
|
||||
*/
|
||||
cacheWebData: boolean;
|
||||
|
||||
/**
|
||||
* Set this value if you the login process requires client credentials to be set.
|
||||
* You can pass the client credentials with the method: |unviredSDK.setClientCredentials(credentials)|
|
||||
* The passed credentials will be used based on this flag.
|
||||
*/
|
||||
requireClientCredentials: boolean;
|
||||
}
|
||||
export class LoginResult extends UnviredResult {
|
||||
type: LoginListenerType;
|
||||
@@ -433,12 +403,6 @@ export class AuthenticateLocalResult extends UnviredResult {
|
||||
type: AuthenticateLocalResultType;
|
||||
}
|
||||
|
||||
export class UnviredCredential {
|
||||
user: string;
|
||||
password: string;
|
||||
port: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Unvired Cordova SDK
|
||||
* @description
|
||||
@@ -446,19 +410,10 @@ export class UnviredCredential {
|
||||
* -
|
||||
* iOS Requirements
|
||||
* -
|
||||
* Update your Cocoapods repo before you install the plugin.
|
||||
* 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.
|
||||
* ```
|
||||
* $ 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>
|
||||
* pod repo update
|
||||
* ```
|
||||
* @usage
|
||||
* ```typescript
|
||||
@@ -541,26 +496,11 @@ export class UnviredCredential {
|
||||
*
|
||||
*
|
||||
* // Synchronization APIs
|
||||
* // 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 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)
|
||||
*
|
||||
* // 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 => {
|
||||
@@ -582,20 +522,20 @@ export class UnviredCredential {
|
||||
*
|
||||
* // Database APIs
|
||||
* // Insert a record onto database
|
||||
* this.unviredsdk.dbInsert("CUSTOMER_HEADER", {"NAME":"James Bond","CUST_NO":"007"}, true);
|
||||
* this.unviredsdk.dbInsert("CUSTOMER_HEADER", {"NAME":"USER","NO":"0039"}, true);
|
||||
*
|
||||
* // Update a record in database
|
||||
* this.unviredSDK.dbUpdate('CUSTOMER_HEADER', {"NAME":"John Doe","CUST_NO":"008"}, "CUST_NO = '007'")
|
||||
* this.unviredSDK.dbUpdate('CUSTOMER_HEADER', {"NAME":"UPDATED_USER","NO":"UPDATED_NO"}, "FORM_ID = '5caed815892215034dacad56'")
|
||||
*
|
||||
* // Delete a record in database
|
||||
* this.unviredSDK.dbDelete('CUSTOMER_HEADER', "CUST_NO = '007'")
|
||||
* this.unviredSDK.dbDelete('CUSTOMER_HEADER', "FORM_ID = '5caed815892215034dacad56'")
|
||||
*
|
||||
* // Execute a SQL Query
|
||||
* this.unviredSDK.dbExecuteStatement('SELECT * FROM CUSTOMER_HEADER WHERE CUSTOMER_ID = "007"')
|
||||
* this.unviredSDK.dbExecuteStatement('SELECT * FROM CUSTOMER_HEADER WHERE CUSTOMER_ID = "0039"')
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'UnviredCordovaSDK',
|
||||
plugin: 'cordova-plugin-unvired-sdk', // npm package name, example: cordova-plugin-camera
|
||||
plugin: 'https://github.com/unvired/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
|
||||
@@ -834,21 +774,6 @@ 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> {
|
||||
@@ -1080,24 +1005,6 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Browser platform only. Call this function to save the WebData. This function can be used to preserve a large data that is downloaded.
|
||||
* If you set the loginParameter flag, |cacheWebData|, then the plugin loads this data.
|
||||
*/
|
||||
@Cordova()
|
||||
dbSaveWebData(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Browser platform only. Call this function to export the Webdata.
|
||||
* Call this function to export the Web
|
||||
*/
|
||||
@Cordova()
|
||||
dbExportWebData(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Supported in Android & Windows only.
|
||||
* Launch a file from a file path
|
||||
@@ -1150,14 +1057,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)
|
||||
* ```
|
||||
*/
|
||||
@@ -1188,50 +1095,24 @@ 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 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)
|
||||
* ```
|
||||
*
|
||||
* 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.
|
||||
* @param reqype RequestType for the message. Please check RequestType to select the right request type.
|
||||
* @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
|
||||
* @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.
|
||||
* ```
|
||||
* {
|
||||
* "NAME_OF_HEADER": {
|
||||
* "FIELD1": "FIELD_1_VALUE",
|
||||
* "FIELD2": "FIELD_2_VALUE"
|
||||
* }
|
||||
* "CATEGORY_BE": [{
|
||||
* "CATEGORY_HEADER": {"field1" : "value1", "field2" : "value2"}
|
||||
* }]
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @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.
|
||||
*/
|
||||
@@ -1247,63 +1128,28 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Make an async call to UMP.
|
||||
* Sends data to UMP in ASYNC mode. This means user can make this call and continue with other program execution.
|
||||
* 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} 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
|
||||
* @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.
|
||||
* ```
|
||||
* {
|
||||
* "NAME_OF_HEADER": {
|
||||
* "FIELD1": "FIELD_1_VALUE",
|
||||
* "FIELD2": "FIELD_2_VALUE"
|
||||
* }
|
||||
* "CATEGORY_BE": [{
|
||||
* "CATEGORY_HEADER": {"field1" : "value1", "field2" : "value2"}
|
||||
* }]
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @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. 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.
|
||||
* @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.
|
||||
*/
|
||||
@Cordova()
|
||||
syncBackground(
|
||||
@@ -1387,7 +1233,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 at any point of time.
|
||||
* Only one class can subscribe to notifications are any point of time.
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
@@ -1526,70 +1372,4 @@ 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 a promise containing UMP servers which are discoverable within the network.
|
||||
* Clients can use this information to allow users to select appropriate UMP server in the login page.
|
||||
* ```
|
||||
* let discoveryServiceResult = await this.unviredSDK.startDiscoveryService()
|
||||
* if (discoveryServiceResult.type == ResultType.success) {
|
||||
* let UMPServers: any[] = discoveryServiceResult.data
|
||||
* UMPServers.forEach(element => {
|
||||
* console.log(JSON.stringify(element)) // {"name":"Chyme 98","url":"http://192.168.98.98:8080/UMP/","root":"UNVIRED","type":"DEVELOPMENT"}
|
||||
* });
|
||||
* }
|
||||
* else {
|
||||
* console.log('Error searching for UMP Servers: ' + discoveryServiceResult.error)
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
@Cordova()
|
||||
startDiscoveryService(): Promise<UnviredResult> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this function to set the SAP credentials to be sent to UMP.
|
||||
* @param credentials Array of |Credential| objects.
|
||||
*/
|
||||
@Cordova()
|
||||
setClientCredentials(credentials: UnviredCredential[]) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for client credentials.
|
||||
* @returns Returns true if client credentials are set
|
||||
*/
|
||||
@Cordova()
|
||||
isClientCredentialsSet(): Promise<UnviredResult> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Encrypt a string with the key stored by the Unvired SDK.
|
||||
* @returns UnviredResult.data which should contains the encrypted string.
|
||||
*/
|
||||
@Cordova()
|
||||
encrypt(stringToBeEncrypted: string): Promise<UnviredResult> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Decrypt a string with the string encrypted with the key (key stored by the Unvired SDK)
|
||||
* @returns UnviredResult.data which should contains the decrypted string.
|
||||
*/
|
||||
@Cordova()
|
||||
decrypt(stringToBeDecrypted: string): Promise<UnviredResult> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
export interface TagGroupEditor {
|
||||
addTags(): void;
|
||||
@@ -63,144 +62,11 @@ export enum PresentationOptions {
|
||||
})
|
||||
@Injectable()
|
||||
export class UrbanAirShip extends IonicNativePlugin {
|
||||
/**
|
||||
* Event fired when a new deep link is received.
|
||||
*
|
||||
* @event deep_link
|
||||
* @type {object}
|
||||
* @param {string} [deepLink] The deep link.
|
||||
*/
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'urbanairship.deep_link',
|
||||
element: 'document',
|
||||
})
|
||||
onDeepLink(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Event fired when a channel registration occurs.
|
||||
*
|
||||
* @event registration
|
||||
* @type {object}
|
||||
* @param {string} [channelID] The channel ID.
|
||||
* @param {string} [registrationToken] The deviceToken on iOS, and the FCM/ADM token on Android.
|
||||
* @param {string} [error] Error message if an error occurred.
|
||||
*/
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'urbanairship.registration',
|
||||
element: 'document',
|
||||
})
|
||||
onRegistration(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Event fired when the inbox is updated.
|
||||
*
|
||||
* @event inbox_updated
|
||||
*/
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'urbanairship.inbox_updated',
|
||||
element: 'document',
|
||||
})
|
||||
onInboxUpdated(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Event fired when the inbox needs to be displayed. This event is only emitted if auto
|
||||
* launch message center is disabled.
|
||||
*
|
||||
* @event show_inbox
|
||||
* @type {object}
|
||||
* @param {string} [messageId] The optional message ID.
|
||||
*/
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'urbanairship.show_inbox',
|
||||
element: 'document',
|
||||
})
|
||||
onShowInbox(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Event fired when a push is received.
|
||||
*
|
||||
* @event push
|
||||
* @type {object}
|
||||
* @param {string} message The push alert message.
|
||||
* @param {string} title The push title.
|
||||
* @param {string} subtitle The push subtitle.
|
||||
* @param {object} extras Any push extras.
|
||||
* @param {object} aps The raw aps dictionary (iOS only)
|
||||
* @param {number} [notification_id] The Android notification ID. Deprecated in favor of notificationId.
|
||||
* @param {string} [notificationId] The notification ID.
|
||||
*/
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'urbanairship.push',
|
||||
element: 'document',
|
||||
})
|
||||
onPushReceived(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Event fired when notification opened.
|
||||
*
|
||||
* @event notification_opened
|
||||
* @type {object}
|
||||
* @param {string} message The push alert message.
|
||||
* @param {object} extras Any push extras.
|
||||
* @param {number} [notification_id] The Android notification ID. Deprecated in favor of notificationId.
|
||||
* @param {string} [notificationId] The notification ID.
|
||||
* @param {string} [actionID] The ID of the notification action button if available.
|
||||
* @param {boolean} isForeground Will always be true if the user taps the main notification. Otherwise its defined by the notification action button.
|
||||
*/
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'urbanairship.notification_opened',
|
||||
element: 'document',
|
||||
})
|
||||
onNotificationOpened(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Event fired when the user notification opt-in status changes.
|
||||
*
|
||||
* @event notification_opt_in_status
|
||||
* @type {object}
|
||||
* @param {boolean} optIn If the user is opted in or not to user notifications.
|
||||
* @param {object} [authorizedNotificationSettings] iOS only. A map of authorized settings.
|
||||
* @param {boolean} authorizedNotificationSettings.alert If alerts are authorized.
|
||||
* @param {boolean} authorizedNotificationSettings.sound If sounds are authorized.
|
||||
* @param {boolean} authorizedNotificationSettings.badge If badges are authorized.
|
||||
* @param {boolean} authorizedNotificationSettings.carPlay If car play is authorized.
|
||||
* @param {boolean} authorizedNotificationSettings.lockScreen If the lock screen is authorized.
|
||||
* @param {boolean} authorizedNotificationSettings.notificationCenter If the notification center is authorized.
|
||||
*/
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'urbanairship.notification_opt_in_status',
|
||||
element: 'document',
|
||||
})
|
||||
onNotificationOptInStatus(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Re-attaches document event listeners in this webview
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
reattach(): void {
|
||||
@Cordova()
|
||||
reattach(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,19 +16,6 @@ export interface PersonResponse {
|
||||
external_person_id?: string;
|
||||
}
|
||||
|
||||
export interface InboxMessage {
|
||||
content?: string;
|
||||
created_at?: string;
|
||||
expires_at?: string;
|
||||
message_uid?: string;
|
||||
read?: boolean;
|
||||
subject?: string;
|
||||
detail?: string;
|
||||
collapse_key?: string;
|
||||
apprefdata?: any;
|
||||
images?: any;
|
||||
inbox_custom_data: any;
|
||||
}
|
||||
/**
|
||||
* @name Vibes
|
||||
* @description
|
||||
@@ -54,11 +41,8 @@ export interface InboxMessage {
|
||||
*
|
||||
* this.vibes.getVibesDeviceInfo()
|
||||
* .then((res: any) => console.log(res)) // retrieve the `device_id` and `push_token` from the JSON object
|
||||
* .catch((error: any) => console.error('Error retrieving deviceinfo', error));
|
||||
* .catch((error: any) => console.error('Error retrieving deviceinfo push', error));
|
||||
*
|
||||
* this.vibes.fetchInboxMessages()
|
||||
* .then((res: any) => console.log(res)) // fetches inbox messages for this person.
|
||||
* .catch((error: any) => console.error('Error fetching inbox messages for this person', error));
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
@@ -74,8 +58,7 @@ export interface InboxMessage {
|
||||
@Injectable()
|
||||
export class Vibes extends IonicNativePlugin {
|
||||
/**
|
||||
* Register this device with the Vibes platform
|
||||
*
|
||||
* Register device
|
||||
* @return {Promise<DeviceResponse>}
|
||||
*/
|
||||
@Cordova()
|
||||
@@ -84,8 +67,7 @@ export class Vibes extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregister this device with the Vibes platform
|
||||
*
|
||||
* Unregister device
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
@@ -94,8 +76,7 @@ export class Vibes extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Associate an external ID with the current person.
|
||||
*
|
||||
* Associate person
|
||||
* @param {string} externalPersonId
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
@@ -105,8 +86,7 @@ export class Vibes extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Register this device to receive push notifications
|
||||
*
|
||||
* Register push
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
@@ -115,8 +95,7 @@ export class Vibes extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregister the device from receiving push notifications
|
||||
*
|
||||
* Unregister push
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
@@ -124,8 +103,7 @@ export class Vibes extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Fetches a DeviceInfoResponse with details about the Vibes Device ID and Push Token
|
||||
*
|
||||
* getVibesDeviceInfo
|
||||
* @return {Promise<DeviceInfoResponse>}
|
||||
*/
|
||||
@Cordova()
|
||||
@@ -134,8 +112,7 @@ export class Vibes extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches the PersonResponse associated with this device currently
|
||||
*
|
||||
* getPerson
|
||||
* @return {Promise<PersonResponse>}
|
||||
*/
|
||||
@Cordova()
|
||||
@@ -145,7 +122,6 @@ export class Vibes extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Get notified when the user opens a notification
|
||||
*
|
||||
* @return {Observable<void>}
|
||||
*/
|
||||
@Cordova({
|
||||
@@ -154,59 +130,4 @@ export class Vibes extends IonicNativePlugin {
|
||||
onNotificationOpened(): Observable<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches an array of inbox messages for the person associated with this device.
|
||||
*
|
||||
* @return {Promise<InboxMessage[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
fetchInboxMessages(): Promise<InboxMessage[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches a single inbox message by it's id.
|
||||
*
|
||||
* @param {string} message_uid
|
||||
* @return {Promise<InboxMessage>}
|
||||
*/
|
||||
@Cordova()
|
||||
fetchInboxMessage(message_uid: string): Promise<InboxMessage> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks an inbox message as expired using message_uid and the expiry date supplied. Uses current date if null or invalid date is supplied.
|
||||
*
|
||||
* @param {string} message_uid
|
||||
* @param {string} An ISO-8601 formatted date string.
|
||||
* @return {Promise<InboxMessage>} an updated version of the InboxMessage with expires_at date updated
|
||||
*/
|
||||
@Cordova()
|
||||
expireInboxMessage(message_uid: string, date: string): Promise<InboxMessage> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks an inbox message as read.
|
||||
*
|
||||
* @param {string} message_uid
|
||||
* @return {Promise<InboxMessage>} an updated version of the InboxMessage with read field updated
|
||||
*/
|
||||
@Cordova()
|
||||
markInboxMessageAsRead(message_uid: string): Promise<InboxMessage> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Records an event for when the user opens an inbox message.
|
||||
*
|
||||
* @param inbox_message_stringified stringified version of the InboxMessage
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
onInboxMessageOpen(inbox_message_stringified: string): Promise<void> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user