mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-02-16 00:00:02 +08:00
Compare commits
65 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c480237cf | ||
|
|
f86836ab13 | ||
|
|
1c21dd1a77 | ||
|
|
657b31f67b | ||
|
|
3168688ce4 | ||
|
|
5f15119971 | ||
|
|
4471806f73 | ||
|
|
63f2fcbe99 | ||
|
|
5aa432d0a2 | ||
|
|
9569628c67 | ||
|
|
d03b4cc113 | ||
|
|
82be769a16 | ||
|
|
96678cb14c | ||
|
|
bd7c6abb05 | ||
|
|
0c39ec959a | ||
|
|
9b950ebc46 | ||
|
|
12b8046541 | ||
|
|
09bc540b80 | ||
|
|
90efdc9481 | ||
|
|
4e933e8e93 | ||
|
|
07bf7a96fc | ||
|
|
583a5eda8d | ||
|
|
1b38354650 | ||
|
|
52adaf9269 | ||
|
|
5289f07690 | ||
|
|
a5cf118a13 | ||
|
|
075efcbde1 | ||
|
|
467d8cb072 | ||
|
|
e704bcb441 | ||
|
|
4169b6628f | ||
|
|
50ab537fdd | ||
|
|
5c7218e8f6 | ||
|
|
1077071fa4 | ||
|
|
9d673e1898 | ||
|
|
cb765d818f | ||
|
|
f95a098870 | ||
|
|
d9489639b8 | ||
|
|
bc30032238 | ||
|
|
fed35441b0 | ||
|
|
aca4133c4d | ||
|
|
6e4373aed3 | ||
|
|
fc61c40317 | ||
|
|
dab9fd84bc | ||
|
|
ef62700395 | ||
|
|
8c970ef7f6 | ||
|
|
0625a9280e | ||
|
|
551170b8d7 | ||
|
|
23e6147b25 | ||
|
|
51d82f581d | ||
|
|
74b93d7499 | ||
|
|
6e7d0069c1 | ||
|
|
e7963f6f03 | ||
|
|
7e8657ea32 | ||
|
|
80a01197b5 | ||
|
|
a3ba0015ed | ||
|
|
6d3008d6fc | ||
|
|
d65e7ee647 | ||
|
|
adb330aa63 | ||
|
|
d607550573 | ||
|
|
d5e8fb253d | ||
|
|
974466ae39 | ||
|
|
60cf9acee5 | ||
|
|
9740eadfd5 | ||
|
|
95e848f4e5 | ||
|
|
3b9dabc18c |
4
.github/workflows/nodejs.yml
vendored
4
.github/workflows/nodejs.yml
vendored
@@ -11,9 +11,9 @@ jobs:
|
||||
node-version: [16.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.1
|
||||
- uses: actions/checkout@v4.1.7
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4.0.1
|
||||
uses: actions/setup-node@v4.0.3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
|
||||
8
.github/workflows/npmpublish.yml
vendored
8
.github/workflows/npmpublish.yml
vendored
@@ -9,8 +9,8 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.1
|
||||
- uses: actions/setup-node@v4.0.1
|
||||
- uses: actions/checkout@v4.1.7
|
||||
- uses: actions/setup-node@v4.0.3
|
||||
with:
|
||||
node-version: 16
|
||||
- name: Install dependencies
|
||||
@@ -24,8 +24,8 @@ jobs:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.1
|
||||
- uses: actions/setup-node@v4.0.1
|
||||
- uses: actions/checkout@v4.1.7
|
||||
- uses: actions/setup-node@v4.0.3
|
||||
with:
|
||||
node-version: 16
|
||||
registry-url: https://registry.npmjs.org/
|
||||
|
||||
59
CHANGELOG.md
59
CHANGELOG.md
@@ -1,3 +1,62 @@
|
||||
# [6.9.0](https://github.com/danielsogl/awesome-cordova-plugins/compare/v6.8.0...v6.9.0) (2024-09-13)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **deps:** update dependency tslib to v2.7.0 ([#4823](https://github.com/danielsogl/awesome-cordova-plugins/issues/4823)) [skip ci] ([1c21dd1](https://github.com/danielsogl/awesome-cordova-plugins/commit/1c21dd1a7734e5cf82d9d64806d5b159d66f9d37))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **approov-advanced-http:** support approov3 methods ([#4817](https://github.com/danielsogl/awesome-cordova-plugins/issues/4817)) ([5f15119](https://github.com/danielsogl/awesome-cordova-plugins/commit/5f1511997101c750e80adb85e2c6b0dfacaf5a31))
|
||||
* **clevertap:** support clevertap-cordova 3.2.0 ([#4814](https://github.com/danielsogl/awesome-cordova-plugins/issues/4814)) ([4471806](https://github.com/danielsogl/awesome-cordova-plugins/commit/4471806f73ab286bbcab22d28ea2120cb4cc6a2b)), closes [#3491](https://github.com/danielsogl/awesome-cordova-plugins/issues/3491)
|
||||
* **mobile-messaging:** Added fullFeaturedInApps method to config, fetching of the Inbox methods and registerForRemoteAndroidNotifications method ([#4810](https://github.com/danielsogl/awesome-cordova-plugins/issues/4810)) ([63f2fcb](https://github.com/danielsogl/awesome-cordova-plugins/commit/63f2fcbe99b6be14a76a4a6c72ef19594d82905b))
|
||||
* **webengage:** New Plugin for Notification Inbox ([#4819](https://github.com/danielsogl/awesome-cordova-plugins/issues/4819)) ([3168688](https://github.com/danielsogl/awesome-cordova-plugins/commit/3168688ce44b1353ed6f12e41e06c90647046f71))
|
||||
|
||||
|
||||
|
||||
# [6.8.0](https://github.com/danielsogl/awesome-cordova-plugins/compare/v6.7.0...v6.8.0) (2024-07-11)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **deps:** update dependency tslib to v2.6.3 ([#4786](https://github.com/danielsogl/awesome-cordova-plugins/issues/4786)) [skip ci] ([50ab537](https://github.com/danielsogl/awesome-cordova-plugins/commit/50ab537fdd9f875f51ce1e4c7ffcf1a27c6d50e8))
|
||||
* **ssl-certificate-checker:** adjust method interfaces to follow plugin api ([#4799](https://github.com/danielsogl/awesome-cordova-plugins/issues/4799)) ([0c39ec9](https://github.com/danielsogl/awesome-cordova-plugins/commit/0c39ec959ab04e02065a98685f5293346f5939ac))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **airship:** add isForeground to push received events ([#4763](https://github.com/danielsogl/awesome-cordova-plugins/issues/4763)) ([4e933e8](https://github.com/danielsogl/awesome-cordova-plugins/commit/4e933e8e932c8db403b00d6b63713b63aa758071))
|
||||
* **barkoder:** add plugin ([#4782](https://github.com/danielsogl/awesome-cordova-plugins/issues/4782)) ([12b8046](https://github.com/danielsogl/awesome-cordova-plugins/commit/12b8046541dcf791027695a2aa8115124671ffe0))
|
||||
* **firebase-x:** add consent mode ([#4779](https://github.com/danielsogl/awesome-cordova-plugins/issues/4779)) ([09bc540](https://github.com/danielsogl/awesome-cordova-plugins/commit/09bc540b80c299aae70430b83f04d0a7dc6c7fec))
|
||||
* **genius-scan:** add plugin ([#4775](https://github.com/danielsogl/awesome-cordova-plugins/issues/4775)) [skip ci] ([90efdc9](https://github.com/danielsogl/awesome-cordova-plugins/commit/90efdc9481fa8b45d10f47de1b3081c177630e99))
|
||||
* **webengage:** add new methods ([#4784](https://github.com/danielsogl/awesome-cordova-plugins/issues/4784)) ([9b950eb](https://github.com/danielsogl/awesome-cordova-plugins/commit/9b950ebc46be9d07277450cdba55446e652fd30d))
|
||||
|
||||
|
||||
|
||||
# [6.7.0](https://github.com/danielsogl/awesome-cordova-plugins/compare/v6.6.0...v6.7.0) (2024-04-17)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 🐛 wrong top package main field ([#4736](https://github.com/danielsogl/awesome-cordova-plugins/issues/4736)) ([74b93d7](https://github.com/danielsogl/awesome-cordova-plugins/commit/74b93d749968c06d2ce4a653cbc5edeb9cfdd368))
|
||||
* **firebase-x:** filters for fetchFirestoreCollection ([#4733](https://github.com/danielsogl/awesome-cordova-plugins/issues/4733)) ([23e6147](https://github.com/danielsogl/awesome-cordova-plugins/commit/23e6147b25dc188604f83906d3078629c39bb7a2))
|
||||
* **firebase-x:** setConfigSettings function input parameters aligned with firebase-x plugin ([#4757](https://github.com/danielsogl/awesome-cordova-plugins/issues/4757)) ([adb330a](https://github.com/danielsogl/awesome-cordova-plugins/commit/adb330aa63d89d91243c5a9ebf8bc34aa5206d6e))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **adjust:** Add Remote Config missing functions ([#4756](https://github.com/danielsogl/awesome-cordova-plugins/issues/4756)) ([d65e7ee](https://github.com/danielsogl/awesome-cordova-plugins/commit/d65e7ee64707985966b27b7bfc206a1f29630f58))
|
||||
* **adjust:** update wrapper for Adjust Cordova SDK v4.37.1 ([#4724](https://github.com/danielsogl/awesome-cordova-plugins/issues/4724)) ([551170b](https://github.com/danielsogl/awesome-cordova-plugins/commit/551170b8d7d47819b8742344d9f214318ae97562))
|
||||
* **airship:** add plugin ([#4755](https://github.com/danielsogl/awesome-cordova-plugins/issues/4755)) ([6d3008d](https://github.com/danielsogl/awesome-cordova-plugins/commit/6d3008d6fc124c24a13ddf9f60be4c1779f41ee0))
|
||||
* **cashfree-pg:** support cordova-plugin-cashfree-pg 1.0.6 ([#4737](https://github.com/danielsogl/awesome-cordova-plugins/issues/4737)) ([6e7d006](https://github.com/danielsogl/awesome-cordova-plugins/commit/6e7d0069c138da760530926ba63bd7522a529565))
|
||||
* **clevertap:** support clevertap-cordova 3.0.0 ([#4760](https://github.com/danielsogl/awesome-cordova-plugins/issues/4760)) ([974466a](https://github.com/danielsogl/awesome-cordova-plugins/commit/974466ae39146de7826b752c0932eca0cc6a4c7e)), closes [#3491](https://github.com/danielsogl/awesome-cordova-plugins/issues/3491)
|
||||
* **contacts:** add plugin ([#4750](https://github.com/danielsogl/awesome-cordova-plugins/issues/4750)) ([80a0119](https://github.com/danielsogl/awesome-cordova-plugins/commit/80a01197b51d97821c7fa0037c98a9cbc19b9e43))
|
||||
* **screenshot:** add plugin ([#4751](https://github.com/danielsogl/awesome-cordova-plugins/issues/4751)) ([a3ba001](https://github.com/danielsogl/awesome-cordova-plugins/commit/a3ba0015eda437fe60e8f05852447c92cff8f31c))
|
||||
* **ssl-certificate-checker:** add SSL Certificate Checker support ([#4734](https://github.com/danielsogl/awesome-cordova-plugins/issues/4734)) ([51d82f5](https://github.com/danielsogl/awesome-cordova-plugins/commit/51d82f581d059a62d2179dc9da89afd64e1e41d2))
|
||||
|
||||
|
||||
|
||||
# [6.6.0](https://github.com/danielsogl/awesome-cordova-plugins/compare/v6.5.0...v6.6.0) (2023-12-19)
|
||||
|
||||
|
||||
|
||||
17
docs/plugins/ssl-certificate-checker/README.md
Normal file
17
docs/plugins/ssl-certificate-checker/README.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# SSLCertificateChecker
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-sslcertificatechecker
|
||||
$ npm install @awesome-cordova-plugins/ssl-certificate-checker
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/ssl-certificate-checker/)
|
||||
|
||||
Plugin Repo: [https://github.com/EddyVerbruggen/SSLCertificateChecker-PhoneGap-Plugin](https://github.com/EddyVerbruggen/SSLCertificateChecker-PhoneGap-Plugin)
|
||||
|
||||
Cordova plugin to check SSL certificates on Android and iOS.
|
||||
|
||||
## Supported Platforms
|
||||
|
||||
* Android
|
||||
* iOS
|
||||
@@ -0,0 +1,17 @@
|
||||
# SSLCertificateChecker
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-sslcertificatechecker
|
||||
$ npm install @awesome-cordova-plugins/ssl-certificate-checker
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://github.com/EddyVerbruggen/SSLCertificateChecker-PhoneGap-Plugin/)
|
||||
|
||||
Plugin Repo: [https://github.com/EddyVerbruggen/SSLCertificateChecker-PhoneGap-Plugin](https://github.com/EddyVerbruggen/SSLCertificateChecker-PhoneGap-Plugin)
|
||||
|
||||
Cordova plugin to check SSL certificates on Android and iOS.
|
||||
|
||||
## Supported Platforms
|
||||
|
||||
* Android
|
||||
* iOS
|
||||
7366
package-lock.json
generated
7366
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
28
package.json
28
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "awesome-cordova-plugins",
|
||||
"version": "6.6.0",
|
||||
"version": "6.9.0",
|
||||
"description": "Native plugin wrappers for Cordova and Ionic with TypeScript, ES6+, Promise and Observable support",
|
||||
"homepage": "https://awesome-cordova-plugins.com",
|
||||
"author": "Daniel Sogl <me@danielsogl.com> (https://danielsogl.com)",
|
||||
@@ -24,7 +24,7 @@
|
||||
"prettier": "prettier --write --ignore-unknown \"**/*\""
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": "2.6.2"
|
||||
"tslib": "2.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/common": "12.2.17",
|
||||
@@ -34,41 +34,41 @@
|
||||
"@types/cordova": "11.0.3",
|
||||
"@types/fs-extra": "11.0.4",
|
||||
"@types/jest": "27.5.2",
|
||||
"@types/lodash": "4.14.202",
|
||||
"@types/node": "20.10.5",
|
||||
"@types/rimraf": "3.0.2",
|
||||
"@types/lodash": "4.17.5",
|
||||
"@types/node": "20.14.10",
|
||||
"@types/rimraf": "4.0.5",
|
||||
"@types/webpack": "5.28.5",
|
||||
"@typescript-eslint/eslint-plugin": "5.62.0",
|
||||
"@typescript-eslint/parser": "5.62.0",
|
||||
"async-promise-queue": "1.0.5",
|
||||
"conventional-changelog-cli": "4.1.0",
|
||||
"conventional-changelog-cli": "5.0.0",
|
||||
"cz-conventional-changelog": "3.3.0",
|
||||
"dgeni": "0.4.14",
|
||||
"dgeni-packages": "0.16.10",
|
||||
"eslint": "8.56.0",
|
||||
"eslint": "8.57.0",
|
||||
"eslint-config-prettier": "8.10.0",
|
||||
"eslint-plugin-jsdoc": "46.9.1",
|
||||
"eslint-plugin-jsdoc": "50.2.2",
|
||||
"fs-extra": "11.2.0",
|
||||
"gulp": "4.0.2",
|
||||
"gulp": "5.0.0",
|
||||
"gulp-rename": "2.0.0",
|
||||
"gulp-replace": "1.1.4",
|
||||
"husky": "8.0.3",
|
||||
"husky": "9.1.6",
|
||||
"is-ci": "3.0.1",
|
||||
"jest": "27.5.1",
|
||||
"lint-staged": "15.2.0",
|
||||
"lint-staged": "15.2.10",
|
||||
"lodash": "4.17.21",
|
||||
"minimist": "1.2.8",
|
||||
"prettier": "2.8.8",
|
||||
"rimraf": "5.0.5",
|
||||
"rollup": "4.9.1",
|
||||
"rollup": "4.21.3",
|
||||
"rxjs": "6.6.7",
|
||||
"terser-webpack-plugin": "5.3.9",
|
||||
"terser-webpack-plugin": "5.3.10",
|
||||
"ts-jest": "27.1.5",
|
||||
"ts-node": "10.9.2",
|
||||
"typescript": "4.2.4",
|
||||
"unminified-webpack-plugin": "3.0.0",
|
||||
"webpack": "5.74.0",
|
||||
"winston": "3.11.0",
|
||||
"winston": "3.14.2",
|
||||
"zone.js": "0.11.8"
|
||||
},
|
||||
"jest": {
|
||||
|
||||
@@ -15,7 +15,7 @@ const FLAGS = '--access public';
|
||||
|
||||
const PACKAGE_JSON_BASE = {
|
||||
description: 'Awesome Cordova Plugins - Native plugins for ionic apps',
|
||||
main: 'bundle.js',
|
||||
main: 'index.js',
|
||||
module: 'index.js',
|
||||
typings: 'index.d.ts',
|
||||
author: 'ionic',
|
||||
|
||||
@@ -76,11 +76,13 @@ export class AdjustConfig {
|
||||
private processName: string = null; // Android only
|
||||
private preinstallTrackingEnabled: boolean = null; // Android only
|
||||
private preinstallFilePath: string = null; // Android only
|
||||
private fbAppId: string = null; // Android only
|
||||
private oaidReadingEnabled: boolean = null; // Android only
|
||||
private allowiAdInfoReading: boolean = null; // iOS only
|
||||
private allowIdfaReading: boolean = null; // iOS only
|
||||
private allowAdServicesInfoReading: boolean = null; // iOS only
|
||||
private coppaCompliantEnabled: boolean = null;
|
||||
private readDeviceInfoOnceEnabled: boolean = null;
|
||||
private playStoreKidsAppEnabled: boolean = null; // Android only
|
||||
private linkMeEnabled: boolean = null; // iOS only
|
||||
private finalAndroidAttributionEnabled: boolean = null; // Android only
|
||||
@@ -144,6 +146,10 @@ export class AdjustConfig {
|
||||
this.coppaCompliantEnabled = coppaCompliantEnabled;
|
||||
}
|
||||
|
||||
setReadDeviceInfoOnceEnabled(readDeviceInfoOnceEnabled: boolean) {
|
||||
this.readDeviceInfoOnceEnabled = readDeviceInfoOnceEnabled;
|
||||
}
|
||||
|
||||
setPlayStoreKidsAppEnabled(playStoreKidsAppEnabled: boolean) {
|
||||
this.playStoreKidsAppEnabled = playStoreKidsAppEnabled;
|
||||
}
|
||||
@@ -172,6 +178,10 @@ export class AdjustConfig {
|
||||
this.preinstallFilePath = preinstallFilePath;
|
||||
}
|
||||
|
||||
setFbAppId(fbAppId: string) {
|
||||
this.fbAppId = fbAppId;
|
||||
}
|
||||
|
||||
setOaidReadingEnabled(enableOaidReading: boolean) {
|
||||
this.oaidReadingEnabled = enableOaidReading;
|
||||
}
|
||||
@@ -230,9 +240,7 @@ export class AdjustConfig {
|
||||
this.conversionValueUpdatedCallback = conversionValueUpdatedCallback;
|
||||
}
|
||||
|
||||
setSkad4ConversionValueUpdatedCallbackListener(
|
||||
skad4ConversionValueUpdatedCallback: (skad4Data: AdjustSkad4Data) => void
|
||||
) {
|
||||
setSkad4ConversionValueUpdatedCallbackListener(skad4ConversionValueUpdatedCallback: (skad4Data: AdjustSkad4Data) => void) {
|
||||
this.skad4ConversionValueUpdatedCallback = skad4ConversionValueUpdatedCallback;
|
||||
}
|
||||
|
||||
@@ -543,6 +551,7 @@ export enum AdjustUrlStrategy {
|
||||
India = 'india',
|
||||
China = 'china',
|
||||
Cn = 'cn',
|
||||
CnOnly = 'cn-only',
|
||||
DataResidencyEU = 'data-residency-eu',
|
||||
DataResidencyTR = 'data-residency-tr',
|
||||
DataResidencyUS = 'data-residency-us',
|
||||
@@ -553,10 +562,12 @@ export enum AdjustAdRevenueSource {
|
||||
AdRevenueSourceMopub = 'mopub',
|
||||
AdRevenueSourceAdMob = 'admob_sdk',
|
||||
AdRevenueSourceIronSource = 'ironsource_sdk',
|
||||
AdRevenueSourceAdMost = 'admost_sdk',
|
||||
AdRevenueSourceUnity = 'unity_sdk',
|
||||
AdRevenueSourceHeliumChartboost = 'helium_chartboost_sdk',
|
||||
AdRevenueSourcePublisher = 'publisher_sdk',
|
||||
AdRevenueSourceAdMost = "admost_sdk",
|
||||
AdRevenueSourceUnity = "unity_sdk",
|
||||
AdRevenueSourceHeliumChartboost = "helium_chartboost_sdk",
|
||||
AdRevenueSourcePublisher = "publisher_sdk",
|
||||
AdRevenueSourceTopOn = "topon_sdk",
|
||||
AdRevenueSourceAdx = "adx_sdk",
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -612,6 +623,7 @@ export enum AdjustAdRevenueSource {
|
||||
})
|
||||
@Injectable()
|
||||
export class Adjust extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* This method initializes Adjust SDK
|
||||
*
|
||||
@@ -730,7 +742,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
||||
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.
|
||||
* 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 })
|
||||
@@ -898,15 +910,32 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
||||
* This method is used to verify the App Store purchase
|
||||
*
|
||||
* @param {AdjustAppStorePurchase} purchase Adjust App Store purchase object to be verified
|
||||
* @returns {Promise<AdjustPurchaseVerificationInfo>} Returns a promise with purchase verification outcome
|
||||
*/
|
||||
@Cordova()
|
||||
verifyAppStorePurchase(purchase: AdjustAppStorePurchase): Promise<AdjustPurchaseVerificationInfo> {}
|
||||
verifyAppStorePurchase(purchase: AdjustAppStorePurchase): Promise<AdjustPurchaseVerificationInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is used to verify the Play Store purchase
|
||||
*
|
||||
* @param {AdjustPlayStorePurchase} purchase Adjust Play Store purchase object to be verified
|
||||
* @returns {Promise<AdjustPurchaseVerificationInfo>} Returns a promise with purchase verification outcome
|
||||
*/
|
||||
@Cordova()
|
||||
verifyPlayStorePurchase(purchase: AdjustPlayStorePurchase): Promise<AdjustPurchaseVerificationInfo> {}
|
||||
}
|
||||
verifyPlayStorePurchase(purchase: AdjustPlayStorePurchase): Promise<AdjustPurchaseVerificationInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is used to send and potentially resolve shortened deep links
|
||||
*
|
||||
* @param {string} deeplink Potentially shortened deep link that has opened your app
|
||||
* @returns {Promise<string>} Returns a promise with either resolved (if it was resolved) or echoed deep link
|
||||
*/
|
||||
@Cordova()
|
||||
processDeeplink(deeplink: string): Promise<string> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
1757
src/@awesome-cordova-plugins/plugins/airship/index.ts
Normal file
1757
src/@awesome-cordova-plugins/plugins/airship/index.ts
Normal file
File diff suppressed because it is too large
Load Diff
@@ -28,98 +28,6 @@ interface AbortedResponse {
|
||||
aborted: boolean;
|
||||
}
|
||||
|
||||
export interface ApproovLoggableToken {
|
||||
/**
|
||||
* Expiry
|
||||
* The only mandatory claim for Approov tokens. It specifies the expiry time for the token as a Unix timestamp.
|
||||
*/
|
||||
exp: number;
|
||||
|
||||
/**
|
||||
* Device ID
|
||||
* This claim identifies the device for which the token was issued. This is a base64 encoded string representing a 128-bit device identifier.
|
||||
* Note that this is not, strictly speaking, a device identifier as it is also influenced by the app identifier
|
||||
* and may change if the same app is uninstalled and then reinstalled on the same device.
|
||||
*/
|
||||
did?: string;
|
||||
|
||||
/**
|
||||
* Attestation Response Code
|
||||
* This is an optional claim that encodes information about a subset of the device property flags and also whether the attestation was a pass or fail.
|
||||
* The claim is encoded in base32 and is typically 10 characters long (although it may be longer in some circumstances).
|
||||
* This claim is not included by tokens from the failover.
|
||||
*/
|
||||
arc?: string;
|
||||
|
||||
/**
|
||||
* IP Address
|
||||
* This holds the IP address of the device as seen by the Approov cloud service. It is provided in a human readable IP address format (in either IPv4 or IPv6 format).
|
||||
* In practice this value can often change between the time a token is issued and the time it is sent to your backend, so you should never block if it differs, but you may include it as a signal that tokens have somehow been stolen and are being replayed.
|
||||
* This claim is not included by tokens from the failover or if the IP Tracking Policy for the account has been set to none.
|
||||
*/
|
||||
ip?: string;
|
||||
|
||||
/**
|
||||
* Issuer
|
||||
* An optional claim that is added if the issuer inclusion option is enabled. This provides the Approov account ID that was used to issue the token (suffixed with approov.io).
|
||||
* It can be used as an additional layer of backend verification if signing keys are shared between multiple accounts.
|
||||
* It indicates that tokens were issued from the expected Approov account. This claim may also be set to an explicit value for long lived Approov tokens.
|
||||
* This flexibility is designed for use with server-to-server communication (which may only be signed with the account specific secret keys).
|
||||
*/
|
||||
iss?: string;
|
||||
|
||||
/**
|
||||
* Annotation
|
||||
* This is an embedded JSON array of strings showing the list of flags that are set and are in the annotation set for the security policy that is selected.
|
||||
* This allows additional information to be collected about the state of a particular device without necessarily causing an attestation failure.
|
||||
* Note that if there are no possible annotations then this claim is not present at all. This claim is not included by tokens from the failover.
|
||||
*/
|
||||
anno?: string[];
|
||||
|
||||
/**
|
||||
* Payload Hash
|
||||
* An optional claim that is added if the protected app passes a token binding argument to the setDataHashInToken method.
|
||||
* The claim value is set to the base64 encoded SHA256 hash of the provided payload string.
|
||||
* This is typically used to bind an Approov token to some other data used by your app to enhance security (like a user auth token).
|
||||
*/
|
||||
pay?: string;
|
||||
|
||||
/**
|
||||
* Audience
|
||||
* An optional claim that is added if the audience inclusion option is enabled. This provides the domain for which the token was issued.
|
||||
* It can be used as an additional layer of backend verification to ensure that tokens intended for one domain cannot be used on to access a different one.
|
||||
*/
|
||||
aud?: string;
|
||||
|
||||
/**
|
||||
* Message Siging Key ID
|
||||
* This is an optional claim that encodes the ID of a key being used for Message Signing.
|
||||
* This is only present in Approov tokens for which message signing is active. This claim is not included by tokens from the failover.
|
||||
*/
|
||||
mskid?: string;
|
||||
|
||||
/**
|
||||
* Measurement Proof Key
|
||||
* An optional claim to provide the measurement proof key if a measurement has been requested by the SDK on the domain for which the token is issued.
|
||||
* This is a base64 encoded 128-bit proof key value. Note that if measurement is being used, then JWE tokens will be used to keep this claim secret.
|
||||
*/
|
||||
mpk?: string;
|
||||
|
||||
/**
|
||||
* Integrity Measurement Hash
|
||||
* An optional claim to provide the integrity measurement hash if a measurement has been requested by the SDK on the domain for which the token is issued.
|
||||
* This is a base64 encoded 256-bit SHA256 measurement value. Note that if measurement is being used, then JWE tokens will be used to keep this claim secret.
|
||||
*/
|
||||
imh?: string;
|
||||
|
||||
/**
|
||||
* Device Measurement Hash
|
||||
* An optional claim to provide the device measurement hash if a measurement has been requested by the SDK on the domain for which the token is issued.
|
||||
* This is a base64 encoded 256-bit SHA256 measurement value. Note that if measurement is being used, then JWE tokens will be used to keep this claim secret
|
||||
*/
|
||||
dmh?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name HTTP
|
||||
* @description
|
||||
@@ -134,9 +42,9 @@ export interface ApproovLoggableToken {
|
||||
* we have only added approov functionality on top of it. All credit goes to the actual plugin developer.
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { ApproovHttp } from '@awesome-cordova-plugins/http/ngx';
|
||||
* import { HTTP } from '@awesome-cordova-plugins/http/ngx';
|
||||
*
|
||||
* constructor(private http: ApproovHttp) {}
|
||||
* constructor(private http: HTTP) {}
|
||||
*
|
||||
* ...
|
||||
*
|
||||
@@ -161,14 +69,14 @@ export interface ApproovLoggableToken {
|
||||
* HTTPResponse
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'ApproovHttp',
|
||||
plugin: 'cordova-approov-advanced-http',
|
||||
pluginRef: 'cordova.plugin.ApproovHttp',
|
||||
repo: 'https://github.com/approov/quickstart-ionic-advancedhttp',
|
||||
pluginName: 'HTTP',
|
||||
plugin: '@approov/cordova-plugin-advanced-http',
|
||||
pluginRef: 'cordova.plugin.http',
|
||||
repo: 'https://github.com/approov/quickstart-cordova-advancedhttp',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
||||
export class HTTP extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* This enum represents the internal error codes which can be returned in a HTTPResponse object.
|
||||
*
|
||||
@@ -751,13 +659,23 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({ sync: true })
|
||||
initializeApproov(): void {
|
||||
@Cordova({ sync: false })
|
||||
approovInitialize(config: string): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({ sync: true })
|
||||
approovSetDataHashInToken(dataHash: string): void {
|
||||
approovSetProceedOnNetworkFail(): void {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({ sync: false })
|
||||
approovSetDevKey(devKey: string): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({ sync: true })
|
||||
approovSetTokenHeader(header: string, prefix: string): void {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -766,8 +684,73 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
getApproovLoggableToken(host: string): Promise<ApproovLoggableToken> {
|
||||
@Cordova({ sync: true })
|
||||
approovAddSubstitutionHeader(header: string, requiredPrefix: string): void {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({ sync: true })
|
||||
approovRemoveSubstitutionHeader(header: string): void {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({ sync: true })
|
||||
approovAddSubstitutionQueryParam(key: string): void {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({ sync: true })
|
||||
approovRemoveSubstitutionQueryParam(key: string): void {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({ sync: true })
|
||||
approovAddExclusionURLRegex(urlRegex: string): void {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({ sync: true })
|
||||
approovRemoveExclusionURLRegex(urlRegex: string): void {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({ sync: false })
|
||||
approovPrefetch(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({ sync: false })
|
||||
approovPrecheck(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({ sync: false })
|
||||
approovGetDeviceID(): Promise<String> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({ sync: false })
|
||||
approovSetDataHashInToken(data: string): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({ sync: false })
|
||||
approovFetchToken(url: string): Promise<String> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({ sync: false })
|
||||
approovGetMessageSignature(message: string): Promise<String> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({ sync: false })
|
||||
approovFetchSecureString(key: string, newDef: string): Promise<String> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({ sync: false })
|
||||
approovFetchCustomJWT(payload: string): Promise<String> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
688
src/@awesome-cordova-plugins/plugins/barkoder/index.ts
Normal file
688
src/@awesome-cordova-plugins/plugins/barkoder/index.ts
Normal file
@@ -0,0 +1,688 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core';
|
||||
|
||||
/**
|
||||
* @name Barkoder
|
||||
* @description
|
||||
* The barKoder Barcode Scanner SDK cordova plugin grants an easy to use solution with a great and completely customizable interface that can be instantly integrated in both iOS and Android apps.
|
||||
* @usage
|
||||
*
|
||||
* ```typescript
|
||||
* import { Barkoder } from '@awesome-cordova-plugins/barkoder/ngx';
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* constructor(private barkoder: Barkoder, private platform: Platform) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.platform.ready().then(() => {
|
||||
* this.barkoder.setLicenseKey('YOUR_KEY', true)
|
||||
* .then(() => {
|
||||
* this.barkoder.registerWithLicenseKey('your_license_key')
|
||||
* this.barkoder.initialize('your_license_key')
|
||||
* })
|
||||
* .catch(e => console.log('Error starting Barkoder', e));
|
||||
* });
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Barkoder',
|
||||
plugin: 'barkoder-cordova',
|
||||
pluginRef: 'Barkoder',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class Barkoder extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Initialize the BarkoderView
|
||||
*/
|
||||
@Cordova()
|
||||
initialize(width: number, height: number, x: number, y: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register with license key
|
||||
*/
|
||||
@Cordova()
|
||||
registerWithLicenseKey(licenseKey: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
// - Setters
|
||||
@Cordova()
|
||||
setZoomFactor(zoomFactor: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setFlashEnabled(enabled: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
startCamera(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
startScanning(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
stopScanning(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
pauseScanning(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setLocationLineColor(hexColor: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setLocationLineWidth(lineWidth: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setRoiLineColor(hexColor: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setRoiLineWidth(lineWidth: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setRoiOverlayBackgroundColor(hexColor: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setCloseSessionOnResultEnabled(enabled: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setImageResultEnabled(enabled: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setLocationInImageResultEnabled(enabled: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setRegionOfInterest(left: number, top: number, width: number, height: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setThreadsLimit(threadsLimit: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setLocationInPreviewEnabled(enabled: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setPinchToZoomEnabled(enabled: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setRegionOfInterestVisible(regionOfInterestVisible: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setBarkoderResolution(resolution: BarkoderResolution): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setBeepOnSuccessEnabled(enabled: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setVibrateOnSuccessEnabled(enabled: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
showLogMessages(showLogMessages: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setBarcodeTypeLengthRange(type: string, min: number, max: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setEncodingCharacterSet(characterSet: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setDecodingSpeed(decodingSpeed: DecodingSpeed): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setFormattingType(formattingType: FormattingType): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setCode11ChecksumType(checksumType: Code11ChecksumType): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setMsiChecksumType(checksumType: MsiChecksumType): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setCode39ChecksumType(checksumType: Code39ChecksumType): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setBarcodeTypeEnabled(type: BarcodeType, enabled: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setMulticodeCachingEnabled(enabled: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setMulticodeCachingDuration(duration: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setMaximumResultsCount(resultsCount: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setBarcodeThumbnailOnResultEnabled(enabled: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setDuplicatesDelayMs(delayMs: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setThresholdBetweenDuplicatesScans(thresholdBetweenDuplicatesScans: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setUpcEanDeblurEnabled(enabled: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setMisshaped1DEnabled(enabled: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setEnableVINRestrictions(enableVINRestrictions: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setDataMatrixDpmModeEnabled(enabled: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
configureBarkoder(barkoderConfig: BarkoderConfig): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
// - Getters
|
||||
@Cordova()
|
||||
isFlashAvailable(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
isCloseSessionOnResultEnabled(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
isImageResultEnabled(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
isLocationInImageResultEnabled(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
isLocationInPreviewEnabled(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
isPinchToZoomEnabled(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
isRegionOfInterestVisible(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
isBeepOnSuccessEnabled(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
isVibrateOnSuccessEnabled(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
getVersion(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
getLocationLineColorHex(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
getRoiLineColorHex(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
getRoiOverlayBackgroundColorHex(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
getMaxZoomFactor(): Promise<number> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
getLocationLineWidth(): Promise<number> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
getRoiLineWidth(): Promise<number> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
getRegionOfInterest(): Promise<number> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
getBarcodeTypeLengthRange(type: number): Promise<number> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
getMsiChecksumType(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
getCode39ChecksumType(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
getCode11ChecksumType(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
getEncodingCharacterSet(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
getDecodingSpeed(): Promise<DecodingSpeed> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
getFormattingType(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
getThreadsLimit(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
getMaximumResultsCount(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
getDuplicatesDelayMs(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
isBarcodeTypeEnabled(type: number): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
getMulticodeCachingEnabled(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
getMulticodeCachingDuration(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
isUpcEanDeblurEnabled(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
isMisshaped1DEnabled(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
isBarcodeThumbnailOnResultEnabled(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
getThresholdBetweenDuplicatesScans(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
isVINRestrictionsEnabled(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
getBarkoderResolution(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
export enum DecodingSpeed {
|
||||
fast,
|
||||
normal,
|
||||
slow,
|
||||
}
|
||||
|
||||
export enum FormattingType {
|
||||
disabled,
|
||||
automatic,
|
||||
gs1,
|
||||
aamva,
|
||||
}
|
||||
|
||||
export enum MsiChecksumType {
|
||||
disabled,
|
||||
mod10,
|
||||
mod11,
|
||||
mod1010,
|
||||
mod1110,
|
||||
mod11IBM,
|
||||
mod1110IBM,
|
||||
}
|
||||
|
||||
export enum Code39ChecksumType {
|
||||
disabled,
|
||||
enabled,
|
||||
}
|
||||
|
||||
export enum Code11ChecksumType {
|
||||
disabled,
|
||||
single,
|
||||
double,
|
||||
}
|
||||
|
||||
export enum BarkoderResolution {
|
||||
normal,
|
||||
high,
|
||||
}
|
||||
|
||||
export enum BarcodeType {
|
||||
aztec,
|
||||
aztecCompact,
|
||||
qr,
|
||||
qrMicro,
|
||||
code128,
|
||||
code93,
|
||||
code39,
|
||||
codabar,
|
||||
code11,
|
||||
msi,
|
||||
upcA,
|
||||
upcE,
|
||||
upcE1,
|
||||
ean13,
|
||||
ean8,
|
||||
pdf417,
|
||||
pdf417Micro,
|
||||
datamatrix,
|
||||
code25,
|
||||
interleaved25,
|
||||
itf14,
|
||||
iata25,
|
||||
matrix25,
|
||||
datalogic25,
|
||||
coop25,
|
||||
code32,
|
||||
telepen,
|
||||
dotcode,
|
||||
}
|
||||
|
||||
export class BarkoderConfig {
|
||||
locationLineColor?: string;
|
||||
locationLineWidth?: number;
|
||||
roiLineColor?: string;
|
||||
roiLineWidth?: number;
|
||||
roiOverlayBackgroundColor?: string;
|
||||
closeSessionOnResultEnabled?: boolean;
|
||||
imageResultEnabled?: boolean;
|
||||
locationInImageResultEnabled?: boolean;
|
||||
locationInPreviewEnabled?: boolean;
|
||||
pinchToZoomEnabled?: boolean;
|
||||
regionOfInterestVisible?: boolean;
|
||||
barkoderResolution?: BarkoderResolution;
|
||||
beepOnSuccessEnabled?: boolean;
|
||||
vibrateOnSuccessEnabled?: boolean;
|
||||
decoder?: DekoderConfig;
|
||||
|
||||
constructor(config: Partial<BarkoderConfig>) {
|
||||
Object.assign(this, config);
|
||||
}
|
||||
}
|
||||
|
||||
export class DekoderConfig {
|
||||
aztec?: BarcodeConfig;
|
||||
aztecCompact?: BarcodeConfig;
|
||||
qr?: BarcodeConfig;
|
||||
qrMicro?: BarcodeConfig;
|
||||
code128?: BarcodeConfigWithLength;
|
||||
code93?: BarcodeConfigWithLength;
|
||||
code39?: Code39BarcodeConfig;
|
||||
codabar?: BarcodeConfigWithLength;
|
||||
code11?: Code11BarcodeConfig;
|
||||
msi?: MSIBarcodeConfig;
|
||||
upcA?: BarcodeConfig;
|
||||
upcE?: BarcodeConfig;
|
||||
upcE1?: BarcodeConfig;
|
||||
ean13?: BarcodeConfig;
|
||||
ean8?: BarcodeConfig;
|
||||
pdf417?: BarcodeConfig;
|
||||
pdf417Micro?: BarcodeConfig;
|
||||
datamatrix?: DatamatrixBarcodeConfig;
|
||||
code25?: BarcodeConfig;
|
||||
interleaved25?: BarcodeConfig;
|
||||
itf14?: BarcodeConfig;
|
||||
iata25?: BarcodeConfig;
|
||||
matrix25?: BarcodeConfig;
|
||||
datalogic25?: BarcodeConfig;
|
||||
coop25?: BarcodeConfig;
|
||||
code32?: BarcodeConfig;
|
||||
telepen?: BarcodeConfig;
|
||||
dotcode?: BarcodeConfig;
|
||||
general?: GeneralSettings;
|
||||
|
||||
constructor(config: Partial<DekoderConfig>) {
|
||||
Object.assign(this, config);
|
||||
}
|
||||
}
|
||||
|
||||
export class BarcodeConfig {
|
||||
enabled?: boolean;
|
||||
|
||||
constructor(config: Partial<BarcodeConfig>) {
|
||||
Object.assign(this, config);
|
||||
}
|
||||
}
|
||||
|
||||
export class BarcodeConfigWithLength {
|
||||
enabled?: boolean;
|
||||
minLength?: number;
|
||||
maxLength?: number;
|
||||
|
||||
constructor(config: Partial<BarcodeConfigWithLength>) {
|
||||
Object.assign(this, config);
|
||||
}
|
||||
|
||||
setLengthRange(minLength: number, maxLength: number) {
|
||||
this.minLength = minLength;
|
||||
this.maxLength = maxLength;
|
||||
}
|
||||
}
|
||||
|
||||
export class MSIBarcodeConfig {
|
||||
enabled?: boolean;
|
||||
minLength?: number;
|
||||
maxLength?: number;
|
||||
checksum?: MsiChecksumType;
|
||||
|
||||
constructor(config: Partial<MSIBarcodeConfig>) {
|
||||
Object.assign(this, config);
|
||||
}
|
||||
|
||||
setLengthRange(minLength: number, maxLength: number) {
|
||||
this.minLength = minLength;
|
||||
this.maxLength = maxLength;
|
||||
}
|
||||
}
|
||||
|
||||
export class Code39BarcodeConfig {
|
||||
enabled?: boolean;
|
||||
minLength?: number;
|
||||
maxLength?: number;
|
||||
checksum?: Code39ChecksumType;
|
||||
|
||||
constructor(config: Partial<Code39BarcodeConfig>) {
|
||||
Object.assign(this, config);
|
||||
}
|
||||
|
||||
setLengthRange(minLength: number, maxLength: number) {
|
||||
this.minLength = minLength;
|
||||
this.maxLength = maxLength;
|
||||
}
|
||||
}
|
||||
|
||||
export class Code11BarcodeConfig {
|
||||
enabled?: boolean;
|
||||
minLength?: number;
|
||||
maxLength?: number;
|
||||
checksum?: Code11ChecksumType;
|
||||
|
||||
constructor(config: Partial<Code11BarcodeConfig>) {
|
||||
Object.assign(this, config);
|
||||
}
|
||||
|
||||
setLengthRange(minLength: number, maxLength: number) {
|
||||
this.minLength = minLength;
|
||||
this.maxLength = maxLength;
|
||||
}
|
||||
}
|
||||
|
||||
export class DatamatrixBarcodeConfig {
|
||||
enabled?: boolean;
|
||||
dpmMode?: number;
|
||||
minLength?: number;
|
||||
maxLength?: number;
|
||||
|
||||
constructor(config: Partial<DatamatrixBarcodeConfig>) {
|
||||
Object.assign(this, config);
|
||||
}
|
||||
|
||||
setLengthRange(minLength: number, maxLength: number) {
|
||||
this.minLength = minLength;
|
||||
this.maxLength = maxLength;
|
||||
}
|
||||
}
|
||||
|
||||
export class GeneralSettings {
|
||||
threadsLimit?: number;
|
||||
decodingSpeed?: DecodingSpeed;
|
||||
roiX?: number;
|
||||
roiY?: number;
|
||||
roiWidth?: number;
|
||||
roiHeight?: number;
|
||||
formattingType?: FormattingType;
|
||||
encodingCharacterSet?: string;
|
||||
maximumResultsCount?: number;
|
||||
duplicatesDelayMs?: number;
|
||||
multicodeCachingDuration?: number;
|
||||
multicodeCachingEnabled?: boolean;
|
||||
upcEanDeblur?: number;
|
||||
enableMisshaped1D?: number;
|
||||
|
||||
constructor(config: Partial<GeneralSettings>) {
|
||||
Object.assign(this, config);
|
||||
}
|
||||
|
||||
setROI(x: number, y: number, width: number, height: number): void {
|
||||
this.roiX = x;
|
||||
this.roiY = y;
|
||||
this.roiWidth = width;
|
||||
this.roiHeight = height;
|
||||
}
|
||||
}
|
||||
@@ -219,6 +219,30 @@ export class CFWebCheckoutPayment implements CheckoutPayment {
|
||||
}
|
||||
}
|
||||
|
||||
export class CFUPIIntentCheckoutPayment implements CheckoutPayment {
|
||||
private readonly session: CFSession;
|
||||
private readonly theme: CFTheme = new CFThemeBuilder().build();
|
||||
version: string;
|
||||
|
||||
constructor(
|
||||
session: CFSession,
|
||||
theme: CFTheme | null
|
||||
) {
|
||||
this.session = session;
|
||||
if (theme !== null) {
|
||||
this.theme = theme;
|
||||
}
|
||||
}
|
||||
|
||||
getSession() {
|
||||
return this.session;
|
||||
}
|
||||
|
||||
getTheme() {
|
||||
return this.theme;
|
||||
}
|
||||
}
|
||||
|
||||
interface CFResult {
|
||||
orderID: string;
|
||||
}
|
||||
@@ -265,6 +289,15 @@ export class CFPaymentGateway extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiate UPI Checkout Payment.
|
||||
* @param {CFUPIIntentCheckoutPayment} [upiCheckoutPayment] webCheckoutPaymentObject information
|
||||
*/
|
||||
@Cordova()
|
||||
doUPIPayment(upiCheckoutPayment: CFUPIIntentCheckoutPayment) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Callback.
|
||||
* @param {CFCallback} [cfCallback] callbacks for payment.
|
||||
|
||||
@@ -99,7 +99,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
* Call this method to set a custom locale for the clevertap instance.
|
||||
* @param locale {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
*/
|
||||
@Cordova()
|
||||
setLocale(locale: string): Promise<any> {
|
||||
return;
|
||||
@@ -130,18 +130,6 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the device's Xiaomi push token.
|
||||
* clevertap-cordova 2.6.0 onwards method requires region as a mandatory parameter.
|
||||
* @param token {string}
|
||||
* @param region {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setPushXiaomiToken(token: string, region: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the device's Baidu push token
|
||||
*
|
||||
@@ -663,6 +651,28 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes all images and gifs which are preloaded for inapps in cs mode.
|
||||
*
|
||||
* @param expiredOnly {boolean} - to clear only assets which will not be needed further for inapps
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
clearInAppResources(expiredOnly: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches In Apps from server.
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
fetchInApps(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*******************
|
||||
* Session
|
||||
******************/
|
||||
@@ -836,7 +846,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
markReadInboxMessageForId(messageId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Call this to Mark Read Inbox Messages For Ids in bulk
|
||||
*
|
||||
@@ -857,7 +867,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
dismissInbox(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Call this to Mark Push Inbox Notification Viewed Event for Id
|
||||
*
|
||||
@@ -1079,7 +1089,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
/****************************
|
||||
* Product Experiences methods
|
||||
****************************/
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Uploads variables to the server. Requires Development/Debug build/configuration.
|
||||
@@ -1113,7 +1123,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create variables.
|
||||
* Create variables.
|
||||
* @returns {Promise<any>}
|
||||
* @param {object} variables The JSON Object specifying the varibles to be created.
|
||||
*/
|
||||
@@ -1131,7 +1141,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
getVariable(name: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get all variables via a JSON object.
|
||||
* @returns {Promise<any>}
|
||||
@@ -1194,7 +1204,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************
|
||||
* Developer Options
|
||||
******************/
|
||||
|
||||
403
src/@awesome-cordova-plugins/plugins/contacts/index.ts
Normal file
403
src/@awesome-cordova-plugins/plugins/contacts/index.ts
Normal file
@@ -0,0 +1,403 @@
|
||||
import {
|
||||
CordovaCheck,
|
||||
CordovaInstance,
|
||||
InstanceCheck,
|
||||
InstanceProperty,
|
||||
AwesomeCordovaNativePlugin,
|
||||
Plugin,
|
||||
checkAvailability,
|
||||
getPromise,
|
||||
} from '@awesome-cordova-plugins/core';
|
||||
|
||||
declare const window: any, navigator: any;
|
||||
|
||||
export type ContactFieldType =
|
||||
| '*'
|
||||
| 'addresses'
|
||||
| 'birthday'
|
||||
| 'categories'
|
||||
| 'country'
|
||||
| 'department'
|
||||
| 'displayName'
|
||||
| 'emails'
|
||||
| 'name.familyName'
|
||||
| 'name.formatted'
|
||||
| 'name.givenName'
|
||||
| 'name.honorificPrefix'
|
||||
| 'name.honorificSuffix'
|
||||
| 'id'
|
||||
| 'ims'
|
||||
| 'locality'
|
||||
| 'name.middleName'
|
||||
| 'name'
|
||||
| 'nickname'
|
||||
| 'note'
|
||||
| 'organizations'
|
||||
| 'phoneNumbers'
|
||||
| 'photos'
|
||||
| 'postalCode'
|
||||
| 'region'
|
||||
| 'streetAddress'
|
||||
| 'title'
|
||||
| 'urls';
|
||||
|
||||
export interface IContactProperties {
|
||||
/** A globally unique identifier. */
|
||||
id?: string;
|
||||
|
||||
/** A globally unique identifier on Android. */
|
||||
rawId?: string;
|
||||
|
||||
/** The name of this Contact, suitable for display to end users. */
|
||||
displayName?: string;
|
||||
|
||||
/** An object containing all components of a persons name. */
|
||||
name?: IContactName;
|
||||
|
||||
/** A casual name by which to address the contact. */
|
||||
nickname?: string;
|
||||
|
||||
/** An array of all the contact's phone numbers. */
|
||||
phoneNumbers?: IContactField[];
|
||||
|
||||
/** An array of all the contact's email addresses. */
|
||||
emails?: IContactField[];
|
||||
|
||||
/** An array of all the contact's addresses. */
|
||||
addresses?: IContactAddress[];
|
||||
|
||||
/** An array of all the contact's IM addresses. */
|
||||
ims?: IContactField[];
|
||||
|
||||
/** An array of all the contact's organizations. */
|
||||
organizations?: IContactOrganization[];
|
||||
|
||||
/** The birthday of the contact. */
|
||||
birthday?: Date;
|
||||
|
||||
/** A note about the contact. */
|
||||
note?: string;
|
||||
|
||||
/** An array of the contact's photos. */
|
||||
photos?: IContactField[];
|
||||
|
||||
/** An array of all the user-defined categories associated with the contact. */
|
||||
categories?: IContactField[];
|
||||
|
||||
/** An array of web pages associated with the contact. */
|
||||
urls?: IContactField[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
export class Contact implements IContactProperties {
|
||||
@InstanceProperty() id: string;
|
||||
@InstanceProperty() displayName: string;
|
||||
@InstanceProperty() name: IContactName;
|
||||
@InstanceProperty() nickname: string;
|
||||
@InstanceProperty() phoneNumbers: IContactField[];
|
||||
@InstanceProperty() emails: IContactField[];
|
||||
@InstanceProperty() addresses: IContactAddress[];
|
||||
@InstanceProperty() ims: IContactField[];
|
||||
@InstanceProperty() organizations: IContactOrganization[];
|
||||
@InstanceProperty() birthday: Date;
|
||||
@InstanceProperty() note: string;
|
||||
@InstanceProperty() photos: IContactField[];
|
||||
@InstanceProperty() categories: IContactField[];
|
||||
@InstanceProperty() urls: IContactField[];
|
||||
private _objectInstance: any;
|
||||
|
||||
[key: string]: any;
|
||||
|
||||
constructor() {
|
||||
if (checkAvailability('navigator.contacts', 'create', 'Contacts') === true) {
|
||||
this._objectInstance = navigator.contacts.create();
|
||||
}
|
||||
}
|
||||
|
||||
@InstanceCheck()
|
||||
clone(): Contact {
|
||||
const newContact: any = new Contact();
|
||||
for (const prop in this) {
|
||||
if (prop === 'id') return;
|
||||
newContact[prop] = this[prop];
|
||||
}
|
||||
return newContact;
|
||||
}
|
||||
|
||||
@CordovaInstance()
|
||||
remove(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@InstanceCheck()
|
||||
save(): Promise<any> {
|
||||
return getPromise((resolve: Function, reject: Function) => {
|
||||
this._objectInstance.save((contact: any) => {
|
||||
this._objectInstance = contact;
|
||||
resolve(this);
|
||||
}, reject);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
export interface IContactError {
|
||||
/** Error code */
|
||||
code: number;
|
||||
/** Error message */
|
||||
message: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
export declare const ContactError: {
|
||||
new (code: number): IContactError;
|
||||
UNKNOWN_ERROR: number;
|
||||
INVALID_ARGUMENT_ERROR: number;
|
||||
TIMEOUT_ERROR: number;
|
||||
PENDING_OPERATION_ERROR: number;
|
||||
IO_ERROR: number;
|
||||
NOT_SUPPORTED_ERROR: number;
|
||||
PERMISSION_DENIED_ERROR: number;
|
||||
};
|
||||
|
||||
export interface IContactName {
|
||||
/** The complete name of the contact. */
|
||||
formatted?: string;
|
||||
/** The contact's family name. */
|
||||
familyName?: string;
|
||||
/** The contact's given name. */
|
||||
givenName?: string;
|
||||
/** The contact's middle name. */
|
||||
middleName?: string;
|
||||
/** The contact's prefix (example Mr. or Dr.) */
|
||||
honorificPrefix?: string;
|
||||
/** The contact's suffix (example Esq.). */
|
||||
honorificSuffix?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
export class ContactName implements IContactName {
|
||||
constructor(
|
||||
public formatted?: string,
|
||||
public familyName?: string,
|
||||
public givenName?: string,
|
||||
public middleName?: string,
|
||||
public honorificPrefix?: string,
|
||||
public honorificSuffix?: string
|
||||
) {}
|
||||
}
|
||||
|
||||
export interface IContactField {
|
||||
/** A string that indicates what type of field this is, home for example. */
|
||||
type?: string;
|
||||
/** The value of the field, such as a phone number or email address. */
|
||||
value?: string;
|
||||
/** Set to true if this ContactField contains the user's preferred value. */
|
||||
pref?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
export class ContactField implements IContactField {
|
||||
constructor(public type?: string, public value?: string, public pref?: boolean) {}
|
||||
}
|
||||
|
||||
export interface IContactAddress {
|
||||
/** Set to true if this ContactAddress contains the user's preferred value. */
|
||||
pref?: boolean;
|
||||
/** A string indicating what type of field this is, home for example. */
|
||||
type?: string;
|
||||
/** The full address formatted for display. */
|
||||
formatted?: string;
|
||||
/** The full street address. */
|
||||
streetAddress?: string;
|
||||
/** The city or locality. */
|
||||
locality?: string;
|
||||
/** The state or region. */
|
||||
region?: string;
|
||||
/** The zip code or postal code. */
|
||||
postalCode?: string;
|
||||
/** The country name. */
|
||||
country?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
export class ContactAddress implements IContactAddress {
|
||||
constructor(
|
||||
public pref?: boolean,
|
||||
public type?: string,
|
||||
public formatted?: string,
|
||||
public streetAddress?: string,
|
||||
public locality?: string,
|
||||
public region?: string,
|
||||
public postalCode?: string,
|
||||
public country?: string
|
||||
) {}
|
||||
}
|
||||
|
||||
export interface IContactOrganization {
|
||||
/** Set to true if this ContactOrganization contains the user's preferred value. */
|
||||
pref?: boolean;
|
||||
/** A string that indicates what type of field this is, home for example. */
|
||||
type?: string;
|
||||
/** The name of the organization. */
|
||||
name?: string;
|
||||
/** The department the contract works for. */
|
||||
department?: string;
|
||||
/** The contact's title at the organization. */
|
||||
title?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
export class ContactOrganization implements IContactOrganization {
|
||||
constructor(
|
||||
public type?: string,
|
||||
public name?: string,
|
||||
public department?: string,
|
||||
public title?: string,
|
||||
public pref?: boolean
|
||||
) {}
|
||||
}
|
||||
|
||||
/** Search options to filter navigator.contacts. */
|
||||
export interface IContactFindOptions {
|
||||
/** The search string used to find navigator.contacts. */
|
||||
filter?: string;
|
||||
/** Determines if the find operation returns multiple navigator.contacts. Defaults to false. */
|
||||
multiple?: boolean;
|
||||
/** Contact fields to be returned back. If specified, the resulting Contact object only features values for these fields. */
|
||||
desiredFields?: string[];
|
||||
/**
|
||||
* (Android only): Filters the search to only return contacts with a phone number informed.
|
||||
*/
|
||||
hasPhoneNumber?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
export class ContactFindOptions implements IContactFindOptions {
|
||||
constructor(
|
||||
public filter?: string,
|
||||
public multiple?: boolean,
|
||||
public desiredFields?: string[],
|
||||
public hasPhoneNumber?: boolean
|
||||
) {}
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Contacts
|
||||
* @premier contacts
|
||||
* @description
|
||||
* Access and manage Contacts on the device.
|
||||
*
|
||||
* @usage
|
||||
*
|
||||
* ```typescript
|
||||
* import { Contacts, Contact, ContactField, ContactName } from '@ionic-native/contacts/ngx';
|
||||
*
|
||||
* constructor(private contacts: Contacts) { }
|
||||
*
|
||||
* let contact: Contact = this.contacts.create();
|
||||
*
|
||||
* contact.name = new ContactName(null, 'Smith', 'John');
|
||||
* contact.phoneNumbers = [new ContactField('mobile', '6471234567')];
|
||||
* contact.save().then(
|
||||
* () => console.log('Contact saved!', contact),
|
||||
* (error: any) => console.error('Error saving contact.', error)
|
||||
* );
|
||||
*
|
||||
* ```
|
||||
* @classes
|
||||
* Contact
|
||||
* @interfaces
|
||||
* IContactProperties
|
||||
* IContactError
|
||||
* IContactName
|
||||
* IContactField
|
||||
* IContactAddress
|
||||
* IContactOrganization
|
||||
* IContactFindOptions
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Contacts',
|
||||
plugin: 'cordova-plugin-contacts',
|
||||
pluginRef: 'navigator.contacts',
|
||||
repo: 'https://github.com/herdwatch-apps/cordova-plugin-contacts',
|
||||
platforms: [
|
||||
'Android',
|
||||
'BlackBerry 10',
|
||||
'Browser',
|
||||
'Firefox OS',
|
||||
'iOS',
|
||||
'Ubuntu',
|
||||
'Windows',
|
||||
'Windows 8',
|
||||
'Windows Phone',
|
||||
],
|
||||
})
|
||||
export class Contacts extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Create a single contact.
|
||||
* @returns {Contact} Returns a Contact object
|
||||
*/
|
||||
create(): Contact {
|
||||
return new Contact();
|
||||
}
|
||||
|
||||
/**
|
||||
* Search for contacts in the Contacts list.
|
||||
* @param {ContactFieldType[]} fields Contact fields to be used as a search qualifier
|
||||
* @param {IContactFindOptions} [options] Optional options for the query
|
||||
* @returns {Promise<Contact[]>} Returns a Promise that resolves with the search results (an array of Contact objects)
|
||||
*/
|
||||
@CordovaCheck()
|
||||
find(fields: ContactFieldType[], options?: IContactFindOptions): Promise<Contact[]> {
|
||||
return getPromise((resolve: Function, reject: Function) => {
|
||||
navigator.contacts.find(
|
||||
fields,
|
||||
(contacts: any[]) => {
|
||||
resolve(contacts.map(processContact));
|
||||
},
|
||||
reject,
|
||||
options
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Select a single Contact.
|
||||
* @returns {Promise<Contact>} Returns a Promise that resolves with the selected Contact
|
||||
*/
|
||||
@CordovaCheck()
|
||||
pickContact(): Promise<Contact> {
|
||||
return getPromise((resolve: Function, reject: Function) => {
|
||||
navigator.contacts.pickContact((contact: any) => resolve(processContact(contact)), reject);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
function processContact(contact: any) {
|
||||
const newContact = new Contact();
|
||||
for (const prop in contact) {
|
||||
if (typeof contact[prop] === 'function') continue;
|
||||
newContact[prop] = contact[prop];
|
||||
}
|
||||
return newContact;
|
||||
}
|
||||
@@ -116,8 +116,9 @@ export interface MessagePayloadAps {
|
||||
alert?: {
|
||||
title: string;
|
||||
body: string;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export interface MessagePayload {
|
||||
title?: string;
|
||||
body?: string;
|
||||
@@ -797,6 +798,28 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Asynchronously fetches and then activates the fetched configs.
|
||||
*
|
||||
* @param {Function} success - callback function which will be passed a {boolean} argument indicating whether result the current call activated the fetched config.
|
||||
* @param {Function} error - callback function which will be passed a {string} error message as an argument
|
||||
*/
|
||||
@Cordova()
|
||||
fetchAndActivate(success: (activated: boolean) => void, error: (err: string) => void): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a Map of Firebase Remote Config key value pairs.
|
||||
*
|
||||
* @param {Function} success - callback function which will be passed an {object} argument where key is the remote config key and value is the value as a string. If the expected key value is a different primitive type then cast it to the appropriate type.
|
||||
* @param {Function} error - callback function which will be passed a {string} error message as an argument
|
||||
*/
|
||||
@Cordova()
|
||||
getAll(success: (values: any) => void, error: (err: string) => void): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a Remote Config value.
|
||||
*
|
||||
@@ -830,13 +853,20 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Android only. Change the settings for the FirebaseRemoteConfig object's operations.
|
||||
* Change the settings for the FirebaseRemoteConfig object's operations.
|
||||
*
|
||||
* @param {Object} settings
|
||||
* @returns {Promise<any>}
|
||||
* @param {number} fetchTimeout - fetch timeout in seconds. Default is 60 seconds.
|
||||
* @param {number} minimumFetchInterval - minimum fetch inteval in seconds. Default is 12 hours.
|
||||
* @param {Function} success - callback function to be call on successfully setting the remote config settings
|
||||
* @param {Function} error - callback function which will be passed a {string} error message as an argument
|
||||
*/
|
||||
@Cordova()
|
||||
setConfigSettings(settings: any): Promise<any> {
|
||||
setConfigSettings(
|
||||
fetchTimeout: number,
|
||||
minimumFetchInterval: number,
|
||||
success: () => void,
|
||||
error: (err: string) => void
|
||||
): void {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -989,6 +1019,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
||||
* Fetches all the documents in the specific collection.
|
||||
*
|
||||
* @param {string} collection - name of top-level collection to fetch.
|
||||
* @param {Array} filters - filters to apply to collection.
|
||||
* @param {Function} success - callback function to call on successfully deleting the document. Will be passed an {object} containing all the documents in the collection,
|
||||
* indexed by document ID. If a Firebase collection with that name does not exist or it contains no documents, the object will be empty.
|
||||
* @param {Function} error - callback function which will be passed a {string} error message as an argument.
|
||||
@@ -996,9 +1027,19 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
||||
@Cordova()
|
||||
fetchFirestoreCollection(
|
||||
collection: string,
|
||||
filters: any[],
|
||||
success: (docs: any) => void,
|
||||
error: (err: string) => void
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Set new V2 consent mode
|
||||
*
|
||||
* @param {array} consent array of consent
|
||||
*/
|
||||
@Cordova()
|
||||
setAnalyticsConsentMode(consent: []): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
227
src/@awesome-cordova-plugins/plugins/genius-scan/index.ts
Normal file
227
src/@awesome-cordova-plugins/plugins/genius-scan/index.ts
Normal file
@@ -0,0 +1,227 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core';
|
||||
|
||||
/**
|
||||
* @name Genius Scan
|
||||
* @description
|
||||
* Plugin allows you to access the Genius Scan SDK core features from a Ionic application
|
||||
* @usage
|
||||
*
|
||||
* ```typescript
|
||||
* import { GeniusScan } from '@awesome-cordova-plugins/genius-scan/ngx';
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* constructor(private geniusScan: GeniusScan, private platform: Platform) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.platform.ready().then(() => {
|
||||
* this.geniusScan.setLicenseKey('YOUR_KEY', true)
|
||||
* .then(() => {
|
||||
* this.geniusScan.scanWithConfiguration(configuration)
|
||||
* })
|
||||
* .catch(e => console.log('Error starting GeniusScan', e));
|
||||
* });
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'GeniusScan',
|
||||
plugin: '@thegrizzlylabs/cordova-plugin-genius-scan',
|
||||
pluginRef: 'cordova.plugins.GeniusScan',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class GeniusScan extends AwesomeCordovaNativePlugin {
|
||||
@Cordova()
|
||||
setLicenseKey(licenseKey: string, autoRefresh: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
scanWithConfiguration(configuration: ScanConfiguration): Promise<SuccessScanResult> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
generateDocument(document: GenerateDocumentPages, configuration: GenerateDocumentConfiguration): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
interface ScanConfiguration {
|
||||
/**
|
||||
* (defaults to camera)
|
||||
*/
|
||||
source?: 'camera' | 'image' | 'library';
|
||||
|
||||
/**
|
||||
* An absolute image url, required if source is image. Example: file:///var/…/image.png
|
||||
*/
|
||||
sourceImageUrl?: string;
|
||||
|
||||
/**
|
||||
* If true, after a page is scanned, a prompt to scan another page will be displayed.
|
||||
* If false, a single page will be scanned.
|
||||
* (defaults to true).
|
||||
*/
|
||||
multiPage?: boolean;
|
||||
|
||||
/**
|
||||
* (defaults to pdf)
|
||||
*/
|
||||
multiPageFormat?: 'pdf' | 'tiff' | 'none';
|
||||
|
||||
/**
|
||||
* (by default, the filter is chosen automatically)
|
||||
*/
|
||||
defaultFilter?: 'none' | 'blackAndWhite' | 'monochrome' | 'color' | 'photo';
|
||||
|
||||
/**
|
||||
* defaults to fit
|
||||
*/
|
||||
pdfPageSize?: 'fit' | 'a4' | 'letter';
|
||||
|
||||
/**
|
||||
* max dimension in pixels when images are scaled before PDF generation,
|
||||
* for example 2000 to fit both height and width within 2000px.
|
||||
* Defaults to 0, which means no scaling is performed.
|
||||
*/
|
||||
pdfMaxScanDimension?: number;
|
||||
|
||||
/**
|
||||
* Custom font file used during the PDF generation to embed an invisible text layer.
|
||||
* If null, a default font is used, which only supports Latin languages.
|
||||
*/
|
||||
pdfFontFileUrl?: string;
|
||||
|
||||
/**
|
||||
* JPEG quality used to compress captured images.
|
||||
* Between 0 and 100, 100 being the best quality.
|
||||
* Default is 60.
|
||||
*/
|
||||
jpegQuality?: number;
|
||||
|
||||
/**
|
||||
* an array with the desired actions to display during the post processing screen
|
||||
* (defaults to all actions).
|
||||
*/
|
||||
postProcessingActions?: ('rotate' | 'editFilter' | 'correctDistortion')[];
|
||||
|
||||
/**
|
||||
* (default to false)
|
||||
*/
|
||||
flashButtonHidden?: boolean;
|
||||
|
||||
/**
|
||||
* (default to off)
|
||||
*/
|
||||
defaultFlashMode?: 'auto' | 'on' | 'off';
|
||||
|
||||
/**
|
||||
* representing a color, must start with a #. The color of the icons, text
|
||||
* (defaults to '#ffffff')
|
||||
*/
|
||||
foregroundColor?: string;
|
||||
|
||||
/**
|
||||
* representing a color, must start with a #. The color of the toolbar, screen background
|
||||
* (defaults to black)
|
||||
*/
|
||||
backgroundColor?: string;
|
||||
|
||||
/**
|
||||
* representing a color, must start with a #. The color of the image overlays
|
||||
* (default to blue)
|
||||
*/
|
||||
highlightColor?: string;
|
||||
|
||||
/**
|
||||
* representing a color, must start with a #. The color of the menus
|
||||
* (defaults to system defaults.)
|
||||
*/
|
||||
menuColor?: string;
|
||||
|
||||
/**
|
||||
* text recognition options. Text recognition will run on a background thread for every captured image. No text recognition will be applied if this parameter is not present.
|
||||
*/
|
||||
ocrConfiguration?: {
|
||||
/**
|
||||
* list of BCP 47 language tags (eg ["en-US"]) for which to run text recognition.
|
||||
* Note that text recognition will take longer if multiple languages are specified.
|
||||
*/
|
||||
languages: string[];
|
||||
|
||||
/**
|
||||
* an array with the formats in which the OCR result is made available in the ScanFlow result
|
||||
* (defaults to all formats).
|
||||
* Possible formats are rawText, hOCR and textLayerInPDF.
|
||||
*/
|
||||
outputFormats?: ('rawText' | 'hOCR' | 'textLayerInPDF')[];
|
||||
};
|
||||
}
|
||||
|
||||
interface SuccessScanResult {
|
||||
/**
|
||||
* a document containing all the scanned pages (example: "file://.pdf")
|
||||
*/
|
||||
multiPageDocumentUrl: string;
|
||||
|
||||
/**
|
||||
* an array of scan objects.
|
||||
*/
|
||||
scans: {
|
||||
/**
|
||||
* the original file as scanned from the camera. "file://.jpeg"
|
||||
*/
|
||||
originalUrl: string;
|
||||
|
||||
/**
|
||||
* the cropped and enhanced file, as processed by the SDK. "file://.{jpeg|png}"
|
||||
*/
|
||||
enhancedUrl: string;
|
||||
|
||||
/**
|
||||
* the result of text recognition for this scan
|
||||
*/
|
||||
ocrResult: {
|
||||
/**
|
||||
* the raw text that was recognized
|
||||
*/
|
||||
text: string;
|
||||
|
||||
/**
|
||||
* the recognized text in hOCR format (with position, style…)
|
||||
*/
|
||||
hocrTextLayout: string;
|
||||
};
|
||||
}[];
|
||||
}
|
||||
|
||||
interface GenerateDocumentPages {
|
||||
pages: {
|
||||
/**
|
||||
* the URL of the image file for this page, e.g. file://<filepath>.{jpeg|png}
|
||||
*/
|
||||
imageUrl: string;
|
||||
|
||||
/**
|
||||
* the text layout in hOCR format
|
||||
*/
|
||||
hocrTextLayout: string;
|
||||
}[];
|
||||
}
|
||||
|
||||
interface GenerateDocumentConfiguration {
|
||||
/**
|
||||
* the URL where the document should be generated, e.g. file://<filepath>.pdf
|
||||
*/
|
||||
outputFileUrl: string;
|
||||
|
||||
/**
|
||||
* Custom font file used during the PDF generation to embed an invisible text layer.
|
||||
* If null, a default font is used, which only supports Latin languages.
|
||||
*/
|
||||
pdfFontFileUrl?: string;
|
||||
}
|
||||
@@ -17,7 +17,8 @@ export type Event =
|
||||
| 'depersonalized'
|
||||
| 'inAppChat.availabilityUpdated'
|
||||
| 'inAppChat.unreadMessageCounterUpdated'
|
||||
| 'deeplink';
|
||||
| 'deeplink'
|
||||
| 'inAppChat.viewStateChanged';
|
||||
|
||||
export interface CustomEvent {
|
||||
definitionId: string;
|
||||
@@ -31,6 +32,7 @@ export interface Configuration {
|
||||
applicationCode: string;
|
||||
geofencingEnabled?: boolean;
|
||||
inAppChatEnabled?: boolean;
|
||||
fullFeaturedInAppsEnabled?: boolean | undefined;
|
||||
/**
|
||||
* Message storage save callback
|
||||
*/
|
||||
@@ -167,6 +169,20 @@ export interface Message {
|
||||
webViewUrl?: string;
|
||||
inAppOpenTitle?: string | undefined;
|
||||
inAppDismissTitle?: string;
|
||||
topic?: string | undefined;
|
||||
}
|
||||
|
||||
export interface MMInbox {
|
||||
countTotal: number;
|
||||
countUnread: number;
|
||||
messages?: Message[] | undefined;
|
||||
}
|
||||
|
||||
export interface MMInboxFilterOptions {
|
||||
fromDateTime?: string | undefined;
|
||||
toDateTime?: string | undefined;
|
||||
topic?: string | undefined;
|
||||
limit?: number | undefined;
|
||||
}
|
||||
|
||||
export interface MobileMessagingError {
|
||||
@@ -592,4 +608,55 @@ export class MobileMessaging extends AwesomeCordovaNativePlugin {
|
||||
resetMessageCounter() {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers for Android POST_NOTIFICATIONS permission
|
||||
* @name registerForAndroidRemoteNotifications
|
||||
*/
|
||||
@Cordova()
|
||||
registerForAndroidRemoteNotifications() {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch mobile inbox data from the server.
|
||||
*
|
||||
* @name fetchInboxMessages
|
||||
* @param token access token (JWT in a strictly predefined format) required for current user to have access to the Inbox messages
|
||||
* @param externalUserId External User ID is meant to be an ID of a user in an external (non-Infobip) service
|
||||
* @param filterOptions filtering options applied to messages list in response. Nullable, will return default number of messages
|
||||
* @param callback will be called on success
|
||||
* @param {Function} errorCallback will be called on error
|
||||
*/
|
||||
@Cordova()
|
||||
fetchInboxMessages(token: string, externalUserId: string, filterOptions: MMInboxFilterOptions): Promise<MMInbox> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch mobile inbox without token from the server.
|
||||
*
|
||||
* @name fetchInboxMessagesWithoutToken
|
||||
* @param externalUserId External User ID is meant to be an ID of a user in an external (non-Infobip) service
|
||||
* @param filterOptions filtering options applied to messages list in response. Nullable, will return default number of messages
|
||||
* @param callback will be called on success
|
||||
* @param {Function} errorCallback will be called on error
|
||||
*/
|
||||
@Cordova()
|
||||
fetchInboxMessagesWithoutToken(externalUserId: string, filterOptions: MMInboxFilterOptions): Promise<MMInbox> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Asynchronously marks inbox messages as seen
|
||||
*
|
||||
* @param externalUserId External User ID is meant to be an ID of a user in an external (non-Infobip) service
|
||||
* @param messageIds array of inbox messages identifiers that need to be marked as seen
|
||||
* @param callback will be called on success
|
||||
* @param {Function} errorCallback will be called on error
|
||||
*/
|
||||
@Cordova()
|
||||
setInboxMessagesSeen(externalUserId: string, messageIds: string[]): Promise<string[]> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
78
src/@awesome-cordova-plugins/plugins/screenshot/index.ts
Normal file
78
src/@awesome-cordova-plugins/plugins/screenshot/index.ts
Normal file
@@ -0,0 +1,78 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { AwesomeCordovaNativePlugin, Plugin, getPromise } from '@awesome-cordova-plugins/core';
|
||||
|
||||
declare const navigator: any;
|
||||
|
||||
/**
|
||||
* @name Screenshot
|
||||
* @description Captures a screen shot
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Screenshot } from '@ionic-native/screenshot/ngx';
|
||||
*
|
||||
* constructor(private screenshot: Screenshot) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* // Take a screenshot and save to file
|
||||
* this.screenshot.save('jpg', 80, 'myscreenshot.jpg').then(onSuccess, onError);
|
||||
*
|
||||
* // Take a screenshot and get temporary file URI
|
||||
* this.screenshot.URI(80).then(onSuccess, onError);
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Screenshot',
|
||||
plugin: '@herdwatch-apps/cordova-plugin-screenshot',
|
||||
pluginRef: 'navigator.screenshot',
|
||||
repo: 'https://github.com/herdwatch-apps/cordova-plugin-screenshot',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class Screenshot extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Takes screenshot and saves the image
|
||||
*
|
||||
* @param format {string} Format can take the value of either 'jpg' or 'png'
|
||||
* On ios, only 'jpg' format is supported
|
||||
* @param quality {number} Determines the quality of the screenshot.
|
||||
* Default quality is set to 100.
|
||||
* @param filename {string} Name of the file as stored on the storage
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
save(format?: string, quality?: number, filename?: string): Promise<any> {
|
||||
return getPromise<any>((resolve, reject) => {
|
||||
navigator.screenshot.save(
|
||||
(error: any, result: any) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
resolve(result);
|
||||
}
|
||||
},
|
||||
format,
|
||||
quality,
|
||||
filename
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Takes screenshot and returns the image as an URI
|
||||
*
|
||||
* @param quality {number} Determines the quality of the screenshot.
|
||||
* Default quality is set to 100.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
URI(quality?: number): Promise<any> {
|
||||
return getPromise<any>((resolve, reject) => {
|
||||
navigator.screenshot.URI((error: any, result: any) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
resolve(result);
|
||||
}
|
||||
}, quality);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, AwesomeCordovaNativePlugin } from '@awesome-cordova-plugins/core';
|
||||
|
||||
/**
|
||||
* @name SSLCertificateChecker
|
||||
* @description
|
||||
* Cordova plugin to check SSL certificates on Android and iOS.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { SSLCertificateChecker } from '@awesome-cordova-plugins/ssl-certificate-checker';
|
||||
*
|
||||
* constructor(private sslCertificateChecker: SSLCertificateChecker) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.sslCertificateChecker.check(serverURL, allowedFingerprint)
|
||||
* .then(() => console.log('Certificate is valid'))
|
||||
* .catch(error => console.error('Certificate is invalid', error));
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.sslCertificateChecker.checkInCertChain(serverURL, allowedFingerprint)
|
||||
* .then(() => console.log('Certificate chain is valid'))
|
||||
* .catch(error => console.error('Certificate chain is invalid', error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'SSLCertificateChecker',
|
||||
plugin: 'SSLCertificateChecker-PhoneGap-Plugin',
|
||||
pluginRef: 'SSLCertificateChecker',
|
||||
repo: 'https://github.com/EddyVerbruggen/SSLCertificateChecker-PhoneGap-Plugin',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class SSLCertificateChecker extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Checks if the SSL certificate of the specified server matches the provided fingerprint.
|
||||
* @param serverURL - The URL of the server to check.
|
||||
* @param allowedFingerprint - The allowed SHA-1 fingerprint.
|
||||
* @return {Promise<void>} Returns a promise that resolves if the certificate is valid, otherwise rejects with an error.
|
||||
*/
|
||||
@Cordova()
|
||||
check(serverURL: string, allowedFingerprint: string | string[]): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* (Not recommended in versions higher than 4.0.0)
|
||||
* Checks if the SSL certificate of the specified server is in the certificate chain
|
||||
* and matches the provided fingerprint.
|
||||
* @param serverURL - The URL of the server to check.
|
||||
* @param allowedFingerprint - The allowed SHA-1 fingerprint.
|
||||
* @return {Promise<void>} Returns a promise that resolves if the certificate chain is valid, otherwise rejects with an error.
|
||||
* @deprecated This function is considered insecure.
|
||||
*/
|
||||
@Cordova()
|
||||
checkInCertChain(serverURL: string, allowedFingerprint: string | string[]): Promise<void> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
160
src/@awesome-cordova-plugins/plugins/we-cap-inbox/index.ts
Normal file
160
src/@awesome-cordova-plugins/plugins/we-cap-inbox/index.ts
Normal file
@@ -0,0 +1,160 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, AwesomeCordovaNativePlugin } from '@awesome-cordova-plugins/core';
|
||||
|
||||
/**
|
||||
* @name WE Cap Inbox
|
||||
* @description
|
||||
* This plugin provides functionalities to manage notifications in your app.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { WECapInbox } from '@awesome-cordova-plugins/we-cap-inbox';
|
||||
*
|
||||
* constructor(private wECapInbox: WECapInbox) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.WECapInbox.getNotificationCount()
|
||||
* .then((count: number) => console.log(count))
|
||||
* .catch((error: string) => console.error(error));
|
||||
* ```
|
||||
*/
|
||||
|
||||
@Plugin({
|
||||
pluginName: 'WECapInbox',
|
||||
plugin: 'we-notificationinbox-cordova', // npm package name, example: cordova-plugin-camera
|
||||
pluginRef: 'WENotificationInboxPlugin', // the variable reference to call the plugin,
|
||||
repo: 'https://github.com/WebEngage/we-ionic-notification-inbox',
|
||||
platforms: ['Android', 'iOS'], // Array of platforms supported, example: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class WECapInbox extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Resets the notification count.
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
resetNotificationCount(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the count of notifications.
|
||||
* @param {function} successCallback
|
||||
* @param {function} errorCallback
|
||||
* @returns {Promise<number>} - The count of notifications.
|
||||
*/
|
||||
@Cordova()
|
||||
getNotificationCount(successCallback: (count: String) => void, errorCallback: (error: string) => void): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**-
|
||||
* Retrieves Notification List
|
||||
* @param {JsonObject | null} offset - Optional offset for notifications
|
||||
* @param {function} successCallback
|
||||
* @param {function} errorCallback
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getNotificationList(
|
||||
offset: JsonObject | null,
|
||||
successCallback: (notifications: NotificationResponse) => void,
|
||||
errorCallback: (error: string) => void
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks a specific notification as read.
|
||||
* @param {JsonObject} notificationObject - The notification to mark as read.
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
markRead(notificationObject: JsonObject): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks a specific notification as unread.
|
||||
* @param {JsonObject} notificationObject - The notification to mark as unread.
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
markUnread(notificationObject: JsonObject): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tracks a click event on a notification.
|
||||
* @param {JsonObject} notificationObject - The notification that was clicked.
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
trackClick(notificationObject: JsonObject): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tracks the view event of a notification.
|
||||
* @param {JsonObject} notificationObject - The notification that was viewed.
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
trackView(notificationObject: JsonObject): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks a specific notification as deleted.
|
||||
* @param {JsonObject} notificationObject - The notification to delete.
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
markDelete(notificationObject: JsonObject): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks all notifications as read.
|
||||
* @param {JsonArray} notificationList - An array of notification identifiers to mark as read.
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
readAll(notificationList: JsonArray): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks all notifications as unread.
|
||||
* @param {JsonArray} notificationList - An array of notification identifiers to mark as unread.
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
unReadAll(notificationList: JsonArray): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes all notifications.
|
||||
* @param {JsonArray} notificationList - An array of notification identifiers to delete.
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
deleteAll(notificationList: JsonArray): Promise<void> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
export type JsonValue = string | number | boolean | null | JsonObject | JsonArray;
|
||||
|
||||
export type NotificationResponse = {
|
||||
hasNext: boolean;
|
||||
messageList: JsonArray;
|
||||
};
|
||||
|
||||
export type JsonObject = {
|
||||
[key: string]: JsonValue;
|
||||
};
|
||||
|
||||
export type JsonArray = JsonValue[];
|
||||
@@ -7,7 +7,7 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
||||
* Awesome Cordova Plugins wrapper that wraps Webengage Cordova plugin for Android and iOS
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Webengage, WebengageUser, WebengagePush, WebengageNotification } from '@awesome-cordova-plugins/webengage/ngx';
|
||||
* import { Webengage, WebengageUser, WebengagePush, WebengageNotification, WebengageJwtManager } from '@awesome-cordova-plugins/webengage/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private webengage: Webengage, private webengageUser: WebengageUser, private webengagePush: WebengagePush, private webengageNotification: WebengageNotification ) { }
|
||||
@@ -28,7 +28,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
||||
export class Webengage extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Initializes WebEngage SDK
|
||||
*
|
||||
* @param {any} [config]
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@@ -37,9 +36,17 @@ export class Webengage extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts Tracking Google Advertising ID
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
startGAIDTracking(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets WebEngage SDK configuration
|
||||
*
|
||||
* @param {string} key
|
||||
* @param {any} value
|
||||
* @returns {Promise<any>}
|
||||
@@ -51,7 +58,6 @@ export class Webengage extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* Tracks event
|
||||
*
|
||||
* @param {string} eventName
|
||||
* @param {any} [attributes]
|
||||
* @returns {Promise<any>}
|
||||
@@ -63,7 +69,6 @@ export class Webengage extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* Tracks screen
|
||||
*
|
||||
* @param {string} eventName
|
||||
* @param screenName
|
||||
* @param {any} [screenData]
|
||||
@@ -87,18 +92,26 @@ export class Webengage extends AwesomeCordovaNativePlugin {
|
||||
export class WebengageUser extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Logs user in
|
||||
*
|
||||
* @param {string} userId
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
login(userId: string): Promise<any> {
|
||||
login(userId: string, jwtToken?: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user in
|
||||
* @param {string} userId
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setSecureToken(userId: string, jwtToken: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user out
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
@@ -108,7 +121,6 @@ export class WebengageUser extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* Sets user attribute
|
||||
*
|
||||
* @param {string} key
|
||||
* @param {any} value
|
||||
* @returns {Promise<any>}
|
||||
@@ -117,6 +129,59 @@ export class WebengageUser extends AwesomeCordovaNativePlugin {
|
||||
setAttribute(key: string, value: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Device optIn
|
||||
* @param {boolean} optIn
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setDevicePushOptIn(optIn: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets user attribute
|
||||
* @param {string} channel
|
||||
* @param {any} optIn
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setUserOptIn(channel: string, optIn: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets user location
|
||||
* @param {number} latitude
|
||||
* @param {number} longitude
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setLocation(latitude: number, longitude: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Webengage',
|
||||
plugin: 'cordova-plugin-webengage',
|
||||
pluginRef: 'webengage.jwtManager',
|
||||
})
|
||||
@Injectable()
|
||||
export class WebengageJwtManager extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Callback function is invoked when a Jwt token is clicked
|
||||
* @param {any} callback
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
tokenInvalidatedCallback(callback: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -131,7 +196,6 @@ export class WebengageUser extends AwesomeCordovaNativePlugin {
|
||||
export class WebengagePush extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Callback function is invoked when a push notification is clicked
|
||||
*
|
||||
* @param {any} callback
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@@ -142,7 +206,6 @@ export class WebengagePush extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* Sets push notification configuration
|
||||
*
|
||||
* @param {string} key
|
||||
* @param {any} value
|
||||
* @returns {Promise<any>}
|
||||
@@ -165,7 +228,6 @@ export class WebengagePush extends AwesomeCordovaNativePlugin {
|
||||
export class WebengageNotification extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Callback function is invoked when a in-app notification is shown
|
||||
*
|
||||
* @param {any} callback
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@@ -174,9 +236,18 @@ export class WebengageNotification extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function is invoked before a in-app notification is shown
|
||||
* @param {any} callback
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
onPrepared(callback: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function is invoked when a in-app notification is clicked
|
||||
*
|
||||
* @param {any} callback
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@@ -187,7 +258,6 @@ export class WebengageNotification extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* Callback function is invoked when a in-app notification is dismissed
|
||||
*
|
||||
* @param {any} callback
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@@ -198,7 +268,6 @@ export class WebengageNotification extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* Sets in-app notification configuration
|
||||
*
|
||||
* @param {string} key
|
||||
* @param {any} value
|
||||
* @returns {Promise<any>}
|
||||
|
||||
Reference in New Issue
Block a user