mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-02-04 00:06:19 +08:00
Compare commits
64 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f1c7afd583 | ||
|
|
8d8608bbfa | ||
|
|
b2da307837 | ||
|
|
da4ce96be4 | ||
|
|
826f8085a4 | ||
|
|
c05b3e9672 | ||
|
|
575229412b | ||
|
|
065e80cccf | ||
|
|
50f8a452ad | ||
|
|
443515582b | ||
|
|
380a7f77d7 | ||
|
|
96162c07df | ||
|
|
a2511f5994 | ||
|
|
4d53d6d720 | ||
|
|
3450399552 | ||
|
|
16fee2268a | ||
|
|
6c99c3be03 | ||
|
|
9b2374b3bc | ||
|
|
b4227f2114 | ||
|
|
0932e113b2 | ||
|
|
bbb96ed765 | ||
|
|
31ee7efc22 | ||
|
|
2f69dd88cb | ||
|
|
f32da73a87 | ||
|
|
cc79a1edb7 | ||
|
|
4fb07fa809 | ||
|
|
3d7b777b19 | ||
|
|
2cb5f5c010 | ||
|
|
46d0cecb27 | ||
|
|
ca190db829 | ||
|
|
d698d5985b | ||
|
|
8dcb6be4ea | ||
|
|
158bf637cd | ||
|
|
9b7db588a1 | ||
|
|
5d71d0d2bb | ||
|
|
c6ad5e41ff | ||
|
|
b8de7f0721 | ||
|
|
e5f710c8bb | ||
|
|
239ae32ad3 | ||
|
|
f7a3c7127a | ||
|
|
80a537c0db | ||
|
|
2ae986727a | ||
|
|
7a4df59189 | ||
|
|
337bba62c5 | ||
|
|
a96faf1378 | ||
|
|
0467787085 | ||
|
|
0efa33f257 | ||
|
|
182b403f69 | ||
|
|
ddd269e7ab | ||
|
|
6b18c3d061 | ||
|
|
bd8fbb3e1f | ||
|
|
3d1a73ebcb | ||
|
|
96890c7b92 | ||
|
|
26fd76dad0 | ||
|
|
72c99603db | ||
|
|
e7bc1b6709 | ||
|
|
3e92f64484 | ||
|
|
de6dee7de4 | ||
|
|
bed8797a60 | ||
|
|
b4f0f07064 | ||
|
|
e4b171930d | ||
|
|
4a796cafe9 | ||
|
|
2950ff14d7 | ||
|
|
376501ef7e |
17
.github/workflows/rebase.yml
vendored
17
.github/workflows/rebase.yml
vendored
@@ -1,17 +0,0 @@
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
name: Automatic Rebase
|
||||
jobs:
|
||||
rebase:
|
||||
name: Rebase
|
||||
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Automatic Rebase
|
||||
uses: cirrus-actions/rebase@1.3
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
1
.husky/.gitignore
vendored
Normal file
1
.husky/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
_
|
||||
4
.husky/pre-commit
Executable file
4
.husky/pre-commit
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx --no-install lint-staged
|
||||
4
.husky/pre-push
Executable file
4
.husky/pre-push
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npm test
|
||||
@@ -4,3 +4,6 @@ node_modules
|
||||
.vscode
|
||||
dist
|
||||
CHANGELOG.md
|
||||
.husky
|
||||
.prettierignore
|
||||
LICENSE
|
||||
103
CHANGELOG.md
103
CHANGELOG.md
@@ -1,3 +1,106 @@
|
||||
# [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)
|
||||
|
||||
|
||||
|
||||
1096
package-lock.json
generated
1096
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
69
package.json
69
package.json
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "ionic-native",
|
||||
"version": "5.30.0",
|
||||
"version": "5.33.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",
|
||||
@@ -20,53 +21,57 @@
|
||||
"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 --write \"**/*.{js,json,css,scss,less,md,ts,html,component.html}\""
|
||||
"prettier": "prettier src/**/* --write"
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": "^2.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/common": "^9.1.12",
|
||||
"@angular/compiler": "^9.1.12",
|
||||
"@angular/compiler-cli": "^9.1.12",
|
||||
"@angular/core": "^9.1.12",
|
||||
"@angular/common": "^11.2.13",
|
||||
"@angular/compiler": "^11.2.13",
|
||||
"@angular/compiler-cli": "^11.2.13",
|
||||
"@angular/core": "^11.2.13",
|
||||
"@types/cordova": "0.0.34",
|
||||
"@types/fs-extra": "^9.0.4",
|
||||
"@types/jest": "^26.0.15",
|
||||
"@types/lodash": "^4.14.165",
|
||||
"@types/node": "^12.19.6",
|
||||
"@types/fs-extra": "^9.0.11",
|
||||
"@types/jest": "^26.0.23",
|
||||
"@types/lodash": "^4.14.168",
|
||||
"@types/node": "^12.20.12",
|
||||
"@types/rimraf": "^3.0.0",
|
||||
"@types/webpack": "^4.41.25",
|
||||
"ajv": "^6.12.6",
|
||||
"@types/webpack": "^4.41.28",
|
||||
"async-promise-queue": "^1.0.5",
|
||||
"conventional-changelog-cli": "^2.1.1",
|
||||
"cz-conventional-changelog": "^3.3.0",
|
||||
"dgeni": "^0.4.12",
|
||||
"dgeni": "^0.4.14",
|
||||
"dgeni-packages": "0.16.10",
|
||||
"fs-extra": "^9.0.1",
|
||||
"fs-extra": "^10.0.0",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-rename": "^2.0.0",
|
||||
"gulp-replace": "^1.0.0",
|
||||
"gulp-replace": "^1.1.3",
|
||||
"gulp-tslint": "^8.1.4",
|
||||
"husky": "^4.3.0",
|
||||
"husky": "^6.0.0",
|
||||
"is-ci": "^3.0.0",
|
||||
"jest": "^26.6.3",
|
||||
"lint-staged": "^10.5.1",
|
||||
"lodash": "^4.17.20",
|
||||
"lint-staged": "^11.0.0",
|
||||
"lodash": "^4.17.21",
|
||||
"minimist": "^1.2.5",
|
||||
"natives": "^1.1.6",
|
||||
"prettier": "^2.2.0",
|
||||
"prettier": "^2.3.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"rxjs": "^6.6.3",
|
||||
"ts-jest": "^26.4.4",
|
||||
"ts-node": "^8.10.2",
|
||||
"tslint": "^5.20.1",
|
||||
"rollup": "^2.47.0",
|
||||
"rxjs": "^6.6.7",
|
||||
"ts-jest": "^26.5.6",
|
||||
"ts-node": "~8.3.0",
|
||||
"tslint": "~6.1.0",
|
||||
"tslint-config-prettier": "^1.18.0",
|
||||
"tslint-ionic-rules": "0.0.21",
|
||||
"typedoc": "^0.18.0",
|
||||
"typescript": "~3.8.3",
|
||||
"typescript-tslint-plugin": "0.5.5",
|
||||
"typescript": "~4.1.5",
|
||||
"typescript-tslint-plugin": "^1.0.1",
|
||||
"uglifyjs-webpack-plugin": "^2.2.0",
|
||||
"unminified-webpack-plugin": "^2.0.0",
|
||||
"webpack": "^4.44.2",
|
||||
"webpack": "^4.46.0",
|
||||
"winston": "^3.3.3",
|
||||
"zone.js": "^0.10.3"
|
||||
"zone.js": "^0.11.4"
|
||||
},
|
||||
"jest": {
|
||||
"transform": {
|
||||
@@ -93,17 +98,9 @@
|
||||
"path": "./node_modules/cz-conventional-changelog"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": "^1.14.1"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"*": [
|
||||
"prettier --write"
|
||||
"prettier src/**/* --write"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ import * as ts from 'typescript';
|
||||
import * as fs from 'fs-extra';
|
||||
import * as path from 'path';
|
||||
import * as rimraf from 'rimraf';
|
||||
import * as rollup from 'rollup';
|
||||
import { generateDeclarations } from './transpile';
|
||||
import { clone } from 'lodash';
|
||||
import { EmitFlags, createCompilerHost, CompilerOptions, CompilerHost, createProgram } from '@angular/compiler-cli';
|
||||
@@ -54,6 +55,31 @@ export function generateDeclarationFiles() {
|
||||
generateDeclarations(PLUGIN_PATHS.map(p => p.replace('index.ts', 'ngx/index.ts')));
|
||||
}
|
||||
|
||||
export function generateLegacyBundles() {
|
||||
[
|
||||
path.resolve(ROOT, 'dist/@ionic-native/core/index.js'),
|
||||
...PLUGIN_PATHS.map(p =>
|
||||
p.replace(path.join(ROOT, 'src'), path.join(ROOT, 'dist')).replace('index.ts', 'ngx/index.js')
|
||||
),
|
||||
].forEach(p =>
|
||||
rollup
|
||||
.rollup({
|
||||
input: p,
|
||||
onwarn(warning, warn) {
|
||||
if (warning.code === 'UNUSED_EXTERNAL_IMPORT') return;
|
||||
warn(warning);
|
||||
},
|
||||
external: ['@angular/core', '@ionic-native/core', 'rxjs', 'tslib'],
|
||||
})
|
||||
.then(bundle =>
|
||||
bundle.write({
|
||||
file: path.join(path.dirname(p), 'bundle.js'),
|
||||
format: 'cjs',
|
||||
})
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// remove reference to @ionic-native/core decorators
|
||||
export function modifyMetadata() {
|
||||
debugger;
|
||||
|
||||
@@ -4,6 +4,7 @@ import { getMethodsForDecorator } from '../helpers';
|
||||
function transformImports(file: ts.SourceFile, ctx: ts.TransformationContext, ngcBuild?: boolean) {
|
||||
// remove angular imports
|
||||
if (!ngcBuild) {
|
||||
// @ts-expect-error
|
||||
file.statements = (file.statements as any).filter(
|
||||
(s: any) => !(s.kind === ts.SyntaxKind.ImportDeclaration && s.moduleSpecifier.text === '@angular/core')
|
||||
);
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
import { cleanupNgx, generateDeclarationFiles, modifyMetadata, transpileNgx, transpileNgxCore } from '../build/ngx';
|
||||
import {
|
||||
cleanupNgx,
|
||||
generateLegacyBundles,
|
||||
generateDeclarationFiles,
|
||||
modifyMetadata,
|
||||
transpileNgx,
|
||||
transpileNgxCore,
|
||||
} from '../build/ngx';
|
||||
|
||||
transpileNgxCore();
|
||||
transpileNgx();
|
||||
generateLegacyBundles();
|
||||
generateDeclarationFiles();
|
||||
modifyMetadata();
|
||||
cleanupNgx();
|
||||
|
||||
@@ -15,6 +15,7 @@ const FLAGS = '--access public';
|
||||
|
||||
const PACKAGE_JSON_BASE = {
|
||||
description: 'Ionic Native - Native plugins for ionic apps',
|
||||
main: 'bundle.js',
|
||||
module: 'index.js',
|
||||
typings: 'index.d.ts',
|
||||
author: 'ionic',
|
||||
@@ -78,7 +79,7 @@ async function publish(ignoreErrors = false) {
|
||||
// upload 1 package per CPU thread at a time
|
||||
const worker = Queue.async.asyncify(
|
||||
(pkg: any) =>
|
||||
new Promise<any>((resolve, reject) => {
|
||||
new Promise<string | void>((resolve, reject) => {
|
||||
exec(`npm publish ${pkg} ${FLAGS}`, (err, stdout) => {
|
||||
if (stdout) {
|
||||
Logger.verbose(stdout.trim());
|
||||
|
||||
@@ -37,7 +37,6 @@ export interface CordovaOptions {
|
||||
* 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,21 +45,24 @@ export class AdjustConfig {
|
||||
private delayStart = 0.0;
|
||||
private logLevel: AdjustLogLevel = null;
|
||||
private defaultTracker: string = null;
|
||||
private urlStrategy: 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;
|
||||
@@ -97,6 +100,10 @@ export class AdjustConfig {
|
||||
this.externalDeviceId = externalDeviceId;
|
||||
}
|
||||
|
||||
setUrlStrategy(urlStrategy: AdjustUrlStrategy) {
|
||||
this.urlStrategy = urlStrategy;
|
||||
}
|
||||
|
||||
setSendInBackground(sendInBackground: boolean) {
|
||||
this.sendInBackground = sendInBackground;
|
||||
}
|
||||
@@ -117,10 +124,18 @@ 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;
|
||||
}
|
||||
@@ -129,6 +144,10 @@ export class AdjustConfig {
|
||||
this.allowIdfaReading = allowIdfaReading;
|
||||
}
|
||||
|
||||
setAllowAdServicesInfoReading(allowAdServicesInfoReading: boolean) {
|
||||
this.allowAdServicesInfoReading = allowAdServicesInfoReading;
|
||||
}
|
||||
|
||||
setAttributionCallbackListener(attributionCallback: (attribution: AdjustAttribution) => void) {
|
||||
this.attributionCallback = attributionCallback;
|
||||
}
|
||||
@@ -275,6 +294,21 @@ export class AdjustPlayStoreSubscription {
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
@@ -284,6 +318,9 @@ export interface AdjustAttribution {
|
||||
creative: string;
|
||||
clickLabel: string;
|
||||
adid: string;
|
||||
costType: string;
|
||||
costAmount: string;
|
||||
costCurrency: string;
|
||||
}
|
||||
|
||||
export interface AdjustSessionSuccess {
|
||||
@@ -335,6 +372,33 @@ 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
|
||||
@@ -367,9 +431,12 @@ export enum AdjustLogLevel {
|
||||
* AdjustConfig
|
||||
* AdjustAppStoreSubscription
|
||||
* AdjustPlayStoreSubscription
|
||||
* AdjustThirdPartySharing
|
||||
* @enums
|
||||
* AdjustEnvironment
|
||||
* AdjustLogLevel
|
||||
* AdjustUrlStrategy
|
||||
* AdjustAdRevenueSource
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Adjust',
|
||||
@@ -408,6 +475,28 @@ export class Adjust extends IonicNativePlugin {
|
||||
@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
|
||||
@@ -566,10 +655,26 @@ export class Adjust extends IonicNativePlugin {
|
||||
/**
|
||||
* 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<int>} Returns a promise with user's consent value
|
||||
* @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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, CordovaProperty, CordovaInstance, InstanceProperty, IonicNativePlugin } from '@ionic-native/core';
|
||||
import {
|
||||
Plugin,
|
||||
Cordova,
|
||||
CordovaProperty,
|
||||
CordovaInstance,
|
||||
InstanceProperty,
|
||||
IonicNativePlugin,
|
||||
} from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/**
|
||||
@@ -39,10 +46,9 @@ import { Observable } from 'rxjs';
|
||||
plugin: 'cordova-paytm-allinonesdk',
|
||||
pluginRef: 'AllInOneSDK',
|
||||
repo: 'https://github.com/paytm/paytm-allinonesdk-ionic-cordova.git',
|
||||
platforms: ['Android','iOS']
|
||||
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.
|
||||
@@ -51,29 +57,28 @@ export class AllInOneSDK extends IonicNativePlugin {
|
||||
* @return {Promise<PaytmResponse>} Returns a promise that resolves when a transaction completes(both failed and successful).
|
||||
*/
|
||||
@Cordova()
|
||||
startTransaction(options : PaymentIntentModel): Promise<PaytmResponse> {
|
||||
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
|
||||
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
|
||||
export interface PaymentIntentModel {
|
||||
mid: string; // Merchant ID
|
||||
orderId: string; // Order ID
|
||||
txnToken: string; // Transaction Token
|
||||
amount: string; // Amount
|
||||
isStaging: boolean; // Environment
|
||||
callbackUrl: string; // Callback URL
|
||||
restrictAppInvoke: boolean; // To enable or disable the paytm app invocation
|
||||
}
|
||||
|
||||
99
src/@ionic-native/plugins/android-notch/index.ts
Normal file
99
src/@ionic-native/plugins/android-notch/index.ts
Normal file
@@ -0,0 +1,99 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Android Notch
|
||||
* @description
|
||||
* This plugin enables developers to get the cutout and android devices inset sizes
|
||||
* It is based on the cordova plugin developed by @tobspr: https://github.com/tobspr/cordova-plugin-android-notch
|
||||
* This plugin works on all android versions, but we can only detect notches starting from Android 9.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { AndroidNotch } from '@ionic-native/android-notch/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private androidNotch: AndroidNotch) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.androidNotch.hasCutout()
|
||||
* .then((px: number) => console.log('Inset size: '), px)
|
||||
* .catch((error: any) => console.log('Error: ', error))
|
||||
*
|
||||
* this.androidNotch.getInsetTop()
|
||||
* .then((px: number) => console.log('Inset size: '), px)
|
||||
* .catch((error: any) => console.log('Error: ', error))
|
||||
*
|
||||
* this.androidNotch.getInsetRight()
|
||||
* .then((px: number) => console.log('Inset size: '), px)
|
||||
* .catch((error: any) => console.log('Error: ', error))
|
||||
*
|
||||
* this.androidNotch.getInsetBottom()
|
||||
* .then((px: number) => console.log('Inset size: '), px)
|
||||
* .catch((error: any) => console.log('Error: ', error))
|
||||
*
|
||||
* this.androidNotch.getInsetLeft()
|
||||
* .then((px: number) => console.log('Inset size: '), px)
|
||||
* .catch((error: any) => console.log('Error: ', error))
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'AndroidNotch',
|
||||
plugin: 'cordova-plugin-android-notch',
|
||||
pluginRef: 'AndroidNotch',
|
||||
repo: 'https://github.com/tobspr/cordova-plugin-android-notch.git',
|
||||
platforms: ['Android'],
|
||||
})
|
||||
@Injectable()
|
||||
export class AndroidNotch extends IonicNativePlugin {
|
||||
/**
|
||||
* Returns true if the android device has cutout
|
||||
*
|
||||
* @return {Promise<boolean>}
|
||||
*/
|
||||
@Cordova()
|
||||
hasCutout(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the heigth of the top inset
|
||||
*
|
||||
* @return {Promise<number>}
|
||||
*/
|
||||
@Cordova()
|
||||
getInsetTop(): Promise<number> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the heigth of the right inset
|
||||
*
|
||||
* @return {Promise<number>}
|
||||
*/
|
||||
@Cordova()
|
||||
getInsetRight(): Promise<number> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the heigth of the bottom inset
|
||||
* @return {Promise<number>}
|
||||
*/
|
||||
@Cordova()
|
||||
getInsetBottom(): Promise<number> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the heigth of the left inset
|
||||
* @return {Promise<number>}
|
||||
*/
|
||||
@Cordova()
|
||||
getInsetLeft(): Promise<number> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
41
src/@ionic-native/plugins/app-center-low-memory/index.ts
Normal file
41
src/@ionic-native/plugins/app-center-low-memory/index.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name App Center Low Memory
|
||||
* @description
|
||||
* Generates a low memory warning.
|
||||
* For more info, please see: https://github.com/Microsoft/appcenter-sdk-cordova/tree/master/cordova-plugin-appcenter-generate-low-memory
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { LowMemory } from '@ionic-native/app-center-low-memory/ngx';
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* constructor(private lowMemory: LowMemory) { }
|
||||
*
|
||||
* async warning() {
|
||||
* await this.lowMemory.generateLowMemory();
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'LowMemory',
|
||||
plugin: 'https://github.com/Microsoft/appcenter-sdk-cordova/tree/master/cordova-plugin-appcenter-generate-low-memory',
|
||||
pluginRef: 'LowMemory',
|
||||
repo: 'https://github.com/Microsoft/appcenter-sdk-cordova/tree/master/cordova-plugin-appcenter-generate-low-memory',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class LowMemory extends IonicNativePlugin {
|
||||
/**
|
||||
* Generates a low memory warning.
|
||||
* For more info, please see: https://github.com/Microsoft/appcenter-sdk-cordova/tree/master/cordova-plugin-appcenter-generate-low-memory
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
generateLowMemory(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
62
src/@ionic-native/plugins/app-center-shared/index.ts
Normal file
62
src/@ionic-native/plugins/app-center-shared/index.ts
Normal file
@@ -0,0 +1,62 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name App Center Shared
|
||||
* @capacitorincompatible true
|
||||
* @description
|
||||
* Exposes additional shared APIs for App Center.
|
||||
*
|
||||
* For more info, please see https://docs.microsoft.com/en-us/appcenter/sdk/other-apis/cordova
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { AppCenter } from '@ionic-native/app-center-shared/ngx';
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* constructor(private appCenterShared: AppCenter) { }
|
||||
*
|
||||
* async getInstallId() {
|
||||
* const id = await this.appCenter.getInstallId();
|
||||
* }
|
||||
*
|
||||
* async setUserId() {
|
||||
* try{
|
||||
* await this.appCenter.setUserId('i-am-john');
|
||||
* } catch (e){
|
||||
* console.log(e);
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'AppCenter',
|
||||
plugin: 'cordova-plugin-appcenter-shared',
|
||||
pluginRef: 'AppCenter',
|
||||
repo: 'https://github.com/Microsoft/appcenter-sdk-cordova/tree/master/cordova-plugin-appcenter-shared',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class AppCenter extends IonicNativePlugin {
|
||||
/**
|
||||
* Returns AppCenter UUID.
|
||||
* For more info, please see: https://docs.microsoft.com/en-us/appcenter/sdk/other-apis/cordova#identify-installations
|
||||
* @returns {Promise<string>} Install ID
|
||||
*/
|
||||
@Cordova()
|
||||
getInstallId(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a user ID that's used to augment crash reports.
|
||||
* For more info, please see: https://docs.microsoft.com/en-us/appcenter/sdk/other-apis/cordova#identify-users
|
||||
* @param {string} userId Ex. "your-user-id"
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
setUserId(userId: string): Promise<void> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,50 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export enum AppRateReviewTypeIos {
|
||||
/**
|
||||
* Write review directly in your application (iOS 10.3+), limited to 3 prompts per year.
|
||||
* Will fallback to 'AppStoreReview' for other iOS versions
|
||||
*/
|
||||
InAppReview = 'InAppReview',
|
||||
/**
|
||||
* Open the store within the app. Use this option as an alternative to inAppReview to avoid the rate action from doing nothing
|
||||
*/
|
||||
AppStoreReview = 'AppStoreReview',
|
||||
/**
|
||||
* Open the store using the openUrl preference (defaults to InAppBrowser). Be advised that WKWebView might not open the app store links
|
||||
*/
|
||||
InAppBrowser = 'InAppBrowser',
|
||||
}
|
||||
|
||||
export enum AppRateReviewTypeAndroid {
|
||||
/**
|
||||
* Write review directly in your application. Will fallback to InAppBrowser if not available
|
||||
*/
|
||||
InAppReview = 'InAppReview',
|
||||
/**
|
||||
* Open the store using the openUrl preference (defaults to InAppBrowser)
|
||||
*/
|
||||
InAppBrowser = 'InAppBrowser',
|
||||
}
|
||||
|
||||
export enum AppRatePromptType {
|
||||
/**
|
||||
* Prompt asking to rate the app.
|
||||
*/
|
||||
AppRatingPrompt = 'AppRatingPrompt',
|
||||
|
||||
/**
|
||||
* Prompt asking to rate the app within the store.
|
||||
*/
|
||||
StoreRatingPrompt = 'StoreRatingPrompt',
|
||||
|
||||
/**
|
||||
* Prompt asking to give feedback.
|
||||
*/
|
||||
FeedbackPrompt = 'FeedbackPrompt',
|
||||
}
|
||||
|
||||
export interface AppRatePreferences {
|
||||
/**
|
||||
* Custom BCP 47 language tag
|
||||
@@ -22,11 +66,29 @@ export interface AppRatePreferences {
|
||||
*/
|
||||
usesUntilPrompt?: number;
|
||||
|
||||
reviewType?: {
|
||||
/**
|
||||
* the type of review display to show the user on iOS
|
||||
* Default: AppStoreReview
|
||||
*/
|
||||
ios?: AppRateReviewTypeIos;
|
||||
/**
|
||||
* the type of review display to show the user on Android
|
||||
* Default: InAppBrowser
|
||||
*/
|
||||
android?: AppRateReviewTypeAndroid;
|
||||
};
|
||||
|
||||
/**
|
||||
* Simple Mode to display the rate dialog directly and bypass negative feedback filtering flow
|
||||
*/
|
||||
simpleMode?: boolean;
|
||||
|
||||
/**
|
||||
* Disabling would skip displaying a rate dialog if in app review is set and available. Defaults to `true`
|
||||
*/
|
||||
showPromptForInAppReview?: boolean;
|
||||
|
||||
/**
|
||||
* leave app or no when application page opened in app store (now supported only for iOS). Defaults to `false`
|
||||
*/
|
||||
@@ -93,20 +155,30 @@ export interface AppRateCustomLocale {
|
||||
feedbackPromptMessage?: string;
|
||||
}
|
||||
|
||||
export interface AppRateLocales {
|
||||
addLocale(localeObject: AppRateCustomLocale): AppRateCustomLocale;
|
||||
|
||||
getLocale(language: string, applicationTitle?: string, customLocale?: AppRateCustomLocale);
|
||||
|
||||
getLocalesNames(): { [prop: string]: AppRateCustomLocale };
|
||||
}
|
||||
|
||||
export interface AppRateCallbacks {
|
||||
/**
|
||||
* call back function. called when user clicked on rate-dialog buttons
|
||||
*/
|
||||
onButtonClicked?: Function;
|
||||
onButtonClicked?: (buttonIndex: number, buttonLabel: string, promptType: AppRatePromptType) => void;
|
||||
|
||||
/**
|
||||
* call back function. called when rate-dialog showing
|
||||
*/
|
||||
onRateDialogShow?: Function;
|
||||
onRateDialogShow?: (rateCallback: (buttonIndex: number) => void) => void;
|
||||
/**
|
||||
* call back function. called when user clicked on negative feedback
|
||||
*/
|
||||
handleNegativeFeedback?: Function;
|
||||
handleNegativeFeedback?: () => void;
|
||||
|
||||
done?: () => void;
|
||||
}
|
||||
|
||||
export interface AppUrls {
|
||||
@@ -196,12 +268,38 @@ export class AppRate extends IonicNativePlugin {
|
||||
@CordovaProperty()
|
||||
preferences: AppRatePreferences;
|
||||
|
||||
/**
|
||||
* Manager custom locales
|
||||
*/
|
||||
@CordovaProperty()
|
||||
locales: AppRateLocales;
|
||||
|
||||
/**
|
||||
* Set preferences
|
||||
* @return void
|
||||
*/
|
||||
@Cordova()
|
||||
setPreferences(pref: AppRatePreferences): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get preferences
|
||||
* @return AppRatePreferences
|
||||
*/
|
||||
@Cordova()
|
||||
getPreferences(): AppRatePreferences {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prompts the user for rating
|
||||
* @param {boolean} immediately Show the rating prompt immediately.
|
||||
*/
|
||||
@Cordova()
|
||||
promptForRating(immediately: boolean): void {}
|
||||
promptForRating(immediately?: boolean): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Immediately send the user to the app store rating page
|
||||
|
||||
@@ -31,7 +31,7 @@ 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!
|
||||
*/
|
||||
@@ -125,7 +125,6 @@ export class Appsflyer extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* Enables app uninstall tracking
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, CordovaInstance, IonicNativePlugin, } from '@ionic-native/core';
|
||||
import { Plugin, CordovaInstance, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
declare const window: any;
|
||||
|
||||
@@ -7,33 +7,34 @@ 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 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,
|
||||
id: string;
|
||||
filePath: string;
|
||||
fileKey?: string;
|
||||
serverUrl: string;
|
||||
notificationTitle?: string;
|
||||
headers?: {
|
||||
[name: string]: string
|
||||
},
|
||||
[name: string]: string;
|
||||
};
|
||||
parameters?: {
|
||||
[name: string]: string
|
||||
}
|
||||
[name: string]: string;
|
||||
};
|
||||
[prop: string]: any;
|
||||
}
|
||||
|
||||
@@ -41,13 +42,13 @@ export interface FTMOptions {
|
||||
callBack: (event: UploadEvent) => any;
|
||||
config?: {
|
||||
parallelUploadsLimit?: number;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export class FileTransferManager {
|
||||
private _objectInstance: any;
|
||||
|
||||
constructor(options: FTMOptions ) {
|
||||
constructor(options: FTMOptions) {
|
||||
this._objectInstance = window.FileTransferManager.init(options.config, options.callBack);
|
||||
}
|
||||
|
||||
@@ -70,7 +71,6 @@ export class FileTransferManager {
|
||||
destroy(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -107,6 +107,6 @@ export class BackgroundUpload extends IonicNativePlugin {
|
||||
FileTransferManager = FileTransferManager;
|
||||
|
||||
init(options: FTMOptions): FileTransferManager {
|
||||
return new FileTransferManager(options)
|
||||
return new FileTransferManager(options);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,6 +263,27 @@ 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
|
||||
|
||||
@@ -2646,6 +2646,35 @@ export interface UsdlCombinedRecognizer extends Recognizer<UsdlCombinedRecognize
|
||||
}
|
||||
export interface UsdlCombinedRecognizerCtor extends RecognizerCtor<UsdlCombinedRecognizer> {}
|
||||
|
||||
export interface BlinkIdRecognizerCtor extends RecognizerCtor<BlinkIdRecognizer> {}
|
||||
|
||||
export interface BlinkIdRecognizer extends Recognizer<BlinkIdRecognizerResult> {
|
||||
returnFaceImage: boolean;
|
||||
returnFullDocumentImage: boolean;
|
||||
anonymizationMode: number;
|
||||
}
|
||||
|
||||
export interface BlinkIdRecognizerResult extends RecognizerResult {
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
fullName: string;
|
||||
localizedName: string;
|
||||
additionalNameInformation: string;
|
||||
placeOfBirth: string;
|
||||
documentNumber: string;
|
||||
dateOfBirth: Date;
|
||||
sex: string;
|
||||
nationality: string;
|
||||
fullDocumentImage: string;
|
||||
mrzResult: MrzResult;
|
||||
}
|
||||
|
||||
export interface BlinkIdOverlaySettingsCtor {
|
||||
new (): BlinkIdOverlaySettings;
|
||||
}
|
||||
export interface BlinkIdOverlaySettings extends OverlaySettings {}
|
||||
|
||||
export interface BlinkIdRecognizerResultCtor extends RecognizerResultCtor<BlinkIdRecognizerResult> {}
|
||||
/**
|
||||
* @name BlinkId
|
||||
* @description
|
||||
@@ -2922,4 +2951,7 @@ export class BlinkId extends IonicNativePlugin {
|
||||
@CordovaProperty() UsdlRecognizer: UsdlRecognizerCtor;
|
||||
@CordovaProperty() UsdlCombinedRecognizerResult: UsdlCombinedRecognizerResultCtor;
|
||||
@CordovaProperty() UsdlCombinedRecognizer: UsdlCombinedRecognizerCtor;
|
||||
@CordovaProperty() BlinkIdRecognizer: BlinkIdRecognizerCtor;
|
||||
@CordovaProperty() BlinkIdOverlaySettings: BlinkIdOverlaySettingsCtor;
|
||||
@CordovaProperty() BlinkIdRecognizerResult: BlinkIdRecognizerResultCtor;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,8 @@ export type Status =
|
||||
| 'advertisingStarted'
|
||||
| 'advertisingStopped'
|
||||
| 'responded'
|
||||
| 'notified';
|
||||
| 'notified'
|
||||
| 'notificationSent';
|
||||
|
||||
/** Available connection priorities */
|
||||
export type ConnectionPriority = 'low' | 'balanced' | 'high';
|
||||
@@ -88,6 +89,8 @@ export interface NotifyParams {
|
||||
characteristic: string;
|
||||
/** Base64 encoded string, number or string */
|
||||
value: string;
|
||||
/** Android only: address of the device the notification should be sent to. */
|
||||
address?: string;
|
||||
}
|
||||
|
||||
export interface RespondParams {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
export interface BranchIoPromise {
|
||||
$identity_id?: number;
|
||||
@@ -105,6 +106,15 @@ 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>}
|
||||
|
||||
@@ -202,7 +202,7 @@ export class CameraPreview extends IonicNativePlugin {
|
||||
startCamera(options: CameraPreviewOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Starts the camera video instance.
|
||||
* @param {any} options
|
||||
@@ -215,7 +215,6 @@ export class CameraPreview extends IonicNativePlugin {
|
||||
startRecordVideo(options: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Stops the camera preview instance. (iOS & Android)
|
||||
@@ -225,7 +224,7 @@ export class CameraPreview extends IonicNativePlugin {
|
||||
stopCamera(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Stops the camera video instance. (iOS & Android)
|
||||
* @return {Promise<any>}
|
||||
|
||||
@@ -94,8 +94,8 @@ export class Diagnostic extends IonicNativePlugin {
|
||||
* Location accuracy authorization
|
||||
*/
|
||||
locationAccuracyAuthorization: {
|
||||
FULL: 'full',
|
||||
REDUCED: 'reduced',
|
||||
FULL: 'full';
|
||||
REDUCED: 'reduced';
|
||||
};
|
||||
|
||||
permissionGroups = {
|
||||
|
||||
@@ -24,7 +24,7 @@ export interface FacebookLoginResponse {
|
||||
* @description
|
||||
* Use the Facebook Connect plugin to obtain access to the native FB application on iOS and Android.
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-facebook4`. For more info, please see the [Facebook Connect](https://github.com/jeduan/cordova-plugin-facebook4).
|
||||
* Requires Cordova plugin: `cordova-plugin-facebook-connect`. For more info, please see the [Facebook Connect](https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect).
|
||||
*
|
||||
* #### Installation
|
||||
*
|
||||
@@ -39,7 +39,7 @@ export interface FacebookLoginResponse {
|
||||
* Then type in the following command in your Terminal, where APP_ID and APP_NAME are the values from the Facebook Developer portal.
|
||||
*
|
||||
* ```bash
|
||||
* ionic cordova plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="myApplication"
|
||||
* ionic cordova plugin add cordova-plugin-facebook-connect --variable APP_ID="123456789" --variable APP_NAME="myApplication"
|
||||
* ```
|
||||
*
|
||||
* After, you'll need to add the native platforms you'll be using to your app in the Facebook Developer portal under your app's Settings:
|
||||
@@ -107,11 +107,11 @@ export interface FacebookLoginResponse {
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Facebook',
|
||||
plugin: 'cordova-plugin-facebook4',
|
||||
plugin: 'cordova-plugin-facebook-connect',
|
||||
pluginRef: 'facebookConnectPlugin',
|
||||
repo: 'https://github.com/jeduan/cordova-plugin-facebook4',
|
||||
repo: 'https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect',
|
||||
install:
|
||||
'ionic cordova plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="myApplication"',
|
||||
'ionic cordova plugin add cordova-plugin-facebook-connect --variable APP_ID="123456789" --variable APP_NAME="myApplication"',
|
||||
installVariables: ['APP_ID', 'APP_NAME'],
|
||||
platforms: ['Android', 'iOS', 'Browser'],
|
||||
})
|
||||
@@ -178,6 +178,60 @@ 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.
|
||||
*
|
||||
@@ -230,6 +284,16 @@ 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:
|
||||
*
|
||||
@@ -243,7 +307,7 @@ export class Facebook extends IonicNativePlugin {
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* For more options see the [Cordova plugin docs](https://github.com/jeduan/cordova-plugin-facebook4#show-a-dialog) and the [Facebook docs](https://developers.facebook.com/docs/javascript/reference/FB.ui)
|
||||
* For more options see the [Cordova plugin docs](https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect#show-a-dialog) and the [Facebook docs](https://developers.facebook.com/docs/javascript/reference/FB.ui)
|
||||
* @param {Object} options The dialog options
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with success data, or rejects with an error
|
||||
*/
|
||||
@@ -263,10 +327,11 @@ export class Facebook extends IonicNativePlugin {
|
||||
*
|
||||
* @param {string} requestPath Graph API endpoint you want to call
|
||||
* @param {string[]} permissions List of [permissions](https://developers.facebook.com/docs/facebook-login/permissions) for this request.
|
||||
* @param {string} httpMethod HTTP method for the request, one of "GET", "POST", or "DELETE" (default is "GET")
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the result of the request, or rejects with an error
|
||||
*/
|
||||
@Cordova()
|
||||
api(requestPath: string, permissions: string[]): Promise<any> {
|
||||
api(requestPath: string, permissions: string[], httpMethod?: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -286,15 +351,49 @@ 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): Promise<any> {
|
||||
logPurchase(value: number, currency: string, params?: Object): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ export interface FileTransferError {
|
||||
*
|
||||
* @description
|
||||
* This plugin allows you to upload and download files.
|
||||
*
|
||||
*
|
||||
* @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 {
|
||||
|
||||
@@ -126,6 +126,16 @@ export class FirebaseAuthentication extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Uses Apples's idToken and rawNonce (optional) to sign-in into firebase account. In order to retrieve those tokens follow instructions for Android and iOS
|
||||
* @param idToken ID Token
|
||||
* @param rawNonce Access Token
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
signInWithApple(identityToken: string, rawNonce?: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Uses Facebook's accessToken to sign-in into firebase account. In order to retrieve those tokens follow instructions for Android and iOS.
|
||||
* @param accessToken Access Token
|
||||
|
||||
@@ -183,7 +183,7 @@ export class FirebaseMessaging extends IonicNativePlugin {
|
||||
* @returns {Promise<null>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
revokeToken(): Promise<null> {
|
||||
deleteToken(): Promise<null> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,30 +9,30 @@ export interface Text {
|
||||
}
|
||||
|
||||
export interface TextLine extends TextBlock {
|
||||
lines: TextElement[]
|
||||
lines: TextElement[];
|
||||
}
|
||||
|
||||
export interface TextElement extends TextBlock {
|
||||
elements: TextBlock[]
|
||||
elements: TextBlock[];
|
||||
}
|
||||
|
||||
export interface TextBlock {
|
||||
text: string;
|
||||
cornerPoints: TextPoint[]
|
||||
frame: TextFrame
|
||||
recognizedLanguages: string
|
||||
cornerPoints: TextPoint[];
|
||||
frame: TextFrame;
|
||||
recognizedLanguages: string;
|
||||
}
|
||||
|
||||
export interface TextPoint {
|
||||
x: number,
|
||||
y: number
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
export interface TextFrame {
|
||||
x: number,
|
||||
y: number,
|
||||
width: number,
|
||||
height: number
|
||||
x: number;
|
||||
y: number;
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
|
||||
export enum BarcodeFormat {
|
||||
@@ -50,7 +50,7 @@ export enum BarcodeFormat {
|
||||
UPC_A = 512,
|
||||
UPC_E = 1024,
|
||||
PDF417 = 2048,
|
||||
AZTEC = 4096
|
||||
AZTEC = 4096,
|
||||
}
|
||||
|
||||
export enum BarcodeValueType {
|
||||
@@ -79,7 +79,7 @@ export enum BarcodeValueType {
|
||||
/** Barcode value type for calendar events. */
|
||||
CalendarEvent,
|
||||
/** Barcode value type for driver's license data. */
|
||||
DriversLicense
|
||||
DriversLicense,
|
||||
}
|
||||
|
||||
export enum BarcodeEmailType {
|
||||
@@ -88,7 +88,7 @@ export enum BarcodeEmailType {
|
||||
/** Barcode work email type. */
|
||||
Work,
|
||||
/** Barcode home email type. */
|
||||
Home
|
||||
Home,
|
||||
}
|
||||
|
||||
export enum BarcodePhoneType {
|
||||
@@ -101,7 +101,7 @@ export enum BarcodePhoneType {
|
||||
/** Barcode fax phone type. */
|
||||
Fax,
|
||||
/** Barcode mobile phone type. */
|
||||
Mobile
|
||||
Mobile,
|
||||
}
|
||||
|
||||
export enum BarcodeWiFiEncryptionType {
|
||||
@@ -112,7 +112,7 @@ export enum BarcodeWiFiEncryptionType {
|
||||
/** Barcode WPA Wi-Fi encryption type. */
|
||||
WPA,
|
||||
/** Barcode WEP Wi-Fi encryption type. */
|
||||
WEP
|
||||
WEP,
|
||||
}
|
||||
|
||||
export enum BarcodeAddressType {
|
||||
@@ -121,105 +121,105 @@ export enum BarcodeAddressType {
|
||||
/** Barcode work address type. */
|
||||
Work,
|
||||
/** Barcode home address type. */
|
||||
Home
|
||||
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
|
||||
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
|
||||
address: string;
|
||||
body: string;
|
||||
subject: string;
|
||||
type: BarcodeEmailType;
|
||||
}
|
||||
|
||||
export interface BarcodePhone {
|
||||
number: string
|
||||
type: BarcodePhoneType
|
||||
number: string;
|
||||
type: BarcodePhoneType;
|
||||
}
|
||||
|
||||
export interface BarcodeSms {
|
||||
phoneNumber: string
|
||||
message: string
|
||||
phoneNumber: string;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface BarcodeUrl {
|
||||
title: string
|
||||
url: string
|
||||
title: string;
|
||||
url: string;
|
||||
}
|
||||
export interface BarcodeWifi {
|
||||
ssid: string
|
||||
password: string
|
||||
type: BarcodeWiFiEncryptionType
|
||||
ssid: string;
|
||||
password: string;
|
||||
type: BarcodeWiFiEncryptionType;
|
||||
}
|
||||
export interface BarcodeGeoPoint {
|
||||
latitude: number
|
||||
longitude: number
|
||||
latitude: number;
|
||||
longitude: number;
|
||||
}
|
||||
|
||||
export interface BarcodeCalendarEvent {
|
||||
eventDescription: string
|
||||
location: string
|
||||
organizer: string
|
||||
status: string
|
||||
summary: string
|
||||
start: any
|
||||
end: any
|
||||
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
|
||||
title: string;
|
||||
name: string;
|
||||
addresses: BarcodeAddress[];
|
||||
phones: BarcodePhone[];
|
||||
emails: BarcodeEmail[];
|
||||
organization: string;
|
||||
urls: string;
|
||||
}
|
||||
|
||||
export interface BarcodeAddress {
|
||||
addressLine: string
|
||||
type: BarcodeAddressType
|
||||
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
|
||||
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
|
||||
index: number;
|
||||
confidence: number;
|
||||
text: string;
|
||||
}
|
||||
/**
|
||||
* @name Firebase Vision
|
||||
|
||||
@@ -109,9 +109,7 @@ export class Globalization extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse',
|
||||
})
|
||||
getDatePattern(
|
||||
options: GlobalizationOptions
|
||||
): Promise<{
|
||||
getDatePattern(options: GlobalizationOptions): Promise<{
|
||||
pattern: string;
|
||||
timezone: string;
|
||||
iana_timezone: string;
|
||||
@@ -187,9 +185,7 @@ export class Globalization extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse',
|
||||
})
|
||||
getNumberPattern(options: {
|
||||
type: string;
|
||||
}): Promise<{
|
||||
getNumberPattern(options: { type: string }): Promise<{
|
||||
pattern: string;
|
||||
symbol: string;
|
||||
fraction: number;
|
||||
@@ -208,9 +204,7 @@ 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,6 +24,10 @@ export interface HTTPResponse {
|
||||
error?: string;
|
||||
}
|
||||
|
||||
interface AbortedResponse {
|
||||
aborted: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name HTTP
|
||||
* @description
|
||||
@@ -84,6 +88,7 @@ export class HTTP extends IonicNativePlugin {
|
||||
UNSUPPORTED_URL: number;
|
||||
NOT_CONNECTED: number;
|
||||
POST_PROCESSING_FAILED: number;
|
||||
ABORTED: number;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -230,6 +235,29 @@ export class HTTP extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a sync POST request
|
||||
* @param url {string} The url to send the request to
|
||||
* @param body {Object} The body of the request
|
||||
* @param headers {Object} The headers to set for this request
|
||||
* @param success {function} A callback that is called when the request succeed
|
||||
* @param failure {function} A callback that is called when the request failed
|
||||
* @returns {string} returns a string that represents the requestId
|
||||
*/
|
||||
@Cordova({
|
||||
methodName: 'post',
|
||||
sync: true,
|
||||
})
|
||||
postSync(
|
||||
url: string,
|
||||
body: any,
|
||||
headers: any,
|
||||
success: (result: HTTPResponse) => void,
|
||||
failure: (error: any) => void
|
||||
): string {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a GET request
|
||||
* @param url {string} The url to send the request to
|
||||
@@ -242,6 +270,29 @@ export class HTTP extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a sync GET request
|
||||
* @param url {string} The url to send the request to
|
||||
* @param parameters {Object} Parameters to send with the request
|
||||
* @param headers {Object} The headers to set for this request
|
||||
* @param success {function} A callback that is called when the request succeed
|
||||
* @param failure {function} A callback that is called when the request failed
|
||||
* @returns {string} returns a string that represents the requestId
|
||||
*/
|
||||
@Cordova({
|
||||
methodName: 'get',
|
||||
sync: true,
|
||||
})
|
||||
getSync(
|
||||
url: string,
|
||||
parameters: any,
|
||||
headers: any,
|
||||
success: (result: HTTPResponse) => void,
|
||||
failure: (error: any) => void
|
||||
): string {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a PUT request
|
||||
* @param url {string} The url to send the request to
|
||||
@@ -254,6 +305,29 @@ export class HTTP extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a sync PUT request
|
||||
* @param url {string} The url to send the request to
|
||||
* @param body {Object} The body of the request
|
||||
* @param headers {Object} The headers to set for this request
|
||||
* @param success {function} A callback that is called when the request succeed
|
||||
* @param failure {function} A callback that is called when the request failed
|
||||
* @returns {string} returns a string that represents the requestId
|
||||
*/
|
||||
@Cordova({
|
||||
methodName: 'put',
|
||||
sync: true,
|
||||
})
|
||||
putSync(
|
||||
url: string,
|
||||
body: any,
|
||||
headers: any,
|
||||
success: (result: HTTPResponse) => void,
|
||||
failure: (error: any) => void
|
||||
): string {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a PATCH request
|
||||
* @param url {string} The url to send the request to
|
||||
@@ -266,6 +340,29 @@ export class HTTP extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a sync PATCH request
|
||||
* @param url {string} The url to send the request to
|
||||
* @param body {Object} The body of the request
|
||||
* @param headers {Object} The headers to set for this request
|
||||
* @param success {function} A callback that is called when the request succeed
|
||||
* @param failure {function} A callback that is called when the request failed
|
||||
* @returns {string} returns a string that represents the requestId
|
||||
*/
|
||||
@Cordova({
|
||||
methodName: 'patch',
|
||||
sync: true,
|
||||
})
|
||||
patchSync(
|
||||
url: string,
|
||||
body: any,
|
||||
headers: any,
|
||||
success: (result: HTTPResponse) => void,
|
||||
failure: (error: any) => void
|
||||
): string {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a DELETE request
|
||||
* @param url {string} The url to send the request to
|
||||
@@ -278,6 +375,29 @@ export class HTTP extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a sync DELETE request
|
||||
* @param url {string} The url to send the request to
|
||||
* @param parameters {Object} Parameters to send with the request
|
||||
* @param headers {Object} The headers to set for this request
|
||||
* @param success {function} A callback that is called when the request succeed
|
||||
* @param failure {function} A callback that is called when the request failed
|
||||
* @returns {string} returns a string that represents the requestId
|
||||
*/
|
||||
@Cordova({
|
||||
methodName: 'delete',
|
||||
sync: true,
|
||||
})
|
||||
deleteSync(
|
||||
url: string,
|
||||
parameters: any,
|
||||
headers: any,
|
||||
success: (result: HTTPResponse) => void,
|
||||
failure: (error: any) => void
|
||||
): string {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a HEAD request
|
||||
* @param url {string} The url to send the request to
|
||||
@@ -290,6 +410,29 @@ export class HTTP extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a sync HEAD request
|
||||
* @param url {string} The url to send the request to
|
||||
* @param parameters {Object} Parameters to send with the request
|
||||
* @param headers {Object} The headers to set for this request
|
||||
* @param success {function} A callback that is called when the request succeed
|
||||
* @param failure {function} A callback that is called when the request failed
|
||||
* @returns {string} returns a string that represents the requestId
|
||||
*/
|
||||
@Cordova({
|
||||
methodName: 'head',
|
||||
sync: true,
|
||||
})
|
||||
headSync(
|
||||
url: string,
|
||||
parameters: any,
|
||||
headers: any,
|
||||
success: (result: HTTPResponse) => void,
|
||||
failure: (error: any) => void
|
||||
): string {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make an OPTIONS request
|
||||
* @param url {string} The url to send the request to
|
||||
@@ -302,6 +445,29 @@ export class HTTP extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make an sync OPTIONS request
|
||||
* @param url {string} The url to send the request to
|
||||
* @param parameters {Object} Parameters to send with the request
|
||||
* @param headers {Object} The headers to set for this request
|
||||
* @param success {function} A callback that is called when the request succeed
|
||||
* @param failure {function} A callback that is called when the request failed
|
||||
* @returns {string} returns a string that represents the requestId
|
||||
*/
|
||||
@Cordova({
|
||||
methodName: 'options',
|
||||
sync: true,
|
||||
})
|
||||
optionsSync(
|
||||
url: string,
|
||||
parameters: any,
|
||||
headers: any,
|
||||
success: (result: HTTPResponse) => void,
|
||||
failure: (error: any) => void
|
||||
): string {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param url {string} The url to send the request to
|
||||
@@ -316,6 +482,33 @@ export class HTTP extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param url {string} The url to send the request to
|
||||
* @param body {Object} The body of the request
|
||||
* @param headers {Object} The headers to set for this request
|
||||
* @param filePath {string} The local path(s) of the file(s) to upload
|
||||
* @param name {string} The name(s) of the parameter to pass the file(s) along as
|
||||
* @param success {function} A callback that is called when the request succeed
|
||||
* @param failure {function} A callback that is called when the request failed
|
||||
* @returns {string} returns a string that represents the requestId
|
||||
*/
|
||||
@Cordova({
|
||||
methodName: 'uploadFile',
|
||||
sync: true,
|
||||
})
|
||||
uploadFileSync(
|
||||
url: string,
|
||||
body: any,
|
||||
headers: any,
|
||||
filePath: string | string[],
|
||||
name: string | string[],
|
||||
success: (result: any) => void,
|
||||
failure: (error: any) => void
|
||||
): string {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param url {string} The url to send the request to
|
||||
@@ -329,6 +522,31 @@ export class HTTP extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param url {string} The url to send the request to
|
||||
* @param body {Object} The body of the request
|
||||
* @param headers {Object} The headers to set for this request
|
||||
* @param filePath {string} The path to download the file to, including the file name.
|
||||
* @param success {function} A callback that is called when the request succeed
|
||||
* @param failure {function} A callback that is called when the request failed
|
||||
* @returns {string} returns a string that represents the requestId
|
||||
*/
|
||||
@Cordova({
|
||||
methodName: 'downloadFile',
|
||||
sync: true,
|
||||
})
|
||||
downloadFileSync(
|
||||
url: string,
|
||||
body: any,
|
||||
headers: any,
|
||||
filePath: string,
|
||||
success: (result: any) => void,
|
||||
failure: (error: any) => void
|
||||
): string {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param url {string} The url to send the request to
|
||||
@@ -362,4 +580,53 @@ export class HTTP extends IonicNativePlugin {
|
||||
): Promise<HTTPResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param url {string} The url to send the request to
|
||||
* @param options {Object} options for individual request
|
||||
* @param options.method {string} request method
|
||||
* @param options.data {Object} payload to be send to the server (only applicable on post, put or patch methods)
|
||||
* @param options.params {Object} query params to be appended to the URL (only applicable on get, head, delete, upload or download methods)
|
||||
* @param options.serializer {string} data serializer to be used (only applicable on post, put or patch methods), defaults to global serializer value, see setDataSerializer for supported values
|
||||
* @param options.timeout {number} timeout value for the request in seconds, defaults to global timeout value
|
||||
* @param options.headers {Object} headers object (key value pair), will be merged with global values
|
||||
* @param options.filePath {string} file path(s) to be used during upload and download see uploadFile and downloadFile for detailed information
|
||||
* @param options.name {string} name(s) to be used during upload see uploadFile for detailed information
|
||||
* @param options.responseType {string} response type, defaults to text
|
||||
* @param success {function} A callback that is called when the request succeed
|
||||
* @param failure {function} A callback that is called when the request failed
|
||||
*
|
||||
* @returns {string} returns a string that represents the requestId
|
||||
*/
|
||||
@Cordova({
|
||||
methodName: 'sendRequest',
|
||||
sync: true,
|
||||
})
|
||||
sendRequestSync(
|
||||
url: string,
|
||||
options: {
|
||||
method: 'get' | 'post' | 'put' | 'patch' | 'head' | 'delete' | 'options' | 'upload' | 'download';
|
||||
data?: { [index: string]: any };
|
||||
params?: { [index: string]: string | number };
|
||||
serializer?: 'json' | 'urlencoded' | 'utf8' | 'multipart';
|
||||
timeout?: number;
|
||||
headers?: { [index: string]: string };
|
||||
filePath?: string | string[];
|
||||
name?: string | string[];
|
||||
responseType?: 'text' | 'arraybuffer' | 'blob' | 'json';
|
||||
},
|
||||
success: (result: HTTPResponse) => void,
|
||||
failure: (error: any) => void
|
||||
): string {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param requestId {string} The RequestId of the request to abort
|
||||
*/
|
||||
@Cordova()
|
||||
abort(requestId: string): Promise<AbortedResponse> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -382,7 +382,13 @@ export class IBeacon extends IonicNativePlugin {
|
||||
minor?: number,
|
||||
notifyEntryStateOnDisplay?: boolean
|
||||
): BeaconRegion {
|
||||
return new window.cordova.plugins.locationManager.BeaconRegion(identifer, uuid, major, minor, notifyEntryStateOnDisplay);
|
||||
return new window.cordova.plugins.locationManager.BeaconRegion(
|
||||
identifer,
|
||||
uuid,
|
||||
major,
|
||||
minor,
|
||||
notifyEntryStateOnDisplay
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,6 +7,13 @@ export interface IAPProductOptions {
|
||||
type: string;
|
||||
}
|
||||
|
||||
export interface IRefeshResult {
|
||||
cancelled(fn: () => void): void;
|
||||
failed(fn: () => void): void;
|
||||
completed(fn: () => void): void;
|
||||
finished(fn: () => void): void;
|
||||
}
|
||||
|
||||
export type IAPProducts = IAPProduct[] & {
|
||||
/**
|
||||
* Get product by ID
|
||||
@@ -81,7 +88,7 @@ export interface IAPProduct {
|
||||
|
||||
additionalData?: any;
|
||||
|
||||
transaction?: any;
|
||||
transaction?: PlayStoreReceipt | AppStoreReceipt;
|
||||
|
||||
/**
|
||||
* Call `product.finish()` to confirm to the store that an approved order has been delivered.
|
||||
@@ -190,6 +197,22 @@ 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
|
||||
*/
|
||||
@@ -865,7 +888,9 @@ export class InAppPurchase2 extends IonicNativePlugin {
|
||||
* and in the callback `product.finish()` should be called.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
refresh(): void {}
|
||||
refresh(): IRefeshResult {
|
||||
return;
|
||||
}
|
||||
|
||||
/** Lightweight method like refresh but do not relogin user */
|
||||
@Cordova({ sync: true })
|
||||
@@ -874,4 +899,8 @@ export class InAppPurchase2 extends IonicNativePlugin {
|
||||
/** Opens the Manage Subscription page (AppStore, Play, Microsoft, ...). */
|
||||
@Cordova({ sync: true })
|
||||
manageSubscriptions(): void {}
|
||||
|
||||
/** Opens the Code Redemption Sheet on iOS. (AppStore). */
|
||||
@Cordova({ sync: true })
|
||||
redeem(): void {}
|
||||
}
|
||||
|
||||
@@ -244,5 +244,4 @@ export class Intercom extends IonicNativePlugin {
|
||||
setBottomPadding(bottomPadding: string | number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -27,8 +27,7 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
pluginName: 'IosASWebauthenticationSession',
|
||||
plugin: 'cordova-plugin-ios-aswebauthenticationsession-api',
|
||||
pluginRef: 'plugins.ASWebAuthSession',
|
||||
repo:
|
||||
'https://github.com/jwelker110/cordova-plugin-ios-aswebauthenticationsession-api',
|
||||
repo: 'https://github.com/jwelker110/cordova-plugin-ios-aswebauthenticationsession-api',
|
||||
platforms: ['iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
@@ -40,10 +39,7 @@ export class IosASWebauthenticationSession extends IonicNativePlugin {
|
||||
* @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> {
|
||||
start(callbackUrl: string, authorizeURL: string): Promise<string> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export type BiometryType = 'face' | 'touch';
|
||||
|
||||
/**
|
||||
* @name Keychain Touch Id
|
||||
* @description
|
||||
@@ -37,7 +39,7 @@ export class KeychainTouchId extends IonicNativePlugin {
|
||||
* @return {Promise<any>} Returns a promise that resolves when there is hardware support
|
||||
*/
|
||||
@Cordova()
|
||||
isAvailable(): Promise<any> {
|
||||
isAvailable(): Promise<BiometryType> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -46,10 +48,10 @@ export class KeychainTouchId extends IonicNativePlugin {
|
||||
* successful authentication using fingerprint
|
||||
* @param key {string} the key you want to store
|
||||
* @param password {string} the password you want to encrypt and store
|
||||
* @return {Promise<any>} Returns a promise that resolves when there is a result
|
||||
* @return {Promise<void>} Returns a promise that resolves when there is a result
|
||||
*/
|
||||
@Cordova()
|
||||
save(key: string, password: string, userAuthenticationRequired: boolean): Promise<any> {
|
||||
save(key: string, password: string, userAuthenticationRequired: boolean): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -58,30 +60,30 @@ export class KeychainTouchId extends IonicNativePlugin {
|
||||
* with the password stored in keychain or will resolve an error code, where -1 indicated not available.
|
||||
* @param key {string} the key you want to retrieve from keychain
|
||||
* @param message {string} a message to the user
|
||||
* @return {Promise<any>} Returns a promise that resolves when the key value is successfully retrieved or an error
|
||||
* @return {Promise<string>} Returns a promise that resolves when the key value is successfully retrieved or an error
|
||||
*/
|
||||
@Cordova()
|
||||
verify(key: string, message: string): Promise<any> {
|
||||
verify(key: string, message: string): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if there is a password stored within the keychain for the given key.
|
||||
* @param key {string} the key you want to check from keychain
|
||||
* @return {Promise<any>} Returns a promise that resolves with success if the key is available or failure if key is not.
|
||||
* @return {Promise<void>} Returns a promise that resolves with success if the key is available or failure if key is not.
|
||||
*/
|
||||
@Cordova()
|
||||
has(key: string): Promise<any> {
|
||||
has(key: string): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes the password stored under given key from the keychain.
|
||||
* @param key {string} the key you want to delete from keychain
|
||||
* @return {Promise<any>} Returns a promise that resolves with success if the key is deleted or failure if key is not
|
||||
* @return {Promise<void>} Returns a promise that resolves with success if the key is deleted or failure if key is not
|
||||
*/
|
||||
@Cordova()
|
||||
delete(key: string): Promise<any> {
|
||||
delete(key: string): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface PromptsOptions {
|
||||
/**
|
||||
@@ -168,10 +168,15 @@ export interface LaunchNavigatorOptions {
|
||||
launchModeAppleMaps?: string;
|
||||
|
||||
/**
|
||||
* If true, and input location type(s) doesn't match those required by the app, use geocoding to obtain the address/coords as required. Defaults to true.
|
||||
* (Windows only) If false, the plugin will NOT attempt to use the geolocation plugin to determine the current device position when the start location parameter is omitted. Defaults to true.
|
||||
*/
|
||||
enableGeolocation?: boolean;
|
||||
|
||||
/**
|
||||
* (Android and iOS only) If true, and input location type(s) doesn't match those required by the app, use geocoding to obtain the address/coords as required. Defaults to true.
|
||||
*/
|
||||
enableGeocoding?: boolean;
|
||||
|
||||
/**
|
||||
* options related to the default native actionsheet picker which enables user to select which navigation app to launch if `app` is not specified.
|
||||
*/
|
||||
@@ -297,6 +302,8 @@ export class LaunchNavigator extends IonicNativePlugin {
|
||||
BICYCLING: 'bicycling',
|
||||
TRANSIT: 'transit',
|
||||
};
|
||||
|
||||
@CordovaProperty()
|
||||
appSelection: AppSelection;
|
||||
|
||||
/**
|
||||
|
||||
54
src/@ionic-native/plugins/local-backup/index.ts
Normal file
54
src/@ionic-native/plugins/local-backup/index.ts
Normal file
@@ -0,0 +1,54 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,8 @@ export type Event =
|
||||
| 'installationUpdated'
|
||||
| 'userUpdated'
|
||||
| 'personalized'
|
||||
| 'depersonalized';
|
||||
| 'depersonalized'
|
||||
| 'deeplink';
|
||||
|
||||
export interface CustomEvent {
|
||||
definitionId: string;
|
||||
@@ -27,6 +28,7 @@ export interface Configuration {
|
||||
*/
|
||||
applicationCode: string;
|
||||
geofencingEnabled?: boolean;
|
||||
inAppChatEnabled?: boolean;
|
||||
/**
|
||||
* Message storage save callback
|
||||
*/
|
||||
@@ -74,11 +76,11 @@ export interface UserData {
|
||||
lastName?: string;
|
||||
middleName?: string;
|
||||
gender?: Gender;
|
||||
birthday?: Date;
|
||||
birthday?: string;
|
||||
phones?: string[];
|
||||
emails?: string[];
|
||||
tags?: string[];
|
||||
customAttributes?: Record<string, string | number | boolean>;
|
||||
customAttributes?: Record<string, string | number | boolean | any[]>;
|
||||
}
|
||||
|
||||
export interface Installation {
|
||||
@@ -108,7 +110,7 @@ export interface UserIdentity {
|
||||
|
||||
export interface PersonalizeContext {
|
||||
userIdentity: UserIdentity;
|
||||
userAttributes?: Record<string, string>;
|
||||
userAttributes?: Record<string, string | number | boolean | any[]>;
|
||||
forceDepersonalize?: boolean;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
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 = 0,
|
||||
ETHERNET,
|
||||
WIFI,
|
||||
CELL_2G,
|
||||
CELL_3G,
|
||||
CELL_4G,
|
||||
CELL,
|
||||
NONE,
|
||||
UNKNOWN = 'unknown',
|
||||
ETHERNET = 'ethernet',
|
||||
WIFI = 'wifi',
|
||||
CELL_2G = '2g',
|
||||
CELL_3G = '3g',
|
||||
CELL_4G = '4g',
|
||||
CELL = 'cellular',
|
||||
NONE = 'none',
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -95,11 +96,14 @@ export class Network extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Returns an observable to watch connection changes
|
||||
* @return {Observable<any>}
|
||||
* @return {Observable<'connected' | 'disconnected'>}
|
||||
*/
|
||||
@CordovaCheck()
|
||||
onChange(): Observable<any> {
|
||||
return merge(this.onConnect(), this.onDisconnect());
|
||||
onChange(): Observable<'connected' | 'disconnected'> {
|
||||
return merge(
|
||||
this.onConnect().pipe(mapTo('connected')),
|
||||
this.onDisconnect().pipe(mapTo('disconnected')) as Observable<'disconnected'>
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
95
src/@ionic-native/plugins/power-optimization/index.ts
Normal file
95
src/@ionic-native/plugins/power-optimization/index.ts
Normal file
@@ -0,0 +1,95 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
/**
|
||||
* @name Power Optimization
|
||||
* @description
|
||||
* Android Custom Roms made sometimes your apps unfunctional due to being killed in the background, notification messages do not appearing or your services being killed by agressive power saving mode.
|
||||
* The Power Optimization plugin give you android PowerManager methods with cordova.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { PowerOptimization } from '@ionic-native/power-optimization/ngx';
|
||||
*
|
||||
* constructor(private powerOptimization: PowerOptimization) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.powerOptimization.IsIgnoringBatteryOptimizations()
|
||||
* .then(onSuccess)
|
||||
* .catch(onError);
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'PowerOptimization',
|
||||
plugin: 'cordova-plugin-power-optimization',
|
||||
pluginRef: 'cordova.plugins.PowerOptimization',
|
||||
repo: 'https://github.com/snt1017/cordova-plugin-power-optimization',
|
||||
platforms: ['Android'],
|
||||
})
|
||||
@Injectable()
|
||||
export class PowerOptimization extends IonicNativePlugin {
|
||||
/**
|
||||
* Check if the battery optimization is ignoring
|
||||
* For more info, please check https://github.com/snt1017/cordova-plugin-power-optimization
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
IsIgnoringBatteryOptimizations(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Request permisson to ignore optimizations:
|
||||
* For more info, please check https://github.com/snt1017/cordova-plugin-power-optimization
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
RequestOptimizations(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Go to battery optimizations configurations menu:
|
||||
* For more info, please check https://github.com/snt1017/cordova-plugin-power-optimization
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
RequestOptimizationsMenu(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Check if have any data restrictions in background:
|
||||
* For more info, please check https://github.com/snt1017/cordova-plugin-power-optimization
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
IsIgnoringDataSaver(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Go to data restrictions in background configurations menu:
|
||||
* For more info, please check https://github.com/snt1017/cordova-plugin-power-optimization
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
RequestDataSaverMenu(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Check if have another battery restriction is present into phone (like huawei, xiaomi, etc):
|
||||
* For more info, please check https://github.com/snt1017/cordova-plugin-power-optimization
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
HaveProtectedAppsCheck(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Go to configurations menu if another battery restriction is present into phone (like huawei, xiaomi, etc). You can send true into params if you want to force show the menu (is only show the fist time without params):
|
||||
* For more info, please check https://github.com/snt1017/cordova-plugin-power-optimization
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
ProtectedAppCheck(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,17 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
export interface PreviewAnyFileOptions {
|
||||
/**
|
||||
* The name of the file to preview.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* The mime type of the file to preview.
|
||||
*/
|
||||
mimeType: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name PreviewAnyFile
|
||||
* @description
|
||||
@@ -22,7 +34,18 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.previewAnyFile.previewPath('http://www.domain.com/samplefile')
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
|
||||
@Plugin({
|
||||
pluginName: 'PreviewAnyFile',
|
||||
plugin: 'cordova-plugin-preview-any-file', // npm package name, example: cordova-plugin-camera
|
||||
@@ -43,4 +66,34 @@ export class PreviewAnyFile extends IonicNativePlugin {
|
||||
preview(url: string): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* previewPath function will return success callback if the file successfully opened, if the content is base64 you have to use previewBase64 method
|
||||
* @param base64 {String} base64 string content
|
||||
* @param options {PreviewAnyFileOptions} define the name of the file with extension or it's mimeType, if the correct extension not exist in the path
|
||||
*/
|
||||
@Cordova()
|
||||
previewBase64(base64: string, options?: PreviewAnyFileOptions): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* previewPath function will return success callback if the file successfully opened, if the content is base64 you have to use previewBase64 method
|
||||
* @param url {String} full absolute URL -> file://, content://, http://, https, ... etc, if extension not exist, you must define it in the opt param
|
||||
* @param options {PreviewAnyFileOptions} define the name of the file with extension or it's mimeType, if the correct extension not exist in the path
|
||||
*/
|
||||
@Cordova()
|
||||
previewPath(url: string, options?: PreviewAnyFileOptions): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* previewPath function will return success callback if the file successfully opened, if the content is base64 you have to use previewBase64 method
|
||||
* @param url {String} full absolute URL -> file://, content://, http://, https, ... etc, if extension not exist, you must define it in the opt param
|
||||
* @param options {PreviewAnyFileOptions} define the name of the file with extension or it's mimeType, if the correct extension not exist in the path
|
||||
*/
|
||||
@Cordova()
|
||||
previewAsset(url: string, options?: PreviewAnyFileOptions): Promise<string> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ export enum INTRO_ELIGIBILITY_STATUS {
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Purchases',
|
||||
plugin: 'cordova-plugin-purchases@1.3.2',
|
||||
plugin: 'cordova-plugin-purchases@2.1.1',
|
||||
pluginRef: 'Purchases', // the variable reference to call the plugin, example: navigator.geolocation
|
||||
repo: 'https://github.com/RevenueCat/cordova-plugin-purchases', // the github repository URL for the plugin
|
||||
platforms: ['Android', 'iOS'], // Array of platforms supported, example: ['Android', 'iOS']
|
||||
@@ -318,31 +318,6 @@ export class Purchases extends IonicNativePlugin {
|
||||
* @property {PurchaserInfo} purchaserInfo - The new PurchaserInfo after the successful purchase
|
||||
*/
|
||||
|
||||
/**
|
||||
* Make a purchase
|
||||
*
|
||||
* @deprecated Use purchaseProduct instead.
|
||||
*
|
||||
* @param {string} productIdentifier The product identifier of the product you want to purchase.
|
||||
* @param {string?} oldSKU Optional sku you wish to upgrade from.
|
||||
* @param {PURCHASE_TYPE} type Optional type of product, can be inapp or subs. Subs by default
|
||||
*
|
||||
* @return {Promise<MakePurchaseResponse>} A [PurchasesError] is triggered after an error or when the user cancels the purchase.
|
||||
* If user cancelled, userCancelled will be true
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
observable: true,
|
||||
})
|
||||
makePurchase(
|
||||
productIdentifier: string,
|
||||
oldSKU?: string | null,
|
||||
type: PURCHASE_TYPE = PURCHASE_TYPE.SUBS
|
||||
): Promise<{ productIdentifier: string; purchaserInfo: PurchaserInfo }> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a purchase
|
||||
*
|
||||
@@ -479,11 +454,27 @@ export class Purchases extends IonicNativePlugin {
|
||||
* This method will send all the purchases to the RevenueCat backend. Call this when using your own implementation
|
||||
* for subscriptions anytime a sync is needed, like after a successful purchase.
|
||||
*
|
||||
* @warning This function should only be called if you're not calling makePurchase.
|
||||
* @warning This function should only be called if you're not calling purchaseProduct.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
syncPurchases(): void {}
|
||||
|
||||
/**
|
||||
* iOS only. Presents a code redemption sheet, useful for redeeming offer codes
|
||||
* Refer to https://docs.revenuecat.com/docs/ios-subscription-offers#offer-codes for more information on how
|
||||
* to configure and use offer codes.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
presentCodeRedemptionSheet(): void {}
|
||||
|
||||
/**
|
||||
* iOS only.
|
||||
* @param {Boolean} enabled Set this property to true *only* when testing the ask-to-buy / SCA purchases flow.
|
||||
* More information: http://errors.rev.cat/ask-to-buy
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setSimulatesAskToBuyInSandbox(enabled: boolean): void {}
|
||||
|
||||
/**
|
||||
* Enable automatic collection of Apple Search Ads attribution. Disabled by default.
|
||||
* @param {Boolean} enabled Enable or not automatic collection
|
||||
|
||||
49
src/@ionic-native/plugins/restart/index.ts
Normal file
49
src/@ionic-native/plugins/restart/index.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
144
src/@ionic-native/plugins/shortcuts-android/index.ts
Normal file
144
src/@ionic-native/plugins/shortcuts-android/index.ts
Normal file
@@ -0,0 +1,144 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
export interface Intent {
|
||||
// Defaults to currently running activity
|
||||
activityClass?: string;
|
||||
|
||||
// Defaults to currently running package
|
||||
activityPackage?: string;
|
||||
|
||||
// Defaults to ACTION_VIEW
|
||||
action?: string;
|
||||
|
||||
// Defaults to FLAG_ACTIVITY_NEW_TASK + FLAG_ACTIVITY_CLEAR_TOP
|
||||
flags?: number;
|
||||
|
||||
categories?: string[];
|
||||
|
||||
data?: string;
|
||||
|
||||
extras?: { [key: string]: any };
|
||||
}
|
||||
|
||||
export interface Shortcut {
|
||||
id: string;
|
||||
shortLabel?: string;
|
||||
longLabel?: string;
|
||||
iconFromResource?: string;
|
||||
iconBitmap?: string;
|
||||
intent?: Intent;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name ShortcutsAndroid
|
||||
* @description
|
||||
* Use this plugin to create shortcuts in Android. Use this plugin to handle Intents on your application.
|
||||
* For more information on Android App Shortcuts: https://developer.android.com/guide/topics/ui/shortcuts.html
|
||||
* For more information on Android Intents: https://developer.android.com/guide/components/intents-filters.html
|
||||
*
|
||||
* The work that went into creating this plug-in was inspired by the existing plugins: cordova-plugin-shortcut and cordova-plugin-webintent2.
|
||||
*
|
||||
* @usage
|
||||
* Please do refer to the original plugin's repo for detailed usage. The usage example here might not be sufficient.
|
||||
*
|
||||
* ```typescript
|
||||
* import { ShortcutsAndroid } from '@ionic-native/shortcuts-android/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private shortcutsAndroid: ShortcutsAndroid) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.shortcutsAndroid.supportsDynamic()
|
||||
* .then((supported: boolean) => console.log(`Dynamic shortcuts are ${supported ? '' : 'not'} supported`))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Shortcuts',
|
||||
plugin: 'cordova-plugin-shortcuts-android',
|
||||
pluginRef: 'plugins.Shortcuts',
|
||||
repo: 'https://github.com/avargaskun/cordova-plugin-shortcuts-android',
|
||||
platforms: ['Android'],
|
||||
})
|
||||
@Injectable()
|
||||
export class Shortcuts extends IonicNativePlugin {
|
||||
/**
|
||||
* Checking if Dynamic Shortcuts are supported
|
||||
*
|
||||
* Dynamic shortcuts require SDK 25 or later. Use supportsDynamic to check whether the current device meets those requirements.
|
||||
* @return {Promise<boolean>} returns a promise that resolves with a boolean that indicates if dynamic shortcuts are supported
|
||||
*/
|
||||
@Cordova()
|
||||
supportsDynamic(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checking if Pinned Shortcuts are supported
|
||||
*
|
||||
* Pinned shortcuts require SDK 26 or later. Use supportsPinned to check whether the current device meets those requirements.
|
||||
* @return {Promise<boolean>} returns a promise that resolves with a boolean that indicates if pinned shortcuts are supported
|
||||
*/
|
||||
@Cordova()
|
||||
supportsPinned(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setting the application Dynamic Shortcuts
|
||||
*
|
||||
* Use `setDynamic` to set the Dynamic Shortcuts for the application, all at once. The shortcuts provided as a parameter will override any existing shortcut. Use an empty array to clear out existing shortcuts.
|
||||
* @param {Shortcut[]} [shortcut] Array of shortcuts to add.
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
})
|
||||
setDynamic(shortcuts: Shortcut[]): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adding a Pinned Shortcut to the launcher
|
||||
*
|
||||
* Use `addPinned` to add a new Pinned Shortcut to the launcher.
|
||||
* @param {Shortcut[]} [shortcut] Array of shortcuts to add.
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
})
|
||||
addPinned(shortcut: Shortcut): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Querying current Intent
|
||||
*
|
||||
* Use `getIntent` to get the Intent that was used to launch the current instance of the Cordova activity.
|
||||
* @return {Promise<Intent>} returns the Intent that was used to launch the current instance of the Cordova activity
|
||||
*/
|
||||
@Cordova()
|
||||
getIntent(): Promise<Intent> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Subscribe to new Intents
|
||||
*
|
||||
* Use onNewIntent to trigger your code every time a new Intent is sent to your Cordova activity. Note that in some conditions this subscription may not be executed.
|
||||
* @return {Observable<Intent>} emits the new Intent each time a shortcut is activated
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
})
|
||||
onNewIntent(): Observable<Intent> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -282,7 +282,7 @@ 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
|
||||
@@ -296,7 +296,12 @@ export class SocialSharing extends IonicNativePlugin {
|
||||
errorIndex: 6,
|
||||
platforms: ['iOS', 'Android'],
|
||||
})
|
||||
shareViaWhatsAppToPhone(phone: string, message: string, fileOrFileArray: string | string[], url?: string): Promise<any> {
|
||||
shareViaWhatsAppToPhone(
|
||||
phone: string,
|
||||
message: string,
|
||||
fileOrFileArray: string | string[],
|
||||
url?: string
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,10 @@ export interface SQLiteDatabaseConfig {
|
||||
* iOS Database Location. Example: 'Library'
|
||||
*/
|
||||
iosDatabaseLocation?: string;
|
||||
/**
|
||||
* support arbitrary database location on android with https://github.com/litehelpers/cordova-sqlite-evcore-extbuild-free
|
||||
*/
|
||||
androidDatabaseLocation?: string;
|
||||
/**
|
||||
* support opening pre-filled databases with https://github.com/litehelpers/cordova-sqlite-ext
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
89
src/@ionic-native/plugins/text-to-speech-advanced/index.ts
Normal file
89
src/@ionic-native/plugins/text-to-speech-advanced/index.ts
Normal file
@@ -0,0 +1,89 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface TTSOptions {
|
||||
/** text to speak */
|
||||
text: string;
|
||||
/** cancel, boolean: true/false */
|
||||
identifier: string;
|
||||
/** voice identifier (iOS / Android) from getVoices */
|
||||
locale?: string;
|
||||
/** speed rate, 0 ~ 1 */
|
||||
rate?: number;
|
||||
/** pitch, 0 ~ 1 */
|
||||
pitch?: number;
|
||||
/** cancel, boolean: true/false */
|
||||
cancel?: boolean;
|
||||
}
|
||||
|
||||
export interface TTSVoice {
|
||||
/** Voice name */
|
||||
name: string;
|
||||
/** Voice language */
|
||||
language: string;
|
||||
/** Voice identifier string */
|
||||
identifier: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Text To Speech Advanced
|
||||
* @description
|
||||
* Text to Speech plugin
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { TextToSpeechAdvanced } from '@ionic-native/text-to-speech-advanced/ngx';
|
||||
*
|
||||
* constructor(private tts: TextToSpeechAdvanced) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.tts.speak('Hello World')
|
||||
* .then(() => console.log('Success'))
|
||||
* .catch((reason: any) => console.log(reason));
|
||||
*
|
||||
* ```
|
||||
* @interfaces
|
||||
* TTSOptions
|
||||
* TTSVoice
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Text To Speech Advanced',
|
||||
plugin: 'cordova-plugin-tts-advanced',
|
||||
pluginRef: 'TTS',
|
||||
repo: 'https://github.com/spasma/cordova-plugin-tts-advanced',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class TextToSpeechAdvanced extends IonicNativePlugin {
|
||||
/**
|
||||
* This function speaks
|
||||
* @param textOrOptions {string | TTSOptions} Text to speak or TTSOptions
|
||||
* @return {Promise<any>} Returns a promise that resolves when the speaking finishes
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
})
|
||||
speak(textOrOptions: string | TTSOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop any current TTS playback
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
stop(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all voices
|
||||
* @return {Promise<TTSVoice[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
getVoices(): Promise<TTSVoice[]> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -138,9 +138,9 @@ export enum RequestType {
|
||||
*/
|
||||
RQST = 'RQST',
|
||||
/**
|
||||
* Set this type if the data exchange with UMP is 1:N pr 0:N. Sending a datastructure is optional and is dependent on the process agent function.
|
||||
* If the process agent function is marked with metadata delete flag, then server data replaces the data in database.
|
||||
* If the process agent function is NOT marked with metadata delete flag, then this request type behaves the same as QUERY
|
||||
* Set this type if the data exchange with UMP is 1:N pr 0:N. Sending a datastructure is optional and is dependent on the Process Agent function.
|
||||
* If the Process Agent function is marked with metadata delete flag, then server data replaces the data in database.
|
||||
* If the Process Agent function is NOT marked with metadata delete flag, then this request type behaves the same as QUERY
|
||||
*/
|
||||
PULL = 'PULL',
|
||||
/**
|
||||
@@ -148,7 +148,7 @@ export enum RequestType {
|
||||
*/
|
||||
PUSH = 'PUSH',
|
||||
/**
|
||||
* Set this type if the data exchange with UMP is 1:N pr 0:N. Sending a datastructure is optional and is dependent on the process agent function.
|
||||
* Set this type if the data exchange with UMP is 1:N pr 0:N. Sending a datastructure is optional and is dependent on the Process Agent function.
|
||||
* Unlike PULL, this request type updates the data in database without deleting existing entries.
|
||||
*/
|
||||
QUERY = 'QUERY',
|
||||
@@ -203,6 +203,10 @@ export enum NotificationListenerType {
|
||||
* Notify attachment downloads completed
|
||||
*/
|
||||
attachmentDownloadCompleted = 10,
|
||||
/**
|
||||
* Notify when the sent item count changes.
|
||||
*/
|
||||
SentItemChanged = 11,
|
||||
}
|
||||
|
||||
export enum AttachmentItemStatus {
|
||||
@@ -225,7 +229,7 @@ export class Settings {
|
||||
ADS_USER_ID: string;
|
||||
SAP_USER_ID: string;
|
||||
FULL_NAME: string;
|
||||
URL: string;
|
||||
SERVER_URL: string;
|
||||
USER_ID: string;
|
||||
}
|
||||
|
||||
@@ -310,7 +314,7 @@ export class LoginParameters {
|
||||
password: string;
|
||||
|
||||
/**
|
||||
* UMP URL. For example: http://192.168.98.160:8080/UMP
|
||||
* UMP URL. For example: https://umpdev.unvired.io/UMP
|
||||
*/
|
||||
url: string;
|
||||
|
||||
@@ -384,12 +388,19 @@ export class LoginParameters {
|
||||
* Set this value to true to persist web application database. By default, this value is false.
|
||||
*/
|
||||
persistWebDb: boolean;
|
||||
|
||||
/*
|
||||
* Optional jwt token parameter. Please check with your Unvired Admin for this value.
|
||||
* For Example:
|
||||
* loginParameters.jwtOptions = {"app": "myapp"};
|
||||
*/
|
||||
jwtOptions: object;
|
||||
|
||||
/**
|
||||
* Language code to be sent to UMP. Specify a two-letter language code.
|
||||
* The default value of this is 'en'.
|
||||
*/
|
||||
loginLanguage: string;
|
||||
}
|
||||
export class LoginResult extends UnviredResult {
|
||||
type: LoginListenerType;
|
||||
@@ -410,10 +421,19 @@ export class AuthenticateLocalResult extends UnviredResult {
|
||||
* -
|
||||
* iOS Requirements
|
||||
* -
|
||||
* This plugin uses Cocoapods to install dependent libraries. Please make sure you have a valid Cocoapods installation.
|
||||
* Once you have it ready, do update the cocoapods repo by running the following command before you install this plugin.
|
||||
* Update your Cocoapods repo before you install the plugin.
|
||||
* ```
|
||||
* pod repo update
|
||||
* $ pod repo update
|
||||
* ```
|
||||
* -
|
||||
* Browser Requirements
|
||||
* -
|
||||
* After you install the plugin, for Ionic/Angular projects, please add a reference to the following JS files within <head></head> section of index.html.
|
||||
* ```
|
||||
* <script src="assets/js/sql.js"></script>
|
||||
* <script src="assets/js/kernel.js"></script>
|
||||
* <script src="assets/js/winstore-jscompat.js"></script>
|
||||
* <script src="assets/js/jquery-3.2.1.js"></script>
|
||||
* ```
|
||||
* @usage
|
||||
* ```typescript
|
||||
@@ -496,11 +516,26 @@ export class AuthenticateLocalResult extends UnviredResult {
|
||||
*
|
||||
*
|
||||
* // Synchronization APIs
|
||||
* // Make sync call.
|
||||
* let result = await this.unviredSDK.syncForeground(RequestType.QUERY, null, {"CUSTOMER_HEADER": {"field1" : "value1", "field2" : "value2"}}, 'UNVIRED_DIGITAL_FORMS_PA_MOBILE_GET_USERS', true)
|
||||
* // Example 1: Make a Sync RQST call
|
||||
* ```
|
||||
* await this.unviredSDK.syncForeground(RequestType.RQST, {"CUSTOMER_HEADER": {"CUST_NO" : "007", "CUST_NAME" : "James Bond"}}, '', 'PA_GET_CUSTOMER_DETAILS', true)
|
||||
* ```
|
||||
*
|
||||
* // Example 2: Make a Sync QUERY / PULL call
|
||||
* ```
|
||||
* await this.unviredSDK.syncForeground(RequestType.QUERY, '', {"CUSTOMER_SEARCH_CONTEXT":[{"CUSTOMER_SEARCH_HEADER":{"CUST_NO":"007"}}]}, 'PA_SEARCH_CUSTOMER', true)
|
||||
* ```
|
||||
*
|
||||
* Example 3: Make a Async RQST call
|
||||
* ```
|
||||
* await this.unviredSDK.syncBackground(RequestType.RQST, {"CUSTOMER_HEADER": {"CUST_NO" : "007", "CUST_NAME" : "James Bond"}}, '', 'PA_GET_CUSTOMER_DETAILS', 'CUSTOMER', beLID, false)
|
||||
* ```
|
||||
*
|
||||
* Example 4: Make a Async QUERY / PULL call
|
||||
* ```
|
||||
* await this.unviredSDK.syncBackground(RequestType.QUERY, '', {"CUSTOMER_SEARCH_CONTEXT":[{"CUSTOMER_SEARCH_HEADER":{"CUST_NO":"007"}}]}, 'PA_SEARCH_CUSTOMER', '', '', true)
|
||||
* ```
|
||||
*
|
||||
* // Make async call.
|
||||
* let result = await this.unviredSDK.syncBackground(RequestType.QUERY, null, inputObj, 'UNVIRED_DIGITAL_FORMS_PA_MOBILE_GET_USERS', 'INPUT_GET_USERS', 'GUID', false)
|
||||
* // Note: Subscribe to NotificationListener to get updates on data processing in background
|
||||
* // However, only one screen can listen to background data updates at any point of time.
|
||||
* this.unviredSDK.registerNotifListener().subscribe( data => {
|
||||
@@ -522,20 +557,20 @@ export class AuthenticateLocalResult extends UnviredResult {
|
||||
*
|
||||
* // Database APIs
|
||||
* // Insert a record onto database
|
||||
* this.unviredsdk.dbInsert("CUSTOMER_HEADER", {"NAME":"USER","NO":"0039"}, true);
|
||||
* this.unviredsdk.dbInsert("CUSTOMER_HEADER", {"NAME":"James Bond","CUST_NO":"007"}, true);
|
||||
*
|
||||
* // Update a record in database
|
||||
* this.unviredSDK.dbUpdate('CUSTOMER_HEADER', {"NAME":"UPDATED_USER","NO":"UPDATED_NO"}, "FORM_ID = '5caed815892215034dacad56'")
|
||||
* this.unviredSDK.dbUpdate('CUSTOMER_HEADER', {"NAME":"John Doe","CUST_NO":"008"}, "CUST_NO = '007'")
|
||||
*
|
||||
* // Delete a record in database
|
||||
* this.unviredSDK.dbDelete('CUSTOMER_HEADER', "FORM_ID = '5caed815892215034dacad56'")
|
||||
* this.unviredSDK.dbDelete('CUSTOMER_HEADER', "CUST_NO = '007'")
|
||||
*
|
||||
* // Execute a SQL Query
|
||||
* this.unviredSDK.dbExecuteStatement('SELECT * FROM CUSTOMER_HEADER WHERE CUSTOMER_ID = "0039"')
|
||||
* this.unviredSDK.dbExecuteStatement('SELECT * FROM CUSTOMER_HEADER WHERE CUSTOMER_ID = "007"')
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'UnviredCordovaSDK',
|
||||
plugin: 'https://github.com/unvired/cordova-plugin-unvired-sdk', // npm package name, example: cordova-plugin-camera
|
||||
plugin: 'cordova-plugin-unvired-sdk', // npm package name, example: cordova-plugin-camera
|
||||
pluginRef: 'ump', // the variable reference to call the plugin, example: navigator.geolocation
|
||||
repo: 'https://github.com/unvired/cordova-plugin-unvired-sdk/', // the github repository URL for the plugin
|
||||
install: 'ionic cordova plugin add @ionic-native/unvired-cordova-sdk', // OPTIONAL install command, in case the plugin requires variables
|
||||
@@ -774,6 +809,21 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Get User settings.
|
||||
* Returns User setting in the following format:
|
||||
* ```
|
||||
* {
|
||||
* "UNVIRED_ID": "", // The Unvired ID configured in UMP
|
||||
* "USER_ID": "", // Deprecated. Select among UNVIRED_ID / EMAIL / ADS_USER_ID / SAP_USER_ID depending on the LoginType
|
||||
* "FULL_NAME": "FirstName LastName",
|
||||
* "EMAIL": "abc@example.com", // Email id of the user as configurd in UMP
|
||||
* "SERVER_URL": "https://umpdev.unvired.io/UMP", // UMP Server's URL
|
||||
* "SAP_USER_ID": "SAP_ID", // If LoginType is SAP
|
||||
* "SAP_PORT_NAME": "", // If LoginType is SAP
|
||||
* "LOGIN_TYPE": "", // @see LoginType
|
||||
* "ADS_USER_ID": "ADS_USER_ID", // If LoginType is ADS
|
||||
* "ADS_DOMAIN": "ADS_DOMAIN" // If LoginType is ADS
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
@Cordova()
|
||||
userSettings(): Promise<SettingsResult> {
|
||||
@@ -1057,14 +1107,14 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
|
||||
* attachmentObject.LID = guid(); // Random id
|
||||
* attachmentObject.FID = lid // LID of the header.
|
||||
* attachmentObject.UID = guid(); // Random id
|
||||
* attachmentObject.EXTERNAL_URL = ""; // Optional: Check with your Unvired Process agent developer.
|
||||
* attachmentObject.EXTERNAL_URL = ""; // Optional: Check with your Unvired Process Agent developer.
|
||||
* attachmentObject.FILE_NAME = 'myfile.jpg'; // Name of the file as stored in the device.
|
||||
* attachmentObject.LOCAL_PATH = /<folder_location>/myfile.jpg // File path. Please make sure that the path starts with a '/'
|
||||
* attachmentObject.TAG1 = '' // Optional: Check with your Unvired Process agent developer.
|
||||
* attachmentObject.TAG2 = '' // Optional: Check with your Unvired Process agent developer.
|
||||
* attachmentObject.TAG2 = '' // Optional: Check with your Unvired Process agent developer.
|
||||
* attachmentObject.TAG4 = '' // Optional: Check with your Unvired Process agent developer.
|
||||
* attachmentObject.TAG5 = '' // Optional: Check with your Unvired Process agent developer.
|
||||
* attachmentObject.TAG1 = '' // Optional: Check with your Unvired Process Agent developer.
|
||||
* attachmentObject.TAG2 = '' // Optional: Check with your Unvired Process Agent developer.
|
||||
* attachmentObject.TAG2 = '' // Optional: Check with your Unvired Process Agent developer.
|
||||
* attachmentObject.TAG4 = '' // Optional: Check with your Unvired Process Agent developer.
|
||||
* attachmentObject.TAG5 = '' // Optional: Check with your Unvired Process Agent developer.
|
||||
* await this.unviredCordovaSDK.createAttachmentItem('INSPECTION_ATTACHMENT', attachmentObject)
|
||||
* ```
|
||||
*/
|
||||
@@ -1095,24 +1145,50 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends data to UMP in SYNC mode. This means user has to wait until the duration of SYNC call. Only one SYNC call can be active at any point of time. Once the call completes, the result data would be available in the Promise.
|
||||
* Apps typically block UI during a SYNC call so that there are user-actions when the SYNC call is active.
|
||||
* Sends data to UMP in Sync mode. This means user has to wait until the duration of SYNC call. Only one SYNC call can be active at any point of time. Once the call completes, the result would be available in the Promise.
|
||||
* Apps typically block UI during a SYNC call so that there are no user-actions possible until the call completes.
|
||||
*
|
||||
* Example 1: Make a RQST call
|
||||
* ```
|
||||
* await this.unviredSDK.syncForeground(RequestType.RQST, {"CUSTOMER_HEADER": {"CUST_NO" : "007", "CUST_NAME" : "James Bond"}}, '', 'PA_GET_CUSTOMER_DETAILS', true)
|
||||
* ```
|
||||
*
|
||||
* Example 2: Make a QUERY / PULL call
|
||||
* ```
|
||||
* await this.unviredSDK.syncForeground(RequestType.QUERY, '', {"CUSTOMER_SEARCH_CONTEXT":[{"CUSTOMER_SEARCH_HEADER":{"CUST_NO":"007"}}]}, 'PA_SEARCH_CUSTOMER', true)
|
||||
* ```
|
||||
*
|
||||
* @param reqype RequestType for the message. Please check RequestType to select the right request type.
|
||||
* @param header {Object} Header datastructure to be sent to UMP. Header datastructure is mandatory of the request type is RQST.
|
||||
* For PA functions which do not accept any input, set an empty string for this parameter.
|
||||
* Example: If Header datastructure needs to be sent, make sure the header datastructure is in the following format:
|
||||
* ```
|
||||
* {"CUSTOMER_HEADER": {"field1" : "value1", "field2" : "value2"}}
|
||||
* ```
|
||||
* @param customData {Object} This depends on the PA function. This is useful if you want to send custom data to a PA function.
|
||||
* Example: You can also use this parameter to send header datastrucrture provided the data structure is formatted like this.
|
||||
* ```
|
||||
* @param header {Object} Send a value for this parameter only if RequestType is RQST. For others, send an empty string. This parameter represents the header datastructure of the Business Entity which needs to be sent as input to a Process Agent function.
|
||||
* Before you make this call, ensure that the object statuses are updated for header and child tables.
|
||||
* Framework builds the input by considering only those child entities whose object status is one among ADD, MODIFY or DELETE.
|
||||
* Example:
|
||||
* ```json
|
||||
* {
|
||||
* "CATEGORY_BE": [{
|
||||
* "CATEGORY_HEADER": {"field1" : "value1", "field2" : "value2"}
|
||||
* }]
|
||||
* "NAME_OF_HEADER": {
|
||||
* "FIELD1": "FIELD_1_VALUE",
|
||||
* "FIELD2": "FIELD_2_VALUE"
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @param customData {Object} Send a value for this parameter only if |reqType| is QUERY or PULL. For others, send an empty string.
|
||||
* This parameter represents the actual input which need to be sent to the server. Usually this is an input entity, but check with your Process Agent developer on the type of input.
|
||||
*
|
||||
* Example:
|
||||
* ```json
|
||||
* {
|
||||
* "BE_NAME": [
|
||||
* {
|
||||
* "NAME_OF_HEADER": {
|
||||
* "FIELD1": "FIELD_1_VALUE",
|
||||
* "FIELD2": "FIELD_2_VALUE"
|
||||
* }
|
||||
* }
|
||||
* ]
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @param paFunction Name of the Process Agent function to be executed. Example: PA_MOBILE_EXECUTE_SALES_ORDER.
|
||||
* @param autoSave This defines whether to save the response to database.
|
||||
*/
|
||||
@@ -1128,28 +1204,63 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends data to UMP in ASYNC mode. This means user can make this call and continue with other program execution.
|
||||
* Make an async call to UMP.
|
||||
* The result of the call would be notified through the observable returned for the function registerNotifListener().
|
||||
*
|
||||
* Pre-requisites:
|
||||
* 1. Object status is updated for header and items which need to be synced with the server.
|
||||
* 2. Updated header and items are saved in database.
|
||||
* 3. The LID of the header. This value needs to be passed for the parameter `belid`.
|
||||
*
|
||||
* Example 1: Make a RQST call
|
||||
* ```
|
||||
* let customerHeader = new CUSTOMER_HEADER()
|
||||
* customerHeader.LID = // TODO
|
||||
* customerHeader.CUST_NO = '007'
|
||||
* customerHeader.CUST_NAME = 'James Bond'
|
||||
*
|
||||
* await this.unviredSDK.syncBackground(RequestType.RQST, {"CUSTOMER_HEADER": customerHeader}, '', 'PA_GET_CUSTOMER_DETAILS', 'CUSTOMER', customerHeader.LID, false)
|
||||
* ```
|
||||
* Example 2: Make a QUERY / PULL call
|
||||
* ```
|
||||
* await this.unviredSDK.syncBackground(RequestType.QUERY, '', {"CUSTOMER_SEARCH_CONTEXT":[{"CUSTOMER_SEARCH_HEADER":{"CUST_NO":"007"}}]}, 'PA_SEARCH_CUSTOMER', '', '', true)
|
||||
* ```
|
||||
*
|
||||
* @param reqype RequestType for the message. Please check RequestType to select the right request type.
|
||||
* @param header {Object} Header datastructure to be sent to UMP. Header datastructure is mandatory of the request type is RQST.
|
||||
* For PA functions which do not accept any input, set an empty string for this parameter.
|
||||
* Example: If Header datastructure needs to be sent, make sure the header datastructure is in the following format:
|
||||
* ```
|
||||
* {"CUSTOMER_HEADER": {"field1" : "value1", "field2" : "value2"}}
|
||||
* ```
|
||||
* @param customData {Object} This depends on the PA function. This is useful if you want to send custom data to a PA function.
|
||||
* Example: You can also use this parameter to send header datastrucrture provided the data structure is formatted like this.
|
||||
* ```
|
||||
* @param header {Object} Send a value for this parameter only if RequestType is RQST. For others, send an empty string. This parameter represents the header datastructure of the Business Entity which needs to be sent as input to a Process Agent function.
|
||||
* Before you make this call, ensure that the object statuses are updated for header and child tables.
|
||||
* Framework builds the input by considering only those child entities whose object status is one among ADD, MODIFY or DELETE.
|
||||
* Example:
|
||||
* ```json
|
||||
* {
|
||||
* "CATEGORY_BE": [{
|
||||
* "CATEGORY_HEADER": {"field1" : "value1", "field2" : "value2"}
|
||||
* }]
|
||||
* "NAME_OF_HEADER": {
|
||||
* "FIELD1": "FIELD_1_VALUE",
|
||||
* "FIELD2": "FIELD_2_VALUE"
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @param customData {Object} Send a value for this parameter only if |reqType| is QUERY or PULL. For others, send an empty string.
|
||||
* This parameter represents the actual input which need to be sent to the server. Usually this is an input entity, but check with your Process Agent developer on the type of input.
|
||||
*
|
||||
* Example:
|
||||
* ```json
|
||||
* {
|
||||
* "BE_NAME": [
|
||||
* {
|
||||
* "NAME_OF_HEADER": {
|
||||
* "FIELD1": "FIELD_1_VALUE",
|
||||
* "FIELD2": "FIELD_2_VALUE"
|
||||
* }
|
||||
* }
|
||||
* ]
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @param paFunction Name of the Process Agent function to be executed. Example: PA_MOBILE_EXECUTE_SALES_ORDER.
|
||||
* @param beName Name of the Business Entity
|
||||
* @param belid LID of the Header datastructure
|
||||
* @param bypassAttachment Set this flag to false if you want to upload attachments first and then make the server call.
|
||||
* @param beName Name of the Business Entity. Required for the RequestType RQST only. For others, send empty string.
|
||||
* @param belid LID of the Header datastructure. Required for the RequestType RQST only. For others, send empty string.
|
||||
* @param bypassAttachment a true value would upload the data to the server followed by attachments. A false value would do the reverse.
|
||||
*/
|
||||
@Cordova()
|
||||
syncBackground(
|
||||
@@ -1233,7 +1344,7 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Subscribe to this observable to listen for life-cyle events in the case of an async message.
|
||||
* Only one class can subscribe to notifications are any point of time.
|
||||
* Only one class can subscribe to notifications at any point of time.
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
@@ -1372,4 +1483,34 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export interface InboxMessage {
|
||||
export class Vibes extends IonicNativePlugin {
|
||||
/**
|
||||
* Register this device with the Vibes platform
|
||||
*
|
||||
*
|
||||
* @return {Promise<DeviceResponse>}
|
||||
*/
|
||||
@Cordova()
|
||||
@@ -85,7 +85,7 @@ export class Vibes extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Unregister this device with the Vibes platform
|
||||
*
|
||||
*
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
@@ -95,7 +95,7 @@ export class Vibes extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Associate an external ID with the current person.
|
||||
*
|
||||
*
|
||||
* @param {string} externalPersonId
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
@@ -106,7 +106,7 @@ export class Vibes extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Register this device to receive push notifications
|
||||
*
|
||||
*
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
@@ -116,7 +116,7 @@ export class Vibes extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Unregister the device from receiving push notifications
|
||||
*
|
||||
*
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
@@ -125,7 +125,7 @@ export class Vibes extends IonicNativePlugin {
|
||||
}
|
||||
/**
|
||||
* Fetches a DeviceInfoResponse with details about the Vibes Device ID and Push Token
|
||||
*
|
||||
*
|
||||
* @return {Promise<DeviceInfoResponse>}
|
||||
*/
|
||||
@Cordova()
|
||||
@@ -135,7 +135,7 @@ export class Vibes extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Fetches the PersonResponse associated with this device currently
|
||||
*
|
||||
*
|
||||
* @return {Promise<PersonResponse>}
|
||||
*/
|
||||
@Cordova()
|
||||
@@ -145,7 +145,7 @@ export class Vibes extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Get notified when the user opens a notification
|
||||
*
|
||||
*
|
||||
* @return {Observable<void>}
|
||||
*/
|
||||
@Cordova({
|
||||
@@ -157,7 +157,7 @@ export class Vibes extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Fetches an array of inbox messages for the person associated with this device.
|
||||
*
|
||||
*
|
||||
* @return {Promise<InboxMessage[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
@@ -167,7 +167,7 @@ export class Vibes extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Fetches a single inbox message by it's id.
|
||||
*
|
||||
*
|
||||
* @param {string} message_uid
|
||||
* @return {Promise<InboxMessage>}
|
||||
*/
|
||||
@@ -178,7 +178,7 @@ export class Vibes extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* 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
|
||||
@@ -190,7 +190,7 @@ export class Vibes extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Marks an inbox message as read.
|
||||
*
|
||||
*
|
||||
* @param {string} message_uid
|
||||
* @return {Promise<InboxMessage>} an updated version of the InboxMessage with read field updated
|
||||
*/
|
||||
@@ -201,7 +201,7 @@ export class Vibes extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Records an event for when the user opens an inbox message.
|
||||
*
|
||||
*
|
||||
* @param inbox_message_stringified stringified version of the InboxMessage
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
|
||||
@@ -239,17 +239,6 @@ export class WonderPush extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the SDK is ready to operate.
|
||||
*
|
||||
* The SDK is ready when it is initialized and has fetched an access token.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
isReady(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Controls native SDK logging.
|
||||
* @param {boolean} enabled - Whether to enable logs.
|
||||
|
||||
Reference in New Issue
Block a user