mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-08-04 00:00:08 +08:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
421bbf20c2 |
@@ -5,12 +5,6 @@ export interface IAPProductOptions {
|
||||
id: string;
|
||||
alias?: string;
|
||||
type: string;
|
||||
/**
|
||||
* Name of the group your subscription product is a member of (default to "default").
|
||||
*
|
||||
* If you don't set anything, all subscription will be members of the same group.
|
||||
*/
|
||||
group?: string;
|
||||
}
|
||||
|
||||
export interface IRefeshResult {
|
||||
@@ -37,29 +31,6 @@ export type IAPProducts = IAPProduct[] & {
|
||||
|
||||
export type IAPQueryCallback = ((product: IAPProduct) => void) | ((error: IAPError) => void);
|
||||
|
||||
export interface IAPProductDiscount {
|
||||
/** The discount identifier */
|
||||
id: string;
|
||||
|
||||
/** Localized price, with currency symbol */
|
||||
price: string;
|
||||
|
||||
/** Price in micro-units (divide by 1000000 to get numeric price) */
|
||||
priceMicros: number;
|
||||
|
||||
/** Number of subscription periods */
|
||||
period: number;
|
||||
|
||||
/** Unit of the subcription period ("Day", "Week", "Month" or "Year") */
|
||||
periodUnit: string;
|
||||
|
||||
/** "PayAsYouGo", "UpFront", or "FreeTrial" */
|
||||
paymentMode: string;
|
||||
|
||||
/** True if the user is deemed eligible for this discount by the platform */
|
||||
eligible: boolean;
|
||||
}
|
||||
|
||||
export interface IAPProduct {
|
||||
id: string;
|
||||
|
||||
@@ -67,11 +38,6 @@ export interface IAPProduct {
|
||||
|
||||
type: string;
|
||||
|
||||
/**
|
||||
* Name of the group your subscription product is a member of (default to "default").
|
||||
*/
|
||||
group?: string;
|
||||
|
||||
state: string;
|
||||
|
||||
title: string;
|
||||
@@ -84,9 +50,6 @@ export interface IAPProduct {
|
||||
|
||||
currency: string;
|
||||
|
||||
/** Country code. Available only on iOS */
|
||||
countryCode?: string;
|
||||
|
||||
loaded: boolean;
|
||||
|
||||
valid: boolean;
|
||||
@@ -95,9 +58,6 @@ export interface IAPProduct {
|
||||
|
||||
owned: boolean;
|
||||
|
||||
/** Purchase has been initiated but is waiting for external action (for example, Ask to Buy on iOS) */
|
||||
deferred?: boolean;
|
||||
|
||||
downloading?: boolean;
|
||||
|
||||
downloaded?: boolean;
|
||||
@@ -114,19 +74,10 @@ export interface IAPProduct {
|
||||
|
||||
introPriceSubscriptionPeriod?: string;
|
||||
|
||||
/** Duration the introductory price is available (in period-unit) */
|
||||
introPricePeriod?: string;
|
||||
|
||||
/** Period for the introductory price ("Day", "Week", "Month" or "Year") */
|
||||
introPricePeriodUnit?: string;
|
||||
|
||||
introPricePaymentMode?: string;
|
||||
|
||||
ineligibleForIntroPrice?: boolean;
|
||||
|
||||
/** Array of discounts available for the product. */
|
||||
discounts?: IAPProductDiscount[];
|
||||
|
||||
billingPeriod?: number;
|
||||
|
||||
billingPeriodUnit?: string;
|
||||
@@ -612,7 +563,6 @@ export class IAPError {
|
||||
* IAPProduct
|
||||
* IAPProductOptions
|
||||
* IAPProductEvents
|
||||
* IAPProductDiscount
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
@@ -644,7 +594,7 @@ export class InAppPurchase2 extends AwesomeCordovaNativePlugin {
|
||||
* Debug level. Use QUIET, ERROR, WARNING, INFO or DEBUG constants
|
||||
*/
|
||||
@CordovaProperty()
|
||||
verbosity: number | boolean;
|
||||
verbosity: number;
|
||||
|
||||
/**
|
||||
* Set to true to clear the transaction queue. Not recommended for production.
|
||||
@@ -666,14 +616,6 @@ export class InAppPurchase2 extends AwesomeCordovaNativePlugin {
|
||||
@CordovaProperty()
|
||||
disableHostedContent: boolean;
|
||||
|
||||
/**
|
||||
* An optional string of developer profile name. This value can be used for payment risk evaluation.
|
||||
*
|
||||
* Do not use the user account ID for this field.
|
||||
*/
|
||||
@CordovaProperty()
|
||||
developerName: string;
|
||||
|
||||
@CordovaProperty()
|
||||
FREE_SUBSCRIPTION: string;
|
||||
|
||||
@@ -689,10 +631,6 @@ export class InAppPurchase2 extends AwesomeCordovaNativePlugin {
|
||||
@CordovaProperty()
|
||||
NON_CONSUMABLE: string;
|
||||
|
||||
/** Type: The application bundle */
|
||||
@CordovaProperty()
|
||||
APPLICATION: string;
|
||||
|
||||
@CordovaProperty()
|
||||
ERR_SETUP: number;
|
||||
|
||||
@@ -756,46 +694,6 @@ export class InAppPurchase2 extends AwesomeCordovaNativePlugin {
|
||||
@CordovaProperty()
|
||||
ERR_SUBSCRIPTION_UPDATE_NOT_AVAILABLE: number;
|
||||
|
||||
/** Error: The requested product is not available in the store. */
|
||||
@CordovaProperty()
|
||||
ERR_PRODUCT_NOT_AVAILABLE: number;
|
||||
|
||||
/** Error: The user has not allowed access to Cloud service information */
|
||||
@CordovaProperty()
|
||||
ERR_CLOUD_SERVICE_PERMISSION_DENIED: number;
|
||||
|
||||
/** Error: The device could not connect to the network. */
|
||||
@CordovaProperty()
|
||||
ERR_CLOUD_SERVICE_NETWORK_CONNECTION_FAILED: number;
|
||||
|
||||
/** Error: The user has revoked permission to use this cloud service. */
|
||||
@CordovaProperty()
|
||||
ERR_CLOUD_SERVICE_REVOKED: number;
|
||||
|
||||
/** Error: The user has not yet acknowledged Apple's privacy policy */
|
||||
@CordovaProperty()
|
||||
ERR_PRIVACY_ACKNOWLEDGEMENT_REQUIRED: number;
|
||||
|
||||
/** Error: The app is attempting to use a property for which it does not have the required entitlement. */
|
||||
@CordovaProperty()
|
||||
ERR_UNAUTHORIZED_REQUEST_DATA: number;
|
||||
|
||||
/** Error: The offer identifier is invalid. */
|
||||
@CordovaProperty()
|
||||
ERR_INVALID_OFFER_IDENTIFIER: number;
|
||||
|
||||
/** Error: The price you specified in App Store Connect is no longer valid. */
|
||||
@CordovaProperty()
|
||||
ERR_INVALID_OFFER_PRICE: number;
|
||||
|
||||
/** Error: The signature in a payment discount is not valid. */
|
||||
@CordovaProperty()
|
||||
ERR_INVALID_SIGNATURE: number;
|
||||
|
||||
/** Error: Parameters are missing in a payment discount. */
|
||||
@CordovaProperty()
|
||||
ERR_MISSING_OFFER_PARAMS: number;
|
||||
|
||||
@CordovaProperty()
|
||||
REGISTERED: string;
|
||||
|
||||
@@ -885,25 +783,12 @@ export class InAppPurchase2 extends AwesomeCordovaNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Register error handler.
|
||||
* Register error handler
|
||||
*
|
||||
* Can also be called with an error code as the first argument to only listen to a specific error code.
|
||||
*
|
||||
* @param onErrorOrErrorCode {Function | number} function to call on error, or an error code to filter on
|
||||
* @param [onError] {Function} function to call on error, when the first argument is an error code
|
||||
* @param onError {Function} function to call on error
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
error(onErrorOrErrorCode: Function | number, onError?: (err: IAPError) => void): void {}
|
||||
|
||||
/**
|
||||
* Return all products member of a given subscription group.
|
||||
*
|
||||
* @param groupId
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
getGroup(groupId: string): IAPProduct[] {
|
||||
return;
|
||||
}
|
||||
error(onError: Function): void {}
|
||||
|
||||
/**
|
||||
* Add or register a product
|
||||
|
||||
@@ -219,6 +219,17 @@ export class Intercom extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Suppress the given proactive content types, independently of `setInAppMessageVisibility`.
|
||||
* @note All proactive content is visible by default; pass an empty array to unsuppress all.
|
||||
*
|
||||
* @param types An array of content type strings to suppress, e.g. `[IntercomPresentContentType.Carousel, IntercomPresentContentType.Survey]`.
|
||||
*/
|
||||
@Cordova()
|
||||
suppressProactiveContent(types: IntercomPresentContentType[]): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide all Intercom windows that are currently displayed.
|
||||
* This will hide the Messenger, Help Center, Articles, and in-product messages (eg. Mobile Carousels, chats, and posts).
|
||||
@@ -375,8 +386,7 @@ export enum IntercomPresentContentType {
|
||||
}
|
||||
|
||||
export type IntercomPresentContent =
|
||||
| { id: string; type: IntercomPresentContentType }
|
||||
| { ids: string[]; type: IntercomPresentContentType };
|
||||
{ id: string; type: IntercomPresentContentType } | { ids: string[]; type: IntercomPresentContentType };
|
||||
|
||||
export interface IntercomUserAttributes {
|
||||
email?: string;
|
||||
|
||||
Reference in New Issue
Block a user