feat(in-app-purchase-2): update validator for custom headers (#4262)

This commit is contained in:
Marius Backes 2022-09-05 19:05:08 +02:00 committed by GitHub
parent 1b45462542
commit 8b826e3c1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -745,7 +745,13 @@ export class InAppPurchase2 extends AwesomeCordovaNativePlugin {
products: IAPProducts;
@CordovaProperty()
validator: string | ((url: string | IAPProduct, callback: Function) => void);
validator:
| string
| ((url: string | IAPProduct, callback: Function) => void)
| {
url: string;
headers?: { [token: string]: string };
};
@CordovaProperty()
applicationUsername: string | (() => string);
@ -915,8 +921,11 @@ export class InAppPurchase2 extends AwesomeCordovaNativePlugin {
/** Opens the Manage Billing page (AppStore, Play, Microsoft, ...), where the user can update his/her payment methods. */
@Cordova({ sync: true })
manageBilling(): void {}
/** Open the subscription price change notification workflow. (Play) See: https://developer.android.com/google/play/billing/subscriptions#price-change-communicate */
@Cordova({ sync: true })
launchPriceChangeConfirmationFlow(productId: string, callback: (status: 'OK' | 'UnknownProduct' | 'UserCanceled') => void): void {};
launchPriceChangeConfirmationFlow(
productId: string,
callback: (status: 'OK' | 'UnknownProduct' | 'UserCanceled') => void
): void {}
}