chore(package): bump dependencies and lint rules

This commit is contained in:
Daniel
2018-03-16 22:04:01 +01:00
parent 7547a94c80
commit 21ad4734fa
178 changed files with 10565 additions and 4194 deletions
@@ -1,5 +1,10 @@
import { Plugin, IonicNativePlugin, Cordova, CordovaProperty } from '@ionic-native/core';
import { Injectable } from '@angular/core';
import {
Cordova,
CordovaProperty,
IonicNativePlugin,
Plugin
} from '@ionic-native/core';
/**
* @name In App Purchase 2
@@ -81,21 +86,22 @@ export type IAPProducts = Array<IAPProduct> & {
/**
* Get product by ID
*/
byId: { [id: string]: IAPProduct; };
byId: { [id: string]: IAPProduct };
/**
* Get product by alias
*/
byAlias: { [alias: string]: IAPProduct; };
byAlias: { [alias: string]: IAPProduct };
/**
* Remove all products (for testing only).
*/
reset: () => {};
};
export type IAPQueryCallback = ((product: IAPProduct) => void) | ((error: IAPError) => void);
export type IAPQueryCallback =
| ((product: IAPProduct) => void)
| ((error: IAPError) => void);
export interface IAPProduct {
id: string;
alias: string;
@@ -145,7 +151,6 @@ export interface IAPProduct {
off(callback: Function): void;
trigger(action: string, args: any): void;
}
export interface IAPProductEvents {
@@ -165,7 +170,11 @@ export interface IAPProductEvents {
verified: (callback: IAPQueryCallback) => void;
unverified: (callback: IAPQueryCallback) => void;
expired: (callback: IAPQueryCallback) => void;
downloading: (product: IAPProduct, progress: any, time_remaining: any) => void;
downloading: (
product: IAPProduct,
progress: any,
time_remaining: any
) => void;
downloaded: (callback: IAPQueryCallback) => void;
}
@@ -199,163 +208,115 @@ export class IAPError {
pluginRef: 'store',
repo: 'https://github.com/j3k0/cordova-plugin-purchase',
platforms: ['iOS', 'Android', 'Windows'],
install: 'ionic cordova plugin add cc.fovea.cordova.purchase --variable BILLING_KEY="<ANDROID_BILLING_KEY>"'
install:
'ionic cordova plugin add cc.fovea.cordova.purchase --variable BILLING_KEY="<ANDROID_BILLING_KEY>"'
})
@Injectable()
export class InAppPurchase2 extends IonicNativePlugin {
@CordovaProperty QUIET: number;
@CordovaProperty
QUIET: number;
@CordovaProperty ERROR: number;
@CordovaProperty
ERROR: number;
@CordovaProperty WARNING: number;
@CordovaProperty
WARNING: number;
@CordovaProperty INFO: number;
@CordovaProperty
INFO: number;
@CordovaProperty
DEBUG: number;
@CordovaProperty DEBUG: number;
/**
* Debug level. Use QUIET, ERROR, WARNING, INFO or DEBUG constants
*/
@CordovaProperty
verbosity: number;
@CordovaProperty verbosity: number;
/**
* Set to true to invoke the platform purchase sandbox. (Windows only)
*/
@CordovaProperty
sandbox: boolean;
@CordovaProperty sandbox: boolean;
@CordovaProperty FREE_SUBSCRIPTION: string;
@CordovaProperty PAID_SUBSCRIPTION: string;
@CordovaProperty NON_RENEWING_SUBSCRIPTION: string;
@CordovaProperty CONSUMABLE: string;
@CordovaProperty NON_CONSUMABLE: string;
@CordovaProperty ERR_SETUP: number;
@CordovaProperty ERR_LOAD: number;
@CordovaProperty ERR_PURCHASE: number;
@CordovaProperty ERR_LOAD_RECEIPTS: number;
@CordovaProperty ERR_CLIENT_INVALID: number;
@CordovaProperty ERR_PAYMENT_CANCELLED: number;
@CordovaProperty ERR_PAYMENT_INVALID: number;
@CordovaProperty ERR_PAYMENT_NOT_ALLOWED: number;
@CordovaProperty ERR_UNKNOWN: number;
@CordovaProperty ERR_REFRESH_RECEIPTS: number;
@CordovaProperty ERR_INVALID_PRODUCT_ID: number;
@CordovaProperty ERR_FINISH: number;
@CordovaProperty ERR_COMMUNICATION: number;
@CordovaProperty ERR_SUBSCRIPTIONS_NOT_AVAILABLE: number;
@CordovaProperty ERR_MISSING_TOKEN: number;
@CordovaProperty ERR_VERIFICATION_FAILED: number;
@CordovaProperty ERR_BAD_RESPONSE: number;
@CordovaProperty ERR_REFRESH: number;
@CordovaProperty ERR_PAYMENT_EXPIRED: number;
@CordovaProperty ERR_DOWNLOAD: number;
@CordovaProperty ERR_SUBSCRIPTION_UPDATE_NOT_AVAILABLE: number;
@CordovaProperty REGISTERED: string;
@CordovaProperty INVALID: string;
@CordovaProperty VALID: string;
@CordovaProperty REQUESTED: string;
@CordovaProperty INITIATED: string;
@CordovaProperty APPROVED: string;
@CordovaProperty FINISHED: string;
@CordovaProperty OWNED: string;
@CordovaProperty DOWNLOADING: string;
@CordovaProperty DOWNLOADED: string;
@CordovaProperty INVALID_PAYLOAD: number;
@CordovaProperty CONNECTION_FAILED: number;
@CordovaProperty PURCHASE_EXPIRED: number;
@CordovaProperty products: IAPProducts;
@CordovaProperty
FREE_SUBSCRIPTION: string;
@CordovaProperty
PAID_SUBSCRIPTION: string;
@CordovaProperty
NON_RENEWING_SUBSCRIPTION: string;
@CordovaProperty
CONSUMABLE: string;
@CordovaProperty
NON_CONSUMABLE: string;
@CordovaProperty
ERR_SETUP: number;
@CordovaProperty
ERR_LOAD: number;
@CordovaProperty
ERR_PURCHASE: number;
@CordovaProperty
ERR_LOAD_RECEIPTS: number;
@CordovaProperty
ERR_CLIENT_INVALID: number;
@CordovaProperty
ERR_PAYMENT_CANCELLED: number;
@CordovaProperty
ERR_PAYMENT_INVALID: number;
@CordovaProperty
ERR_PAYMENT_NOT_ALLOWED: number;
@CordovaProperty
ERR_UNKNOWN: number;
@CordovaProperty
ERR_REFRESH_RECEIPTS: number;
@CordovaProperty
ERR_INVALID_PRODUCT_ID: number;
@CordovaProperty
ERR_FINISH: number;
@CordovaProperty
ERR_COMMUNICATION: number;
@CordovaProperty
ERR_SUBSCRIPTIONS_NOT_AVAILABLE: number;
@CordovaProperty
ERR_MISSING_TOKEN: number;
@CordovaProperty
ERR_VERIFICATION_FAILED: number;
@CordovaProperty
ERR_BAD_RESPONSE: number;
@CordovaProperty
ERR_REFRESH: number;
@CordovaProperty
ERR_PAYMENT_EXPIRED: number;
@CordovaProperty
ERR_DOWNLOAD: number;
@CordovaProperty
ERR_SUBSCRIPTION_UPDATE_NOT_AVAILABLE: number;
@CordovaProperty
REGISTERED: string;
@CordovaProperty
INVALID: string;
@CordovaProperty
VALID: string;
@CordovaProperty
REQUESTED: string;
@CordovaProperty
INITIATED: string;
@CordovaProperty
APPROVED: string;
@CordovaProperty
FINISHED: string;
@CordovaProperty
OWNED: string;
@CordovaProperty
DOWNLOADING: string;
@CordovaProperty
DOWNLOADED: string;
@CordovaProperty
INVALID_PAYLOAD: number;
@CordovaProperty
CONNECTION_FAILED: number;
@CordovaProperty
PURCHASE_EXPIRED: number;
@CordovaProperty
products: IAPProducts;
@CordovaProperty
validator: string | ((product: string | IAPProduct, callback: Function) => void);
validator:
| string
| ((product: string | IAPProduct, callback: Function) => void);
@CordovaProperty
log: {
@@ -370,7 +331,9 @@ export class InAppPurchase2 extends IonicNativePlugin {
* @param idOrAlias
*/
@Cordova({ sync: true })
get(idOrAlias: string): IAPProduct { return; }
get(idOrAlias: string): IAPProduct {
return;
}
/**
* Register error handler
@@ -383,7 +346,7 @@ export class InAppPurchase2 extends IonicNativePlugin {
* Add or register a product
* @param product {IAPProductOptions}
*/
@Cordova({ sync: true})
@Cordova({ sync: true })
register(product: IAPProductOptions): void {}
/**
@@ -394,7 +357,13 @@ export class InAppPurchase2 extends IonicNativePlugin {
* @return {IAPProductEvents}
*/
@Cordova({ sync: true })
when(query: string | IAPProduct, event?: string, callback?: IAPQueryCallback): IAPProductEvents { return; }
when(
query: string | IAPProduct,
event?: string,
callback?: IAPQueryCallback
): IAPProductEvents {
return;
}
/**
* Identical to `when`, but the callback will be called only once. After being called, the callback will be unregistered.
@@ -404,7 +373,13 @@ export class InAppPurchase2 extends IonicNativePlugin {
* @return {IAPProductEvents}
*/
@Cordova({ sync: true })
once(query: string | IAPProduct, event?: string, callback?: IAPQueryCallback): IAPProductEvents { return; }
once(
query: string | IAPProduct,
event?: string,
callback?: IAPQueryCallback
): IAPProductEvents {
return;
}
/**
* Unregister a callback. Works for callbacks registered with ready, when, once and error.
@@ -414,16 +389,22 @@ export class InAppPurchase2 extends IonicNativePlugin {
off(callback: Function): void {}
@Cordova({ sync: true })
order(product: string | IAPProduct, additionalData?: any): { then: Function; error: Function; } { return; }
order(
product: string | IAPProduct,
additionalData?: any
): { then: Function; error: Function } {
return;
}
/**
*
* @return {Promise<any>} returns a promise that resolves when the store is ready
*/
@Cordova()
ready(): Promise<void> { return; }
ready(): Promise<void> {
return;
}
@Cordova({ sync: true })
refresh(): void {}
}