chore(build): switch to eslint

This commit is contained in:
Daniel Sogl 2021-09-27 22:46:41 +02:00
parent 922da1b6d4
commit a1eaeb22f8
225 changed files with 4929 additions and 1865 deletions

13
.eslintrc Normal file
View File

@ -0,0 +1,13 @@
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "jsdoc"],
"extends": ["plugin:@typescript-eslint/recommended", "prettier", "plugin:jsdoc/recommended"],
"rules": {
"@typescript-eslint/no-unused-vars": ["off"],
"@typescript-eslint/no-explicit-any": ["warn"],
"@typescript-eslint/no-empty-function": ["off"],
"@typescript-eslint/ban-types": ["warn"],
"@typescript-eslint/no-empty-interface": ["warn"],
"@typescript-eslint/no-namespace": ["off"]
}
}

View File

@ -3,7 +3,7 @@
const gulp = require('gulp'),
minimist = require('minimist'),
rename = require('gulp-rename'),
tslint = require('gulp-tslint'),
eslint = require('gulp-eslint'),
replace = require('gulp-replace'),
_ = require('lodash');
@ -18,18 +18,6 @@ const flagConfig = {
/* Docs tasks */
require('./scripts/docs/gulp-tasks')(gulp, flags);
gulp.task('lint', () => {
return gulp
.src('src/**/*.ts')
.pipe(
tslint({
formatter: 'verbose',
configuration: 'tslint.json',
})
)
.pipe(tslint.report());
});
gulp.task('plugin:create', () => {
if (flags.n && flags.n !== '') {
const src = flags.m ? './scripts/templates/wrap-min.tmpl' : './scripts/templates/wrap.tmpl',

2621
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -16,7 +16,7 @@
"build": "npm run build:core && npm run build:esm && npm run build:ngx && npm run build:es5",
"prebuild": "rimraf -rf dist",
"npmpub": "ts-node -P scripts/tsconfig.json scripts/tasks/publish",
"lint": "gulp lint",
"lint": "eslint src/**/*.ts",
"readmes": "gulp readmes",
"docs-json": "ts-node -P scripts/tsconfig.json scripts/docs-json",
"version": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md",
@ -38,16 +38,19 @@
"@types/node": "^16.9.1",
"@types/rimraf": "^3.0.2",
"@types/webpack": "^5.28.0",
"@typescript-eslint/eslint-plugin": "^4.32.0",
"@typescript-eslint/parser": "^4.32.0",
"async-promise-queue": "^1.0.5",
"conventional-changelog-cli": "^2.1.1",
"cz-conventional-changelog": "^3.3.0",
"dgeni": "^0.4.14",
"dgeni-packages": "0.16.10",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-jsdoc": "^36.1.0",
"fs-extra": "^10.0.0",
"gulp": "^4.0.2",
"gulp-rename": "^2.0.0",
"gulp-replace": "^1.1.3",
"gulp-tslint": "^8.1.4",
"husky": "^7.0.1",
"is-ci": "^3.0.0",
"jest": "^27.0.6",
@ -61,12 +64,8 @@
"terser-webpack-plugin": "^5.2.4",
"ts-jest": "^27.0.5",
"ts-node": "^10.2.1",
"tslint": "~6.1.0",
"tslint-config-prettier": "^1.18.0",
"tslint-ionic-rules": "0.0.21",
"typedoc": "^0.22.4",
"typescript": "4.1.6",
"typescript-tslint-plugin": "^1.0.1",
"typescript": "^4.1.6",
"unminified-webpack-plugin": "^3.0.0",
"webpack": "^5.51.1",
"winston": "^3.3.3",

View File

@ -11,7 +11,8 @@ export class AwesomeCordovaNativePlugin {
/**
* Returns a boolean that indicates whether the plugin is installed
* @return {boolean}
*
* @returns {boolean}
*/
static installed(): boolean {
const isAvailable = checkAvailability(this.pluginRef) === true;

View File

@ -1,3 +1,6 @@
/**
*
*/
export function checkReady() {
if (typeof process === 'undefined') {
const win: any = typeof window !== 'undefined' ? window : {};

View File

@ -7,6 +7,9 @@ declare const window: any;
export const ERR_CORDOVA_NOT_AVAILABLE = { error: 'cordova_not_available' };
export const ERR_PLUGIN_NOT_INSTALLED = { error: 'plugin_not_installed' };
/**
* @param callback
*/
export function getPromise<T>(callback: (resolve: Function, reject?: Function) => any): Promise<T> {
const tryNativePromise = () => {
if (Promise) {
@ -37,6 +40,12 @@ export function getPromise<T>(callback: (resolve: Function, reject?: Function) =
return tryNativePromise();
}
/**
* @param pluginObj
* @param methodName
* @param args
* @param opts
*/
export function wrapPromise(pluginObj: any, methodName: string, args: any[], opts: CordovaOptions = {}) {
let pluginResult: any, rej: Function;
const p = getPromise((resolve: Function, reject: Function) => {
@ -64,6 +73,12 @@ export function wrapPromise(pluginObj: any, methodName: string, args: any[], opt
return p;
}
/**
* @param pluginObj
* @param methodName
* @param args
* @param opts
*/
function wrapOtherPromise(pluginObj: any, methodName: string, args: any[], opts: any = {}) {
return getPromise((resolve: Function, reject: Function) => {
const pluginResult = callCordovaPlugin(pluginObj, methodName, args, opts);
@ -79,6 +94,12 @@ function wrapOtherPromise(pluginObj: any, methodName: string, args: any[], opts:
});
}
/**
* @param pluginObj
* @param methodName
* @param args
* @param opts
*/
function wrapObservable(pluginObj: any, methodName: string, args: any[], opts: any = {}) {
return new Observable((observer) => {
let pluginResult;
@ -136,6 +157,7 @@ function wrapObservable(pluginObj: any, methodName: string, args: any[], opts: a
/**
* Wrap the event with an observable
*
* @private
* @param event event name
* @param element The element to attach the event listener to
@ -151,7 +173,8 @@ function wrapEventObservable(event: string, element: any): Observable<any> {
/**
* Checks if plugin/cordova is available
* @return {boolean | { error: string } }
*
* @returns {boolean | { error: string } }
* @private
*/
export function checkAvailability(
@ -164,8 +187,13 @@ export function checkAvailability(
methodName?: string,
pluginName?: string
): boolean | { error: string };
/**
* @param plugin
* @param methodName
* @param pluginName
*/
export function checkAvailability(plugin: any, methodName?: string, pluginName?: string): boolean | { error: string } {
let pluginRef, pluginInstance, pluginPackage;
let pluginRef, pluginPackage;
if (typeof plugin === 'string') {
pluginRef = plugin;
@ -175,7 +203,7 @@ export function checkAvailability(plugin: any, methodName?: string, pluginName?:
pluginPackage = plugin.constructor.getPluginInstallName();
}
pluginInstance = getPlugin(pluginRef);
const pluginInstance = getPlugin(pluginRef);
if (!pluginInstance || (!!methodName && typeof pluginInstance[methodName] === 'undefined')) {
if (typeof window === 'undefined' || !window.cordova) {
@ -192,12 +220,21 @@ export function checkAvailability(plugin: any, methodName?: string, pluginName?:
/**
* Checks if _objectInstance exists and has the method/property
*
* @param pluginObj
* @param methodName
* @private
*/
export function instanceAvailability(pluginObj: any, methodName?: string): boolean {
return pluginObj._objectInstance && (!methodName || typeof pluginObj._objectInstance[methodName] !== 'undefined');
}
/**
* @param args
* @param opts
* @param resolve
* @param reject
*/
export function setIndex(args: any[], opts: any = {}, resolve?: Function, reject?: Function): any {
// ignore resolve and reject in case sync
if (opts.sync) {
@ -258,6 +295,14 @@ export function setIndex(args: any[], opts: any = {}, resolve?: Function, reject
return args;
}
/**
* @param pluginObj
* @param methodName
* @param args
* @param opts
* @param resolve
* @param reject
*/
export function callCordovaPlugin(
pluginObj: any,
methodName: string,
@ -274,12 +319,21 @@ export function callCordovaPlugin(
if (availabilityCheck === true) {
const pluginInstance = getPlugin(pluginObj.constructor.getPluginRef());
// eslint-disable-next-line prefer-spread
return pluginInstance[methodName].apply(pluginInstance, args);
} else {
return availabilityCheck;
}
}
/**
* @param pluginObj
* @param methodName
* @param args
* @param opts
* @param resolve
* @param reject
*/
export function callInstance(
pluginObj: any,
methodName: string,
@ -291,10 +345,14 @@ export function callInstance(
args = setIndex(args, opts, resolve, reject);
if (instanceAvailability(pluginObj, methodName)) {
// eslint-disable-next-line prefer-spread
return pluginObj._objectInstance[methodName].apply(pluginObj._objectInstance, args);
}
}
/**
* @param pluginRef
*/
export function getPlugin(pluginRef: string): any {
if (typeof window !== 'undefined') {
return get(window, pluginRef);
@ -302,6 +360,10 @@ export function getPlugin(pluginRef: string): any {
return null;
}
/**
* @param element
* @param path
*/
export function get(element: Element | Window, path: string) {
const paths: string[] = path.split('.');
let obj: any = element;
@ -314,6 +376,11 @@ export function get(element: Element | Window, path: string) {
return obj;
}
/**
* @param pluginName
* @param plugin
* @param method
*/
export function pluginWarn(pluginName: string, plugin?: string, method?: string): void {
if (method) {
console.warn(
@ -357,6 +424,9 @@ export function cordovaWarn(pluginName: string, method?: string): void {
export type WrapFn = (...args: any[]) => any;
/**
* @param pluginObj
* @param methodName
* @param opts
* @private
*/
export const wrap = (pluginObj: any, methodName: string, opts: CordovaOptions = {}): WrapFn => {
@ -377,6 +447,9 @@ export const wrap = (pluginObj: any, methodName: string, opts: CordovaOptions =
};
/**
* @param pluginObj
* @param methodName
* @param opts
* @private
*/
export function wrapInstance(pluginObj: any, methodName: string, opts: any = {}): Function {

View File

@ -2,6 +2,10 @@ import { Observable, Observer } from 'rxjs';
import { checkAvailability, getPlugin } from './common';
/**
* @param pluginObj
* @param methodName
*/
function overrideFunction(pluginObj: any, methodName: string): Observable<any> {
return new Observable((observer: Observer<any>) => {
const availabilityCheck = checkAvailability(pluginObj, methodName);
@ -17,6 +21,11 @@ function overrideFunction(pluginObj: any, methodName: string): Observable<any> {
});
}
/**
* @param pluginObj
* @param methodName
* @param args
*/
export function cordovaFunctionOverride(pluginObj: any, methodName: string, args: IArguments | any[] = []) {
return overrideFunction(pluginObj, methodName);
}

View File

@ -1,6 +1,12 @@
import { wrapInstance } from './common';
import { CordovaOptions } from './interfaces';
/**
* @param pluginObj
* @param methodName
* @param config
* @param args
*/
export function cordovaInstance(pluginObj: any, methodName: string, config: CordovaOptions, args: IArguments | any[]) {
args = Array.from(args);
return wrapInstance(pluginObj, methodName, config).apply(this, args);

View File

@ -1,5 +1,9 @@
import { checkAvailability, getPlugin } from './common';
/**
* @param pluginObj
* @param key
*/
export function cordovaPropertyGet(pluginObj: any, key: string) {
if (checkAvailability(pluginObj, key) === true) {
return getPlugin(pluginObj.constructor.getPluginRef())[key];
@ -7,6 +11,11 @@ export function cordovaPropertyGet(pluginObj: any, key: string) {
return null;
}
/**
* @param pluginObj
* @param key
* @param value
*/
export function cordovaPropertySet(pluginObj: any, key: string, value: any) {
if (checkAvailability(pluginObj, key) === true) {
getPlugin(pluginObj.constructor.getPluginRef())[key] = value;

View File

@ -1,6 +1,12 @@
import { wrap } from './common';
import { CordovaOptions } from './interfaces';
/**
* @param pluginObj
* @param methodName
* @param config
* @param args
*/
export function cordova(pluginObj: any, methodName: string, config: CordovaOptions, args: IArguments | any[]) {
return wrap(pluginObj, methodName, config).apply(this, args);
}

View File

@ -1,3 +1,7 @@
/**
* @param pluginObj
* @param key
*/
export function instancePropertyGet(pluginObj: any, key: string) {
if (pluginObj._objectInstance && pluginObj._objectInstance[key]) {
return pluginObj._objectInstance[key];
@ -5,6 +9,11 @@ export function instancePropertyGet(pluginObj: any, key: string) {
return null;
}
/**
* @param pluginObj
* @param key
* @param value
*/
export function instancePropertySet(pluginObj: any, key: string, value: any) {
if (pluginObj._objectInstance) {
pluginObj._objectInstance[key] = value;

View File

@ -4,6 +4,8 @@ declare const window: any;
* Initialize the ionic.native Angular module if we're running in ng1.
* This iterates through the list of registered plugins and dynamically
* creates Angular 1 services of the form $cordovaSERVICE, ex: $cordovaStatusBar.
*
* @param plugins
*/
export function initAngular1(plugins: any) {
if (typeof window !== 'undefined' && window.angular) {

View File

@ -1,6 +1,8 @@
declare const window: any;
/**
* @param element
* @param path
* @private
*/
export function get(element: Element | Window, path: string) {
@ -16,6 +18,7 @@ export function get(element: Element | Window, path: string) {
}
/**
* @param callback
* @private
*/
export function getPromise(callback: Function = () => {}): Promise<any> {

View File

@ -271,7 +271,6 @@ export interface DataCaptureResult {
* @description
* This plugin allows to use the Text Capture and Data Capture features of
* ABBYY Real-Time Recognition SDK (RTR SDK) in apps.
*
* @usage
* ```typescript
* import { AbbyyRTR } from '@awesome-cordova-plugins/abbyy-rtr/ngx';
@ -305,8 +304,9 @@ export interface DataCaptureResult {
export class AbbyyRTR extends AwesomeCordovaNativePlugin {
/**
* Opens a modal dialog with controls for the Text Capture scenario.
*
* @param {TextCaptureOptions} options
* @return {Promise<TextCaptureResult>}
* @returns {Promise<TextCaptureResult>}
*/
@CordovaCheck()
startTextCapture(options: TextCaptureOptions): Promise<TextCaptureResult> {
@ -323,8 +323,9 @@ export class AbbyyRTR extends AwesomeCordovaNativePlugin {
/**
* Opens a modal dialog with controls for the Data Capture scenario.
*
* @param {DataCaptureOptions} options
* @return {Promise<DataCaptureResult>}
* @returns {Promise<DataCaptureResult>}
*/
@CordovaCheck()
startDataCapture(options: DataCaptureOptions): Promise<DataCaptureResult> {

View File

@ -59,7 +59,6 @@ export interface ActionSheetOptions {
* The ActionSheet plugin shows a native list of options the user can choose from.
*
* Requires Cordova plugin: `cordova-plugin-actionsheet`. For more info, please see the [ActionSheet plugin docs](https://github.com/EddyVerbruggen/cordova-plugin-actionsheet).
*
* @usage
* ```typescript
* import { ActionSheet, ActionSheetOptions } from '@awesome-cordova-plugins/action-sheet/ngx';
@ -116,6 +115,7 @@ export class ActionSheet extends AwesomeCordovaNativePlugin {
/**
* Show a native ActionSheet component. See below for options.
*
* @param {ActionSheetOptions} [options] Options See table below
* @returns {Promise<any>} Returns a Promise that resolves with the index of the
* button pressed (1 based, so 1, 2, 3, etc.)
@ -127,6 +127,7 @@ export class ActionSheet extends AwesomeCordovaNativePlugin {
/**
* Programmatically hide the native ActionSheet
*
* @param {ActionSheetOptions} [options] Options See table below
* @returns {Promise<any>} Returns a Promise that resolves when the actionsheet is closed
*/

View File

@ -454,7 +454,6 @@ export enum AdjustAdRevenueSource {
* This is the Ionic Cordova SDK of Adjust. You can read more about Adjust at adjust.com.
*
* Requires Cordova plugin: `com.adjust.sdk`. For more info, please see the [Adjust Cordova SDK](https://github.com/adjust/cordova_sdk)
*
* @usage
* ```typescript
* import { Adjust, AdjustConfig, AdjustEnvironment } from '@awesome-cordova-plugins/adjust/ngx';
@ -499,6 +498,7 @@ export enum AdjustAdRevenueSource {
export class Adjust extends AwesomeCordovaNativePlugin {
/**
* This method initializes Adjust SDK
*
* @param {AdjustConig} config Adjust config object used as starting options
*/
@Cordova({ sync: true })
@ -506,6 +506,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
/**
* This method tracks an event
*
* @param {AdjustEvent} event Adjust event object to be tracked
*/
@Cordova({ sync: true })
@ -513,6 +514,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
/**
* This method tracks App Store subscription
*
* @param {AdjustAppStoreSubscription} subscription Adjust App Store subscription object to be tracked
*/
@Cordova({ sync: true })
@ -520,6 +522,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
/**
* This method tracks Play Store subscription
*
* @param {AdjustPlayStoreSubscription} subscription Adjust Play Store subscription object to be tracked
*/
@Cordova({ sync: true })
@ -527,6 +530,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
/**
* This method tracks third party sharing choice
*
* @param {AdjustThirdPartySharing} thirdPartySharing Adjust third party sharing object to be tracked
*/
@Cordova({ sync: true })
@ -534,6 +538,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
/**
* This method tracks ad revenue data
*
* @param {AdjustAdRevenueSource} source Ad revenue source
* @param {string} payload Ad revenue JSON string payload
*/
@ -541,6 +546,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
/**
* This method tracks ad revenue data
*
* @param {AdjustAdRevenue} adRevenue Adjust ad revenue object
*/
trackAdRevenue(adRevenue: AdjustAdRevenue): void;
@ -551,6 +557,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
/**
* This method tracks measurement consent choice
*
* @param {boolean} measurementConsent set measurement consent to true or false
*/
@Cordova({ sync: true })
@ -558,6 +565,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
/**
* This method sets offline mode on or off
*
* @param {boolean} enabled set to true for offline mode on
*/
@Cordova({ sync: true })
@ -565,6 +573,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
/**
* By making this call, the Adjust SDK will try to find if there is any new attribution info inside of the deep link and if any, it will be sent to the Adjust backend.
*
* @param {string} url URL of the deeplink
*/
@Cordova({ sync: true })
@ -572,6 +581,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
/**
* You can disable/enable the Adjust SDK from tracking by invoking this method
*
* @param {boolean} enabled set to false to disable SDK
*/
@Cordova({ sync: true })
@ -580,6 +590,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
/**
* To send us the push notification token, add the following call to Adjust whenever you get your token in the app or when it gets updated.
* Push tokens are used for Audience Builder and client callbacks, and they are required for the upcoming uninstall tracking feature.
*
* @param {string} pushToken push token value
*/
@Cordova({ sync: true })
@ -587,6 +598,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
/**
* Check if the Adjust SDK is currently enabled by calling this function
*
* @returns {Promise<boolean>}
*/
@Cordova()
@ -610,7 +622,8 @@ export class Adjust extends AwesomeCordovaNativePlugin {
/**
* Function used to get Google AdId
* @return {Promise<string>} Returns a promise with google AdId value
*
* @returns {Promise<string>} Returns a promise with google AdId value
*/
@Cordova()
getGoogleAdId(): Promise<string> {
@ -619,7 +632,8 @@ export class Adjust extends AwesomeCordovaNativePlugin {
/**
* If you need to obtain the Amazon Advertising ID, you can make a call to this function.
* @return {Promise<string>} Returns a promise with anazib adv. ID
*
* @returns {Promise<string>} Returns a promise with anazib adv. ID
*/
@Cordova()
getAmazonAdId(): Promise<string> {
@ -628,7 +642,8 @@ export class Adjust extends AwesomeCordovaNativePlugin {
/**
* To obtain the IDFA, call this function
* @return {Promise<string>} Returns a promise with IDFA string value
*
* @returns {Promise<string>} Returns a promise with IDFA string value
*/
@Cordova()
getIdfa(): Promise<string> {
@ -638,7 +653,8 @@ export class Adjust extends AwesomeCordovaNativePlugin {
/**
* For every device with your app installed on it, the Adjust backend generates a unique Adjust device identifier (adid).
* In order to obtain this identifier, call this function
* @return {Promise<string>} Returns a promise with adid value
*
* @returns {Promise<string>} Returns a promise with adid value
*/
@Cordova()
getAdid(): Promise<string> {
@ -647,7 +663,8 @@ export class Adjust extends AwesomeCordovaNativePlugin {
/**
* If you want to access information about a user's current attribution whenever you need it, you can make a call to this function
* @return {Promise<AdjustAttribution>} Returns a promise with AdjustAttribution object
*
* @returns {Promise<AdjustAttribution>} Returns a promise with AdjustAttribution object
*/
@Cordova()
getAttribution(): Promise<AdjustAttribution> {
@ -656,7 +673,8 @@ export class Adjust extends AwesomeCordovaNativePlugin {
/**
* Get the information about version of the SDK used
* @return {Promise<string>} Returns a promise with sdk version information
*
* @returns {Promise<string>} Returns a promise with sdk version information
*/
@Cordova()
getSdkVersion(): Promise<string> {
@ -665,6 +683,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
/**
* Method used to add session callback parameters
*
* @param key key
* @param value value
*/
@ -673,6 +692,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
/**
* Remove a specific session callback parameter by passing the desiring key to this method
*
* @param key key
*/
@Cordova({ sync: true })
@ -686,6 +706,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
/**
* Method used to add session partner parameters
*
* @param key key
* @param value value
*/
@ -694,6 +715,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
/**
* Remove a specific session partner parameter by passing the desiring key to this method
*
* @param key key
*/
@Cordova({ sync: true })
@ -714,7 +736,8 @@ export class Adjust extends AwesomeCordovaNativePlugin {
/**
* Request Adjust SDK to show pop up dialog for asking user's consent to be tracked.
* In order to do this, call this function
* @return {Promise<number>} Returns a promise with user's consent value
*
* @returns {Promise<number>} Returns a promise with user's consent value
*/
@Cordova()
requestTrackingAuthorizationWithCompletionHandler(): Promise<number> {
@ -723,6 +746,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
/**
* You can update SKAdNetwork conversion value with calling this method
*
* @param {number} conversionValue conversion value for the user
*/
@Cordova({ sync: true })
@ -730,7 +754,8 @@ export class Adjust extends AwesomeCordovaNativePlugin {
/**
* To obtain the app tracking authorization status in iOS, call this function
* @return {Promise<number>} Returns a promise with app tracking authorization status
*
* @returns {Promise<number>} Returns a promise with app tracking authorization status
*/
@Cordova()
getAppTrackingAuthorizationStatus(): Promise<number> {

View File

@ -129,7 +129,6 @@ export interface AdExtras {
* }
*
* ```
*
* @interfaces
* AdMobOptions
* AdExtras
@ -171,6 +170,7 @@ export class AdMobPro extends AwesomeCordovaNativePlugin {
/**
* Create a banner
*
* @param {string | AdMobOptions} adIdOrOptions Ad ID or Options
* @returns {Promise<any>} Returns a Promise that resolves when the banner is created
*/
@ -189,6 +189,7 @@ export class AdMobPro extends AwesomeCordovaNativePlugin {
/**
* Show banner at position
*
* @param {number} position Position. Use `AdMobPro.AD_POSITION` to set values.
*/
@Cordova({
@ -198,6 +199,7 @@ export class AdMobPro extends AwesomeCordovaNativePlugin {
/**
* Show banner at custom position
*
* @param {number} x Offset from screen left.
* @param {number} y Offset from screen top.
*/
@ -216,6 +218,7 @@ export class AdMobPro extends AwesomeCordovaNativePlugin {
/**
* Prepare interstitial banner
*
* @param {string | AdMobOptions} adIdOrOptions Ad ID or Options
* @returns {Promise<any>} Returns a Promise that resolves when interstitial is prepared
*/
@ -234,6 +237,7 @@ export class AdMobPro extends AwesomeCordovaNativePlugin {
/**
* Prepare a reward video ad
*
* @param {string | AdMobOptions} adIdOrOptions Ad ID or Options
* @returns {Promise<any>} Returns a Promise that resolves when the ad is prepared
*/
@ -252,6 +256,7 @@ export class AdMobPro extends AwesomeCordovaNativePlugin {
/**
* Sets the values for configuration and targeting
*
* @param {AdMobOptions} options Options
* @returns {Promise<any>} Returns a Promise that resolves when the options have been set
*/
@ -262,6 +267,7 @@ export class AdMobPro extends AwesomeCordovaNativePlugin {
/**
* Get user ad settings
*
* @returns {Promise<any>} Returns a promise that resolves with the ad settings
*/
@Cordova()
@ -271,6 +277,7 @@ export class AdMobPro extends AwesomeCordovaNativePlugin {
/**
* Triggered when failed to receive Ad
*
* @returns {Observable<any>}
*/
@Cordova({
@ -284,6 +291,7 @@ export class AdMobPro extends AwesomeCordovaNativePlugin {
/**
* Triggered when Ad received
*
* @returns {Observable<any>}
*/
@Cordova({
@ -297,6 +305,7 @@ export class AdMobPro extends AwesomeCordovaNativePlugin {
/**
* Triggered when Ad will be showed on screen
*
* @returns {Observable<any>}
*/
@Cordova({
@ -310,6 +319,7 @@ export class AdMobPro extends AwesomeCordovaNativePlugin {
/**
* Triggered when user click the Ad, and will jump out of your App
*
* @returns {Observable<any>}
*/
@Cordova({
@ -323,6 +333,7 @@ export class AdMobPro extends AwesomeCordovaNativePlugin {
/**
* Triggered when dismiss the Ad and back to your App
*
* @returns {Observable<any>}
*/
@Cordova({

View File

@ -135,14 +135,13 @@ export interface AdMobEvent {
* Most complete Admob plugin with support for [Tappx](http://www.tappx.com/?h=dec334d63287772de859bdb4e977fce6) ads.
* Monetize your apps and games with AdMob ads, using latest Google AdMob SDK. With this plugin you can show AdMob ads easily!
*
* **Supports:**
* Supports:**
* - Banner ads (top and bottom)
* - Interstitial ads
* - Rewarded ads
* - [Tappx](http://www.tappx.com/?h=dec334d63287772de859bdb4e977fce6) ads
*
* @usage
* **Note:** No ads will be served on apps with package name `io.ionic.starter`. This is the default package name for new `ionic` apps. Make sure to rename the package name so ads can be displayed.
* Note:** No ads will be served on apps with package name `io.ionic.starter`. This is the default package name for new `ionic` apps. Make sure to rename the package name so ads can be displayed.
* ```typescript
* import { Admob, AdmobOptions } from '@awesome-cordova-plugins/admob';
*
@ -295,6 +294,7 @@ export class Admob extends AwesomeCordovaNativePlugin {
/**
* This enum represents AdMob's supported ad sizes.
* Use one of these constants as adSize option when calling createBannerView
*
* @readonly
*/
@CordovaProperty()
@ -308,6 +308,7 @@ export class Admob extends AwesomeCordovaNativePlugin {
/**
* This enum represents AdMob's supported ad types
*
* @readonly
*/
@CordovaProperty()
@ -320,8 +321,9 @@ export class Admob extends AwesomeCordovaNativePlugin {
/**
* Set the options to start displaying ads.
* Although it is not required to call this method, as options can be specified in other methods, it is highly recommended
*
* @param options {AdmobOptions} Some param to configure something
* @return {Promise<any>} Returns a promise that resolves when the options are set
* @returns {Promise<any>} Returns a promise that resolves when the options are set
*/
@Cordova()
setOptions(options: AdmobOptions | AdmobWebOptions): Promise<any> {
@ -330,8 +332,9 @@ export class Admob extends AwesomeCordovaNativePlugin {
/**
* Creates a new banner ad view. Call this method in order to be able to start showing banners
*
* @param options {AdmobOptions} (Optional) Setup options
* @return {Promise<any>} Returns a promise that resolves when the banner view is created
* @returns {Promise<any>} Returns a promise that resolves when the banner view is created
*/
@Cordova()
createBannerView(options?: AdmobOptions | AdmobWebOptions): Promise<any> {
@ -340,8 +343,9 @@ export class Admob extends AwesomeCordovaNativePlugin {
/**
* Show banner ads. You must call createBannerView first, otherwise it will result in failure callback and no ads will be shown
*
* @param show {boolean} (Optional) Indicates whether to show or hide banner ads. Defaults to `true`
* @return {Promise<any>} Returns a promise that resolves when the banner shown or hidden
* @returns {Promise<any>} Returns a promise that resolves when the banner shown or hidden
*/
@Cordova()
showBannerAd(show?: boolean): Promise<any> {
@ -360,8 +364,9 @@ export class Admob extends AwesomeCordovaNativePlugin {
* If `options.autoShowInterstitial` is set to `true` (default), the ad will automatically be displayed.
* Otherwise you need to subscribe to `onAdLoaded()` event and call `showInterstitialAd()` after it will be raised specifying that an interstitial ad is available.
* If you already called `requestInterstitialAd()` but the interstitial has never been shown, the successive calls to `requestInterstitialAd()` will result in the ad being inmediately available (the one that was obtained on the first call)
*
* @param options {AdmobOptions} (Optional) Setup options
* @return {Promise<any>} Returns a promise that resolves when the interstitial ad is loaded
* @returns {Promise<any>} Returns a promise that resolves when the interstitial ad is loaded
*/
@Cordova()
requestInterstitialAd(options?: AdmobOptions | AdmobWebOptions): Promise<any> {
@ -370,7 +375,8 @@ export class Admob extends AwesomeCordovaNativePlugin {
/**
* Show an interstitial ad. Call it after `requestInterstitialAd()` and `onAdLoaded()` event raised.
* @return {Promise<any>} Returns a promise that resolves when the interstitial ad is shown
*
* @returns {Promise<any>} Returns a promise that resolves when the interstitial ad is shown
*/
@Cordova()
showInterstitialAd(): Promise<any> {
@ -382,8 +388,9 @@ export class Admob extends AwesomeCordovaNativePlugin {
* If `options.autoShowRewarded` is set to `true` (default), the ad will automatically be displayed.
* Otherwise you need to subscribe to `onAdLoaded()` enent and call `showRewardedAd()` after it will be raised specifying that a rewarded ad is available.
* If you already called `requestRewardedAd()` but the rewarded has never been shown, the successive calls to `requestRewardedAd()` will result in the ad being inmediately available (the one that was obtained on the first call)
*
* @param options {AdmobOptions} (Optional) Setup options
* @return {Promise<any>} Returns a promise that resolves when the rewarded ad is loaded
* @returns {Promise<any>} Returns a promise that resolves when the rewarded ad is loaded
*/
@Cordova()
requestRewardedAd(options?: AdmobOptions | AdmobWebOptions): Promise<any> {
@ -392,7 +399,8 @@ export class Admob extends AwesomeCordovaNativePlugin {
/**
* Show a rewarded ad
* @return {Promise<any>} Returns a promise that resolves when the rewarded ad is shown
*
* @returns {Promise<any>} Returns a promise that resolves when the rewarded ad is shown
*/
@Cordova()
showRewardedAd(): Promise<any> {
@ -402,13 +410,14 @@ export class Admob extends AwesomeCordovaNativePlugin {
/**
* Called when an ad is received.
*
* *WARNING*: only **ionic^4**. Older versions of ionic, use:
* WARNING*: only **ionic^4**. Older versions of ionic, use:
*
* ```js
* document.addEventListener(window.admob.events.onAdLoaded, () => { });
* ```
*
* Please refer to the documentation on https://admob-ionic.com/Events.
*
* @returns {Observable<AdMobEvent>} Returns an observable when an ad is received
*/
@Cordova({
@ -423,13 +432,14 @@ export class Admob extends AwesomeCordovaNativePlugin {
/**
* Called when an ad request failed.
*
* *WARNING*: only **ionic^4**. Older versions of ionic, use:
* WARNING*: only **ionic^4**. Older versions of ionic, use:
*
* ```js
* document.addEventListener(window.admob.events.onAdFailedToLoad, () => { });
* ```
*
* Please refer to the documentation on https://admob-ionic.com/Events.
*
* @returns {Observable<AdMobEvent>} Returns an observable when an ad request is failed
*/
@Cordova({
@ -445,13 +455,14 @@ export class Admob extends AwesomeCordovaNativePlugin {
* Called when an ad opens an overlay that covers the screen.
* Please note that onPause cordova event is raised when an interstitial is shown.
*
* *WARNING*: only **ionic^4**. Older versions of ionic, use:
* WARNING*: only **ionic^4**. Older versions of ionic, use:
*
* ```js
* document.addEventListener(window.admob.events.onAdOpened, () => { });
* ```
*
* Please refer to the documentation on https://admob-ionic.com/Events.
*
* @returns {Observable<AdMobEvent>} Returns an observable when an ad is opened
*/
@Cordova({
@ -467,13 +478,14 @@ export class Admob extends AwesomeCordovaNativePlugin {
* Called when the user is about to return to the application after clicking on an ad.
* Please note that onResume cordova event is raised when an interstitial is closed.
*
* *WARNING*: only **ionic^4**. Older versions of ionic, use:
* WARNING*: only **ionic^4**. Older versions of ionic, use:
*
* ```js
* document.addEventListener(window.admob.events.onAdClosed, () => { });
* ```
*
* Please refer to the documentation on https://admob-ionic.com/Events.
*
* @returns {Observable<AdMobEvent>} Returns an observable when an ad is closed
*/
@Cordova({
@ -487,9 +499,10 @@ export class Admob extends AwesomeCordovaNativePlugin {
/**
* Called when the user leaves the application after clicking an ad (e.g., to go to the browser)
*
* @returns {Observable<AdMobEvent>} Returns an observable when an ad leaves the application.
*
* *WARNING*: only **ionic^4**. Older versions of ionic, use:
* WARNING*: only **ionic^4**. Older versions of ionic, use:
*
* ```js
* document.addEventListener(window.admob.events.onAdLeftApplication, () => { });
@ -510,13 +523,14 @@ export class Admob extends AwesomeCordovaNativePlugin {
/**
* Called when the user has been rewarded by an ad.
*
* *WARNING*: only **ionic^4**. Older versions of ionic, use:
* WARNING*: only **ionic^4**. Older versions of ionic, use:
*
* ```js
* document.addEventListener(window.admob.events.onRewardedAd, () => { });
* ```
*
* Please refer to the documentation on https://admob-ionic.com/Events.
*
* @returns {Observable<AdMobEvent>} Returns an observable when the user rewards an ad
*/
@Cordova({
@ -531,13 +545,14 @@ export class Admob extends AwesomeCordovaNativePlugin {
/**
* Called when the video of a rewarded ad started.
*
* *WARNING*: only **ionic^4**. Older versions of ionic, use:
* WARNING*: only **ionic^4**. Older versions of ionic, use:
*
* ```js
* document.addEventListener(window.admob.events.onRewardedAdVideoStarted, () => { });
* ```
*
* Please refer to the documentation on https://admob-ionic.com/Events.
*
* @returns {Observable<AdMobEvent>} Returns an observable when the video is started
*/
@Cordova({
@ -552,13 +567,14 @@ export class Admob extends AwesomeCordovaNativePlugin {
/**
* Called when the video of a rewarded ad has completed.
*
* *WARNING*: only **ionic^4**. Older versions of ionic, use:
* WARNING*: only **ionic^4**. Older versions of ionic, use:
*
* ```js
* document.addEventListener(window.admob.events.onRewardedAdVideoCompleted, () => { });
* ```
*
* Please refer to the documentation on https://admob-ionic.com/Events.
*
* @returns {Observable<AdMobEvent>} Returns an observable when the video is completed
*/
@Cordova({

View File

@ -7,7 +7,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
* This cordova ionic plugin allows you to perform AES 256 encryption and decryption on the plain text.
* It's a cross-platform plugin which supports both Android and iOS.
* The encryption and decryption are performed on the device native layer so that the performance is much faster.
*
* @usage
* ```typescript
* import { AES256 } from '@awesome-cordova-plugins/aes-256/ngx';
@ -35,12 +34,12 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
* .catch((error: any) => console.error(error));
*
*
* * this.aes256.generateSecureKey('random password 12345')
* this.aes256.generateSecureKey('random password 12345')
* .then(res => console.log('Secure Key : ',res))
* .catch((error: any) => console.error(error));
*
*
* * this.aes256.generateSecureIV('random password 12345')
* this.aes256.generateSecureIV('random password 12345')
* .then(res => console.log('Secure IV : ',res))
* .catch((error: any) => console.error(error));
*
@ -58,10 +57,11 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
export class AES256 extends AwesomeCordovaNativePlugin {
/**
* This function used to perform the aes256 encryption
*
* @param {string} secureKey A 32 bytes string, which will used as input key for AES256 encryption.
* @param {string} secureIV A 16 bytes string, which will used as initial vector for AES256 encryption.
* @param {string} data A string which will be encrypted
* @return {Promise<string>} Returns a promise that resolves when encryption happens. The success response will returns encrypted data.
* @returns {Promise<string>} Returns a promise that resolves when encryption happens. The success response will returns encrypted data.
*/
@Cordova()
encrypt(secureKey: string, secureIV: string, data: string): Promise<string> {
@ -70,10 +70,11 @@ export class AES256 extends AwesomeCordovaNativePlugin {
/**
* This function used to perform the aes256 decryption
*
* @param {string} secureKey A 32 bytes string, which will used as input key for AES256 decryption.
* @param {string} secureIV A 16 bytes string, which will used as initial vector for AES256 decryption.
* @param {string} data An AES256 encrypted data which will be decrypted.
* @return {Promise<string>} Returns a promise that resolves when decryption happens. The success response will returns decrypted data.
* @returns {Promise<string>} Returns a promise that resolves when decryption happens. The success response will returns decrypted data.
*/
@Cordova()
decrypt(secureKey: string, secureIV: string, data: string): Promise<string> {
@ -83,8 +84,9 @@ export class AES256 extends AwesomeCordovaNativePlugin {
/**
* This function used to generate a secure key based on an password. Perfect if you want to delegate the key generation for encryption to the plugin.
* Make sure to save the return value of this function somewhere so your encrypted data can be decrypted in the future.
*
* @param {string} password A random string, which will be used as input for a PBKDF2 function
* @return {Promise<string>} Returns a promise that resolves when key is generated.
* @returns {Promise<string>} Returns a promise that resolves when key is generated.
*/
@Cordova()
generateSecureKey(password: string): Promise<string> {
@ -94,8 +96,9 @@ export class AES256 extends AwesomeCordovaNativePlugin {
/**
* This function used to generate a secure IV based on an password. Perfect if you want to delegate the IV generation for encryption to the plugin.
* Make sure to save the return value of this function somewhere so your encrypted data can be decrypted in the future.
*
* @param {string} password A random string, which will be used as input for a PBKDF2 function
* @return {Promise<string>} Returns a promise that resolves when IV is generated.
* @returns {Promise<string>} Returns a promise that resolves when IV is generated.
*/
@Cordova()
generateSecureIV(password: string): Promise<string> {

View File

@ -16,7 +16,6 @@ import { Observable } from 'rxjs';
* Paytm All-in-One SDK provides a swift, secure and seamless payment experience to your users by invoking the Paytm app (if installed on your users smartphone) to complete payment for your order.
* Paytm All-in-One SDK enables payment acceptance via Paytm wallet, Paytm Payments Bank, saved Debit/Credit cards, Net Banking, BHIM UPI and EMI as available in your customers Paytm account. If Paytm app is not installed on a customer's device, the transaction will be processed via web view within the All-in-One SDK.
* For more information about Paytm All-in-One SDK, please visit https://developer.paytm.com/docs/all-in-one-sdk/hybrid-apps/cordova/
*
* @usage
* ```typescript
* import { AllInOneSDK } from '@awesome-cordova-plugins/all-in-one-sdk/ngx';
@ -39,7 +38,6 @@ import { Observable } from 'rxjs';
* After adding the plugin, open the iOS project, you can find the same at <projectName>/platforms/ios.
* In case merchant dont have callback URL, Add an entry into Info.plist LSApplicationQueriesSchemes(Array) Item 0 (String)-> paytm
* Add a URL Scheme paytm+MID
*
*/
@Plugin({
pluginName: 'AllInOneSDK',
@ -53,8 +51,9 @@ export class AllInOneSDK extends AwesomeCordovaNativePlugin {
* This function checks if Paytm Application is available on the device.
* If Paytm exists then it invokes Paytm Application with the parameters sent and creates an order.
* If the Paytm Application is not available the transaction is continued on a webView within All-in-One SDK.
*
* @param options {PaymentIntentModel} These parameters are required and will be used to create an order.
* @return {Promise<PaytmResponse>} Returns a promise that resolves when a transaction completes(both failed and successful).
* @returns {Promise<PaytmResponse>} Returns a promise that resolves when a transaction completes(both failed and successful).
*/
@Cordova()
startTransaction(options: PaymentIntentModel | PaymentAssistIntentModel): Promise<PaytmResponse> {

View File

@ -5,7 +5,6 @@ import { Cordova, CordovaProperty, AwesomeCordovaNativePlugin, Plugin } from '@a
* @name Analytics Firebase
* @description
* Google Analytics Firebase plugin for Ionic Native apps.
*
* @usage
* ```typescript
* import { AnalyticsFirebase } from '@awesome-cordova-plugins/analytics-firebase';
@ -65,6 +64,7 @@ export class AnalyticsFirebase extends AwesomeCordovaNativePlugin {
/**
* This enum represents AnalyticsFirebase default events.
* Use one of these default events or a custom event
*
* @readonly
*/
@CordovaProperty()
@ -105,6 +105,7 @@ export class AnalyticsFirebase extends AwesomeCordovaNativePlugin {
/**
* This enum represents AnalyticsFirebase default params.
* Use one of these default params or a custom param
*
* @readonly
*/
@CordovaProperty()
@ -168,7 +169,7 @@ export class AnalyticsFirebase extends AwesomeCordovaNativePlugin {
*
* @param eventName {string} The event name
* @param eventParams {object} (Optional) The event params
* @return {Promise<any>} Returns a promise that resolves when the event is logged
* @returns {Promise<any>} Returns a promise that resolves when the event is logged
*/
@Cordova()
logEvent(eventName: string, eventParams?: object): Promise<any> {
@ -177,7 +178,8 @@ export class AnalyticsFirebase extends AwesomeCordovaNativePlugin {
/**
* Clears all analytics data for this app from the device and resets the app instance id
* @return {Promise<any>} Returns a promise that resolves when the analytics data is cleared
*
* @returns {Promise<any>} Returns a promise that resolves when the analytics data is cleared
*/
@Cordova()
resetAnalyticsData(): Promise<any> {
@ -186,8 +188,10 @@ export class AnalyticsFirebase extends AwesomeCordovaNativePlugin {
/**
* Sets whether analytics collection is enabled for this app on this device. This setting is persisted across app sessions. By default it is enabled
*
* @param screenName {boolean} The value of the collection
* @return {Promise<any>} Returns a promise that resolves when the collection is enabled/disabled
* @param enabled
* @returns {Promise<any>} Returns a promise that resolves when the collection is enabled/disabled
*/
@Cordova()
setAnalyticsCollectionEnabled(enabled: boolean): Promise<any> {
@ -197,8 +201,9 @@ export class AnalyticsFirebase extends AwesomeCordovaNativePlugin {
/**
* Sets the current screen name, which specifies the current visual context in your app.
* This helps identify the areas in your app where users spend their time and how they interact with your app
*
* @param screenName {string} The screen name
* @return {Promise<any>} Returns a promise that resolves when the current screen is setted
* @returns {Promise<any>} Returns a promise that resolves when the current screen is setted
*/
@Cordova()
setCurrentScreen(screenName: string): Promise<any> {
@ -207,8 +212,10 @@ export class AnalyticsFirebase extends AwesomeCordovaNativePlugin {
/**
* Sets the minimum engagement time required before starting a session. The default value is 10000 (10 seconds)
*
* @param screenName {number} The duration in milliseconds
* @return {Promise<any>} Returns a promise that resolves when the minimum session duration is set
* @param milliseconds
* @returns {Promise<any>} Returns a promise that resolves when the minimum session duration is set
*/
@Cordova()
setMinimumSessionDuration(milliseconds: number): Promise<any> {
@ -217,8 +224,10 @@ export class AnalyticsFirebase extends AwesomeCordovaNativePlugin {
/**
* Sets the duration of inactivity that terminates the current session. The default value is 1800000 (30 minutes)
*
* @param screenName {number} The duration in milliseconds
* @return {Promise<any>} Returns a promise that resolves when the session timeout duration is set
* @param milliseconds
* @returns {Promise<any>} Returns a promise that resolves when the session timeout duration is set
*/
@Cordova()
setSessionTimeoutDuration(milliseconds: number): Promise<any> {
@ -227,8 +236,9 @@ export class AnalyticsFirebase extends AwesomeCordovaNativePlugin {
/**
* Sets the user ID property. This feature must be used in accordance with Google's Privacy Policy
*
* @param userId {string} The user id
* @return {Promise<any>} Returns a promise that resolves when the user id is setted
* @returns {Promise<any>} Returns a promise that resolves when the user id is setted
*/
@Cordova()
setUserId(userId: string): Promise<any> {
@ -237,9 +247,10 @@ export class AnalyticsFirebase extends AwesomeCordovaNativePlugin {
/**
* Sets a user property to a given value. Up to 25 user property names are supported. Once set, user property values persist throughout the app lifecycle and across sessions
*
* @param userPropertyName {string} The user property name
* @param userPropertyValue {string} The user property value
* @return {Promise<any>} Returns a promise that resolves when the user property setted
* @returns {Promise<any>} Returns a promise that resolves when the user property setted
*/
@Cordova()
setUserProperty(userPropertyName: string, userPropertyValue: string): Promise<any> {

View File

@ -155,7 +155,6 @@ export interface AndroidExoPlayerControllerConfig {
* Cordova media player plugin using Google's ExoPlayer framework.
*
* https://github.com/google/ExoPlayer
*
* @usage
* ```typescript
* import { AndroidExoPlayer } from '@awesome-cordova-plugins/android-exoplayer/ngx';
@ -167,7 +166,6 @@ export interface AndroidExoPlayerControllerConfig {
* this.androidExoPlayer.show({url: 'http://www.youtube.com/api/manifest/dash/id/bf5bb2419360daf1/source/youtube'});
*
* ```
*
* @interfaces
* AndroidExoPlayerParams
* AndroidExoplayerState
@ -184,8 +182,9 @@ export interface AndroidExoPlayerControllerConfig {
export class AndroidExoplayer extends AwesomeCordovaNativePlugin {
/**
* Show the player.
*
* @param {AndroidExoPlayerParams} parameters Parameters
* @return {Observable<AndroidExoplayerState>}
* @returns {Observable<AndroidExoplayerState>}
*/
@Cordova({
observable: true,
@ -200,9 +199,10 @@ export class AndroidExoplayer extends AwesomeCordovaNativePlugin {
/**
* Switch stream without disposing of the player.
*
* @param {string} url The url of the new stream.
* @param {AndroidExoPlayerControllerConfig} controller Configuration of the controller.
* @return {Promise<void>}
* @returns {Promise<void>}
*/
@Cordova()
setStream(url: string, controller: AndroidExoPlayerControllerConfig): Promise<void> {
@ -211,7 +211,8 @@ export class AndroidExoplayer extends AwesomeCordovaNativePlugin {
/**
* Will pause if playing and play if paused
* @return {Promise<void>}
*
* @returns {Promise<void>}
*/
@Cordova()
playPause(): Promise<void> {
@ -220,7 +221,8 @@ export class AndroidExoplayer extends AwesomeCordovaNativePlugin {
/**
* Stop playing.
* @return {Promise<void>}
*
* @returns {Promise<void>}
*/
@Cordova()
stop(): Promise<void> {
@ -229,8 +231,9 @@ export class AndroidExoplayer extends AwesomeCordovaNativePlugin {
/**
* Jump to a particular position.
*
* @param {number} milliseconds Position in stream in milliseconds
* @return {Promise<void>}
* @returns {Promise<void>}
*/
@Cordova()
seekTo(milliseconds: number): Promise<void> {
@ -239,8 +242,9 @@ export class AndroidExoplayer extends AwesomeCordovaNativePlugin {
/**
* Jump to a particular time relative to the current position.
*
* @param {number} milliseconds Time in milliseconds
* @return {Promise<void>}
* @returns {Promise<void>}
*/
@Cordova()
seekBy(milliseconds: number): Promise<void> {
@ -249,7 +253,8 @@ export class AndroidExoplayer extends AwesomeCordovaNativePlugin {
/**
* Get the current player state.
* @return {Promise<AndroidExoplayerState>}
*
* @returns {Promise<AndroidExoplayerState>}
*/
@Cordova()
getState(): Promise<AndroidExoplayerState> {
@ -258,7 +263,8 @@ export class AndroidExoplayer extends AwesomeCordovaNativePlugin {
/**
* Show the controller.
* @return {Promise<void>}
*
* @returns {Promise<void>}
*/
@Cordova()
showController(): Promise<void> {
@ -267,7 +273,8 @@ export class AndroidExoplayer extends AwesomeCordovaNativePlugin {
/**
* Hide the controller.
* @return {Promise<void>}
*
* @returns {Promise<void>}
*/
@Cordova()
hideController(): Promise<void> {
@ -276,8 +283,9 @@ export class AndroidExoplayer extends AwesomeCordovaNativePlugin {
/**
* Update the controller configuration.
*
* @param {AndroidExoPlayerControllerConfig} controller Configuration of the controller.
* @return {Promise<void>}
* @returns {Promise<void>}
*/
@Cordova()
setController(controller: AndroidExoPlayerControllerConfig): Promise<void> {
@ -286,7 +294,8 @@ export class AndroidExoplayer extends AwesomeCordovaNativePlugin {
/**
* Close and dispose of player, call before destroy.
* @return {Promise<void>}
*
* @returns {Promise<void>}
*/
@Cordova()
close(): Promise<void> {

View File

@ -3,6 +3,7 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
/**
* Bit flag values for setSystemUiVisibility()
*
* @see https://developer.android.com/reference/android/view/View.html#setSystemUiVisibility(int)
*/
export enum AndroidSystemUiFlags {
@ -59,7 +60,8 @@ export enum AndroidSystemUiFlags {
export class AndroidFullScreen extends AwesomeCordovaNativePlugin {
/**
* Is this plugin supported?
* @return {Promise<void>}
*
* @returns {Promise<void>}
*/
@Cordova()
isSupported(): Promise<void> {
@ -68,7 +70,8 @@ export class AndroidFullScreen extends AwesomeCordovaNativePlugin {
/**
* Is immersive mode supported?
* @return {Promise<void>}
*
* @returns {Promise<void>}
*/
@Cordova()
isImmersiveModeSupported(): Promise<boolean> {
@ -77,7 +80,8 @@ export class AndroidFullScreen extends AwesomeCordovaNativePlugin {
/**
* The width of the screen in immersive mode.
* @return {Promise<number>}
*
* @returns {Promise<number>}
*/
@Cordova()
immersiveWidth(): Promise<number> {
@ -86,7 +90,8 @@ export class AndroidFullScreen extends AwesomeCordovaNativePlugin {
/**
* The height of the screen in immersive mode.
* @return {Promise<number>}
*
* @returns {Promise<number>}
*/
@Cordova()
immersiveHeight(): Promise<number> {
@ -95,7 +100,8 @@ export class AndroidFullScreen extends AwesomeCordovaNativePlugin {
/**
* Hide system UI until user interacts.
* @return {Promise<void>}
*
* @returns {Promise<void>}
*/
@Cordova()
leanMode(): Promise<void> {
@ -104,7 +110,8 @@ export class AndroidFullScreen extends AwesomeCordovaNativePlugin {
/**
* Show system UI.
* @return {Promise<void>}
*
* @returns {Promise<void>}
*/
@Cordova()
showSystemUI(): Promise<void> {
@ -113,7 +120,8 @@ export class AndroidFullScreen extends AwesomeCordovaNativePlugin {
/**
* Extend your app underneath the status bar (Android 4.4+ only).
* @return {Promise<void>}
*
* @returns {Promise<void>}
*/
@Cordova()
showUnderStatusBar(): Promise<void> {
@ -122,7 +130,8 @@ export class AndroidFullScreen extends AwesomeCordovaNativePlugin {
/**
* Extend your app underneath the system UI (Android 4.4+ only).
* @return {Promise<void>}
*
* @returns {Promise<void>}
*/
@Cordova()
showUnderSystemUI(): Promise<void> {
@ -131,7 +140,8 @@ export class AndroidFullScreen extends AwesomeCordovaNativePlugin {
/**
* Hide system UI and keep it hidden (Android 4.4+ only).
* @return {Promise<void>}
*
* @returns {Promise<void>}
*/
@Cordova()
immersiveMode(): Promise<void> {
@ -140,9 +150,10 @@ export class AndroidFullScreen extends AwesomeCordovaNativePlugin {
/**
* Manually set the the system UI to a custom mode. This mirrors the Android method of the same name. (Android 4.4+ only).
*
* @see https://developer.android.com/reference/android/view/View.html#setSystemUiVisibility(int)
* @param {AndroidSystemUiFlags} visibility Bitwise-OR of flags in AndroidSystemUiFlags
* @return {Promise<void>}
* @returns {Promise<void>}
*/
@Cordova()
setSystemUiVisibility(visibility: AndroidSystemUiFlags): Promise<void> {

View File

@ -7,7 +7,6 @@ import { Plugin, Cordova, AwesomeCordovaNativePlugin } from '@awesome-cordova-pl
* This plugin enables developers to get the cutout and android devices inset sizes
* It is based on the cordova plugin developed by @tobspr: https://github.com/tobspr/cordova-plugin-android-notch
* This plugin works on all android versions, but we can only detect notches starting from Android 9.
*
* @usage
* ```typescript
* import { AndroidNotch } from '@awesome-cordova-plugins/android-notch/ngx';
@ -52,7 +51,7 @@ export class AndroidNotch extends AwesomeCordovaNativePlugin {
/**
* Returns true if the android device has cutout
*
* @return {Promise<boolean>}
* @returns {Promise<boolean>}
*/
@Cordova()
hasCutout(): Promise<boolean> {
@ -62,7 +61,7 @@ export class AndroidNotch extends AwesomeCordovaNativePlugin {
/**
* Returns the heigth of the top inset
*
* @return {Promise<number>}
* @returns {Promise<number>}
*/
@Cordova()
getInsetTop(): Promise<number> {
@ -72,7 +71,7 @@ export class AndroidNotch extends AwesomeCordovaNativePlugin {
/**
* Returns the heigth of the right inset
*
* @return {Promise<number>}
* @returns {Promise<number>}
*/
@Cordova()
getInsetRight(): Promise<number> {
@ -81,7 +80,8 @@ export class AndroidNotch extends AwesomeCordovaNativePlugin {
/**
* Returns the heigth of the bottom inset
* @return {Promise<number>}
*
* @returns {Promise<number>}
*/
@Cordova()
getInsetBottom(): Promise<number> {
@ -90,7 +90,8 @@ export class AndroidNotch extends AwesomeCordovaNativePlugin {
/**
* Returns the heigth of the left inset
* @return {Promise<number>}
*
* @returns {Promise<number>}
*/
@Cordova()
getInsetLeft(): Promise<number> {

View File

@ -8,7 +8,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
* This plugin is designed to support Android new permissions checking mechanism.
*
* You can find all permissions here: https://developer.android.com/reference/android/Manifest.permission.html
*
* @usage
* ```
* import { AndroidPermissions } from '@awesome-cordova-plugins/android-permissions/ngx';
@ -195,8 +194,9 @@ export class AndroidPermissions extends AwesomeCordovaNativePlugin {
/**
* Check permission
*
* @param {string} permission The name of the permission
* @return {Promise<AndroidPermissionResponse>} Returns a promise
* @returns {Promise<AndroidPermissionResponse>} Returns a promise
*/
@Cordova()
checkPermission(permission: string): Promise<AndroidPermissionResponse> {
@ -205,8 +205,9 @@ export class AndroidPermissions extends AwesomeCordovaNativePlugin {
/**
* Request permission
*
* @param {string} permission The name of the permission to request
* @return {Promise<AndroidPermissionResponse>}
* @returns {Promise<AndroidPermissionResponse>}
*/
@Cordova()
requestPermission(permission: string): Promise<AndroidPermissionResponse> {
@ -215,8 +216,9 @@ export class AndroidPermissions extends AwesomeCordovaNativePlugin {
/**
* Request permissions
*
* @param {string[]} permissions An array with permissions
* @return {Promise<any>} Returns a promise
* @returns {Promise<any>} Returns a promise
*/
@Cordova()
requestPermissions(permissions: string[]): Promise<any> {
@ -225,8 +227,9 @@ export class AndroidPermissions extends AwesomeCordovaNativePlugin {
/**
* This function still works now, will not support in the future.
*
* @param {string} permission The name of the permission
* @return {Promise<AndroidPermissionResponse>} Returns a promise
* @returns {Promise<AndroidPermissionResponse>} Returns a promise
*/
@Cordova()
hasPermission(permission: string): Promise<AndroidPermissionResponse> {

View File

@ -13,7 +13,6 @@ export interface AnylineOptions {
* @name Anyline
* @description
* Anyline provides an easy-to-use SDK for applications to enable Optical Character Recognition (OCR) on mobile devices.
*
* @usage
* ```typescript
* import { Anyline } from '@awesome-cordova-plugins/anyline/ngx';
@ -41,8 +40,9 @@ export interface AnylineOptions {
export class Anyline extends AwesomeCordovaNativePlugin {
/**
* Scan
*
* @param options {AnylineOptions} Scanning options
* @return {Promise<any>} Returns a promise that resolves when Code is captured
* @returns {Promise<any>} Returns a promise that resolves when Code is captured
*/
@Cordova()
scan(options: AnylineOptions): Promise<any> {

View File

@ -7,7 +7,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
* This plugin allows you to check if an app is installed on the user's device. It requires an URI Scheme (e.g. twitter://) on iOS or a Package Name (e.g com.twitter.android) on Android.
*
* Requires Cordova plugin: cordova-plugin-appavailability. For more info, please see the [AppAvailability plugin docs](https://github.com/ohh2ahh/AppAvailability).
*
* @usage
* ```typescript
* import { AppAvailability } from '@awesome-cordova-plugins/app-availability/ngx';
@ -43,6 +42,7 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
export class AppAvailability extends AwesomeCordovaNativePlugin {
/**
* Checks if an app is available on device
*
* @param {string} app Package name on android, or URI scheme on iOS
* @returns {Promise<boolean>}
*/

View File

@ -14,7 +14,6 @@ export interface StringMap {
* All the information captured is available in the App Center portal for you to analyze the data.
*
* For more info, please see https://docs.microsoft.com/en-us/appcenter/sdk/analytics/cordova
*
* @usage
* ```typescript
* import { AppCenterAnalytics } from '@awesome-cordova-plugins/app-center-analytics/ngx';
@ -47,6 +46,7 @@ export class AppCenterAnalytics extends AwesomeCordovaNativePlugin {
* Tracks an custom event.
* You can send up to 200 distinct event names. Also, there is a maximum limit of 256 characters per event name
* and 64 characters per event property name and event property value.
*
* @param {string} eventName Event name
* @param {StringMap} properties Event properties
* @returns {Promise<void>}
@ -58,6 +58,7 @@ export class AppCenterAnalytics extends AwesomeCordovaNativePlugin {
/**
* Check if App Center Analytics is enabled
*
* @returns {Promise<boolean>}
*/
@Cordova()
@ -67,6 +68,7 @@ export class AppCenterAnalytics extends AwesomeCordovaNativePlugin {
/**
* Enable or disable App Center Analytics at runtime
*
* @param {boolean} shouldEnable Set value
* @returns {Promise<void>}
*/

View File

@ -37,7 +37,6 @@ export interface AppCenterCrashReportDevice {
* All the information captured is available in the App Center portal for you to analyze the data.
*
* For more info, please see https://docs.microsoft.com/en-us/appcenter/sdk/crashes/cordova
*
* @usage
* ```typescript
* import { AppCenterCrashes } from '@awesome-cordova-plugins/app-center-crashes/ngx';
@ -70,6 +69,7 @@ export class AppCenterCrashes extends AwesomeCordovaNativePlugin {
/**
* App Center Crashes provides you with an API to generate a test crash for easy testing of the SDK.
* This API can only be used in test/beta apps and won't do anything in production apps.
*
* @returns void
*/
@Cordova()
@ -77,6 +77,7 @@ export class AppCenterCrashes extends AwesomeCordovaNativePlugin {
/**
* At any time after starting the SDK, you can check if the app crashed in the previous launch
*
* @returns {Promise<boolean>}
*/
@Cordova()
@ -86,6 +87,7 @@ export class AppCenterCrashes extends AwesomeCordovaNativePlugin {
/**
* Details about the last crash
*
* @returns {Promise<AppCenterCrashReport>}
*/
@Cordova()
@ -95,6 +97,7 @@ export class AppCenterCrashes extends AwesomeCordovaNativePlugin {
/**
* Check if App Center Crashes is enabled
*
* @returns {Promise<boolean>}
*/
@Cordova()
@ -104,6 +107,7 @@ export class AppCenterCrashes extends AwesomeCordovaNativePlugin {
/**
* Enable or disable App Center Crashes at runtime
*
* @param {boolean} shouldEnable Set value
* @returns {Promise<void>}
*/

View File

@ -6,7 +6,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
* @description
* Generates a low memory warning.
* For more info, please see: https://github.com/Microsoft/appcenter-sdk-cordova/tree/master/cordova-plugin-appcenter-generate-low-memory
*
* @usage
* ```typescript
* import { LowMemory } from '@awesome-cordova-plugins/app-center-low-memory/ngx';
@ -32,6 +31,7 @@ export class LowMemory extends AwesomeCordovaNativePlugin {
/**
* Generates a low memory warning.
* For more info, please see: https://github.com/Microsoft/appcenter-sdk-cordova/tree/master/cordova-plugin-appcenter-generate-low-memory
*
* @returns {Promise<void>}
*/
@Cordova()

View File

@ -7,7 +7,6 @@ import { Observable } from 'rxjs';
* @description
*
* For more info, please see https://docs.microsoft.com/en-us/appcenter/sdk/push/cordova
*
* @usage
* ```typescript
* import { AppCenterPush } from '@awesome-cordova-plugins/app-center-push/ngx';
@ -36,6 +35,7 @@ import { Observable } from 'rxjs';
export class AppCenterPush extends AwesomeCordovaNativePlugin {
/**
* Subscribe to an event
*
* @param {string} eventName Event name
* @returns {Observable<any>}
*/
@ -48,6 +48,7 @@ export class AppCenterPush extends AwesomeCordovaNativePlugin {
}
/**
* Check if App Center Push is enabled
*
* @returns {Promise<boolean>}
*/
@Cordova()
@ -57,6 +58,7 @@ export class AppCenterPush extends AwesomeCordovaNativePlugin {
/**
* Enable or disable App Center Push at runtime
*
* @param {boolean} shouldEnable Set value
* @returns {Promise<void>}
*/

View File

@ -8,7 +8,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
* Exposes additional shared APIs for App Center.
*
* For more info, please see https://docs.microsoft.com/en-us/appcenter/sdk/other-apis/cordova
*
* @usage
* ```typescript
* import { AppCenter } from '@awesome-cordova-plugins/app-center-shared/ngx';
@ -42,6 +41,7 @@ export class AppCenter extends AwesomeCordovaNativePlugin {
/**
* Returns AppCenter UUID.
* For more info, please see: https://docs.microsoft.com/en-us/appcenter/sdk/other-apis/cordova#identify-installations
*
* @returns {Promise<string>} Install ID
*/
@Cordova()
@ -52,6 +52,7 @@ export class AppCenter extends AwesomeCordovaNativePlugin {
/**
* Set a user ID that's used to augment crash reports.
* For more info, please see: https://docs.microsoft.com/en-us/appcenter/sdk/other-apis/cordova#identify-users
*
* @param {string} userId Ex. "your-user-id"
* @returns {Promise<void>}
*/

View File

@ -6,7 +6,6 @@ import { Injectable } from '@angular/core';
* @name App Preferences
* @description
* This plugin allows you to read and write app preferences
*
* @usage
* ```typescript
* import { AppPreferences } from '@awesome-cordova-plugins/app-preferences/ngx';
@ -18,7 +17,6 @@ import { Injectable } from '@angular/core';
* this.appPreferences.fetch('key').then((res) => { console.log(res); });
*
* ```
*
*/
@Plugin({
pluginName: 'AppPreferences',
@ -34,7 +32,7 @@ export class AppPreferences extends AwesomeCordovaNativePlugin {
*
* @param {string} dict Dictionary for key (OPTIONAL)
* @param {string} key Key
* @return {Promise<any>} Returns a promise
* @returns {Promise<any>} Returns a promise
*/
@Cordova({
callbackOrder: 'reverse',
@ -49,7 +47,7 @@ export class AppPreferences extends AwesomeCordovaNativePlugin {
* @param {string} dict Dictionary for key (OPTIONAL)
* @param {string} key Key
* @param {any} value Value
* @return {Promise<any>} Returns a promise
* @returns {Promise<any>} Returns a promise
*/
@Cordova({
callbackOrder: 'reverse',
@ -63,7 +61,7 @@ export class AppPreferences extends AwesomeCordovaNativePlugin {
*
* @param {string} dict Dictionary for key (OPTIONAL)
* @param {string} key Key
* @return {Promise<any>} Returns a promise
* @returns {Promise<any>} Returns a promise
*/
@Cordova({
callbackOrder: 'reverse',
@ -75,7 +73,7 @@ export class AppPreferences extends AwesomeCordovaNativePlugin {
/**
* Clear preferences
*
* @return {Promise<any>} Returns a promise
* @returns {Promise<any>} Returns a promise
*/
@Cordova({
callbackOrder: 'reverse',
@ -87,7 +85,7 @@ export class AppPreferences extends AwesomeCordovaNativePlugin {
/**
* Show native preferences interface
*
* @return {Promise<any>} Returns a promise
* @returns {Promise<any>} Returns a promise
*/
@Cordova({
callbackOrder: 'reverse',
@ -100,7 +98,7 @@ export class AppPreferences extends AwesomeCordovaNativePlugin {
* Show native preferences interface
*
* @param {boolean} subscribe true value to subscribe, false - unsubscribe
* @return {Observable<any>} Returns an observable
* @returns {Observable<any>} Returns an observable
*/
@Cordova({
observable: true,
@ -113,6 +111,7 @@ export class AppPreferences extends AwesomeCordovaNativePlugin {
* Return named configuration context
* In iOS you'll get a suite configuration, on Android named file
* Supports: Android, iOS
*
* @param {string} suiteName suite name
* @returns {Object} Custom object, bound to that suite
*/
@ -135,6 +134,7 @@ export class AppPreferences extends AwesomeCordovaNativePlugin {
/**
* Return cloud synchronized configuration context
* Currently supports Windows and iOS/macOS
*
* @returns {Object} Custom object, bound to that suite
*/
@Cordova({
@ -147,6 +147,7 @@ export class AppPreferences extends AwesomeCordovaNativePlugin {
/**
* Return default configuration context
* Currently supports Windows and iOS/macOS
*
* @returns {Object} Custom Object, bound to that suite
*/
@Cordova({

View File

@ -205,7 +205,6 @@ export interface AppUrls {
* The AppRate plugin makes it easy to prompt the user to rate your app, either now, later, or never.
*
* Requires Cordova plugin: cordova-plugin-apprate. For more info, please see the [AppRate plugin docs](https://github.com/pushandplay/cordova-plugin-apprate).
*
* @usage
* ```typescript
* import { AppRate } from '@awesome-cordova-plugins/app-rate/ngx';
@ -236,13 +235,11 @@ export interface AppUrls {
*
* this.appRate.promptForRating(false);
* ```
*
* @interfaces
* AppRatePreferences
* AppUrls
* AppRateCallbacks
* AppRateCustomLocal
*
*/
@Plugin({
pluginName: 'AppRate',
@ -261,7 +258,9 @@ export class AppRate extends AwesomeCordovaNativePlugin {
/**
* Set preferences
* @return void
*
* @param pref
* @returns void
*/
@Cordova()
setPreferences(pref: AppRatePreferences): void {
@ -270,7 +269,8 @@ export class AppRate extends AwesomeCordovaNativePlugin {
/**
* Get preferences
* @return AppRatePreferences
*
* @returns AppRatePreferences
*/
@Cordova()
getPreferences(): AppRatePreferences {
@ -279,6 +279,7 @@ export class AppRate extends AwesomeCordovaNativePlugin {
/**
* Prompts the user for rating
*
* @param {boolean} immediately Show the rating prompt immediately.
*/
@Cordova()

View File

@ -8,7 +8,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
* Reads the version of your app from the target build settings.
*
* Requires Cordova plugin: `cordova-plugin-app-version`. For more info, please see the [Cordova App Version docs](https://github.com/whiteoctober/cordova-plugin-app-version).
*
* @usage
* ```typescript
* import { AppVersion } from '@awesome-cordova-plugins/app-version/ngx';
@ -36,6 +35,7 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
export class AppVersion extends AwesomeCordovaNativePlugin {
/**
* Returns the name of the app, e.g.: "My Awesome App"
*
* @returns {Promise<string>}
*/
@Cordova()
@ -45,6 +45,7 @@ export class AppVersion extends AwesomeCordovaNativePlugin {
/**
* Returns the package name of the app, e.g.: "com.example.myawesomeapp"
*
* @returns {Promise<string>}
*/
@Cordova()
@ -56,6 +57,7 @@ export class AppVersion extends AwesomeCordovaNativePlugin {
* Returns the build identifier of the app.
* In iOS a string with the build version like "1.6095"
* In Android a number generated from the version string, like 10203 for version "1.2.3"
*
* @returns {Promise<string | number>}
*/
@Cordova()
@ -65,6 +67,7 @@ export class AppVersion extends AwesomeCordovaNativePlugin {
/**
* Returns the version of the app, e.g.: "1.2.3"
*
* @returns {Promise<string>}
*/
@Cordova()

View File

@ -35,7 +35,6 @@ export interface WatchExistData {
* @name Apple Wallet
* @description
* A Cordova plugin that enables users from Add Payment Cards to their Apple Wallet.
*
* @usage
* ```typescript
* import { AppleWallet } from '@awesome-cordova-plugins/apple-wallet/ngx';
@ -156,7 +155,8 @@ export interface WatchExistData {
export class AppleWallet extends AwesomeCordovaNativePlugin {
/**
* Simple call to determine if the current device supports Apple Pay and has a supported card installed.
* @return {Promise<boolean>}
*
* @returns {Promise<boolean>}
*/
@Cordova()
isAvailable(): Promise<boolean> {
@ -165,8 +165,9 @@ export class AppleWallet extends AwesomeCordovaNativePlugin {
/**
* Simple call to check Card Eligibility
*
* @param {string} primaryAccountIdentifier
* @return {Promise<boolean>}
* @returns {Promise<boolean>}
*/
@Cordova()
checkCardEligibility(primaryAccountIdentifier: string): Promise<boolean> {
@ -175,8 +176,9 @@ export class AppleWallet extends AwesomeCordovaNativePlugin {
/**
* Simple call to checkCardEligibilityBySuffix
*
* @param {string} cardSuffix
* @return {Promise<PairedDevicesFlags>}
* @returns {Promise<PairedDevicesFlags>}
*/
@Cordova()
checkCardEligibilityBySuffix(cardSuffix: string): Promise<boolean> {
@ -185,7 +187,8 @@ export class AppleWallet extends AwesomeCordovaNativePlugin {
/**
* Simple call to check out if there is any paired Watches so that you can toggle visibility of 'Add to Watch' button
* @return {Promise<WatchExistData>}
*
* @returns {Promise<WatchExistData>}
*/
@Cordova()
checkPairedDevices(): Promise<WatchExistData> {
@ -194,8 +197,9 @@ export class AppleWallet extends AwesomeCordovaNativePlugin {
/**
* Simple call to check paired devices with a card by its suffix
*
* @param {string} cardSuffix
* @return {Promise<PairedDevicesFlags>}
* @returns {Promise<PairedDevicesFlags>}
*/
@Cordova()
checkPairedDevicesBySuffix(cardSuffix: string): Promise<PairedDevicesFlags> {
@ -204,8 +208,9 @@ export class AppleWallet extends AwesomeCordovaNativePlugin {
/**
* Simple call with the configuration data needed to instantiate a new PKAddPaymentPassViewController object.
*
* @param {cardData} data
* @return {Promise<SignatureCertificatesData>}
* @returns {Promise<SignatureCertificatesData>}
*/
@Cordova()
startAddPaymentPass(data: CardData): Promise<SignatureCertificatesData> {
@ -214,8 +219,9 @@ export class AppleWallet extends AwesomeCordovaNativePlugin {
/**
* Simple completion handler that takes encrypted card data returned from your server side, in order to get the final response from Apple to know if the card is added succesfully or not.
*
* @param {encryptedCardData} data
* @return {Promise<string>}
* @returns {Promise<string>}
*/
@Cordova()
completeAddPaymentPass(data: EncryptedCardData): Promise<string> {

View File

@ -132,7 +132,6 @@ export interface ApproovLoggableToken {
*
* Note: This plugin extends the pre-existing [cordova-advanced-http-plugin](https://github.com/silkimen/cordova-plugin-advanced-http),
* we have only added approov functionality on top of it. All credit goes to the actual plugin developer.
*
* @usage
* ```typescript
* import { ApproovHttp } from '@awesome-cordova-plugins/http/ngx';
@ -172,6 +171,7 @@ export interface ApproovLoggableToken {
export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* This enum represents the internal error codes which can be returned in a HTTPResponse object.
*
* @readonly
*/
@CordovaProperty()
@ -188,6 +188,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* This returns an object representing a basic HTTP Authorization header of the form.
*
* @param username {string} Username
* @param password {string} Password
* @returns {Object} an object representing a basic HTTP Authorization header of the form {'Authorization': 'Basic base64EncodedUsernameAndPassword'}
@ -199,6 +200,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* This sets up all future requests to use Basic HTTP authentication with the given username and password.
*
* @param username {string} Username
* @param password {string} Password
*/
@ -207,6 +209,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* Get all headers defined for a given hostname.
*
* @param host {string} The hostname
* @returns {string} return all headers defined for the hostname
*/
@ -217,6 +220,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* Set a header for all future requests. Takes a hostname, a header and a value.
*
* @param host {string} The hostname to be used for scoping this header
* @param header {string} The name of the header
* @param value {string} The value of the header
@ -226,6 +230,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* Get the name of the data serializer which will be used for all future POST and PUT requests.
*
* @returns {string} returns the name of the configured data serializer
*/
@Cordova({ sync: true })
@ -235,6 +240,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* Set the data serializer which will be used for all future POST, PUT and PATCH requests. Takes a string representing the name of the serializer.
*
* @param serializer {string} The name of the serializer.
* @see https://github.com/silkimen/cordova-plugin-advanced-http#setdataserializer
*/
@ -243,6 +249,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* Add a custom cookie.
*
* @param url {string} Scope of the cookie
* @param cookie {string} RFC compliant cookie string
*/
@ -257,6 +264,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* Remove cookies for given URL.
*
* @param url {string}
* @param cb
*/
@ -265,6 +273,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* Resolve cookie string for given URL.
*
* @param url {string}
*/
@Cordova({ sync: true })
@ -274,6 +283,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* Get global request timeout value in seconds.
*
* @returns {number} returns the global request timeout value
*/
@Cordova({ sync: true })
@ -283,6 +293,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* Set global request timeout value in seconds.
*
* @param timeout {number} The timeout in seconds. Default 60
*/
@Cordova({ sync: true })
@ -290,6 +301,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* Resolve if it should follow redirects automatically.
*
* @returns {boolean} returns true if it is configured to follow redirects automatically
*/
@Cordova({ sync: true })
@ -299,6 +311,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* Configure if it should follow redirects automatically.
*
* @param follow {boolean} Set to false to disable following redirects automatically
*/
@Cordova({ sync: true })
@ -310,6 +323,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
* legacy: use legacy default behavior (< 2.0.3), excluding user installed CA certs (only for Android);
* nocheck: disable SSL certificate checking and hostname verification, trusting all certs (meant to be used only for testing purposes);
* pinned: trust only provided certificates;
*
* @see https://github.com/silkimen/cordova-plugin-advanced-http#setservertrustmode
* @param {string} mode server trust mode
*/
@ -320,6 +334,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* Make a POST request
*
* @param url {string} The url to send the request to
* @param body {Object} The body of the request
* @param headers {Object} The headers to set for this request
@ -332,6 +347,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* Make a sync POST request
*
* @param url {string} The url to send the request to
* @param body {Object} The body of the request
* @param headers {Object} The headers to set for this request
@ -355,6 +371,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* Make a GET request
*
* @param url {string} The url to send the request to
* @param parameters {Object} Parameters to send with the request
* @param headers {Object} The headers to set for this request
@ -367,6 +384,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* Make a sync GET request
*
* @param url {string} The url to send the request to
* @param parameters {Object} Parameters to send with the request
* @param headers {Object} The headers to set for this request
@ -390,6 +408,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* Make a PUT request
*
* @param url {string} The url to send the request to
* @param body {Object} The body of the request
* @param headers {Object} The headers to set for this request
@ -402,6 +421,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* Make a sync PUT request
*
* @param url {string} The url to send the request to
* @param body {Object} The body of the request
* @param headers {Object} The headers to set for this request
@ -425,6 +445,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* Make a PATCH request
*
* @param url {string} The url to send the request to
* @param body {Object} The body of the request
* @param headers {Object} The headers to set for this request
@ -437,6 +458,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* Make a sync PATCH request
*
* @param url {string} The url to send the request to
* @param body {Object} The body of the request
* @param headers {Object} The headers to set for this request
@ -460,6 +482,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* Make a DELETE request
*
* @param url {string} The url to send the request to
* @param parameters {Object} Parameters to send with the request
* @param headers {Object} The headers to set for this request
@ -472,6 +495,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* Make a sync DELETE request
*
* @param url {string} The url to send the request to
* @param parameters {Object} Parameters to send with the request
* @param headers {Object} The headers to set for this request
@ -495,6 +519,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* Make a HEAD request
*
* @param url {string} The url to send the request to
* @param parameters {Object} Parameters to send with the request
* @param headers {Object} The headers to set for this request
@ -507,6 +532,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* Make a sync HEAD request
*
* @param url {string} The url to send the request to
* @param parameters {Object} Parameters to send with the request
* @param headers {Object} The headers to set for this request
@ -530,6 +556,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* Make an OPTIONS request
*
* @param url {string} The url to send the request to
* @param parameters {Object} Parameters to send with the request
* @param headers {Object} The headers to set for this request
@ -542,6 +569,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
/**
* Make an sync OPTIONS request
*
* @param url {string} The url to send the request to
* @param parameters {Object} Parameters to send with the request
* @param headers {Object} The headers to set for this request
@ -655,7 +683,6 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
* @param options.filePath {string} file path(s) to be used during upload and download see uploadFile and downloadFile for detailed information
* @param options.name {string} name(s) to be used during upload see uploadFile for detailed information
* @param options.responseType {string} response type, defaults to text
*
* @returns {Promise<HTTPResponse>} returns a promise that will resolve on success, and reject on failure
*/
@Cordova()
@ -691,7 +718,6 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
* @param options.responseType {string} response type, defaults to text
* @param success {function} A callback that is called when the request succeed
* @param failure {function} A callback that is called when the request failed
*
* @returns {string} returns a string that represents the requestId
*/
@Cordova({

View File

@ -54,7 +54,6 @@ export interface AppsflyerInviteOptions {
* @name Appsflyer
* @description
* Appsflyer Cordova SDK support for Attribution
*
* @usage
* ```typescript
* import { Appsflyer } from '@awesome-cordova-plugins/appsflyer/ngx';
@ -68,7 +67,6 @@ export interface AppsflyerInviteOptions {
* this.appsflyer.initSdk(options);
*
* ```
*
* @interfaces
* AppsflyerOptions
* AppsflyerEvent
@ -86,6 +84,7 @@ export interface AppsflyerInviteOptions {
export class Appsflyer extends AwesomeCordovaNativePlugin {
/**
* initialize the SDK
*
* @param {AppsflyerOptions} options
* @returns {Promise<any>}
*/
@ -96,6 +95,7 @@ export class Appsflyer extends AwesomeCordovaNativePlugin {
/**
* These in-app events help you track how loyal users discover your app, and attribute them to specific campaigns/media-sources. Please take the time define the event/s you want to measure to allow you to track ROI (Return on Investment) and LTV (Lifetime Value).
*
* @param {string} eventName custom event name, is presented in your dashboard
* @param {AppsflyerEvent} eventValues event details
*/
@ -104,6 +104,7 @@ export class Appsflyer extends AwesomeCordovaNativePlugin {
/**
* Setting your own Custom ID enables you to cross-reference your own unique ID with AppsFlyers user ID and the other devices IDs. This ID is available in AppsFlyer CSV reports along with postbacks APIs for cross-referencing with you internal IDs.
*
* @param {string} customerUserId user id
*/
@Cordova({ sync: true })
@ -111,13 +112,16 @@ export class Appsflyer extends AwesomeCordovaNativePlugin {
/**
* Setting your own Custom ID enables you to cross-reference your own unique ID with AppsFlyers user ID and the other devices IDs. This ID is available in AppsFlyer CSV reports along with postbacks APIs for cross-referencing with you internal IDs.
*
* @param {boolean} customerUserId In some extreme cases you might want to shut down all SDK tracking due to legal and privacy compliance. This can be achieved with the isStopTracking API. Once this API is invoked, our SDK will no longer communicate with our servers and stop functioning.
* @param isStopTracking
*/
@Cordova({ sync: true })
Stop(isStopTracking: boolean): void {}
/**
* Get the data from Attribution
*
* @returns {Promise<any>}
*/
@Cordova()
@ -138,6 +142,7 @@ export class Appsflyer extends AwesomeCordovaNativePlugin {
/**
* Allows to pass GCM/FCM Tokens that where collected by third party plugins to the AppsFlyer server. Can be used for Uninstall Tracking.
*
* @param {string} token GCM/FCM ProjectNumber
*/
@Cordova({ sync: true })
@ -145,6 +150,7 @@ export class Appsflyer extends AwesomeCordovaNativePlugin {
/**
* (iOS) Allows to pass APN Tokens that where collected by third party plugins to the AppsFlyer server. Can be used for Uninstall Tracking.
*
* @param {string} token APN Token
*/
@Cordova({ sync: true })
@ -160,6 +166,7 @@ export class Appsflyer extends AwesomeCordovaNativePlugin {
/**
* End User Opt-Out (Optional) AppsFlyer provides you a method to optout specific users from AppsFlyer analytics. This method complies with the latest privacy requirements and complies with Facebook data and privacy policies. Default is FALSE, meaning tracking is enabled by default.
*
* @param {boolean} disable Set to true to opt-out user from tracking
*/
@Cordova({ sync: true })
@ -167,6 +174,7 @@ export class Appsflyer extends AwesomeCordovaNativePlugin {
/**
* Set AppsFlyers OneLink ID. Setting a valid OneLink ID will result in shortened User Invite links, when one is generated. The OneLink ID can be obtained on the AppsFlyer Dashboard.
*
* @param {string} oneLinkId OneLink ID
*/
@Cordova({ sync: true })
@ -174,6 +182,7 @@ export class Appsflyer extends AwesomeCordovaNativePlugin {
/**
* Allowing your existing users to invite their friends and contacts as new users to your app can be a key growth factor for your app. AppsFlyer allows you to track and attribute new installs originating from user invites within your app.
*
* @param {AppsflyerInviteOptions} options Parameters for Invite link
* @returns {Promise<any>}
*/
@ -184,6 +193,7 @@ export class Appsflyer extends AwesomeCordovaNativePlugin {
/**
* Use this call to track an impression use the following API call. Make sure to use the promoted App ID as it appears within the AppsFlyer dashboard.
*
* @param {string} appId Promoted Application ID
* @param {string} campaign Promoted Campaign
*/
@ -192,6 +202,7 @@ export class Appsflyer extends AwesomeCordovaNativePlugin {
/**
* Use this call to track the click and launch the app store's app page (via Browser)
*
* @param {string} appId Promoted Application ID
* @param {string} campaign Promoted Campaign
* @param {Object} options Additional Parameters to track

View File

@ -14,7 +14,6 @@ export interface BackgroundFetchConfig {
* iOS Background Fetch Implementation. See: https://developer.apple.com/reference/uikit/uiapplication#1657399
* iOS Background Fetch is basically an API which wakes up your app about every 15 minutes (during the user's prime-time hours) and provides your app exactly 30s of background running-time. This plugin will execute your provided callbackFn whenever a background-fetch event occurs. There is no way to increase the rate which a fetch-event occurs and this plugin sets the rate to the most frequent possible value of UIApplicationBackgroundFetchIntervalMinimum -- iOS determines the rate automatically based upon device usage and time-of-day (ie: fetch-rate is about ~15min during prime-time hours; less frequently when the user is presumed to be sleeping, at 3am for example).
* For more detail, please see https://github.com/transistorsoft/cordova-plugin-background-fetch
*
* @usage
*
* ```typescript
@ -48,7 +47,6 @@ export interface BackgroundFetchConfig {
* ```
* @interfaces
* BackgroundFetchConfig
*
*/
@Plugin({
pluginName: 'BackgroundFetch',
@ -63,7 +61,7 @@ export class BackgroundFetch extends AwesomeCordovaNativePlugin {
* Configures the plugin's fetch callbackFn
*
* @param {BackgroundFetchConfig} config Configuration for plugin
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({
callbackOrder: 'reverse',
@ -75,6 +73,7 @@ export class BackgroundFetch extends AwesomeCordovaNativePlugin {
/**
* Start the background-fetch API.
* Your callbackFn provided to #configure will be executed each time a background-fetch event occurs. NOTE the #configure method automatically calls #start. You do not have to call this method after you #configure the plugin
*
* @returns {Promise<any>}
*/
@Cordova()
@ -84,6 +83,7 @@ export class BackgroundFetch extends AwesomeCordovaNativePlugin {
/**
* Stop the background-fetch API from firing fetch events. Your callbackFn provided to #configure will no longer be executed.
*
* @returns {Promise<any>}
*/
@Cordova()
@ -93,6 +93,8 @@ export class BackgroundFetch extends AwesomeCordovaNativePlugin {
/**
* You MUST call this method in your fetch callbackFn provided to #configure in order to signal to iOS that your fetch action is complete. iOS provides only 30s of background-time for a fetch-event -- if you exceed this 30s, iOS will kill your app.
*
* @param taskId
*/
@Cordova({
sync: true,
@ -101,6 +103,7 @@ export class BackgroundFetch extends AwesomeCordovaNativePlugin {
/**
* Return the status of the background-fetch
*
* @returns {Promise<any>}
*/
@Cordova()

View File

@ -305,6 +305,7 @@ export interface BackgroundGeolocationConfig {
*
* Platform: Android
* Provider: all
*
* @default "Background tracking"
*/
notificationTitle?: string;
@ -493,7 +494,6 @@ export declare enum BackgroundGeolocationIOSActivity {
* @description
* This plugin provides foreground and background geolocation with battery-saving "circular region monitoring" and "stop detection". For
* more detail, please see https://github.com/mauron85/cordova-plugin-background-geolocation
*
* @usage
*
* BackgroundGeolocation must be called within app.ts and or before Geolocation. Otherwise the platform will not ask you for background tracking permission.
@ -551,7 +551,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
* Configure the plugin.
*
* @param options {BackgroundGeolocationConfig} options An object of type Config
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
configure(options: BackgroundGeolocationConfig): Promise<any> {
@ -561,6 +561,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
/**
* Turn ON the background-geolocation system.
* The user will be tracked whenever they suspend the app.
*
* @returns {Promise<any>}
*/
@Cordova()
@ -570,6 +571,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
/**
* Turn OFF background-tracking
*
* @returns {Promise<any>}
*/
@Cordova()
@ -579,6 +581,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
/**
* Inform the native plugin that you're finished, the background-task may be completed
*
* @returns {Promise<any>}
*/
@Cordova({
@ -590,6 +593,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
/**
* Force the plugin to enter "moving" or "stationary" state
*
* @param isMoving {boolean}
* @returns {Promise<any>}
*/
@ -602,6 +606,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
/**
* Setup configuration
*
* @param options {BackgroundGeolocationConfig}
* @returns {Promise<any>}
*/
@ -614,6 +619,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
/**
* Returns current stationaryLocation if available. null if not
*
* @returns {Promise<Location>}
*/
@Cordova({
@ -626,6 +632,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
/**
* Add a stationary-region listener. Whenever the devices enters "stationary-mode",
* your #success callback will be executed with #location param containing #radius of region
*
* @returns {Promise<any>}
*/
@Cordova({
@ -637,6 +644,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
/**
* Check if location is enabled on the device
*
* @returns {Promise<number>} Returns a promise with int argument that takes values 0, 1 (true).
*/
@Cordova({
@ -662,6 +670,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
* Method can be used to detect user changes in location services settings.
* If user enable or disable location services then success callback will be executed.
* In case or (SettingNotFoundException) fail callback will be executed.
*
* @returns {Observable<number>}
*/
@Cordova({
@ -674,6 +683,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
/**
* Stop watching for location mode changes.
*
* @returns {Promise<any>}
*/
@Cordova({
@ -690,6 +700,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
* by the system
* or
* - option.debug is true
*
* @returns {Promise<any>}
*/
@Cordova({
@ -701,6 +712,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
/**
* Method will return locations, which has not been yet posted to server. NOTE: Locations does contain locationId.
*
* @returns {Promise<any>}
*/
@Cordova()
@ -710,6 +722,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
/**
* Delete stored location by given locationId.
*
* @param locationId {number}
* @returns {Promise<any>}
*/
@ -722,6 +735,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
/**
* Delete all stored locations.
*
* @returns {Promise<any>}
*/
@Cordova({
@ -753,8 +767,10 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
/**
* Return all logged events. Useful for plugin debugging. Parameter limit limits number of returned entries.
* @see https://github.com/mauron85/cordova-plugin-background-geolocation/tree/v2.2.1#debugging for more information.
*
* @see https://github.com/mauron85/cordova-plugin-background-geolocation/tree/v2.2.1#debugging for more information.
* @param fromId
* @param minLevel
* @param limit {number} Limits the number of entries
* @returns {Promise<any>}
*/
@ -769,8 +785,8 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
/**
* Return all logged events. Useful for plugin debugging. Parameter limit limits number of returned entries.
* @see https://github.com/mauron85/cordova-plugin-background-geolocation/tree/v2.2.1#debugging for more information.
*
* @see https://github.com/mauron85/cordova-plugin-background-geolocation/tree/v2.2.1#debugging for more information.
* @returns {Promise<any>}
*/
@Cordova()
@ -820,6 +836,8 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
/**
* End background task indentified by taskKey (iOS only)
*
* @param taskKey
*/
@Cordova({
platforms: ['IOS'],
@ -870,6 +888,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
* Register event listener.
*
* Triggered when server responded with "<code>285 Updates Not Required</code>" to post/sync request.
*
* @param event
* @param callbackFn
*/
@ -884,6 +903,8 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
* Unregister all event listeners for given event.
*
* If parameter <code>event</code> is not provided then all event listeners will be removed.
*
* @param event
*/
@Cordova()
removeAllListeners(event?: BackgroundGeolocationEvents): Promise<any> {

View File

@ -65,7 +65,6 @@ export interface BackgroundModeConfiguration {
*
* this.backgroundMode.enable();
* ```
*
* @interfaces
* BackgroundModeConfiguration
*/
@ -102,8 +101,7 @@ export class BackgroundMode extends AwesomeCordovaNativePlugin {
* Enable or disable the background mode.
*
* @param enable {boolean} The status to set for.
*
* @return {void}
* @returns {void}
*/
@Cordova({
sync: true,
@ -115,8 +113,7 @@ export class BackgroundMode extends AwesomeCordovaNativePlugin {
*
* @param event {string} event The event's name.
* @param args {array} The callback's arguments.
*
* @return {string}
* @returns {string}
*/
@Cordova({
sync: true,
@ -127,6 +124,7 @@ export class BackgroundMode extends AwesomeCordovaNativePlugin {
/**
* Checks if background mode is enabled or not.
*
* @returns {boolean} returns a boolean that indicates if the background mode is enabled.
*/
@Cordova({
@ -138,6 +136,7 @@ export class BackgroundMode extends AwesomeCordovaNativePlugin {
/**
* Can be used to get the information if the background mode is active.
*
* @returns {boolean} returns a boolean that indicates if the background mode is active.
*/
@Cordova({
@ -150,6 +149,7 @@ export class BackgroundMode extends AwesomeCordovaNativePlugin {
/**
* Overwrite the default settings.
* Available only for Android platform.
*
* @param overrides {BackgroundModeConfiguration} Dict of options to be overridden.
* @returns {Promise<any>}
*/
@ -161,6 +161,7 @@ export class BackgroundMode extends AwesomeCordovaNativePlugin {
/**
* Modify the displayed information.
* Available only for Android platform.
*
* @param {BackgroundModeConfiguration} [options] Any options you want to update. See table below.
*/
@Cordova({
@ -172,6 +173,7 @@ export class BackgroundMode extends AwesomeCordovaNativePlugin {
/**
* Register callback for given event.
* > Available events are `enable`, `disable`, `activate`, `deactivate` and `failure`.
*
* @param event {string} Event name
* @returns {Observable<any>}
*/
@ -186,6 +188,7 @@ export class BackgroundMode extends AwesomeCordovaNativePlugin {
/**
* Listen for events that the plugin fires. Available events are `enable`, `disable`, `activate`, `deactivate` and `failure`.
*
* @param event {string} Event name
* @param callback {function} The function to be exec as callback.
* @returns {Observable<any>}
@ -242,6 +245,7 @@ export class BackgroundMode extends AwesomeCordovaNativePlugin {
/**
* If the screen is off.
*
* @param fn {function} Callback function to invoke with boolean arg.
* @returns {Promise<boolean>}
*/

View File

@ -77,7 +77,6 @@ export class FileTransferManager {
* @name BackgroundUpload
* @description
* This plugin does something
*
* @usage
* ```typescript
* import { BackgroundUpload } from '@awesome-cordova-plugins/background-upload/ngx';

View File

@ -10,7 +10,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
* Requires Cordova plugin: cordova-plugin-badge. For more info, please see the [Badge plugin docs](https://github.com/katzer/cordova-plugin-badge).
*
* Android Note: Badges have historically only been a feature implemented by third party launchers and not visible unless one of those launchers was being used (E.G. Samsung or Nova Launcher) and if enabled by the user. As of Android 8 (Oreo), [notification badges](https://developer.android.com/training/notify-user/badges) were introduced officially to reflect unread notifications. This plugin is unlikely to work as expected on devices running Android 8 or newer. Please see the [local notifications plugin docs](https://github.com/katzer/cordova-plugin-local-notifications) for more information on badge use with notifications.
*
* @usage
* ```typescript
* import { Badge } from '@awesome-cordova-plugins/badge/ngx';
@ -35,6 +34,7 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
export class Badge extends AwesomeCordovaNativePlugin {
/**
* Clear the badge of the app icon.
*
* @returns {Promise<boolean>}
*/
@Cordova()
@ -44,6 +44,7 @@ export class Badge extends AwesomeCordovaNativePlugin {
/**
* Set the badge of the app icon.
*
* @param {number} badgeNumber The new badge number.
* @returns {Promise<any>}
*/
@ -54,6 +55,7 @@ export class Badge extends AwesomeCordovaNativePlugin {
/**
* Get the badge of the app icon.
*
* @returns {Promise<any>}
*/
@Cordova()
@ -63,6 +65,7 @@ export class Badge extends AwesomeCordovaNativePlugin {
/**
* Increase the badge number.
*
* @param {number} increaseBy Count to add to the current badge number
* @returns {Promise<any>}
*/
@ -73,6 +76,7 @@ export class Badge extends AwesomeCordovaNativePlugin {
/**
* Decrease the badge number.
*
* @param {number} decreaseBy Count to subtract from the current badge number
* @returns {Promise<any>}
*/
@ -83,6 +87,7 @@ export class Badge extends AwesomeCordovaNativePlugin {
/**
* Check support to show badges.
*
* @returns {Promise<any>}
*/
@Cordova()
@ -92,6 +97,7 @@ export class Badge extends AwesomeCordovaNativePlugin {
/**
* Determine if the app has permission to show badges.
*
* @returns {Promise<any>}
*/
@Cordova()
@ -101,6 +107,7 @@ export class Badge extends AwesomeCordovaNativePlugin {
/**
* Register permission to set badge notifications
*
* @returns {Promise<any>}
*/
@Cordova()

View File

@ -86,7 +86,6 @@ export interface BarcodeScanResult {
* The Barcode Scanner Plugin opens a camera view and automatically scans a barcode, returning the data back to you.
*
* Requires Cordova plugin: `phonegap-plugin-barcodescanner`. For more info, please see the [BarcodeScanner plugin docs](https://github.com/phonegap/phonegap-plugin-barcodescanner).
*
* @usage
* ```typescript
* import { BarcodeScanner } from '@awesome-cordova-plugins/barcode-scanner/ngx';
@ -129,6 +128,7 @@ export class BarcodeScanner extends AwesomeCordovaNativePlugin {
/**
* Open the barcode scanner.
*
* @param {BarcodeScannerOptions} [options] Optional options to pass to the scanner
* @returns {Promise<any>} Returns a Promise that resolves with scanner data, or rejects with an error.
*/
@ -142,6 +142,7 @@ export class BarcodeScanner extends AwesomeCordovaNativePlugin {
/**
* Encodes data into a barcode.
* NOTE: not well supported on Android
*
* @param {string} type Type of encoding
* @param {any} data Data to encode
* @returns {Promise<any>}

View File

@ -18,7 +18,6 @@ export interface BatteryStatusResponse {
* @name Battery Status
* @description
* Requires Cordova plugin: cordova-plugin-batterystatus. For more info, please see the [BatteryStatus plugin docs](https://github.com/apache/cordova-plugin-battery-status).
*
* @usage
* ```typescript
* import { BatteryStatus } from '@awesome-cordova-plugins/battery-status/ngx';
@ -51,6 +50,7 @@ export interface BatteryStatusResponse {
export class BatteryStatus extends AwesomeCordovaNativePlugin {
/**
* Watch the change in battery level
*
* @returns {Observable<BatteryStatusResponse>} Returns an observable that pushes a status object
*/
@Cordova({
@ -63,6 +63,7 @@ export class BatteryStatus extends AwesomeCordovaNativePlugin {
/**
* Watch when the battery level goes low
*
* @returns {Observable<BatteryStatusResponse>} Returns an observable that pushes a status object
*/
@Cordova({
@ -75,6 +76,7 @@ export class BatteryStatus extends AwesomeCordovaNativePlugin {
/**
* Watch when the battery level goes to critical
*
* @returns {Observable<BatteryStatusResponse>} Returns an observable that pushes a status object
*/
@Cordova({

View File

@ -5,7 +5,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
* @name BioCatch
* @description
* BioCatch SDK Cordova support
*
* @usage
* ```typescript
* import { BioCatch } from '@awesome-cordova-plugins/biocatch';
@ -33,10 +32,11 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
export class BioCatch extends AwesomeCordovaNativePlugin {
/**
* Start a session
*
* @param customerSessionID {String} Customer session id
* @param wupUrl {String} WUP server URL
* @param publicKey {String} Public Key
* @return {Promise<void>} Returns a promise
* @returns {Promise<void>} Returns a promise
*/
@Cordova()
start(customerSessionID: string | null, wupUrl: string, publicKey: string | null): Promise<void> {
@ -45,7 +45,8 @@ export class BioCatch extends AwesomeCordovaNativePlugin {
/**
* Pause the session
* @return {Promise<void>} Returns a promise
*
* @returns {Promise<void>} Returns a promise
*/
@Cordova()
pause(): Promise<void> {
@ -54,7 +55,8 @@ export class BioCatch extends AwesomeCordovaNativePlugin {
/**
* Resume the session
* @return {Promise<void>} Returns a promise
*
* @returns {Promise<void>} Returns a promise
*/
@Cordova()
resume(): Promise<void> {
@ -63,7 +65,8 @@ export class BioCatch extends AwesomeCordovaNativePlugin {
/**
* Stop the session
* @return {Promise<void>} Returns a promise
*
* @returns {Promise<void>} Returns a promise
*/
@Cordova()
stop(): Promise<void> {
@ -72,7 +75,8 @@ export class BioCatch extends AwesomeCordovaNativePlugin {
/**
* Reset the session
* @return {Promise<void>} Returns a promise
*
* @returns {Promise<void>} Returns a promise
*/
@Cordova()
resetSession(): Promise<void> {
@ -81,8 +85,9 @@ export class BioCatch extends AwesomeCordovaNativePlugin {
/**
* Change the session context
*
* @param contextName {String} Context name
* @return {Promise<void>} Returns a promise
* @returns {Promise<void>} Returns a promise
*/
@Cordova()
changeContext(contextName: string): Promise<void> {
@ -91,8 +96,9 @@ export class BioCatch extends AwesomeCordovaNativePlugin {
/**
* Update the customer session ID
*
* @param customerSessionID {String}
* @return {Promise<void>} Returns a promise
* @returns {Promise<void>} Returns a promise
*/
@Cordova()
updateCustomerSessionID(customerSessionID: string | null): Promise<void> {

View File

@ -6,7 +6,6 @@ import { Plugin, Cordova, AwesomeCordovaNativePlugin } from '@awesome-cordova-pl
* @description
* This plugin capture biometric(Iris and Fingerprint) and validate the user.
* May be used in Banking domain
*
* @usage
* ```typescript
* import { BiometricWrapper } from '@awesome-cordova-plugins/biometric-wrapper/ngx';
@ -37,7 +36,9 @@ import { Plugin, Cordova, AwesomeCordovaNativePlugin } from '@awesome-cordova-pl
export class BiometricWrapper extends AwesomeCordovaNativePlugin {
/**
* This function activate iris activity
* @return {Promise<any>} Returns a promise that resolves when iris data captured
*
* @param args
* @returns {Promise<any>} Returns a promise that resolves when iris data captured
*/
@Cordova()
activateIris(args: any): Promise<any> {
@ -46,7 +47,9 @@ export class BiometricWrapper extends AwesomeCordovaNativePlugin {
/**
* This function activate fingerprint activity
* @return {Promise<any>} Returns a promise that resolves when FP data captured
*
* @param args
* @returns {Promise<any>} Returns a promise that resolves when FP data captured
*/
@Cordova()
activateFingerprint(args: any): Promise<any> {

View File

@ -23,7 +23,6 @@ export interface BLEScanOptions {
* Advertising information is returned when scanning for peripherals. Service, characteristic, and property info is returned when connecting to a peripheral. All access is via service and characteristic UUIDs. The plugin manages handles internally.
*
* Simultaneous connections to multiple peripherals are supported.
*
* @usage
*
* ```typescript
@ -171,7 +170,6 @@ export interface BLEScanOptions {
* ## UUIDs
*
* UUIDs are always strings and not numbers. Some 16-bit UUIDs, such as '2220' look like integers, but they're not. (The integer 2220 is 0x8AC in hex.) This isn't a problem with 128 bit UUIDs since they look like strings 82b9e6e1-593a-456f-be9b-9215160ebcac. All 16-bit UUIDs should also be passed to methods as strings.
*
* @interfaces
* BLEScanOptions
*/
@ -231,6 +229,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
/**
* Scans for BLE devices. This function operates similarly to the `startScan` function, but allows you to specify extra options (like allowing duplicate device reports).
*
* @param {string[]} services List of service UUIDs to discover, or `[]` to find all devices
* @param {BLEScanOptions} options Options
* @returns {Observable<any>} Returns an Observable that notifies of each peripheral discovered.
@ -265,6 +264,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
/**
* Set device pin.
*
* @usage
* ```
* BLE.setPin(pin).subscribe(success => {
@ -275,7 +275,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
* });
* ```
* @param {string} pin Pin of the device as a string
* @return {Observable<any>} Returns an Observable that notifies of success/failure.
* @returns {Observable<any>} Returns an Observable that notifies of success/failure.
*/
@Cordova({
observable: true,
@ -286,6 +286,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
/**
* Connect to a peripheral.
*
* @usage
* ```
* BLE.connect('12:34:56:78:9A:BC').subscribe(peripheralData => {
@ -296,7 +297,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
* });
* ```
* @param {string} deviceId UUID or MAC address of the peripheral
* @return {Observable<any>} Returns an Observable that notifies of connect/disconnect.
* @returns {Observable<any>} Returns an Observable that notifies of connect/disconnect.
*/
@Cordova({
observable: true,
@ -331,8 +332,8 @@ export class BLE extends AwesomeCordovaNativePlugin {
*
* ```
* @param {string} deviceId UUID or MAC address of the peripheral
* @param {function} connectCallback function that is called with peripheral data when the devices connects
* @param {function} disconnectCallback function that is called with peripheral data when the devices disconnects
* @param {Function} connectCallback function that is called with peripheral data when the devices connects
* @param {Function} disconnectCallback function that is called with peripheral data when the devices disconnects
*/
@Cordova({ sync: true })
autoConnect(deviceId: string, connectCallback: any, disconnectCallback: any) {
@ -342,6 +343,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
/**
* Request MTU size.
* May be used to fix the Error 14 "Unlikely" on write requests with more than 20 bytes.
*
* @usage
* ```
* BLE.requestMtu('12:34:56:78:9A:BC', 512).then(() => {
@ -352,7 +354,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
* ```
* @param {string} deviceId UUID or MAC address of the peripheral
* @param {number} mtuSize The new MTU size. (23 - 517, default is usually 23. Max recommended: 512)
* @return {Promise<any>} Returns a Promise.
* @returns {Promise<any>} Returns a Promise.
*/
@Cordova()
requestMtu(deviceId: string, mtuSize: number): Promise<any> {
@ -364,6 +366,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
* This method may fix a issue of old cached services and characteristics.
* NOTE Since this uses an undocumented API it's not guaranteed to work.
* If you choose a too low delay time (timeoutMillis) the method could fail.
*
* @usage
* ```
* BLE.refreshDeviceCache('12:34:56:78:9A:BC', 10000).then(discoveredServices => {
@ -374,7 +377,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
* ```
* @param {string} deviceId UUID or MAC address of the peripheral
* @param {number} timeoutMillis Delay in milliseconds after refresh before discovering services.
* @return {Promise<any>} Returns a Promise.
* @returns {Promise<any>} Returns a Promise.
*/
@Cordova()
refreshDeviceCache(deviceId: string, timeoutMillis: number): Promise<any> {
@ -383,6 +386,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
/**
* Disconnect from a peripheral.
*
* @usage
* ```
* BLE.disconnect('12:34:56:78:9A:BC').then(() => {
@ -390,7 +394,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
* });
* ```
* @param {string} deviceId UUID or MAC address of the peripheral
* @return {Promise<any>} Returns a Promise
* @returns {Promise<any>} Returns a Promise
*/
@Cordova()
disconnect(deviceId: string): Promise<any> {
@ -403,7 +407,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
* @param {string} deviceId UUID or MAC address of the peripheral
* @param {string} serviceUUID UUID of the BLE service
* @param {string} characteristicUUID UUID of the BLE characteristic
* @return {Promise<any>} Returns a Promise
* @returns {Promise<any>} Returns a Promise
*/
@Cordova()
read(deviceId: string, serviceUUID: string, characteristicUUID: string): Promise<any> {
@ -412,6 +416,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
/**
* Write the value of a characteristic.
*
* @usage
* ```
* // send 1 byte to switch a light on
@ -436,7 +441,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
* @param {string} serviceUUID UUID of the BLE service
* @param {string} characteristicUUID UUID of the BLE characteristic
* @param {ArrayBuffer} value Data to write to the characteristic, as an ArrayBuffer.
* @return {Promise<any>} Returns a Promise
* @returns {Promise<any>} Returns a Promise
*/
@Cordova()
write(deviceId: string, serviceUUID: string, characteristicUUID: string, value: ArrayBuffer): Promise<any> {
@ -450,7 +455,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
* @param {string} serviceUUID UUID of the BLE service
* @param {string} characteristicUUID UUID of the BLE characteristic
* @param {ArrayBuffer} value Data to write to the characteristic, as an ArrayBuffer.
* @return {Promise<any>} Returns a Promise
* @returns {Promise<any>} Returns a Promise
*/
@Cordova()
writeWithoutResponse(
@ -471,11 +476,10 @@ export class BLE extends AwesomeCordovaNativePlugin {
* console.log(String.fromCharCode.apply(null, new Uint8Array(buffer));
* });
* ```
*
* @param {string} deviceId UUID or MAC address of the peripheral
* @param {string} serviceUUID UUID of the BLE service
* @param {string} characteristicUUID UUID of the BLE characteristic
* @return {Observable<any>} Returns an Observable that notifies of characteristic changes.
* @returns {Observable<any>} Returns an Observable that notifies of characteristic changes.
* The observer emit an array with data at index 0 and sequence order at index 1.
* The sequence order is always undefined on iOS. On android it leave the client to check the sequence order and reorder if needed
*/
@ -539,8 +543,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
* console.log("Bluetooth is " + state);
* });
* ```
*
* @return {Observable<any>} Returns an Observable that notifies when the Bluetooth is enabled or disabled on the device.
* @returns {Observable<any>} Returns an Observable that notifies when the Bluetooth is enabled or disabled on the device.
*/
@Cordova({
observable: true,
@ -585,7 +588,6 @@ export class BLE extends AwesomeCordovaNativePlugin {
* Read the RSSI value on the device connection.
*
* @param {string} deviceId UUID or MAC address of the peripheral
*
* @returns {Promise<any>}
*/
@Cordova()

File diff suppressed because it is too large Load Diff

View File

@ -53,7 +53,6 @@ export interface BluetoothClassicSerialPortDevice {
*
* }
* ```
*
*/
@Plugin({
pluginName: 'BluetoothClassicSerialPort',
@ -66,6 +65,7 @@ export interface BluetoothClassicSerialPortDevice {
export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
/**
* Connect to a Bluetooth device
*
* @param {string} deviceId Identifier of the remote device.
* @param {string} deviceId this is the MAC address.
* @param {string|string[]} interfaceId Identifier of the remote device
@ -82,6 +82,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
/**
* Connect to a Bluetooth device
*
* @deprecated
* @param {string} deviceId Identifier of the remote device.
* @param {number} deviceId this is the connection ID
@ -99,6 +100,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
/**
* Connect insecurely to a Bluetooth device
*
* @param {string} deviceId Identifier of the remote device. For Android this is the MAC address
* @param {string | string[]} interfaceArray This identifies the serial port to connect to. For Android this is the SPP_UUID.
* @returns {Promise<any>} Subscribe to connect.
@ -113,6 +115,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
/**
* Disconnect from the connected device
*
* @param {string} interfaceId The interface to Disconnect
* @returns {Promise<any>}
*/
@ -123,6 +126,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
/**
* Disconnect from all the connected device
*
* @returns {Promise<any>}
*/
@Cordova({
@ -134,6 +138,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
/**
* Writes data to the serial port
*
* @param {string} interfaceId The interface to send the data to
* @param {ArrayBuffer | string | number[] | Uint8Array} data ArrayBuffer of data
* @returns {Promise<any>} returns a promise when data has been written
@ -147,6 +152,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
/**
* Gets the number of bytes of data available
*
* @param {string} interfaceId The interface to check
* @returns {Promise<any>} returns a promise that contains the available bytes
*/
@ -159,6 +165,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
/**
* Function read reads the data from the buffer. The data is passed to the success callback as a String. Calling read when no data is available will pass an empty String to the callback.
*
* @param {string} interfaceId The interface to read
* @returns {Promise<any>} returns a promise with data from the buffer
*/
@ -171,6 +178,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
/**
* Reads data from the buffer until it reaches a delimiter
*
* @param {string} interfaceId The interface to read
* @param {string} delimiter string that you want to search until
* @returns {Observable<any>} returns a promise
@ -184,6 +192,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
/**
* Subscribe to be notified when data is received
*
* @param {string | string[]} interfaceId The interface to subscribe to
* @param {string} delimiter the string you want to watch for
* @returns {Observable<any>} returns an observable.
@ -198,6 +207,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
/**
* Unsubscribe from a subscription
*
* @param {string | string[]} interfaceId The interface to unsubscribe from
* @returns {Promise<any>} returns an promise.
*/
@ -210,6 +220,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
/**
* Subscribe to be notified when data is received
*
* @param {string | string[]} interfaceId The interface to subscribe to
* @returns {Observable<any>} returns an observable
*/
@ -223,6 +234,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
/**
* Unsubscribe from a subscription
*
* @param {string | string[]} interfaceId The interface to unsubscribe from
* @returns {Promise<any>} returns an promise.
*/
@ -235,6 +247,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
/**
* Clears data in buffer
*
* @param {string} interfaceId The interface to clear data
* @returns {Promise<any>} returns a promise when completed
*/
@ -247,6 +260,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
/**
* Lists bonded devices
*
* @returns {Promise<BluetoothClassicSerialPortDevice>} returns a promise
*/
@Cordova({
@ -258,6 +272,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
/**
* Reports the connection status
*
* @param {string} interfaceId The interface to check
* @returns {Promise<boolean>} returns a promise
*/
@ -270,6 +285,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
/**
* Reports if bluetooth is enabled
*
* @returns {Promise<any>} returns a promise
*/
@Cordova({
@ -281,6 +297,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
/**
* Show the Bluetooth settings on the device
*
* @returns {Promise<any>} returns a promise
*/
@Cordova({
@ -292,6 +309,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
/**
* Enable Bluetooth on the device
*
* @returns {Promise<any>} returns a promise
*/
@Cordova({
@ -303,6 +321,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
/**
* Discover unpaired devices
*
* @returns {Promise<any>} returns a promise
*/
@Cordova({
@ -314,6 +333,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
/**
* Subscribe to be notified on Bluetooth device discovery. Discovery process must be initiated with the `discoverUnpaired` function.
*
* @returns {Observable<any>} Returns an observable
*/
@Cordova({

View File

@ -426,7 +426,6 @@ export interface AdapterInfo {
* This plugin has the most complete implementation for interacting with Bluetooth LE devices on Android, iOS and partially Windows.
* It's a wrap around [randdusing/cordova-plugin-bluetoothle](https://github.com/randdusing/cordova-plugin-bluetoothle/blob/master/readme.md) cordova plugin for Ionic.
* It supports peripheral **and** central modes and covers most of the API methods available on Android and iOS.
*
* @usage
* ```typescript
* import { BluetoothLE } from '@awesome-cordova-plugins/bluetooth-le/ngx';
@ -446,7 +445,6 @@ export interface AdapterInfo {
* }
*
* ```
*
*/
@Plugin({
pluginName: 'BluetoothLE',
@ -532,6 +530,8 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
/**
* @name retrieveConnected
* @param params
* @param params.services
* Retrieved paired Bluetooth LE devices. In iOS, devices that are "paired" to will not return during a normal scan.
* Callback is "instant" compared to a scan.
* @param {{ services: string[] }} An array of service IDs to filter the retrieval by. If no service IDs are specified, no devices will be returned.
@ -544,6 +544,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
/**
* @name bond (Android)
* @param params.address
* Bond with a device.
* The device doesn't need to be connected to initiate bonding. Android support only.
* @param {{ address: string }} params The address/identifier provided by the scan's return object
@ -562,6 +563,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
/**
* @name unbond (Android)
* @param params.address
* Unbond with a device. The device doesn't need to be connected to initiate bonding. Android support only.
* @param {{address: string}} params The address/identifier
* @returns {Promise<{ status: DeviceInfo }>}
@ -579,7 +581,6 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
* @param connectSuccess The success callback that is passed with device object
* @param connectError The callback that will be triggered when the connect operation fails
* @param params The connection params
*
* @param {ConnectionParams} params
* @returns {(Observable<{ status: DeviceInfo }>)}
* success: device object with status
@ -592,6 +593,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
/**
* @name reconnect
* @param params.address
* Reconnect to a previously connected Bluetooth device
* @param {{address: string}} params The address/identifier
* @returns {(Observable<DeviceInfo>)}
@ -603,6 +605,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
/**
* @name disconnect
* @param params.address
* Disconnect from a Bluetooth LE device.
* Note: It's simpler to just call close(). Starting with iOS 10, disconnecting before closing seems required!
* @param {{address: string}} params The address/identifier
@ -615,6 +618,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
/**
* @name close
* @param params.address
* Close/dispose a Bluetooth LE device.
* Prior to 2.7.0, you needed to disconnect to the device before closing, but this is no longer the case.
* Starting with iOS 10, disconnecting before closing seems required!
@ -628,6 +632,8 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
/**
* @name discover
* @param params.address
* @param params.clearCache
* Discover all the devices services, characteristics and descriptors.
* Doesn't need to be called again after disconnecting and then reconnecting.
* If using iOS, you shouldn't use discover and services/characteristics/descriptors on the same device.
@ -647,6 +653,8 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
/**
* @name services (iOS)
* @param params.address
* @param params.services
* Discover the device's services.
* Not providing an array of services will return all services and take longer to discover. iOS support only.
* @param {{address: string, services: string[]}} params
@ -764,6 +772,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
/**
* @name rssi
* @param params.address
* Read RSSI of a connected device. RSSI is also returned with scanning.
* @param {{ address: string }} params
* @returns {Promise< RSSI >}
@ -775,6 +784,8 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
/**
* @name mtu (Android, Android 5+)
* @param params.address
* @param params.mtu
* Set MTU of a connected device. Android only.
* @param {{ address: string, mtu: number }} params
* @returns {Promise< MTU >}
@ -786,6 +797,8 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
/**
* @name requestConnectionPriority (Android, Android 5+)
* @param params.address
* @param params.connectionPriority
* Request a change in the connection priority to improve throughput when transfer large amounts of data via BLE.
* Android support only. iOS will return error.
* @param {{ address: string, connectionPriority: ConnectionPriority }} params
@ -828,6 +841,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
/**
* @name isBonded (Android)
* @param params.address
* Determine whether the device is bonded or not, or error if not initialized. Android support only.
* @param {{ address: string }} params
* @returns {Promise<BondedStatus>}
@ -839,6 +853,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
/**
* @name wasConnected
* @param params.address
* Determine whether the device was connected, or error if not initialized.
* @param {{ address: string }} params
* @returns {Promise<PrevConnectionStatus>}
@ -850,6 +865,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
/**
* @name isConnected
* @param params.address
* Determine whether the device is connected, or error if not initialized or never connected to device
* @param {{ address: string }} params
* @returns {Promise<CurrConnectionStatus>}
@ -861,6 +877,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
/**
* @name isDiscovered
* @param params.address
* Determine whether the device's characteristics and descriptors have been discovered, or error if not initialized or not connected to device.
* @param {{ address: string }} params
* @returns {Promise<DiscoverStatus>}
@ -926,6 +943,8 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
/**
* @name addService
* @param params.service
* @param params.characteristics
* Add a service with characteristics and descriptors. If more than one service is added, add them sequentially
* @param {{ service: string, characteristics: Characteristic[] }} params
* @returns {Promise<{ service: string, status: Status }>}
@ -940,6 +959,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
/**
* @name removeService
* @param params.service
* Remove a service
* @param {{ service: string }} params
* @returns {Promise<{ service: string, status: Status }>}
@ -1018,6 +1038,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
/**
* @name encodedStringToBytes
* @param value
* Helper function to convert a base64 encoded string from a characteristic or descriptor value into a uint8Array object
* @param {string} str
* @returns {Uint8Array}
@ -1029,6 +1050,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
/**
* @name bytesToEncodedString
* @param value
* Helper function to convert a unit8Array to a base64 encoded string for a characteric or descriptor write
* @param {Uint8Array} bytes
* @returns {string}

View File

@ -41,6 +41,7 @@ import { Observable } from 'rxjs';
export class BluetoothSerial extends AwesomeCordovaNativePlugin {
/**
* Connect to a Bluetooth device
*
* @param {string} macAddress_or_uuid Identifier of the remote device
* @returns {Observable<any>} Subscribe to connect, unsubscribe to disconnect.
*/
@ -55,6 +56,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
/**
* Connect insecurely to a Bluetooth device
*
* @param {string} macAddress Identifier of the remote device
* @returns {Observable<any>} Subscribe to connect, unsubscribe to disconnect.
*/
@ -69,6 +71,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
/**
* Disconnect from the connected device
*
* @returns {Promise<any>}
*/
@Cordova()
@ -78,6 +81,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
/**
* Writes data to the serial port
*
* @param {any} data ArrayBuffer of data
* @returns {Promise<any>} returns a promise when data has been written
*/
@ -90,6 +94,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
/**
* Gets the number of bytes of data available
*
* @returns {Promise<any>} returns a promise that contains the available bytes
*/
@Cordova({
@ -101,6 +106,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
/**
* Reads data from the buffer
*
* @returns {Promise<any>} returns a promise with data from the buffer
*/
@Cordova({
@ -112,6 +118,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
/**
* Reads data from the buffer until it reaches a delimiter
*
* @param {string} delimiter string that you want to search until
* @returns {Promise<any>} returns a promise
*/
@ -124,6 +131,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
/**
* Subscribe to be notified when data is received
*
* @param {string} delimiter the string you want to watch for
* @returns {Observable<any>} returns an observable.
*/
@ -138,6 +146,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
/**
* Subscribe to be notified when data is received
*
* @returns {Observable<any>} returns an observable
*/
@Cordova({
@ -151,6 +160,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
/**
* Clears data in buffer
*
* @returns {Promise<any>} returns a promise when completed
*/
@Cordova({
@ -162,6 +172,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
/**
* Lists bonded devices
*
* @returns {Promise<any>} returns a promise
*/
@Cordova({
@ -173,6 +184,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
/**
* Reports if bluetooth is enabled
*
* @returns {Promise<any>} returns a promise
*/
@Cordova({
@ -184,6 +196,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
/**
* Reports the connection status
*
* @returns {Promise<any>} returns a promise
*/
@Cordova({
@ -195,6 +208,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
/**
* Reads the RSSI from the connected peripheral
*
* @returns {Promise<any>} returns a promise
*/
@Cordova({
@ -206,6 +220,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
/**
* Show the Bluetooth settings on the device
*
* @returns {Promise<any>} returns a promise
*/
@Cordova({
@ -217,6 +232,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
/**
* Enable Bluetooth on the device
*
* @returns {Promise<any>} returns a promise
*/
@Cordova({
@ -228,6 +244,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
/**
* Discover unpaired devices
*
* @returns {Promise<any>} returns a promise
*/
@Cordova({
@ -239,6 +256,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
/**
* Subscribe to be notified on Bluetooth device discovery. Discovery process must be initiated with the `discoverUnpaired` function.
*
* @returns {Observable<any>} Returns an observable
*/
@Cordova({
@ -252,6 +270,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
/**
* Sets the human readable device name that is broadcasted to other devices
*
* @param {string} newName Desired name of device
*/
@Cordova({
@ -262,6 +281,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
/**
* Makes the device discoverable by other devices
*
* @param {number} discoverableDuration Desired number of seconds device should be discoverable for
*/
@Cordova({

View File

@ -51,7 +51,6 @@ export interface BranchUniversalObject {
* @name BranchIo
* @description
* Branch.io is an attribution service for deeplinking and invitation links
*
* @usage
* ```
* import { BranchIo } from '@awesome-cordova-plugins/branch-io/ngx';
@ -60,13 +59,11 @@ export interface BranchUniversalObject {
* constructor(private branch: BranchIo) { }
*
* ```
*
* @interfaces
* BranchIoPromise
* BranchIoAnalytics
* BranchIoProperties
* BranchUniversalObject
*
*/
@Plugin({
pluginName: 'BranchIo',
@ -79,8 +76,9 @@ export interface BranchUniversalObject {
export class BranchIo extends AwesomeCordovaNativePlugin {
/**
* for development and debugging only
*
* @param {boolean} enable Enable debug
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({ otherPromise: true })
setDebug(enable: boolean): Promise<any> {
@ -89,8 +87,9 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
/**
* Disable tracking
*
* @param {boolean} disable disable tracking
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({ otherPromise: true })
disableTracking(disable: boolean): Promise<any> {
@ -99,7 +98,8 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
/**
* Initializes Branch
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova({ otherPromise: true })
initSession(): Promise<BranchIoPromise> {
@ -108,7 +108,8 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
/**
* Initializes Branch with callback
* @return {Observable<any>}
*
* @returns {Observable<any>}
*/
@Cordova({ observable: true })
initSessionWithCallback(): Observable<BranchIoPromise> {
@ -117,7 +118,8 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
/**
* Set Request Metadata
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova({ otherPromise: true })
setRequestMetadata(): Promise<any> {
@ -126,8 +128,9 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
/**
* for better Android matching
*
* @param {string} linkDomain LinkDomain at branch
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({ otherPromise: true })
setCookieBasedMatching(linkDomain: string): Promise<any> {
@ -136,7 +139,8 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
/**
* First data
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova({ otherPromise: true })
getFirstReferringParams(): Promise<any> {
@ -145,7 +149,8 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
/**
* Latest data
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova({ otherPromise: true })
getLatestReferringParams(): Promise<any> {
@ -154,8 +159,9 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
/**
* Set identy of user
*
* @param {string} userId
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({ otherPromise: true })
setIdentity(userId: string): Promise<any> {
@ -164,7 +170,8 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
/**
* Logout user
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova({ otherPromise: true })
logout(): Promise<any> {
@ -173,9 +180,10 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
/**
* Registers a custom event
*
* @param {string} eventName
* @param {any} metaData
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({ otherPromise: true })
userCompletedAction(eventName: string, metaData: any): Promise<any> {
@ -184,10 +192,11 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
/**
* Send Commerce Event
*
* @deprecated since v.3.1.0. As of https://help.branch.io/developers-hub/docs/cordova-phonegap-ionic#track-commerce
* @param {string} event
* @param {any} metaData
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({ otherPromise: true })
sendCommerceEvent(event: string, metaData: any): Promise<any> {
@ -196,9 +205,10 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
/**
* Send Branch Event
*
* @param {string} event
* @param {any} metaData
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({ otherPromise: true })
sendBranchEvent(event: string, metaData: any): Promise<any> {
@ -207,8 +217,9 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
/**
* create a branchUniversalObj variable to reference with other Branch methods
*
* @param {BranchIoProperties} properties
* @return {Promise<BranchUniversalObject>}
* @returns {Promise<BranchUniversalObject>}
*/
@Cordova({ otherPromise: true })
createBranchUniversalObject(properties: BranchIoProperties): Promise<BranchUniversalObject> {
@ -217,8 +228,9 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
/**
* Load credits
*
* @param {any} bucket
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({ otherPromise: true })
loadRewards(bucket: any): Promise<any> {
@ -227,9 +239,10 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
/**
* Redeem Rewards
*
* @param {string} value
* @param {any} bucket
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({ otherPromise: true })
redeemRewards(value: string, bucket: any): Promise<any> {
@ -238,7 +251,8 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
/**
* Show credit history
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova({ otherPromise: true })
creditHistory(): Promise<any> {

View File

@ -20,7 +20,6 @@ export type EventData = object | AndroidData | null;
* @name Broadcaster
* @description
* This plugin adds exchanging events between native code and your app.
*
* @usage
* ```typescript
* import { Broadcaster } from '@awesome-cordova-plugins/broadcaster/ngx';
@ -48,9 +47,10 @@ export type EventData = object | AndroidData | null;
export class Broadcaster extends AwesomeCordovaNativePlugin {
/**
* This function listen to an event sent from the native code
*
* @param {string} eventName
* @param {boolean} isGlobal Valid only for Android. It allows to listen for global messages(i.e. intents)
* @return {Observable<any>} Returns an observable to watch when an event is received
* @returns {Observable<any>} Returns an observable to watch when an event is received
*/
@Cordova({
observable: true,
@ -63,13 +63,14 @@ export class Broadcaster extends AwesomeCordovaNativePlugin {
/**
* This function sends data to the native code
*
* @param {string} eventName
* @param {boolean} isGlobalOrEventData means that message is global (valid only on Android)
* @param {AndroidData} isGlobalOrEventData allows to specify 'flags` and 'category' (valid only on Android)
* @param {object} isGlobalOrEventData allows to specify a generic object containing custom event data (all platform)
* @param {AndroidData} [data] if isGlobal is set, allows to specify 'flags` and 'category' if isGlobal is set (valid only on Android)
* @param {object} [data] if isGlobal is set, allows to specify a generic object containing custom event data (all platform)
* @return {Promise<any>} Returns a promise that resolves when an event is successfully fired
* @returns {Promise<any>} Returns a promise that resolves when an event is successfully fired
*/
@Cordova()
fireNativeEvent(eventName: string, isGlobalOrEventData: boolean | EventData, data?: EventData): Promise<any> {

View File

@ -5,7 +5,6 @@ import { Plugin, CordovaProperty, AwesomeCordovaNativePlugin } from '@awesome-co
* @name Build Info
* @description
* This plugin provides build information.
*
* @usage
* ```
* import { BuildInfo } from '@awesome-cordova-plugins/build-info/ngx';

View File

@ -63,8 +63,6 @@ export interface NameOrOptions {
* This plugin allows you to add events to the Calendar of the mobile device.
*
* Requires Cordova plugin: `cordova-plugin-calendar`. For more info, please see the [Calendar plugin docs](https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin).
*
*
* @usage
* ```typescript
* import { Calendar } from '@awesome-cordova-plugins/calendar/ngx';
@ -99,6 +97,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
* - You've already granted permission
*
* If this returns false, you should call the `requestReadWritePermission` function
*
* @returns {Promise<boolean>}
*/
@Cordova()
@ -108,6 +107,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
/**
* Check if we have read permission
*
* @returns {Promise<boolean>}
*/
@Cordova()
@ -117,6 +117,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
/**
* Check if we have write permission
*
* @returns {Promise<boolean>}
*/
@Cordova()
@ -126,6 +127,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
/**
* Request write permission
*
* @returns {Promise<any>}
*/
@Cordova()
@ -135,6 +137,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
/**
* Request read permission
*
* @returns {Promise<any>}
*/
@Cordova()
@ -144,6 +147,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
/**
* Requests read/write permissions
*
* @returns {Promise<any>}
*/
@Cordova()
@ -164,6 +168,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
/**
* Delete a calendar. (iOS only)
*
* @param {string} name Name of the calendar to delete.
* @returns {Promise<any>} Returns a Promise
*/
@ -175,7 +180,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
/**
* Returns the default calendar options.
*
* @return {CalendarOptions} Returns an object with the default calendar options
* @returns {CalendarOptions} Returns an object with the default calendar options
*/
@Cordova({
sync: true,
@ -187,7 +192,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
/**
* Returns options for a custom calender with specific color
*
* @return {NameOrOptions} Returns an object with the default options
* @returns {NameOrOptions} Returns an object with the default options
*/
@Cordova({
sync: true,
@ -198,6 +203,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
/**
* Silently create an event.
*
* @param {string} [title] The event title
* @param {string} [location] The event location
* @param {string} [notes] The event notes
@ -294,6 +300,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
/**
* Find an event with additional options.
*
* @param {string} [title] The event title
* @param {string} [location] The event location
* @param {string} [notes] The event notes
@ -330,6 +337,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
/**
* Get a list of all calendars.
*
* @returns {Promise<any>} A Promise that resolves with the list of calendars, or rejects with an error.
*/
@Cordova()
@ -339,6 +347,8 @@ export class Calendar extends AwesomeCordovaNativePlugin {
/**
* Get a list of all future events in the specified calendar. (iOS only)
*
* @param calendarName
* @returns {Promise<any>} Returns a Promise that resolves with the list of events, or rejects with an error.
*/
@Cordova({
@ -361,7 +371,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
* @param {string} [newNotes] The new event notes
* @param {Date} [newStartDate] The new event start date
* @param {Date} [newEndDate] The new event end date
* @return Returns a Promise
* @returns Returns a Promise
*/
@Cordova({
platforms: ['iOS'],
@ -396,7 +406,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
* @param {Date} [newEndDate] The new event end date
* @param {CalendarOptions} [filterOptions] Event Options, see `getCalendarOptions`
* @param {CalendarOptions} [newOptions] New event options, see `getCalendarOptions`
* @return Returns a Promise
* @returns Returns a Promise
*/
@Cordova({
platforms: ['iOS'],
@ -426,7 +436,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
* @param {string} [notes] The event notes
* @param {Date} [startDate] The event start date
* @param {Date} [endDate] The event end date
* @return Returns a Promise
* @returns Returns a Promise
*/
@Cordova()
deleteEvent(title?: string, location?: string, notes?: string, startDate?: Date, endDate?: Date): Promise<any> {
@ -442,7 +452,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
* @param {Date} [startDate] The event start date
* @param {Date} [endDate] The event end date
* @param {string} calendarName
* @return Returns a Promise
* @returns Returns a Promise
*/
@Cordova({
platforms: ['iOS'],
@ -463,7 +473,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
*
* @param {string} [id] The event id
* @param {Date} [fromDate] The date where it start deleting from
* @return Returns a Promise
* @returns Returns a Promise
*/
@Cordova()
deleteEventById(id: string, fromDate?: Date): Promise<any> {
@ -472,8 +482,9 @@ export class Calendar extends AwesomeCordovaNativePlugin {
/**
* Open the calendar at the specified date.
*
* @param {Date} date The date you want to open the calendar on
* @return {Promise<any>} Promise returns a promise
* @returns {Promise<any>} Promise returns a promise
*/
@Cordova()
openCalendar(date: Date): Promise<any> {

View File

@ -16,7 +16,6 @@ export interface CallDirectoryLog {
* @description
* This plugin can add phone numbers to an Callkit call directory extension. Call `reloadExtension` after using `addIdentification` and `removeIdentification`
* to process the changes in the call directory extension.
*
* @usage
* ```typescript
* import { CallDirectory } from '@awesome-cordova-plugins/call-directory/ngx';
@ -34,7 +33,6 @@ export interface CallDirectoryLog {
* .then(res: string) => console.log(res))
* .catch((error: any) => console.error(error));
* ```
*
* @Interfaces
* CallDirectoryItem
* CallDirectoryLog
@ -53,7 +51,8 @@ export interface CallDirectoryLog {
export class CallDirectory extends AwesomeCordovaNativePlugin {
/**
* Check if the call directory extension is available and enabled
* @return {Promise<boolean>} Returns a promise with result
*
* @returns {Promise<boolean>} Returns a promise with result
*/
@Cordova()
isAvailable(): Promise<boolean> {
@ -62,8 +61,9 @@ export class CallDirectory extends AwesomeCordovaNativePlugin {
/**
* Add identification numbers
*
* @param {CallDirectoryItem[]} items Set of numbers with labels
* @return {Promise<any>} Returns a promise that resolves when numbers are added
* @returns {Promise<any>} Returns a promise that resolves when numbers are added
*/
@Cordova()
addIdentification(items: CallDirectoryItem[]): Promise<any> {
@ -72,8 +72,9 @@ export class CallDirectory extends AwesomeCordovaNativePlugin {
/**
* Remove identification numbers
*
* @param {CallDirectoryItem[]} items Set of numbers with arbitrary label
* @return {Promise<any>} Returns a promise that resolves when numbers are removed
* @returns {Promise<any>} Returns a promise that resolves when numbers are removed
*/
@Cordova()
removeIdentification(items: CallDirectoryItem[]): Promise<any> {
@ -82,7 +83,8 @@ export class CallDirectory extends AwesomeCordovaNativePlugin {
/**
* Remove all items from call directory. Refreshes immediately.
* @return {Promise<any>} Returns a promise after refresh with message
*
* @returns {Promise<any>} Returns a promise after refresh with message
*/
@Cordova()
removeAllIdentification(): Promise<any> {
@ -91,7 +93,8 @@ export class CallDirectory extends AwesomeCordovaNativePlugin {
/**
* Get all numbers and labels in call directory
* @return {CallDirectoryItem[]} Returns a promise that resolves with an array of all items
*
* @returns {CallDirectoryItem[]} Returns a promise that resolves with an array of all items
*/
@Cordova()
getAllItems(): Promise<CallDirectoryItem[]> {
@ -100,7 +103,8 @@ export class CallDirectory extends AwesomeCordovaNativePlugin {
/**
* Reload extension to process queued changes
* @return {Promise<string>} Returns a promise after refresh with message
*
* @returns {Promise<string>} Returns a promise after refresh with message
*/
@Cordova()
reloadExtension(): Promise<string> {
@ -109,7 +113,8 @@ export class CallDirectory extends AwesomeCordovaNativePlugin {
/**
* Get log from plugin and call directory extension
* @return {Promise<CallDirectoryLog>} Returns a promise with an object of log messages
*
* @returns {Promise<CallDirectoryLog>} Returns a promise with an object of log messages
*/
@Cordova()
getLog(): Promise<CallDirectoryLog> {

View File

@ -5,8 +5,7 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
* @name Call Number
* @description
* Call a number directly from your Cordova/Ionic application.
* **NOTE**: The iOS Simulator (and maybe Android Simulators) do not provide access to the phone subsystem.
*
* NOTE**: The iOS Simulator (and maybe Android Simulators) do not provide access to the phone subsystem.
* @usage
* ```typescript
* import { CallNumber } from '@awesome-cordova-plugins/call-number/ngx';
@ -33,9 +32,10 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
export class CallNumber extends AwesomeCordovaNativePlugin {
/**
* Calls a phone number
*
* @param {string} numberToCall The phone number to call as a string
* @param {boolean} bypassAppChooser Set to true to bypass the app chooser and go directly to dialer
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({
callbackOrder: 'reverse',
@ -46,7 +46,8 @@ export class CallNumber extends AwesomeCordovaNativePlugin {
/**
* Check if call feature is available
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova()
isCallSupported(): Promise<any> {

View File

@ -60,7 +60,6 @@ export interface CameraPreviewPictureOptions {
* Showing camera preview in HTML
*
* Requires Cordova plugin: `https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview.git`. For more info, please see the [Cordova Camera Preview docs](https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview).
*
* @usage
* ```typescript
* import { CameraPreview, CameraPreviewPictureOptions, CameraPreviewOptions, CameraPreviewDimensions } from '@awesome-cordova-plugins/camera-preview/ngx';
@ -132,7 +131,6 @@ export interface CameraPreviewPictureOptions {
* this.cameraPreview.stopCamera();
*
* ```
*
* @interfaces
* CameraPreviewOptions
* CameraPreviewPictureOptions
@ -192,8 +190,9 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Starts the camera preview instance.
*
* @param {CameraPreviewOptions} options
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({
successIndex: 1,
@ -205,8 +204,9 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Starts the camera video instance.
*
* @param {any} options
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({
successIndex: 1,
@ -218,7 +218,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Stops the camera preview instance. (iOS & Android)
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova()
stopCamera(): Promise<any> {
@ -227,7 +228,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Stops the camera video instance. (iOS & Android)
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova()
stopRecordVideo(): Promise<any> {
@ -236,7 +238,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Switch from the rear camera and front camera, if available.
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova()
switchCamera(): Promise<any> {
@ -245,7 +248,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Hide the camera preview box.
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova()
hide(): Promise<any> {
@ -254,7 +258,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Show the camera preview box.
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova()
show(): Promise<any> {
@ -263,8 +268,9 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Take the picture (base64)
*
* @param {CameraPreviewPictureOptions} [options] size and quality of the picture to take
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({
successIndex: 1,
@ -276,8 +282,9 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Take a snapshot of preview window (size specified in startCamera options)
*
* @param {CameraPreviewPictureOptions} [options] quality of the picture to take
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({
successIndex: 1,
@ -290,9 +297,10 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
*
* Set camera color effect.
*
* @static
* @param {string} effect name : 'none' (iOS & Android), 'aqua' (Android), 'blackboard' (Android), 'mono' (iOS & Android), 'negative' (iOS & Android), 'posterize' (iOS & Android), 'sepia' (iOS & Android), 'solarize' (Android) or 'whiteboard' (Android)
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({
successIndex: 1,
@ -304,8 +312,9 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Set the zoom (Android)
*
* @param [zoom] {number} Zoom value
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({
successIndex: 1,
@ -317,7 +326,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Get the maximum zoom (Android)
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova()
getMaxZoom(): Promise<any> {
@ -326,7 +336,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Get current zoom (Android)
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova()
getZoom(): Promise<any> {
@ -335,8 +346,9 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Set the preview Size
*
* @param {CameraPreviewDimensions} [dimensions]
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({
successIndex: 1,
@ -348,7 +360,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Get focus mode
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova()
getFocusMode(): Promise<any> {
@ -357,8 +370,9 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Set the focus mode
*
* @param {string} [focusMode] 'fixed', 'auto', 'continuous-picture', 'continuous-video' (iOS & Android), 'edof', 'infinity', 'macro' (Android Only)
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({
successIndex: 1,
@ -370,7 +384,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Get supported focus modes
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova()
getSupportedFocusModes(): Promise<any> {
@ -379,7 +394,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Get the current flash mode
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova()
getFlashMode(): Promise<any> {
@ -388,8 +404,9 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Set the flash mode
*
* @param {string} [flashMode] 'off' (iOS & Android), 'on' (iOS & Android), 'auto' (iOS & Android), 'torch' (Android)
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({
successIndex: 1,
@ -401,7 +418,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Get supported flash modes
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova()
getSupportedFlashModes(): Promise<any> {
@ -410,7 +428,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Get supported picture sizes
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova()
getSupportedPictureSizes(): Promise<any> {
@ -419,7 +438,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Get exposure mode
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova()
getExposureMode(): Promise<any> {
@ -428,7 +448,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Get exposure modes
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova()
getExposureModes(): Promise<any> {
@ -437,8 +458,9 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Set exposure mode
*
* @param {string} [lock]
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({
successIndex: 1,
@ -450,7 +472,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Get exposure compensation (Android)
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova()
getExposureCompensation(): Promise<any> {
@ -459,8 +482,9 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Set exposure compensation (Android)
*
* @param {number} [exposureCompensation]
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({
successIndex: 1,
@ -472,7 +496,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Get exposure compensation range (Android)
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova()
getExposureCompensationRange(): Promise<any> {
@ -481,9 +506,10 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Set specific focus point. Note, this assumes the camera is full-screen.
*
* @param {number} xPoint
* @param {number} yPoint
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
tapToFocus(xPoint: number, yPoint: number): Promise<any> {
@ -492,7 +518,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Add a listener for the back event for the preview
* @return {Promise<any>} if back button pressed
*
* @returns {Promise<any>} if back button pressed
*/
@Cordova()
onBackButton(): Promise<any> {
@ -501,7 +528,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Return in use device camera fov
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova()
getHorizontalFOV(): Promise<any> {
@ -510,7 +538,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
/**
* Get the characteristics of all available cameras
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova()
getCameraCharacteristics(): Promise<any> {

View File

@ -136,7 +136,6 @@ export enum Direction {
* </config-file>
* ```
* inside of the <platform name='ios> section
*
* @usage
* ```typescript
* import { Camera, CameraOptions } from '@awesome-cordova-plugins/camera/ngx';
@ -243,6 +242,7 @@ export class Camera extends AwesomeCordovaNativePlugin {
/**
* Take a picture or video, or load one from the library.
*
* @param {CameraOptions} [options] Options that you want to pass to the camera. Encoding type, quality, etc. Platform-specific quirks are described in the [Cordova plugin docs](https://github.com/apache/cordova-plugin-camera#cameraoptions-errata-).
* @returns {Promise<any>} Returns a Promise that resolves with Base64 encoding of the image data, or the image file URI, depending on cameraOptions, otherwise rejects with an error.
*/
@ -256,6 +256,7 @@ export class Camera extends AwesomeCordovaNativePlugin {
/**
* Remove intermediate image files that are kept in temporary storage after calling camera.getPicture.
* Applies only when the value of Camera.sourceType equals Camera.PictureSourceType.CAMERA and the Camera.destinationType equals Camera.DestinationType.FILE_URI.
*
* @returns {Promise<any>}
*/
@Cordova({

View File

@ -145,7 +145,6 @@ export interface Phone {
* @name Checkout
* @description
* Checkout.com cordova plugin
*
* @usage
* ```typescript
* import { Checkout } from '@awesome-cordova-plugins/checkout/ngx';
@ -191,8 +190,9 @@ export interface Phone {
export class Checkout extends AwesomeCordovaNativePlugin {
/**
* Initialize Frames plugin in Sandbox mode
*
* @param publicKey {string} Merchant's sandbox public key
* @return {Promise<any>} Returns a promise that resolves when Frames initiation is completed
* @returns {Promise<any>} Returns a promise that resolves when Frames initiation is completed
*/
@Cordova()
initSandboxClient(publicKey: string): Promise<any> {
@ -201,8 +201,9 @@ export class Checkout extends AwesomeCordovaNativePlugin {
/**
* Initialize Frames plugin in Live mode
*
* @param publicKey {string} Merchant's live public key
* @return {Promise<any>} Returns a promise that resolves when Frames initiation is completed
* @returns {Promise<any>} Returns a promise that resolves when Frames initiation is completed
*/
@Cordova()
initLiveClient(publicKey: string): Promise<any> {
@ -211,8 +212,9 @@ export class Checkout extends AwesomeCordovaNativePlugin {
/**
* Exchange card details for a reference token that can be used later to request a card payment from your backend. Tokens are single use and expire after 15 minutes.
*
* @param ckoCardTokenRequest {CkoCardTokenRequest} Card tokenization request object
* @return {Promise<CkoCardTokenResponse>} Returns a promise that resolves when Token response object
* @returns {Promise<CkoCardTokenResponse>} Returns a promise that resolves when Token response object
*/
@Cordova()
generateToken(ckoCardTokenRequest: CkoCardTokenRequest): Promise<CkoCardTokenResponse> {

View File

@ -25,7 +25,6 @@ export interface ChooserResult {
* </edit-config>
* </platform>
* ```
*
* @usage
* ```typescript
* import { Chooser } from '@awesome-cordova-plugins/chooser/ngx';
@ -41,7 +40,6 @@ export interface ChooserResult {
* .catch((error: any) => console.error(error));
*
* ```
*
* @interfaces
* ChooserResult
*/
@ -56,8 +54,9 @@ export interface ChooserResult {
export class Chooser extends AwesomeCordovaNativePlugin {
/**
* Displays native prompt for user to select a file.
*
* @param {string} [accept] Optional MIME type filter (e.g. 'image/gif,video/*').
* @return {Promise<any>} Promise containing selected file's raw binary data,
* @returns {Promise<any>} Promise containing selected file's raw binary data,
* base64-encoded data: URI, MIME type, display name, and original URI.
*/
@Cordova()
@ -66,6 +65,7 @@ export class Chooser extends AwesomeCordovaNativePlugin {
}
/**
* Displays native prompt for user to select a file.
*
* @param {string} [accept] Optional MIME type filter (e.g. 'image/gif,video/*').
* @returns {Promise<any>} Promise containing selected file's MIME type, display name, and original URI.
* If user cancels, promise will be resolved as undefined.

View File

@ -1,13 +1,12 @@
import { Injectable } from '@angular/core';
import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core';
declare var clevertap: any;
declare let clevertap: any;
/**
* @name CleverTap
* @description
* Cordova Plugin that wraps CleverTap SDK for Android and iOS
*
* @usage
* ```typescript
* import { CleverTap } from '@awesome-cordova-plugins/clevertap/ngx';
@ -29,6 +28,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
* notify device ready
* NOTE: in iOS use to be notified of launch Push Notification or Deep Link
* in Android use only in android phonegap build projects
*
* @returns {Promise<any>}
*/
@Cordova()
@ -43,6 +43,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Personalization
* Enables the Personalization API
*
* @returns {Promise<any>}
*/
@Cordova()
@ -53,6 +54,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Personalization
* Disables the Personalization API
*
* @returns {Promise<any>}
*/
@Cordova()
@ -62,6 +64,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Enables tracking opt out for the currently active user.
*
* @param optOut {boolean}
* @returns {Promise<any>}
*/
@ -72,6 +75,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Sets CleverTap SDK to offline mode.
*
* @param offline {boolean}
* @returns {Promise<any>}
*/
@ -82,6 +86,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Enables the reporting of device network related information, including IP address. This reporting is disabled by default.
*
* @param enable {boolean}
* @returns {Promise<any>}
*/
@ -96,6 +101,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Registers for push notifications
*
* @returns {Promise<any>}
*/
@Cordova()
@ -105,6 +111,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Sets the device's push token
*
* @param token {string}
* @returns {Promise<any>}
*/
@ -115,6 +122,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Sets the device's Xiaomi push token
*
* @param token {string}
* @returns {Promise<any>}
*/
@ -125,6 +133,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Sets the device's Baidu push token
*
* @param token {string}
* @returns {Promise<any>}
*/
@ -135,6 +144,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Sets the device's Huawei push token
*
* @param token {string}
* @returns {Promise<any>}
*/
@ -145,6 +155,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Create Notification Channel for Android O+
*
* @param extras {any}
* @returns {Promise<any>}
*/
@ -155,6 +166,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Create Notification Channel for Android O+
*
* @param channelID {string}
* @param channelName {string}
* @param channelDescription {string}
@ -175,6 +187,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Create Notification Channel for Android O+
*
* @param channelID {string}
* @param channelName {string}
* @param channelDescription {string}
@ -197,6 +210,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Create Notification Channel with Group ID for Android O+
*
* @param channelID {string}
* @param channelName {string}
* @param channelDescription {string}
@ -220,12 +234,14 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Create Notification Channel with Group ID for Android O+
*
* @param channelID {string}
* @param channelName {string}
* @param channelDescription {string}
* @param importance {number}
* @param groupId {string}
* @param showBadge {boolean}
* @param sound
* @returns {Promise<any>}
*/
@Cordova()
@ -243,6 +259,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Create Notification Channel Group for Android O+
*
* @param groupID {string}
* @param groupName {string}
* @returns {Promise<any>}
@ -254,6 +271,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Delete Notification Channel for Android O+
*
* @param channelID {string}
* @returns {Promise<any>}
*/
@ -264,6 +282,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Delete Notification Group for Android O+
*
* @param groupID {string}
* @returns {Promise<any>}
*/
@ -278,6 +297,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Record Screen View
*
* @param screenName {string}
* @returns {Promise<any>}
*/
@ -288,6 +308,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Record Event with Name
*
* @param eventName {string}
* @returns {Promise<any>}
*/
@ -298,6 +319,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Record Event with Name and Event properties
*
* @param eventName {string}
* @param eventProps {any}
* @returns {Promise<any>}
@ -309,6 +331,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Record Charged Event with Details and Items
*
* @param details {any} object with transaction details
* @param items {any} array of items purchased
* @returns {Promise<any>}
@ -320,6 +343,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Get Event First Time
*
* @param eventName {string}
* callback returns epoch seconds or -1
* @returns {Promise<any>}
@ -331,6 +355,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Get Event Last Time
*
* @param eventName {string}
* callback returns epoch seconds or -1
* @returns {Promise<any>}
@ -342,6 +367,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Get Event Number of Occurrences
*
* @param eventName {string}
* calls back with int or -1
* @returns {Promise<any>}
@ -353,6 +379,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Get Event Details
*
* @param eventName {string}
* calls back with object {"eventName": <string>, "firstTime":<epoch seconds>, "lastTime": <epoch seconds>, "count": <int>} or empty object
* @returns {Promise<any>}
@ -365,6 +392,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Get Event History
* calls back with object {"eventName1":<event1 details object>, "eventName2":<event2 details object>}
*
* @returns {Promise<any>}
*/
@Cordova()
@ -389,6 +417,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
* for, among other things, more fine-grained geo-targeting and segmentation purposes.
* Note: on iOS the call to CleverTapSDK must be made on the main thread due to LocationManager restrictions, but the CleverTapSDK method itself is non-blocking.
* calls back with {lat:lat, lon:lon} lat and lon are floats
*
* @returns {Promise<any>}
*/
@Cordova()
@ -398,6 +427,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Set location
*
* @param lat {number}
* @param lon {number}
* @returns {Promise<any>}
@ -424,6 +454,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
* and data relating to the old user removed, and a new session is started
* for the new user and data for that user refreshed via a network call to CleverTap.
* In addition, any global frequency caps are reset as part of the switch.
*
* @param profile {any} object
* @returns {Promise<any>}
*/
@ -434,6 +465,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Set profile attributes
*
* @param profile {any} object
* @returns {Promise<any>}
*/
@ -444,6 +476,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Set profile attributes from facebook user
*
* @param profile {any} facebook graph user object
* @returns {Promise<any>}
*/
@ -454,6 +487,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Set profile attributes rom google plus user
*
* @param profile {any} google plus user object
* @returns {Promise<any>}
*/
@ -464,6 +498,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Get User Profile Property
*
* @param propertyName {string}
* calls back with value of propertyName or false
* @returns {Promise<any>}
@ -476,6 +511,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Get a unique CleverTap identifier suitable for use with install attribution providers.
* calls back with unique CleverTap attribution identifier
*
* @returns {Promise<any>}
*/
@Cordova()
@ -486,6 +522,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Get User Profile CleverTapID
* calls back with CleverTapID or false
*
* @returns {Promise<any>}
*/
@Cordova()
@ -495,6 +532,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Remove the property specified by key from the user profile
*
* @param key {string}
* @returns {Promise<any>}
*/
@ -505,6 +543,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Method for setting a multi-value user profile property
*
* @param key {string}
* @param values {any} array of strings
* @returns {Promise<any>}
@ -516,6 +555,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Method for adding a value to a multi-value user profile property
*
* @param key {string}
* @param value {string}
* @returns {Promise<any>}
@ -527,6 +567,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Method for adding values to a multi-value user profile property
*
* @param key {string}
* @param values {any} array of strings
* @returns {Promise<any>}
@ -538,6 +579,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Method for removing a value from a multi-value user profile property
*
* @param key {string}
* @param value {string}
* @returns {Promise<any>}
@ -549,6 +591,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Method for removing a value from a multi-value user profile property
*
* @param key {string}
* @param values {any} array of strings
* @returns {Promise<any>}
@ -565,6 +608,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Get Session Elapsed Time
* calls back with seconds
*
* @returns {Promise<any>}
*/
@Cordova()
@ -575,6 +619,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Get Session Total Visits
* calls back with with int or -1
*
* @returns {Promise<any>}
*/
@Cordova()
@ -585,6 +630,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Get Session Screen Count
* calls back with with int
*
* @returns {Promise<any>}
*/
@Cordova()
@ -595,6 +641,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Get Session Previous Visit Time
* calls back with with epoch seconds or -1
*
* @returns {Promise<any>}
*/
@Cordova()
@ -605,6 +652,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Get Sesssion Referrer UTM details
* object {"source": <string>, "medium": <string>, "campaign": <string>} or empty object
*
* @returns {Promise<any>}
*/
@Cordova()
@ -614,6 +662,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to manually track the utm details for an incoming install referrer
*
* @param source {string}
* @param medium {string}
* @param campaign {string}
@ -653,6 +702,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this method to open the App Inbox
*
* @param styleConfig : any or empty object
*/
@Cordova()
@ -662,6 +712,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Fetch all Inbox Messages
*
* @returns {Promise<any>}
*/
@Cordova()
@ -671,6 +722,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Fetch all Unread Inbox Messages
*
* @returns {Promise<any>}
*/
@Cordova()
@ -680,6 +732,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Fetch Inbox Message For Id
*
* @param messageId {string}
* @returns {Promise<any>}
*/
@ -690,6 +743,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Delete Inbox Message For Id
*
* @param messageId {string}
* @returns {Promise<any>}
*/
@ -700,6 +754,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Mark Read Inbox Message For Id
*
* @param messageId {string}
* @returns {Promise<any>}
*/
@ -710,6 +765,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Mark Push Inbox Notification Viewed Event for Id
*
* @param messageId {string}
* @returns {Promise<any>}
*/
@ -720,6 +776,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Mark Push Inbox Notification Clicked Event for Id
*
* @param messageId {string}
* @returns {Promise<any>}
*/
@ -730,6 +787,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to SetUIEditor Connection
*
* @param enabled {boolean}
* @returns {Promise<any>}
*/
@ -740,6 +798,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Register Boolean Variable
*
* @param varName {string}
* @returns {Promise<any>}
*/
@ -750,6 +809,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Register Double Variable
*
* @param varName {string}
* @returns {Promise<any>}
*/
@ -760,6 +820,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Register Integer Variable
*
* @param varName {string}
* @returns {Promise<any>}
*/
@ -770,6 +831,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Register String Variable
*
* @param varName {string}
* @returns {Promise<any>}
*/
@ -780,6 +842,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Register List of Boolean Variable
*
* @param varName {string}
* @returns {Promise<any>}
*/
@ -790,6 +853,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Register List of Double Variable
*
* @param varName {string}
* @returns {Promise<any>}
*/
@ -800,6 +864,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Register List of Integer Variable
*
* @param varName {string}
* @returns {Promise<any>}
*/
@ -810,6 +875,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Register List of String Variable
*
* @param varName {string}
* @returns {Promise<any>}
*/
@ -820,6 +886,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Register Map of Boolean Variable
*
* @param varName {string}
* @returns {Promise<any>}
*/
@ -830,6 +897,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Register Map of Double Variable
*
* @param varName {string}
* @returns {Promise<any>}
*/
@ -840,6 +908,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Register Map of Integer Variable
*
* @param varName {string}
* @returns {Promise<any>}
*/
@ -850,6 +919,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Register Map of String Variable
*
* @param varName {string}
* @returns {Promise<any>}
*/
@ -860,6 +930,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Get Boolean Variable
*
* @param varName {string}
* @param defaultValue {boolean}
* @returns {Promise<any>}
@ -871,6 +942,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Get Double Variable
*
* @param varName {string}
* @param defaultValue {number}
* @returns {Promise<any>}
@ -882,6 +954,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Get Integer Variable
*
* @param varName {string}
* @param defaultValue {number}
* @returns {Promise<any>}
@ -893,6 +966,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Get String Variable
*
* @param varName {string}
* @param defaultValue {string}
* @returns {Promise<any>}
@ -904,6 +978,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Get List of Boolean Variable
*
* @param varName {string}
* @param defaultValue {any}
* @returns {Promise<any>}
@ -915,6 +990,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Get List of Double Variable
*
* @param varName {string}
* @param defaultValue {any}
* @returns {Promise<any>}
@ -926,6 +1002,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Get List of Integer Variable
*
* @param varName {string}
* @param defaultValue {any}
* @returns {Promise<any>}
@ -937,6 +1014,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Get List of String Variable
*
* @param varName {string}
* @param defaultValue {any}
* @returns {Promise<any>}
@ -948,6 +1026,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to get Map of Boolean Variable
*
* @param varName {string}
* @param defaultValue {any}
* @returns {Promise<any>}
@ -959,6 +1038,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Get Map of Double Variable
*
* @param varName {string}
* @param defaultValue {any}
* @returns {Promise<any>}
@ -970,6 +1050,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Get Map of Integer Variable
*
* @param varName {string}
* @param defaultValue {any}
* @returns {Promise<any>}
@ -981,6 +1062,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Get Map of String Variable
*
* @param varName {string}
* @param defaultValue {any}
* @returns {Promise<any>}
@ -992,6 +1074,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Get All Display Units
*
* @returns {Promise<any>}
*/
@Cordova()
@ -1001,6 +1084,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Get Display Unit For Id
*
* @param id {string}
* @returns {Promise<any>}
*/
@ -1011,6 +1095,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Push DisplayUnit Viewed Event for ID
*
* @param id {string}
* @returns {Promise<any>}
*/
@ -1021,6 +1106,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Push DisplayUnit Clicked Event for ID
*
* @param id {string}
* @returns {Promise<any>}
*/
@ -1031,6 +1117,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Get Feature Flag for key
*
* @param key {string}
* @param defaultValue {string}
* @returns {Promise<any>}
@ -1042,6 +1129,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Set Defaults for Product Config
*
* @param defaults {any}
* @returns {Promise<any>}
*/
@ -1052,6 +1140,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this for Product Config Fetch
*
* @param defaults {any}
* @returns {Promise<any>}
*/
@ -1062,6 +1151,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this for Product Config Fetch with Min Interval
*
* @param timeInterval {number}
* @returns {Promise<any>}
*/
@ -1072,6 +1162,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this for Product Config Activate
*
* @returns {Promise<any>}
*/
@Cordova()
@ -1081,6 +1172,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this for Product Config Fetch and Activate
*
* @returns {Promise<any>}
*/
@Cordova()
@ -1090,6 +1182,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to set Product Config Fetch with Min Interval
*
* @param timeInterval {number}
* @returns {Promise<any>}
*/
@ -1100,6 +1193,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Get Last Fetch Time Interval
*
* @returns {Promise<any>}
*/
@Cordova()
@ -1109,6 +1203,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Get String
*
* @param key {string}
* @returns {Promise<any>}
*/
@ -1119,6 +1214,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Get Boolean
*
* @param key {string}
* @returns {Promise<any>}
*/
@ -1129,6 +1225,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Get Long
*
* @param key {string}
* @returns {Promise<any>}
*/
@ -1139,6 +1236,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Get Double
*
* @param key {string}
* @returns {Promise<any>}
*/
@ -1149,6 +1247,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
/**
* Call this to Reset Product Config
*
* @returns {Promise<any>}
*/
@Cordova()
@ -1161,6 +1260,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
******************/
/**
* 0 is off, 1 is info, 2 is debug, default is 1
*
* @param level {number}
* @returns {Promise<any>}
*/

View File

@ -5,8 +5,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
* @premier clipboard
* @description
* Clipboard management plugin for Cordova that supports iOS, Android, and Windows Phone 8.
*
*
* @usage
* ```typescript
* import { Clipboard } from '@awesome-cordova-plugins/clipboard/ngx';
@ -41,6 +39,7 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
export class Clipboard extends AwesomeCordovaNativePlugin {
/**
* Copies the given text
*
* @param {string} text Text that gets copied on the system clipboard
* @returns {Promise<any>} Returns a promise after the text has been copied
*/
@ -51,6 +50,7 @@ export class Clipboard extends AwesomeCordovaNativePlugin {
/**
* Pastes the text stored in clipboard
*
* @returns {Promise<any>} Returns a promise after the text has been pasted
*/
@Cordova()
@ -60,6 +60,7 @@ export class Clipboard extends AwesomeCordovaNativePlugin {
/**
* Clear the text stored in clipboard
*
* @returns {Promise<any>} Returns a promise after the text has been cleaned
*/
@Cordova()

View File

@ -5,7 +5,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
* @name Cloud Settings
* @description
* Stores app settings in cloud storage so if the user re-installs the app or installs it on a different device, the settings will be restored and available in the new installation.
*
* @usage
* ```typescript
* import { CloudSettings } from '@awesome-cordova-plugins/cloud-settings/ngx';
@ -41,7 +40,8 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
export class CloudSettings extends AwesomeCordovaNativePlugin {
/**
* Indicates if any stored cloud settings currently exist for the current user.
* @return {Promise<boolean>} Will be passed a boolean flag which indicates whether an store settings exist for the user.
*
* @returns {Promise<boolean>} Will be passed a boolean flag which indicates whether an store settings exist for the user.
*/
@Cordova()
exists(): Promise<boolean> {
@ -50,10 +50,11 @@ export class CloudSettings extends AwesomeCordovaNativePlugin {
/**
* Saves the settings to cloud backup.
*
* @param {object} settings - a JSON structure representing the user settings to save to cloud backup.
* @param {boolean} [overwrite] - (optional) if true, existing settings will be replaced rather than updated. Defaults to false.
* If false, existing settings will be merged with the new settings passed to this function.
* @return {Promise<any>} Will be passed a single object argument which contains the saved settings as a JSON object.
* @returns {Promise<any>} Will be passed a single object argument which contains the saved settings as a JSON object.
*/
@Cordova({
successIndex: 1,
@ -65,7 +66,8 @@ export class CloudSettings extends AwesomeCordovaNativePlugin {
/**
* Loads the current settings.
* @return {Promise<any>} Will be passed a single object argument which contains the saved settings as a JSON object.
*
* @returns {Promise<any>} Will be passed a single object argument which contains the saved settings as a JSON object.
*/
@Cordova()
load(): Promise<any> {
@ -74,6 +76,7 @@ export class CloudSettings extends AwesomeCordovaNativePlugin {
/**
* Registers a function which will be called if/when settings on the device have been updated from the cloud.
*
* @param {Function} handler - callback function to invoke when device settings have been updated from the cloud.
*/
@Cordova({ sync: true })
@ -81,7 +84,8 @@ export class CloudSettings extends AwesomeCordovaNativePlugin {
/**
* Outputs verbose log messages from the native plugin components to the JS console.
* @return {Promise<void>}
*
* @returns {Promise<void>}
*/
@Cordova()
enableDebug(): Promise<void> {

View File

@ -249,7 +249,6 @@ interface CodePushCordovaPlugin {
* The callback will be called only once, and the possible statuses are defined by the SyncStatus enum.
* @param {SyncOptions} [syncOptions] Optional SyncOptions parameter configuring the behavior of the sync operation.
* @param {SuccessCallback<DownloadProgress>} [downloadProgress] Optional callback invoked during the download process. It is called several times with one DownloadProgress parameter.
*
*/
sync(
syncCallback?: SuccessCallback<SyncStatus>,
@ -441,7 +440,6 @@ export interface DownloadProgress {
* CodePush plugin for Cordova by Microsoft that supports iOS and Android.
*
* For more info, please see https://github.com/Dellos7/example-cordova-code-push-plugin
*
* @usage
* ```typescript
* import { CodePush } from '@awesome-cordova-plugins/code-push/ngx';
@ -481,6 +479,7 @@ export class CodePush extends AwesomeCordovaNativePlugin {
/**
* Gets the pending package information, if any. A pending package is one that has been installed but the application still runs the old code.
* This happens only after a package has been installed using ON_NEXT_RESTART or ON_NEXT_RESUME mode, but the application was not restarted/resumed yet.
*
* @returns {Promise<ILocalPackage>}
*/
@Cordova()
@ -516,6 +515,7 @@ export class CodePush extends AwesomeCordovaNativePlugin {
/**
* Reloads the application. If there is a pending update package installed using ON_NEXT_RESTART or ON_NEXT_RESUME modes, the update
* will be immediately visible to the user. Otherwise, calling this function will simply reload the current version of the application.
*
* @returns {Promise<void>}
*/
@Cordova()
@ -541,7 +541,6 @@ export class CodePush extends AwesomeCordovaNativePlugin {
* @param {SyncOptions} [syncOptions] Optional SyncOptions parameter configuring the behavior of the sync operation.
* @param {SuccessCallback<DownloadProgress>} [downloadProgress] Optional callback invoked during the download process. It is called several times with one DownloadProgress parameter.
* @returns {Observable<SyncStatus>}
*
*/
@Cordova({
observable: true,

View File

@ -12,7 +12,6 @@ import {
* @name CustomUISDK
* @description
* This plugin is used to access Paytm's native CustomUISDK framework's apis.
*
* @usage
* ```typescript
* import { CustomUISDK } from '@awesome-cordova-plugins/custom-uisdk/ngx';
@ -38,9 +37,10 @@ import {
export class CustomUISDK extends AwesomeCordovaNativePlugin {
/**
* This function show dialog to ask user permision to fetch authcode
*
* @param clientId {string} unique id give to each merchant
* @param mid {string} merchant id
* @return {Promise<string>} Returns authcode
* @returns {Promise<string>} Returns authcode
*/
@Cordova()
fetchAuthCode(clientId: string, mid: string): Promise<string> {
@ -49,7 +49,8 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
/**
* This function check that paytm app is installed or not
* @return {Promise<boolean>} Returns installed - true or not -false
*
* @returns {Promise<boolean>} Returns installed - true or not -false
*/
@Cordova()
isPaytmAppInstalled(): Promise<boolean> {
@ -58,7 +59,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
/**
* @param mid {string} merchant id
* @return {Promise<boolean>} Returns if has payment methods - true or not -false
* @returns {Promise<boolean>} Returns if has payment methods - true or not -false
*/
@Cordova()
checkHasInstrument(mid: string): Promise<boolean> {
@ -87,7 +88,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
/**
* @param paymentFlow {string} payment type NONE, ADDANDPAY
* @return {Promise<any>} Returns object of response
* @returns {Promise<any>} Returns object of response
*/
@Cordova()
goForWalletTransaction(paymentFlow: string): Promise<any> {
@ -95,7 +96,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
}
/**
* @return {Promise<any>} Returns object of response
* @returns {Promise<any>} Returns object of response
*/
@Cordova()
appInvoke(): Promise<any> {
@ -113,7 +114,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
* @param emiChannelId {string} emi plan id
* @param authMode {string} authentication mode 'otp' 'pin'
* @param saveCard {boolean} save card for next time
* @return {Promise<any>} Returns object of response
* @returns {Promise<any>} Returns object of response
*/
@Cordova()
goForNewCardTransaction(
@ -140,7 +141,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
* @param issuingBankCode {string} issuing bank code
* @param emiChannelId {string} emi plan id
* @param authMode {string} authentication mode 'otp' 'pin'
* @return {Promise<any>} Returns object of response
* @returns {Promise<any>} Returns object of response
*/
@Cordova()
goForSavedCardTransaction(
@ -159,7 +160,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
/**
* @param netBankingCode {string} bank channel code
* @param paymentFlow {string} payment type NONE, ADDANDPAY
* @return {Promise<any>} Returns object of response
* @returns {Promise<any>} Returns object of response
*/
@Cordova()
goForNetBankingTransaction(netBankingCode: string, paymentFlow: string): Promise<any> {
@ -170,7 +171,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
* @param upiCode {string} upi code
* @param paymentFlow {string} payment type NONE, ADDANDPAY
* @param saveVPA {boolean} save vpa for future transaction
* @return {Promise<any>} Returns object of response
* @returns {Promise<any>} Returns object of response
*/
@Cordova()
goForUpiCollectTransaction(upiCode: string, paymentFlow: string, saveVPA: boolean): Promise<any> {
@ -178,7 +179,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
}
/**
* @return {Promise<any>} Returns upi app list names
* @returns {Promise<any>} Returns upi app list names
*/
@Cordova()
getUpiIntentList(): Promise<any> {
@ -188,7 +189,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
/**
* @param appName {string} upi app name
* @param paymentFlow {string} payment type NONE, ADDANDPAY
* @return {Promise<any>} Returns object of response
* @returns {Promise<any>} Returns object of response
*/
@Cordova()
goForUpiIntentTransaction(appName: string, paymentFlow: string): Promise<any> {
@ -200,7 +201,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
* @param paymentFlow {string} payment type NONE, ADDANDPAY
* @param bankAccountJson {{}} bank account json object
* @param merchantDetailsJson {{}} merchant detail json
* @return {Promise<any>} Returns object of response
* @returns {Promise<any>} Returns object of response
*/
@Cordova()
goForUpiPushTransaction(
@ -215,7 +216,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
/**
* @param vpaName {string} vpa name
* @param bankAccountJson {{}} bank account json object
* @return {Promise<any>} Returns object of response
* @returns {Promise<any>} Returns object of response
*/
@Cordova()
fetchUpiBalance(bankAccountJson: {}, vpaName: string): Promise<any> {
@ -225,7 +226,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
/**
* @param vpaName {string} vpa name
* @param bankAccountJson {{}} bank account json object
* @return {Promise<any>} Returns object of response
* @returns {Promise<any>} Returns object of response
*/
@Cordova()
setUpiMpin(bankAccountJson: {}, vpaName: string): Promise<any> {
@ -238,7 +239,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
* @param token {string} token fetch from api
* @param mid {string} merchant id
* @param referenceId {string} reference id
* @return {Promise<any>} Returns object of response
* @returns {Promise<any>} Returns object of response
*/
@Cordova()
getBin(cardSixDigit: string, tokenType: string, token: string, mid: string, referenceId: string): Promise<any> {
@ -251,7 +252,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
* @param mid {string} merchant id
* @param orderId {string} order id required only if token type is TXN_TOKEN
* @param referenceId {string} reference id required only if token type is ACCESS
* @return {Promise<any>} Returns object of response
* @returns {Promise<any>} Returns object of response
*/
@Cordova()
fetchNBList(tokenType: string, token: string, mid: string, orderId: string, referenceId: string): Promise<any> {
@ -261,7 +262,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
/**
* @param channelCode {string} bank channel code
* @param cardType {string} card type debit or credit
* @return {Promise<any>} Returns object of response
* @returns {Promise<any>} Returns object of response
*/
@Cordova()
fetchEmiDetails(channelCode: string, cardType: string): Promise<any> {
@ -269,7 +270,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
}
/**
* @return {Promise<any>} Returns last successfully used net backing code
* @returns {Promise<any>} Returns last successfully used net backing code
*/
@Cordova()
@ -278,7 +279,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
}
/**
* @return {Promise<any>} Returns last successfully used vpa code
* @returns {Promise<any>} Returns last successfully used vpa code
*/
@Cordova()
@ -289,7 +290,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
/**
* @param clientId {string} unique id give to each merchant
* @param authCode {string} fetched auth code
* @return {Promise<any>} Returns last successfully used vpa code
* @returns {Promise<any>} Returns last successfully used vpa code
*/
@Cordova()
isAuthCodeValid(clientId: string, authCode: string): Promise<any> {
@ -297,7 +298,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
}
/**
* @return {Promise<any>} Returns current environment
* @returns {Promise<any>} Returns current environment
*/
@Cordova()
getEnvironment(): Promise<string> {

View File

@ -36,7 +36,6 @@ export interface DeeplinkOptions {
*
* Please read the [ionic plugin deeplinks docs](https://github.com/ionic-team/ionic-plugin-deeplinks) for iOS and Android integration.
* You must add `universal-links` to your `config.xml` and set up Apple App Site Association (AASA) for iOS and Asset Links for Android.
*
* @usage
* ```typescript
* import { Deeplinks } from '@awesome-cordova-plugins/deeplinks/ngx';
@ -78,7 +77,6 @@ export interface DeeplinkOptions {
*
* See the [Ionic Deeplinks Demo](https://github.com/ionic-team/ionic2-deeplinks-demo/blob/master/app/app.ts) for an example of how to
* retrieve the `NavController` reference at runtime.
*
* @interfaces
* DeeplinkMatch
*/
@ -125,11 +123,8 @@ export class Deeplinks extends AwesomeCordovaNativePlugin {
* paths takes an object of the form { 'path': data }. If a deeplink
* matches the path, the resulting path-data pair will be returned in the
* promise result which you can then use to navigate in the app as you see fit.
*
* @param {Object} paths
*
* @param {DeeplinkOptions} options
*
* @returns {Observable<DeeplinkMatch>} Returns an Observable that resolves each time a deeplink comes through, and
* errors if a deeplink comes through that does not match a given path.
*/

View File

@ -16,7 +16,6 @@ export interface AndroidAccount {
* @name Device Accounts
* @description
* Gets the Google accounts associated with the Android device
*
* @usage
* ```typescript
* import { DeviceAccounts } from '@awesome-cordova-plugins/device-accounts/ngx';
@ -44,6 +43,7 @@ export interface AndroidAccount {
export class DeviceAccounts extends AwesomeCordovaNativePlugin {
/**
* Gets all accounts registered on the Android Device
*
* @returns {Promise<AndroidAccount[]>}
*/
@Cordova()
@ -53,6 +53,7 @@ export class DeviceAccounts extends AwesomeCordovaNativePlugin {
/**
* Get all accounts registered on Android device for requested type
*
* @param {string} type
* @returns {Promise<AndroidAccount[]>}
*/
@ -63,6 +64,7 @@ export class DeviceAccounts extends AwesomeCordovaNativePlugin {
/**
* Get all emails registered on Android device (accounts with 'com.google' type)
*
* @returns {Promise<string[]>}
*/
@Cordova()
@ -72,6 +74,7 @@ export class DeviceAccounts extends AwesomeCordovaNativePlugin {
/**
* Get the first email registered on Android device
*
* @returns {Promise<string>}
*/
@Cordova()
@ -81,6 +84,7 @@ export class DeviceAccounts extends AwesomeCordovaNativePlugin {
/**
* Get permissions for access to email registered on Android device 8.0+
*
* @returns {Promise<string>}
*/
@Cordova()
@ -90,6 +94,7 @@ export class DeviceAccounts extends AwesomeCordovaNativePlugin {
/**
* Get permissions for access to email registered on Android device 8.0+ for requested type
*
* @param {string} type
* @returns {Promise<string>}
*/

View File

@ -35,7 +35,6 @@ export interface DeviceMotionAccelerometerOptions {
* @name Device Motion
* @description
* Requires Cordova plugin: `cordova-plugin-device-motion`. For more info, please see the [Device Motion docs](https://github.com/apache/cordova-plugin-device-motion).
*
* @usage
* ```typescript
* import { DeviceMotion, DeviceMotionAccelerationData } from '@awesome-cordova-plugins/device-motion/ngx';
@ -84,6 +83,7 @@ export interface DeviceMotionAccelerometerOptions {
export class DeviceMotion extends AwesomeCordovaNativePlugin {
/**
* Get the current acceleration along the x, y, and z axes.
*
* @returns {Promise<DeviceMotionAccelerationData>} Returns object with x, y, z, and timestamp properties
*/
@Cordova()
@ -93,6 +93,7 @@ export class DeviceMotion extends AwesomeCordovaNativePlugin {
/**
* Watch the device acceleration. Clear the watch by unsubscribing from the observable.
*
* @param {AccelerometerOptions} options list of options for the accelerometer.
* @returns {Observable<DeviceMotionAccelerationData>} Observable returns an observable that you can subscribe to
*/

View File

@ -40,7 +40,6 @@ export interface DeviceOrientationCompassOptions {
* @name Device Orientation
* @description
* Requires Cordova plugin: `cordova-plugin-device-orientation`. For more info, please see the [Device Orientation docs](https://github.com/apache/cordova-plugin-device-orientation).
*
* @usage
* ```typescript
* // DeviceOrientationCompassHeading is an interface for compass
@ -90,6 +89,7 @@ export interface DeviceOrientationCompassOptions {
export class DeviceOrientation extends AwesomeCordovaNativePlugin {
/**
* Get the current compass heading.
*
* @returns {Promise<DeviceOrientationCompassHeading>}
*/
@Cordova()
@ -101,6 +101,7 @@ export class DeviceOrientation extends AwesomeCordovaNativePlugin {
* Get the device current heading at a regular interval
*
* Stop the watch by unsubscribing from the observable
*
* @param {DeviceOrientationCompassOptions} [options] Options for compass. Frequency and Filter. Optional
* @returns {Observable<DeviceOrientationCompassHeading>} Returns an observable that contains the compass heading
*/

View File

@ -8,7 +8,6 @@ declare const window: any;
* @premier device
* @description
* Access information about the underlying device and platform.
*
* @usage
* ```typescript
* import { Device } from '@awesome-cordova-plugins/device/ngx';

View File

@ -23,7 +23,6 @@ export interface UpdateOptions {
* @name Dfu Update
* @description
* This plugin is a Wrapper to use Nordic Semiconductor's Device Firmware Update (DFU) service to update a Bluetooth LE device.
*
* @usage
* ```typescript
* import { DfuUpdate } from '@awesome-cordova-plugins/dfu-update/ngx';
@ -53,8 +52,9 @@ export interface UpdateOptions {
export class DfuUpdate extends AwesomeCordovaNativePlugin {
/**
* Start the Firmware-Update-Process
*
* @param options - Options for the process
* @return {Observable<any>} Returns a Observable that emits when something happens
* @returns {Observable<any>} Returns a Observable that emits when something happens
*/
@Cordova({
observable: true,

View File

@ -5,7 +5,6 @@ import { Cordova, CordovaProperty, AwesomeCordovaNativePlugin, Plugin } from '@a
* @name Diagnostic
* @description
* Checks whether device hardware features are enabled or available to the app, e.g. camera, GPS, wifi
*
* @usage
* ```typescript
* import { Diagnostic } from '@awesome-cordova-plugins/diagnostic/ngx';
@ -32,7 +31,6 @@ import { Cordova, CordovaProperty, AwesomeCordovaNativePlugin, Plugin } from '@a
* }).catch(e => console.error(e));
*
* ```
*
*/
@Plugin({
pluginName: 'Diagnostic',
@ -158,6 +156,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Checks if app is able to access device location.
*
* @returns {Promise<any>}
*/
@Cordova()
@ -168,6 +167,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Checks if Wifi is connected/enabled. On iOS this returns true if the device is connected to a network by WiFi. On Android and Windows 10 Mobile this returns true if the WiFi setting is set to enabled.
* On Android this requires permission. `<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />`
*
* @returns {Promise<any>}
*/
@Cordova()
@ -178,6 +178,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Checks if the device has a camera. On Android this returns true if the device has a camera. On iOS this returns true if both the device has a camera AND the application is authorized to use it. On Windows 10 Mobile this returns true if both the device has a rear-facing camera AND the
* application is authorized to use it.
*
* @param {boolean} [externalStorage] Android only: If true, checks permission for READ_EXTERNAL_STORAGE in addition to CAMERA run-time permission.
* cordova-plugin-camera@2.2+ requires both of these permissions. Defaults to true.
* @returns {Promise<any>}
@ -190,6 +191,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Checks if the device has Bluetooth capabilities and if so that Bluetooth is switched on (same on Android, iOS and Windows 10 Mobile)
* On Android this requires permission <uses-permission android:name="android.permission.BLUETOOTH" />
*
* @returns {Promise<any>}
*/
@Cordova()
@ -223,6 +225,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Returns true if the WiFi setting is set to enabled, and is the same as `isWifiAvailable()`
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android', 'Windows 10'] })
@ -233,6 +236,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Enables/disables WiFi on the device.
* Requires `ACCESS_WIFI_STATE` and `CHANGE_WIFI_STATE` permissions on Android
*
* @param {boolean} state
* @returns {Promise<any>}
*/
@ -244,6 +248,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Enables/disables Bluetooth on the device.
* Requires `BLUETOOTH` and `BLUETOOTH_ADMIN` permissions on Android
*
* @param {boolean} state
* @returns {Promise<any>}
*/
@ -256,6 +261,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Returns true if the device setting for location is on. On Android this returns true if Location Mode is switched on. On iOS this returns true if Location Services is switched on.
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
@ -266,6 +272,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Checks if the application is authorized to use location.
* Note for Android: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return GRANTED status as permissions are already granted at installation time.
*
* @returns {Promise<any>}
*/
@Cordova()
@ -275,6 +282,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Returns the location authorization status for the application.
*
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
@ -296,6 +304,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Checks if camera hardware is present on device.
*
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
@ -306,6 +315,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Checks if the application is authorized to use the camera.
* Note for Android: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return TRUE as permissions are already granted at installation time.
*
* @param {boolean} [externalStorage] Android only: If true, checks permission for READ_EXTERNAL_STORAGE in addition to CAMERA run-time permission.
* cordova-plugin-camera@2.2+ requires both of these permissions. Defaults to true.
* @returns {Promise<any>}
@ -317,6 +327,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Returns the camera authorization status for the application.
*
* @param {boolean} [externalStorage] Android only: If true, checks permission for READ_EXTERNAL_STORAGE in addition to CAMERA run-time permission.
* cordova-plugin-camera@2.2+ requires both of these permissions. Defaults to true.
* @returns {Promise<any>}
@ -328,6 +339,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Requests camera authorization for the application.
*
* @param {boolean} [externalStorage] Android only: If true, requests permission for READ_EXTERNAL_STORAGE in addition to CAMERA run-time permission.
* cordova-plugin-camera@2.2+ requires both of these permissions. Defaults to true.
* @returns {Promise<any>}
@ -339,6 +351,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Checks if the application is authorized to use the microphone.
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
@ -348,6 +361,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Returns the microphone authorization status for the application.
*
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
@ -357,6 +371,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Requests microphone authorization for the application.
*
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
@ -366,6 +381,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Checks if the application is authorized to use contacts (address book).
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
@ -375,6 +391,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Returns the contacts authorization status for the application.
*
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
@ -384,6 +401,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Requests contacts authorization for the application.
*
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
@ -399,6 +417,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
*
* Notes for iOS:
* - This relates to Calendar Events (not Calendar Reminders)
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
@ -445,6 +464,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
* Opens settings page for this app.
* On Android, this opens the "App Info" page in the Settings app.
* On iOS, this opens the app settings page in the Settings app. This works only on iOS 8+ - iOS 7 and below will invoke the errorCallback.
*
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
@ -454,6 +474,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Returns the state of Bluetooth on the device.
*
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
@ -463,6 +484,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Registers a function to be called when a change in Bluetooth state occurs.
*
* @param {Function} handler
*/
@Cordova({ platforms: ['Android', 'iOS'], sync: true })
@ -470,6 +492,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Registers a function to be called when a change in Location state occurs.
*
* @param {Function} handler
*/
@Cordova({ platforms: ['Android', 'iOS'], sync: true })
@ -480,6 +503,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Checks if high-accuracy locations are available to the app from GPS hardware.
* Returns true if Location mode is enabled and is set to "Device only" or "High accuracy" AND if the app is authorized to use location.
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
@ -492,6 +516,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
* Returns true if Location mode is enabled and is set to either:
* - Device only = GPS hardware only (high accuracy)
* - High accuracy = GPS hardware, network triangulation and Wifi network IDs (high and low accuracy)
*
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'] })
@ -502,6 +527,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Checks if low-accuracy locations are available to the app from network triangulation/WiFi access points.
* Returns true if Location mode is enabled and is set to "Battery saving" or "High accuracy" AND if the app is authorized to use location.
*
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'] })
@ -514,6 +540,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
* Returns true if Location mode is enabled and is set to either:
* - Battery saving = network triangulation and Wifi network IDs (low accuracy)
* - High accuracy = GPS hardware, network triangulation and Wifi network IDs (high and low accuracy)
*
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'] })
@ -523,6 +550,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Returns the current location mode setting for the device.
*
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'] })
@ -533,6 +561,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Returns the current authorization status for a given permission.
* Note: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return GRANTED status as permissions are already granted at installation time.
*
* @param permission
* @returns {Promise<any>}
*/
@ -544,6 +573,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Returns the current authorization status for multiple permissions.
* Note: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return GRANTED status as permissions are already granted at installation time.
*
* @param {any[]} permissions
* @returns {Promise<any>}
*/
@ -555,6 +585,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Requests app to be granted authorization for a runtime permission.
* Note: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will have no effect as the permissions are already granted at installation time.
*
* @param permission
* @returns {Promise<any>}
*/
@ -566,6 +597,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Requests app to be granted authorization for multiple runtime permissions.
* Note: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return GRANTED status as permissions are already granted at installation time.
*
* @param {any[]} permissions
* @returns {Promise<any>}
*/
@ -579,6 +611,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
* Note that only one request can be made concurrently because the native API cannot handle concurrent requests,
* so the plugin will invoke the error callback if attempting to make more than one simultaneous request.
* Multiple permission requests should be grouped into a single call since the native API is setup to handle batch requests of multiple permission groups.
*
* @returns {boolean}
*/
@Cordova({ sync: true })
@ -589,6 +622,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Registers a function to be called when a runtime permission request has completed.
* Pass in a falsy value to de-register the currently registered function.
*
* @param {Function} handler
*/
@Cordova({ sync: true })
@ -599,6 +633,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Checks if the device setting for Bluetooth is switched on.
* This requires `BLUETOOTH` permission on Android
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
@ -608,6 +643,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Checks if the device has Bluetooth capabilities.
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
@ -617,6 +653,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Checks if the device has Bluetooth Low Energy (LE) capabilities.
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
@ -626,6 +663,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Checks if the device supports Bluetooth Low Energy (LE) Peripheral mode.
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
@ -635,6 +673,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Checks if the application is authorized to use external storage.
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
@ -644,6 +683,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* CReturns the external storage authorization status for the application.
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
@ -653,6 +693,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Requests external storage authorization for the application.
*
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'] })
@ -695,6 +736,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Checks if NFC hardware is present on device.
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
@ -705,6 +747,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Checks if the device setting for NFC is switched on.
* Note: this operation does not require NFC permission in the manifest.
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
@ -715,6 +758,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Checks if NFC is available to the app. Returns true if the device has NFC capabilities AND if NFC setting is switched on.
* Note: this operation does not require NFC permission in the manifest.
*
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'] })
@ -724,7 +768,9 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Registers a function to be called when a change in NFC state occurs. Pass in a falsy value to de-register the currently registered function.
*
* @param {Function} hander callback function to be called when NFC state changes
* @param handler
* @returns {Promise<any>}
*/
@Cordova({
@ -735,6 +781,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Checks if the device data roaming setting is enabled.
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
@ -744,6 +791,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Checks if the device setting for ADB(debug) is switched on.
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
@ -753,6 +801,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Checks if the device is rooted.
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
@ -764,6 +813,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Checks if the application is authorized to use the Camera Roll in Photos app.
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['iOS'] })
@ -773,6 +823,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Returns the authorization status for the application to use the Camera Roll in Photos app.
*
* @returns {Promise<string>}
*/
@Cordova({ platforms: ['iOS'] })
@ -784,6 +835,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
* Requests camera roll authorization for the application.
* Should only be called if authorization status is NOT_REQUESTED.
* Calling it when in any other state will have no effect.
*
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['iOS'] })
@ -793,6 +845,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Checks if remote (push) notifications are enabled.
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['iOS', 'Android'] })
@ -802,6 +855,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Indicates if the app is registered for remote (push) notifications on the device.
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['iOS'] })
@ -812,6 +866,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Returns the authorization status for the application to use Remote Notifications.
* Note: Works on iOS 10+ only (iOS 9 and below will invoke the error callback).
*
* @returns {Promise<string>}
*/
@Cordova({ platforms: ['iOS'] })
@ -821,6 +876,9 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Requests reminders authorization for the application.
*
* @param types
* @param omitRegistration
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['iOS'] })
@ -831,6 +889,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Indicates the current setting of notification types for the app in the Settings app.
* Note: on iOS 8+, if "Allow Notifications" switch is OFF, all types will be returned as disabled.
*
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['iOS'] })
@ -840,6 +899,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Checks if the application is authorized to use reminders.
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['iOS'] })
@ -849,6 +909,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Returns the reminders authorization status for the application.
*
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['iOS'] })
@ -858,6 +919,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Requests reminders authorization for the application.
*
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['iOS'] })
@ -867,6 +929,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Checks if the application is authorized for background refresh.
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['iOS'] })
@ -876,6 +939,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Returns the background refresh authorization status for the application.
*
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['iOS'] })
@ -887,7 +951,8 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
* Requests Bluetooth authorization for the application.
*
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#requestbluetoothauthorization)
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['iOS'] })
requestBluetoothAuthorization(): Promise<any> {
@ -896,7 +961,8 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
/**
* Checks if motion tracking is available on the current device.
* @return {Promise<boolean>}
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['iOS'] })
isMotionAvailable(): Promise<boolean> {
@ -908,7 +974,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
* There's no direct way to determine if authorization was granted or denied, so the Pedometer API must be used to indirectly determine this:
* therefore, if the device supports motion tracking but not Pedometer Event Tracking, the outcome of requesting motion detection cannot be determined.
*
* @return {Promise<boolean>}
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['iOS'] })
isMotionRequestOutcomeAvailable(): Promise<boolean> {
@ -920,7 +986,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
*
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#requestmotionauthorization)
*
* @return {Promise<string>}
* @returns {Promise<string>}
*/
@Cordova({ platforms: ['iOS'] })
requestMotionAuthorization(): Promise<string> {
@ -932,7 +998,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
*
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#getmotionauthorizationstatus)
*
* @return {Promise<string>}
* @returns {Promise<string>}
*/
@Cordova({ platforms: ['iOS'] })
getMotionAuthorizationStatus(): Promise<string> {
@ -944,7 +1010,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
*
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#getlocationaccuracyauthorization)
*
* @return {Promise<string>}
* @returns {Promise<string>}
*/
@Cordova({ platform: ['iOS'] })
getLocationAccuracyAuthorization(): Promise<string> {
@ -956,7 +1022,8 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
*
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#requesttemporaryfullaccuracyauthorization)
*
* @return {Promise<string>}
* @param purpose
* @returns {Promise<string>}
*/
@Cordova({ platforms: ['iOS'] })
requestTemporaryFullAccuracyAuthorization(purpose: string): Promise<string> {
@ -967,6 +1034,8 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
* Registers a function to be called when a change in location accuracy authorization occurs on iOS 14+.
*
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#registerLocationAccuracyAuthorizationChangeHandler)
*
* @param handler
*/
@Cordova({ platforms: ['iOS'], sync: true })
registerLocationAccuracyAuthorizationChangeHandler(handler: Function): void {}

View File

@ -20,7 +20,6 @@ export interface DialogsPromptCallback {
* This plugin gives you ability to access and customize the device native dialogs.
*
* Requires Cordova plugin: `cordova-plugin-dialogs`. For more info, please see the [Dialogs plugin docs](https://github.com/apache/cordova-plugin-dialogs).
*
* @usage
* ```typescript
* import { Dialogs } from '@awesome-cordova-plugins/dialogs/ngx';
@ -49,6 +48,7 @@ export interface DialogsPromptCallback {
export class Dialogs extends AwesomeCordovaNativePlugin {
/**
* Shows a custom alert or dialog box.
*
* @param {string} message Dialog message.
* @param {string} [title] Dialog title. (Optional, defaults to Alert)
* @param {string} [buttonName] Button name. (Optional, defaults to OK)
@ -64,6 +64,7 @@ export class Dialogs extends AwesomeCordovaNativePlugin {
/**
* Displays a customizable confirmation dialog box.
*
* @param {string} message Dialog message.
* @param {string} [title] Dialog title. (Optional, defaults to Confirm)
* @param {string[]} [buttonLabels] Array of strings specifying button labels. (Optional, defaults to [OK,Cancel])
@ -79,6 +80,7 @@ export class Dialogs extends AwesomeCordovaNativePlugin {
/**
* Displays a native dialog box that is more customizable than the browser's prompt function.
*
* @param {string} [message] Dialog message.
* @param {string} [title] Dialog title. (Optional, defaults to Prompt)
* @param {string[]} [buttonLabels] Array of strings specifying button labels. (Optional, defaults to ["OK","Cancel"])
@ -100,6 +102,7 @@ export class Dialogs extends AwesomeCordovaNativePlugin {
/**
* The device plays a beep sound.
*
* @param {numbers} times The number of times to repeat the beep.
*/
@Cordova({

View File

@ -4,7 +4,6 @@ import { Injectable } from '@angular/core';
/**
* @name DNS
* @description A plugin for Apache Cordova that enables applications to manually resolve hostnames into an underlying network address. This is mostly useful for determining whether there is a problem with the device's DNS server configuration.
*
* @usage
* ```typescript
* import { DNS } from '@awesome-cordova-plugins/dns/ngx';
@ -32,6 +31,7 @@ import { Injectable } from '@angular/core';
export class DNS extends AwesomeCordovaNativePlugin {
/**
* Resolve hostnames into an underlying network address.
*
* @param hostname
* @returns {Promise<string>} Returns a promise that resolves with the resolution.
*/

View File

@ -7,7 +7,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
*
* Opens the file picker on iOS for the user to select a file, returns a file URI.
* Allows the user to upload files from iCloud
*
* @usage
* ```typescript
* import { DocumentPicker } from '@awesome-cordova-plugins/document-picker/ngx';
@ -33,6 +32,7 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
export class DocumentPicker extends AwesomeCordovaNativePlugin {
/**
* Open a file
*
* @param {string} [option] files between 'image', 'pdf' or 'all'
* @returns {Promise<string>}
*/

View File

@ -48,7 +48,6 @@ export interface DocumentScannerOptions {
* @name Document Scanner
* @description
* This plugin processes images of documents, compensating for perspective.
*
* @usage
* ```typescript
* import { DocumentScanner, DocumentScannerOptions } from '@awesome-cordova-plugins/document-scanner';
@ -64,7 +63,6 @@ export interface DocumentScannerOptions {
* .catch((error: any) => console.error(error));
*
* ```
*
* @interfaces
* DocumentScannerOptions
* @enums
@ -81,8 +79,9 @@ export interface DocumentScannerOptions {
export class DocumentScanner extends AwesomeCordovaNativePlugin {
/**
* Scan a document
*
* @param opts {DocumentScannerOptions} optional parameter for controlling scanning
* @return {Promise<string>} file URL of scanned document image
* @returns {Promise<string>} file URL of scanned document image
*/
@Cordova({
callbackOrder: 'reverse',

View File

@ -33,7 +33,6 @@ export interface DocumentViewerOptions {
* @name Document Viewer
* @description
* This plugin offers a slim API to view PDF files which are either stored in the apps assets folder (/www/*) or in any other file system directory available via the cordova file plugin.
*
* @usage
* ```typescript
* import { DocumentViewer } from '@awesome-cordova-plugins/document-viewer/ngx';
@ -49,7 +48,6 @@ export interface DocumentViewerOptions {
* this.document.viewDocument('assets/myFile.pdf', 'application/pdf', options)
*
* ```
*
* @interfaces
* DocumentViewerOptions
*/

View File

@ -54,8 +54,6 @@ export interface EmailComposerOptions {
* @description
*
* Requires Cordova plugin: cordova-plugin-email-composer. For more info, please see the [Email Composer plugin docs](https://github.com/hypery2k/cordova-email-plugin).
*
*
* @usage
* ```typescript
* import { EmailComposer } from '@awesome-cordova-plugins/email-composer/ngx';
@ -133,7 +131,8 @@ export interface EmailComposerOptions {
export class EmailComposer extends AwesomeCordovaNativePlugin {
/**
* Checks if the app has a permission to access email accounts information
* @return {Promise<boolean>} returns a promise that resolves with a boolean that indicates if the permission was granted
*
* @returns {Promise<boolean>} returns a promise that resolves with a boolean that indicates if the permission was granted
*/
@Cordova({
successIndex: 0,
@ -145,7 +144,8 @@ export class EmailComposer extends AwesomeCordovaNativePlugin {
/**
* Request permission to access email accounts information
* @return {Promise<boolean>} returns a promise that resolves with a boolean that indicates if the permission was granted
*
* @returns {Promise<boolean>} returns a promise that resolves with a boolean that indicates if the permission was granted
*/
@Cordova({
successIndex: 0,

View File

@ -2,7 +2,7 @@ import { Injectable } from '@angular/core';
import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core';
export interface Attributes {
[index: string]: String;
[index: string]: string;
}
/**
@ -11,7 +11,6 @@ export interface Attributes {
* API for interacting with the Crashlytics kit.
*
* https://docs.fabric.io/crashlytics/index.html
*
* @usage
* ```typescript
* import { Crashlytics } from '@awesome-cordova-plugins/fabric/ngx';
@ -45,6 +44,7 @@ export class Crashlytics extends AwesomeCordovaNativePlugin {
/**
* Add logging that will be sent with your crash data. This logging will not show up
* in the system.log and will only be visible in your Crashlytics dashboard.
*
* @param message {string}
*/
@Cordova({ sync: true })
@ -62,6 +62,9 @@ export class Crashlytics extends AwesomeCordovaNativePlugin {
/**
* Used to log a non-fatal error message (Android only).
*
* @param message
* @param stacktrace
*/
@Cordova({ sync: true })
sendNonFatalCrash(message: string, stacktrace?: any): void {
@ -70,6 +73,9 @@ export class Crashlytics extends AwesomeCordovaNativePlugin {
/**
* Used to record a non-fatal error message (iOS only).
*
* @param message
* @param code
*/
@Cordova({ sync: true })
recordError(message: string, code: number): void {
@ -78,6 +84,8 @@ export class Crashlytics extends AwesomeCordovaNativePlugin {
/**
* Sets the user's identifier for logging to Crashlytics backend.
*
* @param userId
*/
@Cordova({ sync: true })
setUserIdentifier(userId: string): void {
@ -86,6 +94,8 @@ export class Crashlytics extends AwesomeCordovaNativePlugin {
/**
* Sets the user's name for logging to Crashlytics backend.
*
* @param userName
*/
@Cordova({ sync: true })
setUserName(userName: string): void {
@ -94,6 +104,8 @@ export class Crashlytics extends AwesomeCordovaNativePlugin {
/**
* Sets the user's email address for logging to Crashlytics backend.
*
* @param email
*/
@Cordova({ sync: true })
setUserEmail(email: string): void {
@ -102,6 +114,9 @@ export class Crashlytics extends AwesomeCordovaNativePlugin {
/**
* Sets a custom key/value pair for logging to Crashlytics backend.
*
* @param value
* @param key
*/
@Cordova({ sync: true })
setStringValueForKey(value: string, key: string): void {
@ -110,6 +125,9 @@ export class Crashlytics extends AwesomeCordovaNativePlugin {
/**
* Sets a custom key/value pair for logging to Crashlytics backend.
*
* @param value
* @param key
*/
@Cordova({ sync: true })
setIntValueForKey(value: number, key: string): void {
@ -118,6 +136,9 @@ export class Crashlytics extends AwesomeCordovaNativePlugin {
/**
* Sets a custom key/value pair for logging to Crashlytics backend.
*
* @param value
* @param key
*/
@Cordova({ sync: true })
setBoolValueForKey(value: boolean, key: string): void {
@ -126,6 +147,9 @@ export class Crashlytics extends AwesomeCordovaNativePlugin {
/**
* Sets a custom key/value pair for logging to Crashlytics backend.
*
* @param value
* @param key
*/
@Cordova({ sync: true })
setFloatValueForKey(value: number, key: string): void {
@ -139,7 +163,6 @@ export class Crashlytics extends AwesomeCordovaNativePlugin {
* API for interacting with the Answers kit.
*
* https://docs.fabric.io/crashlytics/index.html
*
* @usage
* ```typescript
* import { Answers } from '@awesome-cordova-plugins/fabric/ngx';
@ -380,6 +403,11 @@ export class Answers extends AwesomeCordovaNativePlugin {
* Send the Content View tracking event.
*
* https://docs.fabric.io/android/answers/answers-events.html#content-view
*
* @param name
* @param type
* @param id
* @param attributes
*/
@Cordova({ sync: true })
sendContentView(name: string, type?: string, id?: string, attributes?: Attributes): void {
@ -388,6 +416,10 @@ export class Answers extends AwesomeCordovaNativePlugin {
/**
* Shortcut for sendContentView(...) using type of "Screen".
*
* @param name
* @param id
* @param attributes
*/
@Cordova({ sync: true })
sendScreenView(name: string, id: string, attributes?: Attributes): void {
@ -398,6 +430,9 @@ export class Answers extends AwesomeCordovaNativePlugin {
* Send a custom tracking event with the given name.
*
* https://docs.fabric.io/android/answers/answers-events.html#custom-event
*
* @param name
* @param attributes
*/
@Cordova({ sync: true })
sendCustomEvent(name: string, attributes?: Attributes): void {

View File

@ -82,7 +82,6 @@ export interface FacebookLoginResponse {
* Events are listed on the [insights page](https://www.facebook.com/insights/).
*
* For tracking events, see `logEvent` and `logPurchase`.
*
* @usage
* ```typescript
* import { Facebook, FacebookLoginResponse } from '@awesome-cordova-plugins/facebook/ngx';
@ -99,7 +98,6 @@ export interface FacebookLoginResponse {
* this.fb.logEvent(this.fb.EVENTS.EVENT_NAME_ADDED_TO_CART);
*
* ```
*
*/
@Plugin({
pluginName: 'Facebook',
@ -270,6 +268,7 @@ export class Facebook extends AwesomeCordovaNativePlugin {
* Logout of Facebook.
*
* For more info see the [Facebook docs](https://developers.facebook.com/docs/reference/javascript/FB.logout)
*
* @returns {Promise<any>} Returns a Promise that resolves on a successful logout, and rejects if logout fails.
*/
@Cordova()
@ -338,6 +337,7 @@ export class Facebook extends AwesomeCordovaNativePlugin {
* ```
*
* For more options see the [Cordova plugin docs](https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect#show-a-dialog) and the [Facebook docs](https://developers.facebook.com/docs/javascript/reference/FB.ui)
*
* @param {Object} options The dialog options
* @returns {Promise<any>} Returns a Promise that resolves with success data, or rejects with an error
*/
@ -459,6 +459,7 @@ export class Facebook extends AwesomeCordovaNativePlugin {
/**
* Returns the deferred app link
*
* @returns {Promise<string>} Returns a Promise that resolves with the deep link
*/
@Cordova()
@ -468,6 +469,7 @@ export class Facebook extends AwesomeCordovaNativePlugin {
/**
* Manually log activation events
*
* @returns {Promise<any>}
*/
@Cordova()

View File

@ -75,7 +75,6 @@ export interface IChannelConfiguration {
* @capacitorincompatible true
* @description
* Provides basic functionality for Firebase Cloud Messaging
*
* @usage
* ```typescript
* import { FCM } from '@awesome-cordova-plugins/fcm/ngx';
@ -163,7 +162,6 @@ export class FCM extends AwesomeCordovaNativePlugin {
* Subscribes you to a [topic](https://firebase.google.com/docs/notifications/android/console-topics)
*
* @param {string} topic Topic to be subscribed to
*
* @returns {Promise<any>} Returns a promise resolving in result of subscribing to a topic
*/
@Cordova()
@ -175,7 +173,6 @@ export class FCM extends AwesomeCordovaNativePlugin {
* Unsubscribes you from a [topic](https://firebase.google.com/docs/notifications/android/console-topics)
*
* @param {string} topic Topic to be unsubscribed from
*
* @returns {Promise<any>} Returns a promise resolving in result of unsubscribing from a topic
*/
@Cordova()
@ -224,7 +221,6 @@ export class FCM extends AwesomeCordovaNativePlugin {
* Request push notification permission, alerting the user if it not have yet decided
*
* @param {IRequestPushPermissionIOSOptions} options Options for push request
*
* @returns {Promise<boolean>} Returns a Promise that resolves with the permission status
*/
@Cordova()
@ -240,7 +236,6 @@ export class FCM extends AwesomeCordovaNativePlugin {
* Once a channel is created, it stays unchangeable until the user uninstalls the app.
*
* @param channelConfig
*
* @returns {Promise<void>}
*/
@Cordova()

View File

@ -5,7 +5,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
* @name File Opener
* @description
* This plugin will open a file on your device file system with its default application.
*
* @usage
* ```typescript
* import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';
@ -35,6 +34,7 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
export class FileOpener extends AwesomeCordovaNativePlugin {
/**
* Open an file
*
* @param {string} filePath File Path
* @param {string} fileMIMEType File MIME Type
* @returns {Promise<any>}
@ -50,6 +50,7 @@ export class FileOpener extends AwesomeCordovaNativePlugin {
/**
* Uninstalls a package
*
* @param {string} packageId Package ID
* @returns {Promise<any>}
*/
@ -64,6 +65,7 @@ export class FileOpener extends AwesomeCordovaNativePlugin {
/**
* Check if an app is already installed
*
* @param {string} packageId Package ID
* @returns {Promise<any>}
*/
@ -78,6 +80,7 @@ export class FileOpener extends AwesomeCordovaNativePlugin {
/**
* Opens with system modal to open file with an already installed app.
*
* @param {string} filePath File Path
* @param {string} fileMIMEType File MIME Type
* @returns {Promise<any>}

View File

@ -9,7 +9,6 @@ declare const window: any;
* @description
*
* This plugin allows you to resolve the native filesystem path for Android content URIs and is based on code in the aFileChooser library.
*
* @usage
* ```typescript
* import { FilePath } from '@awesome-cordova-plugins/file-path/ngx';
@ -35,6 +34,7 @@ declare const window: any;
export class FilePath extends AwesomeCordovaNativePlugin {
/**
* Resolve native path for given content URL/path.
*
* @param {string} path Content URL/path.
* @returns {Promise<string>}
*/

View File

@ -108,10 +108,8 @@ export interface FileTransferError {
/**
* @name File Transfer
*
* @description
* This plugin allows you to upload and download files.
*
* @usage
* ```typescript
* import { FileTransfer, FileUploadOptions, FileTransferObject } from '@awesome-cordova-plugins/file-transfer/ngx';
@ -162,7 +160,6 @@ export interface FileTransferError {
*
* To store files in a different/publicly accessible directory, please refer to the following link
* https://github.com/apache/cordova-plugin-file#where-to-store-files
*
* @interfaces
* FileUploadOptions
* FileUploadResult
@ -187,6 +184,7 @@ export class FileTransfer extends AwesomeCordovaNativePlugin {
* CONNECTION_ERR: 3, Return on connection error
* ABORT_ERR: 4, Return on aborting
* NOT_MODIFIED_ERR: 5 Return on '304 Not Modified' HTTP response
*
* @enum {number}
*/
FileTransferErrorCode = {
@ -199,7 +197,8 @@ export class FileTransfer extends AwesomeCordovaNativePlugin {
/**
* Creates a new FileTransfer object
* @return {FileTransferObject}
*
* @returns {FileTransferObject}
*/
create(): FileTransferObject {
return new FileTransferObject();
@ -263,6 +262,7 @@ export class FileTransferObject {
/**
* Registers a listener that gets called whenever a new chunk of data is transferred.
*
* @param {Function} listener Listener that takes a progress event.
*/
@InstanceCheck({ sync: true })

View File

@ -36,6 +36,7 @@ export interface IFile extends Blob {
* Returns a "slice" of the file. Since Cordova Files don't contain the actual
* content, this really returns a File with adjusted start and end.
* Slices of slices are supported.
*
* @param start {Number} The index at which to start the slice (inclusive).
* @param end {Number} The index at which to end the slice (exclusive).
*/
@ -55,6 +56,7 @@ export interface LocalFileSystem {
/**
* Requests a filesystem in which to store application data.
*
* @param type Whether the filesystem requested should be persistent, as defined above. Use one of TEMPORARY or
* PERSISTENT.
* @param size This is an indicator of how much storage space, in bytes, the application expects to need.
@ -71,6 +73,7 @@ export interface LocalFileSystem {
/**
* Allows the user to look up the Entry for a file or directory referred to by a local URL.
*
* @param url A URL referring to a local file in a filesystem accessable via this API.
* @param successCallback A callback that is called to report the FileEntry to which the supplied URL refers.
* @param errorCallback A callback that is called when errors happen, or when the request to obtain the Entry is
@ -92,12 +95,14 @@ export interface LocalFileSystem {
export interface Metadata {
/**
* This is the time at which the file or directory was last modified.
*
* @readonly
*/
modificationTime: Date;
/**
* The size of the file, in bytes. This must return 0 for directories.
*
* @readonly
*/
size: number;
@ -123,12 +128,14 @@ export interface FileSystem {
/**
* This is the name of the file system. The specifics of naming filesystems is unspecified, but a name must be unique
* across the list of exposed file systems.
*
* @readonly
*/
name: string;
/**
* The root directory of the file system.
*
* @readonly
*/
root: DirectoryEntry;
@ -151,6 +158,7 @@ export interface Entry {
/**
* Look up metadata about this entry.
*
* @param successCallback A callback that is called with the time of the last modification.
* @param errorCallback ErrorCallback A callback that is called when errors happen.
*/
@ -158,6 +166,7 @@ export interface Entry {
/**
* Set the metadata of the entry.
*
* @param successCallback {Function} is called with a Metadata object
* @param errorCallback {Function} is called with a FileError
* @param metadataObject {Metadata} keys and values to set
@ -181,21 +190,6 @@ export interface Entry {
*/
nativeURL: string;
/**
* Look up metadata about this entry.
* @param successCallback A callback that is called with the time of the last modification.
* @param errorCallback ErrorCallback A callback that is called when errors happen.
*/
getMetadata(successCallback: MetadataCallback, errorCallback?: ErrorCallback): void;
/**
* Set the metadata of the entry.
* @param successCallback {Function} is called with a Metadata object
* @param errorCallback {Function} is called with a FileError
* @param metadataObject {Metadata} keys and values to set
*/
setMetadata(successCallback: MetadataCallback, errorCallback: ErrorCallback, metadataObject: Metadata): void;
/**
* Move an entry to a different location on the file system. It is an error to try to:
*
@ -248,13 +242,15 @@ export interface Entry {
/**
* Return a URL that can be passed across the bridge to identify this entry.
* @return string URL that can be passed across the bridge to identify this entry
*
* @returns string URL that can be passed across the bridge to identify this entry
*/
toInternalURL(): string;
/**
* Deletes a file or directory. It is an error to attempt to delete a directory that is not empty. It is an error to
* attempt to delete the root directory of a filesystem.
*
* @param successCallback A callback that is called on success.
* @param errorCallback A callback that is called when errors happen.
*/
@ -263,6 +259,7 @@ export interface Entry {
/**
* Look up the parent DirectoryEntry containing this Entry. If this Entry is the root of its filesystem, its parent
* is itself.
*
* @param successCallback A callback that is called to return the parent Entry.
* @param errorCallback A callback that is called when errors happen.
*/
@ -280,6 +277,7 @@ export interface DirectoryEntry extends Entry {
/**
* Creates or looks up a file.
*
* @param path Either an absolute path or a relative path from this DirectoryEntry to the file to be looked up or
* created. It is an error to attempt to create a file whose immediate parent does not yet exist.
* @param options
@ -298,6 +296,7 @@ export interface DirectoryEntry extends Entry {
/**
* Creates or looks up a directory.
*
* @param path Either an absolute path or a relative path from this DirectoryEntry to the directory to be looked up
* or created. It is an error to attempt to create a directory whose immediate parent does not yet exist.
* @param options
@ -311,7 +310,6 @@ export interface DirectoryEntry extends Entry {
* </ul>
* @param successCallback A callback that is called to return the DirectoryEntry selected or created.
* @param errorCallback A callback that is called when errors happen.
*
*/
getDirectory(
path: string,
@ -324,6 +322,7 @@ export interface DirectoryEntry extends Entry {
* Deletes a directory and all of its contents, if any. In the event of an error [e.g. trying to delete a directory
* that contains a file that cannot be removed], some of the contents of the directory may be deleted. It is an error
* to attempt to delete the root directory of a filesystem.
*
* @param successCallback A callback that is called on success.
* @param errorCallback A callback that is called when errors happen.
*/
@ -346,6 +345,7 @@ export interface DirectoryReader {
/**
* Read the next block of entries from this directory.
*
* @param successCallback Called once per successful call to readEntries to deliver the next previously-unreported
* set of Entries in the associated Directory. If all Entries have already been returned from previous invocations
* of readEntries, successCallback must be called with a zero-length array as an argument.
@ -360,6 +360,7 @@ export interface DirectoryReader {
export interface FileEntry extends Entry {
/**
* Creates a new FileWriter associated with the file that this FileEntry represents.
*
* @param successCallback A callback that is called with the new FileWriter.
* @param errorCallback A callback that is called when errors happen.
*/
@ -367,6 +368,7 @@ export interface FileEntry extends Entry {
/**
* Returns a File that represents the current state of the file that this FileEntry represents.
*
* @param successCallback A callback that is called with the File.
* @param errorCallback A callback that is called when errors happen.
*/
@ -456,17 +458,20 @@ export declare class FileSaver extends EventTarget {
/**
* The blob is being written.
*
* @readonly
*/
INIT: number;
/**
* The object has been constructed, but there is no pending write.
*
* @readonly
*/
WRITING: number;
/**
* The entire Blob has been written to the file, an error occurred during the write, or the write was aborted using
* abort(). The FileSaver is no longer writing the blob.
*
* @readonly
*/
DONE: number;
@ -478,11 +483,13 @@ export declare class FileSaver extends EventTarget {
* <li>WRITING</li>
* <li>DONE</li>
* <ul>
*
* @readonly
*/
readyState: number;
/**
* The last error that occurred on the FileSaver.
*
* @readonly
*/
error: Error;
@ -510,30 +517,6 @@ export declare class FileSaver extends EventTarget {
* Handler for write end events.
*/
onwriteend: (event: ProgressEvent) => void;
/**
* When the FileSaver constructor is called, the user agent must return a new FileSaver object with readyState set to
* INIT. This constructor must be visible when the script's global object is either a Window object or an object
* implementing the WorkerUtils interface.
*/
constructor(data: Blob);
/**
* When the abort method is called, user agents must run the steps below:
* <ol>
* <li> If readyState == DONE or readyState == INIT, terminate this overall series of steps without doing anything
* else. </li>
* <li> Set readyState to DONE. </li>
* <li> If there are any tasks from the object's FileSaver task source in one of the task queues, then remove those
* tasks. </li>
* <li> Terminate the write algorithm being processed. </li>
* <li> Set the error attribute to a DOMError object of type "AbortError". </li>
* <li> Fire a progress event called abort </li>
* <li> Fire a progress event called writeend </li>
* <li> Terminate this algorithm. </li>
* </ol>
*/
abort(): void;
}
/**
@ -556,12 +539,14 @@ export declare class FileWriter extends FileSaver {
/**
* Write the supplied data to the file at position.
*
* @param data The blob to write.
*/
write(data: ArrayBuffer | Blob | string): void;
/**
* Seek sets the file position at which the next write will occur.
*
* @param offset If nonnegative, an absolute byte offset into the file. If negative, an offset back from the end of
* the file.
*/
@ -570,6 +555,7 @@ export declare class FileWriter extends FileSaver {
/**
* Changes the length of the file to that specified. If shortening the file, data beyond the new length must be
* discarded. If extending the file, the existing data must be zero-padded up to the new length.
*
* @param size The size to which the length of the file is to be adjusted, measured in bytes.
*/
truncate(size: number): void;
@ -636,7 +622,7 @@ export declare class FileReader {
[key: string]: any;
}
interface Window extends LocalFileSystem {}
type Window = LocalFileSystem;
declare const window: Window;
@ -762,6 +748,7 @@ export class File extends AwesomeCordovaNativePlugin {
/**
* Get free disk space in Bytes
*
* @returns {Promise<number>} Returns a promise that resolves with the remaining free disk space in Bytes
*/
@CordovaCheck()
@ -1042,10 +1029,12 @@ export class File extends AwesomeCordovaNativePlugin {
/**
* Write a new file to the desired location.
*
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
* @param {string} fileName path relative to base path
* @param {string | Blob | ArrayBuffer} text content, blob or ArrayBuffer to write
* @param {IWriteOptions} whether to replace/append to an existing file. See IWriteOptions for more information.
* @param options
* @returns {Promise<any>} Returns a Promise that resolves to updated file entry or rejects with an error.
*/
@CordovaCheck()
@ -1077,6 +1066,7 @@ export class File extends AwesomeCordovaNativePlugin {
/**
* Write content to FileEntry.
*
* @hidden
* Write to an existing file.
* @param {FileEntry} fe file entry object
@ -1102,6 +1092,7 @@ export class File extends AwesomeCordovaNativePlugin {
/**
* Write to an existing file.
*
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
* @param {string} fileName path relative to base path
* @param {string | Blob} text content or blob to write
@ -1114,6 +1105,7 @@ export class File extends AwesomeCordovaNativePlugin {
/**
* Read the contents of a file as text.
*
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
* @param {string} file Name of file, relative to path.
* @returns {Promise<string>} Returns a Promise that resolves with the contents of the file as string or rejects with
@ -1141,6 +1133,7 @@ export class File extends AwesomeCordovaNativePlugin {
/**
* Read file and return data as a binary data.
*
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
* @param {string} file Name of file, relative to path.
* @returns {Promise<string>} Returns a Promise that resolves with the contents of the file as string rejects with an
@ -1153,6 +1146,7 @@ export class File extends AwesomeCordovaNativePlugin {
/**
* Read file and return data as an ArrayBuffer.
*
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
* @param {string} file Name of file, relative to path.
* @returns {Promise<ArrayBuffer>} Returns a Promise that resolves with the contents of the file as ArrayBuffer or
@ -1224,6 +1218,7 @@ export class File extends AwesomeCordovaNativePlugin {
}
/**
* @param err
* @hidden
*/
private fillErrorMessage(err: FileError): void {
@ -1234,6 +1229,7 @@ export class File extends AwesomeCordovaNativePlugin {
/**
* Resolves a local file system URL
*
* @param fileUrl {string} file system url
* @returns {Promise<Entry>}
*/
@ -1260,6 +1256,7 @@ export class File extends AwesomeCordovaNativePlugin {
/**
* Resolves a local directory url
*
* @param directoryUrl {string} directory system url
* @returns {Promise<DirectoryEntry>}
*/
@ -1278,6 +1275,7 @@ export class File extends AwesomeCordovaNativePlugin {
/**
* Get a directory
*
* @param directoryEntry {DirectoryEntry} Directory entry, obtained by resolveDirectoryUrl method
* @param directoryName {string} Directory name
* @param flags {Flags} Options
@ -1307,6 +1305,7 @@ export class File extends AwesomeCordovaNativePlugin {
/**
* Get a file
*
* @param directoryEntry {DirectoryEntry} Directory entry, obtained by resolveDirectoryUrl method
* @param fileName {string} File name
* @param flags {Flags} Options
@ -1368,6 +1367,7 @@ export class File extends AwesomeCordovaNativePlugin {
}
/**
* @param fe
* @hidden
*/
private remove(fe: Entry): Promise<RemoveResult> {
@ -1385,6 +1385,9 @@ export class File extends AwesomeCordovaNativePlugin {
}
/**
* @param srce
* @param destdir
* @param newName
* @hidden
*/
private move(srce: Entry, destdir: DirectoryEntry, newName: string): Promise<Entry> {
@ -1404,6 +1407,9 @@ export class File extends AwesomeCordovaNativePlugin {
}
/**
* @param srce
* @param destdir
* @param newName
* @hidden
*/
private copy(srce: Entry, destdir: DirectoryEntry, newName: string): Promise<Entry> {
@ -1423,6 +1429,7 @@ export class File extends AwesomeCordovaNativePlugin {
}
/**
* @param dr
* @hidden
*/
private readEntries(dr: DirectoryReader): Promise<Entry[]> {
@ -1440,6 +1447,7 @@ export class File extends AwesomeCordovaNativePlugin {
}
/**
* @param de
* @hidden
*/
private rimraf(de: DirectoryEntry): Promise<RemoveResult> {
@ -1457,6 +1465,7 @@ export class File extends AwesomeCordovaNativePlugin {
}
/**
* @param fe
* @hidden
*/
private createWriter(fe: FileEntry): Promise<FileWriter> {
@ -1474,6 +1483,8 @@ export class File extends AwesomeCordovaNativePlugin {
}
/**
* @param writer
* @param gu
* @hidden
*/
private write(writer: FileWriter, gu: string | Blob | ArrayBuffer): Promise<any> {
@ -1494,12 +1505,17 @@ export class File extends AwesomeCordovaNativePlugin {
}
/**
* @param writer
* @param file
* @hidden
*/
private writeFileInChunks(writer: FileWriter, file: Blob) {
const BLOCK_SIZE = 1024 * 1024;
let writtenSize = 0;
/**
*
*/
function writeNextChunk() {
const size = Math.min(BLOCK_SIZE, file.size - writtenSize);
const chunk = file.slice(writtenSize, writtenSize + size);

View File

@ -4,36 +4,42 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
export interface FingerprintOptions {
/**
* Title in biometric prompt (android only)
*
* @default {APP_NAME} Biometric Sign On
*/
title?: string;
/**
* Subtitle in biometric Prompt (android only)
*
* @default null
*/
subtitle?: string;
/**
* Description in biometric Prompt
*
* @default null
*/
description?: string;
/**
* Title of fallback button.
*
* @default "Use Pin"
*/
fallbackButtonTitle?: string;
/**
* Title for cancel button on Android
*
* @default "Cancel"
*/
cancelButtonTitle?: string;
/**
* Disable 'use backup' option.
*
* @default false
*/
disableBackup?: boolean;
@ -47,6 +53,7 @@ export interface FingerprintSecretOptions extends FingerprintOptions {
/**
* If `true` secret will be deleted when biometry items are deleted or enrolled
*
* @default false
*/
invalidateOnEnrollment?: boolean;
@ -57,7 +64,6 @@ export interface FingerprintSecretOptions extends FingerprintOptions {
* @description
* Use simple fingerprint authentication on Android and iOS.
* Requires Cordova plugin: cordova-plugin-fingerprint-aio. For more info about plugin, vist: https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio
*
* @usage
* ```typescript
* import { FingerprintAIO } from '@awesome-cordova-plugins/fingerprint-aio/ngx';
@ -117,78 +123,93 @@ export interface FingerprintSecretOptions extends FingerprintOptions {
export class FingerprintAIO extends AwesomeCordovaNativePlugin {
/**
* Convenience constant
*
* @type {number}
*/
BIOMETRIC_UNKNOWN_ERROR = -100;
/**
* Convenience constant
*
* @type {number}
*/
BIOMETRIC_UNAVAILABLE = -101;
/**
* Convenience constant
*
* @type {number}
*/
BIOMETRIC_AUTHENTICATION_FAILED = -102;
/**
* Convenience constant
*
* @type {number}
*/
BIOMETRIC_SDK_NOT_SUPPORTED = -103;
/**
* Convenience constant
*
* @type {number}
*/
BIOMETRIC_HARDWARE_NOT_SUPPORTED = -104;
/**
* Convenience constant
*
* @type {number}
*/
BIOMETRIC_PERMISSION_NOT_GRANTED = -105;
/**
* Convenience constant
*
* @type {number}
*/
BIOMETRIC_NOT_ENROLLED = -106;
/**
* Convenience constant
*
* @type {number}
*/
BIOMETRIC_INTERNAL_PLUGIN_ERROR = -107;
/**
* Convenience constant
*
* @type {number}
*/
BIOMETRIC_DISMISSED = -108;
/**
* Convenience constant
*
* @type {number}
*/
BIOMETRIC_PIN_OR_PATTERN_DISMISSED = -109;
/**
* Convenience constant
*
* @type {number}
*/
BIOMETRIC_SCREEN_GUARD_UNSECURED = -110;
/**
* Convenience constant
*
* @type {number}
*/
BIOMETRIC_LOCKED_OUT = -111;
/**
* Convenience constant
*
* @type {number}
*/
BIOMETRIC_LOCKED_OUT_PERMANENT = -112;
/**
* Convenience constant
*
* @type {number}
*/
BIOMETRIC_SECRET_NOT_FOUND = -113;
/**
* Check if fingerprint authentication is available
* @return {Promise<any>} Returns a promise with result
*
* @returns {Promise<any>} Returns a promise with result
*/
@Cordova()
isAvailable(): Promise<any> {
@ -197,8 +218,9 @@ export class FingerprintAIO extends AwesomeCordovaNativePlugin {
/**
* Show authentication dialogue and register secret
*
* @param {FingerprintSecretOptions} options Options for platform specific fingerprint API
* @return {Promise<any>} Returns a promise that resolves when authentication was successful
* @returns {Promise<any>} Returns a promise that resolves when authentication was successful
*/
@Cordova()
registerBiometricSecret(options: FingerprintSecretOptions): Promise<any> {
@ -207,8 +229,9 @@ export class FingerprintAIO extends AwesomeCordovaNativePlugin {
/**
* Show authentication dialogue and load secret
*
* @param {FingerprintOptions} options Options for platform specific fingerprint API
* @return {Promise<any>} Returns a promise that resolves when authentication was successful
* @returns {Promise<any>} Returns a promise that resolves when authentication was successful
*/
@Cordova()
loadBiometricSecret(options: FingerprintOptions): Promise<string> {
@ -217,8 +240,9 @@ export class FingerprintAIO extends AwesomeCordovaNativePlugin {
/**
* Show authentication dialogue
*
* @param {FingerprintOptions} options Options for platform specific fingerprint API
* @return {Promise<any>} Returns a promise that resolves when authentication was successful
* @returns {Promise<any>} Returns a promise that resolves when authentication was successful
*/
@Cordova()
show(options: FingerprintOptions): Promise<any> {

View File

@ -26,7 +26,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
* ```
*
* And in the same file, you'll have to add `xmlns:tools="http://schemas.android.com/tools"` to your _manifest_ tag.
*
* @usage
* ```typescript
* import { FirebaseAnalytics } from '@awesome-cordova-plugins/firebase-analytics/ngx';
@ -54,9 +53,10 @@ export class FirebaseAnalytics extends AwesomeCordovaNativePlugin {
/**
* Logs an app event.
* Be aware of automatically collected events.
*
* @param {string} name The name of the event
* @param {any} params Some param to configure something
* @return {Promise<any>} Returns a promise
* @returns {Promise<any>} Returns a promise
*/
@Cordova({ sync: true })
logEvent(name: string, params: any): Promise<any> {
@ -66,8 +66,9 @@ export class FirebaseAnalytics extends AwesomeCordovaNativePlugin {
/**
* Sets the user ID property.
* This feature must be used in accordance with Google's Privacy Policy.
*
* @param {string} id The user ID
* @return {Promise<any>} Returns a promise
* @returns {Promise<any>} Returns a promise
*/
@Cordova({ sync: true })
setUserId(id: string): Promise<any> {
@ -77,9 +78,10 @@ export class FirebaseAnalytics extends AwesomeCordovaNativePlugin {
/**
* This feature must be used in accordance with Google's Privacy Policy.
* Be aware of automatically collected user properties.
*
* @param {string} name The property name
* @param {string} value The property value
* @return {Promise<any>} Returns a promise
* @returns {Promise<any>} Returns a promise
*/
@Cordova({ sync: true })
setUserProperty(name: string, value: string): Promise<any> {
@ -88,8 +90,9 @@ export class FirebaseAnalytics extends AwesomeCordovaNativePlugin {
/**
* Sets whether analytics collection is enabled for this app on this device.
*
* @param {boolean} enabled
* @return {Promise<any>} Returns a promise
* @returns {Promise<any>} Returns a promise
*/
@Cordova({ sync: true })
setEnabled(enabled: boolean): Promise<any> {
@ -99,8 +102,9 @@ export class FirebaseAnalytics extends AwesomeCordovaNativePlugin {
/**
* Sets the current screen name, which specifies the current visual context in your app.
* This helps identify the areas in your app where users spend their time and how they interact with your app.
*
* @param {string} name The name of the screen
* @return {Promise<any>} Returns a promise
* @returns {Promise<any>} Returns a promise
*/
@Cordova({ sync: true })
setCurrentScreen(name: string): Promise<any> {
@ -109,7 +113,8 @@ export class FirebaseAnalytics extends AwesomeCordovaNativePlugin {
/**
* Clears all analytics data for this instance from the device and resets the app instance ID
* @return {Promise<void>} Returns a promise
*
* @returns {Promise<void>} Returns a promise
*/
@Cordova({ sync: true })
resetAnalyticsData(): Promise<void> {

View File

@ -6,7 +6,6 @@ import { Observable } from 'rxjs';
* @name Firebase Authentication
* @description
* Cordova plugin for Firebase Authentication
*
* @usage
* ```typescript
* import { FirebaseAuthentication } from '@awesome-cordova-plugins/firebase-authentication/ngx';
@ -36,7 +35,8 @@ import { Observable } from 'rxjs';
export class FirebaseAuthentication extends AwesomeCordovaNativePlugin {
/**
* Returns the current user logged in Firebase service
* @return {Promise<any>} Returns the user info
*
* @returns {Promise<any>} Returns the user info
*/
@Cordova({ sync: true })
getCurrentUser(): Promise<any> {
@ -45,8 +45,9 @@ export class FirebaseAuthentication extends AwesomeCordovaNativePlugin {
/**
* Returns a JWT token used to identify the user to a Firebase service.
*
* @param forceRefresh {boolean} Force Refresh
* @return {Promise<any>} Returns the id token
* @returns {Promise<any>} Returns the id token
*/
@Cordova({ sync: true })
getIdToken(forceRefresh: boolean): Promise<any> {
@ -55,6 +56,7 @@ export class FirebaseAuthentication extends AwesomeCordovaNativePlugin {
/**
* Tries to create a new user account with the given email address and password.
*
* @param email Email
* @param password Password
*/
@ -74,6 +76,7 @@ export class FirebaseAuthentication extends AwesomeCordovaNativePlugin {
/**
* Triggers the Firebase Authentication backend to send a password-reset email to the given email address,
* which must correspond to an existing user of your app.
*
* @param email Email
*/
@Cordova({ sync: true })
@ -83,6 +86,7 @@ export class FirebaseAuthentication extends AwesomeCordovaNativePlugin {
/**
* Asynchronously signs in using an email and password.
*
* @param email Email
* @param password Password
*/
@ -99,6 +103,7 @@ export class FirebaseAuthentication extends AwesomeCordovaNativePlugin {
* timeout [milliseconds] is the maximum amount of time you are willing to wait for SMS auto-retrieval
* to be completed by the library. Maximum allowed value is 2 minutes. Use 0 to disable SMS-auto-retrieval.
* If you specify a positive value less than 30 seconds, library will default to 30 seconds.
*
* @param phoneNumber Phone number
* @param timeout {number} Timeout
*/
@ -109,6 +114,7 @@ export class FirebaseAuthentication extends AwesomeCordovaNativePlugin {
/**
* Asynchronously signs in using verificationId and 6-digit SMS code.
*
* @param verificationId Verification ID
* @param smsCode SMS code
*/
@ -127,6 +133,7 @@ export class FirebaseAuthentication extends AwesomeCordovaNativePlugin {
/**
* Uses Google's idToken and accessToken to sign-in into firebase account. In order to retrieve those tokens follow instructions for Android and iOS
*
* @param idToken ID Token
* @param accessToken Access Token
*/
@ -137,7 +144,9 @@ export class FirebaseAuthentication extends AwesomeCordovaNativePlugin {
/**
* Uses Apples's idToken and rawNonce (optional) to sign-in into firebase account. In order to retrieve those tokens follow instructions for Android and iOS
*
* @param idToken ID Token
* @param identityToken
* @param rawNonce Access Token
*/
@Cordova({ sync: true })
@ -147,6 +156,7 @@ export class FirebaseAuthentication extends AwesomeCordovaNativePlugin {
/**
* Uses Facebook's accessToken to sign-in into firebase account. In order to retrieve those tokens follow instructions for Android and iOS.
*
* @param accessToken Access Token
*/
@Cordova({ sync: true })
@ -156,6 +166,7 @@ export class FirebaseAuthentication extends AwesomeCordovaNativePlugin {
/**
* Uses Twitter's token and secret to sign-in into firebase account. In order to retrieve those tokens follow instructions for Android and iOS.
*
* @param token Token
* @param secret Secret
*/
@ -177,6 +188,7 @@ export class FirebaseAuthentication extends AwesomeCordovaNativePlugin {
/**
* Set's the current user language code. The string used to set this property must be a language code that follows BCP 47.
*
* @param languageCode Language Code
*/
@Cordova({ sync: true })

View File

@ -6,7 +6,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
* @name Firebase Config
* @description
* Cordova plugin for Firebase Config
*
* @usage
* ```typescript
* import { FirebaseConfig } from '@awesome-cordova-plugins/firebase-config/ngx';

View File

@ -5,7 +5,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
* @name FirebaseCrash
* @description
* This plugin brings crash reporting from Google Firebase to your Cordova project! Android and iOS supported.
*
* @usage
* ```typescript
* import { FirebaseCrash } from '@awesome-cordova-plugins/firebase-crash';
@ -32,8 +31,9 @@ export class FirebaseCrash extends AwesomeCordovaNativePlugin {
/**
* Add logging that will be sent with your crash data in case of app crash.
* https://firebase.google.com/docs/crashlytics/customize-crash-reports?authuser=0#add_custom_logs
*
* @param {string} message
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({ sync: true })
log(message: string): Promise<any> {
@ -43,8 +43,9 @@ export class FirebaseCrash extends AwesomeCordovaNativePlugin {
/**
* Log non-fatal exceptions in addition to automatically reported app crashes.
* https://firebase.google.com/docs/crashlytics/customize-crash-reports?authuser=0#log_non-fatal_exceptions
*
* @param {string} message
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({ sync: true })
logError(message: string): Promise<any> {
@ -54,6 +55,7 @@ export class FirebaseCrash extends AwesomeCordovaNativePlugin {
/**
* Sets the user identifier property for crashlytics reporting.
* https://firebase.google.com/docs/crashlytics/customize-crash-reports?authuser=0#set_user_ids
*
* @param {string} userId value to set the userId
* @returns {Promise<any>}
*/

View File

@ -5,7 +5,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
* @name Firebase Crashlytics
* @description
* A Google Firebase Crashlytics plugin to enable capture of crash reports.
*
* @usage
* ```typescript
* import { FirebaseCrashlytics } from '@awesome-cordova-plugins/firebase-crashlytics/ngx';

View File

@ -81,7 +81,6 @@ export interface ILinkOptions {
* this.firebaseDynamicLinks.onDynamicLink()
* .subscribe((res: any) => console.log(res), (error:any) => console.log(error));
* ```
*
* @interfaces
* DynamicLinksOptions
*/
@ -99,7 +98,8 @@ export interface ILinkOptions {
export class FirebaseDynamicLinks extends AwesomeCordovaNativePlugin {
/**
* Determines if the app has a pending dynamic link and provides access to the dynamic link parameters.
* @return {Promise<IDynamicLink>} Returns a promise
*
* @returns {Promise<IDynamicLink>} Returns a promise
*/
@Cordova({
otherPromise: true,
@ -110,7 +110,8 @@ export class FirebaseDynamicLinks extends AwesomeCordovaNativePlugin {
/**
* Registers callback that is triggered on each dynamic link click.
* @return {Observable<IDynamicLink>} Returns an observable
*
* @returns {Observable<IDynamicLink>} Returns an observable
*/
@Cordova({
callbackOrder: 'reverse',
@ -122,8 +123,10 @@ export class FirebaseDynamicLinks extends AwesomeCordovaNativePlugin {
/**
* Creates a Dynamic Link from the parameters. Returns a promise fulfilled with the new dynamic link url.
*
* @param {ILinkOptions} opt [Dynamic Link Parameters](https://github.com/chemerisuk/cordova-plugin-firebase-dynamiclinks#dynamic-link-parameters)
* @return {Promise<string>} Returns a promise with the url
* @param opts
* @returns {Promise<string>} Returns a promise with the url
*/
@Cordova({
otherPromise: true,
@ -134,8 +137,10 @@ export class FirebaseDynamicLinks extends AwesomeCordovaNativePlugin {
/**
* Creates a shortened Dynamic Link from the parameters. Shorten the path to a string that is only as long as needed to be unique, with a minimum length of 4 characters. Use this method if sensitive information would not be exposed if a short Dynamic Link URL were guessed.
*
* @param {ILinkOptions} opt [Dynamic Link Parameters](https://github.com/chemerisuk/cordova-plugin-firebase-dynamiclinks#dynamic-link-parameters)
* @return {Promise<string>} Returns a promise with the url
* @param opts
* @returns {Promise<string>} Returns a promise with the url
*/
@Cordova({
otherPromise: true,
@ -146,8 +151,10 @@ export class FirebaseDynamicLinks extends AwesomeCordovaNativePlugin {
/**
* Creates a Dynamic Link from the parameters. Shorten the path to an unguessable string. Such strings are created by base62-encoding randomly generated 96-bit numbers, and consist of 17 alphanumeric characters. Use unguessable strings to prevent your Dynamic Links from being crawled, which can potentially expose sensitive information.
*
* @param {ILinkOptions} opt [Dynamic Link Parameters](https://github.com/chemerisuk/cordova-plugin-firebase-dynamiclinks#dynamic-link-parameters)
* @return {Promise<string>} Returns a promise with the url
* @param opts
* @returns {Promise<string>} Returns a promise with the url
*/
@Cordova({
otherPromise: true,

View File

@ -42,7 +42,6 @@ export type FirebaseMessagingTokenType = 'apns-buffer' | 'apns-string';
* @name Firebase Messaging
* @description
* Cordova plugin for Firebase Messaging
*
* @usage
* ```typescript
* import { FirebaseMessaging } from '@awesome-cordova-plugins/firebase-messaging/ngx';
@ -94,6 +93,7 @@ export class FirebaseMessaging extends AwesomeCordovaNativePlugin {
* Grant permission to receive push notifications (will trigger prompt on iOS).
*
* @param {IRequestPermissionOptions} [options]
* @param options.forceShow
* @returns {Promise<string>}
*/
@Cordova({ sync: true })

View File

@ -225,7 +225,6 @@ export interface ImageLabel {
* @name Firebase Vision
* @description
* Cordova plugin for Firebase MLKit Vision
*
* @usage
* ```typescript
* import { FirebaseVision } from '@awesome-cordova-plugins/firebase-vision/ngx';
@ -261,8 +260,9 @@ export interface ImageLabel {
export class FirebaseVision extends AwesomeCordovaNativePlugin {
/**
* Recognize text in image
*
* @param file_uri {string} Image URI
* @return {Promise<string>} Returns a promise that fulfills with the text in the image
* @returns {Promise<string>} Returns a promise that fulfills with the text in the image
*/
@Cordova()
onDeviceTextRecognizer(file_uri: string): Promise<Text> {
@ -270,8 +270,9 @@ export class FirebaseVision extends AwesomeCordovaNativePlugin {
}
/**
* Read data from Barcode
*
* @param file_uri {string} Image URI
* @return {Promise<Barcode[]>} Returns a promise that fulfills with the data in barcode
* @returns {Promise<Barcode[]>} Returns a promise that fulfills with the data in barcode
*/
@Cordova()
barcodeDetector(file_uri: string): Promise<Barcode[]> {
@ -279,8 +280,9 @@ export class FirebaseVision extends AwesomeCordovaNativePlugin {
}
/**
* Recognize object in image
*
* @param file_uri {string} Image URI
* @return {Promise<ImageLabel[]>} Returns a promise that fulfills with the information about entities in an image
* @returns {Promise<ImageLabel[]>} Returns a promise that fulfills with the information about entities in an image
*/
@Cordova()
imageLabeler(file_uri: string): Promise<ImageLabel[]> {

View File

@ -118,7 +118,6 @@ export interface FirebaseUser {
* @description
* This plugin brings push notifications, analytics, event tracking, crash reporting and more from Google Firebase to your Cordova project! Android and iOS supported.
* It is a maintained fork from unmaintained ionic-navite plugin called Firebase.
*
* @usage
* ```typescript
* import { FirebaseX } from '@awesome-cordova-plugins/firebase-x/ngx';
@ -141,7 +140,6 @@ export interface FirebaseUser {
* ```
* @interfaces
* IChannelOptions
*
*/
@Plugin({
pluginName: 'FirebaseX',
@ -154,7 +152,8 @@ export interface FirebaseUser {
export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Get the current FCM token.
* @return {Promise<null | string>} Note that token will be null if it has not been established yet
*
* @returns {Promise<null | string>} Note that token will be null if it has not been established yet
*/
@Cordova()
getToken(): Promise<null | string> {
@ -163,7 +162,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Get the app instance ID (an constant ID which persists as long as the app is not uninstalled/reinstalled)
* @return {Promise<null | string>} Note that ID will be null if it has not been established yet
*
* @returns {Promise<null | string>} Note that ID will be null if it has not been established yet
*/
@Cordova()
getId(): Promise<null | string> {
@ -172,7 +172,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Get the current FCM user.
* @return {Promise<FirebaseUser | string>}
*
* @returns {Promise<FirebaseUser | string>}
*/
@Cordova()
getCurrentUser(): Promise<FirebaseUser | string> {
@ -181,7 +182,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Reload the current FCM user.
* @return {Promise<FirebaseUser | string>}
*
* @returns {Promise<FirebaseUser | string>}
*/
@Cordova()
reloadCurrentUser(): Promise<FirebaseUser | string> {
@ -190,7 +192,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Get notified when a token is refreshed.
* @return {Observable<any>}
*
* @returns {Observable<any>}
*/
@Cordova({
observable: true,
@ -202,7 +205,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* iOS only.
* Get the APNS token allocated for this app install.
* @return {Promise<null | string>} Note that token will be null if it has not been established yet
*
* @returns {Promise<null | string>} Note that token will be null if it has not been established yet
*/
@Cordova()
getAPNSToken(): Promise<null | string> {
@ -213,7 +217,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
* iOS only.
* Registers a handler to call when the APNS token is allocated.
* This will be called once when remote notifications permission has been granted by the user at runtime.
* @return {Observable<any>}
*
* @returns {Observable<any>}
*/
@Cordova({
observable: true,
@ -226,7 +231,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
* Registers a callback function to invoke when:
* - a notification or data message is received by the app
* - a system notification is tapped by the user
* @return {Observable<any>}
*
* @returns {Observable<any>}
*/
@Cordova({
observable: true,
@ -237,7 +243,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Grant permission to receive push notifications (will trigger prompt) and return hasPermission: true. iOS only (Android will always return true).
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova({
platforms: ['iOS'],
@ -248,7 +255,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Check permission to receive push notifications and return hasPermission: true. iOS only (Android will always return true).
* @return {Promise<boolean>}
*
* @returns {Promise<boolean>}
*/
@Cordova()
hasPermission(): Promise<boolean> {
@ -265,8 +273,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Set a number on the icon badge. Set 0 to clear the badge
*
* @param {number} badgeNumber
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
setBadgeNumber(badgeNumber: number): Promise<any> {
@ -275,7 +284,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Get icon badge number.
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova()
getBadgeNumber(): Promise<any> {
@ -284,7 +294,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Clear all pending notifications from the drawer.
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova({
platforms: ['Android'],
@ -295,8 +306,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Subscribe to a topic. Topic messaging allows you to send a message to multiple devices that have opted in to a particular topic.
*
* @param {string} topic
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
subscribe(topic: string): Promise<any> {
@ -305,8 +317,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Unsubscribe from a topic. This will stop you receiving messages for that topic.
*
* @param {string} topic
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
unsubscribe(topic: string): Promise<any> {
@ -324,6 +337,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Sets whether to autoinit new FCM tokens. By default, a new token will be generated as soon as the old one is removed.
* To prevent a new token being generated, by sure to disable autoinit using setAutoInitEnabled() before calling unregister().
*
* @param enabled
*/
@Cordova()
setAutoInitEnabled(enabled: boolean): Promise<any> {
@ -336,8 +351,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
* - for foreground/data notifications: data.notification_android_channel_id
*
* Calling on Android 7 or below or another platform will have no effect.
*
* @param {IChannelOptions} channelOptions
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
createChannel(channelOptions: IChannelOptions): Promise<any> {
@ -349,8 +365,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
* The default channel is used if no other channel exists or is specified in the notification.
* Any options not specified will not be overridden. Should be called as soon as possible (on app start) so default notifications will work as expected.
* Calling on Android 7 or below or another platform will have no effect.
*
* @param {IChannelOptions} channelOptions
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
setDefaultChannel(channelOptions: IChannelOptions): Promise<any> {
@ -360,8 +377,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Android 8+ only. Removes a previously defined channel.
* Calling on Android 7 or below or another platform will have no effect.
*
* @param {string} channelID
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
deleteChannel(channelID: string): Promise<any> {
@ -371,7 +389,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Android 8+ only. Gets a list of all channels.
* Calling on Android 7 or below or another platform will have no effect.
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova()
listChannels(): Promise<any> {
@ -380,6 +399,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Enable/disable analytics collection (useful for GDPR/privacy settings).
*
* @param {boolean} enabled
* @returns {Promise<any>}
*/
@ -390,6 +410,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Enable/disable Crashlytics collection.
*
* @param {boolean} enabled
* @returns {Promise<any>}
*/
@ -400,6 +421,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Enable/disable performance collection.
*
* @param {boolean} enabled
* @returns {Promise<any>}
*/
@ -410,9 +432,10 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Log an event using Analytics
*
* @param {string} type
* @param {Object} data
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
logEvent(type: string, data: any): Promise<any> {
@ -421,8 +444,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Set the name of the current screen in Analytics
*
* @param {string} name Screen name
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
setScreenName(name: string): Promise<any> {
@ -431,8 +455,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Set a user id for use in Analytics
*
* @param {string} userId
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
setUserId(userId: string): Promise<any> {
@ -441,9 +466,10 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Set a user property for use in Analytics
*
* @param {string} name
* @param {string} value
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
setUserProperty(name: string, value: string): Promise<any> {
@ -457,6 +483,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
* To add user IDs to your reports, assign each user a unique identifier in the form of an ID number, token, or hashed value.
*
* More info https://firebase.google.com/docs/crashlytics/customize-crash-reports?authuser=0#set_user_ids
*
* @param {string} userId
* @returns {Promise<any>}
*/
@ -469,7 +496,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
* Simulates (causes) a fatal native crash which causes a crash event to be sent to Crashlytics (useful for testing).
* See the Firebase documentation regarding crash testing.
* Crashes will appear under Event type = "Crashes" in the Crashlytics console.
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova()
sendCrash(): Promise<any> {
@ -479,8 +507,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Sends a crash-related log message that will appear in the Logs section of the next native crash event.
* Note: if you don't then crash, the message won't be sent! Also logs the message to the native device console.
*
* @param {string} message
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
logMessage(message: string): Promise<any> {
@ -492,9 +521,11 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
* The event will appear under Event type = "Non-fatals" in the Crashlytics console.
* The error message will appear in the Logs section of the non-fatal error event.
* Also logs the error message to the native device console.
*
* @param {string} error
* @param {object} (optional) a stack trace generated by stacktrace.js
* @return {Promise<any>}
* @param stackTrace
* @returns {Promise<any>}
*/
@Cordova()
logError(error: string, stackTrace?: object): Promise<any> {
@ -534,6 +565,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Switch current authentification system language, for example, the phone sms code.
*
* @param lang - language to change, ex: 'fr' for french
*/
@Cordova()
@ -544,6 +576,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Signs the user into Firebase with credentials obtained using verifyPhoneNumber().
* See the Android- and iOS-specific Firebase documentation for more info.
*
* @param {object} credential - a credential object returned by the success callback of an authentication method
*/
@Cordova()
@ -553,6 +586,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Creates a new email/password-based user account. If account creation is successful, user will be automatically signed in.
*
* @param email
* @param password
*/
@ -563,6 +597,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Signs in to an email/password-based user account.
*
* @param email
* @param password
*/
@ -573,6 +608,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Signs in user with custom token.
*
* @param customToken
*/
@Cordova()
@ -590,6 +626,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Authenticates the user with a Google account to obtain a credential that can be used to sign the user in/link to an existing user account/reauthenticate the user.
*
* @param clientId
*/
@Cordova()
@ -599,6 +636,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Authenticates the user with an Apple account using Sign In with Apple to obtain a credential that can be used to sign the user in/link to an existing user account/reauthenticate the user.
*
* @param locale
*/
@Cordova({
@ -611,9 +649,10 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Links the user account to an existing Firebase user account with credentials obtained using verifyPhoneNumber().
* See the Android- and iOS-specific Firebase documentation for more info.
*
* @param {object} credential - a credential object returned by the success callback of an authentication method
* @param {function} success - callback function to call on successful sign-in using credentials
* @param {function} error - callback function which will be passed a {string} error message as an argument
* @param {Function} success - callback function to call on successful sign-in using credentials
* @param {Function} error - callback function which will be passed a {string} error message as an argument
*/
@Cordova()
linkUserWithCredential(credential: object, success: () => void, error: (err: string) => void): Promise<any> {
@ -622,9 +661,10 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Reauthenticates the currently signed in user with credentials obtained via an authentication method such as verifyPhoneNumber() or authenticateUserWithGoogle().
*
* @param {Object} credential - a credential object returned by the success callback of an authentication method
* @param {function} success - callback function to call on successful sign-in using credentials
* @param {function} error - callback function which will be passed a {string} error message as an argument
* @param {Function} success - callback function to call on successful sign-in using credentials
* @param {Function} error - callback function which will be passed a {string} error message as an argument
*/
@Cordova()
reauthenticateWithCredential(credential: any, success: () => void, error: (err: string) => void): Promise<any> {
@ -649,7 +689,10 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Updates the display name and/or photo URL of the current Firebase user signed into the app.
*
* @param profile
* @param profile.name
* @param profile.photoUri
*/
@Cordova()
updateUserProfile(profile: { name: string; photoUri: string }): Promise<any> {
@ -658,6 +701,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Updates/sets the email address of the current Firebase user signed into the app.
*
* @param email
*/
@Cordova()
@ -676,6 +720,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Updates/sets the account password for the current Firebase user signed into the app.
*
* @param password
*/
@Cordova()
@ -686,6 +731,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Sends a password reset email to the specified user email address.
* Note: doesn't require the Firebase user to be signed in to the app.
*
* @param email
*/
@Cordova()
@ -703,7 +749,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Registers a Javascript function to invoke when Firebase Authentication state changes between user signed in/signed out.
* @param {function} fn - callback function to invoke when authentication state changes
*
* @param {Function} fn - callback function to invoke when authentication state changes
*/
@Cordova()
registerAuthStateChangeListener(fn: any): Promise<any> {
@ -712,8 +759,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Fetch Remote Config parameter values for your app.
*
* @param {number} cacheExpirationSeconds specify the cacheExpirationSeconds
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
fetch(cacheExpirationSeconds?: number): Promise<any> {
@ -722,7 +770,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Activate the Remote Config fetched config.
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova()
activateFetched(): Promise<any> {
@ -731,8 +780,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Retrieve a Remote Config value.
*
* @param {string} key
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
getValue(key: string): Promise<any> {
@ -741,8 +791,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Android only. Retrieve a Remote Config byte array.
*
* @param {string} key
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
getByteArray(key: string): Promise<any> {
@ -751,7 +802,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Android only. Get the current state of the FirebaseRemoteConfig singleton object.
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova()
getInfo(): Promise<any> {
@ -760,8 +812,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Android only. Change the settings for the FirebaseRemoteConfig object's operations.
*
* @param {Object} settings
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
setConfigSettings(settings: any): Promise<any> {
@ -770,8 +823,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Android only. Set defaults in the Remote Config.
*
* @param {Object} settings
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
setDefaults(settings: any): Promise<any> {
@ -780,8 +834,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Start a trace.
*
* @param {string} name
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
startTrace(name: string): Promise<any> {
@ -792,8 +847,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
* To count the performance-related events that occur in your app (such as cache hits or retries),
* add a line of code similar to the following whenever the event occurs,
* using a string other than retry to name that event if you are counting a different type of event.
*
* @param {string} name
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
incrementCounter(name: string): Promise<any> {
@ -802,8 +858,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Stop the trace.
*
* @param {string} name
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
stopTrace(name: string): Promise<any> {
@ -812,10 +869,11 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Adds a new document to a Firestore collection, which will be allocated an auto-generated document ID.
*
* @param {object} document - document object to add to collection
* @param {string} collection - name of top-level collection to add document to.
* @param {function} success - callback function to call on successfully adding the document. Will be passed a {string} argument containing the auto-generated document ID that the document was stored against.
* @param {function} error - callback function which will be passed a {string} error message as an argument.
* @param {Function} success - callback function to call on successfully adding the document. Will be passed a {string} argument containing the auto-generated document ID that the document was stored against.
* @param {Function} error - callback function which will be passed a {string} error message as an argument.
*/
@Cordova()
addDocumentToFirestoreCollection(
@ -829,11 +887,12 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Sets (adds/replaces) a document with the given ID in a Firestore collection.
*
* @param {string} documentId - document ID to use when setting document in the collection.
* @param {object} document - document object to set in collection.
* @param {string} collection - name of top-level collection to set document in.
* @param {function} success - callback function to call on successfully setting the document.
* @param {function} error - callback function which will be passed a {string} error message as an argument.
* @param {Function} success - callback function to call on successfully setting the document.
* @param {Function} error - callback function which will be passed a {string} error message as an argument.
*/
@Cordova()
setDocumentInFirestoreCollection(
@ -850,11 +909,12 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
* Updates an existing document with the given ID in a Firestore collection. This is a non-destructive update that will only
* overwrite existing keys in the existing document or add new ones if they don't already exist. If the no document with the
* specified ID exists in the collection, an error will be raised.
*
* @param {string} documentId - document ID of the document to update.
* @param {object} document - entire document or document fragment to update existing document with.
* @param {string} collection - name of top-level collection to update document in.
* @param {function} success - callback function to call on successfully updating the document.
* @param {function} error - callback function which will be passed a {string} error message as an argument.
* @param {Function} success - callback function to call on successfully updating the document.
* @param {Function} error - callback function which will be passed a {string} error message as an argument.
*/
@Cordova()
updateDocumentInFirestoreCollection(
@ -870,10 +930,11 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Deletes an existing document with the given ID in a Firestore collection.
* - Note: If the no document with the specified ID exists in the collection, the Firebase SDK will still return a successful outcome.
*
* @param {string} documentId - document ID of the document to delete.
* @param {string} collection - name of top-level collection to delete document in.
* @param {function} success - callback function to call on successfully deleting the document.
* @param {function} error - callback function which will be passed a {string} error message as an argument.
* @param {Function} success - callback function to call on successfully deleting the document.
* @param {Function} error - callback function which will be passed a {string} error message as an argument.
*/
@Cordova()
deleteDocumentFromFirestoreCollection(
@ -888,10 +949,11 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Fetches an existing document with the given ID from a Firestore collection.
* -Note: If the no document with the specified ID exists in the collection, the error callback will be invoked.
*
* @param {string} documentId - document ID of the document to fetch.
* @param {string} collection - name of top-level collection to fetch document from.
* @param {function} success - callback function to call on successfully fetching the document. Will be passed an {object} contain the document contents.
* @param {function} error - callback function which will be passed a {string} error message as an argument.
* @param {Function} success - callback function to call on successfully fetching the document. Will be passed an {object} contain the document contents.
* @param {Function} error - callback function which will be passed a {string} error message as an argument.
*/
@Cordova()
fetchDocumentInFirestoreCollection(
@ -905,10 +967,11 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Fetches all the documents in the specific collection.
*
* @param {string} collection - name of top-level collection to fetch.
* @param {function} success - callback function to call on successfully deleting the document. Will be passed an {object} containing all the documents in the 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.
* @param {Function} error - callback function which will be passed a {string} error message as an argument.
*/
@Cordova()
fetchFirestoreCollection(

View File

@ -7,7 +7,6 @@ import { Observable } from 'rxjs';
* @capacitorincompatible true
* @description
* This plugin brings push notifications, analytics, event tracking, crash reporting and more from Google Firebase to your Cordova project! Android and iOS supported (including iOS 10).
*
* @usage
* ```typescript
* import { Firebase } from '@awesome-cordova-plugins/firebase/ngx';
@ -39,7 +38,8 @@ import { Observable } from 'rxjs';
export class Firebase extends AwesomeCordovaNativePlugin {
/**
* Get the device token
* @return {Promise<null | string>} Note that token will be null if it has not been established yet
*
* @returns {Promise<null | string>} Note that token will be null if it has not been established yet
*/
@Cordova()
getToken(): Promise<null | string> {
@ -48,7 +48,8 @@ export class Firebase extends AwesomeCordovaNativePlugin {
/**
* Get notified when a token is refreshed
* @return {Observable<any>}
*
* @returns {Observable<any>}
*/
@Cordova({
observable: true,
@ -59,7 +60,8 @@ export class Firebase extends AwesomeCordovaNativePlugin {
/**
* Get notified when the user opens a notification
* @return {Observable<any>}
*
* @returns {Observable<any>}
*/
@Cordova({
observable: true,
@ -70,7 +72,8 @@ export class Firebase extends AwesomeCordovaNativePlugin {
/**
* Grant permission to receive push notifications
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova({
platforms: ['iOS'],
@ -81,7 +84,8 @@ export class Firebase extends AwesomeCordovaNativePlugin {
/**
* Check permission to receive push notifications
* @return {Promise<{isEnabled: boolean}>}
*
* @returns {Promise<{isEnabled: boolean}>}
*/
@Cordova()
hasPermission(): Promise<{ isEnabled: boolean }> {
@ -90,8 +94,9 @@ export class Firebase extends AwesomeCordovaNativePlugin {
/**
* Set icon badge number. Set to 0 to clear the badge.
*
* @param {number} badgeNumber
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
setBadgeNumber(badgeNumber: number): Promise<any> {
@ -100,7 +105,8 @@ export class Firebase extends AwesomeCordovaNativePlugin {
/**
* Get icon badge number
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova()
getBadgeNumber(): Promise<any> {
@ -109,8 +115,9 @@ export class Firebase extends AwesomeCordovaNativePlugin {
/**
* Subscribe to a topic
*
* @param {string} topic
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
subscribe(topic: string): Promise<any> {
@ -119,8 +126,9 @@ export class Firebase extends AwesomeCordovaNativePlugin {
/**
* Unsubscribe from a topic
*
* @param {string} topic
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
unsubscribe(topic: string): Promise<any> {
@ -138,9 +146,10 @@ export class Firebase extends AwesomeCordovaNativePlugin {
/**
* Log an event using Analytics
*
* @param {string} type
* @param {Object} data
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
logEvent(type: string, data: any): Promise<any> {
@ -149,8 +158,9 @@ export class Firebase extends AwesomeCordovaNativePlugin {
/**
* Log an Error using FirebaseCrash
*
* @param {string} message
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
logError(message: string): Promise<any> {
@ -159,8 +169,9 @@ export class Firebase extends AwesomeCordovaNativePlugin {
/**
* Set the name of the current screen in Analytics
*
* @param {string} name Screen name
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
setScreenName(name: string): Promise<any> {
@ -169,8 +180,9 @@ export class Firebase extends AwesomeCordovaNativePlugin {
/**
* Set a user id for use in Analytics
*
* @param {string} userId
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
setUserId(userId: string): Promise<any> {
@ -179,9 +191,10 @@ export class Firebase extends AwesomeCordovaNativePlugin {
/**
* Set a user property for use in Analytics
*
* @param {string} name
* @param {string} value
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova()
setUserProperty(name: string, value: string): Promise<any> {
@ -190,8 +203,9 @@ export class Firebase extends AwesomeCordovaNativePlugin {
/**
* Fetch Remote Config parameter values for your app
*
* @param {number} [cacheExpirationSeconds]
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({
successIndex: 1,
@ -203,7 +217,8 @@ export class Firebase extends AwesomeCordovaNativePlugin {
/**
* Activate the Remote Config fetched config
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova()
activateFetched(): Promise<any> {
@ -212,9 +227,10 @@ export class Firebase extends AwesomeCordovaNativePlugin {
/**
* Retrieve a Remote Config value
*
* @param {string} key
* @param {string} [namespace]
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({
successIndex: 2,
@ -226,9 +242,10 @@ export class Firebase extends AwesomeCordovaNativePlugin {
/**
* Retrieve a Remote Config byte array
*
* @param {string} key
* @param {string} [namespace]
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({
platforms: ['Android'],
@ -239,7 +256,8 @@ export class Firebase extends AwesomeCordovaNativePlugin {
/**
* Get the current state of the FirebaseRemoteConfig singleton object
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova({
platforms: ['Android'],
@ -250,8 +268,9 @@ export class Firebase extends AwesomeCordovaNativePlugin {
/**
* Change the settings for the FirebaseRemoteConfig object's operations
*
* @param {Object} settings
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({
platforms: ['Android'],
@ -262,9 +281,10 @@ export class Firebase extends AwesomeCordovaNativePlugin {
/**
* Set defaults in the Remote Config
*
* @param {Object} defaults
* @param {string} [namespace]
* @return {Promise<any>}
* @returns {Promise<any>}
*/
@Cordova({
platforms: ['Android'],
@ -275,6 +295,7 @@ export class Firebase extends AwesomeCordovaNativePlugin {
/**
* Start a trace.
*
* @param {string} trace Trace name
*/
@Cordova()
@ -286,6 +307,7 @@ export class Firebase extends AwesomeCordovaNativePlugin {
* To count the performance-related events that occur in your app (such as cache hits or retries), add a line of code
* similar to the following whenever the event occurs, using a string other than retry to name that event if you are
* counting a different type of event:
*
* @param {string} trace Trace name
* @param {string} counter Counter
*/
@ -296,6 +318,7 @@ export class Firebase extends AwesomeCordovaNativePlugin {
/**
* Stop the trace
*
* @param {string} trace Trace name
*/
@Cordova()
@ -303,6 +326,7 @@ export class Firebase extends AwesomeCordovaNativePlugin {
/**
* Allows the user to enable/disable analytics collection
*
* @param {boolean} enabled value to set collection
* @returns {Promise<any>}
*/
@ -314,6 +338,7 @@ export class Firebase extends AwesomeCordovaNativePlugin {
/**
* Allows the user to set User Identifier for crashlytics reporting
* https://firebase.google.com/docs/crashlytics/customize-crash-reports?authuser=0#set_user_ids
*
* @param {string} userId value to set the userId
* @returns {Promise<any>}
*/
@ -324,6 +349,7 @@ export class Firebase extends AwesomeCordovaNativePlugin {
/**
* Sends an SMS to the user with the SMS verification code and returns the Verification ID required to sign in using phone authentication
*
* @param {string} phoneNumber The phone number, including '+' and country code
* @param {number} timeoutDuration (Android only) The timeout in sec - no more SMS will be sent to this number until this timeout expires
* @returns {Promise<any>}
@ -339,7 +365,8 @@ export class Firebase extends AwesomeCordovaNativePlugin {
/**
* Clear all pending notifications from the drawer
* @return {Promise<any>}
*
* @returns {Promise<any>}
*/
@Cordova({
platforms: ['Android'],

View File

@ -6,7 +6,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
* @description This plugin allows you to switch the flashlight / torch of the device on and off.
*
* Requires Cordova plugin: `cordova-plugin-flashlight`. For more info, please see the [Flashlight plugin docs](https://github.com/EddyVerbruggen/Flashlight-PhoneGap-Plugin).
*
* @usage
* ```typescript
* import { Flashlight } from '@awesome-cordova-plugins/flashlight/ngx';
@ -30,6 +29,7 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
export class Flashlight extends AwesomeCordovaNativePlugin {
/**
* Checks if the flashlight is available
*
* @returns {Promise<boolean>} Returns a promise that resolves with a boolean stating if the flashlight is available.
*/
@Cordova()
@ -39,6 +39,7 @@ export class Flashlight extends AwesomeCordovaNativePlugin {
/**
* Switches the flashlight on
*
* @returns {Promise<boolean>}
*/
@Cordova()
@ -48,6 +49,7 @@ export class Flashlight extends AwesomeCordovaNativePlugin {
/**
* Switches the flashlight off
*
* @returns {Promise<boolean>}
*/
@Cordova()
@ -57,6 +59,7 @@ export class Flashlight extends AwesomeCordovaNativePlugin {
/**
* Toggles the flashlight
*
* @returns {Promise<any>}
*/
@Cordova()
@ -66,6 +69,7 @@ export class Flashlight extends AwesomeCordovaNativePlugin {
/**
* Checks if the flashlight is turned on.
*
* @returns {boolean}
*/
@Cordova({

Some files were not shown because too many files have changed in this diff Show More