mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-02-16 00:00:02 +08:00
Compare commits
57 Commits
refactor/r
...
v5.30.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6b468662b6 | ||
|
|
a209c61547 | ||
|
|
07d7ace97d | ||
|
|
13f6da69ef | ||
|
|
bb1064225d | ||
|
|
78e92422ab | ||
|
|
46853b4212 | ||
|
|
f71b65d6a7 | ||
|
|
e486cfd9bf | ||
|
|
7897f28d26 | ||
|
|
0f197ad9fc | ||
|
|
d7c6f8628d | ||
|
|
af114f48e4 | ||
|
|
fd0cddc9d0 | ||
|
|
b3d5baa46e | ||
|
|
68d245ef2c | ||
|
|
4dda714761 | ||
|
|
ba39f7e9f2 | ||
|
|
52da729b8c | ||
|
|
46e0d6d396 | ||
|
|
5fc4ceada4 | ||
|
|
f04f1f479f | ||
|
|
da72795081 | ||
|
|
f3ce3c4930 | ||
|
|
5a77eabf76 | ||
|
|
99e6a5398f | ||
|
|
14ec32b83c | ||
|
|
7b0195bdf4 | ||
|
|
1f48c31a8e | ||
|
|
c62c137723 | ||
|
|
3340e9a694 | ||
|
|
4766ec7a35 | ||
|
|
a37ea81488 | ||
|
|
b5f7f952df | ||
|
|
5d1b5d5fda | ||
|
|
b2e82bea62 | ||
|
|
d2a6b13059 | ||
|
|
ce9db34e24 | ||
|
|
36ae7dcad9 | ||
|
|
adca021f39 | ||
|
|
308e0f3f33 | ||
|
|
8ce71132b0 | ||
|
|
f6bf48d9b2 | ||
|
|
579170a99e | ||
|
|
b0ffb0ec4a | ||
|
|
eec3fec7ff | ||
|
|
a010bb1869 | ||
|
|
26d10ef633 | ||
|
|
d7ccd454fb | ||
|
|
fab667f22c | ||
|
|
ccca644134 | ||
|
|
b4462d5e6c | ||
|
|
5aa5757795 | ||
|
|
85eaf92e58 | ||
|
|
1ffad79320 | ||
|
|
44f86f3ce5 | ||
|
|
25bf7437b5 |
2
.github/workflows/nodejs.yml
vendored
2
.github/workflows/nodejs.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x]
|
||||
node-version: [14.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
4
.github/workflows/npmpublish.yml
vendored
4
.github/workflows/npmpublish.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12
|
||||
node-version: 14
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Lint
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12
|
||||
node-version: 14
|
||||
registry-url: https://registry.npmjs.org/
|
||||
- run: npm ci
|
||||
- run: npm run shipit
|
||||
|
||||
73
CHANGELOG.md
73
CHANGELOG.md
@@ -1,3 +1,76 @@
|
||||
# [5.30.0](https://github.com/ionic-team/ionic-native/compare/v5.29.0...v5.30.0) (2020-11-20)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **clevertap:** remove duplicated methods ([ba39f7e](https://github.com/ionic-team/ionic-native/commit/ba39f7e9f217ebe72e78bcfeae3d7e9ac07187ae)), closes [#3517](https://github.com/ionic-team/ionic-native/issues/3517) [#3491](https://github.com/ionic-team/ionic-native/issues/3491)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **AllInOneSDK:** add check to restrict app invocation ([#3570](https://github.com/ionic-team/ionic-native/issues/3570)) ([fd0cddc](https://github.com/ionic-team/ionic-native/commit/fd0cddc9d0abdc3006e6cf16c1f80d0551b71cd2))
|
||||
* **AppsFlyer:** update to 6.x.x ([#3563](https://github.com/ionic-team/ionic-native/issues/3563)) ([e486cfd](https://github.com/ionic-team/ionic-native/commit/e486cfd9bff2fd0bdd4ccfc9cb91b450b7218aef))
|
||||
* **background-upload:** add plugin ([#3539](https://github.com/ionic-team/ionic-native/issues/3539)) ([13f6da6](https://github.com/ionic-team/ionic-native/commit/13f6da69ef622923bf2c746fbecb18a7cf959b82))
|
||||
* **bluetooth-le:** Allow specifying transport mode for Android ([#3571](https://github.com/ionic-team/ionic-native/issues/3571)) ([b3d5baa](https://github.com/ionic-team/ionic-native/commit/b3d5baa46ed695344b08bd3e27be3b9f84bf6f0d))
|
||||
* **core:** add `methodName` to Cordova Decorator ([#3558](https://github.com/ionic-team/ionic-native/issues/3558)) ([46853b4](https://github.com/ionic-team/ionic-native/commit/46853b42120b4b34b727ef0ae0274d1c8cb7bcd1)), closes [#3557](https://github.com/ionic-team/ionic-native/issues/3557)
|
||||
* **CustomUiSDK:** add plugin for Paytm Custom UI SDK ([#3546](https://github.com/ionic-team/ionic-native/issues/3546)) ([bb10642](https://github.com/ionic-team/ionic-native/commit/bb1064225d276cffcd40ff9176b77ffb9d56ed8a))
|
||||
* **dfu-update:** add DfuUpdate Plugin Wrapper ([#3514](https://github.com/ionic-team/ionic-native/issues/3514)) ([07d7ace](https://github.com/ionic-team/ionic-native/commit/07d7ace97d1b122424964f6e7330bf97710dcc8f))
|
||||
* **firebase-dynamic-links:** Add missing method getDynamicLink() ([#3567](https://github.com/ionic-team/ionic-native/issues/3567)) ([d7c6f86](https://github.com/ionic-team/ionic-native/commit/d7c6f8628d176119cabae444c02f285a8c36997d))
|
||||
* **firebase-vision:** add image labelling ([#3569](https://github.com/ionic-team/ionic-native/issues/3569)) ([af114f4](https://github.com/ionic-team/ionic-native/commit/af114f48e46b4f7f1ce66bb2906585158aa5cff0))
|
||||
* **intercom:** added displayCarousel, displayArticle, setBottomPadding ([#3572](https://github.com/ionic-team/ionic-native/issues/3572)) ([68d245e](https://github.com/ionic-team/ionic-native/commit/68d245ef2c85dfff0aedb444db629d59986e06b4))
|
||||
* **multiple-document-picker:** add plugin ([#3551](https://github.com/ionic-team/ionic-native/issues/3551)) ([78e9242](https://github.com/ionic-team/ionic-native/commit/78e92422abb5a645ed09bf61b7dc250462ccc742))
|
||||
* **purchases:** update to plugin version 1.3.2 ([#3566](https://github.com/ionic-team/ionic-native/issues/3566)) ([0f197ad](https://github.com/ionic-team/ionic-native/commit/0f197ad9fcd4e56c0c61bd87c6aec76889af6ab2))
|
||||
* **smartlook:** update to 1.6.0 ([#3562](https://github.com/ionic-team/ionic-native/issues/3562)) ([f71b65d](https://github.com/ionic-team/ionic-native/commit/f71b65d6a79d22175c27b960f27ef51ea6a87ed4))
|
||||
|
||||
|
||||
|
||||
# [5.29.0](https://github.com/ionic-team/ionic-native/compare/v5.28.0...v5.29.0) (2020-10-16)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **diagnostics:** locationAccuracyAuthorization Property missing in build ([#3540](https://github.com/ionic-team/ionic-native/issues/3540)) ([c62c137](https://github.com/ionic-team/ionic-native/commit/c62c13772307c02e7581c15ec6f5c94309927cc6))
|
||||
* **http:** add missing type to serialiser property ([#3532](https://github.com/ionic-team/ionic-native/issues/3532)) ([7b0195b](https://github.com/ionic-team/ionic-native/commit/7b0195bdf441532106df6eb2baf5a9ada1068761))
|
||||
* **in-app-purchase-2:** change in-app-purchase-2 plugin id ([#3553](https://github.com/ionic-team/ionic-native/issues/3553)) ([ce9db34](https://github.com/ionic-team/ionic-native/commit/ce9db34e2439d4fefd1b4071bffb6e5c8daab634))
|
||||
* **music-controls:** update associated cordova plugin ([#3543](https://github.com/ionic-team/ionic-native/issues/3543)) ([4766ec7](https://github.com/ionic-team/ionic-native/commit/4766ec7a35d7e7b0ab31d3db8953f2ef4bdcb6df))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **adjust:** updating to match official typings ([#3523](https://github.com/ionic-team/ionic-native/issues/3523)) ([5a77eab](https://github.com/ionic-team/ionic-native/commit/5a77eabf7644a79369da40eb929b6edfcb83de07))
|
||||
* **all-in-one-sdk:** add plugin for Paytm All-in-One SDK ([#3536](https://github.com/ionic-team/ionic-native/issues/3536)) ([1f48c31](https://github.com/ionic-team/ionic-native/commit/1f48c31a8eaf5079ec8e391b21ea5ce3fa9e1446))
|
||||
* **appsfyler:** add property waitForATTUserAuthorization to AppsflyerOptions ([#3541](https://github.com/ionic-team/ionic-native/issues/3541)) ([3340e9a](https://github.com/ionic-team/ionic-native/commit/3340e9a6949f798d5ec540a78c7ac46a5dc884b2))
|
||||
* **fingerprint-air:** add new functions ([#3530](https://github.com/ionic-team/ionic-native/issues/3530)) ([99e6a53](https://github.com/ionic-team/ionic-native/commit/99e6a5398fb2923991d7236475913eb17e8640c0))
|
||||
* **firebase-x:** add setLanguageCode method for auth ([#3548](https://github.com/ionic-team/ionic-native/issues/3548)) ([5d1b5d5](https://github.com/ionic-team/ionic-native/commit/5d1b5d5fda311003d0ae20e27a06d6bd443554be))
|
||||
* **mobile-messaging:** add new fields to Message type and new method to display chat view ([#3531](https://github.com/ionic-team/ionic-native/issues/3531)) ([14ec32b](https://github.com/ionic-team/ionic-native/commit/14ec32b83c603fc5a079eabf794b7dadce867358))
|
||||
* **purchases:** update to plugin version 1.3.0 ([#3547](https://github.com/ionic-team/ionic-native/issues/3547)) ([b5f7f95](https://github.com/ionic-team/ionic-native/commit/b5f7f952df06828a07f4ab013ce52fddc8ccafdf))
|
||||
* **social-sharing:** Add missing method shareViaWhatsAppToPhone([#3513](https://github.com/ionic-team/ionic-native/issues/3513)) ([f3ce3c4](https://github.com/ionic-team/ionic-native/commit/f3ce3c4930f87f6f2dd023dc28ef924faee05a84))
|
||||
|
||||
|
||||
|
||||
# [5.28.0](https://github.com/ionic-team/ionic-native/compare/v5.27.0...v5.28.0) (2020-08-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **ble:** add missing method "isLocationEnabled" ([#3495](https://github.com/ionic-team/ionic-native/issues/3495)) ([b4462d5](https://github.com/ionic-team/ionic-native/commit/b4462d5e6c12f144412001cade1020b5f88b4ae5))
|
||||
* **geolocation:** [#3303](https://github.com/ionic-team/ionic-native/issues/3303) geolocation watchPosition return type ([#3470](https://github.com/ionic-team/ionic-native/issues/3470)) ([579170a](https://github.com/ionic-team/ionic-native/commit/579170a99ea8a53634631b76ffa19b6b635c1d03))
|
||||
* **hyper-track:** update to the modern sdk ([#3508](https://github.com/ionic-team/ionic-native/issues/3508)) ([44f86f3](https://github.com/ionic-team/ionic-native/commit/44f86f3ce5f6912f1cc0b4596e43066571c96b44))
|
||||
* **ibeacon:** undefined locationManager ([#3505](https://github.com/ionic-team/ionic-native/issues/3505)) ([1ffad79](https://github.com/ionic-team/ionic-native/commit/1ffad79320f83038d1fc09e9112c40c86d948416))
|
||||
* **metrix:** change firebase api ([#3473](https://github.com/ionic-team/ionic-native/issues/3473)) ([b0ffb0e](https://github.com/ionic-team/ionic-native/commit/b0ffb0ec4a035097c8a413f31b2382dae1eda4c7))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **clover-go:** add support to pass signature and void payment ([#3485](https://github.com/ionic-team/ionic-native/issues/3485)) ([26d10ef](https://github.com/ionic-team/ionic-native/commit/26d10ef63346782e6d8ed37ca89bd2dd7402aa0a))
|
||||
* **diagnostics:** Add support for new iOS14-LocationAccuracy Permission ([#3490](https://github.com/ionic-team/ionic-native/issues/3490)) ([ccca644](https://github.com/ionic-team/ionic-native/commit/ccca644134999365a729b4a7d554da6a011eb693))
|
||||
* **nfc:** update to phonegap-nfc@1.2.0 ([#3486](https://github.com/ionic-team/ionic-native/issues/3486)) ([d7ccd45](https://github.com/ionic-team/ionic-native/commit/d7ccd454fb757d8d3be57a70bfa7fb3c269e3318))
|
||||
* **onesignal:** add in-app messages methods ([#3481](https://github.com/ionic-team/ionic-native/issues/3481)) ([eec3fec](https://github.com/ionic-team/ionic-native/commit/eec3fec7ff820e96443e6e3f0d7bf96dac359038))
|
||||
* **purchases:** update to plugin version 1.2.0 ([#3482](https://github.com/ionic-team/ionic-native/issues/3482)) ([a010bb1](https://github.com/ionic-team/ionic-native/commit/a010bb186964b8b825ab80f9cf6092794ee2e4b1))
|
||||
* **smartlook:** update to 1.5.2 ([#3498](https://github.com/ionic-team/ionic-native/issues/3498)) ([5aa5757](https://github.com/ionic-team/ionic-native/commit/5aa57577956c13e8fe34d2c658690df7daf86ef4))
|
||||
|
||||
|
||||
|
||||
# [5.27.0](https://github.com/ionic-team/ionic-native/compare/v5.26.0...v5.27.0) (2020-06-23)
|
||||
|
||||
|
||||
|
||||
@@ -168,6 +168,7 @@ A decorator to wrap the main plugin class, and any other classes that will use `
|
||||
Checks if the plugin and the method are available before executing. By default, the decorator will wrap the callbacks of the function and return a Promise. This decorator takes the following configuration options:
|
||||
|
||||
- **observable**: set to true to return an Observable
|
||||
- **methodName**: an optional name of the cordova plugins method name (if different from wrappers method name)
|
||||
- **clearFunction**: an optional name of a method to clear the observable we returned
|
||||
- **clearWithArgs**: This can be used if clearFunction is set. Set this to true to call the clearFunction with the same arguments used in the initial function.
|
||||
- **sync**: set to true if the method should return the value as-is without wrapping with Observable/Promise
|
||||
|
||||
@@ -3,7 +3,7 @@ jobs:
|
||||
build:
|
||||
working_directory: ~/ionic-native/
|
||||
docker:
|
||||
- image: node:12
|
||||
- image: node:14
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
|
||||
4074
package-lock.json
generated
4074
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
48
package.json
48
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ionic-native",
|
||||
"version": "5.27.0",
|
||||
"version": "5.30.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)",
|
||||
@@ -23,21 +23,21 @@
|
||||
"prettier": "prettier --write \"**/*.{js,json,css,scss,less,md,ts,html,component.html}\""
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/common": "^9.1.11",
|
||||
"@angular/compiler": "^9.1.11",
|
||||
"@angular/compiler-cli": "^9.1.11",
|
||||
"@angular/core": "^9.1.11",
|
||||
"@angular/common": "^9.1.12",
|
||||
"@angular/compiler": "^9.1.12",
|
||||
"@angular/compiler-cli": "^9.1.12",
|
||||
"@angular/core": "^9.1.12",
|
||||
"@types/cordova": "0.0.34",
|
||||
"@types/fs-extra": "^9.0.1",
|
||||
"@types/jest": "^26.0.0",
|
||||
"@types/lodash": "^4.14.156",
|
||||
"@types/node": "^12.12.47",
|
||||
"@types/fs-extra": "^9.0.4",
|
||||
"@types/jest": "^26.0.15",
|
||||
"@types/lodash": "^4.14.165",
|
||||
"@types/node": "^12.19.6",
|
||||
"@types/rimraf": "^3.0.0",
|
||||
"@types/webpack": "^4.41.17",
|
||||
"ajv": "^6.12.2",
|
||||
"@types/webpack": "^4.41.25",
|
||||
"ajv": "^6.12.6",
|
||||
"async-promise-queue": "^1.0.5",
|
||||
"conventional-changelog-cli": "^2.0.34",
|
||||
"cz-conventional-changelog": "^3.2.0",
|
||||
"conventional-changelog-cli": "^2.1.1",
|
||||
"cz-conventional-changelog": "^3.3.0",
|
||||
"dgeni": "^0.4.12",
|
||||
"dgeni-packages": "0.16.10",
|
||||
"fs-extra": "^9.0.1",
|
||||
@@ -45,27 +45,27 @@
|
||||
"gulp-rename": "^2.0.0",
|
||||
"gulp-replace": "^1.0.0",
|
||||
"gulp-tslint": "^8.1.4",
|
||||
"husky": "^4.2.5",
|
||||
"jest": "^26.1.0",
|
||||
"lint-staged": "^10.2.11",
|
||||
"lodash": "^4.17.15",
|
||||
"husky": "^4.3.0",
|
||||
"jest": "^26.6.3",
|
||||
"lint-staged": "^10.5.1",
|
||||
"lodash": "^4.17.20",
|
||||
"minimist": "^1.2.5",
|
||||
"natives": "^1.1.6",
|
||||
"prettier": "^2.0.5",
|
||||
"prettier": "^2.2.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"rxjs": "^6.5.5",
|
||||
"ts-jest": "^26.1.1",
|
||||
"rxjs": "^6.6.3",
|
||||
"ts-jest": "^26.4.4",
|
||||
"ts-node": "^8.10.2",
|
||||
"tslint": "^5.20.1",
|
||||
"tslint-config-prettier": "^1.18.0",
|
||||
"tslint-ionic-rules": "0.0.21",
|
||||
"typedoc": "^0.17.7",
|
||||
"typedoc": "^0.18.0",
|
||||
"typescript": "~3.8.3",
|
||||
"typescript-tslint-plugin": "0.5.5",
|
||||
"uglifyjs-webpack-plugin": "^2.2.0",
|
||||
"unminified-webpack-plugin": "^2.0.0",
|
||||
"webpack": "^4.43.0",
|
||||
"winston": "^3.3.2",
|
||||
"webpack": "^4.44.2",
|
||||
"winston": "^3.3.3",
|
||||
"zone.js": "^0.10.3"
|
||||
},
|
||||
"jest": {
|
||||
@@ -94,7 +94,7 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": "^1.13.0"
|
||||
"tslib": "^1.14.1"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
|
||||
@@ -54,7 +54,7 @@ function getMethodBlock(method: ts.MethodDeclaration, decoratorName: string, dec
|
||||
default:
|
||||
return ts.createCall(ts.createIdentifier(decoratorMethod), undefined, [
|
||||
ts.createThis(),
|
||||
ts.createLiteral((method.name as any).text),
|
||||
ts.createLiteral(decoratorArgs?.methodName || (method.name as any).text),
|
||||
convertValueToLiteral(decoratorArgs),
|
||||
ts.createIdentifier('arguments'),
|
||||
]);
|
||||
|
||||
@@ -33,6 +33,11 @@ export interface PluginConfig {
|
||||
|
||||
export interface CordovaOptions {
|
||||
destruct?: boolean;
|
||||
/**
|
||||
* If the method-name of the cordova plugin is different from the wrappers one, it can be defined here
|
||||
*/
|
||||
methodName?: string;
|
||||
|
||||
/**
|
||||
* Set to true if the wrapped method is a sync function
|
||||
*/
|
||||
|
||||
@@ -45,6 +45,8 @@ export class AdjustConfig {
|
||||
private delayStart = 0.0;
|
||||
private logLevel: AdjustLogLevel = null;
|
||||
private defaultTracker: string = null;
|
||||
private urlStrategy: string = null;
|
||||
private externalDeviceId: string = null;
|
||||
private sendInBackground: boolean = null;
|
||||
private shouldLaunchDeeplink: boolean = null;
|
||||
private eventBufferingEnabled: boolean = null;
|
||||
@@ -56,6 +58,8 @@ export class AdjustConfig {
|
||||
private info3: number = null;
|
||||
private info4: number = null;
|
||||
private processName: string = null; // Android only
|
||||
private allowiAdInfoReading: boolean = null; // iOS only
|
||||
private allowIdfaReading: boolean = null; // iOS only
|
||||
|
||||
private attributionCallback: (attribution: AdjustAttribution) => void = null;
|
||||
private eventTrackingSucceededCallback: (event: AdjustEventSuccess) => void = null;
|
||||
@@ -89,6 +93,10 @@ export class AdjustConfig {
|
||||
this.defaultTracker = defaultTracker;
|
||||
}
|
||||
|
||||
setExternalDeviceId(externalDeviceId: string) {
|
||||
this.externalDeviceId = externalDeviceId;
|
||||
}
|
||||
|
||||
setSendInBackground(sendInBackground: boolean) {
|
||||
this.sendInBackground = sendInBackground;
|
||||
}
|
||||
@@ -113,6 +121,14 @@ export class AdjustConfig {
|
||||
this.processName = processName;
|
||||
}
|
||||
|
||||
setAllowiAdInfoReading(allowiAdInfoReading: boolean) {
|
||||
this.allowiAdInfoReading = allowiAdInfoReading;
|
||||
}
|
||||
|
||||
setAllowIdfaReading(allowIdfaReading: boolean) {
|
||||
this.allowIdfaReading = allowIdfaReading;
|
||||
}
|
||||
|
||||
setAttributionCallbackListener(attributionCallback: (attribution: AdjustAttribution) => void) {
|
||||
this.attributionCallback = attributionCallback;
|
||||
}
|
||||
@@ -188,6 +204,77 @@ export class AdjustConfig {
|
||||
}
|
||||
}
|
||||
|
||||
export class AdjustAppStoreSubscription {
|
||||
private price: string;
|
||||
private currency: string;
|
||||
private transactionId: string;
|
||||
private receipt: string;
|
||||
private transactionDate: string;
|
||||
private salesRegion: string;
|
||||
private callbackParameters: string[] = [];
|
||||
private partnerParameters: string[] = [];
|
||||
|
||||
constructor(price: string, currency: string, transactionId: string, receipt: string) {
|
||||
this.price = price;
|
||||
this.currency = currency;
|
||||
this.transactionId = transactionId;
|
||||
this.receipt = receipt;
|
||||
}
|
||||
|
||||
setTransactionDate(transactionDate: string): void {
|
||||
this.transactionDate = transactionDate;
|
||||
}
|
||||
|
||||
setSalesRegion(salesRegion: string): void {
|
||||
this.salesRegion = salesRegion;
|
||||
}
|
||||
|
||||
addCallbackParameter(key: string, value: string): void {
|
||||
this.callbackParameters.push(key);
|
||||
this.callbackParameters.push(value);
|
||||
}
|
||||
|
||||
addPartnerParameter(key: string, value: string): void {
|
||||
this.partnerParameters.push(key);
|
||||
this.partnerParameters.push(value);
|
||||
}
|
||||
}
|
||||
|
||||
export class AdjustPlayStoreSubscription {
|
||||
private price: string;
|
||||
private currency: string;
|
||||
private sku: string;
|
||||
private orderId: string;
|
||||
private signature: string;
|
||||
private purchaseToken: string;
|
||||
private purchaseTime: string;
|
||||
private callbackParameters: string[] = [];
|
||||
private partnerParameters: string[] = [];
|
||||
|
||||
constructor(price: string, currency: string, sku: string, orderId: string, signature: string, purchaseToken: string) {
|
||||
this.price = price;
|
||||
this.currency = currency;
|
||||
this.sku = sku;
|
||||
this.orderId = orderId;
|
||||
this.signature = signature;
|
||||
this.purchaseToken = purchaseToken;
|
||||
}
|
||||
|
||||
setPurchaseTime(purchaseTime: string): void {
|
||||
this.purchaseTime = purchaseTime;
|
||||
}
|
||||
|
||||
addCallbackParameter(key: string, value: string): void {
|
||||
this.callbackParameters.push(key);
|
||||
this.callbackParameters.push(value);
|
||||
}
|
||||
|
||||
addPartnerParameter(key: string, value: string): void {
|
||||
this.partnerParameters.push(key);
|
||||
this.partnerParameters.push(value);
|
||||
}
|
||||
}
|
||||
|
||||
export interface AdjustAttribution {
|
||||
trackerToken: string;
|
||||
trackerName: string;
|
||||
@@ -257,7 +344,7 @@ export enum AdjustLogLevel {
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Adjust, AdjustConfig, AdjustEnvironment } from '@ionic-native/adjust/ngx';
|
||||
* import { Adjust, AdjustConfig, AdjustEnvironment } from '@ionic-native/adjust';
|
||||
*
|
||||
* constructor(private adjust: Adjust) { }
|
||||
*
|
||||
@@ -278,6 +365,8 @@ export enum AdjustLogLevel {
|
||||
* @classes
|
||||
* AdjustEvent
|
||||
* AdjustConfig
|
||||
* AdjustAppStoreSubscription
|
||||
* AdjustPlayStoreSubscription
|
||||
* @enums
|
||||
* AdjustEnvironment
|
||||
* AdjustLogLevel
|
||||
@@ -305,6 +394,20 @@ export class Adjust extends IonicNativePlugin {
|
||||
@Cordova({ sync: true })
|
||||
trackEvent(event: AdjustEvent): void {}
|
||||
|
||||
/**
|
||||
* This method tracks App Store subscription
|
||||
* @param {AdjustAppStoreSubscription} subscription Adjust App Store subscription object to be tracked
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
trackAppStoreSubscription(subscription: AdjustAppStoreSubscription): void {}
|
||||
|
||||
/**
|
||||
* This method tracks Play Store subscription
|
||||
* @param {AdjustPlayStoreSubscription} subscription Adjust Play Store subscription object to be tracked
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
trackPlayStoreSubscription(subscription: AdjustPlayStoreSubscription): void {}
|
||||
|
||||
/**
|
||||
* This method sets offline mode on or off
|
||||
* @param {boolean} enabled set to true for offline mode on
|
||||
@@ -350,6 +453,13 @@ export class Adjust extends IonicNativePlugin {
|
||||
@Cordova({ sync: true })
|
||||
gdprForgetMe(): void {}
|
||||
|
||||
/**
|
||||
* You can now notify Adjust when a user has exercised their right to stop sharing their data with partners for marketing purposes, but has allowed it to be shared for statistics purposes.
|
||||
* Calling the following method will instruct the Adjust SDK to communicate the user's choice to disable data sharing to the Adjust backend
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
disableThirdPartySharing(): void {}
|
||||
|
||||
/**
|
||||
* Function used to get Google AdId
|
||||
* @return {Promise<string>} Returns a promise with google AdId value
|
||||
@@ -452,4 +562,14 @@ export class Adjust extends IonicNativePlugin {
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
sendFirstPackages(): void {}
|
||||
|
||||
/**
|
||||
* Request Adjust SDK to show pop up dialog for asking user's consent to be tracked.
|
||||
* In order to do this, call this function
|
||||
* @return {Promise<int>} Returns a promise with user's consent value
|
||||
*/
|
||||
@Cordova()
|
||||
requestTrackingAuthorizationWithCompletionHandler(): Promise<number> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
79
src/@ionic-native/plugins/all-in-one-sdk/index.ts
Normal file
79
src/@ionic-native/plugins/all-in-one-sdk/index.ts
Normal file
@@ -0,0 +1,79 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, CordovaProperty, CordovaInstance, InstanceProperty, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/**
|
||||
* @name AllInOneSDK
|
||||
* @description
|
||||
* Paytm All-in-One SDK plugin for Cordova/Ionic Applications
|
||||
* Paytm All-in-One SDK provides a swift, secure and seamless payment experience to your users by invoking the Paytm app (if installed on your user’s smartphone) to complete payment for your order.
|
||||
* Paytm All-in-One SDK enables payment acceptance via Paytm wallet, Paytm Payments Bank, saved Debit/Credit cards, Net Banking, BHIM UPI and EMI as available in your customer’s Paytm account. If Paytm app is not installed on a customer's device, the transaction will be processed via web view within the All-in-One SDK.
|
||||
* For more information about Paytm All-in-One SDK, please visit https://developer.paytm.com/docs/all-in-one-sdk/hybrid-apps/cordova/
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { AllInOneSDK } from '@ionic-native/all-in-one-sdk/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private allInOneSDK: AllInOneSDK) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* For below parameters see [documentation](https://developer.paytm.com/docs/all-in-one-sdk/hybrid-apps/cordova/)
|
||||
* let paymentIntent = { mid : merchantID, orderId: orderId, txnToken: transactionToken, amount: amount, isStaging: isStaging, callbackUrl:callBackURL, restrictAppInvoke:restrictAppInvoke }
|
||||
*
|
||||
* this.allInOneSDK.startTransaction(paymentIntent)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*
|
||||
* For iOS:
|
||||
* After adding the plugin, open the iOS project, you can find the same at <projectName>/platforms/ios.
|
||||
* In case merchant don’t have callback URL, Add an entry into Info.plist LSApplicationQueriesSchemes(Array) Item 0 (String)-> paytm
|
||||
* Add a URL Scheme “paytm”+”MID”
|
||||
*
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'AllInOneSDK',
|
||||
plugin: 'cordova-paytm-allinonesdk',
|
||||
pluginRef: 'AllInOneSDK',
|
||||
repo: 'https://github.com/paytm/paytm-allinonesdk-ionic-cordova.git',
|
||||
platforms: ['Android','iOS']
|
||||
})
|
||||
export class AllInOneSDK extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* This function checks if Paytm Application is available on the device.
|
||||
* If Paytm exists then it invokes Paytm Application with the parameters sent and creates an order.
|
||||
* If the Paytm Application is not available the transaction is continued on a webView within All-in-One SDK.
|
||||
* @param options {PaymentIntentModel} These parameters are required and will be used to create an order.
|
||||
* @return {Promise<PaytmResponse>} Returns a promise that resolves when a transaction completes(both failed and successful).
|
||||
*/
|
||||
@Cordova()
|
||||
startTransaction(options : PaymentIntentModel): Promise<PaytmResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* The response that will be recieved when any transaction is completed
|
||||
*/
|
||||
export interface PaytmResponse{
|
||||
message : string;
|
||||
response : string; // A stringified response of a hashmap returned from All-in-One SDK
|
||||
}
|
||||
|
||||
/**
|
||||
* For below parameters see [documentation](https://developer.paytm.com/docs/all-in-one-sdk/hybrid-apps/cordova/)
|
||||
*/
|
||||
export interface PaymentIntentModel{
|
||||
mid : string; // Merchant ID
|
||||
orderId : string; // Order ID
|
||||
txnToken : string; // Transaction Token
|
||||
amount : string; // Amount
|
||||
isStaging: boolean; // Environment
|
||||
callbackUrl: string; // Callback URL
|
||||
restrictAppInvoke: boolean; // To enable or disable the paytm app invocation
|
||||
}
|
||||
66
src/@ionic-native/plugins/app-update/index.ts
Normal file
66
src/@ionic-native/plugins/app-update/index.ts
Normal file
@@ -0,0 +1,66 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface AppUpdateOptions {
|
||||
authType?: string;
|
||||
username?: string;
|
||||
password?: string;
|
||||
skipPromptDialog?: boolean;
|
||||
skipProgressDialog?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name App Update
|
||||
* @description
|
||||
* This plugin does self-update for android
|
||||
*
|
||||
* @usage
|
||||
*
|
||||
* You should first host an XML file on your server with the following data in it:
|
||||
* ```xml
|
||||
* <update>
|
||||
* <version>302048</version>
|
||||
* <name>APK Name</name>
|
||||
* <url>https://your-remote-api.com/YourApp.apk</url>
|
||||
* </update>
|
||||
* ```
|
||||
*
|
||||
* Then use the following code:
|
||||
*
|
||||
* ```typescript
|
||||
* import { AppUpdate } from '@ionic-native/app-update/ngx';
|
||||
*
|
||||
* constructor(private appUpdate: AppUpdate) {
|
||||
*
|
||||
* const updateUrl = 'https://your-remote-api.com/update.xml';
|
||||
* this.appUpdate.checkAppUpdate(updateUrl).then(() => { console.log('Update available') });
|
||||
*
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* The plugin will compare the app version and update it automatically if the API has a newer version to install.
|
||||
* @interfaces
|
||||
* AppUpdateOptions
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'AppUpdate',
|
||||
plugin: 'cordova-plugin-app-update',
|
||||
pluginRef: 'AppUpdate',
|
||||
repo: 'https://github.com/vaenow/cordova-plugin-app-update',
|
||||
platforms: ['Android'],
|
||||
})
|
||||
@Injectable()
|
||||
export class AppUpdate extends IonicNativePlugin {
|
||||
/**
|
||||
* Check and update
|
||||
* @param {string} updateUrl update api url
|
||||
* @param {AppUpdateOptions} [options] options
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse',
|
||||
})
|
||||
checkAppUpdate(updateUrl: string, options?: AppUpdateOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,6 @@ export interface WatchExistData {
|
||||
|
||||
/**
|
||||
* @name Apple Wallet
|
||||
* @premier apple-payment-pass
|
||||
* @description
|
||||
* A Cordova plugin that enables users from Add Payment Cards to their Apple Wallet.
|
||||
*
|
||||
|
||||
@@ -31,6 +31,11 @@ export interface AppsflyerOptions {
|
||||
* default false Accessing AppsFlyer Attribution / Conversion Data from the SDK (Deferred Deeplinking). Read more: Android, iOS. AppsFlyer plugin will return attribution data in onSuccess callback.
|
||||
*/
|
||||
onInstallConversionDataListener?: boolean;
|
||||
|
||||
/**
|
||||
* time for the sdk to wait before launch - IOS 14 ONLY!
|
||||
*/
|
||||
waitForATTUserAuthorization?: number;
|
||||
}
|
||||
|
||||
export interface AppsflyerEvent {
|
||||
@@ -94,8 +99,8 @@ export class Appsflyer extends IonicNativePlugin {
|
||||
* @param {string} eventName custom event name, is presented in your dashboard
|
||||
* @param {AppsflyerEvent} eventValues event details
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
trackEvent(eventName: string, eventValues: AppsflyerEvent): void {}
|
||||
@Cordova()
|
||||
logEvent(eventName: string, eventValues: AppsflyerEvent): void {}
|
||||
|
||||
/**
|
||||
* Setting your own Custom ID enables you to cross-reference your own unique ID with AppsFlyer’s user ID and the other devices’ IDs. This ID is available in AppsFlyer CSV reports along with postbacks APIs for cross-referencing with you internal IDs.
|
||||
@@ -109,7 +114,7 @@ export class Appsflyer extends IonicNativePlugin {
|
||||
* @param {boolean} customerUserId In some extreme cases you might want to shut down all SDK tracking due to legal and privacy compliance. This can be achieved with the isStopTracking API. Once this API is invoked, our SDK will no longer communicate with our servers and stop functioning.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
stopTracking(isStopTracking: boolean): void {}
|
||||
Stop(isStopTracking: boolean): void {}
|
||||
|
||||
/**
|
||||
* Get the data from Attribution
|
||||
@@ -120,7 +125,9 @@ export class Appsflyer extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* Enables app uninstall tracking
|
||||
* @param {string} token GCM/FCM ProjectNumber
|
||||
* @returns {Promise<any>}
|
||||
@@ -157,7 +164,7 @@ export class Appsflyer extends IonicNativePlugin {
|
||||
* @param {boolean} disable Set to true to opt-out user from tracking
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
deviceTrackingDisabled(disable: boolean): void {}
|
||||
anonymizeUser(disable: boolean): void {}
|
||||
|
||||
/**
|
||||
* Set AppsFlyer’s OneLink ID. Setting a valid OneLink ID will result in shortened User Invite links, when one is generated. The OneLink ID can be obtained on the AppsFlyer Dashboard.
|
||||
@@ -182,7 +189,7 @@ export class Appsflyer extends IonicNativePlugin {
|
||||
* @param {string} campaign Promoted Campaign
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
trackCrossPromotionImpression(appId: string, campaign: string): void {}
|
||||
logCrossPromotionImpression(appId: string, campaign: string): void {}
|
||||
|
||||
/**
|
||||
* Use this call to track the click and launch the app store's app page (via Browser)
|
||||
@@ -191,5 +198,5 @@ export class Appsflyer extends IonicNativePlugin {
|
||||
* @param {Object} options Additional Parameters to track
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
trackAndOpenStore(appId: string, campaign: string, options: Object): void {}
|
||||
logCrossPromotionAndOpenStore(appId: string, campaign: string, options: Object): void {}
|
||||
}
|
||||
|
||||
112
src/@ionic-native/plugins/background-upload/index.ts
Normal file
112
src/@ionic-native/plugins/background-upload/index.ts
Normal file
@@ -0,0 +1,112 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, CordovaInstance, IonicNativePlugin, } from '@ionic-native/core';
|
||||
|
||||
declare const window: any;
|
||||
|
||||
export enum UploadState {
|
||||
UPLOADED = 'UPLOADED',
|
||||
FAILED = 'FAILED',
|
||||
UPLOADING = 'UPLOADING',
|
||||
}
|
||||
|
||||
export type UploadStateType = keyof typeof UploadState;
|
||||
|
||||
export interface UploadEvent{
|
||||
id?: string, // id of the upload
|
||||
state?: UploadStateType, // state of the upload (either UPLOADING, UPLOADED or FAILED)
|
||||
statusCode?: number, // response code returned by server after upload is completed
|
||||
serverResponse?: any, // server response received after upload is completed
|
||||
error?: any, // error message in case of failure
|
||||
errorCode?: number, // error code for any exception encountered
|
||||
progress?: any, // progress for ongoing upload
|
||||
eventId?: string // id of the event
|
||||
}
|
||||
|
||||
export interface FTMPayloadOptions {
|
||||
id: string,
|
||||
filePath: string,
|
||||
fileKey?: string,
|
||||
serverUrl: string,
|
||||
notificationTitle?: string,
|
||||
headers?: {
|
||||
[name: string]: string
|
||||
},
|
||||
parameters?: {
|
||||
[name: string]: string
|
||||
}
|
||||
[prop: string]: any;
|
||||
}
|
||||
|
||||
export interface FTMOptions {
|
||||
callBack: (event: UploadEvent) => any;
|
||||
config?: {
|
||||
parallelUploadsLimit?: number;
|
||||
}
|
||||
}
|
||||
|
||||
export class FileTransferManager {
|
||||
private _objectInstance: any;
|
||||
|
||||
constructor(options: FTMOptions ) {
|
||||
this._objectInstance = window.FileTransferManager.init(options.config, options.callBack);
|
||||
}
|
||||
|
||||
@CordovaInstance()
|
||||
startUpload(payload: FTMPayloadOptions): void {
|
||||
return;
|
||||
}
|
||||
|
||||
@CordovaInstance()
|
||||
removeUpload(id: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@CordovaInstance()
|
||||
acknowledgeEvent(id: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@CordovaInstance()
|
||||
destroy(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @name BackgroundUpload
|
||||
* @description
|
||||
* This plugin does something
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { BackgroundUpload } from '@ionic-native/background-upload/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private backgroundUpload: BackgroundUpload) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.backgroundUpload.init({})
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'BackgroundUpload',
|
||||
plugin: 'cordova-plugin-background-upload',
|
||||
pluginRef: 'FileTransferManager',
|
||||
repo: 'https://github.com/spoonconsulting/cordova-plugin-background-upload',
|
||||
install: 'ionic cordova plugin add cordova-plugin-background-upload',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class BackgroundUpload extends IonicNativePlugin {
|
||||
FileTransferManager = FileTransferManager;
|
||||
|
||||
init(options: FTMOptions): FileTransferManager {
|
||||
return new FileTransferManager(options)
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,8 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
*
|
||||
* Requires Cordova plugin: cordova-plugin-badge. For more info, please see the [Badge plugin docs](https://github.com/katzer/cordova-plugin-badge).
|
||||
*
|
||||
* Android Note: Badges have historically only been a feature implemented by third party launchers and not visible unless one of those launchers was being used (E.G. Samsung or Nova Launcher) and if enabled by the user. As of Android 8 (Oreo), [notification badges](https://developer.android.com/training/notify-user/badges) were introduced officially to reflect unread notifications. This plugin is unlikely to work as expected on devices running Android 8 or newer. Please see the [local notifications plugin docs](https://github.com/katzer/cordova-plugin-local-notifications) for more information on badge use with notifications.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Badge } from '@ionic-native/badge/ngx';
|
||||
|
||||
@@ -455,9 +455,12 @@ export class BLE extends IonicNativePlugin {
|
||||
* @param {string} serviceUUID UUID of the BLE service
|
||||
* @param {string} characteristicUUID UUID of the BLE characteristic
|
||||
* @return {Observable<any>} Returns an Observable that notifies of characteristic changes.
|
||||
* The observer emit an array with data at index 0 and sequence order at index 1.
|
||||
* The sequence order is always undefined on iOS. On android it leave the client to check the sequence order and reorder if needed
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
destruct: true,
|
||||
clearFunction: 'stopNotification',
|
||||
clearWithArgs: true,
|
||||
})
|
||||
@@ -604,4 +607,15 @@ export class BLE extends IonicNativePlugin {
|
||||
bondedDevices(): Promise<any[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reports if location services are enabled.
|
||||
* Android only
|
||||
*
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
isLocationEnabled(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,6 +99,38 @@ export interface RespondParams {
|
||||
offset?: number;
|
||||
}
|
||||
|
||||
export interface ConnectionParams {
|
||||
/** The address/identifier provided by the scan's return object */
|
||||
address: string;
|
||||
/** Automatically connect as soon as the remote device becomes available (Android) */
|
||||
autoConnect?: boolean;
|
||||
/**
|
||||
* Transport mode. Available from API 23 (Android).
|
||||
* If none is specified the default behavior is TRANSPORT_AUTO
|
||||
*
|
||||
* Note: On Android 10, TRANSPORT_AUTO can lead to connection errors with Status code 133.
|
||||
* In this case TRANSPORT_LE can be used.
|
||||
*/
|
||||
transport?: AndroidGattTransportMode;
|
||||
}
|
||||
|
||||
export enum AndroidGattTransportMode {
|
||||
/**
|
||||
* No preference of physical transport for GATT connections to remote dual-mode devices
|
||||
*/
|
||||
TRANSPORT_AUTO = 0,
|
||||
|
||||
/**
|
||||
* Prefer BR/EDR transport for GATT connections to remote dual-mode devices
|
||||
*/
|
||||
TRANSPORT_BREDR = 1,
|
||||
|
||||
/**
|
||||
* Prefer LE transport for GATT connections to remote dual-mode devices
|
||||
*/
|
||||
TRANSPORT_LE = 2,
|
||||
}
|
||||
|
||||
export interface CharacteristicParams extends Params {
|
||||
/** An array of characteristic IDs to discover or empty array / null */
|
||||
characteristics?: string[];
|
||||
@@ -543,15 +575,15 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
* Connect to a Bluetooth LE device
|
||||
* @param connectSuccess The success callback that is passed with device object
|
||||
* @param connectError The callback that will be triggered when the connect operation fails
|
||||
* @param params The address/identifier
|
||||
* @param params The connection params
|
||||
*
|
||||
* @param {{address: string, autoConnect: boolean}} params
|
||||
* @param {ConnectionParams} params
|
||||
* @returns {(Observable<{ status: DeviceInfo }>)}
|
||||
* success: device object with status
|
||||
* error: The callback that will be triggered when the unbond operation fails
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse', observable: true })
|
||||
connect(params: { address: string; autoConnect?: boolean }): Observable<DeviceInfo> {
|
||||
connect(params: ConnectionParams): Observable<DeviceInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -149,9 +149,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
createNotification(
|
||||
extras: any
|
||||
): Promise<any> {
|
||||
createNotification(extras: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -662,42 +660,6 @@ export class CleverTap extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/****************************
|
||||
* Notification Inbox methods
|
||||
****************************/
|
||||
/**
|
||||
* Call this method to initialize the App Inbox
|
||||
*/
|
||||
@Cordova()
|
||||
initializeInbox(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this method to get the count of unread Inbox messages
|
||||
*/
|
||||
@Cordova()
|
||||
getInboxMessageUnreadCount(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this method to get the count of total Inbox messages
|
||||
*/
|
||||
@Cordova()
|
||||
getInboxMessageCount(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this method to open the App Inbox
|
||||
* @param styleConfig : any or empty object
|
||||
*/
|
||||
@Cordova()
|
||||
showInbox(styleConfig: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Fetch all Inbox Messages
|
||||
* @returns {Promise<any>}
|
||||
@@ -896,7 +858,6 @@ export class CleverTap extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Call this to Get Boolean Variable
|
||||
* @param varName {string}
|
||||
@@ -904,10 +865,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getBooleanVariable(
|
||||
varName: string,
|
||||
defaultValue: boolean
|
||||
): Promise<any> {
|
||||
getBooleanVariable(varName: string, defaultValue: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -918,10 +876,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getDoubleVariable(
|
||||
varName: string,
|
||||
defaultValue: number
|
||||
): Promise<any> {
|
||||
getDoubleVariable(varName: string, defaultValue: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -932,10 +887,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getIntegerVariable(
|
||||
varName: string,
|
||||
defaultValue: number
|
||||
): Promise<any> {
|
||||
getIntegerVariable(varName: string, defaultValue: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -946,10 +898,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getStringVariable(
|
||||
varName: string,
|
||||
defaultValue: string
|
||||
): Promise<any> {
|
||||
getStringVariable(varName: string, defaultValue: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -960,10 +909,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getListOfBooleanVariable(
|
||||
varName: string,
|
||||
defaultValue: any
|
||||
): Promise<any> {
|
||||
getListOfBooleanVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -974,10 +920,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getListOfDoubleVariable(
|
||||
varName: string,
|
||||
defaultValue: any
|
||||
): Promise<any> {
|
||||
getListOfDoubleVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -988,10 +931,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getListOfIntegerVariable(
|
||||
varName: string,
|
||||
defaultValue: any
|
||||
): Promise<any> {
|
||||
getListOfIntegerVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1002,10 +942,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getListOfStringVariable(
|
||||
varName: string,
|
||||
defaultValue: any
|
||||
): Promise<any> {
|
||||
getListOfStringVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1016,10 +953,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getMapOfBooleanVariable(
|
||||
varName: string,
|
||||
defaultValue: any
|
||||
): Promise<any> {
|
||||
getMapOfBooleanVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1030,10 +964,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getMapOfDoubleVariable(
|
||||
varName: string,
|
||||
defaultValue: any
|
||||
): Promise<any> {
|
||||
getMapOfDoubleVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1044,10 +975,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getMapOfIntegerVariable(
|
||||
varName: string,
|
||||
defaultValue: any
|
||||
): Promise<any> {
|
||||
getMapOfIntegerVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1058,10 +986,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getMapOfStringVariable(
|
||||
varName: string,
|
||||
defaultValue: any
|
||||
): Promise<any> {
|
||||
getMapOfStringVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1111,10 +1036,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getFeatureFlag(
|
||||
key: string,
|
||||
defaultValue: string
|
||||
): Promise<any> {
|
||||
getFeatureFlag(key: string, defaultValue: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1124,9 +1046,7 @@ export class CleverTap extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setDefaultsMap(
|
||||
defaults: any
|
||||
): Promise<any> {
|
||||
setDefaultsMap(defaults: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,9 @@ export interface SaleResponse extends Response {
|
||||
cardFirst6?: string;
|
||||
cardLast4?: string;
|
||||
}
|
||||
export interface VoidPaymentResponse extends Response {
|
||||
paymentId?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Clover Go
|
||||
@@ -56,6 +59,14 @@ export interface SaleResponse extends Response {
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* this.cloverGo.sign(signInfo)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* this.cloverGo.voidPayment(paymentInfo)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
@@ -64,7 +75,7 @@ export interface SaleResponse extends Response {
|
||||
pluginRef: 'clovergo',
|
||||
repo: 'https://github.com/hotwax/cordova-plugin-clovergo',
|
||||
install: 'ionic plugin add cordova-plugin-clovergo',
|
||||
platforms: ['Android', 'iOS'],
|
||||
platforms: ['Android'],
|
||||
})
|
||||
@Injectable()
|
||||
export class CloverGo extends IonicNativePlugin {
|
||||
@@ -107,4 +118,27 @@ export class CloverGo extends IonicNativePlugin {
|
||||
sale(saleInfo: object): Promise<SaleResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is used to pass signature as two
|
||||
* dimensional number array that represents points
|
||||
* of signature on screen.
|
||||
* The list is passed as signature in SignInfo object.
|
||||
* @param signInfo {object}
|
||||
* @return {Promise<SaleResponse>}
|
||||
*/
|
||||
@Cordova()
|
||||
sign(signInfo: object): Promise<SaleResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function void any payment done through the device
|
||||
* @param saleInfo {object}
|
||||
* @return {Promise<VoidPaymentResponse>}
|
||||
*/
|
||||
@Cordova()
|
||||
voidPayment(paymentInfo: object): Promise<VoidPaymentResponse> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
306
src/@ionic-native/plugins/custom-uisdk/index.ts
Executable file
306
src/@ionic-native/plugins/custom-uisdk/index.ts
Executable file
@@ -0,0 +1,306 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
Plugin,
|
||||
Cordova,
|
||||
CordovaProperty,
|
||||
CordovaInstance,
|
||||
InstanceProperty,
|
||||
IonicNativePlugin,
|
||||
} from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name CustomUISDK
|
||||
* @description
|
||||
* This plugin is used to access Paytm's native CustomUISDK framework's apis.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { CustomUISDK } from '@ionic-native/custom-uisdk/ngx';
|
||||
*
|
||||
* constructor(private customuisdk: CustomUISDK) { }
|
||||
*
|
||||
* ...
|
||||
* this.customuisdk.functionName('Hello', 123)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'cordova-paytm-customuisdk',
|
||||
plugin: 'cordova-paytm-customuisdk',
|
||||
pluginRef: 'paytm.customuisdk',
|
||||
repo: 'https://github.com/paytm/paytm-customuisdk-cordova',
|
||||
install: '',
|
||||
installVariables: [],
|
||||
platforms: ['Android, iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class CustomUISDK extends IonicNativePlugin {
|
||||
/**
|
||||
* This function show dialog to ask user permision to fetch authcode
|
||||
* @param clientId {string} unique id give to each merchant
|
||||
* @param mid {string} merchant id
|
||||
* @return {Promise<string>} Returns authcode
|
||||
*/
|
||||
@Cordova()
|
||||
fetchAuthCode(clientId: string, mid: string): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function check that paytm app is installed or not
|
||||
* @return {Promise<boolean>} Returns installed - true or not -false
|
||||
*/
|
||||
@Cordova()
|
||||
isPaytmAppInstalled(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mid {string} merchant id
|
||||
* @return {Promise<boolean>} Returns if has payment methods - true or not -false
|
||||
*/
|
||||
@Cordova()
|
||||
checkHasInstrument(mid: string): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mid {string} merchant id
|
||||
* @param orderId {string} order id
|
||||
* @param txnToken {string} transaction token
|
||||
* @param amount {string} transaction amount
|
||||
* @param isStaging {boolean} staging or production
|
||||
* @param callbackUrl {string} callback url only required for custom url page
|
||||
*/
|
||||
@Cordova()
|
||||
initPaytmSDK(
|
||||
mid: string,
|
||||
orderId: string,
|
||||
txnToken: string,
|
||||
amount: string,
|
||||
isStaging: boolean,
|
||||
callbackUrl: string
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param paymentFlow {string} payment type NONE, ADDANDPAY
|
||||
* @return {Promise<any>} Returns object of response
|
||||
*/
|
||||
@Cordova()
|
||||
goForWalletTransaction(paymentFlow: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cardNumber {string} card number
|
||||
* @param cardExpiry {string} card expiry
|
||||
* @param cardCvv {string} card cvv
|
||||
* @param cardType {string} card type debit or credit
|
||||
* @param paymentFlow {string} payment type NONE, ADDANDPAY
|
||||
* @param channelCode {string} bank channel code
|
||||
* @param issuingBankCode {string} issuing bank code
|
||||
* @param emiChannelId {string} emi plan id
|
||||
* @param authMode {string} authentication mode 'otp' 'pin'
|
||||
* @param saveCard {boolean} save card for next time
|
||||
* @return {Promise<any>} Returns object of response
|
||||
*/
|
||||
@Cordova()
|
||||
goForNewCardTransaction(
|
||||
cardNumber: string,
|
||||
cardExpiry: string,
|
||||
cardCvv: string,
|
||||
cardType: string,
|
||||
paymentFlow: string,
|
||||
channelCode: string,
|
||||
issuingBankCode: string,
|
||||
emiChannelId: string,
|
||||
authMode: string,
|
||||
saveCard: boolean
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cardId {string} card id of saved card
|
||||
* @param cardCvv {string} card cvv
|
||||
* @param cardType {string} card type debit or credit
|
||||
* @param paymentFlow {string} payment type NONE, ADDANDPAY
|
||||
* @param channelCode {string} bank channel code
|
||||
* @param issuingBankCode {string} issuing bank code
|
||||
* @param emiChannelId {string} emi plan id
|
||||
* @param authMode {string} authentication mode 'otp' 'pin'
|
||||
* @return {Promise<any>} Returns object of response
|
||||
*/
|
||||
@Cordova()
|
||||
goForSavedCardTransaction(
|
||||
cardId: string,
|
||||
cardCvv: string,
|
||||
cardType: string,
|
||||
paymentFlow: string,
|
||||
channelCode: string,
|
||||
issuingBankCode: string,
|
||||
emiChannelId: string,
|
||||
authMode: string
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param netBankingCode {string} bank channel code
|
||||
* @param paymentFlow {string} payment type NONE, ADDANDPAY
|
||||
* @return {Promise<any>} Returns object of response
|
||||
*/
|
||||
@Cordova()
|
||||
goForNetBankingTransaction(netBankingCode: string, paymentFlow: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param upiCode {string} upi code
|
||||
* @param paymentFlow {string} payment type NONE, ADDANDPAY
|
||||
* @param saveVPA {boolean} save vpa for future transaction
|
||||
* @return {Promise<any>} Returns object of response
|
||||
*/
|
||||
@Cordova()
|
||||
goForUpiCollectTransaction(upiCode: string, paymentFlow: string, saveVPA: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {Promise<any>} Returns upi app list names
|
||||
*/
|
||||
@Cordova()
|
||||
getUpiIntentList(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param appName {string} upi app name
|
||||
* @param paymentFlow {string} payment type NONE, ADDANDPAY
|
||||
* @return {Promise<any>} Returns object of response
|
||||
*/
|
||||
@Cordova()
|
||||
goForUpiIntentTransaction(appName: string, paymentFlow: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param vpaName {string} vpa name
|
||||
* @param paymentFlow {string} payment type NONE, ADDANDPAY
|
||||
* @param bankAccountJson {{}} bank account json object
|
||||
* @param merchantDetailsJson {{}} merchant detail json
|
||||
* @return {Promise<any>} Returns object of response
|
||||
*/
|
||||
@Cordova()
|
||||
goForUpiPushTransaction(
|
||||
paymentFlow: string,
|
||||
bankAccountJson: {},
|
||||
vpaName: string,
|
||||
merchantDetailsJson: {}
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param vpaName {string} vpa name
|
||||
* @param bankAccountJson {{}} bank account json object
|
||||
* @return {Promise<any>} Returns object of response
|
||||
*/
|
||||
@Cordova()
|
||||
fetchUpiBalance(bankAccountJson: {}, vpaName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param vpaName {string} vpa name
|
||||
* @param bankAccountJson {{}} bank account json object
|
||||
* @return {Promise<any>} Returns object of response
|
||||
*/
|
||||
@Cordova()
|
||||
setUpiMpin(bankAccountJson: {}, vpaName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cardSixDigit {string} card starting six digit
|
||||
* @param tokenType {string} token type ACCESS or TXN_TOKEN
|
||||
* @param token {string} token fetch from api
|
||||
* @param mid {string} merchant id
|
||||
* @param referenceId {string} reference id
|
||||
* @return {Promise<any>} Returns object of response
|
||||
*/
|
||||
@Cordova()
|
||||
getBin(cardSixDigit: string, tokenType: string, token: string, mid: string, referenceId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param tokenType {string} token type ACCESS or TXN_TOKEN
|
||||
* @param token {string} token fetch from api
|
||||
* @param mid {string} merchant id
|
||||
* @param orderId {string} order id required only if token type is TXN_TOKEN
|
||||
* @param referenceId {string} reference id required only if token type is ACCESS
|
||||
* @return {Promise<any>} Returns object of response
|
||||
*/
|
||||
@Cordova()
|
||||
fetchNBList(tokenType: string, token: string, mid: string, orderId: string, referenceId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param channelCode {string} bank channel code
|
||||
* @param cardType {string} card type debit or credit
|
||||
* @return {Promise<any>} Returns object of response
|
||||
*/
|
||||
@Cordova()
|
||||
fetchEmiDetails(channelCode: string, cardType: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {Promise<any>} Returns last successfully used net backing code
|
||||
*/
|
||||
|
||||
@Cordova()
|
||||
getLastNBSavedBank(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {Promise<any>} Returns last successfully used vpa code
|
||||
*/
|
||||
|
||||
@Cordova()
|
||||
getLastSavedVPA(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param clientId {string} unique id give to each merchant
|
||||
* @param authCode {string} fetched auth code
|
||||
* @return {Promise<any>} Returns last successfully used vpa code
|
||||
*/
|
||||
@Cordova()
|
||||
isAuthCodeValid(clientId: string, authCode: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {Promise<any>} Returns current environment
|
||||
*/
|
||||
@Cordova()
|
||||
getEnvironment(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param environment {string} setting environment PRODUCTION or STAGING
|
||||
*/
|
||||
@Cordova()
|
||||
setEnvironment(environment: string): void {
|
||||
return;
|
||||
}
|
||||
}
|
||||
66
src/@ionic-native/plugins/dfu-update/index.ts
Normal file
66
src/@ionic-native/plugins/dfu-update/index.ts
Normal file
@@ -0,0 +1,66 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
export interface UpdateOptions {
|
||||
/**
|
||||
* A string that contains the identifier for the Bluetooth LE device to update. It will either be a MAC address (on Android) or a UUID (on iOS).
|
||||
*/
|
||||
deviceId: string;
|
||||
|
||||
/**
|
||||
* A string that is the path to the file to use in the update. It can be either in either `cdvfile://` or `file://` format.
|
||||
*/
|
||||
fileUrl: string;
|
||||
|
||||
/**
|
||||
* The PacketReceiptNotificationsValue (Default to 10)
|
||||
*/
|
||||
packetReceiptNotificationsValue?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Dfu Update
|
||||
* @description
|
||||
* This plugin is a Wrapper to use Nordic Semiconductor's Device Firmware Update (DFU) service to update a Bluetooth LE device.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { DfuUpdate } from '@ionic-native/dfu-update/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private dfuUpdate: DfuUpdate) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.dfuUpdate.updateFirmware('fileURL', 'deviceIdentifier')
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'DfuUpdate',
|
||||
plugin: 'cordova-plugin-dfu-update',
|
||||
pluginRef: 'window.DfuUpdate',
|
||||
repo: 'https://github.com/EinfachHans/cordova-plugin-dfu-update',
|
||||
install: 'ionic cordova plugin add cordova-plugin-dfu-update --variable ANDROID_NORDIC_VERSION="1.11.0"',
|
||||
installVariables: ['ANDROID_NORDIC_VERSION'],
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class DfuUpdate extends IonicNativePlugin {
|
||||
/**
|
||||
* Start the Firmware-Update-Process
|
||||
* @param options - Options for the process
|
||||
* @return {Observable<any>} Returns a Observable that emits when something happens
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
callbackOrder: 'reverse',
|
||||
})
|
||||
updateFirmware(options: UpdateOptions): Observable<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -89,6 +89,15 @@ export class Diagnostic extends IonicNativePlugin {
|
||||
WHEN_IN_USE: 'when_in_use',
|
||||
};
|
||||
|
||||
/**
|
||||
* iOS ONLY
|
||||
* Location accuracy authorization
|
||||
*/
|
||||
locationAccuracyAuthorization: {
|
||||
FULL: 'full',
|
||||
REDUCED: 'reduced',
|
||||
};
|
||||
|
||||
permissionGroups = {
|
||||
CALENDAR: ['READ_CALENDAR', 'WRITE_CALENDAR'],
|
||||
CAMERA: ['CAMERA'],
|
||||
@@ -929,4 +938,36 @@ export class Diagnostic extends IonicNativePlugin {
|
||||
getMotionAuthorizationStatus(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the location accuracy authorization for the application on iOS 14+. Note: calling on iOS <14 will result in the Promise being rejected.
|
||||
*
|
||||
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#getlocationaccuracyauthorization)
|
||||
*
|
||||
* @return {Promise<string>}
|
||||
*/
|
||||
@Cordova({ platform: ['iOS'] })
|
||||
getLocationAccuracyAuthorization(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Requests temporary access to full location accuracy for the application on iOS 14+.
|
||||
*
|
||||
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#requesttemporaryfullaccuracyauthorization)
|
||||
*
|
||||
* @return {Promise<string>}
|
||||
*/
|
||||
@Cordova({ platforms: ['iOS'] })
|
||||
requestTemporaryFullAccuracyAuthorization(purpose: string): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a function to be called when a change in location accuracy authorization occurs on iOS 14+.
|
||||
*
|
||||
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#registerLocationAccuracyAuthorizationChangeHandler)
|
||||
*/
|
||||
@Cordova({ platforms: ['iOS'], sync: true })
|
||||
registerLocationAccuracyAuthorizationChangeHandler(handler: Function): void {}
|
||||
}
|
||||
|
||||
@@ -105,11 +105,7 @@ export interface FileTransferError {
|
||||
*
|
||||
* @description
|
||||
* This plugin allows you to upload and download files.
|
||||
*
|
||||
* @deprecated
|
||||
* This plugin has been deprecated in favor of XHR2
|
||||
* https://cordova.apache.org/blog/2017/10/18/from-filetransfer-to-xhr2.html
|
||||
*
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { FileTransfer, FileUploadOptions, FileTransferObject } from '@ionic-native/file-transfer/ngx';
|
||||
|
||||
@@ -39,6 +39,19 @@ export interface FingerprintOptions {
|
||||
disableBackup?: boolean;
|
||||
}
|
||||
|
||||
export interface FingerprintSecretOptions extends FingerprintOptions {
|
||||
/**
|
||||
* String secret to encrypt and save, use simple strings matching the regex [a-zA-Z0-9\-]+
|
||||
*/
|
||||
secret: string;
|
||||
|
||||
/**
|
||||
* If `true` secret will be deleted when biometry items are deleted or enrolled
|
||||
* @default false
|
||||
*/
|
||||
invalidateOnEnrollment?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Fingerprint AIO
|
||||
* @description
|
||||
@@ -68,9 +81,30 @@ export interface FingerprintOptions {
|
||||
* .then((result: any) => console.log(result))
|
||||
* .catch((error: any) => console.log(error));
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.faio.registerBiometricSecret({
|
||||
* description: "Some biometric description", // optional | Default: null
|
||||
* secret: "my-super-secret", // mandatory
|
||||
* invalidateOnEnrollment: true, // optional | Default: false
|
||||
* disableBackup: true, // (Android Only) | optional | always `true` on Android
|
||||
* })
|
||||
* .then((result: any) => console.log(result))
|
||||
* .catch((error: any) => console.log(error));
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.faio.loadBiometricSecret({
|
||||
* description: "Some biometric description", // optional | Default: null
|
||||
* disableBackup: true, // always disabled on Android
|
||||
* })
|
||||
* .then((result: string) => console.log(result))
|
||||
* .catch((error: any) => console.log(error));
|
||||
*
|
||||
* ```
|
||||
* @interfaces
|
||||
* FingerprintOptions
|
||||
* FingerprintSecretOptions
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'FingerprintAIO',
|
||||
@@ -146,6 +180,11 @@ export class FingerprintAIO extends IonicNativePlugin {
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_LOCKED_OUT_PERMANENT = -112;
|
||||
/**
|
||||
* Convenience constant
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_SECRET_NOT_FOUND = -113;
|
||||
|
||||
/**
|
||||
* Check if fingerprint authentication is available
|
||||
@@ -156,6 +195,26 @@ export class FingerprintAIO extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show authentication dialogue and register secret
|
||||
* @param {FingerprintSecretOptions} options Options for platform specific fingerprint API
|
||||
* @return {Promise<any>} Returns a promise that resolves when authentication was successful
|
||||
*/
|
||||
@Cordova()
|
||||
registerBiometricSecret(options: FingerprintSecretOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show authentication dialogue and load secret
|
||||
* @param {FingerprintOptions} options Options for platform specific fingerprint API
|
||||
* @return {Promise<any>} Returns a promise that resolves when authentication was successful
|
||||
*/
|
||||
@Cordova()
|
||||
loadBiometricSecret(options: FingerprintOptions): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show authentication dialogue
|
||||
* @param {FingerprintOptions} options Options for platform specific fingerprint API
|
||||
|
||||
@@ -11,6 +11,22 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
*
|
||||
* NOTE: on iOS in order to collect demographic, age, gender data etc. you should additionally include AdSupport.framework into your project.
|
||||
*
|
||||
* ## Using capacitor?
|
||||
* For Android you'll have to add in __android/app/src/main/AndroidManfiest.xml__ under `<application>`
|
||||
* ```
|
||||
* <meta-data
|
||||
* tools:replace="android:value"
|
||||
* android:name="firebase_analytics_collection_enabled"
|
||||
* android:value="true"/>
|
||||
*
|
||||
* <meta-data
|
||||
* tools:replace="android:value"
|
||||
* android:name="google_analytics_automatic_screen_reporting_enabled"
|
||||
* android:value="false"/>
|
||||
* ```
|
||||
*
|
||||
* And in the same file, you'll have to add `xmlns:tools="http://schemas.android.com/tools"` to your _manifest_ tag.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { FirebaseAnalytics } from '@ionic-native/firebase-analytics/ngx';
|
||||
|
||||
@@ -7,10 +7,6 @@ export interface IDynamicLink {
|
||||
deepLink: string;
|
||||
}
|
||||
|
||||
export interface ICreatedDynamicLink {
|
||||
url: string;
|
||||
}
|
||||
|
||||
export interface ILinkOptions {
|
||||
domainUriPrefix?: string;
|
||||
link?: string;
|
||||
@@ -101,6 +97,17 @@ export interface ILinkOptions {
|
||||
})
|
||||
@Injectable()
|
||||
export class FirebaseDynamicLinks extends IonicNativePlugin {
|
||||
/**
|
||||
* Determines if the app has a pending dynamic link and provides access to the dynamic link parameters.
|
||||
* @return {Promise<IDynamicLink>} Returns a promise
|
||||
*/
|
||||
@Cordova({
|
||||
otherPromise: true,
|
||||
})
|
||||
getDynamicLink(): Promise<IDynamicLink> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers callback that is triggered on each dynamic link click.
|
||||
* @return {Observable<IDynamicLink>} Returns an observable
|
||||
@@ -116,36 +123,36 @@ export class FirebaseDynamicLinks extends IonicNativePlugin {
|
||||
/**
|
||||
* Creates a Dynamic Link from the parameters. Returns a promise fulfilled with the new dynamic link url.
|
||||
* @param {ILinkOptions} opt [Dynamic Link Parameters](https://github.com/chemerisuk/cordova-plugin-firebase-dynamiclinks#dynamic-link-parameters)
|
||||
* @return {Promise<ICreatedDynamicLink>} Returns a promise with the url
|
||||
* @return {Promise<string>} Returns a promise with the url
|
||||
*/
|
||||
@Cordova({
|
||||
otherPromise: true,
|
||||
})
|
||||
createDynamicLink(opts: ILinkOptions): Promise<ICreatedDynamicLink> {
|
||||
createDynamicLink(opts: ILinkOptions): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a shortened Dynamic Link from the parameters. Shorten the path to a string that is only as long as needed to be unique, with a minimum length of 4 characters. Use this method if sensitive information would not be exposed if a short Dynamic Link URL were guessed.
|
||||
* @param {ILinkOptions} opt [Dynamic Link Parameters](https://github.com/chemerisuk/cordova-plugin-firebase-dynamiclinks#dynamic-link-parameters)
|
||||
* @return {Promise<ICreatedDynamicLink>} Returns a promise with the url
|
||||
* @return {Promise<string>} Returns a promise with the url
|
||||
*/
|
||||
@Cordova({
|
||||
otherPromise: true,
|
||||
})
|
||||
createShortDynamicLink(opts: ILinkOptions): Promise<ICreatedDynamicLink> {
|
||||
createShortDynamicLink(opts: ILinkOptions): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a Dynamic Link from the parameters. Shorten the path to an unguessable string. Such strings are created by base62-encoding randomly generated 96-bit numbers, and consist of 17 alphanumeric characters. Use unguessable strings to prevent your Dynamic Links from being crawled, which can potentially expose sensitive information.
|
||||
* @param {ILinkOptions} opt [Dynamic Link Parameters](https://github.com/chemerisuk/cordova-plugin-firebase-dynamiclinks#dynamic-link-parameters)
|
||||
* @return {Promise<ICreatedDynamicLink>} Returns a promise with the url
|
||||
* @return {Promise<string>} Returns a promise with the url
|
||||
*/
|
||||
@Cordova({
|
||||
otherPromise: true,
|
||||
})
|
||||
createUnguessableDynamicLink(opts: ILinkOptions): Promise<ICreatedDynamicLink> {
|
||||
createUnguessableDynamicLink(opts: ILinkOptions): Promise<string> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,40 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
export interface Text {
|
||||
text: string;
|
||||
blocks: TextLine[];
|
||||
imageHeight: number;
|
||||
imageWidth: number;
|
||||
}
|
||||
|
||||
export interface TextLine extends TextBlock {
|
||||
lines: TextElement[]
|
||||
}
|
||||
|
||||
export interface TextElement extends TextBlock {
|
||||
elements: TextBlock[]
|
||||
}
|
||||
|
||||
export interface TextBlock {
|
||||
text: string;
|
||||
cornerPoints: TextPoint[]
|
||||
frame: TextFrame
|
||||
recognizedLanguages: string
|
||||
}
|
||||
|
||||
export interface TextPoint {
|
||||
x: number,
|
||||
y: number
|
||||
}
|
||||
|
||||
export interface TextFrame {
|
||||
x: number,
|
||||
y: number,
|
||||
width: number,
|
||||
height: number
|
||||
}
|
||||
|
||||
export enum BarcodeFormat {
|
||||
UNKNOWN = -1,
|
||||
ALL_FORMATS = 0,
|
||||
@@ -96,6 +130,8 @@ export interface Barcode {
|
||||
rawValue: string
|
||||
displayValue: string
|
||||
cornerPoints: any
|
||||
imageHeight: number
|
||||
imageWidth: number
|
||||
email: BarcodeEmail
|
||||
phone: BarcodePhone
|
||||
sms: BarcodeSms
|
||||
@@ -180,6 +216,11 @@ export interface BarcodeDriverLicense {
|
||||
issuingCountry: string
|
||||
}
|
||||
|
||||
export interface ImageLabel {
|
||||
index: number,
|
||||
confidence: number,
|
||||
text: string
|
||||
}
|
||||
/**
|
||||
* @name Firebase Vision
|
||||
* @description
|
||||
@@ -203,6 +244,10 @@ export interface BarcodeDriverLicense {
|
||||
* .then((res: Barcode[]) => console.log(res))
|
||||
* .catch((error: string) => console.error(error));
|
||||
*
|
||||
* this.firebaseVision.imageLabeler(FILE_URI)
|
||||
* .then((res: ImageLabel[]) => console.log(res))
|
||||
* .catch((error: string) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
@@ -220,12 +265,25 @@ export class FirebaseVision extends IonicNativePlugin {
|
||||
* @return {Promise<string>} Returns a promise that fulfills with the text in the image
|
||||
*/
|
||||
@Cordova()
|
||||
onDeviceTextRecognizer(file_uri: string): Promise<string> {
|
||||
onDeviceTextRecognizer(file_uri: string): Promise<Text> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read data from Barcode
|
||||
* @param file_uri {string} Image URI
|
||||
* @return {Promise<Barcode[]>} Returns a promise that fulfills with the data in barcode
|
||||
*/
|
||||
@Cordova()
|
||||
barcodeDetector(file_uri: string): Promise<Barcode[]> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Recognize object in image
|
||||
* @param file_uri {string} Image URI
|
||||
* @return {Promise<ImageLabel[]>} Returns a promise that fulfills with the information about entities in an image
|
||||
*/
|
||||
@Cordova()
|
||||
imageLabeler(file_uri: string): Promise<ImageLabel[]> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,6 +179,15 @@ export class FirebaseX extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reload the current FCM user.
|
||||
* @return {Promise<FirebaseUser | string>}
|
||||
*/
|
||||
@Cordova()
|
||||
reloadCurrentUser(): Promise<FirebaseUser | string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get notified when a token is refreshed.
|
||||
* @return {Observable<any>}
|
||||
@@ -517,13 +526,18 @@ export class FirebaseX extends IonicNativePlugin {
|
||||
* code {string} - verification code. Will only be present if instantVerification is true. Always undefined on iOS.
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
callbackOrder: 'reverse',
|
||||
})
|
||||
verifyPhoneNumber(
|
||||
phoneNumber: string,
|
||||
timeOutDuration: number,
|
||||
fakeVerificationCode?: string
|
||||
): Promise<any> {
|
||||
verifyPhoneNumber(phoneNumber: string, timeOutDuration: number, fakeVerificationCode?: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Switch current authentification system language, for example, the phone sms code.
|
||||
* @param lang - language to change, ex: 'fr' for french
|
||||
*/
|
||||
@Cordova()
|
||||
setLanguageCode(lang: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -192,10 +192,10 @@ export class Geolocation extends IonicNativePlugin {
|
||||
* ```
|
||||
*
|
||||
* @param {GeolocationOptions} options The [geolocation options](https://developer.mozilla.org/en-US/docs/Web/API/PositionOptions).
|
||||
* @returns {Observable<Geoposition>} Returns an Observable that notifies with the [position](https://developer.mozilla.org/en-US/docs/Web/API/Position) of the device, or errors.
|
||||
* @returns {Observable<Geoposition | PositionError>} Returns an Observable that notifies with the [position](https://developer.mozilla.org/en-US/docs/Web/API/Position) of the device, or errors.
|
||||
*/
|
||||
watchPosition(options?: GeolocationOptions): Observable<Geoposition> {
|
||||
return new Observable<Geoposition>((observer: any) => {
|
||||
watchPosition(options?: GeolocationOptions): Observable<Geoposition | PositionError> {
|
||||
return new Observable<Geoposition | PositionError>((observer: any) => {
|
||||
const watchId = navigator.geolocation.watchPosition(
|
||||
observer.next.bind(observer),
|
||||
observer.next.bind(observer),
|
||||
|
||||
@@ -352,7 +352,7 @@ export class HTTP extends IonicNativePlugin {
|
||||
method: 'get' | 'post' | 'put' | 'patch' | 'head' | 'delete' | 'options' | 'upload' | 'download';
|
||||
data?: { [index: string]: any };
|
||||
params?: { [index: string]: string | number };
|
||||
serializer?: 'json' | 'urlencoded' | 'utf8' | 'multipart';
|
||||
serializer?: 'json' | 'urlencoded' | 'utf8' | 'multipart' | 'raw';
|
||||
timeout?: number;
|
||||
headers?: { [index: string]: string };
|
||||
filePath?: string | string[];
|
||||
|
||||
@@ -1,212 +1,234 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import {
|
||||
Plugin,
|
||||
Cordova,
|
||||
CordovaProperty,
|
||||
CordovaInstance,
|
||||
InstanceProperty,
|
||||
IonicNativePlugin,
|
||||
} from '@ionic-native/core';
|
||||
import { kMaxLength } from 'buffer';
|
||||
import { resolve } from 'dns';
|
||||
import { reject } from 'lodash';
|
||||
import { error } from 'console';
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* @name HyperTrack
|
||||
* @description
|
||||
* HyperTrack cordova plugin wrapper for Ionic Native. Location-based services provider.
|
||||
* Make sure to include your publishable key at config.xml (see [HyperTrack Cordova Setup](https://docs.hypertrack.com/sdks/cordova/setup.html#step-2-configure-the-sdk)).
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { HyperTrack } from '@ionic-native/hyper-track/ngx';
|
||||
*
|
||||
* constructor(private hyperTrack: HyperTrack) { }
|
||||
*
|
||||
* // Check if app has location permissions enabled
|
||||
* this.hyperTrack.checkLocationPermission().then(response => {
|
||||
* // response (String) can be "true" or "false"
|
||||
* if (response != "true") {
|
||||
* // Ask for permissions
|
||||
* this.hyperTrack.requestPermissions().then(response => {}, error => {});
|
||||
* }
|
||||
* }, error => {});
|
||||
*
|
||||
* // Check if app has location services enabled
|
||||
* this.hyperTrack.checkLocationServices().then(response => {
|
||||
* // response (String) can be "true" or "false"
|
||||
* if (response != "true") {
|
||||
* // Request services to be enabled
|
||||
* this.hyperTrack.requestLocationServices().then(response => {}, error => {});
|
||||
* }
|
||||
* }, error => {});
|
||||
*
|
||||
* // First set the current user. This can be done via getOrCreateUser() or setUserId()
|
||||
* this.hyperTrack.setUserId("xxx").then(user => {
|
||||
* // user (String) is a String representation of a User's JSON
|
||||
*
|
||||
* this.hyperTrack.startTracking().then(userId => {}, trackingError => {});
|
||||
*
|
||||
* this.hyperTrack.createAndAssignAction('visit', 'lookupId','address', 20.12, -100.3).then(action => {
|
||||
* // Handle action. It's a String representation of the Action's JSON. For example:
|
||||
* // '{"eta":"Jul 17, 2017 12:50:03 PM","assigned_at":"Jul 17, 2017 12:34:38 PM",,"distance":"0.0",...}'
|
||||
* }, error => {});
|
||||
*
|
||||
* // You can complete an action with completeAction() or completeActionWithLookupId()
|
||||
* this.hyperTrack.completeAction('action-id').then(response => {
|
||||
* // Handle response (String). Should be "OK".
|
||||
* }, error => {});
|
||||
*
|
||||
* this.hyperTrack.getCurrentLocation().then(location => {
|
||||
* // Handle location. It's a String representation of a Location's JSON.For example:
|
||||
* // '{"mAccuracy":22.601,,"mLatitude":23.123456, "mLongitude":-100.1234567, ...}'
|
||||
* }, error => {});
|
||||
*
|
||||
* this.hyperTrack.stopTracking().then(success => {
|
||||
* // Handle success (String). Should be "OK".
|
||||
* }, error => {});
|
||||
*
|
||||
* }, error => {});*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'HyperTrack',
|
||||
plugin: 'cordova-plugin-hypertrack',
|
||||
pluginRef: 'cordova.plugins.HyperTrack',
|
||||
repo: 'https://github.com/hypertrack/hypertrack-cordova',
|
||||
pluginName: 'cordova-plugin-hypertrack-v3',
|
||||
plugin: 'cordova-plugin-hypertrack-v3',
|
||||
pluginRef: 'hypertrack',
|
||||
repo: 'https://github.com/hypertrack/cordova-plugin-hypertrack.git',
|
||||
platforms: ['Android'],
|
||||
})
|
||||
@Injectable()
|
||||
export class HyperTrack extends IonicNativePlugin {
|
||||
/**
|
||||
* Returns given text. For testing purposes.
|
||||
* @param {String} text Given text to print
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the result text (which is the same as the given text) if successful, or it gets rejected if an error ocurred.
|
||||
*/
|
||||
export class HyperTrackPlugin extends IonicNativePlugin {
|
||||
@Cordova()
|
||||
helloWorld(text: String): Promise<String> {
|
||||
initialize(publishableKey: string): Promise<HyperTrackCordova> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new user to identify the current device or get a user from a lookup id.
|
||||
* @param {String} name User's name
|
||||
* @param {String} phone User's phone
|
||||
* @param {String} photo User's photo as URL or a Base64 converted string
|
||||
* @param {String} lookupId User's lookupId, which is used to check if a new user is to be created (in this case you could set it to an internal reference for the user that you can use later to identify it), or if one with an existing lookupId is to be used.
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with a string representation of the User's JSON, or it gets rejected if an error ocurred.
|
||||
*/
|
||||
@Cordova()
|
||||
getOrCreateUser(name: String, phone: String, photo: String, lookupId: String): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set UserId for the SDK created using HyperTrack APIs. This is useful if you already have a user previously created.
|
||||
* @param {String} userId User's ID
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with an "OK" string if successful, or it gets rejected if an error ocurred. An "OK" response doesn't necessarily mean that the userId was found. It just means that it was set correctly.
|
||||
*/
|
||||
@Cordova()
|
||||
setUserId(userId: String): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable the SDK and start tracking. This will fail if there is no user set.
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the userId (String) of the User being tracked if successful, or it gets rejected if an error ocurred. One example of an error is not setting a User with getOrCreateUser() or setUserId() before calling this function.
|
||||
*/
|
||||
@Cordova()
|
||||
startTracking(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create and assign an action to the current user using specified parameters
|
||||
* @param {String} type The action type. Can be one from "pickup", "delivery", "dropoff", "visit", "stopover" or "task"
|
||||
* @param {String} lookupId The Action's desired lookupId
|
||||
* @param {String} expectedPlaceAddress The address of the Action
|
||||
* @param {Number} expectedPlaceLatitude The latitude of the Action
|
||||
* @param {Number} expectedPlaceLongitude The longitude of the Action
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with a string representation of the Action's JSON, or it gets rejected if an error ocurred.
|
||||
*/
|
||||
@Cordova()
|
||||
createAndAssignAction(
|
||||
type: String,
|
||||
lookupId: String,
|
||||
expectedPlaceAddress: String,
|
||||
expectedPlaceLatitude: Number,
|
||||
expectedPlaceLongitude: Number
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Complete an action from the SDK by its ID
|
||||
* @param {String} actionId ID of the Action that will be marked as completed
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with an "OK" string if successful, or it gets rejected if an error ocurred.
|
||||
*/
|
||||
@Cordova()
|
||||
completeAction(actionId: String): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Complete an action from the SDK using Action's lookupId as parameter
|
||||
* @param {String} lookupId Lookup ID of the Action that will be marked as completed
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with an "OK" string if successful, or it gets rejected if an error ocurred.
|
||||
*/
|
||||
@Cordova()
|
||||
completeActionWithLookupId(lookupId: String): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable the SDK and stop tracking.
|
||||
* Needs user setting (via getOrCreateUser() or setUserId()) first.
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the an "OK" string if successful, or it gets rejected if an error ocurred. One example of an error is not setting a User with getOrCreateUser() or setUserId() before calling this function.
|
||||
*/
|
||||
@Cordova()
|
||||
stopTracking(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user's current location from the SDK
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with a string representation of the Location's JSON, or it gets rejected if an error ocurred.
|
||||
*/
|
||||
@Cordova()
|
||||
getCurrentLocation(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if Location permission has been granted to the app (for Android).
|
||||
* Returns "true" or "false" in success method accordingly.
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the a string that can be "true" or "false", depending if location permission was granted, or it gets rejected if an error ocurred.
|
||||
*/
|
||||
@Cordova()
|
||||
checkLocationPermission(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request user to grant Location access to the app (for Anrdoid).
|
||||
* For Android Marshmallow and above. In other platforms, the Promise is never resolved.
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the a string that can be "true" or "false", depending if Location access was given to the app, or it gets rejected if an error ocurred.
|
||||
*/
|
||||
@Cordova()
|
||||
requestPermissions(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if Location services are enabled on the device (for Android).
|
||||
* Returns "true" or "false" in success method accordingly.
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the a string that can be "true" or "false", depending if location services are enabled, or it gets rejected if an error ocurred.
|
||||
*/
|
||||
@Cordova()
|
||||
checkLocationServices(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request user to enable Location services on the device.
|
||||
* For Android Marshmallow and above. In other platforms, the Promise is never resolved.
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the a string that can be "true" or "false", depending if Location services were enabled, or it gets rejected if an error ocurred.
|
||||
*/
|
||||
@Cordova()
|
||||
requestLocationServices(): Promise<any> {
|
||||
enableDebugLogging(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Interfaces for Cordova Plugin callbacks
|
||||
interface DeviceIdReceiver {
|
||||
(deviceId: string): any;
|
||||
}
|
||||
interface TrackingStateReceiver {
|
||||
(isRunning: boolean): any;
|
||||
}
|
||||
interface FailureHandler {
|
||||
(error: Error): any;
|
||||
}
|
||||
interface SuccessHandler {
|
||||
(): any;
|
||||
}
|
||||
|
||||
// SDK instance that exposed from Cordova utilizes usage of callbacks, so we
|
||||
// wrap it with adapter to avoid mix of callbacks and Promises
|
||||
interface HyperTrackCordova {
|
||||
getDeviceId(success: DeviceIdReceiver, error: FailureHandler): void;
|
||||
isRunning(success: TrackingStateReceiver, error: FailureHandler): void;
|
||||
setDeviceName(name: string, success: SuccessHandler, error: FailureHandler): void;
|
||||
setDeviceMetadata(metadata: Object, success: SuccessHandler, error: FailureHandler): void;
|
||||
setTrackingNotificationProperties(
|
||||
title: string,
|
||||
message: string,
|
||||
success: SuccessHandler,
|
||||
error: FailureHandler
|
||||
): void;
|
||||
addGeoTag(geotagData: Object, expectedLocation: Coordinates, success: SuccessHandler, error: FailureHandler): void;
|
||||
requestPermissionsIfNecessary(success: SuccessHandler, error: FailureHandler): void;
|
||||
allowMockLocations(success: SuccessHandler, error: FailureHandler): void;
|
||||
syncDeviceSettings(success: SuccessHandler, error: FailureHandler): void;
|
||||
}
|
||||
|
||||
export class CoordinatesValidationError extends Error {}
|
||||
|
||||
/** Wrapper class for passing spatial geoposition as a geotag's expected location */
|
||||
export class Coordinates {
|
||||
constructor(latitude: number, longitude: number) {
|
||||
if (latitude < -90.0 || latitude > 90.0 || longitude < -180.0 || longitude > 180.0) {
|
||||
throw new CoordinatesValidationError('latitude and longitude should be of correct valaues');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { HyperTrack } from '@ionic-native/hyper-track';
|
||||
*
|
||||
* initializeHypertrack() {
|
||||
* HyperTrack.enableDebugLogging();
|
||||
* HyperTrack.initialize('YOUR_PUBLISHING_KEY')
|
||||
* .then( this.onSdkInstanceReceived )
|
||||
* .catch( (err) => console.error("HyperTrack init failed with error " + err) );
|
||||
* }
|
||||
* onSdkInstanceReceived(sdkInstance: HyperTrack) {
|
||||
* sdkInstance.getDeviceId()
|
||||
* .then((id) => console.log("Got device id " + id))
|
||||
* .then(() => sdkInstance.setDeviceName("Elvis Ionic"))
|
||||
* .then(() => console.log("Device name was changed"))
|
||||
* .then(() => sdkInstance.setDeviceMetadata({platform: "Ionic Android"}))
|
||||
* .then(() => console.log("Device metadata was changed"))
|
||||
* .then(() => sdkInstance.setTrackingNotificationProperties("Tracking On", "Ionic SDK is tracking"))
|
||||
* .then(() => console.log("Notification properties were changed"))
|
||||
* .catch((err) => console.error("Got error in HyperTrack " + err));
|
||||
* }
|
||||
*
|
||||
* ```
|
||||
*
|
||||
*/
|
||||
export class HyperTrack {
|
||||
/** Enables debug log in native HyperTrack SDK. */
|
||||
static enableDebugLogging(): void {
|
||||
new HyperTrackPlugin().enableDebugLogging();
|
||||
}
|
||||
|
||||
/**
|
||||
* Entry point into SDK.
|
||||
*
|
||||
* Initializes SDK. Also resolves SDK instance that could be used to query deviceId or set
|
||||
* various data.
|
||||
* @param publishableKey account-specific secret from the HyperTrack dashborad.
|
||||
*
|
||||
* @see {@link https://dashboard.hypertrack.com/setup}.
|
||||
*/
|
||||
static initialize(publishableKey: string): Promise<HyperTrack> {
|
||||
return new Promise((resolve, reject) => {
|
||||
new HyperTrackPlugin()
|
||||
.initialize(publishableKey)
|
||||
.then((cordovaInstance: HyperTrackCordova) => {
|
||||
resolve(new HyperTrack(cordovaInstance));
|
||||
})
|
||||
.catch((err: Error) => reject(err));
|
||||
});
|
||||
}
|
||||
|
||||
/** Resolves device ID that could be used to identify the device. */
|
||||
getDeviceId(): Promise<string> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.getDeviceId(
|
||||
deviceId => resolve(deviceId),
|
||||
err => reject(err)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/** Resolves to true if tracking service is running and false otherwise */
|
||||
isRunning(): Promise<boolean> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.isRunning(
|
||||
isRunning => resolve(isRunning),
|
||||
err => reject(err)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/** Sets device name that could be used to identify the device in HyperTrack dashboard */
|
||||
setDeviceName(name: string): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.setDeviceName(
|
||||
name,
|
||||
() => resolve(),
|
||||
err => reject(err)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this to set additional properties, like segments, teams etc.
|
||||
* @param metadata key-value pais of properties.
|
||||
*/
|
||||
setDeviceMetadata(metadata: Object): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.setDeviceMetadata(
|
||||
metadata,
|
||||
() => resolve(),
|
||||
err => reject(err)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/** Updates title and text in persistent notification, that appears when tracking is active. */
|
||||
setTrackingNotificationProperties(title: string, message: string): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.setTrackingNotificationProperties(
|
||||
title,
|
||||
message,
|
||||
() => resolve(),
|
||||
err => reject(err)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/** Adds special marker-like object to device timeline. */
|
||||
addGeotag(geotagData: Object, expectedLocation?: Coordinates): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.addGeoTag(
|
||||
geotagData,
|
||||
expectedLocation,
|
||||
() => resolve(),
|
||||
err => reject(err)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/** Pops up permission request dialog, if permissions weren't granted before or does nothing otherwise. */
|
||||
requestPermissionsIfNecessary(): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.requestPermissionsIfNecessary(
|
||||
() => resolve(),
|
||||
err => reject(err)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/** Allows injecting false locations into the SDK, which ignores them by default. */
|
||||
allowMockLocations(): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.allowMockLocations(
|
||||
() => resolve(),
|
||||
err => reject(err)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Synchronizes tracking state with platform model. This method is used to
|
||||
* harden platform2device communication channel.
|
||||
*/
|
||||
syncDeviceSettings(): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.syncDeviceSettings(
|
||||
() => resolve(),
|
||||
err => reject(err)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
private constructor(private cordovaInstanceHandle: HyperTrackCordova) {}
|
||||
}
|
||||
|
||||
@@ -293,7 +293,7 @@ export class IBeacon extends IonicNativePlugin {
|
||||
*/
|
||||
@CordovaCheck({ sync: true })
|
||||
Delegate(): IBeaconDelegate {
|
||||
const delegate = new cordova.plugins.locationManager.Delegate();
|
||||
const delegate = new window.cordova.plugins.locationManager.Delegate();
|
||||
|
||||
delegate.didChangeAuthorizationStatus = (pluginResult?: IBeaconPluginResult) => {
|
||||
return new Observable<IBeaconPluginResult>((observer: any) => {
|
||||
@@ -358,7 +358,7 @@ export class IBeacon extends IonicNativePlugin {
|
||||
});
|
||||
};
|
||||
|
||||
cordova.plugins.locationManager.setDelegate(delegate);
|
||||
window.cordova.plugins.locationManager.setDelegate(delegate);
|
||||
return delegate;
|
||||
}
|
||||
|
||||
@@ -382,7 +382,7 @@ export class IBeacon extends IonicNativePlugin {
|
||||
minor?: number,
|
||||
notifyEntryStateOnDisplay?: boolean
|
||||
): BeaconRegion {
|
||||
return new cordova.plugins.locationManager.BeaconRegion(identifer, uuid, major, minor, notifyEntryStateOnDisplay);
|
||||
return new window.cordova.plugins.locationManager.BeaconRegion(identifer, uuid, major, minor, notifyEntryStateOnDisplay);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
480
src/@ionic-native/plugins/imap/index.ts
Normal file
480
src/@ionic-native/plugins/imap/index.ts
Normal file
@@ -0,0 +1,480 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
export interface Config {
|
||||
/**
|
||||
* Hostname or IP address of the IMAP service, for example: imap.gmail.com, imap-mail.outlook.com....
|
||||
*/
|
||||
host: string;
|
||||
/**
|
||||
* Username or email address for authentication.
|
||||
*/
|
||||
user: string;
|
||||
/**
|
||||
* Password for authentication.
|
||||
*/
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface Connection {
|
||||
/**
|
||||
* Connection Status: true or false, "true" means connected successfully; "false" means failed to connect.
|
||||
*/
|
||||
status: boolean;
|
||||
/**
|
||||
* Optional parameter. A connection string, returned as a confirmation for successful connection.
|
||||
*/
|
||||
connection?: string;
|
||||
/**
|
||||
* Optional parameter. Error, returned if the connecting process has failed.
|
||||
*/
|
||||
exception?: string;
|
||||
}
|
||||
|
||||
export interface Message {
|
||||
/**
|
||||
* Message consecutive number.
|
||||
*/
|
||||
messageNumber: number;
|
||||
/**
|
||||
* The name of the folder where the message is contained.
|
||||
*/
|
||||
folder: string;
|
||||
/**
|
||||
* Sender's data.
|
||||
*/
|
||||
from: Address[];
|
||||
/**
|
||||
* Optional. All recipients data.
|
||||
*/
|
||||
allRecipients?: Address[];
|
||||
/**
|
||||
* TO recipients data.
|
||||
*/
|
||||
toRecipients: Address[];
|
||||
/**
|
||||
* CC recipients data.
|
||||
*/
|
||||
ccRecipients: Address[];
|
||||
/**
|
||||
* BCC recipients data.
|
||||
*/
|
||||
bccRecipients: Address[];
|
||||
/**
|
||||
* Optional. Reply data.
|
||||
*/
|
||||
replyTo?: Address[];
|
||||
/**
|
||||
* Optional. Date when the message was sent.
|
||||
*/
|
||||
sentDate?: string;
|
||||
/**
|
||||
* The date when the message was received.
|
||||
*/
|
||||
receivedDate: string;
|
||||
/**
|
||||
* Message's subject header.
|
||||
*/
|
||||
subject: string;
|
||||
/**
|
||||
* Optional. Short description for the message.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Optional.
|
||||
*/
|
||||
fileName?: string;
|
||||
/**
|
||||
* Optional.
|
||||
*/
|
||||
disposition?: string;
|
||||
/**
|
||||
* Message's active flags.
|
||||
*/
|
||||
flags: string;
|
||||
/**
|
||||
* Optional.
|
||||
*/
|
||||
lineCount?: number;
|
||||
/**
|
||||
* Optional. All Headers available on a message.
|
||||
*/
|
||||
allMessageHeaders?: object;
|
||||
/**
|
||||
* Optional. Type of message's content.
|
||||
*/
|
||||
contentType?: string;
|
||||
/**
|
||||
* Optional. Message's body with its content and attachments.
|
||||
*/
|
||||
bodyContent?: Content[];
|
||||
/**
|
||||
* Optional. Message's memory size.
|
||||
*/
|
||||
size?: number;
|
||||
}
|
||||
|
||||
export interface Address {
|
||||
/**
|
||||
* Email address.
|
||||
*/
|
||||
address: string;
|
||||
/**
|
||||
* Optional. Name of the email address's owner.
|
||||
*/
|
||||
personal?: string;
|
||||
/**
|
||||
* Data type.
|
||||
*/
|
||||
type: string;
|
||||
}
|
||||
|
||||
export interface Content {
|
||||
/**
|
||||
* Content data type.
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
* Optional. The name of the file.
|
||||
*/
|
||||
fileName?: string;
|
||||
/**
|
||||
* Message's content.
|
||||
*/
|
||||
content: string;
|
||||
}
|
||||
|
||||
export interface ModificationResult {
|
||||
/**
|
||||
* Status of the applied changes. "True" success; "False" failure
|
||||
*/
|
||||
status: boolean;
|
||||
/**
|
||||
* Array with consecutive numbers of modified messages.
|
||||
*/
|
||||
modifiedMessages: number[];
|
||||
}
|
||||
|
||||
export enum Comparison {
|
||||
/**
|
||||
* The less than or equal to operator.
|
||||
*/
|
||||
LE = 'LE',
|
||||
/**
|
||||
* The less than operator.
|
||||
*/
|
||||
LT = 'LT',
|
||||
/**
|
||||
* The equality operator.
|
||||
*/
|
||||
EQ = 'EQ',
|
||||
/**
|
||||
* The not equal to operator.
|
||||
*/
|
||||
NE = 'NE',
|
||||
/**
|
||||
* The greater than operator.
|
||||
*/
|
||||
GT = 'GT',
|
||||
/**
|
||||
* The greater than or equal to operator.
|
||||
*/
|
||||
GE = 'GE',
|
||||
}
|
||||
|
||||
/**
|
||||
* All available message flags. Set or remove flag using "setFlag()".
|
||||
*/
|
||||
export enum FlagEnum {
|
||||
/**
|
||||
* "ANSWERED" message flag
|
||||
*/
|
||||
ANSWERED = 'ANSWERED',
|
||||
/**
|
||||
* "DRAFT" message flag
|
||||
*/
|
||||
DRAFT = 'DRAFT',
|
||||
/**
|
||||
* "FLAGGED" message flag
|
||||
*/
|
||||
FLAGGED = 'FLAGGED',
|
||||
/**
|
||||
* "RECENT" message flag
|
||||
*/
|
||||
RECENT = 'RECENT',
|
||||
/**
|
||||
* "SEEN" message flag
|
||||
*/
|
||||
SEEN = 'SEEN',
|
||||
/**
|
||||
* "USER" message flag
|
||||
*/
|
||||
USER = 'USER',
|
||||
/**
|
||||
* "DELETED" message flag. Note: Add this flag to delete the message from the mailbox
|
||||
*/
|
||||
DELETED = 'DELETED',
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Imap
|
||||
* @description
|
||||
* This plugin will enable an Ionic application to use the IMAP (Internet Message Access Protocol) features.
|
||||
* This plugin is in Beta version and it offers support only for Android.
|
||||
* The plugin uses Java Mail API.
|
||||
* Planned improvements and support for iOS.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Imap } from '@ionic-native/imap/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private imap: Imap) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.imap.connect({
|
||||
* host: 'imap.gmail.com',
|
||||
* user: 'my_email@gmail.com',
|
||||
* password: 'my-pass'
|
||||
* })
|
||||
* .then((res: Connection) => console.log(res))
|
||||
* .catch((error) => console.error(error));
|
||||
*
|
||||
*
|
||||
*
|
||||
* this.imap.disconnect()
|
||||
* .then((res: boolean) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
*
|
||||
*
|
||||
* this.imap.isConnected()
|
||||
* .then((res: boolean) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* Note: Connected to an IMAP service is REQUIRED to be able to get data from the below functions.
|
||||
*
|
||||
*
|
||||
* this.imap.listMailFolders()
|
||||
* .then((res: boolean) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
*
|
||||
* this.imap.getMessageCountByFolderName('INBOX')
|
||||
* .then((res: number) => {
|
||||
* // Returns the count of the messages in the folder as a result
|
||||
* console.log(res)
|
||||
* })
|
||||
* .catch((error: any) => {
|
||||
* console.error(error)
|
||||
* });
|
||||
*
|
||||
*
|
||||
*
|
||||
* this.imap.searchMessagesByDatePeriod('INBOX', 1601503200000, Comparison.GE)
|
||||
* .then((res: number[]) => {
|
||||
* // Returns array with messages' consecutive numbers
|
||||
* // ex. [1207, 1208, 1209]
|
||||
* console.log(res)
|
||||
* })
|
||||
* .catch((error: any) => {
|
||||
* console.error(error)
|
||||
* });
|
||||
*
|
||||
*
|
||||
* this.imap.listMessagesHeadersByConsecutiveNumber('INBOX', 1200, 1280)
|
||||
* .then((res: Message[]) => {
|
||||
* // Returns array with messages' headers data
|
||||
* console.log(res)
|
||||
* })
|
||||
* .catch((error: any) => {
|
||||
* console.error(error)
|
||||
* });
|
||||
*
|
||||
*
|
||||
* this.imap.listMessagesHeadersByDate('INBOX', 1601503200000, Comparison.GE)
|
||||
* .then((res: Message[]) => {
|
||||
* // Returns array with messages' headers data
|
||||
* console.log(res)
|
||||
* })
|
||||
* .catch((error: any) => {
|
||||
* console.error(error)
|
||||
* });
|
||||
*
|
||||
*
|
||||
* this.imap.getFullMessageData('INBOX', 1205)
|
||||
* .then((res: Message) => {
|
||||
* // Returns "Message" object with the full message data including attachments.
|
||||
* console.log(res)
|
||||
* })
|
||||
* .catch((error: any) => {
|
||||
* console.error(error)
|
||||
* });
|
||||
*
|
||||
*
|
||||
* this.imap.copyToFolder('INBOX', 'Spam', [1204, 1205, 1206, 1207])
|
||||
* .then((res: boolean) => {
|
||||
* // Returns "true" if the process is successful, else returns "false".
|
||||
* console.log(res)
|
||||
* })
|
||||
* .catch((error: any) => {
|
||||
* console.error(error)
|
||||
* });
|
||||
*
|
||||
*
|
||||
* * Sets a flag on a message
|
||||
* * "setFlag()" can be used for deleting messages setting the Delete flag to "FlagEnum.DELETED"
|
||||
* this.imap.setFlag('INBOX', [1206, 1205, 1204], FlagEnum.SEEN, true)
|
||||
* .then((res: ModificationResult) => {
|
||||
*
|
||||
* // res.status - return true or false based on the deletion success
|
||||
*
|
||||
* //res.modifiedMessages - for ex.[1206, 1205, 1204];
|
||||
*
|
||||
* })
|
||||
* .catch((error: any) => {
|
||||
* console.error(error)
|
||||
* });
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Imap',
|
||||
plugin: 'cordova-plugin-imap',
|
||||
pluginRef: 'imap',
|
||||
repo: 'https://github.com/aleksandar888/cordova-plugin-imap.git',
|
||||
platforms: ['Android'],
|
||||
})
|
||||
@Injectable()
|
||||
export class Imap extends IonicNativePlugin {
|
||||
/**
|
||||
* This function "connect(clientData: Config)" tries to connect and authenticate with the IMAP server.
|
||||
* @param clientData {Config} Connection configuration
|
||||
* @return {Promise<Connection>} Returns a promise with the connection data
|
||||
*/
|
||||
@Cordova()
|
||||
connect(clientData: Config): Promise<Connection> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* "disconnect()" Closes the connection with the server.
|
||||
* @return {Promise<boolean>} Returns a promise status.
|
||||
*/
|
||||
@Cordova()
|
||||
disconnect(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* "isConnected()" Checks the current state of the connection.
|
||||
* @return {Promise<boolean>} Returns a promise with connection status
|
||||
*/
|
||||
@Cordova()
|
||||
isConnected(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/** Note: Connected to an IMAP service is REQUIRED to be able to get data from the below functions. */
|
||||
|
||||
/**
|
||||
* "listMailFolders()" Lists the name of all the mail folders in the mailbox.
|
||||
* @return {Promise<string[]>} Returns array with all folder names.
|
||||
*/
|
||||
@Cordova()
|
||||
listMailFolders(): Promise<string[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* "getMessageCountByFolderName(folderName: string)" Gets the count of the messages in the folder.
|
||||
* @param folderName {string} The name of the desired folder.
|
||||
* @return {Promise<number>} Returns the consecutive number of the last message.
|
||||
*/
|
||||
@Cordova()
|
||||
getMessageCountByFolderName(folderName: string): Promise<number> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* "searchMessagesByDatePeriod(folderName: string, dateInMilliseconds: number, comparison: Comparison)" Returns the messages' consecutive number.
|
||||
* @param folderName {string} The name of the desired folder
|
||||
* @param dateInMilliseconds {number} Date in milliseconds
|
||||
* @param comparison {Comparison} A comparison operator
|
||||
* @return {Promise<number[]>} Returns array with the messages' consecutive numbers.
|
||||
*/
|
||||
@Cordova()
|
||||
searchMessagesByDatePeriod(
|
||||
folderName: string,
|
||||
dateInMilliseconds: number,
|
||||
comparison: Comparison
|
||||
): Promise<number[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* "listMessagesHeadersByConsecutiveNumber(folderName: string, start: number, end: number)" Returns messages' headers data based on a "start" and "end" message consecutive number.
|
||||
* @param folderName {string} The name of the desired folder
|
||||
* @param start {number} Consecutive number of the first message.
|
||||
* @param end {number} Consecutive number of the last message
|
||||
* @return {Promise<Message[]>} Returns array with the messages' headers data.
|
||||
*/
|
||||
@Cordova()
|
||||
listMessagesHeadersByConsecutiveNumber(folderName: string, start: number, end: number): Promise<Message[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* "listMessagesHeadersByDate(folderName: string, dateInMilliseconds: number, comparison: Comparison)" Returns messages' headers data based on a date.
|
||||
* @param folderName {string} The name of the desired folder
|
||||
* @param dateInMilliseconds {number} Date in milliseconds.
|
||||
* @param comparison {Comparison} A comparison operator
|
||||
* @return {Promise<Message[]>} Returns array messages' headers data.
|
||||
*/
|
||||
@Cordova()
|
||||
listMessagesHeadersByDate(
|
||||
folderName: string,
|
||||
dateInMilliseconds: number,
|
||||
comparison: Comparison
|
||||
): Promise<Message[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* "getFullMessageData(folderName: string, messageNumber: number)" Returns the full message's data including its attachments.
|
||||
* @param folderName {string} The name the message's folder
|
||||
* @param messageNumber {number} Message's consecutive number.
|
||||
* @return {Promise<Message>} Returns "Message" object with full message data.
|
||||
*/
|
||||
@Cordova()
|
||||
getFullMessageData(folderName: string, messageNumber: number): Promise<Message> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* "copyToFolder(sourceFolder: string, destinationFolder: string, messageNums: number[])" Copy messages to a desired folder.
|
||||
* @param sourceFolder {string} The name of the source folder.
|
||||
* @param destinationFolder {string} The name of the destination folder.
|
||||
* @param messageNums {number[]} Array with messages' consecutive numbers or array with single message consecutive number.
|
||||
* @return {Promise<Message>} Returns boolean status of the process.
|
||||
*/
|
||||
@Cordova()
|
||||
copyToFolder(sourceFolder: string, destinationFolder: string, messageNums: number[]): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* "setFlag(folderName: string, messageNums: number[], flag: FlagEnum, status: boolean)" Set or remove flag from a message
|
||||
* @param folderName {string} The name of the source folder where the messages are contained.
|
||||
* @param messageNums {number[]} Array with messages' consecutive numbers or array with single message consecutive number
|
||||
* @param flag {FlagEnum} Desired message flag.
|
||||
* @param status {boolean} Set status to "true" to set the flag on a message; or to "false" to remove the flag from the message
|
||||
* @return {Promise<ModificationResult>} Returns object with status and array with messages' consecutive numbers of the modified messages
|
||||
*/
|
||||
@Cordova()
|
||||
setFlag(folderName: string, messageNums: number[], flag: FlagEnum, status: boolean): Promise<ModificationResult> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -55,9 +55,9 @@ export interface IAPProduct {
|
||||
|
||||
downloaded?: boolean;
|
||||
|
||||
lastRenewalDate?: string;
|
||||
lastRenewalDate?: Date;
|
||||
|
||||
expiryDate?: string;
|
||||
expiryDate?: Date;
|
||||
|
||||
introPrice?: string;
|
||||
|
||||
@@ -541,11 +541,11 @@ export class IAPError {
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'InAppPurchase2',
|
||||
plugin: 'cc.fovea.cordova.purchase',
|
||||
plugin: 'cordova-plugin-purchase',
|
||||
pluginRef: 'store',
|
||||
repo: 'https://github.com/j3k0/cordova-plugin-purchase',
|
||||
platforms: ['iOS', 'Android', 'Windows'],
|
||||
install: 'ionic cordova plugin add cc.fovea.cordova.purchase --variable BILLING_KEY="<ANDROID_BILLING_KEY>"',
|
||||
install: 'ionic cordova plugin add cordova-plugin-purchase --variable BILLING_KEY="<ANDROID_BILLING_KEY>"',
|
||||
})
|
||||
@Injectable()
|
||||
export class InAppPurchase2 extends IonicNativePlugin {
|
||||
|
||||
@@ -214,4 +214,35 @@ export class Intercom extends IonicNativePlugin {
|
||||
sendPushTokenToIntercom(token: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param carouselId {string}
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
displayCarousel(carouselId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param articleId {string}
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
displayArticle(articleId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param bottomPadding {string | number}
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
setBottomPadding(bottomPadding: string | number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,11 +2,11 @@ import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface LuxandConfig {
|
||||
/** The licence key got from Luxand */
|
||||
/** The licence key gotten from Luxand */
|
||||
licence: string;
|
||||
/** The internal database name the tracker should use */
|
||||
dbname: string;
|
||||
/** the number of retry when registering of identifying a face */
|
||||
/** the number of retries when registering or identifying a face */
|
||||
loginTryCount: number;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ export interface OMLFacialData {
|
||||
message: string;
|
||||
/** The unique name generated and associated to a face when registering */
|
||||
name: string;
|
||||
/** The unique id Luxand Face SDK tracker associate to a face in it's internal database */
|
||||
/** The unique id Luxand Face SDK tracker associates to a face in it's internal database */
|
||||
id: number;
|
||||
/** Extra information about the face including age, expressions */
|
||||
extra: {
|
||||
@@ -31,7 +31,7 @@ export interface OMLFacialData {
|
||||
/**
|
||||
* @name Luxand
|
||||
* @description
|
||||
* This plugin let you integrat Luxand Face SDK into your ionic projects, so you can implements face authentication easily in your applications.
|
||||
* This plugin let you integrate Luxand Face SDK into your ionic projects, so you can implement face authentication easily in your application.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
|
||||
@@ -11,6 +11,8 @@ export class MetrixConfig {
|
||||
private defaultTrackerToken: string = null;
|
||||
private shouldLaunchDeeplink = false;
|
||||
private firebaseAppId: string = null;
|
||||
private firebaseProjectId: string = null;
|
||||
private firebaseApiKey: string = null;
|
||||
private isLocationListeningEnable = false;
|
||||
private eventUploadThreshold: number = null;
|
||||
private eventUploadMaxBatchSize: number = null;
|
||||
@@ -32,8 +34,10 @@ export class MetrixConfig {
|
||||
this.defaultTrackerToken = defaultTrackerToken;
|
||||
}
|
||||
|
||||
setFirebaseAppId(firebaseAppId: string) {
|
||||
setFirebaseId(firebaseAppId: string, firebaseProjectId: string, firebaseApiKey: string) {
|
||||
this.firebaseAppId = firebaseAppId;
|
||||
this.firebaseProjectId = firebaseProjectId;
|
||||
this.firebaseApiKey = firebaseApiKey;
|
||||
}
|
||||
|
||||
setAppSecret(secretId: number, info1: number, info2: number, info3: number, info4: number) {
|
||||
|
||||
@@ -129,6 +129,11 @@ export interface Message {
|
||||
vibrate?: boolean; // Android only
|
||||
icon?: string; // Android only
|
||||
category?: string; // Android only
|
||||
chat?: string;
|
||||
browserUrl?: string;
|
||||
deeplink?: string;
|
||||
webViewUrl?: string;
|
||||
inAppDismissTitle?: string;
|
||||
}
|
||||
|
||||
export interface MobileMessagingError {
|
||||
@@ -136,6 +141,12 @@ export interface MobileMessagingError {
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface ChatConfig {
|
||||
ios?: {
|
||||
showModally: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export class DefaultMessageStorage {
|
||||
@Cordova({ sync: true })
|
||||
find(messageId: string, callback: (message: Message) => void) {
|
||||
@@ -437,4 +448,15 @@ export class MobileMessaging extends IonicNativePlugin {
|
||||
defaultMessageStorage(): DefaultMessageStorage | undefined {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays chat view.
|
||||
*
|
||||
* @name showChat
|
||||
* @param {ChatConfig} chat config
|
||||
*/
|
||||
@Cordova()
|
||||
showChat(config?: ChatConfig): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
47
src/@ionic-native/plugins/multiple-document-picker/index.ts
Normal file
47
src/@ionic-native/plugins/multiple-document-picker/index.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* This is a wrapper for MultipleDocumentsPicker plugin
|
||||
*
|
||||
*/
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Multiple Documents Picker
|
||||
* @description
|
||||
* This plugin allows users to pick multiple documents/images at once
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { MultipleDocumentsPicker } from '@ionic-native/multiple-document-picker/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private multipleDocumentsPicker: MultipleDocumentsPicker) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.multipleDocumentsPicker.pick(1)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'MultipleDocumentsPicker',
|
||||
plugin: 'cordova-plugin-multiple-documents-picker',
|
||||
pluginRef: 'multipleDocumentsPicker',
|
||||
repo: 'https://github.com/akeotech/cordova-plugin-multiple-documents-picker',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class MultipleDocumentsPicker extends IonicNativePlugin {
|
||||
/**
|
||||
* This function allow user to show native file picker
|
||||
* @param type {number} To pick type of files: for images send 1, for all files send 2
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
pick(type: number): Promise<any> {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
}
|
||||
@@ -148,9 +148,9 @@ export interface MusicControlsOptions {
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'MusicControls',
|
||||
plugin: 'cordova-plugin-music-controls',
|
||||
plugin: 'cordova-plugin-music-controls2',
|
||||
pluginRef: 'MusicControls',
|
||||
repo: 'https://github.com/homerours/cordova-music-controls-plugin',
|
||||
repo: 'https://github.com/ghenry22/cordova-plugin-music-controls2',
|
||||
platforms: ['Android', 'iOS', 'Windows'],
|
||||
})
|
||||
@Injectable()
|
||||
|
||||
@@ -38,6 +38,14 @@ export interface NfcTag {
|
||||
type?: string;
|
||||
}
|
||||
|
||||
export interface ScanOptions {
|
||||
/**
|
||||
* If true, keep the scan session open so write can be called
|
||||
* after reading. The default value is false.
|
||||
*/
|
||||
keepSessionOpen?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name NFC
|
||||
* @description
|
||||
@@ -85,7 +93,7 @@ export interface NfcTag {
|
||||
plugin: 'phonegap-nfc',
|
||||
pluginRef: 'nfc',
|
||||
repo: 'https://github.com/chariotsolutions/phonegap-nfc',
|
||||
platforms: ['Android', 'BlackBerry 10', 'Windows', 'Windows Phone 8', 'iOS'],
|
||||
platforms: ['Android', 'iOS', 'Windows'],
|
||||
})
|
||||
/**
|
||||
* @{ NFC } class methods
|
||||
@@ -130,7 +138,7 @@ export class NFC extends IonicNativePlugin {
|
||||
* https://github.com/chariotsolutions/phonegap-nfc#nfcscanndef
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
scanNdef(): Promise<NfcTag> {
|
||||
scanNdef(options?: ScanOptions): Promise<NfcTag> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -141,7 +149,7 @@ export class NFC extends IonicNativePlugin {
|
||||
* https://github.com/chariotsolutions/phonegap-nfc#nfcscantag
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
scanTag(): Promise<NfcTag> {
|
||||
scanTag(options?: ScanOptions): Promise<NfcTag> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -303,6 +303,28 @@ export enum OSActionType {
|
||||
ActionTake = 1,
|
||||
}
|
||||
|
||||
/**
|
||||
* Details about the In-App Message action element (button or image) that was tapped on.
|
||||
*/
|
||||
export interface OSInAppMessageAction {
|
||||
/**
|
||||
* An optional click name defined for the action element. null or nil (iOS) if not set.
|
||||
*/
|
||||
click_name: string;
|
||||
/**
|
||||
* An optional URL that opens when the action takes place. null or nil (iOS) if not set.
|
||||
*/
|
||||
click_url: string;
|
||||
/**
|
||||
* `true` if this is the first time the user has pressed any action on the In-App Message.
|
||||
*/
|
||||
first_click: boolean;
|
||||
/**
|
||||
* If `true`, the In-App Message will animate off the screen. If `false`, the In-App Message will stay on screen until the user dismisses it.
|
||||
*/
|
||||
closes_message: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name OneSignal
|
||||
* @description
|
||||
@@ -406,6 +428,7 @@ export enum OSActionType {
|
||||
* OSBackgroundImageLayout
|
||||
* OSNotificationOpenedResult
|
||||
* OSActionType
|
||||
* OSInAppMessageAction
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'OneSignal',
|
||||
@@ -464,6 +487,18 @@ export class OneSignal extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use to process an In-App Message the user just tapped on.
|
||||
*
|
||||
* @return {Observable<OSInAppMessageAction>}
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
})
|
||||
handleInAppMessageClicked(): Observable<OSInAppMessageAction> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* **iOS** - Settings for iOS apps
|
||||
*
|
||||
@@ -781,4 +816,67 @@ export class OneSignal extends IonicNativePlugin {
|
||||
*/
|
||||
@Cordova()
|
||||
removeExternalUserId(): void {}
|
||||
|
||||
/**
|
||||
* Add a trigger. May show an In-App Message if its trigger conditions were met.
|
||||
*
|
||||
* @param {string} key Key for the trigger.
|
||||
* @param {string | number | Object} value Value for the trigger. String or number recommended. Object passed in will be converted to a string.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
addTrigger(key: string, value: string | number | Object): void {}
|
||||
|
||||
/**
|
||||
* Add a map of triggers. May show an In-App Message if its trigger conditions were met.
|
||||
*
|
||||
* @param {Object.<string, string | number | Object>} triggers Allows you to set multiple trigger key/value pairs simultaneously. Pass a json object with key/value pairs like: `{"key": "value", "key2": "value2"}`.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
addTriggers(triggers: Object): void {}
|
||||
|
||||
/**
|
||||
* Removes a single trigger for the given key. May show an In-App Message if its trigger conditions were met.
|
||||
*
|
||||
* @param {string} key Key for trigger to remove.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
removeTriggerForKey(key: string): void {}
|
||||
|
||||
/**
|
||||
* Removes a list of triggers based on a collection (array) of keys. May show an In-App Message if its trigger conditions were met.
|
||||
*
|
||||
* @param {string[]} keys Removes a collection of triggers from their keys. Pass an array of trigger keys like: `["key1", "key2", "key3"]`.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
removeTriggersForKeys(keys: string[]): void {}
|
||||
|
||||
/**
|
||||
* Gets a trigger value for a provided trigger key.
|
||||
*
|
||||
* @param {string} key Key for trigger to get value.
|
||||
* @returns {Promise<string | number | Object>} Return value set with `addTrigger`, or `null`/`nil` (iOS) if never set or removed.
|
||||
*/
|
||||
@Cordova()
|
||||
getTriggerValueForKey(key: string): Promise<string | number | Object> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows you to temporarily pause all In-App Messages. You may want to do this while the user is engaged in an activity that you don't want a message to interrupt (such as watching a video).
|
||||
* An In-App Message that would display if not paused will display right after resume if its conditions to display remains satisfied.
|
||||
*
|
||||
* @param {boolean} pause To pause, set `true`. To resume, set `false`.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
pauseInAppMessages(pause: boolean): void {}
|
||||
}
|
||||
|
||||
@@ -203,11 +203,11 @@ export enum INTRO_ELIGIBILITY_STATUS {
|
||||
* PurchaserInfo
|
||||
* PurchasesEntitlementInfos
|
||||
* PurchasesEntitlementInfo
|
||||
*
|
||||
* PurchasesTransaction
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Purchases',
|
||||
plugin: 'cordova-plugin-purchases@1.1.0',
|
||||
plugin: 'cordova-plugin-purchases@1.3.2',
|
||||
pluginRef: 'Purchases', // the variable reference to call the plugin, example: navigator.geolocation
|
||||
repo: 'https://github.com/RevenueCat/cordova-plugin-purchases', // the github repository URL for the plugin
|
||||
platforms: ['Android', 'iOS'], // Array of platforms supported, example: ['Android', 'iOS']
|
||||
@@ -259,9 +259,12 @@ export class Purchases extends IonicNativePlugin {
|
||||
* @param {boolean} observerMode An optional boolean. Set this to TRUE if you have your own IAP implementation and
|
||||
* want to use only RevenueCat's backend. Default is FALSE. If you are on Android and setting this to ON, you will have
|
||||
* to acknowledge the purchases yourself.
|
||||
* @param {string?} userDefaultsSuiteName An optional string. iOS-only, will be ignored for Android.
|
||||
* Set this if you would like the RevenueCat SDK to store its preferences in a different NSUserDefaults
|
||||
* suite, otherwise it will use standardUserDefaults. Default is null, which will make the SDK use standardUserDefaults.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setup(apiKey: string, appUserID?: string | null, observerMode = false): void {}
|
||||
setup(apiKey: string, appUserID?: string | null, observerMode = false, userDefaultsSuiteName?: string): void {}
|
||||
|
||||
/**
|
||||
* Set this to true if you are passing in an appUserID but it is anonymous, this is true by default if you didn't pass an appUserID
|
||||
@@ -274,6 +277,9 @@ export class Purchases extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Add a dict of attribution information
|
||||
*
|
||||
* @deprecated Use the set<NetworkId> functions instead.
|
||||
*
|
||||
* @param {object} data Attribution data from any of the attribution networks in Purchases.ATTRIBUTION_NETWORKS
|
||||
* @param {ATTRIBUTION_NETWORK} network Which network, see Purchases.ATTRIBUTION_NETWORK
|
||||
* @param {string?} networkUserId An optional unique id for identifying the user. Needs to be a string.
|
||||
@@ -539,8 +545,13 @@ export class Purchases extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Invalidates the cache for purchaser information.
|
||||
* This is useful for cases where purchaser information might have been updated outside of the app, like if a
|
||||
* promotional subscription is granted through the RevenueCat dashboard.
|
||||
*
|
||||
* Most apps will not need to use this method; invalidating the cache can leave your app in an invalid state.
|
||||
* Refer to https://docs.revenuecat.com/docs/purchaserinfo#section-get-user-information for more information on
|
||||
* using the cache properly.
|
||||
*
|
||||
* This is useful for cases where purchaser information might have been updated outside of the
|
||||
* app, like if a promotional subscription is granted through the RevenueCat dashboard.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
invalidatePurchaserInfoCache(): void {}
|
||||
@@ -565,30 +576,137 @@ export class Purchases extends IonicNativePlugin {
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setEmail(email: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the phone number for the user
|
||||
*
|
||||
* @param phoneNumber Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
|
||||
@Cordova({ sync: true })
|
||||
setPhoneNumber(phoneNumber: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the display name for the user
|
||||
*
|
||||
* @param displayName Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
|
||||
@Cordova({ sync: true })
|
||||
setDisplayName(displayName: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the push token for the user
|
||||
*
|
||||
* @param pushToken null will delete the subscriber attribute.
|
||||
* @param pushToken Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
|
||||
@Cordova({ sync: true })
|
||||
setPushToken(pushToken: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the install media source for the user
|
||||
*
|
||||
* @param mediaSource Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setMediaSource(mediaSource: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the install campaign for the user
|
||||
*
|
||||
* @param campaign Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setCampaign(campaign: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the install ad group for the user
|
||||
*
|
||||
* @param adGroup Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setAdGroup(adGroup: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the install ad for the user
|
||||
*
|
||||
* @param ad Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setAd(ad: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the install keyword for the user
|
||||
*
|
||||
* @param keyword Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setKeyword(keyword: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the install ad creative for the user
|
||||
*
|
||||
* @param creative Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setCreative(creative: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the Adjust Id for the user
|
||||
* Required for the RevenueCat Adjust integration
|
||||
*
|
||||
* @param adjustID Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setAdjustId(adjustId: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the AppsFlyer Id for the user
|
||||
* Required for the RevenueCat AppsFlyer integration
|
||||
* @param appsflyerID Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setAppsflyerId(appsflyerId: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the Facebook SDK Anonymous Id for the user
|
||||
* Recommended for the RevenueCat Facebook integration
|
||||
*
|
||||
* @param fbAnonymousID Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setFbAnonymousId(fbAnonymousId: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the mParticle Id for the user
|
||||
* Recommended for the RevenueCat mParticle integration
|
||||
*
|
||||
* @param mparticleID Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setMparticleId(mparticleId: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the OneSignal Player Id for the user
|
||||
* Required for the RevenueCat OneSignal integration
|
||||
*
|
||||
* @param onesignalID Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setOnesignalId(onesignalId: string | null): void {}
|
||||
|
||||
/**
|
||||
* Automatically collect subscriber attributes associated with the device identifiers.
|
||||
* $idfa, $idfv, $ip on iOS
|
||||
* $gpsAdId, $androidId, $ip on Android
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
collectDeviceIdentifiers(): void {}
|
||||
|
||||
/**
|
||||
* Set this property to your proxy URL before configuring Purchases *only* if you've received a proxy key value from your RevenueCat contact.
|
||||
* @param url Proxy URL as a string.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setProxyURL(url: string): void {}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -693,6 +811,11 @@ export interface PurchaserInfo {
|
||||
* Set of purchased skus, active and inactive
|
||||
*/
|
||||
readonly allPurchasedProductIdentifiers: [string];
|
||||
/**
|
||||
* Returns all the non-subscription purchases a user has made.
|
||||
* The purchases are ordered by purchase date in ascending order.
|
||||
*/
|
||||
readonly nonSubscriptionTransactions: [PurchasesTransaction];
|
||||
/**
|
||||
* The latest expiration date of all purchased skus
|
||||
*/
|
||||
@@ -727,6 +850,33 @@ export interface PurchaserInfo {
|
||||
* in Android
|
||||
*/
|
||||
readonly originalApplicationVersion: string | null;
|
||||
/**
|
||||
* Returns the purchase date for the version of the application when the user bought the app.
|
||||
* Use this for grandfathering users when migrating to subscriptions.
|
||||
*/
|
||||
readonly originalPurchaseDate: string | null;
|
||||
/**
|
||||
* URL to manage the active subscription of the user. If this user has an active iOS
|
||||
* subscription, this will point to the App Store, if the user has an active Play Store subscription
|
||||
* it will point there. If there are no active subscriptions it will be null.
|
||||
* If there are multiple for different platforms, it will point to the device store.
|
||||
*/
|
||||
readonly managementURL: string | null;
|
||||
}
|
||||
|
||||
export interface PurchasesTransaction {
|
||||
/**
|
||||
* RevenueCat Id associated to the transaction.
|
||||
*/
|
||||
readonly revenueCatId: string;
|
||||
/**
|
||||
* Product Id associated with the transaction.
|
||||
*/
|
||||
readonly productId: string;
|
||||
/**
|
||||
* Purchase date of the transaction in ISO 8601 format.
|
||||
*/
|
||||
readonly purchaseDate: string;
|
||||
}
|
||||
|
||||
export interface PurchasesProduct {
|
||||
|
||||
@@ -1,13 +1,61 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
export class SmartlookSetupConfigBuilder {
|
||||
private readonly _smartlookSetupConfig: SmartlookSetupConfig;
|
||||
|
||||
constructor(smartlookAPIKey: string) {
|
||||
this._smartlookSetupConfig = new SmartlookSetupConfig(smartlookAPIKey);
|
||||
}
|
||||
|
||||
fps(fps: number): SmartlookSetupConfigBuilder {
|
||||
this._smartlookSetupConfig.fps = fps;
|
||||
return this;
|
||||
}
|
||||
|
||||
renderingMode(renderingMode: SmartlookRenderingMode): SmartlookSetupConfigBuilder {
|
||||
this._smartlookSetupConfig.renderingMode = renderingMode.getRenderingModeString();
|
||||
return this;
|
||||
}
|
||||
|
||||
startNewSession(startNewSession: boolean): SmartlookSetupConfigBuilder {
|
||||
this._smartlookSetupConfig.startNewSession = startNewSession;
|
||||
return this;
|
||||
}
|
||||
|
||||
startNewSessionAndUser(startNewSessionAndUser: boolean): SmartlookSetupConfigBuilder {
|
||||
this._smartlookSetupConfig.startNewSessionAndUser = startNewSessionAndUser;
|
||||
return this;
|
||||
}
|
||||
|
||||
eventTrackingModes(eventTrackingModes: SmartlookEventTrackingModes): SmartlookSetupConfigBuilder {
|
||||
this._smartlookSetupConfig.eventTrackingModes = eventTrackingModes.getEventTrackingModeStringArray();
|
||||
return this;
|
||||
}
|
||||
|
||||
build(): SmartlookSetupConfig {
|
||||
return this._smartlookSetupConfig;
|
||||
}
|
||||
}
|
||||
|
||||
export class SmartlookSetupConfig {
|
||||
private smartlookAPIKey: string;
|
||||
private fps: number;
|
||||
fps: number;
|
||||
renderingMode: string;
|
||||
startNewSession: boolean;
|
||||
startNewSessionAndUser: boolean;
|
||||
eventTrackingModes: string[];
|
||||
|
||||
constructor(smartlookAPIKey: string, fps?: number) {
|
||||
constructor(smartlookAPIKey: string) {
|
||||
this.smartlookAPIKey = smartlookAPIKey;
|
||||
this.fps = fps;
|
||||
}
|
||||
}
|
||||
|
||||
export class SmartlookResetSession {
|
||||
private resetUser: string;
|
||||
|
||||
constructor(resetUser: string) {
|
||||
this.resetUser = resetUser;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,15 +80,41 @@ export class SmartlookEventTrackingMode {
|
||||
return new SmartlookEventTrackingMode('ignore_user_interaction');
|
||||
}
|
||||
|
||||
static IGNORE_NAVIGATION_INTERACTION(): SmartlookEventTrackingMode {
|
||||
return new SmartlookEventTrackingMode('ignore_navigation_interaction');
|
||||
}
|
||||
|
||||
static IGNORE_RAGE_CLICKS(): SmartlookEventTrackingMode {
|
||||
return new SmartlookEventTrackingMode('ignore_rage_clicks');
|
||||
}
|
||||
|
||||
static NO_TRACKING(): SmartlookEventTrackingMode {
|
||||
return new SmartlookEventTrackingMode('no_tracking');
|
||||
}
|
||||
|
||||
getEventTrackingModeString(): string {
|
||||
return this.eventTrackingMode;
|
||||
}
|
||||
|
||||
constructor(eventTrackingMode: string) {
|
||||
this.eventTrackingMode = eventTrackingMode;
|
||||
}
|
||||
}
|
||||
|
||||
export class SmartlookEventTrackingModes {
|
||||
private eventTrackingModes: string[];
|
||||
|
||||
constructor(eventTrackingModes: SmartlookEventTrackingMode[]) {
|
||||
this.eventTrackingModes = eventTrackingModes.map(eventTrackingMode =>
|
||||
eventTrackingMode.getEventTrackingModeString()
|
||||
);
|
||||
}
|
||||
|
||||
getEventTrackingModeStringArray(): string[] {
|
||||
return this.eventTrackingModes;
|
||||
}
|
||||
}
|
||||
|
||||
export class SmartlookViewState {
|
||||
static START = 'start';
|
||||
static STOP = 'stop';
|
||||
@@ -138,6 +212,19 @@ export class SmartlookReferrer {
|
||||
}
|
||||
}
|
||||
|
||||
export class SmartlookDashboardSessionUrl {
|
||||
private withCurrentTimestamp: boolean;
|
||||
|
||||
constructor(withCurrentTimestamp: boolean) {
|
||||
this.withCurrentTimestamp = withCurrentTimestamp;
|
||||
}
|
||||
}
|
||||
|
||||
export interface SmartlookIntegrationListener {
|
||||
onSessionReady: (dashboardSessionUrl: string) => any;
|
||||
onVisitorReady: (dashboardVisitorUrl: string) => any;
|
||||
}
|
||||
|
||||
export class SmartlookRenderingMode {
|
||||
private renderingMode: string;
|
||||
|
||||
@@ -149,6 +236,10 @@ export class SmartlookRenderingMode {
|
||||
return new SmartlookRenderingMode('native');
|
||||
}
|
||||
|
||||
getRenderingModeString(): string {
|
||||
return this.renderingMode;
|
||||
}
|
||||
|
||||
constructor(renderingMode: string) {
|
||||
this.renderingMode = renderingMode;
|
||||
}
|
||||
@@ -176,7 +267,9 @@ export class SmartlookRenderingMode {
|
||||
* }
|
||||
* ```
|
||||
* @classes
|
||||
* SmartlookSetupConfigBuilder
|
||||
* SmartlookSetupConfig
|
||||
* SmartlookResetSession
|
||||
* SmartlookUserIdentifier
|
||||
* SmartlookEventTrackingMode
|
||||
* SmartlookNavigationEvent
|
||||
@@ -189,7 +282,10 @@ export class SmartlookRenderingMode {
|
||||
* SmartlookGlobalEventProperty
|
||||
* SmartlookGlobalEventPropertyKey
|
||||
* SmartlookReferrer
|
||||
* SmartlookDashboardSessionUrl
|
||||
* SmartlookRenderingMode
|
||||
* SmartlookEventTrackingMode
|
||||
* SmartlookEventTrackingModes
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Smartlook',
|
||||
@@ -205,6 +301,9 @@ export class Smartlook extends IonicNativePlugin {
|
||||
* @param config SmartlookSetupConfig object.
|
||||
* @param config.smartlookAPIKey (required) Smartlook API key (you can obtain it in your dashboard).
|
||||
* @param config.fps (optional) recorded video framerate (allowed values 2-10 fps).
|
||||
* @param options.renderingMode (optional) Mode defining the video output of recording.
|
||||
* @param options.startNewSession (optional) If true new session is going to be created
|
||||
* @param options.startNewSessionAndUser (optional) If true new session and visitor is going to be created
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setupAndStartRecording(config: SmartlookSetupConfig): void {
|
||||
@@ -216,6 +315,9 @@ export class Smartlook extends IonicNativePlugin {
|
||||
* @param config SmartlookSetupConfig object.
|
||||
* @param config.smartlookAPIKey (required) Smartlook API key (you can obtain it in your dashboard).
|
||||
* @param config.fps (optional) recorded video framerate (allowed values 2-10 fps).
|
||||
* @param options.renderingMode (optional) Mode defining the video output of recording.
|
||||
* @param options.startNewSession (optional) If true new session is going to be created
|
||||
* @param options.startNewSessionAndUser (optional) If true new session and visitor is going to be created
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setup(config: SmartlookSetupConfig): void {
|
||||
@@ -247,6 +349,16 @@ export class Smartlook extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets current session and new session in dashboard is created.
|
||||
* @param resetSession SmartlookResetSession object.
|
||||
* @param resetSession.resetUser If set to TRUE new visitor is created in the dashboard.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
resetSession(resetSession: SmartlookResetSession): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* When you start sensitive mode SDK records blank videos (single color) but SDK still sends analytic events.
|
||||
*/
|
||||
@@ -287,16 +399,27 @@ export class Smartlook extends IonicNativePlugin {
|
||||
/**
|
||||
* You can configure which events are being tracked by setting eventTrackingMode.
|
||||
* @param eventTrackingMode Can be on of:
|
||||
* - SmartlookEventTrackingMode.FULL_TRACKING() tracks everything.
|
||||
* - SmartlookEventTrackingMode.IGNORE_USER_INTERACTION() will not track touches,
|
||||
* focus, keyboard, selector events.
|
||||
* - SmartlookEventTrackingMode.NO_TRACKING() not gonna track any events .
|
||||
* - EventTrackingMode.FULL_TRACKING ... track everything
|
||||
* - EventTrackingMode.IGNORE_USER_INTERACTION ... will not track touches
|
||||
* focus, keyboard, selector events
|
||||
* - EventTrackingMode.IGNORE_NAVIGATION_INTERACTION ... will not track screen names
|
||||
* - EventTrackingMode.IGNORE_RAGE_CLICKS ... will not track rage clicks
|
||||
* - EventTrackingMode.NO_TRACKING ... not gonna track any events
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setEventTrackingMode(eventTrackingMode: SmartlookEventTrackingMode): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* You can configure which events are being tracked by setting eventTrackingMode.
|
||||
* @param eventTrackingModes Array of EventTrackingModes.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setEventTrackingModes(eventTrackingModes: SmartlookEventTrackingModes): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Track custom navigation event.
|
||||
* @param navigationEvent SmartlookNavigationEvent object.
|
||||
@@ -413,11 +536,36 @@ export class Smartlook extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain sharable url to user's session leading to our dashboard.
|
||||
* @return {Promise<string>} Returns a promise with dashboard URL string.
|
||||
* Obtain session URL leading to our dashboard.
|
||||
* @param smartlookDashboardSessionUrl SmartlookDashboardSessionUrl object.
|
||||
* @param smartlookDashboardSessionUrl.withCurrentTimestamp If set to TRUE record will start at current timestamp.
|
||||
* @return {Promise<string>} Returns a promise with dashboard session URL string.
|
||||
*/
|
||||
@Cordova()
|
||||
getDashboardSessionUrl(): Promise<string> {
|
||||
getDashboardSessionUrl(smartlookDashboardSessionUrl: SmartlookDashboardSessionUrl): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain visitor URL leading to our dashboard.
|
||||
* @return {Promise<string>} Returns a promise with dashboard visitor URL string.
|
||||
*/
|
||||
@Cordova()
|
||||
getDashboardVisitorUrl(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Integration listener can be used to obtain dashboard URL for current session and visitor.
|
||||
* These URLs can be propagated to various analytic tools/SDKs.
|
||||
* @param integrationListener SmartlookIntegrationListener object.
|
||||
* @param integrationListener.onSessionReady Called when dashboard session URL is ready. Note that this URL can be accesed only by user
|
||||
* that has access to Smartlook dashboard (it is not public share link).
|
||||
* @param integrationListener.onVisitorReady Called when dashboard visitor URL is ready. Note that this URL can be accesed only by user
|
||||
* that has access to Smartlook dashboard (it is not public share link).
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
registerIntegrationListener(integrationListener: SmartlookIntegrationListener): void {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -430,4 +578,12 @@ export class Smartlook extends IonicNativePlugin {
|
||||
setRenderingMode(renderingMode: SmartlookRenderingMode): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregister Integration listener (@see registerIntegrationListener())
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
unregisterIntegrationListener(): void {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,4 +282,21 @@ export class SocialSharing extends IonicNativePlugin {
|
||||
saveToPhotoAlbum(fileOrFileArray: string | string[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shares directly to a WhatsApp Contact with phone number.
|
||||
* @param phone {string} Pass phone number
|
||||
* @param message {string} Message to send
|
||||
* @param fileOrFileArray fileOrFileArray Single or multiple files
|
||||
* @param url {string} Link to send
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 5,
|
||||
errorIndex: 6,
|
||||
platforms: ['iOS', 'Android'],
|
||||
})
|
||||
shareViaWhatsAppToPhone(phone: string, message: string, fileOrFileArray: string | string[], url?: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user