@revenuecat/purchases-capacitor-ui 13.2.5 → 13.4.0
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/Package.swift +1 -1
- package/RevenuecatPurchasesCapacitorUI.podspec +1 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/revenuecat/purchases/capacitor/ui/RevenueCatUIPlugin.kt +10 -0
- package/dist/esm/definitions.d.ts +6 -0
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/index.js +12 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/plugin.js +12 -0
- package/dist/plugin.js.map +1 -1
- package/ios/Sources/RevenuecatPurchasesCapacitorUI/RevenueCatUIPlugin.swift +9 -0
- package/package.json +3 -3
package/Package.swift
CHANGED
|
@@ -11,7 +11,7 @@ let package = Package(
|
|
|
11
11
|
],
|
|
12
12
|
dependencies: [
|
|
13
13
|
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "8.0.0"),
|
|
14
|
-
.package(url: "https://github.com/RevenueCat/purchases-hybrid-common.git", exact: "18.
|
|
14
|
+
.package(url: "https://github.com/RevenueCat/purchases-hybrid-common.git", exact: "18.29.0")
|
|
15
15
|
],
|
|
16
16
|
targets: [
|
|
17
17
|
.target(
|
|
@@ -13,6 +13,6 @@ Pod::Spec.new do |s|
|
|
|
13
13
|
s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
14
|
s.ios.deployment_target = '15.0'
|
|
15
15
|
s.dependency 'Capacitor'
|
|
16
|
-
s.dependency 'PurchasesHybridCommonUI', '18.
|
|
16
|
+
s.dependency 'PurchasesHybridCommonUI', '18.29.0'
|
|
17
17
|
s.swift_version = '5.1'
|
|
18
18
|
end
|
package/android/build.gradle
CHANGED
|
@@ -53,6 +53,6 @@ repositories {
|
|
|
53
53
|
dependencies {
|
|
54
54
|
implementation project(':capacitor-android')
|
|
55
55
|
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
|
56
|
-
implementation 'com.revenuecat.purchases:purchases-hybrid-common-ui:18.
|
|
56
|
+
implementation 'com.revenuecat.purchases:purchases-hybrid-common-ui:18.29.0'
|
|
57
57
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:2.2.20"
|
|
58
58
|
}
|
|
@@ -254,6 +254,16 @@ class RevenueCatUIPlugin : Plugin(), PaywallResultListener {
|
|
|
254
254
|
})
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
+
override fun onWebCheckoutOpened() {
|
|
258
|
+
notifyListeners("onWebCheckoutOpened", JSObject())
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
override fun onUrlOpened(url: String) {
|
|
262
|
+
notifyListeners("onUrlOpened", JSObject().apply {
|
|
263
|
+
put("url", url)
|
|
264
|
+
})
|
|
265
|
+
}
|
|
266
|
+
|
|
257
267
|
override fun onPurchasePackageInitiated(rcPackage: Map<String, Any?>, requestId: String) {
|
|
258
268
|
notifyListeners("onPurchaseInitiated", JSObject().apply {
|
|
259
269
|
put("package", JSONObject(rcPackage))
|
|
@@ -80,6 +80,12 @@ export interface PaywallListener {
|
|
|
80
80
|
onRestoreError?: (args: {
|
|
81
81
|
error: PurchasesError;
|
|
82
82
|
}) => void;
|
|
83
|
+
/** Called when the user taps a web checkout CTA and leaves the app to complete payment externally. */
|
|
84
|
+
onWebCheckoutOpened?: () => void;
|
|
85
|
+
/** Called when the paywall opens a URL from a button destination or a text link. Not called for web checkout. */
|
|
86
|
+
onUrlOpened?: (args: {
|
|
87
|
+
url: string;
|
|
88
|
+
}) => void;
|
|
83
89
|
/**
|
|
84
90
|
* Called before the payment sheet is displayed, allowing the app to gate
|
|
85
91
|
* the purchase flow (e.g., require authentication first).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAqH/E;;GAEG;AACH,MAAM,CAAN,IAAY,qBAOX;AAPD,WAAY,qBAAqB;IAC/B,sDAAsD;IACtD,4CAAmB,CAAA;IACnB,kDAAkD;IAClD,sDAA6B,CAAA;IAC7B,oDAAoD;IACpD,wCAAe,CAAA;AACjB,CAAC,EAPW,qBAAqB,KAArB,qBAAqB,QAOhC;AAKD,+CAA+C;AAC/C,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,gDAAgD;IAChD,WAAW,EAAE,aAAa;IAC1B,mEAAmE;IACnE,KAAK,EAAE,OAAO;CACN,CAAC;AAKX,mDAAmD;AACnD,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,gFAAgF;IAChF,WAAW,EAAE,aAAa;CAClB,CAAC;AAeX,wEAAwE;AACxE,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,iDAAiD;IACjD,WAAW,EAAE;QACX,GAAG,EAAE,8BAA8B,CAAC,WAAW;QAC/C,OAAO,EAAE,kCAAkC,CAAC,WAAW;KACpB;IACrC,kEAAkE;IAClE,OAAO,EAAE;QACP,GAAG,EAAE,8BAA8B,CAAC,KAAK;QACzC,OAAO,EAAE,kCAAkC,CAAC,WAAW;KACpB;CAC7B,CAAC;AAmDX,oFAAoF;AACpF,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,CAAC","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\nimport type {\n CustomerInfo,\n PurchasesError,\n PurchasesOffering,\n PurchasesPackage,\n PurchasesStoreTransaction,\n} from '@revenuecat/purchases-typescript-internal-esm';\nimport { PAYWALL_RESULT } from '@revenuecat/purchases-typescript-internal-esm';\n\nexport interface RevenueCatUIPlugin {\n /**\n * Presents a paywall configured in the RevenueCat dashboard.\n * @param options The options for presenting the paywall.\n * @returns A PaywallResult indicating what happened during the paywall presentation.\n */\n presentPaywall(options?: PresentPaywallOptions): Promise<PaywallResult>;\n\n /**\n * Presents a paywall only if the user does not have the specified entitlement.\n * @param options The options for presenting the paywall if needed.\n * @returns A PaywallResult indicating what happened during the paywall presentation.\n */\n presentPaywallIfNeeded(options: PresentPaywallIfNeededOptions): Promise<PaywallResult>;\n\n /**\n * Presents the customer center where users can manage their subscriptions.\n */\n presentCustomerCenter(): Promise<void>;\n\n /**\n * Used for web only. Enables or disables returning mock results instead of rejecting promises with \"not supported\".\n * For testing purposes only.\n * @param options Options for mock web results\n */\n setMockWebResults?(options: { shouldMockWebResults: boolean }): Promise<void>;\n\n /**\n * Listen for when a paywall is displayed or dismissed.\n * @param eventName The event to listen for\n * @param listener The listener to call when the event is triggered\n */\n addListener(eventName: 'paywallDisplayed' | 'paywallDismissed', listener: () => void): Promise<PluginListenerHandle>;\n\n /**\n * Remove all listeners for this plugin.\n */\n removeAllListeners(): Promise<void>;\n}\n\n/**\n * Object passed to onPurchaseInitiated that allows the developer to\n * control when (and whether) the purchase flow continues.\n * The developer can store this and call resume() asynchronously\n * (e.g., after an auth flow on a different screen).\n */\nexport interface PurchaseResumable {\n /** Call to proceed with or cancel the purchase. Defaults to true (proceed). */\n resume(shouldProceed?: boolean): void;\n}\n\n/**\n * Callbacks for observing paywall lifecycle events such as purchases,\n * restores, and errors. All callbacks are optional.\n *\n * Pass as `listener` in {@link PresentPaywallOptions} to receive events\n * while the paywall is displayed.\n */\nexport interface PaywallListener {\n /** Called when a purchase begins for a package. */\n onPurchaseStarted?: (args: { packageBeingPurchased: PurchasesPackage }) => void;\n /** Called when a purchase completes successfully. */\n onPurchaseCompleted?: (args: { customerInfo: CustomerInfo; storeTransaction: PurchasesStoreTransaction }) => void;\n /** Called when a purchase fails with an error. */\n onPurchaseError?: (args: { error: PurchasesError }) => void;\n /** Called when the user cancels a purchase. */\n onPurchaseCancelled?: () => void;\n /** Called when a restore operation begins. */\n onRestoreStarted?: () => void;\n /** Called when a restore operation completes successfully. */\n onRestoreCompleted?: (args: { customerInfo: CustomerInfo }) => void;\n /** Called when a restore operation fails with an error. */\n onRestoreError?: (args: { error: PurchasesError }) => void;\n /**\n * Called before the payment sheet is displayed, allowing the app to gate\n * the purchase flow (e.g., require authentication first).\n *\n * The developer receives a {@link PurchaseResumable} that can be stored\n * and called asynchronously. Call `resumable.resume(true)` to proceed\n * with the purchase, or `resumable.resume(false)` to cancel it.\n *\n * If this callback is not provided, the purchase proceeds automatically.\n */\n onPurchaseInitiated?: (args: { packageBeingPurchased: PurchasesPackage; resumable: PurchaseResumable }) => void;\n}\n\n/**\n * Custom purchase and restore handlers for apps that manage their own\n * purchase flow (`purchasesAreCompletedBy: MY_APP`).\n *\n * When provided in {@link PresentPaywallOptions}, the paywall delegates\n * purchase and restore operations to these handlers instead of using\n * RevenueCat's built-in purchase flow.\n */\nexport interface PurchaseLogic {\n /**\n * Called when the user initiates a purchase from the paywall.\n * Perform the purchase using your own payment system and return the result.\n */\n performPurchase: (args: { packageToPurchase: PurchasesPackage }) => Promise<PurchaseLogicResult>;\n /**\n * Called when the user initiates a restore from the paywall.\n * Perform the restore using your own system and return the result.\n */\n performRestore: () => Promise<PurchaseLogicResult>;\n}\n\n/**\n * The result of a custom purchase or restore operation performed by {@link PurchaseLogic}.\n */\nexport type PurchaseLogicResult =\n | { result: PURCHASE_LOGIC_RESULT.SUCCESS }\n | { result: PURCHASE_LOGIC_RESULT.CANCELLATION }\n | { result: PURCHASE_LOGIC_RESULT.ERROR; error?: PurchasesError };\n\n/**\n * Possible outcomes from a custom {@link PurchaseLogic} operation.\n */\nexport enum PURCHASE_LOGIC_RESULT {\n /** The purchase or restore completed successfully. */\n SUCCESS = 'SUCCESS',\n /** The user cancelled the purchase or restore. */\n CANCELLATION = 'CANCELLATION',\n /** The purchase or restore failed with an error. */\n ERROR = 'ERROR',\n}\n\n/** Presentation styles available for paywalls on iOS. */\nexport type IOSPaywallPresentationStyle =\n (typeof IOS_PAYWALL_PRESENTATION_STYLE)[keyof typeof IOS_PAYWALL_PRESENTATION_STYLE];\n/** @see {@link IOSPaywallPresentationStyle} */\nexport const IOS_PAYWALL_PRESENTATION_STYLE = {\n /** Presents the paywall in full-screen mode. */\n FULL_SCREEN: 'FULL_SCREEN',\n /** Presents the paywall as a sheet. This is the default on iOS. */\n SHEET: 'SHEET',\n} as const;\n\n/** Presentation styles available for paywalls on Android. */\nexport type AndroidPaywallPresentationStyle =\n (typeof ANDROID_PAYWALL_PRESENTATION_STYLE)[keyof typeof ANDROID_PAYWALL_PRESENTATION_STYLE];\n/** @see {@link AndroidPaywallPresentationStyle} */\nexport const ANDROID_PAYWALL_PRESENTATION_STYLE = {\n /** Presents the paywall in full-screen mode. This is the default on Android. */\n FULL_SCREEN: 'FULL_SCREEN',\n} as const;\n\n/**\n * Per-platform configuration for how a paywall is presented.\n * Use the convenience presets {@link PaywallPresentationConfiguration.FULL_SCREEN}\n * or {@link PaywallPresentationConfiguration.DEFAULT}, or provide a custom\n * configuration with per-platform styles.\n */\nexport interface PaywallPresentationConfiguration {\n /** Presentation style on iOS. Defaults to sheet if not specified. */\n ios?: IOSPaywallPresentationStyle;\n /** Presentation style on Android. Defaults to full-screen if not specified. */\n android?: AndroidPaywallPresentationStyle;\n}\n\n/** Convenience presets for {@link PaywallPresentationConfiguration}. */\nexport const PaywallPresentationConfiguration = {\n /** Full-screen presentation on all platforms. */\n FULL_SCREEN: {\n ios: IOS_PAYWALL_PRESENTATION_STYLE.FULL_SCREEN,\n android: ANDROID_PAYWALL_PRESENTATION_STYLE.FULL_SCREEN,\n } as PaywallPresentationConfiguration,\n /** Default presentation: sheet on iOS, full-screen on Android. */\n DEFAULT: {\n ios: IOS_PAYWALL_PRESENTATION_STYLE.SHEET,\n android: ANDROID_PAYWALL_PRESENTATION_STYLE.FULL_SCREEN,\n } as PaywallPresentationConfiguration,\n} as const;\n\nexport interface PresentPaywallOptions {\n /**\n * The offering to present.\n * If not provided, the current offering will be used.\n */\n offering?: PurchasesOffering;\n\n /**\n * Controls how the paywall is presented on each platform.\n * Use `PaywallPresentationConfiguration.FULL_SCREEN` for full-screen on all platforms,\n * or provide a custom configuration with per-platform styles.\n * Defaults to sheet on iOS and full-screen on Android.\n */\n presentationConfiguration?: PaywallPresentationConfiguration;\n\n /**\n * Whether to display a close button on the paywall.\n * Only applicable for original template paywalls, ignored for V2 Paywalls.\n */\n displayCloseButton?: boolean;\n\n /**\n * Optional listener for paywall lifecycle events such as purchase\n * completion, restoration, and errors.\n */\n listener?: PaywallListener;\n\n /**\n * Optional custom purchase/restore logic for when\n * `purchasesAreCompletedBy` is set to `MY_APP`.\n */\n purchaseLogic?: PurchaseLogic;\n\n /**\n * Optional custom variables for paywall text substitution.\n * Variables can be referenced in paywalls using the `{{ custom.variable_name }}` syntax.\n * Keys must start with a letter and contain only alphanumeric characters and underscores.\n */\n customVariables?: Record<string, string | number | boolean>;\n}\n\nexport interface PresentPaywallIfNeededOptions extends PresentPaywallOptions {\n /**\n * The identifier of the entitlement that is required.\n * The paywall will only be presented if the user doesn't have this entitlement.\n */\n requiredEntitlementIdentifier: string;\n}\n\n// Using the enum from purchases-typescript-internal-esm instead of defining our own\nexport { PAYWALL_RESULT as PaywallResultEnum };\n\nexport interface PaywallResult {\n /**\n * The result of the paywall presentation.\n */\n result: PAYWALL_RESULT;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAyH/E;;GAEG;AACH,MAAM,CAAN,IAAY,qBAOX;AAPD,WAAY,qBAAqB;IAC/B,sDAAsD;IACtD,4CAAmB,CAAA;IACnB,kDAAkD;IAClD,sDAA6B,CAAA;IAC7B,oDAAoD;IACpD,wCAAe,CAAA;AACjB,CAAC,EAPW,qBAAqB,KAArB,qBAAqB,QAOhC;AAKD,+CAA+C;AAC/C,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,gDAAgD;IAChD,WAAW,EAAE,aAAa;IAC1B,mEAAmE;IACnE,KAAK,EAAE,OAAO;CACN,CAAC;AAKX,mDAAmD;AACnD,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,gFAAgF;IAChF,WAAW,EAAE,aAAa;CAClB,CAAC;AAeX,wEAAwE;AACxE,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,iDAAiD;IACjD,WAAW,EAAE;QACX,GAAG,EAAE,8BAA8B,CAAC,WAAW;QAC/C,OAAO,EAAE,kCAAkC,CAAC,WAAW;KACpB;IACrC,kEAAkE;IAClE,OAAO,EAAE;QACP,GAAG,EAAE,8BAA8B,CAAC,KAAK;QACzC,OAAO,EAAE,kCAAkC,CAAC,WAAW;KACpB;CAC7B,CAAC;AAmDX,oFAAoF;AACpF,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,CAAC","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\nimport type {\n CustomerInfo,\n PurchasesError,\n PurchasesOffering,\n PurchasesPackage,\n PurchasesStoreTransaction,\n} from '@revenuecat/purchases-typescript-internal-esm';\nimport { PAYWALL_RESULT } from '@revenuecat/purchases-typescript-internal-esm';\n\nexport interface RevenueCatUIPlugin {\n /**\n * Presents a paywall configured in the RevenueCat dashboard.\n * @param options The options for presenting the paywall.\n * @returns A PaywallResult indicating what happened during the paywall presentation.\n */\n presentPaywall(options?: PresentPaywallOptions): Promise<PaywallResult>;\n\n /**\n * Presents a paywall only if the user does not have the specified entitlement.\n * @param options The options for presenting the paywall if needed.\n * @returns A PaywallResult indicating what happened during the paywall presentation.\n */\n presentPaywallIfNeeded(options: PresentPaywallIfNeededOptions): Promise<PaywallResult>;\n\n /**\n * Presents the customer center where users can manage their subscriptions.\n */\n presentCustomerCenter(): Promise<void>;\n\n /**\n * Used for web only. Enables or disables returning mock results instead of rejecting promises with \"not supported\".\n * For testing purposes only.\n * @param options Options for mock web results\n */\n setMockWebResults?(options: { shouldMockWebResults: boolean }): Promise<void>;\n\n /**\n * Listen for when a paywall is displayed or dismissed.\n * @param eventName The event to listen for\n * @param listener The listener to call when the event is triggered\n */\n addListener(eventName: 'paywallDisplayed' | 'paywallDismissed', listener: () => void): Promise<PluginListenerHandle>;\n\n /**\n * Remove all listeners for this plugin.\n */\n removeAllListeners(): Promise<void>;\n}\n\n/**\n * Object passed to onPurchaseInitiated that allows the developer to\n * control when (and whether) the purchase flow continues.\n * The developer can store this and call resume() asynchronously\n * (e.g., after an auth flow on a different screen).\n */\nexport interface PurchaseResumable {\n /** Call to proceed with or cancel the purchase. Defaults to true (proceed). */\n resume(shouldProceed?: boolean): void;\n}\n\n/**\n * Callbacks for observing paywall lifecycle events such as purchases,\n * restores, and errors. All callbacks are optional.\n *\n * Pass as `listener` in {@link PresentPaywallOptions} to receive events\n * while the paywall is displayed.\n */\nexport interface PaywallListener {\n /** Called when a purchase begins for a package. */\n onPurchaseStarted?: (args: { packageBeingPurchased: PurchasesPackage }) => void;\n /** Called when a purchase completes successfully. */\n onPurchaseCompleted?: (args: { customerInfo: CustomerInfo; storeTransaction: PurchasesStoreTransaction }) => void;\n /** Called when a purchase fails with an error. */\n onPurchaseError?: (args: { error: PurchasesError }) => void;\n /** Called when the user cancels a purchase. */\n onPurchaseCancelled?: () => void;\n /** Called when a restore operation begins. */\n onRestoreStarted?: () => void;\n /** Called when a restore operation completes successfully. */\n onRestoreCompleted?: (args: { customerInfo: CustomerInfo }) => void;\n /** Called when a restore operation fails with an error. */\n onRestoreError?: (args: { error: PurchasesError }) => void;\n /** Called when the user taps a web checkout CTA and leaves the app to complete payment externally. */\n onWebCheckoutOpened?: () => void;\n /** Called when the paywall opens a URL from a button destination or a text link. Not called for web checkout. */\n onUrlOpened?: (args: { url: string }) => void;\n /**\n * Called before the payment sheet is displayed, allowing the app to gate\n * the purchase flow (e.g., require authentication first).\n *\n * The developer receives a {@link PurchaseResumable} that can be stored\n * and called asynchronously. Call `resumable.resume(true)` to proceed\n * with the purchase, or `resumable.resume(false)` to cancel it.\n *\n * If this callback is not provided, the purchase proceeds automatically.\n */\n onPurchaseInitiated?: (args: { packageBeingPurchased: PurchasesPackage; resumable: PurchaseResumable }) => void;\n}\n\n/**\n * Custom purchase and restore handlers for apps that manage their own\n * purchase flow (`purchasesAreCompletedBy: MY_APP`).\n *\n * When provided in {@link PresentPaywallOptions}, the paywall delegates\n * purchase and restore operations to these handlers instead of using\n * RevenueCat's built-in purchase flow.\n */\nexport interface PurchaseLogic {\n /**\n * Called when the user initiates a purchase from the paywall.\n * Perform the purchase using your own payment system and return the result.\n */\n performPurchase: (args: { packageToPurchase: PurchasesPackage }) => Promise<PurchaseLogicResult>;\n /**\n * Called when the user initiates a restore from the paywall.\n * Perform the restore using your own system and return the result.\n */\n performRestore: () => Promise<PurchaseLogicResult>;\n}\n\n/**\n * The result of a custom purchase or restore operation performed by {@link PurchaseLogic}.\n */\nexport type PurchaseLogicResult =\n | { result: PURCHASE_LOGIC_RESULT.SUCCESS }\n | { result: PURCHASE_LOGIC_RESULT.CANCELLATION }\n | { result: PURCHASE_LOGIC_RESULT.ERROR; error?: PurchasesError };\n\n/**\n * Possible outcomes from a custom {@link PurchaseLogic} operation.\n */\nexport enum PURCHASE_LOGIC_RESULT {\n /** The purchase or restore completed successfully. */\n SUCCESS = 'SUCCESS',\n /** The user cancelled the purchase or restore. */\n CANCELLATION = 'CANCELLATION',\n /** The purchase or restore failed with an error. */\n ERROR = 'ERROR',\n}\n\n/** Presentation styles available for paywalls on iOS. */\nexport type IOSPaywallPresentationStyle =\n (typeof IOS_PAYWALL_PRESENTATION_STYLE)[keyof typeof IOS_PAYWALL_PRESENTATION_STYLE];\n/** @see {@link IOSPaywallPresentationStyle} */\nexport const IOS_PAYWALL_PRESENTATION_STYLE = {\n /** Presents the paywall in full-screen mode. */\n FULL_SCREEN: 'FULL_SCREEN',\n /** Presents the paywall as a sheet. This is the default on iOS. */\n SHEET: 'SHEET',\n} as const;\n\n/** Presentation styles available for paywalls on Android. */\nexport type AndroidPaywallPresentationStyle =\n (typeof ANDROID_PAYWALL_PRESENTATION_STYLE)[keyof typeof ANDROID_PAYWALL_PRESENTATION_STYLE];\n/** @see {@link AndroidPaywallPresentationStyle} */\nexport const ANDROID_PAYWALL_PRESENTATION_STYLE = {\n /** Presents the paywall in full-screen mode. This is the default on Android. */\n FULL_SCREEN: 'FULL_SCREEN',\n} as const;\n\n/**\n * Per-platform configuration for how a paywall is presented.\n * Use the convenience presets {@link PaywallPresentationConfiguration.FULL_SCREEN}\n * or {@link PaywallPresentationConfiguration.DEFAULT}, or provide a custom\n * configuration with per-platform styles.\n */\nexport interface PaywallPresentationConfiguration {\n /** Presentation style on iOS. Defaults to sheet if not specified. */\n ios?: IOSPaywallPresentationStyle;\n /** Presentation style on Android. Defaults to full-screen if not specified. */\n android?: AndroidPaywallPresentationStyle;\n}\n\n/** Convenience presets for {@link PaywallPresentationConfiguration}. */\nexport const PaywallPresentationConfiguration = {\n /** Full-screen presentation on all platforms. */\n FULL_SCREEN: {\n ios: IOS_PAYWALL_PRESENTATION_STYLE.FULL_SCREEN,\n android: ANDROID_PAYWALL_PRESENTATION_STYLE.FULL_SCREEN,\n } as PaywallPresentationConfiguration,\n /** Default presentation: sheet on iOS, full-screen on Android. */\n DEFAULT: {\n ios: IOS_PAYWALL_PRESENTATION_STYLE.SHEET,\n android: ANDROID_PAYWALL_PRESENTATION_STYLE.FULL_SCREEN,\n } as PaywallPresentationConfiguration,\n} as const;\n\nexport interface PresentPaywallOptions {\n /**\n * The offering to present.\n * If not provided, the current offering will be used.\n */\n offering?: PurchasesOffering;\n\n /**\n * Controls how the paywall is presented on each platform.\n * Use `PaywallPresentationConfiguration.FULL_SCREEN` for full-screen on all platforms,\n * or provide a custom configuration with per-platform styles.\n * Defaults to sheet on iOS and full-screen on Android.\n */\n presentationConfiguration?: PaywallPresentationConfiguration;\n\n /**\n * Whether to display a close button on the paywall.\n * Only applicable for original template paywalls, ignored for V2 Paywalls.\n */\n displayCloseButton?: boolean;\n\n /**\n * Optional listener for paywall lifecycle events such as purchase\n * completion, restoration, and errors.\n */\n listener?: PaywallListener;\n\n /**\n * Optional custom purchase/restore logic for when\n * `purchasesAreCompletedBy` is set to `MY_APP`.\n */\n purchaseLogic?: PurchaseLogic;\n\n /**\n * Optional custom variables for paywall text substitution.\n * Variables can be referenced in paywalls using the `{{ custom.variable_name }}` syntax.\n * Keys must start with a letter and contain only alphanumeric characters and underscores.\n */\n customVariables?: Record<string, string | number | boolean>;\n}\n\nexport interface PresentPaywallIfNeededOptions extends PresentPaywallOptions {\n /**\n * The identifier of the entitlement that is required.\n * The paywall will only be presented if the user doesn't have this entitlement.\n */\n requiredEntitlementIdentifier: string;\n}\n\n// Using the enum from purchases-typescript-internal-esm instead of defining our own\nexport { PAYWALL_RESULT as PaywallResultEnum };\n\nexport interface PaywallResult {\n /**\n * The result of the paywall presentation.\n */\n result: PAYWALL_RESULT;\n}\n"]}
|
package/dist/esm/index.js
CHANGED
|
@@ -107,6 +107,18 @@ async function presentWithListenerSupport(nativeMethod, options, listener, purch
|
|
|
107
107
|
cb({ error: (_a = data.error) !== null && _a !== void 0 ? _a : data });
|
|
108
108
|
}));
|
|
109
109
|
}
|
|
110
|
+
if (listener.onWebCheckoutOpened) {
|
|
111
|
+
const cb = listener.onWebCheckoutOpened;
|
|
112
|
+
handles.push(await nativePlugin.addListener('onWebCheckoutOpened', () => {
|
|
113
|
+
cb();
|
|
114
|
+
}));
|
|
115
|
+
}
|
|
116
|
+
if (listener.onUrlOpened) {
|
|
117
|
+
const cb = listener.onUrlOpened;
|
|
118
|
+
handles.push(await nativePlugin.addListener('onUrlOpened', (data) => {
|
|
119
|
+
cb({ url: data.url });
|
|
120
|
+
}));
|
|
121
|
+
}
|
|
110
122
|
}
|
|
111
123
|
// Always register onPurchaseInitiated so we auto-resume when the user
|
|
112
124
|
// doesn't provide an onPurchaseInitiated callback — otherwise the
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,cAAc,EA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CAAC;IAED,kBAAkB;QAChB,OAAO,YAAY,CAAC,kBAAkB,EAAE,CAAC;IAC3C,CAAC;CACF,CAAC;AAEF,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\nimport type { PluginListenerHandle } from '@capacitor/core';\n\nimport type {\n PaywallListener,\n PaywallPresentationConfiguration,\n PaywallResult,\n PresentPaywallIfNeededOptions,\n PresentPaywallOptions,\n PurchaseLogic,\n PurchaseLogicResult,\n RevenueCatUIPlugin,\n} from './definitions';\nimport {\n IOS_PAYWALL_PRESENTATION_STYLE,\n ANDROID_PAYWALL_PRESENTATION_STYLE,\n PURCHASE_LOGIC_RESULT,\n} from './definitions';\n\n/**\n * Internal native plugin interface with native-only methods and events.\n * This is not exported to consumers.\n */\ninterface RevenueCatUINativePlugin {\n presentPaywall(options: {\n offering?: any;\n useFullScreenPresentation?: boolean;\n displayCloseButton?: boolean;\n hasPaywallListener?: boolean;\n hasPurchaseLogic?: boolean;\n customVariables?: Record<string, string | number | boolean>;\n }): Promise<PaywallResult>;\n presentPaywallIfNeeded(options: {\n offering?: any;\n useFullScreenPresentation?: boolean;\n displayCloseButton?: boolean;\n requiredEntitlementIdentifier: string;\n hasPaywallListener?: boolean;\n hasPurchaseLogic?: boolean;\n customVariables?: Record<string, string | number | boolean>;\n }): Promise<PaywallResult>;\n presentCustomerCenter(): Promise<void>;\n setMockWebResults?(options: { shouldMockWebResults: boolean }): Promise<void>;\n\n resumePurchaseInitiated(options: { requestId: string; shouldProceed: boolean }): Promise<void>;\n resumePurchaseLogicPurchase(options: {\n requestId: string;\n result: string;\n error?: { code?: string; message?: string };\n }): Promise<void>;\n resumePurchaseLogicRestore(options: {\n requestId: string;\n result: string;\n error?: { code?: string; message?: string };\n }): Promise<void>;\n\n addListener(eventName: string, listener: (data: any) => void): Promise<PluginListenerHandle>;\n removeAllListeners(): Promise<void>;\n}\n\nconst nativePlugin = registerPlugin<RevenueCatUINativePlugin>('RevenueCatUI', {\n web: () => import('./web').then((m) => new m.RevenueCatUIWeb()),\n});\n\nfunction assertValidPresentationConfiguration(\n config: unknown,\n): asserts config is PaywallPresentationConfiguration | undefined {\n if (config === undefined) {\n return;\n }\n if (typeof config !== 'object' || config === null) {\n throw new Error(`Invalid presentationConfiguration: expected an object or undefined.`);\n }\n const { ios, android } = config as Record<string, unknown>;\n const validIos = Object.values(IOS_PAYWALL_PRESENTATION_STYLE) as string[];\n const validAndroid = Object.values(ANDROID_PAYWALL_PRESENTATION_STYLE) as string[];\n if (ios !== undefined && !validIos.includes(ios as string)) {\n throw new Error(`Invalid presentationConfiguration.ios \"${String(ios)}\". Expected one of: ${validIos.join(', ')}.`);\n }\n if (android !== undefined && !validAndroid.includes(android as string)) {\n throw new Error(\n `Invalid presentationConfiguration.android \"${String(android)}\". Expected one of: ${validAndroid.join(', ')}.`,\n );\n }\n}\n\nfunction resolveNativePresentationOptions(config?: PaywallPresentationConfiguration): {\n useFullScreenPresentation?: boolean;\n} {\n if (!config) {\n return {};\n }\n // iOS full-screen takes precedence as the flag that the native bridge understands\n if (config.ios === IOS_PAYWALL_PRESENTATION_STYLE.FULL_SCREEN) {\n return { useFullScreenPresentation: true };\n }\n return {};\n}\n\nfunction serializeResultForNative(result: PurchaseLogicResult): {\n result: string;\n error?: { code?: string; message?: string };\n} {\n if (result.result === PURCHASE_LOGIC_RESULT.ERROR && 'error' in result && result.error) {\n return {\n result: result.result,\n error: {\n code: result.error.code,\n message: result.error.message,\n },\n };\n }\n return { result: result.result };\n}\n\nasync function presentWithListenerSupport(\n nativeMethod: (options: any) => Promise<PaywallResult>,\n options: any,\n listener?: PaywallListener,\n purchaseLogic?: PurchaseLogic,\n): Promise<PaywallResult> {\n const handles: PluginListenerHandle[] = [];\n\n try {\n // Register PaywallListener event handlers\n if (listener) {\n if (listener.onPurchaseStarted) {\n const cb = listener.onPurchaseStarted;\n handles.push(\n await nativePlugin.addListener('onPurchaseStarted', (data: any) => {\n cb({ packageBeingPurchased: data.packageBeingPurchased ?? data });\n }),\n );\n }\n if (listener.onPurchaseCompleted) {\n const cb = listener.onPurchaseCompleted;\n handles.push(\n await nativePlugin.addListener('onPurchaseCompleted', (data: any) => {\n cb({\n customerInfo: data.customerInfo,\n storeTransaction: data.storeTransaction,\n });\n }),\n );\n }\n if (listener.onPurchaseError) {\n const cb = listener.onPurchaseError;\n handles.push(\n await nativePlugin.addListener('onPurchaseError', (data: any) => {\n cb({ error: data.error ?? data });\n }),\n );\n }\n if (listener.onPurchaseCancelled) {\n const cb = listener.onPurchaseCancelled;\n handles.push(\n await nativePlugin.addListener('onPurchaseCancelled', () => {\n cb();\n }),\n );\n }\n if (listener.onRestoreStarted) {\n const cb = listener.onRestoreStarted;\n handles.push(\n await nativePlugin.addListener('onRestoreStarted', () => {\n cb();\n }),\n );\n }\n if (listener.onRestoreCompleted) {\n const cb = listener.onRestoreCompleted;\n handles.push(\n await nativePlugin.addListener('onRestoreCompleted', (data: any) => {\n cb({ customerInfo: data.customerInfo ?? data });\n }),\n );\n }\n if (listener.onRestoreError) {\n const cb = listener.onRestoreError;\n handles.push(\n await nativePlugin.addListener('onRestoreError', (data: any) => {\n cb({ error: data.error ?? data });\n }),\n );\n }\n }\n\n // Always register onPurchaseInitiated so we auto-resume when the user\n // doesn't provide an onPurchaseInitiated callback — otherwise the\n // purchase flow hangs waiting for a resume that never comes.\n // This must be outside the `if (listener)` block because the native\n // delegate adapter always fires this event (even with purchaseLogic only).\n const onPurchaseInitiatedCb = listener?.onPurchaseInitiated;\n handles.push(\n await nativePlugin.addListener('onPurchaseInitiated', (data: any) => {\n const requestId: string = data.requestId;\n const packageBeingPurchased = data.package ?? data.packageBeingPurchased;\n if (onPurchaseInitiatedCb) {\n onPurchaseInitiatedCb({\n packageBeingPurchased,\n resumable: {\n resume(shouldProceed = true) {\n nativePlugin.resumePurchaseInitiated({ requestId, shouldProceed });\n },\n },\n });\n } else {\n // No callback provided — auto-proceed with the purchase.\n nativePlugin.resumePurchaseInitiated({ requestId, shouldProceed: true });\n }\n }),\n );\n\n // Register PurchaseLogic event handlers\n if (purchaseLogic) {\n handles.push(\n await nativePlugin.addListener('onPerformPurchaseRequest', async (data: any) => {\n const requestId: string = data.requestId;\n const packageToPurchase = data.package ?? data.packageBeingPurchased ?? data.packageToPurchase;\n try {\n const result = await purchaseLogic.performPurchase({ packageToPurchase });\n await nativePlugin.resumePurchaseLogicPurchase({\n requestId,\n ...serializeResultForNative(result),\n });\n } catch (e: any) {\n await nativePlugin.resumePurchaseLogicPurchase({\n requestId,\n result: PURCHASE_LOGIC_RESULT.ERROR,\n error: { message: e?.message ?? 'Unknown error' },\n });\n }\n }),\n );\n handles.push(\n await nativePlugin.addListener('onPerformRestoreRequest', async (data: any) => {\n const requestId: string = data.requestId;\n try {\n const result = await purchaseLogic.performRestore();\n await nativePlugin.resumePurchaseLogicRestore({\n requestId,\n ...serializeResultForNative(result),\n });\n } catch (e: any) {\n await nativePlugin.resumePurchaseLogicRestore({\n requestId,\n result: PURCHASE_LOGIC_RESULT.ERROR,\n error: { message: e?.message ?? 'Unknown error' },\n });\n }\n }),\n );\n }\n\n // Call native with serializable-only options\n const nativeOptions = {\n ...options,\n hasPaywallListener: !!listener,\n hasPurchaseLogic: !!purchaseLogic,\n };\n // Remove non-serializable fields\n delete nativeOptions.listener;\n delete nativeOptions.purchaseLogic;\n\n return await nativeMethod(nativeOptions);\n } finally {\n // Clean up all registered listeners\n for (const handle of handles) {\n await handle.remove();\n }\n }\n}\n\nconst RevenueCatUI: RevenueCatUIPlugin = {\n async presentPaywall(options?: PresentPaywallOptions): Promise<PaywallResult> {\n assertValidPresentationConfiguration(options?.presentationConfiguration);\n\n const { presentationConfiguration, listener, purchaseLogic, ...rest } = options ?? {};\n const nativeOpts = {\n ...rest,\n ...resolveNativePresentationOptions(presentationConfiguration),\n };\n\n if (!listener && !purchaseLogic) {\n return nativePlugin.presentPaywall(nativeOpts);\n }\n\n return presentWithListenerSupport((opts) => nativePlugin.presentPaywall(opts), nativeOpts, listener, purchaseLogic);\n },\n\n async presentPaywallIfNeeded(options: PresentPaywallIfNeededOptions): Promise<PaywallResult> {\n assertValidPresentationConfiguration(options?.presentationConfiguration);\n\n const { presentationConfiguration, listener, purchaseLogic, ...rest } = options;\n const nativeOpts = {\n ...rest,\n ...resolveNativePresentationOptions(presentationConfiguration),\n };\n\n if (!listener && !purchaseLogic) {\n return nativePlugin.presentPaywallIfNeeded(nativeOpts);\n }\n\n return presentWithListenerSupport(\n (opts) => nativePlugin.presentPaywallIfNeeded(opts),\n nativeOpts,\n listener,\n purchaseLogic,\n );\n },\n\n async presentCustomerCenter(): Promise<void> {\n return nativePlugin.presentCustomerCenter();\n },\n\n setMockWebResults: nativePlugin.setMockWebResults\n ? async (options: { shouldMockWebResults: boolean }): Promise<void> => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return nativePlugin.setMockWebResults!(options);\n }\n : undefined,\n\n addListener(eventName: 'paywallDisplayed' | 'paywallDismissed', listener: () => void): Promise<PluginListenerHandle> {\n return nativePlugin.addListener(eventName, listener);\n },\n\n removeAllListeners(): Promise<void> {\n return nativePlugin.removeAllListeners();\n },\n};\n\nexport * from './definitions';\nexport { PAYWALL_RESULT } from '@revenuecat/purchases-typescript-internal-esm';\nexport { RevenueCatUI };\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAajD,OAAO,EACL,8BAA8B,EAC9B,kCAAkC,EAClC,qBAAqB,GACtB,MAAM,eAAe,CAAC;AA2CvB,MAAM,YAAY,GAAG,cAAc,CAA2B,cAAc,EAAE;IAC5E,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAA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;IAC9C,CAAC;IAED,iBAAiB,EAAE,YAAY,CAAC,iBAAiB;QAC/C,CAAC,CAAC,KAAK,EAAE,OAA0C,EAAiB,EAAE;YAClE,oEAAoE;YACpE,OAAO,YAAY,CAAC,iBAAkB,CAAC,OAAO,CAAC,CAAC;QAClD,CAAC;QACH,CAAC,CAAC,SAAS;IAEb,WAAW,CAAC,SAAkD,EAAE,QAAoB;QAClF,OAAO,YAAY,CAAC,WAAW,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IACvD,CAAC;IAED,kBAAkB;QAChB,OAAO,YAAY,CAAC,kBAAkB,EAAE,CAAC;IAC3C,CAAC;CACF,CAAC;AAEF,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\nimport type { PluginListenerHandle } from '@capacitor/core';\n\nimport type {\n PaywallListener,\n PaywallPresentationConfiguration,\n PaywallResult,\n PresentPaywallIfNeededOptions,\n PresentPaywallOptions,\n PurchaseLogic,\n PurchaseLogicResult,\n RevenueCatUIPlugin,\n} from './definitions';\nimport {\n IOS_PAYWALL_PRESENTATION_STYLE,\n ANDROID_PAYWALL_PRESENTATION_STYLE,\n PURCHASE_LOGIC_RESULT,\n} from './definitions';\n\n/**\n * Internal native plugin interface with native-only methods and events.\n * This is not exported to consumers.\n */\ninterface RevenueCatUINativePlugin {\n presentPaywall(options: {\n offering?: any;\n useFullScreenPresentation?: boolean;\n displayCloseButton?: boolean;\n hasPaywallListener?: boolean;\n hasPurchaseLogic?: boolean;\n customVariables?: Record<string, string | number | boolean>;\n }): Promise<PaywallResult>;\n presentPaywallIfNeeded(options: {\n offering?: any;\n useFullScreenPresentation?: boolean;\n displayCloseButton?: boolean;\n requiredEntitlementIdentifier: string;\n hasPaywallListener?: boolean;\n hasPurchaseLogic?: boolean;\n customVariables?: Record<string, string | number | boolean>;\n }): Promise<PaywallResult>;\n presentCustomerCenter(): Promise<void>;\n setMockWebResults?(options: { shouldMockWebResults: boolean }): Promise<void>;\n\n resumePurchaseInitiated(options: { requestId: string; shouldProceed: boolean }): Promise<void>;\n resumePurchaseLogicPurchase(options: {\n requestId: string;\n result: string;\n error?: { code?: string; message?: string };\n }): Promise<void>;\n resumePurchaseLogicRestore(options: {\n requestId: string;\n result: string;\n error?: { code?: string; message?: string };\n }): Promise<void>;\n\n addListener(eventName: string, listener: (data: any) => void): Promise<PluginListenerHandle>;\n removeAllListeners(): Promise<void>;\n}\n\nconst nativePlugin = registerPlugin<RevenueCatUINativePlugin>('RevenueCatUI', {\n web: () => import('./web').then((m) => new m.RevenueCatUIWeb()),\n});\n\nfunction assertValidPresentationConfiguration(\n config: unknown,\n): asserts config is PaywallPresentationConfiguration | undefined {\n if (config === undefined) {\n return;\n }\n if (typeof config !== 'object' || config === null) {\n throw new Error(`Invalid presentationConfiguration: expected an object or undefined.`);\n }\n const { ios, android } = config as Record<string, unknown>;\n const validIos = Object.values(IOS_PAYWALL_PRESENTATION_STYLE) as string[];\n const validAndroid = Object.values(ANDROID_PAYWALL_PRESENTATION_STYLE) as string[];\n if (ios !== undefined && !validIos.includes(ios as string)) {\n throw new Error(`Invalid presentationConfiguration.ios \"${String(ios)}\". Expected one of: ${validIos.join(', ')}.`);\n }\n if (android !== undefined && !validAndroid.includes(android as string)) {\n throw new Error(\n `Invalid presentationConfiguration.android \"${String(android)}\". Expected one of: ${validAndroid.join(', ')}.`,\n );\n }\n}\n\nfunction resolveNativePresentationOptions(config?: PaywallPresentationConfiguration): {\n useFullScreenPresentation?: boolean;\n} {\n if (!config) {\n return {};\n }\n // iOS full-screen takes precedence as the flag that the native bridge understands\n if (config.ios === IOS_PAYWALL_PRESENTATION_STYLE.FULL_SCREEN) {\n return { useFullScreenPresentation: true };\n }\n return {};\n}\n\nfunction serializeResultForNative(result: PurchaseLogicResult): {\n result: string;\n error?: { code?: string; message?: string };\n} {\n if (result.result === PURCHASE_LOGIC_RESULT.ERROR && 'error' in result && result.error) {\n return {\n result: result.result,\n error: {\n code: result.error.code,\n message: result.error.message,\n },\n };\n }\n return { result: result.result };\n}\n\nasync function presentWithListenerSupport(\n nativeMethod: (options: any) => Promise<PaywallResult>,\n options: any,\n listener?: PaywallListener,\n purchaseLogic?: PurchaseLogic,\n): Promise<PaywallResult> {\n const handles: PluginListenerHandle[] = [];\n\n try {\n // Register PaywallListener event handlers\n if (listener) {\n if (listener.onPurchaseStarted) {\n const cb = listener.onPurchaseStarted;\n handles.push(\n await nativePlugin.addListener('onPurchaseStarted', (data: any) => {\n cb({ packageBeingPurchased: data.packageBeingPurchased ?? data });\n }),\n );\n }\n if (listener.onPurchaseCompleted) {\n const cb = listener.onPurchaseCompleted;\n handles.push(\n await nativePlugin.addListener('onPurchaseCompleted', (data: any) => {\n cb({\n customerInfo: data.customerInfo,\n storeTransaction: data.storeTransaction,\n });\n }),\n );\n }\n if (listener.onPurchaseError) {\n const cb = listener.onPurchaseError;\n handles.push(\n await nativePlugin.addListener('onPurchaseError', (data: any) => {\n cb({ error: data.error ?? data });\n }),\n );\n }\n if (listener.onPurchaseCancelled) {\n const cb = listener.onPurchaseCancelled;\n handles.push(\n await nativePlugin.addListener('onPurchaseCancelled', () => {\n cb();\n }),\n );\n }\n if (listener.onRestoreStarted) {\n const cb = listener.onRestoreStarted;\n handles.push(\n await nativePlugin.addListener('onRestoreStarted', () => {\n cb();\n }),\n );\n }\n if (listener.onRestoreCompleted) {\n const cb = listener.onRestoreCompleted;\n handles.push(\n await nativePlugin.addListener('onRestoreCompleted', (data: any) => {\n cb({ customerInfo: data.customerInfo ?? data });\n }),\n );\n }\n if (listener.onRestoreError) {\n const cb = listener.onRestoreError;\n handles.push(\n await nativePlugin.addListener('onRestoreError', (data: any) => {\n cb({ error: data.error ?? data });\n }),\n );\n }\n if (listener.onWebCheckoutOpened) {\n const cb = listener.onWebCheckoutOpened;\n handles.push(\n await nativePlugin.addListener('onWebCheckoutOpened', () => {\n cb();\n }),\n );\n }\n if (listener.onUrlOpened) {\n const cb = listener.onUrlOpened;\n handles.push(\n await nativePlugin.addListener('onUrlOpened', (data: any) => {\n cb({ url: data.url });\n }),\n );\n }\n }\n\n // Always register onPurchaseInitiated so we auto-resume when the user\n // doesn't provide an onPurchaseInitiated callback — otherwise the\n // purchase flow hangs waiting for a resume that never comes.\n // This must be outside the `if (listener)` block because the native\n // delegate adapter always fires this event (even with purchaseLogic only).\n const onPurchaseInitiatedCb = listener?.onPurchaseInitiated;\n handles.push(\n await nativePlugin.addListener('onPurchaseInitiated', (data: any) => {\n const requestId: string = data.requestId;\n const packageBeingPurchased = data.package ?? data.packageBeingPurchased;\n if (onPurchaseInitiatedCb) {\n onPurchaseInitiatedCb({\n packageBeingPurchased,\n resumable: {\n resume(shouldProceed = true) {\n nativePlugin.resumePurchaseInitiated({ requestId, shouldProceed });\n },\n },\n });\n } else {\n // No callback provided — auto-proceed with the purchase.\n nativePlugin.resumePurchaseInitiated({ requestId, shouldProceed: true });\n }\n }),\n );\n\n // Register PurchaseLogic event handlers\n if (purchaseLogic) {\n handles.push(\n await nativePlugin.addListener('onPerformPurchaseRequest', async (data: any) => {\n const requestId: string = data.requestId;\n const packageToPurchase = data.package ?? data.packageBeingPurchased ?? data.packageToPurchase;\n try {\n const result = await purchaseLogic.performPurchase({ packageToPurchase });\n await nativePlugin.resumePurchaseLogicPurchase({\n requestId,\n ...serializeResultForNative(result),\n });\n } catch (e: any) {\n await nativePlugin.resumePurchaseLogicPurchase({\n requestId,\n result: PURCHASE_LOGIC_RESULT.ERROR,\n error: { message: e?.message ?? 'Unknown error' },\n });\n }\n }),\n );\n handles.push(\n await nativePlugin.addListener('onPerformRestoreRequest', async (data: any) => {\n const requestId: string = data.requestId;\n try {\n const result = await purchaseLogic.performRestore();\n await nativePlugin.resumePurchaseLogicRestore({\n requestId,\n ...serializeResultForNative(result),\n });\n } catch (e: any) {\n await nativePlugin.resumePurchaseLogicRestore({\n requestId,\n result: PURCHASE_LOGIC_RESULT.ERROR,\n error: { message: e?.message ?? 'Unknown error' },\n });\n }\n }),\n );\n }\n\n // Call native with serializable-only options\n const nativeOptions = {\n ...options,\n hasPaywallListener: !!listener,\n hasPurchaseLogic: !!purchaseLogic,\n };\n // Remove non-serializable fields\n delete nativeOptions.listener;\n delete nativeOptions.purchaseLogic;\n\n return await nativeMethod(nativeOptions);\n } finally {\n // Clean up all registered listeners\n for (const handle of handles) {\n await handle.remove();\n }\n }\n}\n\nconst RevenueCatUI: RevenueCatUIPlugin = {\n async presentPaywall(options?: PresentPaywallOptions): Promise<PaywallResult> {\n assertValidPresentationConfiguration(options?.presentationConfiguration);\n\n const { presentationConfiguration, listener, purchaseLogic, ...rest } = options ?? {};\n const nativeOpts = {\n ...rest,\n ...resolveNativePresentationOptions(presentationConfiguration),\n };\n\n if (!listener && !purchaseLogic) {\n return nativePlugin.presentPaywall(nativeOpts);\n }\n\n return presentWithListenerSupport((opts) => nativePlugin.presentPaywall(opts), nativeOpts, listener, purchaseLogic);\n },\n\n async presentPaywallIfNeeded(options: PresentPaywallIfNeededOptions): Promise<PaywallResult> {\n assertValidPresentationConfiguration(options?.presentationConfiguration);\n\n const { presentationConfiguration, listener, purchaseLogic, ...rest } = options;\n const nativeOpts = {\n ...rest,\n ...resolveNativePresentationOptions(presentationConfiguration),\n };\n\n if (!listener && !purchaseLogic) {\n return nativePlugin.presentPaywallIfNeeded(nativeOpts);\n }\n\n return presentWithListenerSupport(\n (opts) => nativePlugin.presentPaywallIfNeeded(opts),\n nativeOpts,\n listener,\n purchaseLogic,\n );\n },\n\n async presentCustomerCenter(): Promise<void> {\n return nativePlugin.presentCustomerCenter();\n },\n\n setMockWebResults: nativePlugin.setMockWebResults\n ? async (options: { shouldMockWebResults: boolean }): Promise<void> => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return nativePlugin.setMockWebResults!(options);\n }\n : undefined,\n\n addListener(eventName: 'paywallDisplayed' | 'paywallDismissed', listener: () => void): Promise<PluginListenerHandle> {\n return nativePlugin.addListener(eventName, listener);\n },\n\n removeAllListeners(): Promise<void> {\n return nativePlugin.removeAllListeners();\n },\n};\n\nexport * from './definitions';\nexport { PAYWALL_RESULT } from '@revenuecat/purchases-typescript-internal-esm';\nexport { RevenueCatUI };\n"]}
|
package/dist/plugin.js
CHANGED
|
@@ -737,6 +737,18 @@ var capacitorPlugin = (function (exports, core) {
|
|
|
737
737
|
cb({ error: (_a = data.error) !== null && _a !== void 0 ? _a : data });
|
|
738
738
|
}));
|
|
739
739
|
}
|
|
740
|
+
if (listener.onWebCheckoutOpened) {
|
|
741
|
+
const cb = listener.onWebCheckoutOpened;
|
|
742
|
+
handles.push(await nativePlugin.addListener('onWebCheckoutOpened', () => {
|
|
743
|
+
cb();
|
|
744
|
+
}));
|
|
745
|
+
}
|
|
746
|
+
if (listener.onUrlOpened) {
|
|
747
|
+
const cb = listener.onUrlOpened;
|
|
748
|
+
handles.push(await nativePlugin.addListener('onUrlOpened', (data) => {
|
|
749
|
+
cb({ url: data.url });
|
|
750
|
+
}));
|
|
751
|
+
}
|
|
740
752
|
}
|
|
741
753
|
// Always register onPurchaseInitiated so we auto-resume when the user
|
|
742
754
|
// doesn't provide an onPurchaseInitiated callback — otherwise the
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["../node_modules/@revenuecat/purchases-typescript-internal-esm/dist/generated/error-codes.js","../node_modules/@revenuecat/purchases-typescript-internal-esm/dist/errors.js","../node_modules/@revenuecat/purchases-typescript-internal-esm/dist/offerings.js","../node_modules/@revenuecat/purchases-typescript-internal-esm/dist/enums.js","../node_modules/@revenuecat/purchases-typescript-internal-esm/dist/webRedemption.js","esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["// @generated\n// DO NOT EDIT THIS FILE — generated from https://github.com/RevenueCat/purchases-error-codes\n/**\n * Error codes indicating the reason for an error.\n * @public\n */\nexport var PURCHASES_ERROR_CODE;\n(function (PURCHASES_ERROR_CODE) {\n PURCHASES_ERROR_CODE[\"UNKNOWN_ERROR\"] = \"0\";\n PURCHASES_ERROR_CODE[\"PURCHASE_CANCELLED_ERROR\"] = \"1\";\n PURCHASES_ERROR_CODE[\"STORE_PROBLEM_ERROR\"] = \"2\";\n PURCHASES_ERROR_CODE[\"PURCHASE_NOT_ALLOWED_ERROR\"] = \"3\";\n PURCHASES_ERROR_CODE[\"PURCHASE_INVALID_ERROR\"] = \"4\";\n PURCHASES_ERROR_CODE[\"PRODUCT_NOT_AVAILABLE_FOR_PURCHASE_ERROR\"] = \"5\";\n PURCHASES_ERROR_CODE[\"PRODUCT_ALREADY_PURCHASED_ERROR\"] = \"6\";\n PURCHASES_ERROR_CODE[\"RECEIPT_ALREADY_IN_USE_ERROR\"] = \"7\";\n PURCHASES_ERROR_CODE[\"INVALID_RECEIPT_ERROR\"] = \"8\";\n PURCHASES_ERROR_CODE[\"MISSING_RECEIPT_FILE_ERROR\"] = \"9\";\n PURCHASES_ERROR_CODE[\"NETWORK_ERROR\"] = \"10\";\n PURCHASES_ERROR_CODE[\"INVALID_CREDENTIALS_ERROR\"] = \"11\";\n PURCHASES_ERROR_CODE[\"UNEXPECTED_BACKEND_RESPONSE_ERROR\"] = \"12\";\n PURCHASES_ERROR_CODE[\"RECEIPT_IN_USE_BY_OTHER_SUBSCRIBER_ERROR\"] = \"13\";\n PURCHASES_ERROR_CODE[\"INVALID_APP_USER_ID_ERROR\"] = \"14\";\n PURCHASES_ERROR_CODE[\"OPERATION_ALREADY_IN_PROGRESS_ERROR\"] = \"15\";\n PURCHASES_ERROR_CODE[\"UNKNOWN_BACKEND_ERROR\"] = \"16\";\n PURCHASES_ERROR_CODE[\"INVALID_APPLE_SUBSCRIPTION_KEY_ERROR\"] = \"17\";\n PURCHASES_ERROR_CODE[\"INELIGIBLE_ERROR\"] = \"18\";\n PURCHASES_ERROR_CODE[\"INSUFFICIENT_PERMISSIONS_ERROR\"] = \"19\";\n PURCHASES_ERROR_CODE[\"PAYMENT_PENDING_ERROR\"] = \"20\";\n PURCHASES_ERROR_CODE[\"INVALID_SUBSCRIBER_ATTRIBUTES_ERROR\"] = \"21\";\n PURCHASES_ERROR_CODE[\"LOG_OUT_ANONYMOUS_USER_ERROR\"] = \"22\";\n PURCHASES_ERROR_CODE[\"CONFIGURATION_ERROR\"] = \"23\";\n PURCHASES_ERROR_CODE[\"UNSUPPORTED_ERROR\"] = \"24\";\n PURCHASES_ERROR_CODE[\"EMPTY_SUBSCRIBER_ATTRIBUTES_ERROR\"] = \"25\";\n PURCHASES_ERROR_CODE[\"PRODUCT_DISCOUNT_MISSING_IDENTIFIER_ERROR\"] = \"26\";\n PURCHASES_ERROR_CODE[\"PRODUCT_DISCOUNT_MISSING_SUBSCRIPTION_GROUP_IDENTIFIER_ERROR\"] = \"28\";\n PURCHASES_ERROR_CODE[\"CUSTOMER_INFO_ERROR\"] = \"29\";\n PURCHASES_ERROR_CODE[\"SYSTEM_INFO_ERROR\"] = \"30\";\n PURCHASES_ERROR_CODE[\"BEGIN_REFUND_REQUEST_ERROR\"] = \"31\";\n PURCHASES_ERROR_CODE[\"PRODUCT_REQUEST_TIMED_OUT_ERROR\"] = \"32\";\n PURCHASES_ERROR_CODE[\"API_ENDPOINT_BLOCKED\"] = \"33\";\n PURCHASES_ERROR_CODE[\"INVALID_PROMOTIONAL_OFFER_ERROR\"] = \"34\";\n PURCHASES_ERROR_CODE[\"OFFLINE_CONNECTION_ERROR\"] = \"35\";\n PURCHASES_ERROR_CODE[\"TEST_STORE_SIMULATED_PURCHASE_ERROR\"] = \"42\";\n})(PURCHASES_ERROR_CODE || (PURCHASES_ERROR_CODE = {}));\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/* tslint:disable:max-classes-per-file */\nimport { PURCHASES_ERROR_CODE } from \"./generated/error-codes\";\nexport { PURCHASES_ERROR_CODE };\n/**\n * @internal\n */\nvar UninitializedPurchasesError = /** @class */ (function (_super) {\n __extends(UninitializedPurchasesError, _super);\n function UninitializedPurchasesError() {\n var _this = _super.call(this, \"There is no singleton instance. \" +\n \"Make sure you configure Purchases before trying to get the default instance. \" +\n \"More info here: https://errors.rev.cat/configuring-sdk\") || this;\n // Set the prototype explicitly.\n Object.setPrototypeOf(_this, UninitializedPurchasesError.prototype);\n return _this;\n }\n return UninitializedPurchasesError;\n}(Error));\nexport { UninitializedPurchasesError };\n/**\n * @internal\n */\nvar UnsupportedPlatformError = /** @class */ (function (_super) {\n __extends(UnsupportedPlatformError, _super);\n function UnsupportedPlatformError() {\n var _this = _super.call(this, \"This method is not available in the current platform.\") || this;\n // Set the prototype explicitly.\n Object.setPrototypeOf(_this, UnsupportedPlatformError.prototype);\n return _this;\n }\n return UnsupportedPlatformError;\n}(Error));\nexport { UnsupportedPlatformError };\n","/**\n * Enum indicating possible package types.\n * @public\n */\nexport var PACKAGE_TYPE;\n(function (PACKAGE_TYPE) {\n /**\n * A package that was defined with a custom identifier.\n */\n PACKAGE_TYPE[\"UNKNOWN\"] = \"UNKNOWN\";\n /**\n * A package that was defined with a custom identifier.\n */\n PACKAGE_TYPE[\"CUSTOM\"] = \"CUSTOM\";\n /**\n * A package configured with the predefined lifetime identifier.\n */\n PACKAGE_TYPE[\"LIFETIME\"] = \"LIFETIME\";\n /**\n * A package configured with the predefined annual identifier.\n */\n PACKAGE_TYPE[\"ANNUAL\"] = \"ANNUAL\";\n /**\n * A package configured with the predefined six month identifier.\n */\n PACKAGE_TYPE[\"SIX_MONTH\"] = \"SIX_MONTH\";\n /**\n * A package configured with the predefined three month identifier.\n */\n PACKAGE_TYPE[\"THREE_MONTH\"] = \"THREE_MONTH\";\n /**\n * A package configured with the predefined two month identifier.\n */\n PACKAGE_TYPE[\"TWO_MONTH\"] = \"TWO_MONTH\";\n /**\n * A package configured with the predefined monthly identifier.\n */\n PACKAGE_TYPE[\"MONTHLY\"] = \"MONTHLY\";\n /**\n * A package configured with the predefined weekly identifier.\n */\n PACKAGE_TYPE[\"WEEKLY\"] = \"WEEKLY\";\n})(PACKAGE_TYPE || (PACKAGE_TYPE = {}));\n/**\n * Enum indicating possible eligibility status for introductory pricing.\n * @public\n */\nexport var INTRO_ELIGIBILITY_STATUS;\n(function (INTRO_ELIGIBILITY_STATUS) {\n /**\n * RevenueCat doesn't have enough information to determine eligibility.\n */\n INTRO_ELIGIBILITY_STATUS[INTRO_ELIGIBILITY_STATUS[\"INTRO_ELIGIBILITY_STATUS_UNKNOWN\"] = 0] = \"INTRO_ELIGIBILITY_STATUS_UNKNOWN\";\n /**\n * The user is not eligible for a free trial or intro pricing for this product.\n */\n INTRO_ELIGIBILITY_STATUS[INTRO_ELIGIBILITY_STATUS[\"INTRO_ELIGIBILITY_STATUS_INELIGIBLE\"] = 1] = \"INTRO_ELIGIBILITY_STATUS_INELIGIBLE\";\n /**\n * The user is eligible for a free trial or intro pricing for this product.\n */\n INTRO_ELIGIBILITY_STATUS[INTRO_ELIGIBILITY_STATUS[\"INTRO_ELIGIBILITY_STATUS_ELIGIBLE\"] = 2] = \"INTRO_ELIGIBILITY_STATUS_ELIGIBLE\";\n /**\n * There is no free trial or intro pricing for this product.\n */\n INTRO_ELIGIBILITY_STATUS[INTRO_ELIGIBILITY_STATUS[\"INTRO_ELIGIBILITY_STATUS_NO_INTRO_OFFER_EXISTS\"] = 3] = \"INTRO_ELIGIBILITY_STATUS_NO_INTRO_OFFER_EXISTS\";\n})(INTRO_ELIGIBILITY_STATUS || (INTRO_ELIGIBILITY_STATUS = {}));\n/**\n * Enum indicating possible product categories.\n * @public\n */\nexport var PRODUCT_CATEGORY;\n(function (PRODUCT_CATEGORY) {\n /**\n * A type of product for non-subscription.\n */\n PRODUCT_CATEGORY[\"NON_SUBSCRIPTION\"] = \"NON_SUBSCRIPTION\";\n /**\n * A type of product for subscriptions.\n */\n PRODUCT_CATEGORY[\"SUBSCRIPTION\"] = \"SUBSCRIPTION\";\n /**\n * A type of product for unknowns.\n */\n PRODUCT_CATEGORY[\"UNKNOWN\"] = \"UNKNOWN\";\n})(PRODUCT_CATEGORY || (PRODUCT_CATEGORY = {}));\n/**\n * Enum indicating possible product types.\n * @public\n */\nexport var PRODUCT_TYPE;\n(function (PRODUCT_TYPE) {\n /**\n * A consumable in-app purchase.\n */\n PRODUCT_TYPE[\"CONSUMABLE\"] = \"CONSUMABLE\";\n /**\n * A non-consumable in-app purchase. Only applies to Apple Store products.\n */\n PRODUCT_TYPE[\"NON_CONSUMABLE\"] = \"NON_CONSUMABLE\";\n /**\n * A non-renewing subscription. Only applies to Apple Store products.\n */\n PRODUCT_TYPE[\"NON_RENEWABLE_SUBSCRIPTION\"] = \"NON_RENEWABLE_SUBSCRIPTION\";\n /**\n * An auto-renewable subscription.\n */\n PRODUCT_TYPE[\"AUTO_RENEWABLE_SUBSCRIPTION\"] = \"AUTO_RENEWABLE_SUBSCRIPTION\";\n /**\n * A subscription that is pre-paid. Only applies to Google Play products.\n */\n PRODUCT_TYPE[\"PREPAID_SUBSCRIPTION\"] = \"PREPAID_SUBSCRIPTION\";\n /**\n * Unable to determine product type.\n */\n PRODUCT_TYPE[\"UNKNOWN\"] = \"UNKNOWN\";\n})(PRODUCT_TYPE || (PRODUCT_TYPE = {}));\n/**\n * Enum with possible proration modes in a subscription upgrade or downgrade in the Play Store. Used only for Google.\n * @deprecated Use STORE_REPLACEMENT_MODE\n * @public\n */\nexport var PRORATION_MODE;\n(function (PRORATION_MODE) {\n PRORATION_MODE[PRORATION_MODE[\"UNKNOWN_SUBSCRIPTION_UPGRADE_DOWNGRADE_POLICY\"] = 0] = \"UNKNOWN_SUBSCRIPTION_UPGRADE_DOWNGRADE_POLICY\";\n /**\n * Replacement takes effect immediately, and the remaining time will be\n * prorated and credited to the user.\n */\n PRORATION_MODE[PRORATION_MODE[\"IMMEDIATE_WITH_TIME_PRORATION\"] = 1] = \"IMMEDIATE_WITH_TIME_PRORATION\";\n /**\n * Replacement takes effect immediately, and the billing cycle remains the\n * same. The price for the remaining period will be charged. This option is\n * only available for subscription upgrade.\n */\n PRORATION_MODE[PRORATION_MODE[\"IMMEDIATE_AND_CHARGE_PRORATED_PRICE\"] = 2] = \"IMMEDIATE_AND_CHARGE_PRORATED_PRICE\";\n /**\n * Replacement takes effect immediately, and the new price will be charged on\n * next recurrence time. The billing cycle stays the same.\n *\n * This is the current default behavior.\n */\n PRORATION_MODE[PRORATION_MODE[\"IMMEDIATE_WITHOUT_PRORATION\"] = 3] = \"IMMEDIATE_WITHOUT_PRORATION\";\n /**\n * Replacement takes effect when the old plan expires, and the new price will\n * be charged at the same time.\n */\n PRORATION_MODE[PRORATION_MODE[\"DEFERRED\"] = 6] = \"DEFERRED\";\n /**\n * Replacement takes effect immediately, and the user is charged full price\n * of new plan and is given a full billing cycle of subscription,\n * plus remaining prorated time from the old plan.\n */\n PRORATION_MODE[PRORATION_MODE[\"IMMEDIATE_AND_CHARGE_FULL_PRICE\"] = 5] = \"IMMEDIATE_AND_CHARGE_FULL_PRICE\";\n})(PRORATION_MODE || (PRORATION_MODE = {}));\n/**\n * Enum with possible proration modes in a subscription upgrade or downgrade in the Play Store or Galaxy Store. Used only on Android.\n * @public\n */\nexport var STORE_REPLACEMENT_MODE;\n(function (STORE_REPLACEMENT_MODE) {\n /**\n * Old subscription is cancelled, and new subscription takes effect immediately.\n * User is charged for the full price of the new subscription on the old subscription's expiration date.\n *\n * This is the default behavior for the Galaxy and Play stores.\n */\n STORE_REPLACEMENT_MODE[\"WITHOUT_PRORATION\"] = \"WITHOUT_PRORATION\";\n /**\n * Replacement takes effect immediately, and the remaining time will be\n * prorated and credited to the user. This is the current default behavior.\n */\n STORE_REPLACEMENT_MODE[\"WITH_TIME_PRORATION\"] = \"WITH_TIME_PRORATION\";\n /**\n * Replacement takes effect immediately, and the user is charged full price of new plan and is\n * given a full billing cycle of subscription, plus remaining prorated time from the old plan.\n *\n * This mode is not supported by the Galaxy Store. If it is passed to the Galaxy Store, an error will be thrown.\n */\n STORE_REPLACEMENT_MODE[\"CHARGE_FULL_PRICE\"] = \"CHARGE_FULL_PRICE\";\n /**\n * Replacement takes effect immediately, and the billing cycle remains the\n * same. The price for the remaining period will be charged. This option is\n * only available for subscription upgrade.\n */\n STORE_REPLACEMENT_MODE[\"CHARGE_PRORATED_PRICE\"] = \"CHARGE_PRORATED_PRICE\";\n /**\n * Replacement takes effect when the old plan expires, and the new price will be charged at the same time.\n */\n STORE_REPLACEMENT_MODE[\"DEFERRED\"] = \"DEFERRED\";\n})(STORE_REPLACEMENT_MODE || (STORE_REPLACEMENT_MODE = {}));\n/**\n * Recurrence mode for a pricing phase\n * @public\n */\nexport var RECURRENCE_MODE;\n(function (RECURRENCE_MODE) {\n /**\n * Pricing phase repeats infinitely until cancellation\n */\n RECURRENCE_MODE[RECURRENCE_MODE[\"INFINITE_RECURRING\"] = 1] = \"INFINITE_RECURRING\";\n /**\n * Pricing phase repeats for a fixed number of billing periods\n */\n RECURRENCE_MODE[RECURRENCE_MODE[\"FINITE_RECURRING\"] = 2] = \"FINITE_RECURRING\";\n /**\n * Pricing phase does not repeat\n */\n RECURRENCE_MODE[RECURRENCE_MODE[\"NON_RECURRING\"] = 3] = \"NON_RECURRING\";\n})(RECURRENCE_MODE || (RECURRENCE_MODE = {}));\n/**\n * Payment mode for offer pricing phases. Google Play only.\n * @public\n */\nexport var OFFER_PAYMENT_MODE;\n(function (OFFER_PAYMENT_MODE) {\n /**\n * Subscribers don't pay until the specified period ends\n */\n OFFER_PAYMENT_MODE[\"FREE_TRIAL\"] = \"FREE_TRIAL\";\n /**\n * Subscribers pay up front for a specified period\n */\n OFFER_PAYMENT_MODE[\"SINGLE_PAYMENT\"] = \"SINGLE_PAYMENT\";\n /**\n * Subscribers pay a discounted amount for a specified number of periods\n */\n OFFER_PAYMENT_MODE[\"DISCOUNTED_RECURRING_PAYMENT\"] = \"DISCOUNTED_RECURRING_PAYMENT\";\n})(OFFER_PAYMENT_MODE || (OFFER_PAYMENT_MODE = {}));\n/**\n * Time duration unit for Period.\n * @public\n */\nexport var PERIOD_UNIT;\n(function (PERIOD_UNIT) {\n PERIOD_UNIT[\"DAY\"] = \"DAY\";\n PERIOD_UNIT[\"WEEK\"] = \"WEEK\";\n PERIOD_UNIT[\"MONTH\"] = \"MONTH\";\n PERIOD_UNIT[\"YEAR\"] = \"YEAR\";\n PERIOD_UNIT[\"UNKNOWN\"] = \"UNKNOWN\";\n})(PERIOD_UNIT || (PERIOD_UNIT = {}));\n","/**\n * @deprecated Use PRODUCT_CATEGORY\n * @public\n */\nexport var PURCHASE_TYPE;\n(function (PURCHASE_TYPE) {\n /**\n * A type of SKU for in-app products.\n */\n PURCHASE_TYPE[\"INAPP\"] = \"inapp\";\n /**\n * A type of SKU for subscriptions.\n */\n PURCHASE_TYPE[\"SUBS\"] = \"subs\";\n})(PURCHASE_TYPE || (PURCHASE_TYPE = {}));\n/**\n * Enum for billing features.\n * Currently, these are only relevant for Google Play Android users:\n * https://developer.android.com/reference/com/android/billingclient/api/BillingClient.FeatureType\n * @public\n */\nexport var BILLING_FEATURE;\n(function (BILLING_FEATURE) {\n /**\n * Purchase/query for subscriptions.\n */\n BILLING_FEATURE[BILLING_FEATURE[\"SUBSCRIPTIONS\"] = 0] = \"SUBSCRIPTIONS\";\n /**\n * Subscriptions update/replace.\n */\n BILLING_FEATURE[BILLING_FEATURE[\"SUBSCRIPTIONS_UPDATE\"] = 1] = \"SUBSCRIPTIONS_UPDATE\";\n /**\n * Purchase/query for in-app items on VR.\n */\n BILLING_FEATURE[BILLING_FEATURE[\"IN_APP_ITEMS_ON_VR\"] = 2] = \"IN_APP_ITEMS_ON_VR\";\n /**\n * Purchase/query for subscriptions on VR.\n */\n BILLING_FEATURE[BILLING_FEATURE[\"SUBSCRIPTIONS_ON_VR\"] = 3] = \"SUBSCRIPTIONS_ON_VR\";\n /**\n * Launch a price change confirmation flow.\n */\n BILLING_FEATURE[BILLING_FEATURE[\"PRICE_CHANGE_CONFIRMATION\"] = 4] = \"PRICE_CHANGE_CONFIRMATION\";\n})(BILLING_FEATURE || (BILLING_FEATURE = {}));\n/**\n * Enum for possible refund request results.\n * @public\n */\nexport var REFUND_REQUEST_STATUS;\n(function (REFUND_REQUEST_STATUS) {\n /**\n * Apple has received the refund request.\n */\n REFUND_REQUEST_STATUS[REFUND_REQUEST_STATUS[\"SUCCESS\"] = 0] = \"SUCCESS\";\n /**\n * User canceled submission of the refund request.\n */\n REFUND_REQUEST_STATUS[REFUND_REQUEST_STATUS[\"USER_CANCELLED\"] = 1] = \"USER_CANCELLED\";\n /**\n * There was an error with the request. See message for more details.\n */\n REFUND_REQUEST_STATUS[REFUND_REQUEST_STATUS[\"ERROR\"] = 2] = \"ERROR\";\n})(REFUND_REQUEST_STATUS || (REFUND_REQUEST_STATUS = {}));\n/**\n * Enum for possible log levels to print.\n * @public\n */\nexport var LOG_LEVEL;\n(function (LOG_LEVEL) {\n LOG_LEVEL[\"VERBOSE\"] = \"VERBOSE\";\n LOG_LEVEL[\"DEBUG\"] = \"DEBUG\";\n LOG_LEVEL[\"INFO\"] = \"INFO\";\n LOG_LEVEL[\"WARN\"] = \"WARN\";\n LOG_LEVEL[\"ERROR\"] = \"ERROR\";\n})(LOG_LEVEL || (LOG_LEVEL = {}));\n/**\n * Enum for in-app message types.\n * This can be used if you disable automatic in-app message from showing automatically.\n * Then, you can pass what type of messages you want to show in the `showInAppMessages`\n * method in Purchases.\n * @public\n */\nexport var IN_APP_MESSAGE_TYPE;\n(function (IN_APP_MESSAGE_TYPE) {\n // Make sure the enum values are in sync with those defined in iOS/Android\n /**\n * In-app messages to indicate there has been a billing issue charging the user.\n */\n IN_APP_MESSAGE_TYPE[IN_APP_MESSAGE_TYPE[\"BILLING_ISSUE\"] = 0] = \"BILLING_ISSUE\";\n /**\n * iOS-only. This message will show if you increase the price of a subscription and\n * the user needs to opt-in to the increase.\n */\n IN_APP_MESSAGE_TYPE[IN_APP_MESSAGE_TYPE[\"PRICE_INCREASE_CONSENT\"] = 1] = \"PRICE_INCREASE_CONSENT\";\n /**\n * iOS-only. StoreKit generic messages.\n */\n IN_APP_MESSAGE_TYPE[IN_APP_MESSAGE_TYPE[\"GENERIC\"] = 2] = \"GENERIC\";\n /**\n * iOS-only. This message will show if the subscriber is eligible for an iOS win-back\n * offer and will allow the subscriber to redeem the offer.\n */\n IN_APP_MESSAGE_TYPE[IN_APP_MESSAGE_TYPE[\"WIN_BACK_OFFER\"] = 3] = \"WIN_BACK_OFFER\";\n})(IN_APP_MESSAGE_TYPE || (IN_APP_MESSAGE_TYPE = {}));\n/**\n * Enum of entitlement verification modes.\n * @public\n */\nexport var ENTITLEMENT_VERIFICATION_MODE;\n(function (ENTITLEMENT_VERIFICATION_MODE) {\n /**\n * The SDK will not perform any entitlement verification.\n */\n ENTITLEMENT_VERIFICATION_MODE[\"DISABLED\"] = \"DISABLED\";\n /**\n * Enable entitlement verification.\n *\n * If verification fails, this will be indicated with [VerificationResult.FAILED] in\n * the [EntitlementInfos.verification] and [EntitlementInfo.verification] properties but parsing will not fail\n * (i.e. Entitlements will still be granted).\n *\n * This can be useful if you want to handle verification failures to display an error/warning to the user\n * or to track this situation but still grant access.\n */\n ENTITLEMENT_VERIFICATION_MODE[\"INFORMATIONAL\"] = \"INFORMATIONAL\";\n // Add ENFORCED mode once we're ready to ship it.\n // ENFORCED = \"ENFORCED\"\n})(ENTITLEMENT_VERIFICATION_MODE || (ENTITLEMENT_VERIFICATION_MODE = {}));\n/**\n * The result of the verification process. For more details check: http://rev.cat/trusted-entitlements\n *\n * This is accomplished by preventing MiTM attacks between the SDK and the RevenueCat server.\n * With verification enabled, the SDK ensures that the response created by the server was not\n * modified by a third-party, and the response received is exactly what was sent.\n *\n * - Note: Verification is only performed if enabled using PurchasesConfiguration's\n * entitlementVerificationMode property. This is disabled by default.\n *\n * @public\n */\nexport var VERIFICATION_RESULT;\n(function (VERIFICATION_RESULT) {\n /**\n * No verification was done.\n *\n * This value is returned when verification is not enabled in PurchasesConfiguration\n */\n VERIFICATION_RESULT[\"NOT_REQUESTED\"] = \"NOT_REQUESTED\";\n /**\n * Verification with our server was performed successfully.\n */\n VERIFICATION_RESULT[\"VERIFIED\"] = \"VERIFIED\";\n /**\n * Verification failed, possibly due to a MiTM attack.\n */\n VERIFICATION_RESULT[\"FAILED\"] = \"FAILED\";\n /**\n * Verification was performed on device.\n */\n VERIFICATION_RESULT[\"VERIFIED_ON_DEVICE\"] = \"VERIFIED_ON_DEVICE\";\n})(VERIFICATION_RESULT || (VERIFICATION_RESULT = {}));\n/**\n * The result of presenting a paywall. This will be the last situation the user experienced before the\n * paywall closed.\n *\n * @public\n */\nexport var PAYWALL_RESULT;\n(function (PAYWALL_RESULT) {\n /**\n * If the paywall wasn't presented. Only returned when using \"presentPaywallIfNeeded\"\n */\n PAYWALL_RESULT[\"NOT_PRESENTED\"] = \"NOT_PRESENTED\";\n /**\n * If an error happened during purchase/restoration.\n */\n PAYWALL_RESULT[\"ERROR\"] = \"ERROR\";\n /**\n * If the paywall was closed without performing an operation\n */\n PAYWALL_RESULT[\"CANCELLED\"] = \"CANCELLED\";\n /**\n * If a successful purchase happened inside the paywall\n */\n PAYWALL_RESULT[\"PURCHASED\"] = \"PURCHASED\";\n /**\n * If a successful restore happened inside the paywall\n */\n PAYWALL_RESULT[\"RESTORED\"] = \"RESTORED\";\n})(PAYWALL_RESULT || (PAYWALL_RESULT = {}));\n/**\n * Defines which version of StoreKit may be used\n * @public\n */\nexport var STOREKIT_VERSION;\n(function (STOREKIT_VERSION) {\n /**\n * Always use StoreKit 1.\n */\n STOREKIT_VERSION[\"STOREKIT_1\"] = \"STOREKIT_1\";\n /**\n * Always use StoreKit 2 (StoreKit 1 will be used if StoreKit 2 is not available in the current device.)\n * - Warning: Make sure you have an In-App Purchase Key configured in your app.\n * Please see https://rev.cat/in-app-purchase-key-configuration for more info.\n */\n STOREKIT_VERSION[\"STOREKIT_2\"] = \"STOREKIT_2\";\n /**\n * Let RevenueCat use the most appropriate version of StoreKit\n */\n STOREKIT_VERSION[\"DEFAULT\"] = \"DEFAULT\";\n})(STOREKIT_VERSION || (STOREKIT_VERSION = {}));\n/**\n * Modes for completing the purchase process.\n * @public\n */\nexport var PURCHASES_ARE_COMPLETED_BY_TYPE;\n(function (PURCHASES_ARE_COMPLETED_BY_TYPE) {\n /**\n * RevenueCat will **not** automatically acknowledge any purchases. You will have to do so manually.\n *\n * **Note:** failing to acknowledge a purchase within 3 days will lead to Google Play automatically issuing a\n * refund to the user.\n *\n * For more info, see [revenuecat.com](https://docs.revenuecat.com/docs/observer-mode#option-2-client-side).\n */\n PURCHASES_ARE_COMPLETED_BY_TYPE[\"MY_APP\"] = \"MY_APP\";\n /**\n * RevenueCat will automatically acknowledge verified purchases. No action is required by you.\n */\n PURCHASES_ARE_COMPLETED_BY_TYPE[\"REVENUECAT\"] = \"REVENUECAT\";\n})(PURCHASES_ARE_COMPLETED_BY_TYPE || (PURCHASES_ARE_COMPLETED_BY_TYPE = {}));\n","/**\n * The result type of a Redemption Link redemption attempt.\n * @public\n */\nexport var WebPurchaseRedemptionResultType;\n(function (WebPurchaseRedemptionResultType) {\n /**\n * The redemption was successful.\n */\n WebPurchaseRedemptionResultType[\"SUCCESS\"] = \"SUCCESS\";\n /**\n * The redemption failed.\n */\n WebPurchaseRedemptionResultType[\"ERROR\"] = \"ERROR\";\n /**\n * The purchase associated to the link belongs to another user.\n */\n WebPurchaseRedemptionResultType[\"PURCHASE_BELONGS_TO_OTHER_USER\"] = \"PURCHASE_BELONGS_TO_OTHER_USER\";\n /**\n * The token is invalid.\n */\n WebPurchaseRedemptionResultType[\"INVALID_TOKEN\"] = \"INVALID_TOKEN\";\n /**\n * The token has expired. A new Redemption Link will be sent to the email used during purchase.\n */\n WebPurchaseRedemptionResultType[\"EXPIRED\"] = \"EXPIRED\";\n})(WebPurchaseRedemptionResultType || (WebPurchaseRedemptionResultType = {}));\n","import { PAYWALL_RESULT } from '@revenuecat/purchases-typescript-internal-esm';\n/**\n * Possible outcomes from a custom {@link PurchaseLogic} operation.\n */\nexport var PURCHASE_LOGIC_RESULT;\n(function (PURCHASE_LOGIC_RESULT) {\n /** The purchase or restore completed successfully. */\n PURCHASE_LOGIC_RESULT[\"SUCCESS\"] = \"SUCCESS\";\n /** The user cancelled the purchase or restore. */\n PURCHASE_LOGIC_RESULT[\"CANCELLATION\"] = \"CANCELLATION\";\n /** The purchase or restore failed with an error. */\n PURCHASE_LOGIC_RESULT[\"ERROR\"] = \"ERROR\";\n})(PURCHASE_LOGIC_RESULT || (PURCHASE_LOGIC_RESULT = {}));\n/** @see {@link IOSPaywallPresentationStyle} */\nexport const IOS_PAYWALL_PRESENTATION_STYLE = {\n /** Presents the paywall in full-screen mode. */\n FULL_SCREEN: 'FULL_SCREEN',\n /** Presents the paywall as a sheet. This is the default on iOS. */\n SHEET: 'SHEET',\n};\n/** @see {@link AndroidPaywallPresentationStyle} */\nexport const ANDROID_PAYWALL_PRESENTATION_STYLE = {\n /** Presents the paywall in full-screen mode. This is the default on Android. */\n FULL_SCREEN: 'FULL_SCREEN',\n};\n/** Convenience presets for {@link PaywallPresentationConfiguration}. */\nexport const PaywallPresentationConfiguration = {\n /** Full-screen presentation on all platforms. */\n FULL_SCREEN: {\n ios: IOS_PAYWALL_PRESENTATION_STYLE.FULL_SCREEN,\n android: ANDROID_PAYWALL_PRESENTATION_STYLE.FULL_SCREEN,\n },\n /** Default presentation: sheet on iOS, full-screen on Android. */\n DEFAULT: {\n ios: IOS_PAYWALL_PRESENTATION_STYLE.SHEET,\n android: ANDROID_PAYWALL_PRESENTATION_STYLE.FULL_SCREEN,\n },\n};\n// Using the enum from purchases-typescript-internal-esm instead of defining our own\nexport { PAYWALL_RESULT as PaywallResultEnum };\n//# sourceMappingURL=definitions.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { registerPlugin } from '@capacitor/core';\nimport { IOS_PAYWALL_PRESENTATION_STYLE, ANDROID_PAYWALL_PRESENTATION_STYLE, PURCHASE_LOGIC_RESULT, } from './definitions';\nconst nativePlugin = registerPlugin('RevenueCatUI', {\n web: () => import('./web').then((m) => new m.RevenueCatUIWeb()),\n});\nfunction assertValidPresentationConfiguration(config) {\n if (config === undefined) {\n return;\n }\n if (typeof config !== 'object' || config === null) {\n throw new Error(`Invalid presentationConfiguration: expected an object or undefined.`);\n }\n const { ios, android } = config;\n const validIos = Object.values(IOS_PAYWALL_PRESENTATION_STYLE);\n const validAndroid = Object.values(ANDROID_PAYWALL_PRESENTATION_STYLE);\n if (ios !== undefined && !validIos.includes(ios)) {\n throw new Error(`Invalid presentationConfiguration.ios \"${String(ios)}\". Expected one of: ${validIos.join(', ')}.`);\n }\n if (android !== undefined && !validAndroid.includes(android)) {\n throw new Error(`Invalid presentationConfiguration.android \"${String(android)}\". Expected one of: ${validAndroid.join(', ')}.`);\n }\n}\nfunction resolveNativePresentationOptions(config) {\n if (!config) {\n return {};\n }\n // iOS full-screen takes precedence as the flag that the native bridge understands\n if (config.ios === IOS_PAYWALL_PRESENTATION_STYLE.FULL_SCREEN) {\n return { useFullScreenPresentation: true };\n }\n return {};\n}\nfunction serializeResultForNative(result) {\n if (result.result === PURCHASE_LOGIC_RESULT.ERROR && 'error' in result && result.error) {\n return {\n result: result.result,\n error: {\n code: result.error.code,\n message: result.error.message,\n },\n };\n }\n return { result: result.result };\n}\nasync function presentWithListenerSupport(nativeMethod, options, listener, purchaseLogic) {\n const handles = [];\n try {\n // Register PaywallListener event handlers\n if (listener) {\n if (listener.onPurchaseStarted) {\n const cb = listener.onPurchaseStarted;\n handles.push(await nativePlugin.addListener('onPurchaseStarted', (data) => {\n var _a;\n cb({ packageBeingPurchased: (_a = data.packageBeingPurchased) !== null && _a !== void 0 ? _a : data });\n }));\n }\n if (listener.onPurchaseCompleted) {\n const cb = listener.onPurchaseCompleted;\n handles.push(await nativePlugin.addListener('onPurchaseCompleted', (data) => {\n cb({\n customerInfo: data.customerInfo,\n storeTransaction: data.storeTransaction,\n });\n }));\n }\n if (listener.onPurchaseError) {\n const cb = listener.onPurchaseError;\n handles.push(await nativePlugin.addListener('onPurchaseError', (data) => {\n var _a;\n cb({ error: (_a = data.error) !== null && _a !== void 0 ? _a : data });\n }));\n }\n if (listener.onPurchaseCancelled) {\n const cb = listener.onPurchaseCancelled;\n handles.push(await nativePlugin.addListener('onPurchaseCancelled', () => {\n cb();\n }));\n }\n if (listener.onRestoreStarted) {\n const cb = listener.onRestoreStarted;\n handles.push(await nativePlugin.addListener('onRestoreStarted', () => {\n cb();\n }));\n }\n if (listener.onRestoreCompleted) {\n const cb = listener.onRestoreCompleted;\n handles.push(await nativePlugin.addListener('onRestoreCompleted', (data) => {\n var _a;\n cb({ customerInfo: (_a = data.customerInfo) !== null && _a !== void 0 ? _a : data });\n }));\n }\n if (listener.onRestoreError) {\n const cb = listener.onRestoreError;\n handles.push(await nativePlugin.addListener('onRestoreError', (data) => {\n var _a;\n cb({ error: (_a = data.error) !== null && _a !== void 0 ? _a : data });\n }));\n }\n }\n // Always register onPurchaseInitiated so we auto-resume when the user\n // doesn't provide an onPurchaseInitiated callback — otherwise the\n // purchase flow hangs waiting for a resume that never comes.\n // This must be outside the `if (listener)` block because the native\n // delegate adapter always fires this event (even with purchaseLogic only).\n const onPurchaseInitiatedCb = listener === null || listener === void 0 ? void 0 : listener.onPurchaseInitiated;\n handles.push(await nativePlugin.addListener('onPurchaseInitiated', (data) => {\n var _a;\n const requestId = data.requestId;\n const packageBeingPurchased = (_a = data.package) !== null && _a !== void 0 ? _a : data.packageBeingPurchased;\n if (onPurchaseInitiatedCb) {\n onPurchaseInitiatedCb({\n packageBeingPurchased,\n resumable: {\n resume(shouldProceed = true) {\n nativePlugin.resumePurchaseInitiated({ requestId, shouldProceed });\n },\n },\n });\n }\n else {\n // No callback provided — auto-proceed with the purchase.\n nativePlugin.resumePurchaseInitiated({ requestId, shouldProceed: true });\n }\n }));\n // Register PurchaseLogic event handlers\n if (purchaseLogic) {\n handles.push(await nativePlugin.addListener('onPerformPurchaseRequest', async (data) => {\n var _a, _b, _c;\n const requestId = data.requestId;\n const packageToPurchase = (_b = (_a = data.package) !== null && _a !== void 0 ? _a : data.packageBeingPurchased) !== null && _b !== void 0 ? _b : data.packageToPurchase;\n try {\n const result = await purchaseLogic.performPurchase({ packageToPurchase });\n await nativePlugin.resumePurchaseLogicPurchase(Object.assign({ requestId }, serializeResultForNative(result)));\n }\n catch (e) {\n await nativePlugin.resumePurchaseLogicPurchase({\n requestId,\n result: PURCHASE_LOGIC_RESULT.ERROR,\n error: { message: (_c = e === null || e === void 0 ? void 0 : e.message) !== null && _c !== void 0 ? _c : 'Unknown error' },\n });\n }\n }));\n handles.push(await nativePlugin.addListener('onPerformRestoreRequest', async (data) => {\n var _a;\n const requestId = data.requestId;\n try {\n const result = await purchaseLogic.performRestore();\n await nativePlugin.resumePurchaseLogicRestore(Object.assign({ requestId }, serializeResultForNative(result)));\n }\n catch (e) {\n await nativePlugin.resumePurchaseLogicRestore({\n requestId,\n result: PURCHASE_LOGIC_RESULT.ERROR,\n error: { message: (_a = e === null || e === void 0 ? void 0 : e.message) !== null && _a !== void 0 ? _a : 'Unknown error' },\n });\n }\n }));\n }\n // Call native with serializable-only options\n const nativeOptions = Object.assign(Object.assign({}, options), { hasPaywallListener: !!listener, hasPurchaseLogic: !!purchaseLogic });\n // Remove non-serializable fields\n delete nativeOptions.listener;\n delete nativeOptions.purchaseLogic;\n return await nativeMethod(nativeOptions);\n }\n finally {\n // Clean up all registered listeners\n for (const handle of handles) {\n await handle.remove();\n }\n }\n}\nconst RevenueCatUI = {\n async presentPaywall(options) {\n assertValidPresentationConfiguration(options === null || options === void 0 ? void 0 : options.presentationConfiguration);\n const _a = options !== null && options !== void 0 ? options : {}, { presentationConfiguration, listener, purchaseLogic } = _a, rest = __rest(_a, [\"presentationConfiguration\", \"listener\", \"purchaseLogic\"]);\n const nativeOpts = Object.assign(Object.assign({}, rest), resolveNativePresentationOptions(presentationConfiguration));\n if (!listener && !purchaseLogic) {\n return nativePlugin.presentPaywall(nativeOpts);\n }\n return presentWithListenerSupport((opts) => nativePlugin.presentPaywall(opts), nativeOpts, listener, purchaseLogic);\n },\n async presentPaywallIfNeeded(options) {\n assertValidPresentationConfiguration(options === null || options === void 0 ? void 0 : options.presentationConfiguration);\n const { presentationConfiguration, listener, purchaseLogic } = options, rest = __rest(options, [\"presentationConfiguration\", \"listener\", \"purchaseLogic\"]);\n const nativeOpts = Object.assign(Object.assign({}, rest), resolveNativePresentationOptions(presentationConfiguration));\n if (!listener && !purchaseLogic) {\n return nativePlugin.presentPaywallIfNeeded(nativeOpts);\n }\n return presentWithListenerSupport((opts) => nativePlugin.presentPaywallIfNeeded(opts), nativeOpts, listener, purchaseLogic);\n },\n async presentCustomerCenter() {\n return nativePlugin.presentCustomerCenter();\n },\n setMockWebResults: nativePlugin.setMockWebResults\n ? async (options) => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return nativePlugin.setMockWebResults(options);\n }\n : undefined,\n addListener(eventName, listener) {\n return nativePlugin.addListener(eventName, listener);\n },\n removeAllListeners() {\n return nativePlugin.removeAllListeners();\n },\n};\nexport * from './definitions';\nexport { PAYWALL_RESULT } from '@revenuecat/purchases-typescript-internal-esm';\nexport { RevenueCatUI };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { PAYWALL_RESULT } from '@revenuecat/purchases-typescript-internal-esm';\nexport class RevenueCatUIWeb extends WebPlugin {\n constructor() {\n super();\n this.shouldMockWebResults = false;\n this.webNotSupportedErrorMessage = 'RevenueCatUI is not supported on web platforms.';\n }\n async setMockWebResults(options) {\n this.shouldMockWebResults = options.shouldMockWebResults;\n return Promise.resolve();\n }\n async presentPaywall(options) {\n return this.mockReturningFunctionIfEnabled('presentPaywall', {\n result: PAYWALL_RESULT.NOT_PRESENTED,\n }, options);\n }\n async presentPaywallIfNeeded(options) {\n return this.mockReturningFunctionIfEnabled('presentPaywallIfNeeded', {\n result: PAYWALL_RESULT.NOT_PRESENTED,\n }, options);\n }\n async presentCustomerCenter() {\n return this.mockNonReturningFunctionIfEnabled('presentCustomerCenter');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async resumePurchaseInitiated(_options) {\n return this.mockNonReturningFunctionIfEnabled('resumePurchaseInitiated');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async resumePurchaseLogicPurchase(_options) {\n return this.mockNonReturningFunctionIfEnabled('resumePurchaseLogicPurchase');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async resumePurchaseLogicRestore(_options) {\n return this.mockNonReturningFunctionIfEnabled('resumePurchaseLogicRestore');\n }\n addListener(eventName, listener) {\n if (eventName !== 'paywallDisplayed' && eventName !== 'paywallDismissed') {\n console.warn(`Unsupported event: ${eventName}`);\n }\n return super.addListener(eventName, listener);\n }\n removeAllListeners() {\n return super.removeAllListeners();\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, options) {\n if (!this.shouldMockWebResults) {\n return Promise.reject(this.webNotSupportedErrorMessage);\n }\n console.log(`${functionName} called on web with mocking enabled. Returning mocked value`, options);\n return Promise.resolve(returnValue);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["this","PAYWALL_RESULT","PURCHASE_LOGIC_RESULT","registerPlugin","WebPlugin"],"mappings":";;;IAAA;IACA;IACA;IACA;IACA;IACA;IACO,IAAI,oBAAoB;IAC/B,CAAC,UAAU,oBAAoB,EAAE;IACjC,IAAI,oBAAoB,CAAC,eAAe,CAAC,GAAG,GAAG;IAC/C,IAAI,oBAAoB,CAAC,0BAA0B,CAAC,GAAG,GAAG;IAC1D,IAAI,oBAAoB,CAAC,qBAAqB,CAAC,GAAG,GAAG;IACrD,IAAI,oBAAoB,CAAC,4BAA4B,CAAC,GAAG,GAAG;IAC5D,IAAI,oBAAoB,CAAC,wBAAwB,CAAC,GAAG,GAAG;IACxD,IAAI,oBAAoB,CAAC,0CAA0C,CAAC,GAAG,GAAG;IAC1E,IAAI,oBAAoB,CAAC,iCAAiC,CAAC,GAAG,GAAG;IACjE,IAAI,oBAAoB,CAAC,8BAA8B,CAAC,GAAG,GAAG;IAC9D,IAAI,oBAAoB,CAAC,uBAAuB,CAAC,GAAG,GAAG;IACvD,IAAI,oBAAoB,CAAC,4BAA4B,CAAC,GAAG,GAAG;IAC5D,IAAI,oBAAoB,CAAC,eAAe,CAAC,GAAG,IAAI;IAChD,IAAI,oBAAoB,CAAC,2BAA2B,CAAC,GAAG,IAAI;IAC5D,IAAI,oBAAoB,CAAC,mCAAmC,CAAC,GAAG,IAAI;IACpE,IAAI,oBAAoB,CAAC,0CAA0C,CAAC,GAAG,IAAI;IAC3E,IAAI,oBAAoB,CAAC,2BAA2B,CAAC,GAAG,IAAI;IAC5D,IAAI,oBAAoB,CAAC,qCAAqC,CAAC,GAAG,IAAI;IACtE,IAAI,oBAAoB,CAAC,u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AAE;IACzC,IAAI;IACJ,IAAI,iCAAiC,CAAC,YAAY,EAAE;IACpD,QAAQ,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE;IACxC,YAAY,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC;IACnE,QAAQ;IACR,QAAQ,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,0CAA0C,CAAC,CAAC;IAChF,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE;IAChC,IAAI;IACJ,IAAI,8BAA8B,CAAC,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE;IACvE,QAAQ,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE;IACxC,YAAY,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC;IACnE,QAAQ;IACR,QAAQ,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,2DAA2D,CAAC,EAAE,OAAO,CAAC;IAC1G,QAAQ,OAAO,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC;IAC3C,IAAI;IACJ;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3,4]}
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["../node_modules/@revenuecat/purchases-typescript-internal-esm/dist/generated/error-codes.js","../node_modules/@revenuecat/purchases-typescript-internal-esm/dist/errors.js","../node_modules/@revenuecat/purchases-typescript-internal-esm/dist/offerings.js","../node_modules/@revenuecat/purchases-typescript-internal-esm/dist/enums.js","../node_modules/@revenuecat/purchases-typescript-internal-esm/dist/webRedemption.js","esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["// @generated\n// DO NOT EDIT THIS FILE — generated from https://github.com/RevenueCat/purchases-error-codes\n/**\n * Error codes indicating the reason for an error.\n * @public\n */\nexport var PURCHASES_ERROR_CODE;\n(function (PURCHASES_ERROR_CODE) {\n PURCHASES_ERROR_CODE[\"UNKNOWN_ERROR\"] = \"0\";\n PURCHASES_ERROR_CODE[\"PURCHASE_CANCELLED_ERROR\"] = \"1\";\n PURCHASES_ERROR_CODE[\"STORE_PROBLEM_ERROR\"] = \"2\";\n PURCHASES_ERROR_CODE[\"PURCHASE_NOT_ALLOWED_ERROR\"] = \"3\";\n PURCHASES_ERROR_CODE[\"PURCHASE_INVALID_ERROR\"] = \"4\";\n PURCHASES_ERROR_CODE[\"PRODUCT_NOT_AVAILABLE_FOR_PURCHASE_ERROR\"] = \"5\";\n PURCHASES_ERROR_CODE[\"PRODUCT_ALREADY_PURCHASED_ERROR\"] = \"6\";\n PURCHASES_ERROR_CODE[\"RECEIPT_ALREADY_IN_USE_ERROR\"] = \"7\";\n PURCHASES_ERROR_CODE[\"INVALID_RECEIPT_ERROR\"] = \"8\";\n PURCHASES_ERROR_CODE[\"MISSING_RECEIPT_FILE_ERROR\"] = \"9\";\n PURCHASES_ERROR_CODE[\"NETWORK_ERROR\"] = \"10\";\n PURCHASES_ERROR_CODE[\"INVALID_CREDENTIALS_ERROR\"] = \"11\";\n PURCHASES_ERROR_CODE[\"UNEXPECTED_BACKEND_RESPONSE_ERROR\"] = \"12\";\n PURCHASES_ERROR_CODE[\"RECEIPT_IN_USE_BY_OTHER_SUBSCRIBER_ERROR\"] = \"13\";\n PURCHASES_ERROR_CODE[\"INVALID_APP_USER_ID_ERROR\"] = \"14\";\n PURCHASES_ERROR_CODE[\"OPERATION_ALREADY_IN_PROGRESS_ERROR\"] = \"15\";\n PURCHASES_ERROR_CODE[\"UNKNOWN_BACKEND_ERROR\"] = \"16\";\n PURCHASES_ERROR_CODE[\"INVALID_APPLE_SUBSCRIPTION_KEY_ERROR\"] = \"17\";\n PURCHASES_ERROR_CODE[\"INELIGIBLE_ERROR\"] = \"18\";\n PURCHASES_ERROR_CODE[\"INSUFFICIENT_PERMISSIONS_ERROR\"] = \"19\";\n PURCHASES_ERROR_CODE[\"PAYMENT_PENDING_ERROR\"] = \"20\";\n PURCHASES_ERROR_CODE[\"INVALID_SUBSCRIBER_ATTRIBUTES_ERROR\"] = \"21\";\n PURCHASES_ERROR_CODE[\"LOG_OUT_ANONYMOUS_USER_ERROR\"] = \"22\";\n PURCHASES_ERROR_CODE[\"CONFIGURATION_ERROR\"] = \"23\";\n PURCHASES_ERROR_CODE[\"UNSUPPORTED_ERROR\"] = \"24\";\n PURCHASES_ERROR_CODE[\"EMPTY_SUBSCRIBER_ATTRIBUTES_ERROR\"] = \"25\";\n PURCHASES_ERROR_CODE[\"PRODUCT_DISCOUNT_MISSING_IDENTIFIER_ERROR\"] = \"26\";\n PURCHASES_ERROR_CODE[\"PRODUCT_DISCOUNT_MISSING_SUBSCRIPTION_GROUP_IDENTIFIER_ERROR\"] = \"28\";\n PURCHASES_ERROR_CODE[\"CUSTOMER_INFO_ERROR\"] = \"29\";\n PURCHASES_ERROR_CODE[\"SYSTEM_INFO_ERROR\"] = \"30\";\n PURCHASES_ERROR_CODE[\"BEGIN_REFUND_REQUEST_ERROR\"] = \"31\";\n PURCHASES_ERROR_CODE[\"PRODUCT_REQUEST_TIMED_OUT_ERROR\"] = \"32\";\n PURCHASES_ERROR_CODE[\"API_ENDPOINT_BLOCKED\"] = \"33\";\n PURCHASES_ERROR_CODE[\"INVALID_PROMOTIONAL_OFFER_ERROR\"] = \"34\";\n PURCHASES_ERROR_CODE[\"OFFLINE_CONNECTION_ERROR\"] = \"35\";\n PURCHASES_ERROR_CODE[\"TEST_STORE_SIMULATED_PURCHASE_ERROR\"] = \"42\";\n})(PURCHASES_ERROR_CODE || (PURCHASES_ERROR_CODE = {}));\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/* tslint:disable:max-classes-per-file */\nimport { PURCHASES_ERROR_CODE } from \"./generated/error-codes\";\nexport { PURCHASES_ERROR_CODE };\n/**\n * @internal\n */\nvar UninitializedPurchasesError = /** @class */ (function (_super) {\n __extends(UninitializedPurchasesError, _super);\n function UninitializedPurchasesError() {\n var _this = _super.call(this, \"There is no singleton instance. \" +\n \"Make sure you configure Purchases before trying to get the default instance. \" +\n \"More info here: https://errors.rev.cat/configuring-sdk\") || this;\n // Set the prototype explicitly.\n Object.setPrototypeOf(_this, UninitializedPurchasesError.prototype);\n return _this;\n }\n return UninitializedPurchasesError;\n}(Error));\nexport { UninitializedPurchasesError };\n/**\n * @internal\n */\nvar UnsupportedPlatformError = /** @class */ (function (_super) {\n __extends(UnsupportedPlatformError, _super);\n function UnsupportedPlatformError() {\n var _this = _super.call(this, \"This method is not available in the current platform.\") || this;\n // Set the prototype explicitly.\n Object.setPrototypeOf(_this, UnsupportedPlatformError.prototype);\n return _this;\n }\n return UnsupportedPlatformError;\n}(Error));\nexport { UnsupportedPlatformError };\n","/**\n * Enum indicating possible package types.\n * @public\n */\nexport var PACKAGE_TYPE;\n(function (PACKAGE_TYPE) {\n /**\n * A package that was defined with a custom identifier.\n */\n PACKAGE_TYPE[\"UNKNOWN\"] = \"UNKNOWN\";\n /**\n * A package that was defined with a custom identifier.\n */\n PACKAGE_TYPE[\"CUSTOM\"] = \"CUSTOM\";\n /**\n * A package configured with the predefined lifetime identifier.\n */\n PACKAGE_TYPE[\"LIFETIME\"] = \"LIFETIME\";\n /**\n * A package configured with the predefined annual identifier.\n */\n PACKAGE_TYPE[\"ANNUAL\"] = \"ANNUAL\";\n /**\n * A package configured with the predefined six month identifier.\n */\n PACKAGE_TYPE[\"SIX_MONTH\"] = \"SIX_MONTH\";\n /**\n * A package configured with the predefined three month identifier.\n */\n PACKAGE_TYPE[\"THREE_MONTH\"] = \"THREE_MONTH\";\n /**\n * A package configured with the predefined two month identifier.\n */\n PACKAGE_TYPE[\"TWO_MONTH\"] = \"TWO_MONTH\";\n /**\n * A package configured with the predefined monthly identifier.\n */\n PACKAGE_TYPE[\"MONTHLY\"] = \"MONTHLY\";\n /**\n * A package configured with the predefined weekly identifier.\n */\n PACKAGE_TYPE[\"WEEKLY\"] = \"WEEKLY\";\n})(PACKAGE_TYPE || (PACKAGE_TYPE = {}));\n/**\n * Enum indicating possible eligibility status for introductory pricing.\n * @public\n */\nexport var INTRO_ELIGIBILITY_STATUS;\n(function (INTRO_ELIGIBILITY_STATUS) {\n /**\n * RevenueCat doesn't have enough information to determine eligibility.\n */\n INTRO_ELIGIBILITY_STATUS[INTRO_ELIGIBILITY_STATUS[\"INTRO_ELIGIBILITY_STATUS_UNKNOWN\"] = 0] = \"INTRO_ELIGIBILITY_STATUS_UNKNOWN\";\n /**\n * The user is not eligible for a free trial or intro pricing for this product.\n */\n INTRO_ELIGIBILITY_STATUS[INTRO_ELIGIBILITY_STATUS[\"INTRO_ELIGIBILITY_STATUS_INELIGIBLE\"] = 1] = \"INTRO_ELIGIBILITY_STATUS_INELIGIBLE\";\n /**\n * The user is eligible for a free trial or intro pricing for this product.\n */\n INTRO_ELIGIBILITY_STATUS[INTRO_ELIGIBILITY_STATUS[\"INTRO_ELIGIBILITY_STATUS_ELIGIBLE\"] = 2] = \"INTRO_ELIGIBILITY_STATUS_ELIGIBLE\";\n /**\n * There is no free trial or intro pricing for this product.\n */\n INTRO_ELIGIBILITY_STATUS[INTRO_ELIGIBILITY_STATUS[\"INTRO_ELIGIBILITY_STATUS_NO_INTRO_OFFER_EXISTS\"] = 3] = \"INTRO_ELIGIBILITY_STATUS_NO_INTRO_OFFER_EXISTS\";\n})(INTRO_ELIGIBILITY_STATUS || (INTRO_ELIGIBILITY_STATUS = {}));\n/**\n * Enum indicating possible product categories.\n * @public\n */\nexport var PRODUCT_CATEGORY;\n(function (PRODUCT_CATEGORY) {\n /**\n * A type of product for non-subscription.\n */\n PRODUCT_CATEGORY[\"NON_SUBSCRIPTION\"] = \"NON_SUBSCRIPTION\";\n /**\n * A type of product for subscriptions.\n */\n PRODUCT_CATEGORY[\"SUBSCRIPTION\"] = \"SUBSCRIPTION\";\n /**\n * A type of product for unknowns.\n */\n PRODUCT_CATEGORY[\"UNKNOWN\"] = \"UNKNOWN\";\n})(PRODUCT_CATEGORY || (PRODUCT_CATEGORY = {}));\n/**\n * Enum indicating possible product types.\n * @public\n */\nexport var PRODUCT_TYPE;\n(function (PRODUCT_TYPE) {\n /**\n * A consumable in-app purchase.\n */\n PRODUCT_TYPE[\"CONSUMABLE\"] = \"CONSUMABLE\";\n /**\n * A non-consumable in-app purchase. Only applies to Apple Store products.\n */\n PRODUCT_TYPE[\"NON_CONSUMABLE\"] = \"NON_CONSUMABLE\";\n /**\n * A non-renewing subscription. Only applies to Apple Store products.\n */\n PRODUCT_TYPE[\"NON_RENEWABLE_SUBSCRIPTION\"] = \"NON_RENEWABLE_SUBSCRIPTION\";\n /**\n * An auto-renewable subscription.\n */\n PRODUCT_TYPE[\"AUTO_RENEWABLE_SUBSCRIPTION\"] = \"AUTO_RENEWABLE_SUBSCRIPTION\";\n /**\n * A subscription that is pre-paid. Only applies to Google Play products.\n */\n PRODUCT_TYPE[\"PREPAID_SUBSCRIPTION\"] = \"PREPAID_SUBSCRIPTION\";\n /**\n * Unable to determine product type.\n */\n PRODUCT_TYPE[\"UNKNOWN\"] = \"UNKNOWN\";\n})(PRODUCT_TYPE || (PRODUCT_TYPE = {}));\n/**\n * Enum with possible proration modes in a subscription upgrade or downgrade in the Play Store. Used only for Google.\n * @deprecated Use STORE_REPLACEMENT_MODE\n * @public\n */\nexport var PRORATION_MODE;\n(function (PRORATION_MODE) {\n PRORATION_MODE[PRORATION_MODE[\"UNKNOWN_SUBSCRIPTION_UPGRADE_DOWNGRADE_POLICY\"] = 0] = \"UNKNOWN_SUBSCRIPTION_UPGRADE_DOWNGRADE_POLICY\";\n /**\n * Replacement takes effect immediately, and the remaining time will be\n * prorated and credited to the user.\n */\n PRORATION_MODE[PRORATION_MODE[\"IMMEDIATE_WITH_TIME_PRORATION\"] = 1] = \"IMMEDIATE_WITH_TIME_PRORATION\";\n /**\n * Replacement takes effect immediately, and the billing cycle remains the\n * same. The price for the remaining period will be charged. This option is\n * only available for subscription upgrade.\n */\n PRORATION_MODE[PRORATION_MODE[\"IMMEDIATE_AND_CHARGE_PRORATED_PRICE\"] = 2] = \"IMMEDIATE_AND_CHARGE_PRORATED_PRICE\";\n /**\n * Replacement takes effect immediately, and the new price will be charged on\n * next recurrence time. The billing cycle stays the same.\n *\n * This is the current default behavior.\n */\n PRORATION_MODE[PRORATION_MODE[\"IMMEDIATE_WITHOUT_PRORATION\"] = 3] = \"IMMEDIATE_WITHOUT_PRORATION\";\n /**\n * Replacement takes effect when the old plan expires, and the new price will\n * be charged at the same time.\n */\n PRORATION_MODE[PRORATION_MODE[\"DEFERRED\"] = 6] = \"DEFERRED\";\n /**\n * Replacement takes effect immediately, and the user is charged full price\n * of new plan and is given a full billing cycle of subscription,\n * plus remaining prorated time from the old plan.\n */\n PRORATION_MODE[PRORATION_MODE[\"IMMEDIATE_AND_CHARGE_FULL_PRICE\"] = 5] = \"IMMEDIATE_AND_CHARGE_FULL_PRICE\";\n})(PRORATION_MODE || (PRORATION_MODE = {}));\n/**\n * Enum with possible proration modes in a subscription upgrade or downgrade in the Play Store or Galaxy Store. Used only on Android.\n * @public\n */\nexport var STORE_REPLACEMENT_MODE;\n(function (STORE_REPLACEMENT_MODE) {\n /**\n * Old subscription is cancelled, and new subscription takes effect immediately.\n * User is charged for the full price of the new subscription on the old subscription's expiration date.\n *\n * This is the default behavior for the Galaxy and Play stores.\n */\n STORE_REPLACEMENT_MODE[\"WITHOUT_PRORATION\"] = \"WITHOUT_PRORATION\";\n /**\n * Replacement takes effect immediately, and the remaining time will be\n * prorated and credited to the user. This is the current default behavior.\n */\n STORE_REPLACEMENT_MODE[\"WITH_TIME_PRORATION\"] = \"WITH_TIME_PRORATION\";\n /**\n * Replacement takes effect immediately, and the user is charged full price of new plan and is\n * given a full billing cycle of subscription, plus remaining prorated time from the old plan.\n *\n * This mode is not supported by the Galaxy Store. If it is passed to the Galaxy Store, an error will be thrown.\n */\n STORE_REPLACEMENT_MODE[\"CHARGE_FULL_PRICE\"] = \"CHARGE_FULL_PRICE\";\n /**\n * Replacement takes effect immediately, and the billing cycle remains the\n * same. The price for the remaining period will be charged. This option is\n * only available for subscription upgrade.\n */\n STORE_REPLACEMENT_MODE[\"CHARGE_PRORATED_PRICE\"] = \"CHARGE_PRORATED_PRICE\";\n /**\n * Replacement takes effect when the old plan expires, and the new price will be charged at the same time.\n */\n STORE_REPLACEMENT_MODE[\"DEFERRED\"] = \"DEFERRED\";\n})(STORE_REPLACEMENT_MODE || (STORE_REPLACEMENT_MODE = {}));\n/**\n * Recurrence mode for a pricing phase\n * @public\n */\nexport var RECURRENCE_MODE;\n(function (RECURRENCE_MODE) {\n /**\n * Pricing phase repeats infinitely until cancellation\n */\n RECURRENCE_MODE[RECURRENCE_MODE[\"INFINITE_RECURRING\"] = 1] = \"INFINITE_RECURRING\";\n /**\n * Pricing phase repeats for a fixed number of billing periods\n */\n RECURRENCE_MODE[RECURRENCE_MODE[\"FINITE_RECURRING\"] = 2] = \"FINITE_RECURRING\";\n /**\n * Pricing phase does not repeat\n */\n RECURRENCE_MODE[RECURRENCE_MODE[\"NON_RECURRING\"] = 3] = \"NON_RECURRING\";\n})(RECURRENCE_MODE || (RECURRENCE_MODE = {}));\n/**\n * Payment mode for offer pricing phases. Google Play only.\n * @public\n */\nexport var OFFER_PAYMENT_MODE;\n(function (OFFER_PAYMENT_MODE) {\n /**\n * Subscribers don't pay until the specified period ends\n */\n OFFER_PAYMENT_MODE[\"FREE_TRIAL\"] = \"FREE_TRIAL\";\n /**\n * Subscribers pay up front for a specified period\n */\n OFFER_PAYMENT_MODE[\"SINGLE_PAYMENT\"] = \"SINGLE_PAYMENT\";\n /**\n * Subscribers pay a discounted amount for a specified number of periods\n */\n OFFER_PAYMENT_MODE[\"DISCOUNTED_RECURRING_PAYMENT\"] = \"DISCOUNTED_RECURRING_PAYMENT\";\n})(OFFER_PAYMENT_MODE || (OFFER_PAYMENT_MODE = {}));\n/**\n * Time duration unit for Period.\n * @public\n */\nexport var PERIOD_UNIT;\n(function (PERIOD_UNIT) {\n PERIOD_UNIT[\"DAY\"] = \"DAY\";\n PERIOD_UNIT[\"WEEK\"] = \"WEEK\";\n PERIOD_UNIT[\"MONTH\"] = \"MONTH\";\n PERIOD_UNIT[\"YEAR\"] = \"YEAR\";\n PERIOD_UNIT[\"UNKNOWN\"] = \"UNKNOWN\";\n})(PERIOD_UNIT || (PERIOD_UNIT = {}));\n","/**\n * @deprecated Use PRODUCT_CATEGORY\n * @public\n */\nexport var PURCHASE_TYPE;\n(function (PURCHASE_TYPE) {\n /**\n * A type of SKU for in-app products.\n */\n PURCHASE_TYPE[\"INAPP\"] = \"inapp\";\n /**\n * A type of SKU for subscriptions.\n */\n PURCHASE_TYPE[\"SUBS\"] = \"subs\";\n})(PURCHASE_TYPE || (PURCHASE_TYPE = {}));\n/**\n * Enum for billing features.\n * Currently, these are only relevant for Google Play Android users:\n * https://developer.android.com/reference/com/android/billingclient/api/BillingClient.FeatureType\n * @public\n */\nexport var BILLING_FEATURE;\n(function (BILLING_FEATURE) {\n /**\n * Purchase/query for subscriptions.\n */\n BILLING_FEATURE[BILLING_FEATURE[\"SUBSCRIPTIONS\"] = 0] = \"SUBSCRIPTIONS\";\n /**\n * Subscriptions update/replace.\n */\n BILLING_FEATURE[BILLING_FEATURE[\"SUBSCRIPTIONS_UPDATE\"] = 1] = \"SUBSCRIPTIONS_UPDATE\";\n /**\n * Purchase/query for in-app items on VR.\n */\n BILLING_FEATURE[BILLING_FEATURE[\"IN_APP_ITEMS_ON_VR\"] = 2] = \"IN_APP_ITEMS_ON_VR\";\n /**\n * Purchase/query for subscriptions on VR.\n */\n BILLING_FEATURE[BILLING_FEATURE[\"SUBSCRIPTIONS_ON_VR\"] = 3] = \"SUBSCRIPTIONS_ON_VR\";\n /**\n * Launch a price change confirmation flow.\n */\n BILLING_FEATURE[BILLING_FEATURE[\"PRICE_CHANGE_CONFIRMATION\"] = 4] = \"PRICE_CHANGE_CONFIRMATION\";\n})(BILLING_FEATURE || (BILLING_FEATURE = {}));\n/**\n * Enum for possible refund request results.\n * @public\n */\nexport var REFUND_REQUEST_STATUS;\n(function (REFUND_REQUEST_STATUS) {\n /**\n * Apple has received the refund request.\n */\n REFUND_REQUEST_STATUS[REFUND_REQUEST_STATUS[\"SUCCESS\"] = 0] = \"SUCCESS\";\n /**\n * User canceled submission of the refund request.\n */\n REFUND_REQUEST_STATUS[REFUND_REQUEST_STATUS[\"USER_CANCELLED\"] = 1] = \"USER_CANCELLED\";\n /**\n * There was an error with the request. See message for more details.\n */\n REFUND_REQUEST_STATUS[REFUND_REQUEST_STATUS[\"ERROR\"] = 2] = \"ERROR\";\n})(REFUND_REQUEST_STATUS || (REFUND_REQUEST_STATUS = {}));\n/**\n * Enum for possible log levels to print.\n * @public\n */\nexport var LOG_LEVEL;\n(function (LOG_LEVEL) {\n LOG_LEVEL[\"VERBOSE\"] = \"VERBOSE\";\n LOG_LEVEL[\"DEBUG\"] = \"DEBUG\";\n LOG_LEVEL[\"INFO\"] = \"INFO\";\n LOG_LEVEL[\"WARN\"] = \"WARN\";\n LOG_LEVEL[\"ERROR\"] = \"ERROR\";\n})(LOG_LEVEL || (LOG_LEVEL = {}));\n/**\n * Enum for in-app message types.\n * This can be used if you disable automatic in-app message from showing automatically.\n * Then, you can pass what type of messages you want to show in the `showInAppMessages`\n * method in Purchases.\n * @public\n */\nexport var IN_APP_MESSAGE_TYPE;\n(function (IN_APP_MESSAGE_TYPE) {\n // Make sure the enum values are in sync with those defined in iOS/Android\n /**\n * In-app messages to indicate there has been a billing issue charging the user.\n */\n IN_APP_MESSAGE_TYPE[IN_APP_MESSAGE_TYPE[\"BILLING_ISSUE\"] = 0] = \"BILLING_ISSUE\";\n /**\n * iOS-only. This message will show if you increase the price of a subscription and\n * the user needs to opt-in to the increase.\n */\n IN_APP_MESSAGE_TYPE[IN_APP_MESSAGE_TYPE[\"PRICE_INCREASE_CONSENT\"] = 1] = \"PRICE_INCREASE_CONSENT\";\n /**\n * iOS-only. StoreKit generic messages.\n */\n IN_APP_MESSAGE_TYPE[IN_APP_MESSAGE_TYPE[\"GENERIC\"] = 2] = \"GENERIC\";\n /**\n * iOS-only. This message will show if the subscriber is eligible for an iOS win-back\n * offer and will allow the subscriber to redeem the offer.\n */\n IN_APP_MESSAGE_TYPE[IN_APP_MESSAGE_TYPE[\"WIN_BACK_OFFER\"] = 3] = \"WIN_BACK_OFFER\";\n})(IN_APP_MESSAGE_TYPE || (IN_APP_MESSAGE_TYPE = {}));\n/**\n * Enum of entitlement verification modes.\n * @public\n */\nexport var ENTITLEMENT_VERIFICATION_MODE;\n(function (ENTITLEMENT_VERIFICATION_MODE) {\n /**\n * The SDK will not perform any entitlement verification.\n */\n ENTITLEMENT_VERIFICATION_MODE[\"DISABLED\"] = \"DISABLED\";\n /**\n * Enable entitlement verification.\n *\n * If verification fails, this will be indicated with [VerificationResult.FAILED] in\n * the [EntitlementInfos.verification] and [EntitlementInfo.verification] properties but parsing will not fail\n * (i.e. Entitlements will still be granted).\n *\n * This can be useful if you want to handle verification failures to display an error/warning to the user\n * or to track this situation but still grant access.\n */\n ENTITLEMENT_VERIFICATION_MODE[\"INFORMATIONAL\"] = \"INFORMATIONAL\";\n // Add ENFORCED mode once we're ready to ship it.\n // ENFORCED = \"ENFORCED\"\n})(ENTITLEMENT_VERIFICATION_MODE || (ENTITLEMENT_VERIFICATION_MODE = {}));\n/**\n * The result of the verification process. For more details check: http://rev.cat/trusted-entitlements\n *\n * This is accomplished by preventing MiTM attacks between the SDK and the RevenueCat server.\n * With verification enabled, the SDK ensures that the response created by the server was not\n * modified by a third-party, and the response received is exactly what was sent.\n *\n * - Note: Verification is only performed if enabled using PurchasesConfiguration's\n * entitlementVerificationMode property. This is disabled by default.\n *\n * @public\n */\nexport var VERIFICATION_RESULT;\n(function (VERIFICATION_RESULT) {\n /**\n * No verification was done.\n *\n * This value is returned when verification is not enabled in PurchasesConfiguration\n */\n VERIFICATION_RESULT[\"NOT_REQUESTED\"] = \"NOT_REQUESTED\";\n /**\n * Verification with our server was performed successfully.\n */\n VERIFICATION_RESULT[\"VERIFIED\"] = \"VERIFIED\";\n /**\n * Verification failed, possibly due to a MiTM attack.\n */\n VERIFICATION_RESULT[\"FAILED\"] = \"FAILED\";\n /**\n * Verification was performed on device.\n */\n VERIFICATION_RESULT[\"VERIFIED_ON_DEVICE\"] = \"VERIFIED_ON_DEVICE\";\n})(VERIFICATION_RESULT || (VERIFICATION_RESULT = {}));\n/**\n * The result of presenting a paywall. This will be the last situation the user experienced before the\n * paywall closed.\n *\n * @public\n */\nexport var PAYWALL_RESULT;\n(function (PAYWALL_RESULT) {\n /**\n * If the paywall wasn't presented. Only returned when using \"presentPaywallIfNeeded\"\n */\n PAYWALL_RESULT[\"NOT_PRESENTED\"] = \"NOT_PRESENTED\";\n /**\n * If an error happened during purchase/restoration.\n */\n PAYWALL_RESULT[\"ERROR\"] = \"ERROR\";\n /**\n * If the paywall was closed without performing an operation\n */\n PAYWALL_RESULT[\"CANCELLED\"] = \"CANCELLED\";\n /**\n * If a successful purchase happened inside the paywall\n */\n PAYWALL_RESULT[\"PURCHASED\"] = \"PURCHASED\";\n /**\n * If a successful restore happened inside the paywall\n */\n PAYWALL_RESULT[\"RESTORED\"] = \"RESTORED\";\n})(PAYWALL_RESULT || (PAYWALL_RESULT = {}));\n/**\n * Defines which version of StoreKit may be used\n * @public\n */\nexport var STOREKIT_VERSION;\n(function (STOREKIT_VERSION) {\n /**\n * Always use StoreKit 1.\n */\n STOREKIT_VERSION[\"STOREKIT_1\"] = \"STOREKIT_1\";\n /**\n * Always use StoreKit 2 (StoreKit 1 will be used if StoreKit 2 is not available in the current device.)\n * - Warning: Make sure you have an In-App Purchase Key configured in your app.\n * Please see https://rev.cat/in-app-purchase-key-configuration for more info.\n */\n STOREKIT_VERSION[\"STOREKIT_2\"] = \"STOREKIT_2\";\n /**\n * Let RevenueCat use the most appropriate version of StoreKit\n */\n STOREKIT_VERSION[\"DEFAULT\"] = \"DEFAULT\";\n})(STOREKIT_VERSION || (STOREKIT_VERSION = {}));\n/**\n * Modes for completing the purchase process.\n * @public\n */\nexport var PURCHASES_ARE_COMPLETED_BY_TYPE;\n(function (PURCHASES_ARE_COMPLETED_BY_TYPE) {\n /**\n * RevenueCat will **not** automatically acknowledge any purchases. You will have to do so manually.\n *\n * **Note:** failing to acknowledge a purchase within 3 days will lead to Google Play automatically issuing a\n * refund to the user.\n *\n * For more info, see [revenuecat.com](https://docs.revenuecat.com/docs/observer-mode#option-2-client-side).\n */\n PURCHASES_ARE_COMPLETED_BY_TYPE[\"MY_APP\"] = \"MY_APP\";\n /**\n * RevenueCat will automatically acknowledge verified purchases. No action is required by you.\n */\n PURCHASES_ARE_COMPLETED_BY_TYPE[\"REVENUECAT\"] = \"REVENUECAT\";\n})(PURCHASES_ARE_COMPLETED_BY_TYPE || (PURCHASES_ARE_COMPLETED_BY_TYPE = {}));\n","/**\n * The result type of a Redemption Link redemption attempt.\n * @public\n */\nexport var WebPurchaseRedemptionResultType;\n(function (WebPurchaseRedemptionResultType) {\n /**\n * The redemption was successful.\n */\n WebPurchaseRedemptionResultType[\"SUCCESS\"] = \"SUCCESS\";\n /**\n * The redemption failed.\n */\n WebPurchaseRedemptionResultType[\"ERROR\"] = \"ERROR\";\n /**\n * The purchase associated to the link belongs to another user.\n */\n WebPurchaseRedemptionResultType[\"PURCHASE_BELONGS_TO_OTHER_USER\"] = \"PURCHASE_BELONGS_TO_OTHER_USER\";\n /**\n * The token is invalid.\n */\n WebPurchaseRedemptionResultType[\"INVALID_TOKEN\"] = \"INVALID_TOKEN\";\n /**\n * The token has expired. A new Redemption Link will be sent to the email used during purchase.\n */\n WebPurchaseRedemptionResultType[\"EXPIRED\"] = \"EXPIRED\";\n})(WebPurchaseRedemptionResultType || (WebPurchaseRedemptionResultType = {}));\n","import { PAYWALL_RESULT } from '@revenuecat/purchases-typescript-internal-esm';\n/**\n * Possible outcomes from a custom {@link PurchaseLogic} operation.\n */\nexport var PURCHASE_LOGIC_RESULT;\n(function (PURCHASE_LOGIC_RESULT) {\n /** The purchase or restore completed successfully. */\n PURCHASE_LOGIC_RESULT[\"SUCCESS\"] = \"SUCCESS\";\n /** The user cancelled the purchase or restore. */\n PURCHASE_LOGIC_RESULT[\"CANCELLATION\"] = \"CANCELLATION\";\n /** The purchase or restore failed with an error. */\n PURCHASE_LOGIC_RESULT[\"ERROR\"] = \"ERROR\";\n})(PURCHASE_LOGIC_RESULT || (PURCHASE_LOGIC_RESULT = {}));\n/** @see {@link IOSPaywallPresentationStyle} */\nexport const IOS_PAYWALL_PRESENTATION_STYLE = {\n /** Presents the paywall in full-screen mode. */\n FULL_SCREEN: 'FULL_SCREEN',\n /** Presents the paywall as a sheet. This is the default on iOS. */\n SHEET: 'SHEET',\n};\n/** @see {@link AndroidPaywallPresentationStyle} */\nexport const ANDROID_PAYWALL_PRESENTATION_STYLE = {\n /** Presents the paywall in full-screen mode. This is the default on Android. */\n FULL_SCREEN: 'FULL_SCREEN',\n};\n/** Convenience presets for {@link PaywallPresentationConfiguration}. */\nexport const PaywallPresentationConfiguration = {\n /** Full-screen presentation on all platforms. */\n FULL_SCREEN: {\n ios: IOS_PAYWALL_PRESENTATION_STYLE.FULL_SCREEN,\n android: ANDROID_PAYWALL_PRESENTATION_STYLE.FULL_SCREEN,\n },\n /** Default presentation: sheet on iOS, full-screen on Android. */\n DEFAULT: {\n ios: IOS_PAYWALL_PRESENTATION_STYLE.SHEET,\n android: ANDROID_PAYWALL_PRESENTATION_STYLE.FULL_SCREEN,\n },\n};\n// Using the enum from purchases-typescript-internal-esm instead of defining our own\nexport { PAYWALL_RESULT as PaywallResultEnum };\n//# sourceMappingURL=definitions.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { registerPlugin } from '@capacitor/core';\nimport { IOS_PAYWALL_PRESENTATION_STYLE, ANDROID_PAYWALL_PRESENTATION_STYLE, PURCHASE_LOGIC_RESULT, } from './definitions';\nconst nativePlugin = registerPlugin('RevenueCatUI', {\n web: () => import('./web').then((m) => new m.RevenueCatUIWeb()),\n});\nfunction assertValidPresentationConfiguration(config) {\n if (config === undefined) {\n return;\n }\n if (typeof config !== 'object' || config === null) {\n throw new Error(`Invalid presentationConfiguration: expected an object or undefined.`);\n }\n const { ios, android } = config;\n const validIos = Object.values(IOS_PAYWALL_PRESENTATION_STYLE);\n const validAndroid = Object.values(ANDROID_PAYWALL_PRESENTATION_STYLE);\n if (ios !== undefined && !validIos.includes(ios)) {\n throw new Error(`Invalid presentationConfiguration.ios \"${String(ios)}\". Expected one of: ${validIos.join(', ')}.`);\n }\n if (android !== undefined && !validAndroid.includes(android)) {\n throw new Error(`Invalid presentationConfiguration.android \"${String(android)}\". Expected one of: ${validAndroid.join(', ')}.`);\n }\n}\nfunction resolveNativePresentationOptions(config) {\n if (!config) {\n return {};\n }\n // iOS full-screen takes precedence as the flag that the native bridge understands\n if (config.ios === IOS_PAYWALL_PRESENTATION_STYLE.FULL_SCREEN) {\n return { useFullScreenPresentation: true };\n }\n return {};\n}\nfunction serializeResultForNative(result) {\n if (result.result === PURCHASE_LOGIC_RESULT.ERROR && 'error' in result && result.error) {\n return {\n result: result.result,\n error: {\n code: result.error.code,\n message: result.error.message,\n },\n };\n }\n return { result: result.result };\n}\nasync function presentWithListenerSupport(nativeMethod, options, listener, purchaseLogic) {\n const handles = [];\n try {\n // Register PaywallListener event handlers\n if (listener) {\n if (listener.onPurchaseStarted) {\n const cb = listener.onPurchaseStarted;\n handles.push(await nativePlugin.addListener('onPurchaseStarted', (data) => {\n var _a;\n cb({ packageBeingPurchased: (_a = data.packageBeingPurchased) !== null && _a !== void 0 ? _a : data });\n }));\n }\n if (listener.onPurchaseCompleted) {\n const cb = listener.onPurchaseCompleted;\n handles.push(await nativePlugin.addListener('onPurchaseCompleted', (data) => {\n cb({\n customerInfo: data.customerInfo,\n storeTransaction: data.storeTransaction,\n });\n }));\n }\n if (listener.onPurchaseError) {\n const cb = listener.onPurchaseError;\n handles.push(await nativePlugin.addListener('onPurchaseError', (data) => {\n var _a;\n cb({ error: (_a = data.error) !== null && _a !== void 0 ? _a : data });\n }));\n }\n if (listener.onPurchaseCancelled) {\n const cb = listener.onPurchaseCancelled;\n handles.push(await nativePlugin.addListener('onPurchaseCancelled', () => {\n cb();\n }));\n }\n if (listener.onRestoreStarted) {\n const cb = listener.onRestoreStarted;\n handles.push(await nativePlugin.addListener('onRestoreStarted', () => {\n cb();\n }));\n }\n if (listener.onRestoreCompleted) {\n const cb = listener.onRestoreCompleted;\n handles.push(await nativePlugin.addListener('onRestoreCompleted', (data) => {\n var _a;\n cb({ customerInfo: (_a = data.customerInfo) !== null && _a !== void 0 ? _a : data });\n }));\n }\n if (listener.onRestoreError) {\n const cb = listener.onRestoreError;\n handles.push(await nativePlugin.addListener('onRestoreError', (data) => {\n var _a;\n cb({ error: (_a = data.error) !== null && _a !== void 0 ? _a : data });\n }));\n }\n if (listener.onWebCheckoutOpened) {\n const cb = listener.onWebCheckoutOpened;\n handles.push(await nativePlugin.addListener('onWebCheckoutOpened', () => {\n cb();\n }));\n }\n if (listener.onUrlOpened) {\n const cb = listener.onUrlOpened;\n handles.push(await nativePlugin.addListener('onUrlOpened', (data) => {\n cb({ url: data.url });\n }));\n }\n }\n // Always register onPurchaseInitiated so we auto-resume when the user\n // doesn't provide an onPurchaseInitiated callback — otherwise the\n // purchase flow hangs waiting for a resume that never comes.\n // This must be outside the `if (listener)` block because the native\n // delegate adapter always fires this event (even with purchaseLogic only).\n const onPurchaseInitiatedCb = listener === null || listener === void 0 ? void 0 : listener.onPurchaseInitiated;\n handles.push(await nativePlugin.addListener('onPurchaseInitiated', (data) => {\n var _a;\n const requestId = data.requestId;\n const packageBeingPurchased = (_a = data.package) !== null && _a !== void 0 ? _a : data.packageBeingPurchased;\n if (onPurchaseInitiatedCb) {\n onPurchaseInitiatedCb({\n packageBeingPurchased,\n resumable: {\n resume(shouldProceed = true) {\n nativePlugin.resumePurchaseInitiated({ requestId, shouldProceed });\n },\n },\n });\n }\n else {\n // No callback provided — auto-proceed with the purchase.\n nativePlugin.resumePurchaseInitiated({ requestId, shouldProceed: true });\n }\n }));\n // Register PurchaseLogic event handlers\n if (purchaseLogic) {\n handles.push(await nativePlugin.addListener('onPerformPurchaseRequest', async (data) => {\n var _a, _b, _c;\n const requestId = data.requestId;\n const packageToPurchase = (_b = (_a = data.package) !== null && _a !== void 0 ? _a : data.packageBeingPurchased) !== null && _b !== void 0 ? _b : data.packageToPurchase;\n try {\n const result = await purchaseLogic.performPurchase({ packageToPurchase });\n await nativePlugin.resumePurchaseLogicPurchase(Object.assign({ requestId }, serializeResultForNative(result)));\n }\n catch (e) {\n await nativePlugin.resumePurchaseLogicPurchase({\n requestId,\n result: PURCHASE_LOGIC_RESULT.ERROR,\n error: { message: (_c = e === null || e === void 0 ? void 0 : e.message) !== null && _c !== void 0 ? _c : 'Unknown error' },\n });\n }\n }));\n handles.push(await nativePlugin.addListener('onPerformRestoreRequest', async (data) => {\n var _a;\n const requestId = data.requestId;\n try {\n const result = await purchaseLogic.performRestore();\n await nativePlugin.resumePurchaseLogicRestore(Object.assign({ requestId }, serializeResultForNative(result)));\n }\n catch (e) {\n await nativePlugin.resumePurchaseLogicRestore({\n requestId,\n result: PURCHASE_LOGIC_RESULT.ERROR,\n error: { message: (_a = e === null || e === void 0 ? void 0 : e.message) !== null && _a !== void 0 ? _a : 'Unknown error' },\n });\n }\n }));\n }\n // Call native with serializable-only options\n const nativeOptions = Object.assign(Object.assign({}, options), { hasPaywallListener: !!listener, hasPurchaseLogic: !!purchaseLogic });\n // Remove non-serializable fields\n delete nativeOptions.listener;\n delete nativeOptions.purchaseLogic;\n return await nativeMethod(nativeOptions);\n }\n finally {\n // Clean up all registered listeners\n for (const handle of handles) {\n await handle.remove();\n }\n }\n}\nconst RevenueCatUI = {\n async presentPaywall(options) {\n assertValidPresentationConfiguration(options === null || options === void 0 ? void 0 : options.presentationConfiguration);\n const _a = options !== null && options !== void 0 ? options : {}, { presentationConfiguration, listener, purchaseLogic } = _a, rest = __rest(_a, [\"presentationConfiguration\", \"listener\", \"purchaseLogic\"]);\n const nativeOpts = Object.assign(Object.assign({}, rest), resolveNativePresentationOptions(presentationConfiguration));\n if (!listener && !purchaseLogic) {\n return nativePlugin.presentPaywall(nativeOpts);\n }\n return presentWithListenerSupport((opts) => nativePlugin.presentPaywall(opts), nativeOpts, listener, purchaseLogic);\n },\n async presentPaywallIfNeeded(options) {\n assertValidPresentationConfiguration(options === null || options === void 0 ? void 0 : options.presentationConfiguration);\n const { presentationConfiguration, listener, purchaseLogic } = options, rest = __rest(options, [\"presentationConfiguration\", \"listener\", \"purchaseLogic\"]);\n const nativeOpts = Object.assign(Object.assign({}, rest), resolveNativePresentationOptions(presentationConfiguration));\n if (!listener && !purchaseLogic) {\n return nativePlugin.presentPaywallIfNeeded(nativeOpts);\n }\n return presentWithListenerSupport((opts) => nativePlugin.presentPaywallIfNeeded(opts), nativeOpts, listener, purchaseLogic);\n },\n async presentCustomerCenter() {\n return nativePlugin.presentCustomerCenter();\n },\n setMockWebResults: nativePlugin.setMockWebResults\n ? async (options) => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return nativePlugin.setMockWebResults(options);\n }\n : undefined,\n addListener(eventName, listener) {\n return nativePlugin.addListener(eventName, listener);\n },\n removeAllListeners() {\n return nativePlugin.removeAllListeners();\n },\n};\nexport * from './definitions';\nexport { PAYWALL_RESULT } from '@revenuecat/purchases-typescript-internal-esm';\nexport { RevenueCatUI };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { PAYWALL_RESULT } from '@revenuecat/purchases-typescript-internal-esm';\nexport class RevenueCatUIWeb extends WebPlugin {\n constructor() {\n super();\n this.shouldMockWebResults = false;\n this.webNotSupportedErrorMessage = 'RevenueCatUI is not supported on web platforms.';\n }\n async setMockWebResults(options) {\n this.shouldMockWebResults = options.shouldMockWebResults;\n return Promise.resolve();\n }\n async presentPaywall(options) {\n return this.mockReturningFunctionIfEnabled('presentPaywall', {\n result: PAYWALL_RESULT.NOT_PRESENTED,\n }, options);\n }\n async presentPaywallIfNeeded(options) {\n return this.mockReturningFunctionIfEnabled('presentPaywallIfNeeded', {\n result: PAYWALL_RESULT.NOT_PRESENTED,\n }, options);\n }\n async presentCustomerCenter() {\n return this.mockNonReturningFunctionIfEnabled('presentCustomerCenter');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async resumePurchaseInitiated(_options) {\n return this.mockNonReturningFunctionIfEnabled('resumePurchaseInitiated');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async resumePurchaseLogicPurchase(_options) {\n return this.mockNonReturningFunctionIfEnabled('resumePurchaseLogicPurchase');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async resumePurchaseLogicRestore(_options) {\n return this.mockNonReturningFunctionIfEnabled('resumePurchaseLogicRestore');\n }\n addListener(eventName, listener) {\n if (eventName !== 'paywallDisplayed' && eventName !== 'paywallDismissed') {\n console.warn(`Unsupported event: ${eventName}`);\n }\n return super.addListener(eventName, listener);\n }\n removeAllListeners() {\n return super.removeAllListeners();\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, options) {\n if (!this.shouldMockWebResults) {\n return Promise.reject(this.webNotSupportedErrorMessage);\n }\n console.log(`${functionName} called on web with mocking enabled. Returning mocked value`, options);\n return Promise.resolve(returnValue);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["this","PAYWALL_RESULT","PURCHASE_LOGIC_RESULT","registerPlugin","WebPlugin"],"mappings":";;;IAAA;IACA;IACA;IACA;IACA;IACA;IACO,IAAI,oBAAoB;IAC/B,CAAC,UAAU,oBAAoB,EAAE;IACjC,IAAI,oBAAoB,CAAC,eAAe,CAAC,GAAG,GAAG;IAC/C,IAAI,oBAAoB,CAAC,0BAA0B,CAAC,GAAG,GAAG;IAC1D,IAAI,oBAAoB,CAAC,qBAAqB,CAAC,GAAG,GAAG;IACrD,IAAI,oBAAoB,CAAC,4BAA4B,CAAC,GAAG,GAAG;IAC5D,IAAI,oBAAoB,CAAC,wBAAwB,CAAC,GAAG,GAAG;IACxD,IAAI,oBAAoB,CAAC,0CAA0C,CAAC,GAAG,GAAG;IAC1E,IAAI,oBAAoB,CAAC,iCAAiC,CAAC,GAAG,GAAG;IACjE,IAAI,oBAAoB,CAAC,8BAA8B,CAAC,GAAG,GAAG;IAC9D,IAAI,oBAAoB,CAAC,uBAAuB,CAAC,GAAG,GAAG;IACvD,IAAI,oBAAoB,CAAC,4BAA4B,CAAC,GAAG,GAAG;IAC5D,IAAI,oBAAoB,CAAC,eAAe,CAAC,GAAG,IAAI;IAChD,IAAI,oBAAoB,CAAC,2BAA2B,CAAC,GAAG,IAAI;IAC5D,IAAI,oBAAoB,CAAC,mCAAmC,CAAC,GAAG,IAAI;IACpE,IAAI,oBAAoB,CAAC,0CAA0C,CAAC,GAAG,IAAI;IAC3E,IAAI,oBAAoB,CAAC,2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,CAAC,CAAC,EAAE,YAAY,CAAC,2DAA2D,CAAC,EAAE,OAAO,CAAC;IAC1G,QAAQ,OAAO,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC;IAC3C,IAAI;IACJ;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3,4]}
|
|
@@ -271,6 +271,15 @@ private class PaywallDelegateAdapter: NSObject, PaywallViewControllerDelegateWra
|
|
|
271
271
|
plugin?.notifyListeners("onRestoreError", data: ["error": errorDictionary])
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
+
func paywallViewControllerDidOpenWebCheckout(_ controller: PaywallViewController) {
|
|
275
|
+
plugin?.notifyListeners("onWebCheckoutOpened", data: [:])
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
func paywallViewController(_ controller: PaywallViewController,
|
|
279
|
+
didOpenURL url: String) {
|
|
280
|
+
plugin?.notifyListeners("onUrlOpened", data: ["url": url])
|
|
281
|
+
}
|
|
282
|
+
|
|
274
283
|
func paywallViewControllerWasDismissed(_ controller: PaywallViewController) {
|
|
275
284
|
plugin?.notifyListeners("paywallDismissed", data: [:])
|
|
276
285
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revenuecat/purchases-capacitor-ui",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.4.0",
|
|
4
4
|
"packageManager": "yarn@1.22.22",
|
|
5
5
|
"description": "UI components for RevenueCat Capacitor SDK",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
@@ -66,11 +66,11 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@capacitor/core": "^8.0.0",
|
|
69
|
-
"@revenuecat/purchases-typescript-internal-esm": "18.
|
|
69
|
+
"@revenuecat/purchases-typescript-internal-esm": "18.29.0"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"@capacitor/core": ">=8.0.0",
|
|
73
|
-
"@revenuecat/purchases-capacitor": "13.
|
|
73
|
+
"@revenuecat/purchases-capacitor": "13.4.0"
|
|
74
74
|
},
|
|
75
75
|
"lint-staged": {
|
|
76
76
|
"*.{ts,js,java,html,css}": [
|