@revenuecat/purchases-capacitor 7.5.10 → 7.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -1
- package/RevenueCatPurchasesCapacitor.podspec +1 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/revenuecat/purchases/capacitor/PurchasesPlugin.kt +10 -1
- package/dist/docs.json +26 -1
- package/dist/esm/definitions.d.ts +12 -1
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.d.ts +3 -0
- package/dist/esm/web.js +3 -0
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +3 -0
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +3 -0
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/PropertySetterPluginExtensions.swift +7 -0
- package/ios/Plugin/PurchasesPlugin.m +1 -0
- package/ios/Plugin/PurchasesPlugin.swift +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -98,6 +98,7 @@ This plugin is based on [CapGo's Capacitor plugin](https://www.npmjs.com/package
|
|
|
98
98
|
* [`setMixpanelDistinctID(...)`](#setmixpaneldistinctid)
|
|
99
99
|
* [`setFirebaseAppInstanceID(...)`](#setfirebaseappinstanceid)
|
|
100
100
|
* [`setOnesignalID(...)`](#setonesignalid)
|
|
101
|
+
* [`setOnesignalUserID(...)`](#setonesignaluserid)
|
|
101
102
|
* [`setAirshipChannelID(...)`](#setairshipchannelid)
|
|
102
103
|
* [`setMediaSource(...)`](#setmediasource)
|
|
103
104
|
* [`setCampaign(...)`](#setcampaign)
|
|
@@ -812,7 +813,7 @@ setOnesignalID(options: { onesignalID: string | null; }) => Promise<void>
|
|
|
812
813
|
```
|
|
813
814
|
|
|
814
815
|
Subscriber attribute associated with the OneSignal Player ID for the user
|
|
815
|
-
Required for the RevenueCat OneSignal integration
|
|
816
|
+
Required for the RevenueCat OneSignal integration. Deprecated for OneSignal versions above v9.0.
|
|
816
817
|
|
|
817
818
|
| Param | Type | Description |
|
|
818
819
|
| ------------- | --------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
|
|
@@ -821,6 +822,22 @@ Required for the RevenueCat OneSignal integration
|
|
|
821
822
|
--------------------
|
|
822
823
|
|
|
823
824
|
|
|
825
|
+
### setOnesignalUserID(...)
|
|
826
|
+
|
|
827
|
+
```typescript
|
|
828
|
+
setOnesignalUserID(options: { onesignalUserID: string | null; }) => Promise<void>
|
|
829
|
+
```
|
|
830
|
+
|
|
831
|
+
Subscriber attribute associated with the OneSignal User ID for the user
|
|
832
|
+
Required for the RevenueCat OneSignal integration with versions v11.0 and above.
|
|
833
|
+
|
|
834
|
+
| Param | Type | Description |
|
|
835
|
+
| ------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
|
|
836
|
+
| **`options`** | <code>{ onesignalUserID: string \| null; }</code> | OneSignal UserId to use in OneSignal integration. Empty String or null will delete the subscriber attribute. |
|
|
837
|
+
|
|
838
|
+
--------------------
|
|
839
|
+
|
|
840
|
+
|
|
824
841
|
### setAirshipChannelID(...)
|
|
825
842
|
|
|
826
843
|
```typescript
|
|
@@ -13,6 +13,6 @@ Pod::Spec.new do |s|
|
|
|
13
13
|
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
14
|
s.ios.deployment_target = '13.0'
|
|
15
15
|
s.dependency 'Capacitor'
|
|
16
|
-
s.dependency 'PurchasesHybridCommon', '10.
|
|
16
|
+
s.dependency 'PurchasesHybridCommon', '10.9.0'
|
|
17
17
|
s.swift_version = '5.1'
|
|
18
18
|
end
|
package/android/build.gradle
CHANGED
|
@@ -53,7 +53,7 @@ dependencies {
|
|
|
53
53
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
54
54
|
implementation project(':capacitor-android')
|
|
55
55
|
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
|
56
|
-
implementation 'com.revenuecat.purchases:purchases-hybrid-common:10.
|
|
56
|
+
implementation 'com.revenuecat.purchases:purchases-hybrid-common:10.9.0'
|
|
57
57
|
testImplementation "junit:junit:$junitVersion"
|
|
58
58
|
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
59
59
|
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
@@ -61,6 +61,7 @@ import com.revenuecat.purchases.hybridcommon.setMediaSource as setMediaSourceCom
|
|
|
61
61
|
import com.revenuecat.purchases.hybridcommon.setMixpanelDistinctID as setMixpanelDistinctIDCommon
|
|
62
62
|
import com.revenuecat.purchases.hybridcommon.setMparticleID as setMparticleIDCommon
|
|
63
63
|
import com.revenuecat.purchases.hybridcommon.setOnesignalID as setOnesignalIDCommon
|
|
64
|
+
import com.revenuecat.purchases.hybridcommon.setOnesignalUserID as setOnesignalUserIDCommon
|
|
64
65
|
import com.revenuecat.purchases.hybridcommon.setPhoneNumber as setPhoneNumberCommon
|
|
65
66
|
import com.revenuecat.purchases.hybridcommon.setProxyURLString as setProxyURLStringCommon
|
|
66
67
|
import com.revenuecat.purchases.hybridcommon.setPushToken as setPushTokenCommon
|
|
@@ -76,7 +77,7 @@ class PurchasesPlugin : Plugin() {
|
|
|
76
77
|
|
|
77
78
|
companion object {
|
|
78
79
|
private const val PLATFORM_NAME = "capacitor"
|
|
79
|
-
private const val PLUGIN_VERSION = "7.
|
|
80
|
+
private const val PLUGIN_VERSION = "7.6.1"
|
|
80
81
|
|
|
81
82
|
private const val CUSTOMER_INFO_KEY = "customerInfo"
|
|
82
83
|
}
|
|
@@ -487,6 +488,14 @@ class PurchasesPlugin : Plugin() {
|
|
|
487
488
|
call.resolve()
|
|
488
489
|
}
|
|
489
490
|
|
|
491
|
+
@PluginMethod(returnType = PluginMethod.RETURN_NONE)
|
|
492
|
+
fun setOnesignalUserID(call: PluginCall) {
|
|
493
|
+
if (rejectIfNotConfigured(call)) return
|
|
494
|
+
val onesignalUserID = call.getString("onesignalUserID")
|
|
495
|
+
setOnesignalUserIDCommon(onesignalUserID)
|
|
496
|
+
call.resolve()
|
|
497
|
+
}
|
|
498
|
+
|
|
490
499
|
@PluginMethod(returnType = PluginMethod.RETURN_NONE)
|
|
491
500
|
fun setAirshipChannelID(call: PluginCall) {
|
|
492
501
|
if (rejectIfNotConfigured(call)) return
|
package/dist/docs.json
CHANGED
|
@@ -1004,10 +1004,35 @@
|
|
|
1004
1004
|
"text": "The promise will be rejected if configure has not been called yet or if there's an error\nsetting the OneSignal ID."
|
|
1005
1005
|
}
|
|
1006
1006
|
],
|
|
1007
|
-
"docs": "Subscriber attribute associated with the OneSignal Player ID for the user\nRequired for the RevenueCat OneSignal integration",
|
|
1007
|
+
"docs": "Subscriber attribute associated with the OneSignal Player ID for the user\nRequired for the RevenueCat OneSignal integration. Deprecated for OneSignal versions above v9.0.",
|
|
1008
1008
|
"complexTypes": [],
|
|
1009
1009
|
"slug": "setonesignalid"
|
|
1010
1010
|
},
|
|
1011
|
+
{
|
|
1012
|
+
"name": "setOnesignalUserID",
|
|
1013
|
+
"signature": "(options: { onesignalUserID: string | null; }) => Promise<void>",
|
|
1014
|
+
"parameters": [
|
|
1015
|
+
{
|
|
1016
|
+
"name": "options",
|
|
1017
|
+
"docs": "OneSignal UserId to use in OneSignal integration. Empty String or null will delete the subscriber attribute.",
|
|
1018
|
+
"type": "{ onesignalUserID: string | null; }"
|
|
1019
|
+
}
|
|
1020
|
+
],
|
|
1021
|
+
"returns": "Promise<void>",
|
|
1022
|
+
"tags": [
|
|
1023
|
+
{
|
|
1024
|
+
"name": "param",
|
|
1025
|
+
"text": "options OneSignal UserId to use in OneSignal integration. Empty String or null will delete the subscriber attribute."
|
|
1026
|
+
},
|
|
1027
|
+
{
|
|
1028
|
+
"name": "returns",
|
|
1029
|
+
"text": "The promise will be rejected if configure has not been called yet or if there's an error\nsetting the OneSignal user ID."
|
|
1030
|
+
}
|
|
1031
|
+
],
|
|
1032
|
+
"docs": "Subscriber attribute associated with the OneSignal User ID for the user\nRequired for the RevenueCat OneSignal integration with versions v11.0 and above.",
|
|
1033
|
+
"complexTypes": [],
|
|
1034
|
+
"slug": "setonesignaluserid"
|
|
1035
|
+
},
|
|
1011
1036
|
{
|
|
1012
1037
|
"name": "setAirshipChannelID",
|
|
1013
1038
|
"signature": "(options: { airshipChannelID: string | null; }) => Promise<void>",
|
|
@@ -526,7 +526,7 @@ export interface PurchasesPlugin {
|
|
|
526
526
|
}): Promise<void>;
|
|
527
527
|
/**
|
|
528
528
|
* Subscriber attribute associated with the OneSignal Player ID for the user
|
|
529
|
-
* Required for the RevenueCat OneSignal integration
|
|
529
|
+
* Required for the RevenueCat OneSignal integration. Deprecated for OneSignal versions above v9.0.
|
|
530
530
|
*
|
|
531
531
|
* @param options OneSignal Player ID to use in OneSignal integration. Empty String or null will delete the subscriber attribute.
|
|
532
532
|
* @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error
|
|
@@ -535,6 +535,17 @@ export interface PurchasesPlugin {
|
|
|
535
535
|
setOnesignalID(options: {
|
|
536
536
|
onesignalID: string | null;
|
|
537
537
|
}): Promise<void>;
|
|
538
|
+
/**
|
|
539
|
+
* Subscriber attribute associated with the OneSignal User ID for the user
|
|
540
|
+
* Required for the RevenueCat OneSignal integration with versions v11.0 and above.
|
|
541
|
+
*
|
|
542
|
+
* @param options OneSignal UserId to use in OneSignal integration. Empty String or null will delete the subscriber attribute.
|
|
543
|
+
* @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error
|
|
544
|
+
* setting the OneSignal user ID.
|
|
545
|
+
*/
|
|
546
|
+
setOnesignalUserID(options: {
|
|
547
|
+
onesignalUserID: string | null;
|
|
548
|
+
}): Promise<void>;
|
|
538
549
|
/**
|
|
539
550
|
* Subscriber attribute associated with the Airship Channel ID for the user
|
|
540
551
|
* Required for the RevenueCat Airship integration
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAwBA,cAAc,+CAA+C,CAAC","sourcesContent":["import type {\n CustomerInfo,\n CustomerInfoUpdateListener,\n GoogleProductChangeInfo,\n IntroEligibility,\n LogHandler,\n LogInResult,\n MakePurchaseResult,\n PurchasesConfiguration,\n PurchasesEntitlementInfo,\n PurchasesOfferings,\n PurchasesPackage,\n PurchasesPromotionalOffer,\n PurchasesStoreProduct,\n PurchasesStoreProductDiscount,\n SubscriptionOption,\n BILLING_FEATURE,\n LOG_LEVEL,\n PRODUCT_CATEGORY,\n REFUND_REQUEST_STATUS,\n IN_APP_MESSAGE_TYPE,\n PurchasesOffering,\n} from '@revenuecat/purchases-typescript-internal-esm';\n\nexport * from '@revenuecat/purchases-typescript-internal-esm';\n\nexport type PurchasesCallbackId = string;\n\nexport interface GetProductOptions {\n /**\n * Array of product identifiers to obtain\n */\n productIdentifiers: string[];\n /**\n * Optional type of products to fetch, can be SUBSCRIPTION or NON_SUBSCRIPTION. SUBSCRIPTION by default. Ignored in iOS.\n */\n type?: PRODUCT_CATEGORY;\n}\n\nexport interface PurchaseStoreProductOptions {\n /**\n * The product you want to purchase\n */\n product: PurchasesStoreProduct;\n /**\n * Android only. Optional GoogleProductChangeInfo you\n * wish to upgrade from containing the oldProductIdentifier and the optional prorationMode.\n */\n googleProductChangeInfo?: GoogleProductChangeInfo | null;\n /**\n * Android and Google only. Optional boolean indicates personalized pricing on products available for purchase in the EU.\n * For compliance with EU regulations. User will see \"This price has been customized for you\" in the purchase dialog when true.\n * See https://developer.android.com/google/play/billing/integrate#personalized-price for more info.\n */\n googleIsPersonalizedPrice?: boolean | null;\n}\n\nexport interface PurchaseDiscountedProductOptions {\n /**\n * The product you want to purchase\n */\n product: PurchasesStoreProduct;\n /**\n * Discount to apply to this package. Retrieve this discount using getPromotionalOffer.\n */\n discount: PurchasesPromotionalOffer;\n}\n\nexport interface PurchasePackageOptions {\n /**\n * The Package you wish to purchase. You can get the Packages by calling getOfferings\n */\n aPackage: PurchasesPackage;\n /**\n * Android only. Optional GoogleProductChangeInfo you\n * wish to upgrade from containing the oldProductIdentifier and the optional prorationMode.\n */\n googleProductChangeInfo?: GoogleProductChangeInfo | null;\n /**\n * Android and Google only. Optional boolean indicates personalized pricing on products available for purchase in the EU.\n * For compliance with EU regulations. User will see \"This price has been customized for you\" in the purchase dialog when true.\n * See https://developer.android.com/google/play/billing/integrate#personalized-price for more info.\n */\n googleIsPersonalizedPrice?: boolean | null;\n}\n\nexport interface PurchaseSubscriptionOptionOptions {\n /**\n * The SubscriptionOption you wish to purchase. You can get the SubscriptionOption from StoreProducts by calling getOfferings\n */\n subscriptionOption: SubscriptionOption;\n /**\n * Android only. Optional GoogleProductChangeInfo you\n * wish to upgrade from containing the oldProductIdentifier and the optional prorationMode.\n */\n googleProductChangeInfo?: GoogleProductChangeInfo | null;\n /**\n * Android and Google only. Optional boolean indicates personalized pricing on products available for purchase in the EU.\n * For compliance with EU regulations. User will see \"This price has been customized for you\" in the purchase dialog when true.\n * See https://developer.android.com/google/play/billing/integrate#personalized-price for more info.\n */\n googleIsPersonalizedPrice?: boolean | null;\n}\n\nexport interface PurchaseDiscountedPackageOptions {\n /**\n * The Package you wish to purchase. You can get the Packages by calling getOfferings\n */\n aPackage: PurchasesPackage;\n /**\n * Discount to apply to this package. Retrieve this discount using getPromotionalOffer.\n */\n discount: PurchasesPromotionalOffer;\n}\n\nexport interface SyncObserverModeAmazonPurchaseOptions {\n /**\n * Product ID associated to the purchase.\n */\n productID: string;\n /**\n * ReceiptId that represents the Amazon purchase.\n */\n receiptID: string;\n /**\n * Amazon's userID. This parameter will be ignored when syncing a Google purchase.\n */\n amazonUserID: string;\n /**\n * Product's currency code in ISO 4217 format.\n */\n isoCurrencyCode?: string | null;\n /**\n * Product's price.\n */\n price?: number | null;\n}\n\nexport interface GetPromotionalOfferOptions {\n /**\n * The `PurchasesStoreProduct` the user intends to purchase.\n */\n product: PurchasesStoreProduct;\n /**\n * The `PurchasesStoreProductDiscount` to apply to the product.\n */\n discount: PurchasesStoreProductDiscount;\n}\n\nexport interface PurchasesPlugin {\n /**\n * Sets up Purchases with your API key and an app user id.\n * @param {PurchasesConfiguration} configuration RevenueCat configuration object including the API key and other optional parameters. See {@link PurchasesConfiguration}\n */\n configure(configuration: PurchasesConfiguration): Promise<void>;\n\n /**\n * Sets whether the SDK should return mocked results in the web version.\n * This won't affect the iOS and Android versions of the implementation.\n * Default is false\n * @param options Set shouldMockWebResults to true if you want the plugin methods to return mocked values\n */\n setMockWebResults(options: { shouldMockWebResults: boolean }): Promise<void>;\n\n /**\n * @param options Set finishTransactions to false if you aren't using Purchases SDK to\n * make the purchase\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet.\n */\n setFinishTransactions(options: {\n finishTransactions: boolean;\n }): Promise<void>;\n\n /**\n * iOS only.\n * @param options Set this property to true *only* when testing the ask-to-buy / SCA\n * purchases flow. More information: http://errors.rev.cat/ask-to-buy\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet.\n */\n setSimulatesAskToBuyInSandbox(options: {\n simulatesAskToBuyInSandbox: boolean;\n }): Promise<void>;\n\n /**\n * Sets a function to be called on updated customer info\n * @param {CustomerInfoUpdateListener} customerInfoUpdateListener CustomerInfo update listener\n */\n addCustomerInfoUpdateListener(\n customerInfoUpdateListener: CustomerInfoUpdateListener,\n ): Promise<PurchasesCallbackId>;\n\n /**\n * Removes a given CustomerInfoUpdateListener\n * @param {CustomerInfoUpdateListener} listenerToRemove CustomerInfoUpdateListener reference of the listener to remove\n * @returns Promise with boolean. True if listener was removed, false otherwise\n */\n removeCustomerInfoUpdateListener(\n listenerToRemove: PurchasesCallbackId,\n ): Promise<{ wasRemoved: boolean }>;\n\n // TODO: Support addShouldPurchasePromoProductListener functionality\n // /**\n // * Sets a function to be called on purchases initiated on the Apple App Store. This is only used in iOS.\n // * @param {ShouldPurchasePromoProductListener} shouldPurchasePromoProductListener Called when a user initiates a\n // * promotional in-app purchase from the App Store. If your app is able to handle a purchase at the current time, run\n // * the deferredPurchase function. If the app is not in a state to make a purchase: cache the deferredPurchase, then\n // * call the deferredPurchase when the app is ready to make the promotional purchase.\n // * If the purchase should never be made, you don't need to ever call the deferredPurchase and the app will not\n // * proceed with promotional purchases.\n // */\n // addShouldPurchasePromoProductListener(\n // shouldPurchasePromoProductListener: ShouldPurchasePromoProductListener,\n // ): Promise<PurchasesCallbackId>;\n //\n // /**\n // * Removes a given ShouldPurchasePromoProductListener\n // * @param {ShouldPurchasePromoProductListener} listenerToRemove ShouldPurchasePromoProductListener reference of\n // * the listener to remove\n // * @returns Promise with boolean. True if listener was removed, false otherwise\n // */\n // removeShouldPurchasePromoProductListener(\n // listenerToRemove: PurchasesCallbackId,\n // ): Promise<{ wasRemoved: boolean }>;\n\n /**\n * Gets the map of entitlements -> offerings -> products\n * @returns {Promise<PurchasesOfferings>} Promise of entitlements structure. The promise will be rejected if configure\n * has not been called yet.\n */\n getOfferings(): Promise<PurchasesOfferings>;\n\n /**\n * Retrieves a current offering for a placement identifier, use this to access offerings defined by targeting\n * placements configured in the RevenueCat dashboard.\n * @returns {Promise<PurchasesOffering | null>} Promise of optional offering. The promise will be rejected if configure\n * has not been called yet.\n */\n getCurrentOfferingForPlacement(options: {\n placementIdentifier: string;\n }): Promise<PurchasesOffering | null>;\n\n /**\n * Syncs subscriber attributes and then fetches the configured offerings for this user. This method is intended to\n * be called when using Targeting Rules with Custom Attributes. Any subscriber attributes should be set before\n * calling this method to ensure the returned offerings are applied with the latest subscriber attributes.\n * @returns {Promise<PurchasesOfferings>} Promise of entitlements structure. The promise will be rejected if configure\n * has not been called yet.\n */\n syncAttributesAndOfferingsIfNeeded(): Promise<PurchasesOfferings>;\n\n /**\n * Fetch the product info\n * @returns {Promise<PurchasesStoreProduct[]>} A promise containing an array of products. The promise will be rejected\n * if the products are not properly configured in RevenueCat or if there is another error retrieving them.\n * Rejections return an error code, and a userInfo object with more information. The promise will also be rejected\n * if configure has not been called yet.\n */\n getProducts(\n options: GetProductOptions,\n ): Promise<{ products: PurchasesStoreProduct[] }>;\n\n /**\n * Make a purchase\n *\n * @returns {Promise<{ productIdentifier: string, customerInfo:CustomerInfo }>} A promise of an object containing\n * a customer info object and a product identifier. Rejections return an error code,\n * a boolean indicating if the user cancelled the purchase, and an object with more information. The promise will\n * also be rejected if configure has not been called yet.\n */\n purchaseStoreProduct(\n options: PurchaseStoreProductOptions,\n ): Promise<MakePurchaseResult>;\n\n /**\n * iOS only. Purchase a product applying a given discount.\n *\n * @returns {Promise<{ productIdentifier: string, customerInfo:CustomerInfo }>} A promise of an object containing\n * a customer info object and a product identifier. Rejections return an error code,\n * a boolean indicating if the user cancelled the purchase, and an object with more information. The promise will be\n * rejected if configure has not been called yet.\n */\n purchaseDiscountedProduct(\n options: PurchaseDiscountedProductOptions,\n ): Promise<MakePurchaseResult>;\n\n /**\n * Make a purchase\n *\n * @returns {Promise<{ productIdentifier: string, customerInfo: CustomerInfo }>} A promise of an object containing\n * a customer info object and a product identifier. Rejections return an error code, a boolean indicating if the\n * user cancelled the purchase, and an object with more information. The promise will be also be rejected if configure\n * has not been called yet.\n */\n purchasePackage(options: PurchasePackageOptions): Promise<MakePurchaseResult>;\n\n /**\n * Google only. Make a purchase of a subscriptionOption\n *\n * @returns {Promise<{ productIdentifier: string, customerInfo: CustomerInfo }>} A promise of an object containing\n * a customer info object and a product identifier. Rejections return an error code, a boolean indicating if the\n * user cancelled the purchase, and an object with more information. The promise will be also be rejected if configure\n * has not been called yet.\n */\n purchaseSubscriptionOption(\n options: PurchaseSubscriptionOptionOptions,\n ): Promise<MakePurchaseResult>;\n\n /**\n * iOS only. Purchase a package applying a given discount.\n *\n * @returns {Promise<{ productIdentifier: string, customerInfo: CustomerInfo }>} A promise of an object containing\n * a customer info object and a product identifier. Rejections return an error code, a boolean indicating if the\n * user cancelled the purchase, and an object with more information. The promise will be also be rejected if configure\n * has not been called yet.\n */\n purchaseDiscountedPackage(\n options: PurchaseDiscountedPackageOptions,\n ): Promise<MakePurchaseResult>;\n\n /**\n * Restores a user's previous purchases and links their appUserIDs to any user's also using those purchases.\n * @returns {Promise<{ customerInfo: CustomerInfo }>} A promise of a customer info object. Rejections return an error code, and an\n * userInfo object with more information. The promise will be also be rejected if configure has not been called yet.\n */\n restorePurchases(): Promise<{ customerInfo: CustomerInfo }>;\n\n /**\n * Get the appUserID\n * @returns {Promise<string>} The app user id in a promise\n */\n getAppUserID(): Promise<{ appUserID: string }>;\n\n /**\n * This function will log in the current user with an appUserID. Typically, this would be used after a log in\n * to identify a user without calling configure.\n * @param options The appUserID that should be linked to the current user\n * @returns {Promise<LogInResult>} A promise of an object that contains the customerInfo after logging in, as well\n * as a boolean indicating whether the user has just been created for the first time in the RevenueCat backend. The\n * promise will be rejected if configure has not been called yet or if there's an issue logging in.\n */\n logIn(options: { appUserID: string }): Promise<LogInResult>;\n\n /**\n * Logs out the Purchases client clearing the saved appUserID. This will generate a random user id and save it in the cache.\n * @returns {Promise<{ customerInfo: CustomerInfo }>} A promise of a customer info object. Rejections return an error code,\n * and a userInfo object with more information. The promise will be rejected if configure has not been called yet or if\n * there's an issue logging out.\n */\n logOut(): Promise<{ customerInfo: CustomerInfo }>;\n\n /**\n * Used to set the log level. Useful for debugging issues with the lovely team @RevenueCat.\n * The default is {LOG_LEVEL.INFO} in release builds and {LOG_LEVEL.DEBUG} in debug builds.\n * @param options Log level to use to display logs.\n */\n setLogLevel(options: { level: LOG_LEVEL }): Promise<void>;\n\n /**\n * Set a custom log handler for redirecting logs to your own logging system.\n * By default, this sends info, warning, and error messages.\n * If you wish to receive Debug level messages, see [setLogLevel].\n * @param {LogHandler} logHandler It will get called for each log event.\n * Use this function to redirect the log to your own logging system\n */\n setLogHandler(logHandler: LogHandler): Promise<void>;\n\n /**\n * Gets current customer info\n * @returns {Promise<{ customerInfo: CustomerInfo }>} A promise of a customer info object. Rejections return an error code, and an\n * userInfo object with more information. The promise will be rejected if configure has not been called yet or if\n * there's an issue getting the customer information.\n */\n getCustomerInfo(): Promise<{ customerInfo: CustomerInfo }>;\n\n /**\n * This method will send all the purchases to the RevenueCat backend. Call this when using your own implementation\n * for subscriptions anytime a sync is needed, like after a successful purchase.\n *\n * @warning This function should only be called if you're not calling purchaseProduct/purchaseStoreProduct/purchasePackage/purchaseSubscriptionOption.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * syncing purchases.\n */\n syncPurchases(): Promise<void>;\n\n /**\n * This method will send a purchase to the RevenueCat backend. This function should only be called if you are\n * in Amazon observer mode or performing a client side migration of your current users to RevenueCat.\n *\n * The receipt IDs are cached if successfully posted, so they are not posted more than once.\n *\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * syncing purchases.\n */\n syncObserverModeAmazonPurchase(\n options: SyncObserverModeAmazonPurchaseOptions,\n ): Promise<void>;\n\n /**\n * Enable automatic collection of Apple Search Ad attribution on iOS. Disabled by default. Supported in iOS 14.3+ only\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet.\n */\n enableAdServicesAttributionTokenCollection(): Promise<void>;\n\n /**\n * @returns { Promise<boolean> } If the `appUserID` has been generated by RevenueCat or not.\n * The promise will be rejected if configure has not been called yet.\n */\n isAnonymous(): Promise<{ isAnonymous: boolean }>;\n\n /**\n * iOS only. Computes whether a user is eligible for the introductory pricing period of a given product.\n * You should use this method to determine whether you show the user the normal product price or the\n * introductory price. This also applies to trials (trials are considered a type of introductory pricing).\n *\n * @note Subscription groups are automatically collected for determining eligibility. If RevenueCat can't\n * definitively compute the eligibility, most likely because of missing group information, it will return\n * `INTRO_ELIGIBILITY_STATUS_UNKNOWN`. The best course of action on unknown status is to display the non-intro\n * pricing, to not create a misleading situation. To avoid this, make sure you are testing with the latest version of\n * iOS so that the subscription group can be collected by the SDK. Android always returns INTRO_ELIGIBILITY_STATUS_UNKNOWN.\n *\n * @param options Array of product identifiers for which you want to compute eligibility\n * @returns { Promise<[productId: string]: IntroEligibility> } A map of IntroEligility per productId. The promise\n * will be rejected if configure has not been called yet or if there's in an error checking eligibility.\n */\n checkTrialOrIntroductoryPriceEligibility(options: {\n productIdentifiers: string[];\n }): Promise<{ [productId: string]: IntroEligibility }>;\n\n /**\n * iOS only. Use this function to retrieve the `PurchasesPromotionalOffer` for a given `PurchasesPackage`.\n *\n * @returns { Promise<PurchasesPromotionalOffer | undefined> } Returns when the `PurchasesPaymentDiscount` is returned.\n * Null is returned for Android and incompatible iOS versions. The promise will be rejected if configure has not been\n * called yet or if there's an error getting the payment discount.\n */\n getPromotionalOffer(\n options: GetPromotionalOfferOptions,\n ): Promise<PurchasesPromotionalOffer | undefined>;\n\n /**\n * Invalidates the cache for customer information.\n *\n * Most apps will not need to use this method; invalidating the cache can leave your app in an invalid state.\n * Refer to https://docs.revenuecat.com/docs/customer-info#section-get-user-information for more information on\n * using the cache properly.\n *\n * This is useful for cases where customer information might have been updated outside the app, like if a\n * promotional subscription is granted through the RevenueCat dashboard.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or there's an error\n * invalidating the customer info cache.\n */\n invalidateCustomerInfoCache(): Promise<void>;\n\n /** iOS 14.0+ only. Presents a code redemption sheet, useful for redeeming offer codes\n * Refer to https://docs.revenuecat.com/docs/ios-subscription-offers#offer-codes for more information on how\n * to configure and use offer codes\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or there's an error\n * presenting the code redemption sheet.\n */\n presentCodeRedemptionSheet(): Promise<void>;\n\n /**\n * Subscriber attributes are useful for storing additional, structured information on a user.\n * Since attributes are writable using a public key they should not be used for\n * managing secure or sensitive information such as subscription status, coins, etc.\n *\n * Key names starting with \"$\" are reserved names used by RevenueCat. For a full list of key\n * restrictions refer to our guide: https://docs.revenuecat.com/docs/subscriber-attributes\n *\n * @param attributes Map of attributes by key. Set the value as an empty string to delete an attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or there's an error\n * setting the subscriber attributes.\n */\n setAttributes(attributes: { [key: string]: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the email address for the user\n *\n * @param options Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the email.\n */\n setEmail(options: { email: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the phone number for the user\n *\n * @param options Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the phone number.\n */\n setPhoneNumber(options: { phoneNumber: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the display name for the user\n *\n * @param options Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the display name.\n */\n setDisplayName(options: { displayName: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the push token for the user\n *\n * @param options null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the push token.\n */\n setPushToken(options: { pushToken: string | null }): Promise<void>;\n\n /**\n * Set this property to your proxy URL before configuring Purchases *only* if you've received a proxy key value\n * from your RevenueCat contact.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the proxy url.\n */\n setProxyURL(options: { url: string }): Promise<void>;\n\n /**\n * Automatically collect subscriber attributes associated with the device identifiers.\n * $idfa, $idfv, $ip on iOS\n * $gpsAdId, $androidId, $ip on Android\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting collecting the device identifiers.\n */\n collectDeviceIdentifiers(): Promise<void>;\n\n /**\n * Subscriber attribute associated with the Adjust ID for the user\n * Required for the RevenueCat Adjust integration\n *\n * @param options Adjust ID to use in Adjust integration. Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting Adjust ID.\n */\n setAdjustID(options: { adjustID: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the AppsFlyer ID for the user\n * Required for the RevenueCat AppsFlyer integration\n * @param options Appsflyer ID to use in Appsflyer integration. Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the Appsflyer ID.\n */\n setAppsflyerID(options: { appsflyerID: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the Facebook SDK Anonymous ID for the user\n * Recommended for the RevenueCat Facebook integration\n *\n * @param options Facebook Anonymous ID to use in Mparticle integration. Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the Facebook Anonymous ID.\n */\n setFBAnonymousID(options: { fbAnonymousID: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the mParticle ID for the user\n * Recommended for the RevenueCat mParticle integration\n *\n * @param options Mparticle ID to use in Mparticle integration. Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the Mparticle ID.\n */\n setMparticleID(options: { mparticleID: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the CleverTap ID for the user\n * Required for the RevenueCat CleverTap integration\n *\n * @param options CleverTap user ID to use in CleverTap integration. Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the CleverTap ID.\n */\n setCleverTapID(options: { cleverTapID: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the Mixpanel Distinct ID for the user\n * Required for the RevenueCat Mixpanel integration\n *\n * @param options Mixpanel Distinct ID to use in Mixpanel integration. Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the Mixpanel Distinct ID.\n */\n setMixpanelDistinctID(options: {\n mixpanelDistinctID: string | null;\n }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the Firebase App Instance ID for the user\n * Required for the RevenueCat Firebase integration\n *\n * @param options Firebase App Instance ID to use in Firebase integration. Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the Firebase App Instance ID.\n */\n setFirebaseAppInstanceID(options: {\n firebaseAppInstanceID: string | null;\n }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the OneSignal Player ID for the user\n * Required for the RevenueCat OneSignal integration\n *\n * @param options OneSignal Player ID to use in OneSignal integration. Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the OneSignal ID.\n */\n setOnesignalID(options: { onesignalID: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the Airship Channel ID for the user\n * Required for the RevenueCat Airship integration\n *\n * @param options Airship Channel ID to use in Airship integration. Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the Airship Channel ID.\n */\n setAirshipChannelID(options: {\n airshipChannelID: string | null;\n }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the install media source for the user\n *\n * @param options Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the media source.\n */\n setMediaSource(options: { mediaSource: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the install campaign for the user\n *\n * @param options Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the campaign.\n */\n setCampaign(options: { campaign: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the install ad group for the user\n *\n * @param options Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting ad group.\n */\n setAdGroup(options: { adGroup: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the install ad for the user\n *\n * @param options Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the ad subscriber attribute.\n */\n setAd(options: { ad: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the install keyword for the user\n *\n * @param options Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the keyword.\n */\n setKeyword(options: { keyword: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the install ad creative for the user\n *\n * @param options Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the creative subscriber attribute.\n */\n setCreative(options: { creative: string | null }): Promise<void>;\n\n /**\n * Check if billing is supported for the current user (meaning IN-APP purchases are supported)\n * and optionally, whether a list of specified feature types are supported.\n *\n * Note: Billing features are only relevant to Google Play Android users.\n * For other stores and platforms, billing features won't be checked.\n *\n * @param options An array of feature types to check for support. Feature types must be one of\n * [BILLING_FEATURE]. By default, is an empty list and no specific feature support will be checked.\n * @returns promise with boolean response. True if billing is supported, false otherwise.\n */\n canMakePayments(options?: {\n features?: BILLING_FEATURE[];\n }): Promise<{ canMakePayments: boolean }>;\n\n /**\n * iOS 15+ only. Presents a refund request sheet in the current window scene for\n * the latest transaction associated with the active entitlement.\n *\n * If the request was unsuccessful, no active entitlements could be found for\n * the user, or multiple active entitlements were found for the user,\n * the promise will return an error.\n * If called in an unsupported platform (Android or iOS < 15), an `UnsupportedPlatformException` will be thrown.\n *\n * Important: This method should only be used if your user can only have a single active entitlement at a given time.\n * If a user could have more than one entitlement at a time, use `beginRefundRequestForEntitlement` instead.\n *\n * @returns Returns refundRequestStatus: The status of the\n * refund request. Keep in mind the status could be REFUND_REQUEST_STATUS.USER_CANCELLED\n */\n beginRefundRequestForActiveEntitlement(): Promise<{\n refundRequestStatus: REFUND_REQUEST_STATUS;\n }>;\n\n /**\n * iOS 15+ only. Presents a refund request sheet in the current window scene for\n * the latest transaction associated with the `entitlement`.\n *\n * If the request was unsuccessful, the promise will return an error.\n * If called in an unsupported platform (Android or iOS < 15), an `UnsupportedPlatformException` will be thrown.\n *\n * @param options The entitlement to begin a refund request for.\n * @returns Returns refundRequestStatus: The status of the\n * refund request. Keep in mind the status could be REFUND_REQUEST_STATUS.USER_CANCELLED\n */\n beginRefundRequestForEntitlement(options: {\n entitlementInfo: PurchasesEntitlementInfo;\n }): Promise<{ refundRequestStatus: REFUND_REQUEST_STATUS }>;\n\n /**\n * iOS 15+ only. Presents a refund request sheet in the current window scene for\n * the latest transaction associated with the `product`.\n *\n * If the request was unsuccessful, the promise will return an error.\n * If called in an unsupported platform (Android or iOS < 15), an `UnsupportedPlatformException` will be thrown.\n *\n * @param options The StoreProduct to begin a refund request for.\n * @returns {Promise<REFUND_REQUEST_STATUS>} Returns a REFUND_REQUEST_STATUS: The status of the\n * refund request. Keep in mind the status could be REFUND_REQUEST_STATUS.USER_CANCELLED\n */\n beginRefundRequestForProduct(options: {\n storeProduct: PurchasesStoreProduct;\n }): Promise<{ refundRequestStatus: REFUND_REQUEST_STATUS }>;\n\n /**\n * Shows in-app messages available from the App Store or Google Play. You need to disable messages from showing\n * automatically using [PurchasesConfiguration.shouldShowInAppMessagesAutomatically].\n *\n * Note: In iOS, this requires version 16+. In older versions the promise will be resolved successfully\n * immediately.\n *\n * @param options An array of message types that the stores can display inside your app. Values must be one of\n * [IN_APP_MESSAGE_TYPE]. By default, is undefined and all message types will be shown.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet.\n */\n showInAppMessages(options?: {\n messageTypes?: IN_APP_MESSAGE_TYPE[];\n }): Promise<void>;\n\n /**\n * Check if configure has finished and Purchases has been configured.\n *\n * @returns promise with boolean response\n */\n isConfigured(): Promise<{ isConfigured: boolean }>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAwBA,cAAc,+CAA+C,CAAC","sourcesContent":["import type {\n CustomerInfo,\n CustomerInfoUpdateListener,\n GoogleProductChangeInfo,\n IntroEligibility,\n LogHandler,\n LogInResult,\n MakePurchaseResult,\n PurchasesConfiguration,\n PurchasesEntitlementInfo,\n PurchasesOfferings,\n PurchasesPackage,\n PurchasesPromotionalOffer,\n PurchasesStoreProduct,\n PurchasesStoreProductDiscount,\n SubscriptionOption,\n BILLING_FEATURE,\n LOG_LEVEL,\n PRODUCT_CATEGORY,\n REFUND_REQUEST_STATUS,\n IN_APP_MESSAGE_TYPE,\n PurchasesOffering,\n} from '@revenuecat/purchases-typescript-internal-esm';\n\nexport * from '@revenuecat/purchases-typescript-internal-esm';\n\nexport type PurchasesCallbackId = string;\n\nexport interface GetProductOptions {\n /**\n * Array of product identifiers to obtain\n */\n productIdentifiers: string[];\n /**\n * Optional type of products to fetch, can be SUBSCRIPTION or NON_SUBSCRIPTION. SUBSCRIPTION by default. Ignored in iOS.\n */\n type?: PRODUCT_CATEGORY;\n}\n\nexport interface PurchaseStoreProductOptions {\n /**\n * The product you want to purchase\n */\n product: PurchasesStoreProduct;\n /**\n * Android only. Optional GoogleProductChangeInfo you\n * wish to upgrade from containing the oldProductIdentifier and the optional prorationMode.\n */\n googleProductChangeInfo?: GoogleProductChangeInfo | null;\n /**\n * Android and Google only. Optional boolean indicates personalized pricing on products available for purchase in the EU.\n * For compliance with EU regulations. User will see \"This price has been customized for you\" in the purchase dialog when true.\n * See https://developer.android.com/google/play/billing/integrate#personalized-price for more info.\n */\n googleIsPersonalizedPrice?: boolean | null;\n}\n\nexport interface PurchaseDiscountedProductOptions {\n /**\n * The product you want to purchase\n */\n product: PurchasesStoreProduct;\n /**\n * Discount to apply to this package. Retrieve this discount using getPromotionalOffer.\n */\n discount: PurchasesPromotionalOffer;\n}\n\nexport interface PurchasePackageOptions {\n /**\n * The Package you wish to purchase. You can get the Packages by calling getOfferings\n */\n aPackage: PurchasesPackage;\n /**\n * Android only. Optional GoogleProductChangeInfo you\n * wish to upgrade from containing the oldProductIdentifier and the optional prorationMode.\n */\n googleProductChangeInfo?: GoogleProductChangeInfo | null;\n /**\n * Android and Google only. Optional boolean indicates personalized pricing on products available for purchase in the EU.\n * For compliance with EU regulations. User will see \"This price has been customized for you\" in the purchase dialog when true.\n * See https://developer.android.com/google/play/billing/integrate#personalized-price for more info.\n */\n googleIsPersonalizedPrice?: boolean | null;\n}\n\nexport interface PurchaseSubscriptionOptionOptions {\n /**\n * The SubscriptionOption you wish to purchase. You can get the SubscriptionOption from StoreProducts by calling getOfferings\n */\n subscriptionOption: SubscriptionOption;\n /**\n * Android only. Optional GoogleProductChangeInfo you\n * wish to upgrade from containing the oldProductIdentifier and the optional prorationMode.\n */\n googleProductChangeInfo?: GoogleProductChangeInfo | null;\n /**\n * Android and Google only. Optional boolean indicates personalized pricing on products available for purchase in the EU.\n * For compliance with EU regulations. User will see \"This price has been customized for you\" in the purchase dialog when true.\n * See https://developer.android.com/google/play/billing/integrate#personalized-price for more info.\n */\n googleIsPersonalizedPrice?: boolean | null;\n}\n\nexport interface PurchaseDiscountedPackageOptions {\n /**\n * The Package you wish to purchase. You can get the Packages by calling getOfferings\n */\n aPackage: PurchasesPackage;\n /**\n * Discount to apply to this package. Retrieve this discount using getPromotionalOffer.\n */\n discount: PurchasesPromotionalOffer;\n}\n\nexport interface SyncObserverModeAmazonPurchaseOptions {\n /**\n * Product ID associated to the purchase.\n */\n productID: string;\n /**\n * ReceiptId that represents the Amazon purchase.\n */\n receiptID: string;\n /**\n * Amazon's userID. This parameter will be ignored when syncing a Google purchase.\n */\n amazonUserID: string;\n /**\n * Product's currency code in ISO 4217 format.\n */\n isoCurrencyCode?: string | null;\n /**\n * Product's price.\n */\n price?: number | null;\n}\n\nexport interface GetPromotionalOfferOptions {\n /**\n * The `PurchasesStoreProduct` the user intends to purchase.\n */\n product: PurchasesStoreProduct;\n /**\n * The `PurchasesStoreProductDiscount` to apply to the product.\n */\n discount: PurchasesStoreProductDiscount;\n}\n\nexport interface PurchasesPlugin {\n /**\n * Sets up Purchases with your API key and an app user id.\n * @param {PurchasesConfiguration} configuration RevenueCat configuration object including the API key and other optional parameters. See {@link PurchasesConfiguration}\n */\n configure(configuration: PurchasesConfiguration): Promise<void>;\n\n /**\n * Sets whether the SDK should return mocked results in the web version.\n * This won't affect the iOS and Android versions of the implementation.\n * Default is false\n * @param options Set shouldMockWebResults to true if you want the plugin methods to return mocked values\n */\n setMockWebResults(options: { shouldMockWebResults: boolean }): Promise<void>;\n\n /**\n * @param options Set finishTransactions to false if you aren't using Purchases SDK to\n * make the purchase\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet.\n */\n setFinishTransactions(options: {\n finishTransactions: boolean;\n }): Promise<void>;\n\n /**\n * iOS only.\n * @param options Set this property to true *only* when testing the ask-to-buy / SCA\n * purchases flow. More information: http://errors.rev.cat/ask-to-buy\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet.\n */\n setSimulatesAskToBuyInSandbox(options: {\n simulatesAskToBuyInSandbox: boolean;\n }): Promise<void>;\n\n /**\n * Sets a function to be called on updated customer info\n * @param {CustomerInfoUpdateListener} customerInfoUpdateListener CustomerInfo update listener\n */\n addCustomerInfoUpdateListener(\n customerInfoUpdateListener: CustomerInfoUpdateListener,\n ): Promise<PurchasesCallbackId>;\n\n /**\n * Removes a given CustomerInfoUpdateListener\n * @param {CustomerInfoUpdateListener} listenerToRemove CustomerInfoUpdateListener reference of the listener to remove\n * @returns Promise with boolean. True if listener was removed, false otherwise\n */\n removeCustomerInfoUpdateListener(\n listenerToRemove: PurchasesCallbackId,\n ): Promise<{ wasRemoved: boolean }>;\n\n // TODO: Support addShouldPurchasePromoProductListener functionality\n // /**\n // * Sets a function to be called on purchases initiated on the Apple App Store. This is only used in iOS.\n // * @param {ShouldPurchasePromoProductListener} shouldPurchasePromoProductListener Called when a user initiates a\n // * promotional in-app purchase from the App Store. If your app is able to handle a purchase at the current time, run\n // * the deferredPurchase function. If the app is not in a state to make a purchase: cache the deferredPurchase, then\n // * call the deferredPurchase when the app is ready to make the promotional purchase.\n // * If the purchase should never be made, you don't need to ever call the deferredPurchase and the app will not\n // * proceed with promotional purchases.\n // */\n // addShouldPurchasePromoProductListener(\n // shouldPurchasePromoProductListener: ShouldPurchasePromoProductListener,\n // ): Promise<PurchasesCallbackId>;\n //\n // /**\n // * Removes a given ShouldPurchasePromoProductListener\n // * @param {ShouldPurchasePromoProductListener} listenerToRemove ShouldPurchasePromoProductListener reference of\n // * the listener to remove\n // * @returns Promise with boolean. True if listener was removed, false otherwise\n // */\n // removeShouldPurchasePromoProductListener(\n // listenerToRemove: PurchasesCallbackId,\n // ): Promise<{ wasRemoved: boolean }>;\n\n /**\n * Gets the map of entitlements -> offerings -> products\n * @returns {Promise<PurchasesOfferings>} Promise of entitlements structure. The promise will be rejected if configure\n * has not been called yet.\n */\n getOfferings(): Promise<PurchasesOfferings>;\n\n /**\n * Retrieves a current offering for a placement identifier, use this to access offerings defined by targeting\n * placements configured in the RevenueCat dashboard.\n * @returns {Promise<PurchasesOffering | null>} Promise of optional offering. The promise will be rejected if configure\n * has not been called yet.\n */\n getCurrentOfferingForPlacement(options: {\n placementIdentifier: string;\n }): Promise<PurchasesOffering | null>;\n\n /**\n * Syncs subscriber attributes and then fetches the configured offerings for this user. This method is intended to\n * be called when using Targeting Rules with Custom Attributes. Any subscriber attributes should be set before\n * calling this method to ensure the returned offerings are applied with the latest subscriber attributes.\n * @returns {Promise<PurchasesOfferings>} Promise of entitlements structure. The promise will be rejected if configure\n * has not been called yet.\n */\n syncAttributesAndOfferingsIfNeeded(): Promise<PurchasesOfferings>;\n\n /**\n * Fetch the product info\n * @returns {Promise<PurchasesStoreProduct[]>} A promise containing an array of products. The promise will be rejected\n * if the products are not properly configured in RevenueCat or if there is another error retrieving them.\n * Rejections return an error code, and a userInfo object with more information. The promise will also be rejected\n * if configure has not been called yet.\n */\n getProducts(\n options: GetProductOptions,\n ): Promise<{ products: PurchasesStoreProduct[] }>;\n\n /**\n * Make a purchase\n *\n * @returns {Promise<{ productIdentifier: string, customerInfo:CustomerInfo }>} A promise of an object containing\n * a customer info object and a product identifier. Rejections return an error code,\n * a boolean indicating if the user cancelled the purchase, and an object with more information. The promise will\n * also be rejected if configure has not been called yet.\n */\n purchaseStoreProduct(\n options: PurchaseStoreProductOptions,\n ): Promise<MakePurchaseResult>;\n\n /**\n * iOS only. Purchase a product applying a given discount.\n *\n * @returns {Promise<{ productIdentifier: string, customerInfo:CustomerInfo }>} A promise of an object containing\n * a customer info object and a product identifier. Rejections return an error code,\n * a boolean indicating if the user cancelled the purchase, and an object with more information. The promise will be\n * rejected if configure has not been called yet.\n */\n purchaseDiscountedProduct(\n options: PurchaseDiscountedProductOptions,\n ): Promise<MakePurchaseResult>;\n\n /**\n * Make a purchase\n *\n * @returns {Promise<{ productIdentifier: string, customerInfo: CustomerInfo }>} A promise of an object containing\n * a customer info object and a product identifier. Rejections return an error code, a boolean indicating if the\n * user cancelled the purchase, and an object with more information. The promise will be also be rejected if configure\n * has not been called yet.\n */\n purchasePackage(options: PurchasePackageOptions): Promise<MakePurchaseResult>;\n\n /**\n * Google only. Make a purchase of a subscriptionOption\n *\n * @returns {Promise<{ productIdentifier: string, customerInfo: CustomerInfo }>} A promise of an object containing\n * a customer info object and a product identifier. Rejections return an error code, a boolean indicating if the\n * user cancelled the purchase, and an object with more information. The promise will be also be rejected if configure\n * has not been called yet.\n */\n purchaseSubscriptionOption(\n options: PurchaseSubscriptionOptionOptions,\n ): Promise<MakePurchaseResult>;\n\n /**\n * iOS only. Purchase a package applying a given discount.\n *\n * @returns {Promise<{ productIdentifier: string, customerInfo: CustomerInfo }>} A promise of an object containing\n * a customer info object and a product identifier. Rejections return an error code, a boolean indicating if the\n * user cancelled the purchase, and an object with more information. The promise will be also be rejected if configure\n * has not been called yet.\n */\n purchaseDiscountedPackage(\n options: PurchaseDiscountedPackageOptions,\n ): Promise<MakePurchaseResult>;\n\n /**\n * Restores a user's previous purchases and links their appUserIDs to any user's also using those purchases.\n * @returns {Promise<{ customerInfo: CustomerInfo }>} A promise of a customer info object. Rejections return an error code, and an\n * userInfo object with more information. The promise will be also be rejected if configure has not been called yet.\n */\n restorePurchases(): Promise<{ customerInfo: CustomerInfo }>;\n\n /**\n * Get the appUserID\n * @returns {Promise<string>} The app user id in a promise\n */\n getAppUserID(): Promise<{ appUserID: string }>;\n\n /**\n * This function will log in the current user with an appUserID. Typically, this would be used after a log in\n * to identify a user without calling configure.\n * @param options The appUserID that should be linked to the current user\n * @returns {Promise<LogInResult>} A promise of an object that contains the customerInfo after logging in, as well\n * as a boolean indicating whether the user has just been created for the first time in the RevenueCat backend. The\n * promise will be rejected if configure has not been called yet or if there's an issue logging in.\n */\n logIn(options: { appUserID: string }): Promise<LogInResult>;\n\n /**\n * Logs out the Purchases client clearing the saved appUserID. This will generate a random user id and save it in the cache.\n * @returns {Promise<{ customerInfo: CustomerInfo }>} A promise of a customer info object. Rejections return an error code,\n * and a userInfo object with more information. The promise will be rejected if configure has not been called yet or if\n * there's an issue logging out.\n */\n logOut(): Promise<{ customerInfo: CustomerInfo }>;\n\n /**\n * Used to set the log level. Useful for debugging issues with the lovely team @RevenueCat.\n * The default is {LOG_LEVEL.INFO} in release builds and {LOG_LEVEL.DEBUG} in debug builds.\n * @param options Log level to use to display logs.\n */\n setLogLevel(options: { level: LOG_LEVEL }): Promise<void>;\n\n /**\n * Set a custom log handler for redirecting logs to your own logging system.\n * By default, this sends info, warning, and error messages.\n * If you wish to receive Debug level messages, see [setLogLevel].\n * @param {LogHandler} logHandler It will get called for each log event.\n * Use this function to redirect the log to your own logging system\n */\n setLogHandler(logHandler: LogHandler): Promise<void>;\n\n /**\n * Gets current customer info\n * @returns {Promise<{ customerInfo: CustomerInfo }>} A promise of a customer info object. Rejections return an error code, and an\n * userInfo object with more information. The promise will be rejected if configure has not been called yet or if\n * there's an issue getting the customer information.\n */\n getCustomerInfo(): Promise<{ customerInfo: CustomerInfo }>;\n\n /**\n * This method will send all the purchases to the RevenueCat backend. Call this when using your own implementation\n * for subscriptions anytime a sync is needed, like after a successful purchase.\n *\n * @warning This function should only be called if you're not calling purchaseProduct/purchaseStoreProduct/purchasePackage/purchaseSubscriptionOption.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * syncing purchases.\n */\n syncPurchases(): Promise<void>;\n\n /**\n * This method will send a purchase to the RevenueCat backend. This function should only be called if you are\n * in Amazon observer mode or performing a client side migration of your current users to RevenueCat.\n *\n * The receipt IDs are cached if successfully posted, so they are not posted more than once.\n *\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * syncing purchases.\n */\n syncObserverModeAmazonPurchase(\n options: SyncObserverModeAmazonPurchaseOptions,\n ): Promise<void>;\n\n /**\n * Enable automatic collection of Apple Search Ad attribution on iOS. Disabled by default. Supported in iOS 14.3+ only\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet.\n */\n enableAdServicesAttributionTokenCollection(): Promise<void>;\n\n /**\n * @returns { Promise<boolean> } If the `appUserID` has been generated by RevenueCat or not.\n * The promise will be rejected if configure has not been called yet.\n */\n isAnonymous(): Promise<{ isAnonymous: boolean }>;\n\n /**\n * iOS only. Computes whether a user is eligible for the introductory pricing period of a given product.\n * You should use this method to determine whether you show the user the normal product price or the\n * introductory price. This also applies to trials (trials are considered a type of introductory pricing).\n *\n * @note Subscription groups are automatically collected for determining eligibility. If RevenueCat can't\n * definitively compute the eligibility, most likely because of missing group information, it will return\n * `INTRO_ELIGIBILITY_STATUS_UNKNOWN`. The best course of action on unknown status is to display the non-intro\n * pricing, to not create a misleading situation. To avoid this, make sure you are testing with the latest version of\n * iOS so that the subscription group can be collected by the SDK. Android always returns INTRO_ELIGIBILITY_STATUS_UNKNOWN.\n *\n * @param options Array of product identifiers for which you want to compute eligibility\n * @returns { Promise<[productId: string]: IntroEligibility> } A map of IntroEligility per productId. The promise\n * will be rejected if configure has not been called yet or if there's in an error checking eligibility.\n */\n checkTrialOrIntroductoryPriceEligibility(options: {\n productIdentifiers: string[];\n }): Promise<{ [productId: string]: IntroEligibility }>;\n\n /**\n * iOS only. Use this function to retrieve the `PurchasesPromotionalOffer` for a given `PurchasesPackage`.\n *\n * @returns { Promise<PurchasesPromotionalOffer | undefined> } Returns when the `PurchasesPaymentDiscount` is returned.\n * Null is returned for Android and incompatible iOS versions. The promise will be rejected if configure has not been\n * called yet or if there's an error getting the payment discount.\n */\n getPromotionalOffer(\n options: GetPromotionalOfferOptions,\n ): Promise<PurchasesPromotionalOffer | undefined>;\n\n /**\n * Invalidates the cache for customer information.\n *\n * Most apps will not need to use this method; invalidating the cache can leave your app in an invalid state.\n * Refer to https://docs.revenuecat.com/docs/customer-info#section-get-user-information for more information on\n * using the cache properly.\n *\n * This is useful for cases where customer information might have been updated outside the app, like if a\n * promotional subscription is granted through the RevenueCat dashboard.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or there's an error\n * invalidating the customer info cache.\n */\n invalidateCustomerInfoCache(): Promise<void>;\n\n /** iOS 14.0+ only. Presents a code redemption sheet, useful for redeeming offer codes\n * Refer to https://docs.revenuecat.com/docs/ios-subscription-offers#offer-codes for more information on how\n * to configure and use offer codes\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or there's an error\n * presenting the code redemption sheet.\n */\n presentCodeRedemptionSheet(): Promise<void>;\n\n /**\n * Subscriber attributes are useful for storing additional, structured information on a user.\n * Since attributes are writable using a public key they should not be used for\n * managing secure or sensitive information such as subscription status, coins, etc.\n *\n * Key names starting with \"$\" are reserved names used by RevenueCat. For a full list of key\n * restrictions refer to our guide: https://docs.revenuecat.com/docs/subscriber-attributes\n *\n * @param attributes Map of attributes by key. Set the value as an empty string to delete an attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or there's an error\n * setting the subscriber attributes.\n */\n setAttributes(attributes: { [key: string]: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the email address for the user\n *\n * @param options Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the email.\n */\n setEmail(options: { email: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the phone number for the user\n *\n * @param options Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the phone number.\n */\n setPhoneNumber(options: { phoneNumber: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the display name for the user\n *\n * @param options Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the display name.\n */\n setDisplayName(options: { displayName: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the push token for the user\n *\n * @param options null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the push token.\n */\n setPushToken(options: { pushToken: string | null }): Promise<void>;\n\n /**\n * Set this property to your proxy URL before configuring Purchases *only* if you've received a proxy key value\n * from your RevenueCat contact.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the proxy url.\n */\n setProxyURL(options: { url: string }): Promise<void>;\n\n /**\n * Automatically collect subscriber attributes associated with the device identifiers.\n * $idfa, $idfv, $ip on iOS\n * $gpsAdId, $androidId, $ip on Android\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting collecting the device identifiers.\n */\n collectDeviceIdentifiers(): Promise<void>;\n\n /**\n * Subscriber attribute associated with the Adjust ID for the user\n * Required for the RevenueCat Adjust integration\n *\n * @param options Adjust ID to use in Adjust integration. Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting Adjust ID.\n */\n setAdjustID(options: { adjustID: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the AppsFlyer ID for the user\n * Required for the RevenueCat AppsFlyer integration\n * @param options Appsflyer ID to use in Appsflyer integration. Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the Appsflyer ID.\n */\n setAppsflyerID(options: { appsflyerID: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the Facebook SDK Anonymous ID for the user\n * Recommended for the RevenueCat Facebook integration\n *\n * @param options Facebook Anonymous ID to use in Mparticle integration. Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the Facebook Anonymous ID.\n */\n setFBAnonymousID(options: { fbAnonymousID: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the mParticle ID for the user\n * Recommended for the RevenueCat mParticle integration\n *\n * @param options Mparticle ID to use in Mparticle integration. Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the Mparticle ID.\n */\n setMparticleID(options: { mparticleID: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the CleverTap ID for the user\n * Required for the RevenueCat CleverTap integration\n *\n * @param options CleverTap user ID to use in CleverTap integration. Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the CleverTap ID.\n */\n setCleverTapID(options: { cleverTapID: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the Mixpanel Distinct ID for the user\n * Required for the RevenueCat Mixpanel integration\n *\n * @param options Mixpanel Distinct ID to use in Mixpanel integration. Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the Mixpanel Distinct ID.\n */\n setMixpanelDistinctID(options: {\n mixpanelDistinctID: string | null;\n }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the Firebase App Instance ID for the user\n * Required for the RevenueCat Firebase integration\n *\n * @param options Firebase App Instance ID to use in Firebase integration. Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the Firebase App Instance ID.\n */\n setFirebaseAppInstanceID(options: {\n firebaseAppInstanceID: string | null;\n }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the OneSignal Player ID for the user\n * Required for the RevenueCat OneSignal integration. Deprecated for OneSignal versions above v9.0.\n *\n * @param options OneSignal Player ID to use in OneSignal integration. Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the OneSignal ID.\n */\n setOnesignalID(options: { onesignalID: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the OneSignal User ID for the user\n * Required for the RevenueCat OneSignal integration with versions v11.0 and above.\n *\n * @param options OneSignal UserId to use in OneSignal integration. Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the OneSignal user ID.\n */\n setOnesignalUserID(options: {\n onesignalUserID: string | null;\n }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the Airship Channel ID for the user\n * Required for the RevenueCat Airship integration\n *\n * @param options Airship Channel ID to use in Airship integration. Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the Airship Channel ID.\n */\n setAirshipChannelID(options: {\n airshipChannelID: string | null;\n }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the install media source for the user\n *\n * @param options Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the media source.\n */\n setMediaSource(options: { mediaSource: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the install campaign for the user\n *\n * @param options Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the campaign.\n */\n setCampaign(options: { campaign: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the install ad group for the user\n *\n * @param options Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting ad group.\n */\n setAdGroup(options: { adGroup: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the install ad for the user\n *\n * @param options Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the ad subscriber attribute.\n */\n setAd(options: { ad: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the install keyword for the user\n *\n * @param options Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the keyword.\n */\n setKeyword(options: { keyword: string | null }): Promise<void>;\n\n /**\n * Subscriber attribute associated with the install ad creative for the user\n *\n * @param options Empty String or null will delete the subscriber attribute.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error\n * setting the creative subscriber attribute.\n */\n setCreative(options: { creative: string | null }): Promise<void>;\n\n /**\n * Check if billing is supported for the current user (meaning IN-APP purchases are supported)\n * and optionally, whether a list of specified feature types are supported.\n *\n * Note: Billing features are only relevant to Google Play Android users.\n * For other stores and platforms, billing features won't be checked.\n *\n * @param options An array of feature types to check for support. Feature types must be one of\n * [BILLING_FEATURE]. By default, is an empty list and no specific feature support will be checked.\n * @returns promise with boolean response. True if billing is supported, false otherwise.\n */\n canMakePayments(options?: {\n features?: BILLING_FEATURE[];\n }): Promise<{ canMakePayments: boolean }>;\n\n /**\n * iOS 15+ only. Presents a refund request sheet in the current window scene for\n * the latest transaction associated with the active entitlement.\n *\n * If the request was unsuccessful, no active entitlements could be found for\n * the user, or multiple active entitlements were found for the user,\n * the promise will return an error.\n * If called in an unsupported platform (Android or iOS < 15), an `UnsupportedPlatformException` will be thrown.\n *\n * Important: This method should only be used if your user can only have a single active entitlement at a given time.\n * If a user could have more than one entitlement at a time, use `beginRefundRequestForEntitlement` instead.\n *\n * @returns Returns refundRequestStatus: The status of the\n * refund request. Keep in mind the status could be REFUND_REQUEST_STATUS.USER_CANCELLED\n */\n beginRefundRequestForActiveEntitlement(): Promise<{\n refundRequestStatus: REFUND_REQUEST_STATUS;\n }>;\n\n /**\n * iOS 15+ only. Presents a refund request sheet in the current window scene for\n * the latest transaction associated with the `entitlement`.\n *\n * If the request was unsuccessful, the promise will return an error.\n * If called in an unsupported platform (Android or iOS < 15), an `UnsupportedPlatformException` will be thrown.\n *\n * @param options The entitlement to begin a refund request for.\n * @returns Returns refundRequestStatus: The status of the\n * refund request. Keep in mind the status could be REFUND_REQUEST_STATUS.USER_CANCELLED\n */\n beginRefundRequestForEntitlement(options: {\n entitlementInfo: PurchasesEntitlementInfo;\n }): Promise<{ refundRequestStatus: REFUND_REQUEST_STATUS }>;\n\n /**\n * iOS 15+ only. Presents a refund request sheet in the current window scene for\n * the latest transaction associated with the `product`.\n *\n * If the request was unsuccessful, the promise will return an error.\n * If called in an unsupported platform (Android or iOS < 15), an `UnsupportedPlatformException` will be thrown.\n *\n * @param options The StoreProduct to begin a refund request for.\n * @returns {Promise<REFUND_REQUEST_STATUS>} Returns a REFUND_REQUEST_STATUS: The status of the\n * refund request. Keep in mind the status could be REFUND_REQUEST_STATUS.USER_CANCELLED\n */\n beginRefundRequestForProduct(options: {\n storeProduct: PurchasesStoreProduct;\n }): Promise<{ refundRequestStatus: REFUND_REQUEST_STATUS }>;\n\n /**\n * Shows in-app messages available from the App Store or Google Play. You need to disable messages from showing\n * automatically using [PurchasesConfiguration.shouldShowInAppMessagesAutomatically].\n *\n * Note: In iOS, this requires version 16+. In older versions the promise will be resolved successfully\n * immediately.\n *\n * @param options An array of message types that the stores can display inside your app. Values must be one of\n * [IN_APP_MESSAGE_TYPE]. By default, is undefined and all message types will be shown.\n * @returns {Promise<void>} The promise will be rejected if configure has not been called yet.\n */\n showInAppMessages(options?: {\n messageTypes?: IN_APP_MESSAGE_TYPE[];\n }): Promise<void>;\n\n /**\n * Check if configure has finished and Purchases has been configured.\n *\n * @returns promise with boolean response\n */\n isConfigured(): Promise<{ isConfigured: boolean }>;\n}\n"]}
|
package/dist/esm/web.d.ts
CHANGED
|
@@ -112,6 +112,9 @@ export declare class PurchasesWeb extends WebPlugin implements PurchasesPlugin {
|
|
|
112
112
|
setOnesignalID(_onesignalID: {
|
|
113
113
|
onesignalID: string | null;
|
|
114
114
|
}): Promise<void>;
|
|
115
|
+
setOnesignalUserID(_onesignalUserID: {
|
|
116
|
+
onesignalUserID: string | null;
|
|
117
|
+
}): Promise<void>;
|
|
115
118
|
setAirshipChannelID(_airshipChannelID: {
|
|
116
119
|
airshipChannelID: string | null;
|
|
117
120
|
}): Promise<void>;
|
package/dist/esm/web.js
CHANGED
|
@@ -214,6 +214,9 @@ export class PurchasesWeb extends WebPlugin {
|
|
|
214
214
|
setOnesignalID(_onesignalID) {
|
|
215
215
|
return this.mockNonReturningFunctionIfEnabled('setOnesignalID');
|
|
216
216
|
}
|
|
217
|
+
setOnesignalUserID(_onesignalUserID) {
|
|
218
|
+
return this.mockNonReturningFunctionIfEnabled('setOnesignalUserID');
|
|
219
|
+
}
|
|
217
220
|
setAirshipChannelID(_airshipChannelID) {
|
|
218
221
|
return this.mockNonReturningFunctionIfEnabled('setAirshipChannelID');
|
|
219
222
|
}
|
package/dist/esm/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,sDAAsD;AAEtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAoB5C,OAAO,EACL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,+CAA+C,CAAC;AAcvD,MAAM,OAAO,YAAa,SAAQ,SAAS;IAA3C;;QACU,yBAAoB,GAAG,KAAK,CAAC;QAC7B,gCAA2B,GAAG,mCAAmC,CAAC;QAkW1E,eAAe;QAEP,0BAAqB,GAAiB;YAC5C,YAAY,EAAE;gBACZ,GAAG,EAAE,EAAE;gBACP,MAAM,EAAE,EAAE;gBACV,YAAY,EAAE,mBAAmB,CAAC,aAAa;aAChD;YACD,mBAAmB,EAAE,EAAE;YACvB,8BAA8B,EAAE,EAAE;YAClC,oBAAoB,EAAE,IAAI;YAC1B,SAAS,EAAE,0BAA0B;YACrC,iBAAiB,EAAE,kBAAkB;YACrC,WAAW,EAAE,0BAA0B;YACvC,kBAAkB,EAAE,EAAE;YACtB,gBAAgB,EAAE,EAAE;YACpB,0BAA0B,EAAE,IAAI;YAChC,oBAAoB,EAAE,IAA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8B,CACpC,YAAoB,EACpB,WAAc;QAEd,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE;YAC9B,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;SACzD;QACD,OAAO,CAAC,GAAG,CACT,GAAG,YAAY,6DAA6D,CAC7E,CAAC;QACF,OAAO,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACtC,CAAC;CACF","sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\nimport { WebPlugin } from '@capacitor/core';\nimport type {\n BILLING_FEATURE,\n CustomerInfo,\n CustomerInfoUpdateListener,\n IN_APP_MESSAGE_TYPE,\n IntroEligibility,\n LOG_LEVEL,\n LogHandler,\n LogInResult,\n MakePurchaseResult,\n PurchasesConfiguration,\n PurchasesEntitlementInfo,\n PurchasesOffering,\n PurchasesOfferings,\n PurchasesPromotionalOffer,\n PurchasesStoreProduct,\n PurchasesStoreTransaction,\n ShouldPurchasePromoProductListener,\n} from '@revenuecat/purchases-typescript-internal-esm';\nimport {\n REFUND_REQUEST_STATUS,\n VERIFICATION_RESULT,\n} from '@revenuecat/purchases-typescript-internal-esm';\n\nimport type {\n GetProductOptions,\n GetPromotionalOfferOptions,\n PurchaseDiscountedPackageOptions,\n PurchaseDiscountedProductOptions,\n PurchasePackageOptions,\n PurchasesPlugin,\n PurchaseStoreProductOptions,\n PurchaseSubscriptionOptionOptions,\n SyncObserverModeAmazonPurchaseOptions,\n} from './definitions';\n\nexport class PurchasesWeb extends WebPlugin implements PurchasesPlugin {\n private shouldMockWebResults = false;\n private webNotSupportedErrorMessage = 'Web not supported in this plugin.';\n\n configure(_configuration: PurchasesConfiguration): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('configure');\n }\n\n setMockWebResults(options: { shouldMockWebResults: boolean }): Promise<void> {\n this.shouldMockWebResults = options.shouldMockWebResults;\n return Promise.resolve();\n }\n\n setFinishTransactions(_finishTransactions: {\n finishTransactions: boolean;\n }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setFinishTransactions');\n }\n setSimulatesAskToBuyInSandbox(_simulatesAskToBuyInSandbox: {\n simulatesAskToBuyInSandbox: boolean;\n }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled(\n 'setSimulatesAskToBuyInSandbox',\n );\n }\n addCustomerInfoUpdateListener(\n _customerInfoUpdateListener: CustomerInfoUpdateListener,\n ): Promise<string> {\n return this.mockReturningFunctionIfEnabled(\n 'addCustomerInfoUpdateListener',\n 'mock-callback-id',\n );\n }\n removeCustomerInfoUpdateListener(\n _listenerToRemove: string,\n ): Promise<{ wasRemoved: boolean }> {\n return this.mockReturningFunctionIfEnabled(\n 'removeCustomerInfoUpdateListener',\n { wasRemoved: false },\n );\n }\n addShouldPurchasePromoProductListener(\n _shouldPurchasePromoProductListener: ShouldPurchasePromoProductListener,\n ): Promise<string> {\n return this.mockReturningFunctionIfEnabled(\n 'addShouldPurchasePromoProductListener',\n 'mock-callback-id',\n );\n }\n removeShouldPurchasePromoProductListener(\n _listenerToRemove: string,\n ): Promise<{ wasRemoved: boolean }> {\n return this.mockReturningFunctionIfEnabled(\n 'removeShouldPurchasePromoProductListener',\n { wasRemoved: false },\n );\n }\n getOfferings(): Promise<PurchasesOfferings> {\n const mockOfferings: PurchasesOfferings = {\n all: {},\n current: null,\n };\n return this.mockReturningFunctionIfEnabled('getOfferings', mockOfferings);\n }\n getCurrentOfferingForPlacement(_options: {\n placementIdentifier: string;\n }): Promise<PurchasesOffering | null> {\n const mockOffering: PurchasesOffering | null = null;\n return this.mockReturningFunctionIfEnabled(\n 'getCurrentOfferingForPlacement',\n mockOffering,\n );\n }\n syncAttributesAndOfferingsIfNeeded(): Promise<PurchasesOfferings> {\n const mockOfferings: PurchasesOfferings = {\n all: {},\n current: null,\n };\n return this.mockReturningFunctionIfEnabled(\n 'syncAttributesAndOfferingsIfNeeded',\n mockOfferings,\n );\n }\n getProducts(\n _options: GetProductOptions,\n ): Promise<{ products: PurchasesStoreProduct[] }> {\n const mockProducts = { products: [] };\n return this.mockReturningFunctionIfEnabled('getProducts', mockProducts);\n }\n purchaseStoreProduct(\n _options: PurchaseStoreProductOptions,\n ): Promise<MakePurchaseResult> {\n const mockPurchaseResult: MakePurchaseResult = {\n productIdentifier: _options.product.identifier,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.product.identifier),\n };\n return this.mockReturningFunctionIfEnabled(\n 'purchaseStoreProduct',\n mockPurchaseResult,\n );\n }\n purchaseDiscountedProduct(\n _options: PurchaseDiscountedProductOptions,\n ): Promise<MakePurchaseResult> {\n const mockPurchaseResult: MakePurchaseResult = {\n productIdentifier: _options.product.identifier,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.product.identifier),\n };\n return this.mockReturningFunctionIfEnabled(\n 'purchaseDiscountedProduct',\n mockPurchaseResult,\n );\n }\n purchasePackage(\n _options: PurchasePackageOptions,\n ): Promise<MakePurchaseResult> {\n const mockPurchaseResult: MakePurchaseResult = {\n productIdentifier: _options.aPackage.product.identifier,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.aPackage.product.identifier),\n };\n return this.mockReturningFunctionIfEnabled(\n 'purchasePackage',\n mockPurchaseResult,\n );\n }\n purchaseSubscriptionOption(\n _options: PurchaseSubscriptionOptionOptions,\n ): Promise<MakePurchaseResult> {\n const mockPurchaseResult: MakePurchaseResult = {\n productIdentifier: _options.subscriptionOption.productId,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.subscriptionOption.productId),\n };\n return this.mockReturningFunctionIfEnabled(\n 'purchaseSubscriptionOption',\n mockPurchaseResult,\n );\n }\n purchaseDiscountedPackage(\n _options: PurchaseDiscountedPackageOptions,\n ): Promise<MakePurchaseResult> {\n const mockPurchaseResult: MakePurchaseResult = {\n productIdentifier: _options.aPackage.product.identifier,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.aPackage.product.identifier),\n };\n return this.mockReturningFunctionIfEnabled(\n 'purchaseDiscountedPackage',\n mockPurchaseResult,\n );\n }\n restorePurchases(): Promise<{ customerInfo: CustomerInfo }> {\n const mockResponse = { customerInfo: this.mockEmptyCustomerInfo };\n return this.mockReturningFunctionIfEnabled(\n 'restorePurchases',\n mockResponse,\n );\n }\n getAppUserID(): Promise<{ appUserID: string }> {\n return this.mockReturningFunctionIfEnabled('getAppUserID', {\n appUserID: 'test-web-user-id',\n });\n }\n logIn(_appUserID: { appUserID: string }): Promise<LogInResult> {\n const mockLogInResult: LogInResult = {\n customerInfo: this.mockEmptyCustomerInfo,\n created: false,\n };\n return this.mockReturningFunctionIfEnabled('logIn', mockLogInResult);\n }\n logOut(): Promise<{ customerInfo: CustomerInfo }> {\n const mockResponse = { customerInfo: this.mockEmptyCustomerInfo };\n return this.mockReturningFunctionIfEnabled('logOut', mockResponse);\n }\n setLogLevel(_level: { level: LOG_LEVEL }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setLogLevel');\n }\n setLogHandler(_logHandler: LogHandler): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setLogHandler');\n }\n getCustomerInfo(): Promise<{ customerInfo: CustomerInfo }> {\n const mockResponse = { customerInfo: this.mockEmptyCustomerInfo };\n return this.mockReturningFunctionIfEnabled('getCustomerInfo', mockResponse);\n }\n syncPurchases(): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('syncPurchases');\n }\n syncObserverModeAmazonPurchase(\n _options: SyncObserverModeAmazonPurchaseOptions,\n ): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled(\n 'syncObserverModeAmazonPurchase',\n );\n }\n enableAdServicesAttributionTokenCollection(): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled(\n 'enableAdServicesAttributionTokenCollection',\n );\n }\n isAnonymous(): Promise<{ isAnonymous: boolean }> {\n const mockResponse = { isAnonymous: false };\n return this.mockReturningFunctionIfEnabled('isAnonymous', mockResponse);\n }\n checkTrialOrIntroductoryPriceEligibility(_productIdentifiers: {\n productIdentifiers: string[];\n }): Promise<{ [productId: string]: IntroEligibility }> {\n return this.mockReturningFunctionIfEnabled(\n 'checkTrialOrIntroductoryPriceEligibility',\n {},\n );\n }\n getPromotionalOffer(\n _options: GetPromotionalOfferOptions,\n ): Promise<PurchasesPromotionalOffer | undefined> {\n return this.mockReturningFunctionIfEnabled(\n 'getPromotionalOffer',\n undefined,\n );\n }\n invalidateCustomerInfoCache(): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled(\n 'invalidateCustomerInfoCache',\n );\n }\n presentCodeRedemptionSheet(): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('presentCodeRedemptionSheet');\n }\n setAttributes(_attributes: { [key: string]: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setAttributes');\n }\n setEmail(_email: { email: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setEmail');\n }\n setPhoneNumber(_phoneNumber: { phoneNumber: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setPhoneNumber');\n }\n setDisplayName(_displayName: { displayName: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setDisplayName');\n }\n setPushToken(_pushToken: { pushToken: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setPushToken');\n }\n setProxyURL(_url: { url: string }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setProxyURL');\n }\n collectDeviceIdentifiers(): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('collectDeviceIdentifiers');\n }\n setAdjustID(_adjustID: { adjustID: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setAdjustID');\n }\n setAppsflyerID(_appsflyerID: { appsflyerID: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setAppsflyerID');\n }\n setFBAnonymousID(_fbAnonymousID: {\n fbAnonymousID: string | null;\n }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setFBAnonymousID');\n }\n setMparticleID(_mparticleID: { mparticleID: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setMparticleID');\n }\n setCleverTapID(_cleverTapID: { cleverTapID: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setCleverTapID');\n }\n setMixpanelDistinctID(_mixpanelDistinctID: {\n mixpanelDistinctID: string | null;\n }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setMixpanelDistinctID');\n }\n setFirebaseAppInstanceID(_firebaseAppInstanceID: {\n firebaseAppInstanceID: string | null;\n }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setFirebaseAppInstanceID');\n }\n setOnesignalID(_onesignalID: { onesignalID: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setOnesignalID');\n }\n setAirshipChannelID(_airshipChannelID: {\n airshipChannelID: string | null;\n }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setAirshipChannelID');\n }\n setMediaSource(_mediaSource: { mediaSource: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setMediaSource');\n }\n setCampaign(_campaign: { campaign: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setCampaign');\n }\n setAdGroup(_adGroup: { adGroup: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setAdGroup');\n }\n setAd(_ad: { ad: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setAd');\n }\n setKeyword(_keyword: { keyword: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setKeyword');\n }\n setCreative(_creative: { creative: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setCreative');\n }\n canMakePayments(_features?: {\n features?: BILLING_FEATURE[];\n }): Promise<{ canMakePayments: boolean }> {\n return this.mockReturningFunctionIfEnabled('canMakePayments', {\n canMakePayments: true,\n });\n }\n beginRefundRequestForActiveEntitlement(): Promise<{\n refundRequestStatus: REFUND_REQUEST_STATUS;\n }> {\n const mockResult = {\n refundRequestStatus: REFUND_REQUEST_STATUS.USER_CANCELLED,\n };\n return this.mockReturningFunctionIfEnabled(\n 'beginRefundRequestForActiveEntitlement',\n mockResult,\n );\n }\n beginRefundRequestForEntitlement(_entitlementInfo: {\n entitlementInfo: PurchasesEntitlementInfo;\n }): Promise<{ refundRequestStatus: REFUND_REQUEST_STATUS }> {\n const mockResult = {\n refundRequestStatus: REFUND_REQUEST_STATUS.USER_CANCELLED,\n };\n return this.mockReturningFunctionIfEnabled(\n 'beginRefundRequestForEntitlement',\n mockResult,\n );\n }\n beginRefundRequestForProduct(_storeProduct: {\n storeProduct: PurchasesStoreProduct;\n }): Promise<{ refundRequestStatus: REFUND_REQUEST_STATUS }> {\n const mockResult = {\n refundRequestStatus: REFUND_REQUEST_STATUS.USER_CANCELLED,\n };\n return this.mockReturningFunctionIfEnabled(\n 'beginRefundRequestForProduct',\n mockResult,\n );\n }\n\n showInAppMessages(_options?: {\n messageTypes?: IN_APP_MESSAGE_TYPE[];\n }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('showInAppMessages');\n }\n\n isConfigured(): Promise<{ isConfigured: boolean }> {\n const mockResult = { isConfigured: true };\n return this.mockReturningFunctionIfEnabled('isConfigured', mockResult);\n }\n\n // Mock helpers\n\n private mockEmptyCustomerInfo: CustomerInfo = {\n entitlements: {\n all: {},\n active: {},\n verification: VERIFICATION_RESULT.NOT_REQUESTED,\n },\n activeSubscriptions: [],\n allPurchasedProductIdentifiers: [],\n latestExpirationDate: null,\n firstSeen: '2023-08-31T15:11:21.445Z',\n originalAppUserId: 'mock-web-user-id',\n requestDate: '2023-08-31T15:11:21.445Z',\n allExpirationDates: {},\n allPurchaseDates: {},\n originalApplicationVersion: null,\n originalPurchaseDate: null,\n managementURL: null,\n nonSubscriptionTransactions: [],\n };\n\n private mockTransaction(\n productIdentifier: string,\n ): PurchasesStoreTransaction {\n return {\n productIdentifier: productIdentifier,\n purchaseDate: new Date().toISOString(),\n transactionIdentifier: '',\n };\n }\n\n private mockNonReturningFunctionIfEnabled(\n functionName: string,\n ): Promise<void> {\n if (!this.shouldMockWebResults) {\n return Promise.reject(this.webNotSupportedErrorMessage);\n }\n console.log(`${functionName} called on web with mocking enabled. No-op`);\n return Promise.resolve();\n }\n\n private mockReturningFunctionIfEnabled<T>(\n functionName: string,\n returnValue: T,\n ): Promise<T> {\n if (!this.shouldMockWebResults) {\n return Promise.reject(this.webNotSupportedErrorMessage);\n }\n console.log(\n `${functionName} called on web with mocking enabled. Returning mocked value`,\n );\n return Promise.resolve(returnValue);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,sDAAsD;AAEtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAoB5C,OAAO,EACL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,+CAA+C,CAAC;AAcvD,MAAM,OAAO,YAAa,SAAQ,SAAS;IAA3C;;QACU,yBAAoB,GAAG,KAAK,CAAC;QAC7B,gCAA2B,GAAG,mCAAmC,CAAC;QAuW1E,eAAe;QAEP,0BAAqB,GAAiB;YAC5C,YAAY,EAAE;gBACZ,GAAG,EAAE,EAAE;gBACP,MAAM,EAAE,EAAE;gBACV,YAAY,EAAE,mBAAmB,CAAC,aAAa;aAChD;YACD,mBAAmB,EAAE,EAAE;YACvB,8BAA8B,EAAE,EAAE;YAClC,oBAAoB,EAAE,IAAI;YAC1B,SAAS,EAAE,0BAA0B;YACrC,iBAAiB,EAAE,kBAAkB;YACrC,WAAW,EAAE,0BAA0B;YACvC,kBAAkB,EAAE,EAAE;YACtB,gBAAgB,EAAE,EAAE;YACpB,0BAA0B,EAAE,IAAI;YAChC,oBAAoB,EAAE,IAAI;YAC1B,aAAa,EAAE,IAAI;YACnB,2BAA2B,EAAE,EAAE;SAChC,CAAC;IAkCJ,CAAC;IA3ZC,SAAS,CAAC,cAAsC;QAC9C,OAAO,IAAI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QAEd,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE;YAC9B,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;SACzD;QACD,OAAO,CAAC,GAAG,CACT,GAAG,YAAY,6DAA6D,CAC7E,CAAC;QACF,OAAO,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACtC,CAAC;CACF","sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\nimport { WebPlugin } from '@capacitor/core';\nimport type {\n BILLING_FEATURE,\n CustomerInfo,\n CustomerInfoUpdateListener,\n IN_APP_MESSAGE_TYPE,\n IntroEligibility,\n LOG_LEVEL,\n LogHandler,\n LogInResult,\n MakePurchaseResult,\n PurchasesConfiguration,\n PurchasesEntitlementInfo,\n PurchasesOffering,\n PurchasesOfferings,\n PurchasesPromotionalOffer,\n PurchasesStoreProduct,\n PurchasesStoreTransaction,\n ShouldPurchasePromoProductListener,\n} from '@revenuecat/purchases-typescript-internal-esm';\nimport {\n REFUND_REQUEST_STATUS,\n VERIFICATION_RESULT,\n} from '@revenuecat/purchases-typescript-internal-esm';\n\nimport type {\n GetProductOptions,\n GetPromotionalOfferOptions,\n PurchaseDiscountedPackageOptions,\n PurchaseDiscountedProductOptions,\n PurchasePackageOptions,\n PurchasesPlugin,\n PurchaseStoreProductOptions,\n PurchaseSubscriptionOptionOptions,\n SyncObserverModeAmazonPurchaseOptions,\n} from './definitions';\n\nexport class PurchasesWeb extends WebPlugin implements PurchasesPlugin {\n private shouldMockWebResults = false;\n private webNotSupportedErrorMessage = 'Web not supported in this plugin.';\n\n configure(_configuration: PurchasesConfiguration): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('configure');\n }\n\n setMockWebResults(options: { shouldMockWebResults: boolean }): Promise<void> {\n this.shouldMockWebResults = options.shouldMockWebResults;\n return Promise.resolve();\n }\n\n setFinishTransactions(_finishTransactions: {\n finishTransactions: boolean;\n }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setFinishTransactions');\n }\n setSimulatesAskToBuyInSandbox(_simulatesAskToBuyInSandbox: {\n simulatesAskToBuyInSandbox: boolean;\n }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled(\n 'setSimulatesAskToBuyInSandbox',\n );\n }\n addCustomerInfoUpdateListener(\n _customerInfoUpdateListener: CustomerInfoUpdateListener,\n ): Promise<string> {\n return this.mockReturningFunctionIfEnabled(\n 'addCustomerInfoUpdateListener',\n 'mock-callback-id',\n );\n }\n removeCustomerInfoUpdateListener(\n _listenerToRemove: string,\n ): Promise<{ wasRemoved: boolean }> {\n return this.mockReturningFunctionIfEnabled(\n 'removeCustomerInfoUpdateListener',\n { wasRemoved: false },\n );\n }\n addShouldPurchasePromoProductListener(\n _shouldPurchasePromoProductListener: ShouldPurchasePromoProductListener,\n ): Promise<string> {\n return this.mockReturningFunctionIfEnabled(\n 'addShouldPurchasePromoProductListener',\n 'mock-callback-id',\n );\n }\n removeShouldPurchasePromoProductListener(\n _listenerToRemove: string,\n ): Promise<{ wasRemoved: boolean }> {\n return this.mockReturningFunctionIfEnabled(\n 'removeShouldPurchasePromoProductListener',\n { wasRemoved: false },\n );\n }\n getOfferings(): Promise<PurchasesOfferings> {\n const mockOfferings: PurchasesOfferings = {\n all: {},\n current: null,\n };\n return this.mockReturningFunctionIfEnabled('getOfferings', mockOfferings);\n }\n getCurrentOfferingForPlacement(_options: {\n placementIdentifier: string;\n }): Promise<PurchasesOffering | null> {\n const mockOffering: PurchasesOffering | null = null;\n return this.mockReturningFunctionIfEnabled(\n 'getCurrentOfferingForPlacement',\n mockOffering,\n );\n }\n syncAttributesAndOfferingsIfNeeded(): Promise<PurchasesOfferings> {\n const mockOfferings: PurchasesOfferings = {\n all: {},\n current: null,\n };\n return this.mockReturningFunctionIfEnabled(\n 'syncAttributesAndOfferingsIfNeeded',\n mockOfferings,\n );\n }\n getProducts(\n _options: GetProductOptions,\n ): Promise<{ products: PurchasesStoreProduct[] }> {\n const mockProducts = { products: [] };\n return this.mockReturningFunctionIfEnabled('getProducts', mockProducts);\n }\n purchaseStoreProduct(\n _options: PurchaseStoreProductOptions,\n ): Promise<MakePurchaseResult> {\n const mockPurchaseResult: MakePurchaseResult = {\n productIdentifier: _options.product.identifier,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.product.identifier),\n };\n return this.mockReturningFunctionIfEnabled(\n 'purchaseStoreProduct',\n mockPurchaseResult,\n );\n }\n purchaseDiscountedProduct(\n _options: PurchaseDiscountedProductOptions,\n ): Promise<MakePurchaseResult> {\n const mockPurchaseResult: MakePurchaseResult = {\n productIdentifier: _options.product.identifier,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.product.identifier),\n };\n return this.mockReturningFunctionIfEnabled(\n 'purchaseDiscountedProduct',\n mockPurchaseResult,\n );\n }\n purchasePackage(\n _options: PurchasePackageOptions,\n ): Promise<MakePurchaseResult> {\n const mockPurchaseResult: MakePurchaseResult = {\n productIdentifier: _options.aPackage.product.identifier,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.aPackage.product.identifier),\n };\n return this.mockReturningFunctionIfEnabled(\n 'purchasePackage',\n mockPurchaseResult,\n );\n }\n purchaseSubscriptionOption(\n _options: PurchaseSubscriptionOptionOptions,\n ): Promise<MakePurchaseResult> {\n const mockPurchaseResult: MakePurchaseResult = {\n productIdentifier: _options.subscriptionOption.productId,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.subscriptionOption.productId),\n };\n return this.mockReturningFunctionIfEnabled(\n 'purchaseSubscriptionOption',\n mockPurchaseResult,\n );\n }\n purchaseDiscountedPackage(\n _options: PurchaseDiscountedPackageOptions,\n ): Promise<MakePurchaseResult> {\n const mockPurchaseResult: MakePurchaseResult = {\n productIdentifier: _options.aPackage.product.identifier,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.aPackage.product.identifier),\n };\n return this.mockReturningFunctionIfEnabled(\n 'purchaseDiscountedPackage',\n mockPurchaseResult,\n );\n }\n restorePurchases(): Promise<{ customerInfo: CustomerInfo }> {\n const mockResponse = { customerInfo: this.mockEmptyCustomerInfo };\n return this.mockReturningFunctionIfEnabled(\n 'restorePurchases',\n mockResponse,\n );\n }\n getAppUserID(): Promise<{ appUserID: string }> {\n return this.mockReturningFunctionIfEnabled('getAppUserID', {\n appUserID: 'test-web-user-id',\n });\n }\n logIn(_appUserID: { appUserID: string }): Promise<LogInResult> {\n const mockLogInResult: LogInResult = {\n customerInfo: this.mockEmptyCustomerInfo,\n created: false,\n };\n return this.mockReturningFunctionIfEnabled('logIn', mockLogInResult);\n }\n logOut(): Promise<{ customerInfo: CustomerInfo }> {\n const mockResponse = { customerInfo: this.mockEmptyCustomerInfo };\n return this.mockReturningFunctionIfEnabled('logOut', mockResponse);\n }\n setLogLevel(_level: { level: LOG_LEVEL }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setLogLevel');\n }\n setLogHandler(_logHandler: LogHandler): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setLogHandler');\n }\n getCustomerInfo(): Promise<{ customerInfo: CustomerInfo }> {\n const mockResponse = { customerInfo: this.mockEmptyCustomerInfo };\n return this.mockReturningFunctionIfEnabled('getCustomerInfo', mockResponse);\n }\n syncPurchases(): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('syncPurchases');\n }\n syncObserverModeAmazonPurchase(\n _options: SyncObserverModeAmazonPurchaseOptions,\n ): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled(\n 'syncObserverModeAmazonPurchase',\n );\n }\n enableAdServicesAttributionTokenCollection(): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled(\n 'enableAdServicesAttributionTokenCollection',\n );\n }\n isAnonymous(): Promise<{ isAnonymous: boolean }> {\n const mockResponse = { isAnonymous: false };\n return this.mockReturningFunctionIfEnabled('isAnonymous', mockResponse);\n }\n checkTrialOrIntroductoryPriceEligibility(_productIdentifiers: {\n productIdentifiers: string[];\n }): Promise<{ [productId: string]: IntroEligibility }> {\n return this.mockReturningFunctionIfEnabled(\n 'checkTrialOrIntroductoryPriceEligibility',\n {},\n );\n }\n getPromotionalOffer(\n _options: GetPromotionalOfferOptions,\n ): Promise<PurchasesPromotionalOffer | undefined> {\n return this.mockReturningFunctionIfEnabled(\n 'getPromotionalOffer',\n undefined,\n );\n }\n invalidateCustomerInfoCache(): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled(\n 'invalidateCustomerInfoCache',\n );\n }\n presentCodeRedemptionSheet(): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('presentCodeRedemptionSheet');\n }\n setAttributes(_attributes: { [key: string]: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setAttributes');\n }\n setEmail(_email: { email: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setEmail');\n }\n setPhoneNumber(_phoneNumber: { phoneNumber: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setPhoneNumber');\n }\n setDisplayName(_displayName: { displayName: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setDisplayName');\n }\n setPushToken(_pushToken: { pushToken: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setPushToken');\n }\n setProxyURL(_url: { url: string }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setProxyURL');\n }\n collectDeviceIdentifiers(): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('collectDeviceIdentifiers');\n }\n setAdjustID(_adjustID: { adjustID: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setAdjustID');\n }\n setAppsflyerID(_appsflyerID: { appsflyerID: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setAppsflyerID');\n }\n setFBAnonymousID(_fbAnonymousID: {\n fbAnonymousID: string | null;\n }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setFBAnonymousID');\n }\n setMparticleID(_mparticleID: { mparticleID: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setMparticleID');\n }\n setCleverTapID(_cleverTapID: { cleverTapID: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setCleverTapID');\n }\n setMixpanelDistinctID(_mixpanelDistinctID: {\n mixpanelDistinctID: string | null;\n }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setMixpanelDistinctID');\n }\n setFirebaseAppInstanceID(_firebaseAppInstanceID: {\n firebaseAppInstanceID: string | null;\n }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setFirebaseAppInstanceID');\n }\n setOnesignalID(_onesignalID: { onesignalID: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setOnesignalID');\n }\n setOnesignalUserID(_onesignalUserID: {\n onesignalUserID: string | null;\n }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setOnesignalUserID');\n }\n setAirshipChannelID(_airshipChannelID: {\n airshipChannelID: string | null;\n }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setAirshipChannelID');\n }\n setMediaSource(_mediaSource: { mediaSource: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setMediaSource');\n }\n setCampaign(_campaign: { campaign: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setCampaign');\n }\n setAdGroup(_adGroup: { adGroup: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setAdGroup');\n }\n setAd(_ad: { ad: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setAd');\n }\n setKeyword(_keyword: { keyword: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setKeyword');\n }\n setCreative(_creative: { creative: string | null }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('setCreative');\n }\n canMakePayments(_features?: {\n features?: BILLING_FEATURE[];\n }): Promise<{ canMakePayments: boolean }> {\n return this.mockReturningFunctionIfEnabled('canMakePayments', {\n canMakePayments: true,\n });\n }\n beginRefundRequestForActiveEntitlement(): Promise<{\n refundRequestStatus: REFUND_REQUEST_STATUS;\n }> {\n const mockResult = {\n refundRequestStatus: REFUND_REQUEST_STATUS.USER_CANCELLED,\n };\n return this.mockReturningFunctionIfEnabled(\n 'beginRefundRequestForActiveEntitlement',\n mockResult,\n );\n }\n beginRefundRequestForEntitlement(_entitlementInfo: {\n entitlementInfo: PurchasesEntitlementInfo;\n }): Promise<{ refundRequestStatus: REFUND_REQUEST_STATUS }> {\n const mockResult = {\n refundRequestStatus: REFUND_REQUEST_STATUS.USER_CANCELLED,\n };\n return this.mockReturningFunctionIfEnabled(\n 'beginRefundRequestForEntitlement',\n mockResult,\n );\n }\n beginRefundRequestForProduct(_storeProduct: {\n storeProduct: PurchasesStoreProduct;\n }): Promise<{ refundRequestStatus: REFUND_REQUEST_STATUS }> {\n const mockResult = {\n refundRequestStatus: REFUND_REQUEST_STATUS.USER_CANCELLED,\n };\n return this.mockReturningFunctionIfEnabled(\n 'beginRefundRequestForProduct',\n mockResult,\n );\n }\n\n showInAppMessages(_options?: {\n messageTypes?: IN_APP_MESSAGE_TYPE[];\n }): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('showInAppMessages');\n }\n\n isConfigured(): Promise<{ isConfigured: boolean }> {\n const mockResult = { isConfigured: true };\n return this.mockReturningFunctionIfEnabled('isConfigured', mockResult);\n }\n\n // Mock helpers\n\n private mockEmptyCustomerInfo: CustomerInfo = {\n entitlements: {\n all: {},\n active: {},\n verification: VERIFICATION_RESULT.NOT_REQUESTED,\n },\n activeSubscriptions: [],\n allPurchasedProductIdentifiers: [],\n latestExpirationDate: null,\n firstSeen: '2023-08-31T15:11:21.445Z',\n originalAppUserId: 'mock-web-user-id',\n requestDate: '2023-08-31T15:11:21.445Z',\n allExpirationDates: {},\n allPurchaseDates: {},\n originalApplicationVersion: null,\n originalPurchaseDate: null,\n managementURL: null,\n nonSubscriptionTransactions: [],\n };\n\n private mockTransaction(\n productIdentifier: string,\n ): PurchasesStoreTransaction {\n return {\n productIdentifier: productIdentifier,\n purchaseDate: new Date().toISOString(),\n transactionIdentifier: '',\n };\n }\n\n private mockNonReturningFunctionIfEnabled(\n functionName: string,\n ): Promise<void> {\n if (!this.shouldMockWebResults) {\n return Promise.reject(this.webNotSupportedErrorMessage);\n }\n console.log(`${functionName} called on web with mocking enabled. No-op`);\n return Promise.resolve();\n }\n\n private mockReturningFunctionIfEnabled<T>(\n functionName: string,\n returnValue: T,\n ): Promise<T> {\n if (!this.shouldMockWebResults) {\n return Promise.reject(this.webNotSupportedErrorMessage);\n }\n console.log(\n `${functionName} called on web with mocking enabled. Returning mocked value`,\n );\n return Promise.resolve(returnValue);\n }\n}\n"]}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -223,6 +223,9 @@ class PurchasesWeb extends core.WebPlugin {
|
|
|
223
223
|
setOnesignalID(_onesignalID) {
|
|
224
224
|
return this.mockNonReturningFunctionIfEnabled('setOnesignalID');
|
|
225
225
|
}
|
|
226
|
+
setOnesignalUserID(_onesignalUserID) {
|
|
227
|
+
return this.mockNonReturningFunctionIfEnabled('setOnesignalUserID');
|
|
228
|
+
}
|
|
226
229
|
setAirshipChannelID(_airshipChannelID) {
|
|
227
230
|
return this.mockNonReturningFunctionIfEnabled('setAirshipChannelID');
|
|
228
231
|
}
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Purchases = registerPlugin('Purchases', {\n web: () => import('./web').then(m => new m.PurchasesWeb()),\n});\nexport * from './definitions';\nexport { Purchases };\n//# sourceMappingURL=index.js.map","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { WebPlugin } from '@capacitor/core';\nimport { REFUND_REQUEST_STATUS, VERIFICATION_RESULT, } from '@revenuecat/purchases-typescript-internal-esm';\nexport class PurchasesWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.shouldMockWebResults = false;\n this.webNotSupportedErrorMessage = 'Web not supported in this plugin.';\n // Mock helpers\n this.mockEmptyCustomerInfo = {\n entitlements: {\n all: {},\n active: {},\n verification: VERIFICATION_RESULT.NOT_REQUESTED,\n },\n activeSubscriptions: [],\n allPurchasedProductIdentifiers: [],\n latestExpirationDate: null,\n firstSeen: '2023-08-31T15:11:21.445Z',\n originalAppUserId: 'mock-web-user-id',\n requestDate: '2023-08-31T15:11:21.445Z',\n allExpirationDates: {},\n allPurchaseDates: {},\n originalApplicationVersion: null,\n originalPurchaseDate: null,\n managementURL: null,\n nonSubscriptionTransactions: [],\n };\n }\n configure(_configuration) {\n return this.mockNonReturningFunctionIfEnabled('configure');\n }\n setMockWebResults(options) {\n this.shouldMockWebResults = options.shouldMockWebResults;\n return Promise.resolve();\n }\n setFinishTransactions(_finishTransactions) {\n return this.mockNonReturningFunctionIfEnabled('setFinishTransactions');\n }\n setSimulatesAskToBuyInSandbox(_simulatesAskToBuyInSandbox) {\n return this.mockNonReturningFunctionIfEnabled('setSimulatesAskToBuyInSandbox');\n }\n addCustomerInfoUpdateListener(_customerInfoUpdateListener) {\n return this.mockReturningFunctionIfEnabled('addCustomerInfoUpdateListener', 'mock-callback-id');\n }\n removeCustomerInfoUpdateListener(_listenerToRemove) {\n return this.mockReturningFunctionIfEnabled('removeCustomerInfoUpdateListener', { wasRemoved: false });\n }\n addShouldPurchasePromoProductListener(_shouldPurchasePromoProductListener) {\n return this.mockReturningFunctionIfEnabled('addShouldPurchasePromoProductListener', 'mock-callback-id');\n }\n removeShouldPurchasePromoProductListener(_listenerToRemove) {\n return this.mockReturningFunctionIfEnabled('removeShouldPurchasePromoProductListener', { wasRemoved: false });\n }\n getOfferings() {\n const mockOfferings = {\n all: {},\n current: null,\n };\n return this.mockReturningFunctionIfEnabled('getOfferings', mockOfferings);\n }\n getCurrentOfferingForPlacement(_options) {\n const mockOffering = null;\n return this.mockReturningFunctionIfEnabled('getCurrentOfferingForPlacement', mockOffering);\n }\n syncAttributesAndOfferingsIfNeeded() {\n const mockOfferings = {\n all: {},\n current: null,\n };\n return this.mockReturningFunctionIfEnabled('syncAttributesAndOfferingsIfNeeded', mockOfferings);\n }\n getProducts(_options) {\n const mockProducts = { products: [] };\n return this.mockReturningFunctionIfEnabled('getProducts', mockProducts);\n }\n purchaseStoreProduct(_options) {\n const mockPurchaseResult = {\n productIdentifier: _options.product.identifier,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.product.identifier),\n };\n return this.mockReturningFunctionIfEnabled('purchaseStoreProduct', mockPurchaseResult);\n }\n purchaseDiscountedProduct(_options) {\n const mockPurchaseResult = {\n productIdentifier: _options.product.identifier,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.product.identifier),\n };\n return this.mockReturningFunctionIfEnabled('purchaseDiscountedProduct', mockPurchaseResult);\n }\n purchasePackage(_options) {\n const mockPurchaseResult = {\n productIdentifier: _options.aPackage.product.identifier,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.aPackage.product.identifier),\n };\n return this.mockReturningFunctionIfEnabled('purchasePackage', mockPurchaseResult);\n }\n purchaseSubscriptionOption(_options) {\n const mockPurchaseResult = {\n productIdentifier: _options.subscriptionOption.productId,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.subscriptionOption.productId),\n };\n return this.mockReturningFunctionIfEnabled('purchaseSubscriptionOption', mockPurchaseResult);\n }\n purchaseDiscountedPackage(_options) {\n const mockPurchaseResult = {\n productIdentifier: _options.aPackage.product.identifier,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.aPackage.product.identifier),\n };\n return this.mockReturningFunctionIfEnabled('purchaseDiscountedPackage', mockPurchaseResult);\n }\n restorePurchases() {\n const mockResponse = { customerInfo: this.mockEmptyCustomerInfo };\n return this.mockReturningFunctionIfEnabled('restorePurchases', mockResponse);\n }\n getAppUserID() {\n return this.mockReturningFunctionIfEnabled('getAppUserID', {\n appUserID: 'test-web-user-id',\n });\n }\n logIn(_appUserID) {\n const mockLogInResult = {\n customerInfo: this.mockEmptyCustomerInfo,\n created: false,\n };\n return this.mockReturningFunctionIfEnabled('logIn', mockLogInResult);\n }\n logOut() {\n const mockResponse = { customerInfo: this.mockEmptyCustomerInfo };\n return this.mockReturningFunctionIfEnabled('logOut', mockResponse);\n }\n setLogLevel(_level) {\n return this.mockNonReturningFunctionIfEnabled('setLogLevel');\n }\n setLogHandler(_logHandler) {\n return this.mockNonReturningFunctionIfEnabled('setLogHandler');\n }\n getCustomerInfo() {\n const mockResponse = { customerInfo: this.mockEmptyCustomerInfo };\n return this.mockReturningFunctionIfEnabled('getCustomerInfo', mockResponse);\n }\n syncPurchases() {\n return this.mockNonReturningFunctionIfEnabled('syncPurchases');\n }\n syncObserverModeAmazonPurchase(_options) {\n return this.mockNonReturningFunctionIfEnabled('syncObserverModeAmazonPurchase');\n }\n enableAdServicesAttributionTokenCollection() {\n return this.mockNonReturningFunctionIfEnabled('enableAdServicesAttributionTokenCollection');\n }\n isAnonymous() {\n const mockResponse = { isAnonymous: false };\n return this.mockReturningFunctionIfEnabled('isAnonymous', mockResponse);\n }\n checkTrialOrIntroductoryPriceEligibility(_productIdentifiers) {\n return this.mockReturningFunctionIfEnabled('checkTrialOrIntroductoryPriceEligibility', {});\n }\n getPromotionalOffer(_options) {\n return this.mockReturningFunctionIfEnabled('getPromotionalOffer', undefined);\n }\n invalidateCustomerInfoCache() {\n return this.mockNonReturningFunctionIfEnabled('invalidateCustomerInfoCache');\n }\n presentCodeRedemptionSheet() {\n return this.mockNonReturningFunctionIfEnabled('presentCodeRedemptionSheet');\n }\n setAttributes(_attributes) {\n return this.mockNonReturningFunctionIfEnabled('setAttributes');\n }\n setEmail(_email) {\n return this.mockNonReturningFunctionIfEnabled('setEmail');\n }\n setPhoneNumber(_phoneNumber) {\n return this.mockNonReturningFunctionIfEnabled('setPhoneNumber');\n }\n setDisplayName(_displayName) {\n return this.mockNonReturningFunctionIfEnabled('setDisplayName');\n }\n setPushToken(_pushToken) {\n return this.mockNonReturningFunctionIfEnabled('setPushToken');\n }\n setProxyURL(_url) {\n return this.mockNonReturningFunctionIfEnabled('setProxyURL');\n }\n collectDeviceIdentifiers() {\n return this.mockNonReturningFunctionIfEnabled('collectDeviceIdentifiers');\n }\n setAdjustID(_adjustID) {\n return this.mockNonReturningFunctionIfEnabled('setAdjustID');\n }\n setAppsflyerID(_appsflyerID) {\n return this.mockNonReturningFunctionIfEnabled('setAppsflyerID');\n }\n setFBAnonymousID(_fbAnonymousID) {\n return this.mockNonReturningFunctionIfEnabled('setFBAnonymousID');\n }\n setMparticleID(_mparticleID) {\n return this.mockNonReturningFunctionIfEnabled('setMparticleID');\n }\n setCleverTapID(_cleverTapID) {\n return this.mockNonReturningFunctionIfEnabled('setCleverTapID');\n }\n setMixpanelDistinctID(_mixpanelDistinctID) {\n return this.mockNonReturningFunctionIfEnabled('setMixpanelDistinctID');\n }\n setFirebaseAppInstanceID(_firebaseAppInstanceID) {\n return this.mockNonReturningFunctionIfEnabled('setFirebaseAppInstanceID');\n }\n setOnesignalID(_onesignalID) {\n return this.mockNonReturningFunctionIfEnabled('setOnesignalID');\n }\n setAirshipChannelID(_airshipChannelID) {\n return this.mockNonReturningFunctionIfEnabled('setAirshipChannelID');\n }\n setMediaSource(_mediaSource) {\n return this.mockNonReturningFunctionIfEnabled('setMediaSource');\n }\n setCampaign(_campaign) {\n return this.mockNonReturningFunctionIfEnabled('setCampaign');\n }\n setAdGroup(_adGroup) {\n return this.mockNonReturningFunctionIfEnabled('setAdGroup');\n }\n setAd(_ad) {\n return this.mockNonReturningFunctionIfEnabled('setAd');\n }\n setKeyword(_keyword) {\n return this.mockNonReturningFunctionIfEnabled('setKeyword');\n }\n setCreative(_creative) {\n return this.mockNonReturningFunctionIfEnabled('setCreative');\n }\n canMakePayments(_features) {\n return this.mockReturningFunctionIfEnabled('canMakePayments', {\n canMakePayments: true,\n });\n }\n beginRefundRequestForActiveEntitlement() {\n const mockResult = {\n refundRequestStatus: REFUND_REQUEST_STATUS.USER_CANCELLED,\n };\n return this.mockReturningFunctionIfEnabled('beginRefundRequestForActiveEntitlement', mockResult);\n }\n beginRefundRequestForEntitlement(_entitlementInfo) {\n const mockResult = {\n refundRequestStatus: REFUND_REQUEST_STATUS.USER_CANCELLED,\n };\n return this.mockReturningFunctionIfEnabled('beginRefundRequestForEntitlement', mockResult);\n }\n beginRefundRequestForProduct(_storeProduct) {\n const mockResult = {\n refundRequestStatus: REFUND_REQUEST_STATUS.USER_CANCELLED,\n };\n return this.mockReturningFunctionIfEnabled('beginRefundRequestForProduct', mockResult);\n }\n showInAppMessages(_options) {\n return this.mockNonReturningFunctionIfEnabled('showInAppMessages');\n }\n isConfigured() {\n const mockResult = { isConfigured: true };\n return this.mockReturningFunctionIfEnabled('isConfigured', mockResult);\n }\n mockTransaction(productIdentifier) {\n return {\n productIdentifier: productIdentifier,\n purchaseDate: new Date().toISOString(),\n transactionIdentifier: '',\n };\n }\n mockNonReturningFunctionIfEnabled(functionName) {\n if (!this.shouldMockWebResults) {\n return Promise.reject(this.webNotSupportedErrorMessage);\n }\n console.log(`${functionName} called on web with mocking enabled. No-op`);\n return Promise.resolve();\n }\n mockReturningFunctionIfEnabled(functionName, returnValue) {\n if (!this.shouldMockWebResults) {\n return Promise.reject(this.webNotSupportedErrorMessage);\n }\n console.log(`${functionName} called on web with mocking enabled. Returning mocked value`);\n return Promise.resolve(returnValue);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin","VERIFICATION_RESULT","REFUND_REQUEST_STATUS"],"mappings":";;;;;;;AACK,MAAC,SAAS,GAAGA,mBAAc,CAAC,WAAW,EAAE;AAC9C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,YAAY,EAAE,CAAC;AAC9D,CAAC;;AC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C,YAAY,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;AACpE,SAAS;AACT,QAAQ,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,2DAA2D,CAAC,CAAC,CAAC;AAClG,QAAQ,OAAO,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;AAC5C,KAAK;AACL;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Purchases = registerPlugin('Purchases', {\n web: () => import('./web').then(m => new m.PurchasesWeb()),\n});\nexport * from './definitions';\nexport { Purchases };\n//# sourceMappingURL=index.js.map","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { WebPlugin } from '@capacitor/core';\nimport { REFUND_REQUEST_STATUS, VERIFICATION_RESULT, } from '@revenuecat/purchases-typescript-internal-esm';\nexport class PurchasesWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.shouldMockWebResults = false;\n this.webNotSupportedErrorMessage = 'Web not supported in this plugin.';\n // Mock helpers\n this.mockEmptyCustomerInfo = {\n entitlements: {\n all: {},\n active: {},\n verification: VERIFICATION_RESULT.NOT_REQUESTED,\n },\n activeSubscriptions: [],\n allPurchasedProductIdentifiers: [],\n latestExpirationDate: null,\n firstSeen: '2023-08-31T15:11:21.445Z',\n originalAppUserId: 'mock-web-user-id',\n requestDate: '2023-08-31T15:11:21.445Z',\n allExpirationDates: {},\n allPurchaseDates: {},\n originalApplicationVersion: null,\n originalPurchaseDate: null,\n managementURL: null,\n nonSubscriptionTransactions: [],\n };\n }\n configure(_configuration) {\n return this.mockNonReturningFunctionIfEnabled('configure');\n }\n setMockWebResults(options) {\n this.shouldMockWebResults = options.shouldMockWebResults;\n return Promise.resolve();\n }\n setFinishTransactions(_finishTransactions) {\n return this.mockNonReturningFunctionIfEnabled('setFinishTransactions');\n }\n setSimulatesAskToBuyInSandbox(_simulatesAskToBuyInSandbox) {\n return this.mockNonReturningFunctionIfEnabled('setSimulatesAskToBuyInSandbox');\n }\n addCustomerInfoUpdateListener(_customerInfoUpdateListener) {\n return this.mockReturningFunctionIfEnabled('addCustomerInfoUpdateListener', 'mock-callback-id');\n }\n removeCustomerInfoUpdateListener(_listenerToRemove) {\n return this.mockReturningFunctionIfEnabled('removeCustomerInfoUpdateListener', { wasRemoved: false });\n }\n addShouldPurchasePromoProductListener(_shouldPurchasePromoProductListener) {\n return this.mockReturningFunctionIfEnabled('addShouldPurchasePromoProductListener', 'mock-callback-id');\n }\n removeShouldPurchasePromoProductListener(_listenerToRemove) {\n return this.mockReturningFunctionIfEnabled('removeShouldPurchasePromoProductListener', { wasRemoved: false });\n }\n getOfferings() {\n const mockOfferings = {\n all: {},\n current: null,\n };\n return this.mockReturningFunctionIfEnabled('getOfferings', mockOfferings);\n }\n getCurrentOfferingForPlacement(_options) {\n const mockOffering = null;\n return this.mockReturningFunctionIfEnabled('getCurrentOfferingForPlacement', mockOffering);\n }\n syncAttributesAndOfferingsIfNeeded() {\n const mockOfferings = {\n all: {},\n current: null,\n };\n return this.mockReturningFunctionIfEnabled('syncAttributesAndOfferingsIfNeeded', mockOfferings);\n }\n getProducts(_options) {\n const mockProducts = { products: [] };\n return this.mockReturningFunctionIfEnabled('getProducts', mockProducts);\n }\n purchaseStoreProduct(_options) {\n const mockPurchaseResult = {\n productIdentifier: _options.product.identifier,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.product.identifier),\n };\n return this.mockReturningFunctionIfEnabled('purchaseStoreProduct', mockPurchaseResult);\n }\n purchaseDiscountedProduct(_options) {\n const mockPurchaseResult = {\n productIdentifier: _options.product.identifier,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.product.identifier),\n };\n return this.mockReturningFunctionIfEnabled('purchaseDiscountedProduct', mockPurchaseResult);\n }\n purchasePackage(_options) {\n const mockPurchaseResult = {\n productIdentifier: _options.aPackage.product.identifier,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.aPackage.product.identifier),\n };\n return this.mockReturningFunctionIfEnabled('purchasePackage', mockPurchaseResult);\n }\n purchaseSubscriptionOption(_options) {\n const mockPurchaseResult = {\n productIdentifier: _options.subscriptionOption.productId,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.subscriptionOption.productId),\n };\n return this.mockReturningFunctionIfEnabled('purchaseSubscriptionOption', mockPurchaseResult);\n }\n purchaseDiscountedPackage(_options) {\n const mockPurchaseResult = {\n productIdentifier: _options.aPackage.product.identifier,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.aPackage.product.identifier),\n };\n return this.mockReturningFunctionIfEnabled('purchaseDiscountedPackage', mockPurchaseResult);\n }\n restorePurchases() {\n const mockResponse = { customerInfo: this.mockEmptyCustomerInfo };\n return this.mockReturningFunctionIfEnabled('restorePurchases', mockResponse);\n }\n getAppUserID() {\n return this.mockReturningFunctionIfEnabled('getAppUserID', {\n appUserID: 'test-web-user-id',\n });\n }\n logIn(_appUserID) {\n const mockLogInResult = {\n customerInfo: this.mockEmptyCustomerInfo,\n created: false,\n };\n return this.mockReturningFunctionIfEnabled('logIn', mockLogInResult);\n }\n logOut() {\n const mockResponse = { customerInfo: this.mockEmptyCustomerInfo };\n return this.mockReturningFunctionIfEnabled('logOut', mockResponse);\n }\n setLogLevel(_level) {\n return this.mockNonReturningFunctionIfEnabled('setLogLevel');\n }\n setLogHandler(_logHandler) {\n return this.mockNonReturningFunctionIfEnabled('setLogHandler');\n }\n getCustomerInfo() {\n const mockResponse = { customerInfo: this.mockEmptyCustomerInfo };\n return this.mockReturningFunctionIfEnabled('getCustomerInfo', mockResponse);\n }\n syncPurchases() {\n return this.mockNonReturningFunctionIfEnabled('syncPurchases');\n }\n syncObserverModeAmazonPurchase(_options) {\n return this.mockNonReturningFunctionIfEnabled('syncObserverModeAmazonPurchase');\n }\n enableAdServicesAttributionTokenCollection() {\n return this.mockNonReturningFunctionIfEnabled('enableAdServicesAttributionTokenCollection');\n }\n isAnonymous() {\n const mockResponse = { isAnonymous: false };\n return this.mockReturningFunctionIfEnabled('isAnonymous', mockResponse);\n }\n checkTrialOrIntroductoryPriceEligibility(_productIdentifiers) {\n return this.mockReturningFunctionIfEnabled('checkTrialOrIntroductoryPriceEligibility', {});\n }\n getPromotionalOffer(_options) {\n return this.mockReturningFunctionIfEnabled('getPromotionalOffer', undefined);\n }\n invalidateCustomerInfoCache() {\n return this.mockNonReturningFunctionIfEnabled('invalidateCustomerInfoCache');\n }\n presentCodeRedemptionSheet() {\n return this.mockNonReturningFunctionIfEnabled('presentCodeRedemptionSheet');\n }\n setAttributes(_attributes) {\n return this.mockNonReturningFunctionIfEnabled('setAttributes');\n }\n setEmail(_email) {\n return this.mockNonReturningFunctionIfEnabled('setEmail');\n }\n setPhoneNumber(_phoneNumber) {\n return this.mockNonReturningFunctionIfEnabled('setPhoneNumber');\n }\n setDisplayName(_displayName) {\n return this.mockNonReturningFunctionIfEnabled('setDisplayName');\n }\n setPushToken(_pushToken) {\n return this.mockNonReturningFunctionIfEnabled('setPushToken');\n }\n setProxyURL(_url) {\n return this.mockNonReturningFunctionIfEnabled('setProxyURL');\n }\n collectDeviceIdentifiers() {\n return this.mockNonReturningFunctionIfEnabled('collectDeviceIdentifiers');\n }\n setAdjustID(_adjustID) {\n return this.mockNonReturningFunctionIfEnabled('setAdjustID');\n }\n setAppsflyerID(_appsflyerID) {\n return this.mockNonReturningFunctionIfEnabled('setAppsflyerID');\n }\n setFBAnonymousID(_fbAnonymousID) {\n return this.mockNonReturningFunctionIfEnabled('setFBAnonymousID');\n }\n setMparticleID(_mparticleID) {\n return this.mockNonReturningFunctionIfEnabled('setMparticleID');\n }\n setCleverTapID(_cleverTapID) {\n return this.mockNonReturningFunctionIfEnabled('setCleverTapID');\n }\n setMixpanelDistinctID(_mixpanelDistinctID) {\n return this.mockNonReturningFunctionIfEnabled('setMixpanelDistinctID');\n }\n setFirebaseAppInstanceID(_firebaseAppInstanceID) {\n return this.mockNonReturningFunctionIfEnabled('setFirebaseAppInstanceID');\n }\n setOnesignalID(_onesignalID) {\n return this.mockNonReturningFunctionIfEnabled('setOnesignalID');\n }\n setOnesignalUserID(_onesignalUserID) {\n return this.mockNonReturningFunctionIfEnabled('setOnesignalUserID');\n }\n setAirshipChannelID(_airshipChannelID) {\n return this.mockNonReturningFunctionIfEnabled('setAirshipChannelID');\n }\n setMediaSource(_mediaSource) {\n return this.mockNonReturningFunctionIfEnabled('setMediaSource');\n }\n setCampaign(_campaign) {\n return this.mockNonReturningFunctionIfEnabled('setCampaign');\n }\n setAdGroup(_adGroup) {\n return this.mockNonReturningFunctionIfEnabled('setAdGroup');\n }\n setAd(_ad) {\n return this.mockNonReturningFunctionIfEnabled('setAd');\n }\n setKeyword(_keyword) {\n return this.mockNonReturningFunctionIfEnabled('setKeyword');\n }\n setCreative(_creative) {\n return this.mockNonReturningFunctionIfEnabled('setCreative');\n }\n canMakePayments(_features) {\n return this.mockReturningFunctionIfEnabled('canMakePayments', {\n canMakePayments: true,\n });\n }\n beginRefundRequestForActiveEntitlement() {\n const mockResult = {\n refundRequestStatus: REFUND_REQUEST_STATUS.USER_CANCELLED,\n };\n return this.mockReturningFunctionIfEnabled('beginRefundRequestForActiveEntitlement', mockResult);\n }\n beginRefundRequestForEntitlement(_entitlementInfo) {\n const mockResult = {\n refundRequestStatus: REFUND_REQUEST_STATUS.USER_CANCELLED,\n };\n return this.mockReturningFunctionIfEnabled('beginRefundRequestForEntitlement', mockResult);\n }\n beginRefundRequestForProduct(_storeProduct) {\n const mockResult = {\n refundRequestStatus: REFUND_REQUEST_STATUS.USER_CANCELLED,\n };\n return this.mockReturningFunctionIfEnabled('beginRefundRequestForProduct', mockResult);\n }\n showInAppMessages(_options) {\n return this.mockNonReturningFunctionIfEnabled('showInAppMessages');\n }\n isConfigured() {\n const mockResult = { isConfigured: true };\n return this.mockReturningFunctionIfEnabled('isConfigured', mockResult);\n }\n mockTransaction(productIdentifier) {\n return {\n productIdentifier: productIdentifier,\n purchaseDate: new Date().toISOString(),\n transactionIdentifier: '',\n };\n }\n mockNonReturningFunctionIfEnabled(functionName) {\n if (!this.shouldMockWebResults) {\n return Promise.reject(this.webNotSupportedErrorMessage);\n }\n console.log(`${functionName} called on web with mocking enabled. No-op`);\n return Promise.resolve();\n }\n mockReturningFunctionIfEnabled(functionName, returnValue) {\n if (!this.shouldMockWebResults) {\n return Promise.reject(this.webNotSupportedErrorMessage);\n }\n console.log(`${functionName} called on web with mocking enabled. Returning mocked value`);\n return Promise.resolve(returnValue);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin","VERIFICATION_RESULT","REFUND_REQUEST_STATUS"],"mappings":";;;;;;;AACK,MAAC,SAAS,GAAGA,mBAAc,CAAC,WAAW,EAAE;AAC9C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,YAAY,EAAE,CAAC;AAC9D,CAAC;;ACHD;AAGO,MAAM,YAAY,SAASC,cAAS,CAAC;AAC5C,IAAI,WAAW,GAAG;AAClB,QAAQ,KAAK,CAAC,GAAG,SAAS,CAAC,CAAC;AAC5B,QAAQ,IAAI,CAAC,oBAAoB,GAAG,KAAK,CAAC;AAC1C,QAAQ,IAAI,CAAC,2BAA2B,GAAG,mCAAmC,CAAC;AAC/E;AACA,QAAQ,IAAI,CAAC,qBAAqB,GAAG;AACrC,YAAY,YAAY,EAAE;AAC1B,gBAAgB,GAAG,EAAE,EAAE;AACvB,gBAAgB,MAAM,EAAE,EAAE;AAC1B,gBAAgB,YAAY,EAAEC,kDAAmB,CAAC,aAAa;AAC/D,aAAa;AACb,YAAY,mBAAmB,EAAE,EAAE;AACnC,YAAY,8BAA8B,EAAE,EAAE;AAC9C,YAAY,oBAAoB,EAAE,IAAI;AACtC,YAAY,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AACL,IAAI,YAAY,GAAG;AACnB,QAAQ,MAAM,UAAU,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;AAClD,QAAQ,OAAO,IAAI,CAAC,8BAA8B,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;AAC/E,KAAK;AACL,IAAI,eAAe,CAAC,iBAAiB,EAAE;AACvC,QAAQ,OAAO;AACf,YAAY,iBAAiB,EAAE,iBAAiB;AAChD,YAAY,YAAY,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;AAClD,YAAY,qBAAqB,EAAE,EAAE;AACrC,SAAS,CAAC;AACV,KAAK;AACL,IAAI,iCAAiC,CAAC,YAAY,EAAE;AACpD,QAAQ,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE;AACxC,YAAY,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;AACpE,SAAS;AACT,QAAQ,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,0CAA0C,CAAC,CAAC,CAAC;AACjF,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AACjC,KAAK;AACL,IAAI,8BAA8B,CAAC,YAAY,EAAE,WAAW,EAAE;AAC9D,QAAQ,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE;AACxC,YAAY,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;AACpE,SAAS;AACT,QAAQ,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,2DAA2D,CAAC,CAAC,CAAC;AAClG,QAAQ,OAAO,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;AAC5C,KAAK;AACL;;;;;;;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -219,6 +219,9 @@ var capacitorPurchases = (function (exports, core, purchasesTypescriptInternalEs
|
|
|
219
219
|
setOnesignalID(_onesignalID) {
|
|
220
220
|
return this.mockNonReturningFunctionIfEnabled('setOnesignalID');
|
|
221
221
|
}
|
|
222
|
+
setOnesignalUserID(_onesignalUserID) {
|
|
223
|
+
return this.mockNonReturningFunctionIfEnabled('setOnesignalUserID');
|
|
224
|
+
}
|
|
222
225
|
setAirshipChannelID(_airshipChannelID) {
|
|
223
226
|
return this.mockNonReturningFunctionIfEnabled('setAirshipChannelID');
|
|
224
227
|
}
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Purchases = registerPlugin('Purchases', {\n web: () => import('./web').then(m => new m.PurchasesWeb()),\n});\nexport * from './definitions';\nexport { Purchases };\n//# sourceMappingURL=index.js.map","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { WebPlugin } from '@capacitor/core';\nimport { REFUND_REQUEST_STATUS, VERIFICATION_RESULT, } from '@revenuecat/purchases-typescript-internal-esm';\nexport class PurchasesWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.shouldMockWebResults = false;\n this.webNotSupportedErrorMessage = 'Web not supported in this plugin.';\n // Mock helpers\n this.mockEmptyCustomerInfo = {\n entitlements: {\n all: {},\n active: {},\n verification: VERIFICATION_RESULT.NOT_REQUESTED,\n },\n activeSubscriptions: [],\n allPurchasedProductIdentifiers: [],\n latestExpirationDate: null,\n firstSeen: '2023-08-31T15:11:21.445Z',\n originalAppUserId: 'mock-web-user-id',\n requestDate: '2023-08-31T15:11:21.445Z',\n allExpirationDates: {},\n allPurchaseDates: {},\n originalApplicationVersion: null,\n originalPurchaseDate: null,\n managementURL: null,\n nonSubscriptionTransactions: [],\n };\n }\n configure(_configuration) {\n return this.mockNonReturningFunctionIfEnabled('configure');\n }\n setMockWebResults(options) {\n this.shouldMockWebResults = options.shouldMockWebResults;\n return Promise.resolve();\n }\n setFinishTransactions(_finishTransactions) {\n return this.mockNonReturningFunctionIfEnabled('setFinishTransactions');\n }\n setSimulatesAskToBuyInSandbox(_simulatesAskToBuyInSandbox) {\n return this.mockNonReturningFunctionIfEnabled('setSimulatesAskToBuyInSandbox');\n }\n addCustomerInfoUpdateListener(_customerInfoUpdateListener) {\n return this.mockReturningFunctionIfEnabled('addCustomerInfoUpdateListener', 'mock-callback-id');\n }\n removeCustomerInfoUpdateListener(_listenerToRemove) {\n return this.mockReturningFunctionIfEnabled('removeCustomerInfoUpdateListener', { wasRemoved: false });\n }\n addShouldPurchasePromoProductListener(_shouldPurchasePromoProductListener) {\n return this.mockReturningFunctionIfEnabled('addShouldPurchasePromoProductListener', 'mock-callback-id');\n }\n removeShouldPurchasePromoProductListener(_listenerToRemove) {\n return this.mockReturningFunctionIfEnabled('removeShouldPurchasePromoProductListener', { wasRemoved: false });\n }\n getOfferings() {\n const mockOfferings = {\n all: {},\n current: null,\n };\n return this.mockReturningFunctionIfEnabled('getOfferings', mockOfferings);\n }\n getCurrentOfferingForPlacement(_options) {\n const mockOffering = null;\n return this.mockReturningFunctionIfEnabled('getCurrentOfferingForPlacement', mockOffering);\n }\n syncAttributesAndOfferingsIfNeeded() {\n const mockOfferings = {\n all: {},\n current: null,\n };\n return this.mockReturningFunctionIfEnabled('syncAttributesAndOfferingsIfNeeded', mockOfferings);\n }\n getProducts(_options) {\n const mockProducts = { products: [] };\n return this.mockReturningFunctionIfEnabled('getProducts', mockProducts);\n }\n purchaseStoreProduct(_options) {\n const mockPurchaseResult = {\n productIdentifier: _options.product.identifier,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.product.identifier),\n };\n return this.mockReturningFunctionIfEnabled('purchaseStoreProduct', mockPurchaseResult);\n }\n purchaseDiscountedProduct(_options) {\n const mockPurchaseResult = {\n productIdentifier: _options.product.identifier,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.product.identifier),\n };\n return this.mockReturningFunctionIfEnabled('purchaseDiscountedProduct', mockPurchaseResult);\n }\n purchasePackage(_options) {\n const mockPurchaseResult = {\n productIdentifier: _options.aPackage.product.identifier,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.aPackage.product.identifier),\n };\n return this.mockReturningFunctionIfEnabled('purchasePackage', mockPurchaseResult);\n }\n purchaseSubscriptionOption(_options) {\n const mockPurchaseResult = {\n productIdentifier: _options.subscriptionOption.productId,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.subscriptionOption.productId),\n };\n return this.mockReturningFunctionIfEnabled('purchaseSubscriptionOption', mockPurchaseResult);\n }\n purchaseDiscountedPackage(_options) {\n const mockPurchaseResult = {\n productIdentifier: _options.aPackage.product.identifier,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.aPackage.product.identifier),\n };\n return this.mockReturningFunctionIfEnabled('purchaseDiscountedPackage', mockPurchaseResult);\n }\n restorePurchases() {\n const mockResponse = { customerInfo: this.mockEmptyCustomerInfo };\n return this.mockReturningFunctionIfEnabled('restorePurchases', mockResponse);\n }\n getAppUserID() {\n return this.mockReturningFunctionIfEnabled('getAppUserID', {\n appUserID: 'test-web-user-id',\n });\n }\n logIn(_appUserID) {\n const mockLogInResult = {\n customerInfo: this.mockEmptyCustomerInfo,\n created: false,\n };\n return this.mockReturningFunctionIfEnabled('logIn', mockLogInResult);\n }\n logOut() {\n const mockResponse = { customerInfo: this.mockEmptyCustomerInfo };\n return this.mockReturningFunctionIfEnabled('logOut', mockResponse);\n }\n setLogLevel(_level) {\n return this.mockNonReturningFunctionIfEnabled('setLogLevel');\n }\n setLogHandler(_logHandler) {\n return this.mockNonReturningFunctionIfEnabled('setLogHandler');\n }\n getCustomerInfo() {\n const mockResponse = { customerInfo: this.mockEmptyCustomerInfo };\n return this.mockReturningFunctionIfEnabled('getCustomerInfo', mockResponse);\n }\n syncPurchases() {\n return this.mockNonReturningFunctionIfEnabled('syncPurchases');\n }\n syncObserverModeAmazonPurchase(_options) {\n return this.mockNonReturningFunctionIfEnabled('syncObserverModeAmazonPurchase');\n }\n enableAdServicesAttributionTokenCollection() {\n return this.mockNonReturningFunctionIfEnabled('enableAdServicesAttributionTokenCollection');\n }\n isAnonymous() {\n const mockResponse = { isAnonymous: false };\n return this.mockReturningFunctionIfEnabled('isAnonymous', mockResponse);\n }\n checkTrialOrIntroductoryPriceEligibility(_productIdentifiers) {\n return this.mockReturningFunctionIfEnabled('checkTrialOrIntroductoryPriceEligibility', {});\n }\n getPromotionalOffer(_options) {\n return this.mockReturningFunctionIfEnabled('getPromotionalOffer', undefined);\n }\n invalidateCustomerInfoCache() {\n return this.mockNonReturningFunctionIfEnabled('invalidateCustomerInfoCache');\n }\n presentCodeRedemptionSheet() {\n return this.mockNonReturningFunctionIfEnabled('presentCodeRedemptionSheet');\n }\n setAttributes(_attributes) {\n return this.mockNonReturningFunctionIfEnabled('setAttributes');\n }\n setEmail(_email) {\n return this.mockNonReturningFunctionIfEnabled('setEmail');\n }\n setPhoneNumber(_phoneNumber) {\n return this.mockNonReturningFunctionIfEnabled('setPhoneNumber');\n }\n setDisplayName(_displayName) {\n return this.mockNonReturningFunctionIfEnabled('setDisplayName');\n }\n setPushToken(_pushToken) {\n return this.mockNonReturningFunctionIfEnabled('setPushToken');\n }\n setProxyURL(_url) {\n return this.mockNonReturningFunctionIfEnabled('setProxyURL');\n }\n collectDeviceIdentifiers() {\n return this.mockNonReturningFunctionIfEnabled('collectDeviceIdentifiers');\n }\n setAdjustID(_adjustID) {\n return this.mockNonReturningFunctionIfEnabled('setAdjustID');\n }\n setAppsflyerID(_appsflyerID) {\n return this.mockNonReturningFunctionIfEnabled('setAppsflyerID');\n }\n setFBAnonymousID(_fbAnonymousID) {\n return this.mockNonReturningFunctionIfEnabled('setFBAnonymousID');\n }\n setMparticleID(_mparticleID) {\n return this.mockNonReturningFunctionIfEnabled('setMparticleID');\n }\n setCleverTapID(_cleverTapID) {\n return this.mockNonReturningFunctionIfEnabled('setCleverTapID');\n }\n setMixpanelDistinctID(_mixpanelDistinctID) {\n return this.mockNonReturningFunctionIfEnabled('setMixpanelDistinctID');\n }\n setFirebaseAppInstanceID(_firebaseAppInstanceID) {\n return this.mockNonReturningFunctionIfEnabled('setFirebaseAppInstanceID');\n }\n setOnesignalID(_onesignalID) {\n return this.mockNonReturningFunctionIfEnabled('setOnesignalID');\n }\n setAirshipChannelID(_airshipChannelID) {\n return this.mockNonReturningFunctionIfEnabled('setAirshipChannelID');\n }\n setMediaSource(_mediaSource) {\n return this.mockNonReturningFunctionIfEnabled('setMediaSource');\n }\n setCampaign(_campaign) {\n return this.mockNonReturningFunctionIfEnabled('setCampaign');\n }\n setAdGroup(_adGroup) {\n return this.mockNonReturningFunctionIfEnabled('setAdGroup');\n }\n setAd(_ad) {\n return this.mockNonReturningFunctionIfEnabled('setAd');\n }\n setKeyword(_keyword) {\n return this.mockNonReturningFunctionIfEnabled('setKeyword');\n }\n setCreative(_creative) {\n return this.mockNonReturningFunctionIfEnabled('setCreative');\n }\n canMakePayments(_features) {\n return this.mockReturningFunctionIfEnabled('canMakePayments', {\n canMakePayments: true,\n });\n }\n beginRefundRequestForActiveEntitlement() {\n const mockResult = {\n refundRequestStatus: REFUND_REQUEST_STATUS.USER_CANCELLED,\n };\n return this.mockReturningFunctionIfEnabled('beginRefundRequestForActiveEntitlement', mockResult);\n }\n beginRefundRequestForEntitlement(_entitlementInfo) {\n const mockResult = {\n refundRequestStatus: REFUND_REQUEST_STATUS.USER_CANCELLED,\n };\n return this.mockReturningFunctionIfEnabled('beginRefundRequestForEntitlement', mockResult);\n }\n beginRefundRequestForProduct(_storeProduct) {\n const mockResult = {\n refundRequestStatus: REFUND_REQUEST_STATUS.USER_CANCELLED,\n };\n return this.mockReturningFunctionIfEnabled('beginRefundRequestForProduct', mockResult);\n }\n showInAppMessages(_options) {\n return this.mockNonReturningFunctionIfEnabled('showInAppMessages');\n }\n isConfigured() {\n const mockResult = { isConfigured: true };\n return this.mockReturningFunctionIfEnabled('isConfigured', mockResult);\n }\n mockTransaction(productIdentifier) {\n return {\n productIdentifier: productIdentifier,\n purchaseDate: new Date().toISOString(),\n transactionIdentifier: '',\n };\n }\n mockNonReturningFunctionIfEnabled(functionName) {\n if (!this.shouldMockWebResults) {\n return Promise.reject(this.webNotSupportedErrorMessage);\n }\n console.log(`${functionName} called on web with mocking enabled. No-op`);\n return Promise.resolve();\n }\n mockReturningFunctionIfEnabled(functionName, returnValue) {\n if (!this.shouldMockWebResults) {\n return Promise.reject(this.webNotSupportedErrorMessage);\n }\n console.log(`${functionName} called on web with mocking enabled. Returning mocked value`);\n return Promise.resolve(returnValue);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin","VERIFICATION_RESULT","REFUND_REQUEST_STATUS"],"mappings":";;;AACK,UAAC,SAAS,GAAGA,mBAAc,CAAC,WAAW,EAAE;IAC9C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,YAAY,EAAE,CAAC;IAC9D,CAAC;;ICHD;IAGO,MAAM,YAAY,SAASC,cAAS,CAAC;IAC5C,IAAI,WAAW,GAAG;IAClB,QAAQ,KAAK,CAAC,GAAG,SAAS,CAAC,CAAC;IAC5B,QAAQ,IAAI,CAAC,oBAAoB,GAAG,KAAK,CAAC;IAC1C,QAAQ,IAAI,CAAC,2BAA2B,GAAG,mCAAmC,CAAC;IAC/E;IACA,QAAQ,IAAI,CAAC,qBAAqB,GAAG;IACrC,YAAY,YAAY,EAAE;IAC1B,gBAAgB,GAAG,EAAE,EAAE;IACvB,gBAAgB,MAAM,EAAE,EAAE;IAC1B,gBAAgB,YAAY,EAAEC,kDAAmB,CAAC,aAAa;IAC/D,aAAa;IACb,YAAY,mBAAmB,EAAE,EAAE;IACnC,YAAY,8BAA8B,EAAE,EAAE;IAC9C,YAAY,oBAAoB,EAAE,IAAI;IACtC,YAAY,SAAS,EAAE,0BAA0B;IACjD,YAAY,iBAAiB,EAAE,kBAAkB;IACjD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IACL,IAAI,eAAe,CAAC,iBAAiB,EAAE;IACvC,QAAQ,OAAO;IACf,YAAY,iBAAiB,EAAE,iBAAiB;IAChD,YAAY,YAAY,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;IAClD,YAAY,qBAAqB,EAAE,EAAE;IACrC,SAAS,CAAC;IACV,KAAK;IACL,IAAI,iCAAiC,CAAC,YAAY,EAAE;IACpD,QAAQ,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE;IACxC,YAAY,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;IACpE,SAAS;IACT,QAAQ,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,0CAA0C,CAAC,CAAC,CAAC;IACjF,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IACjC,KAAK;IACL,IAAI,8BAA8B,CAAC,YAAY,EAAE,WAAW,EAAE;IAC9D,QAAQ,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE;IACxC,YAAY,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;IACpE,SAAS;IACT,QAAQ,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,2DAA2D,CAAC,CAAC,CAAC;IAClG,QAAQ,OAAO,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAC5C,KAAK;IACL;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Purchases = registerPlugin('Purchases', {\n web: () => import('./web').then(m => new m.PurchasesWeb()),\n});\nexport * from './definitions';\nexport { Purchases };\n//# sourceMappingURL=index.js.map","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { WebPlugin } from '@capacitor/core';\nimport { REFUND_REQUEST_STATUS, VERIFICATION_RESULT, } from '@revenuecat/purchases-typescript-internal-esm';\nexport class PurchasesWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.shouldMockWebResults = false;\n this.webNotSupportedErrorMessage = 'Web not supported in this plugin.';\n // Mock helpers\n this.mockEmptyCustomerInfo = {\n entitlements: {\n all: {},\n active: {},\n verification: VERIFICATION_RESULT.NOT_REQUESTED,\n },\n activeSubscriptions: [],\n allPurchasedProductIdentifiers: [],\n latestExpirationDate: null,\n firstSeen: '2023-08-31T15:11:21.445Z',\n originalAppUserId: 'mock-web-user-id',\n requestDate: '2023-08-31T15:11:21.445Z',\n allExpirationDates: {},\n allPurchaseDates: {},\n originalApplicationVersion: null,\n originalPurchaseDate: null,\n managementURL: null,\n nonSubscriptionTransactions: [],\n };\n }\n configure(_configuration) {\n return this.mockNonReturningFunctionIfEnabled('configure');\n }\n setMockWebResults(options) {\n this.shouldMockWebResults = options.shouldMockWebResults;\n return Promise.resolve();\n }\n setFinishTransactions(_finishTransactions) {\n return this.mockNonReturningFunctionIfEnabled('setFinishTransactions');\n }\n setSimulatesAskToBuyInSandbox(_simulatesAskToBuyInSandbox) {\n return this.mockNonReturningFunctionIfEnabled('setSimulatesAskToBuyInSandbox');\n }\n addCustomerInfoUpdateListener(_customerInfoUpdateListener) {\n return this.mockReturningFunctionIfEnabled('addCustomerInfoUpdateListener', 'mock-callback-id');\n }\n removeCustomerInfoUpdateListener(_listenerToRemove) {\n return this.mockReturningFunctionIfEnabled('removeCustomerInfoUpdateListener', { wasRemoved: false });\n }\n addShouldPurchasePromoProductListener(_shouldPurchasePromoProductListener) {\n return this.mockReturningFunctionIfEnabled('addShouldPurchasePromoProductListener', 'mock-callback-id');\n }\n removeShouldPurchasePromoProductListener(_listenerToRemove) {\n return this.mockReturningFunctionIfEnabled('removeShouldPurchasePromoProductListener', { wasRemoved: false });\n }\n getOfferings() {\n const mockOfferings = {\n all: {},\n current: null,\n };\n return this.mockReturningFunctionIfEnabled('getOfferings', mockOfferings);\n }\n getCurrentOfferingForPlacement(_options) {\n const mockOffering = null;\n return this.mockReturningFunctionIfEnabled('getCurrentOfferingForPlacement', mockOffering);\n }\n syncAttributesAndOfferingsIfNeeded() {\n const mockOfferings = {\n all: {},\n current: null,\n };\n return this.mockReturningFunctionIfEnabled('syncAttributesAndOfferingsIfNeeded', mockOfferings);\n }\n getProducts(_options) {\n const mockProducts = { products: [] };\n return this.mockReturningFunctionIfEnabled('getProducts', mockProducts);\n }\n purchaseStoreProduct(_options) {\n const mockPurchaseResult = {\n productIdentifier: _options.product.identifier,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.product.identifier),\n };\n return this.mockReturningFunctionIfEnabled('purchaseStoreProduct', mockPurchaseResult);\n }\n purchaseDiscountedProduct(_options) {\n const mockPurchaseResult = {\n productIdentifier: _options.product.identifier,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.product.identifier),\n };\n return this.mockReturningFunctionIfEnabled('purchaseDiscountedProduct', mockPurchaseResult);\n }\n purchasePackage(_options) {\n const mockPurchaseResult = {\n productIdentifier: _options.aPackage.product.identifier,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.aPackage.product.identifier),\n };\n return this.mockReturningFunctionIfEnabled('purchasePackage', mockPurchaseResult);\n }\n purchaseSubscriptionOption(_options) {\n const mockPurchaseResult = {\n productIdentifier: _options.subscriptionOption.productId,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.subscriptionOption.productId),\n };\n return this.mockReturningFunctionIfEnabled('purchaseSubscriptionOption', mockPurchaseResult);\n }\n purchaseDiscountedPackage(_options) {\n const mockPurchaseResult = {\n productIdentifier: _options.aPackage.product.identifier,\n customerInfo: this.mockEmptyCustomerInfo,\n transaction: this.mockTransaction(_options.aPackage.product.identifier),\n };\n return this.mockReturningFunctionIfEnabled('purchaseDiscountedPackage', mockPurchaseResult);\n }\n restorePurchases() {\n const mockResponse = { customerInfo: this.mockEmptyCustomerInfo };\n return this.mockReturningFunctionIfEnabled('restorePurchases', mockResponse);\n }\n getAppUserID() {\n return this.mockReturningFunctionIfEnabled('getAppUserID', {\n appUserID: 'test-web-user-id',\n });\n }\n logIn(_appUserID) {\n const mockLogInResult = {\n customerInfo: this.mockEmptyCustomerInfo,\n created: false,\n };\n return this.mockReturningFunctionIfEnabled('logIn', mockLogInResult);\n }\n logOut() {\n const mockResponse = { customerInfo: this.mockEmptyCustomerInfo };\n return this.mockReturningFunctionIfEnabled('logOut', mockResponse);\n }\n setLogLevel(_level) {\n return this.mockNonReturningFunctionIfEnabled('setLogLevel');\n }\n setLogHandler(_logHandler) {\n return this.mockNonReturningFunctionIfEnabled('setLogHandler');\n }\n getCustomerInfo() {\n const mockResponse = { customerInfo: this.mockEmptyCustomerInfo };\n return this.mockReturningFunctionIfEnabled('getCustomerInfo', mockResponse);\n }\n syncPurchases() {\n return this.mockNonReturningFunctionIfEnabled('syncPurchases');\n }\n syncObserverModeAmazonPurchase(_options) {\n return this.mockNonReturningFunctionIfEnabled('syncObserverModeAmazonPurchase');\n }\n enableAdServicesAttributionTokenCollection() {\n return this.mockNonReturningFunctionIfEnabled('enableAdServicesAttributionTokenCollection');\n }\n isAnonymous() {\n const mockResponse = { isAnonymous: false };\n return this.mockReturningFunctionIfEnabled('isAnonymous', mockResponse);\n }\n checkTrialOrIntroductoryPriceEligibility(_productIdentifiers) {\n return this.mockReturningFunctionIfEnabled('checkTrialOrIntroductoryPriceEligibility', {});\n }\n getPromotionalOffer(_options) {\n return this.mockReturningFunctionIfEnabled('getPromotionalOffer', undefined);\n }\n invalidateCustomerInfoCache() {\n return this.mockNonReturningFunctionIfEnabled('invalidateCustomerInfoCache');\n }\n presentCodeRedemptionSheet() {\n return this.mockNonReturningFunctionIfEnabled('presentCodeRedemptionSheet');\n }\n setAttributes(_attributes) {\n return this.mockNonReturningFunctionIfEnabled('setAttributes');\n }\n setEmail(_email) {\n return this.mockNonReturningFunctionIfEnabled('setEmail');\n }\n setPhoneNumber(_phoneNumber) {\n return this.mockNonReturningFunctionIfEnabled('setPhoneNumber');\n }\n setDisplayName(_displayName) {\n return this.mockNonReturningFunctionIfEnabled('setDisplayName');\n }\n setPushToken(_pushToken) {\n return this.mockNonReturningFunctionIfEnabled('setPushToken');\n }\n setProxyURL(_url) {\n return this.mockNonReturningFunctionIfEnabled('setProxyURL');\n }\n collectDeviceIdentifiers() {\n return this.mockNonReturningFunctionIfEnabled('collectDeviceIdentifiers');\n }\n setAdjustID(_adjustID) {\n return this.mockNonReturningFunctionIfEnabled('setAdjustID');\n }\n setAppsflyerID(_appsflyerID) {\n return this.mockNonReturningFunctionIfEnabled('setAppsflyerID');\n }\n setFBAnonymousID(_fbAnonymousID) {\n return this.mockNonReturningFunctionIfEnabled('setFBAnonymousID');\n }\n setMparticleID(_mparticleID) {\n return this.mockNonReturningFunctionIfEnabled('setMparticleID');\n }\n setCleverTapID(_cleverTapID) {\n return this.mockNonReturningFunctionIfEnabled('setCleverTapID');\n }\n setMixpanelDistinctID(_mixpanelDistinctID) {\n return this.mockNonReturningFunctionIfEnabled('setMixpanelDistinctID');\n }\n setFirebaseAppInstanceID(_firebaseAppInstanceID) {\n return this.mockNonReturningFunctionIfEnabled('setFirebaseAppInstanceID');\n }\n setOnesignalID(_onesignalID) {\n return this.mockNonReturningFunctionIfEnabled('setOnesignalID');\n }\n setOnesignalUserID(_onesignalUserID) {\n return this.mockNonReturningFunctionIfEnabled('setOnesignalUserID');\n }\n setAirshipChannelID(_airshipChannelID) {\n return this.mockNonReturningFunctionIfEnabled('setAirshipChannelID');\n }\n setMediaSource(_mediaSource) {\n return this.mockNonReturningFunctionIfEnabled('setMediaSource');\n }\n setCampaign(_campaign) {\n return this.mockNonReturningFunctionIfEnabled('setCampaign');\n }\n setAdGroup(_adGroup) {\n return this.mockNonReturningFunctionIfEnabled('setAdGroup');\n }\n setAd(_ad) {\n return this.mockNonReturningFunctionIfEnabled('setAd');\n }\n setKeyword(_keyword) {\n return this.mockNonReturningFunctionIfEnabled('setKeyword');\n }\n setCreative(_creative) {\n return this.mockNonReturningFunctionIfEnabled('setCreative');\n }\n canMakePayments(_features) {\n return this.mockReturningFunctionIfEnabled('canMakePayments', {\n canMakePayments: true,\n });\n }\n beginRefundRequestForActiveEntitlement() {\n const mockResult = {\n refundRequestStatus: REFUND_REQUEST_STATUS.USER_CANCELLED,\n };\n return this.mockReturningFunctionIfEnabled('beginRefundRequestForActiveEntitlement', mockResult);\n }\n beginRefundRequestForEntitlement(_entitlementInfo) {\n const mockResult = {\n refundRequestStatus: REFUND_REQUEST_STATUS.USER_CANCELLED,\n };\n return this.mockReturningFunctionIfEnabled('beginRefundRequestForEntitlement', mockResult);\n }\n beginRefundRequestForProduct(_storeProduct) {\n const mockResult = {\n refundRequestStatus: REFUND_REQUEST_STATUS.USER_CANCELLED,\n };\n return this.mockReturningFunctionIfEnabled('beginRefundRequestForProduct', mockResult);\n }\n showInAppMessages(_options) {\n return this.mockNonReturningFunctionIfEnabled('showInAppMessages');\n }\n isConfigured() {\n const mockResult = { isConfigured: true };\n return this.mockReturningFunctionIfEnabled('isConfigured', mockResult);\n }\n mockTransaction(productIdentifier) {\n return {\n productIdentifier: productIdentifier,\n purchaseDate: new Date().toISOString(),\n transactionIdentifier: '',\n };\n }\n mockNonReturningFunctionIfEnabled(functionName) {\n if (!this.shouldMockWebResults) {\n return Promise.reject(this.webNotSupportedErrorMessage);\n }\n console.log(`${functionName} called on web with mocking enabled. No-op`);\n return Promise.resolve();\n }\n mockReturningFunctionIfEnabled(functionName, returnValue) {\n if (!this.shouldMockWebResults) {\n return Promise.reject(this.webNotSupportedErrorMessage);\n }\n console.log(`${functionName} called on web with mocking enabled. Returning mocked value`);\n return Promise.resolve(returnValue);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin","VERIFICATION_RESULT","REFUND_REQUEST_STATUS"],"mappings":";;;AACK,UAAC,SAAS,GAAGA,mBAAc,CAAC,WAAW,EAAE;IAC9C,IAA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GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,0CAA0C,CAAC,CAAC,CAAC;IACjF,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IACjC,KAAK;IACL,IAAI,8BAA8B,CAAC,YAAY,EAAE,WAAW,EAAE;IAC9D,QAAQ,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE;IACxC,YAAY,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;IACpE,SAAS;IACT,QAAQ,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,2DAA2D,CAAC,CAAC,CAAC;IAClG,QAAQ,OAAO,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAC5C,KAAK;IACL;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -99,6 +99,13 @@ public extension PurchasesPlugin {
|
|
|
99
99
|
call.resolve()
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
+
@objc func setOnesignalUserID(_ call: CAPPluginCall) {
|
|
103
|
+
guard self.rejectIfPurchasesNotConfigured(call) else { return }
|
|
104
|
+
let onesignalUserID = call.getString("onesignalUserID")
|
|
105
|
+
CommonFunctionality.setOnesignalUserID(onesignalUserID)
|
|
106
|
+
call.resolve()
|
|
107
|
+
}
|
|
108
|
+
|
|
102
109
|
@objc func setAirshipChannelID(_ call: CAPPluginCall) {
|
|
103
110
|
guard self.rejectIfPurchasesNotConfigured(call) else { return }
|
|
104
111
|
let airshipChannelID = call.getString("airshipChannelID")
|
|
@@ -46,6 +46,7 @@ CAP_PLUGIN(PurchasesPlugin, "Purchases",
|
|
|
46
46
|
CAP_PLUGIN_METHOD(setMixpanelDistinctID, CAPPluginReturnNone);
|
|
47
47
|
CAP_PLUGIN_METHOD(setFirebaseAppInstanceID, CAPPluginReturnNone);
|
|
48
48
|
CAP_PLUGIN_METHOD(setOnesignalID, CAPPluginReturnNone);
|
|
49
|
+
CAP_PLUGIN_METHOD(setOnesignalUserID, CAPPluginReturnNone);
|
|
49
50
|
CAP_PLUGIN_METHOD(setAirshipChannelID, CAPPluginReturnNone);
|
|
50
51
|
CAP_PLUGIN_METHOD(setMediaSource, CAPPluginReturnNone);
|
|
51
52
|
CAP_PLUGIN_METHOD(setCampaign, CAPPluginReturnNone);
|
|
@@ -12,7 +12,7 @@ import RevenueCat
|
|
|
12
12
|
@objc(PurchasesPlugin)
|
|
13
13
|
public class PurchasesPlugin: CAPPlugin, PurchasesDelegate {
|
|
14
14
|
private let platformFlavor = "capacitor"
|
|
15
|
-
private let platformVersion = "7.
|
|
15
|
+
private let platformVersion = "7.6.1"
|
|
16
16
|
|
|
17
17
|
private let customerInfoKey = "customerInfo"
|
|
18
18
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revenuecat/purchases-capacitor",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.6.1",
|
|
4
4
|
"description": "Capacitor in-app purchases and subscriptions made easy. Support for iOS and Android.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -72,6 +72,6 @@
|
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@revenuecat/purchases-typescript-internal-esm": "10.
|
|
75
|
+
"@revenuecat/purchases-typescript-internal-esm": "10.9.0"
|
|
76
76
|
}
|
|
77
77
|
}
|